@vev/silke 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css CHANGED
@@ -1106,6 +1106,60 @@ div[data-shadow=level4] {
1106
1106
  content: "";
1107
1107
  z-index: 1;
1108
1108
  }
1109
+ .silke-autocomplete-field_root_bc5daf4479 {
1110
+ cursor: pointer;
1111
+ -webkit-user-select: none;
1112
+ -moz-user-select: none;
1113
+ user-select: none;
1114
+ }
1115
+ .silke-autocomplete-field_root_bc5daf4479:not(.silke-autocomplete-field_disabled_bc5daf4479):hover .silke-autocomplete-field_downIcon_bc5daf4479, .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_open_bc5daf4479 .silke-autocomplete-field_downIcon_bc5daf4479 {
1116
+ color: var(--color-neutral-100);
1117
+ }
1118
+ .silke-autocomplete-field_root_bc5daf4479:not(.silke-autocomplete-field_disabled_bc5daf4479):hover:not(.silke-autocomplete-field_open_bc5daf4479) .silke-autocomplete-field_arrow_bc5daf4479 {
1119
+ padding-top: 4px;
1120
+ }
1121
+ .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_open_bc5daf4479:not(.silke-autocomplete-field_ghost_bc5daf4479) {
1122
+ --text-field-bg: var(--color-neutral-20);
1123
+ --text-field-hover-bg: var(--color-neutral-20);
1124
+ --text-field-focus-border-color: transparent;
1125
+ }
1126
+ .silke-autocomplete-field_root_bc5daf4479 .silke-autocomplete-field_placeholder_bc5daf4479, .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_disabled_bc5daf4479 [data-input] {
1127
+ color: var(--text-field-disabled-placeholder-color);
1128
+ font-size: var(--text-field-font-size);
1129
+ }
1130
+ .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_disabled_bc5daf4479 * {
1131
+ cursor: not-allowed;
1132
+ }
1133
+
1134
+ .silke-autocomplete-field_autocompleteItem_bc5daf4479 {
1135
+ cursor: pointer;
1136
+ }
1137
+
1138
+ .silke-autocomplete-field_downIcon_bc5daf4479 {
1139
+ background: transparent;
1140
+ outline: none;
1141
+ border: none;
1142
+ font-size: 0.845em;
1143
+ color: var(--color-neutral-70);
1144
+ transform: translateY(0);
1145
+ transition: opacity 0.5s ease-in-out, transform 0.3s ease-out;
1146
+ }
1147
+
1148
+ .silke-autocomplete-field_hiddenSearch_bc5daf4479 {
1149
+ width: 0;
1150
+ height: 0;
1151
+ overflow: hidden;
1152
+ opacity: 0;
1153
+ }
1154
+
1155
+ .silke-autocomplete-field_arrow_bc5daf4479 {
1156
+ transition: padding-top 0.2s ease-out, color 0.2s ease-out;
1157
+ height: 100%;
1158
+ width: 16px;
1159
+ }
1160
+ .silke-autocomplete-field_arrow_bc5daf4479 i {
1161
+ font-size: 10px !important;
1162
+ }
1109
1163
  .styles_image_11233b422c {
1110
1164
  width: 24px;
1111
1165
  height: 24px;
@@ -1885,62 +1939,6 @@ img.silke-icon_icon_84f9e9d6b3 {
1885
1939
  .silke-icon_emoji_84f9e9d6b3 {
1886
1940
  font-size: 1.1428571429em;
1887
1941
  }
1888
- /**********************
1889
- * SOME MATH
1890
- ************************/
1891
- /**********************
1892
- * FONT
1893
- ************************/
1894
- /**********************
1895
- * SPACING
1896
- ************************/
1897
- /**********************
1898
- * SIZES
1899
- ************************/
1900
- /**
1901
- * Get font size base on base font size
1902
- * scaling = round(size * 1.200) (Minor Third)
1903
- */
1904
- .silke-steps_number_e3e97b6c1a {
1905
- width: 24px;
1906
- height: 24px;
1907
- outline: 1px solid #fff;
1908
- border-radius: 50%;
1909
- text-align: center;
1910
- transition: 500ms outline;
1911
- }
1912
-
1913
- .silke-steps_number_e3e97b6c1a.silke-steps_done_e3e97b6c1a {
1914
- outline: 1px solid var(--color-success-30);
1915
- }
1916
- /**********************
1917
- * SOME MATH
1918
- ************************/
1919
- /**********************
1920
- * FONT
1921
- ************************/
1922
- /**********************
1923
- * SPACING
1924
- ************************/
1925
- /**********************
1926
- * SIZES
1927
- ************************/
1928
- /**
1929
- * Get font size base on base font size
1930
- * scaling = round(size * 1.200) (Minor Third)
1931
- */
1932
- .silke-toolbar_root_dde856ffa5 {
1933
- position: relative;
1934
- }
1935
- .silke-toolbar_root_dde856ffa5:before {
1936
- background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
1937
- position: absolute;
1938
- content: "";
1939
- bottom: 0;
1940
- left: 0;
1941
- right: 0;
1942
- height: 1px;
1943
- }
1944
1942
  body {
1945
1943
  --silke-card-border-radius: 8px;
1946
1944
  --silke-card-aspect-ratio: 16/10;
@@ -2134,6 +2132,62 @@ body {
2134
2132
  * Get font size base on base font size
2135
2133
  * scaling = round(size * 1.200) (Minor Third)
2136
2134
  */
2135
+ .silke-toolbar_root_dde856ffa5 {
2136
+ position: relative;
2137
+ }
2138
+ .silke-toolbar_root_dde856ffa5:before {
2139
+ background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
2140
+ position: absolute;
2141
+ content: "";
2142
+ bottom: 0;
2143
+ left: 0;
2144
+ right: 0;
2145
+ height: 1px;
2146
+ }
2147
+ /**********************
2148
+ * SOME MATH
2149
+ ************************/
2150
+ /**********************
2151
+ * FONT
2152
+ ************************/
2153
+ /**********************
2154
+ * SPACING
2155
+ ************************/
2156
+ /**********************
2157
+ * SIZES
2158
+ ************************/
2159
+ /**
2160
+ * Get font size base on base font size
2161
+ * scaling = round(size * 1.200) (Minor Third)
2162
+ */
2163
+ .silke-steps_number_e3e97b6c1a {
2164
+ width: 24px;
2165
+ height: 24px;
2166
+ outline: 1px solid #fff;
2167
+ border-radius: 50%;
2168
+ text-align: center;
2169
+ transition: 500ms outline;
2170
+ }
2171
+
2172
+ .silke-steps_number_e3e97b6c1a.silke-steps_done_e3e97b6c1a {
2173
+ outline: 1px solid var(--color-success-30);
2174
+ }
2175
+ /**********************
2176
+ * SOME MATH
2177
+ ************************/
2178
+ /**********************
2179
+ * FONT
2180
+ ************************/
2181
+ /**********************
2182
+ * SPACING
2183
+ ************************/
2184
+ /**********************
2185
+ * SIZES
2186
+ ************************/
2187
+ /**
2188
+ * Get font size base on base font size
2189
+ * scaling = round(size * 1.200) (Minor Third)
2190
+ */
2137
2191
  .silke-breadcrumb_breadbrumbs_4495c248fa {
2138
2192
  padding: 0;
2139
2193
  }
@@ -2525,56 +2579,68 @@ body {
2525
2579
  * Get font size base on base font size
2526
2580
  * scaling = round(size * 1.200) (Minor Third)
2527
2581
  */
2528
- .silke-autocomplete-field_root_bc5daf4479 {
2529
- cursor: pointer;
2530
- -webkit-user-select: none;
2531
- -moz-user-select: none;
2532
- user-select: none;
2582
+ .silke-table_toolbar_b5946502de {
2583
+ border-radius: var(--border-radius-medium);
2584
+ border-bottom-left-radius: var(--border-radius-tiny);
2585
+ border-bottom-right-radius: var(--border-radius-tiny);
2533
2586
  }
2534
- .silke-autocomplete-field_root_bc5daf4479:hover .silke-autocomplete-field_downIcon_bc5daf4479, .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_open_bc5daf4479 .silke-autocomplete-field_downIcon_bc5daf4479 {
2535
- color: var(--color-neutral-100);
2587
+
2588
+ .silke-table_toolbar_b5946502de ~ .silke-table_table_b5946502de {
2589
+ border-top-left-radius: var(--border-radius-tiny);
2590
+ border-top-right-radius: var(--border-radius-tiny);
2536
2591
  }
2537
- .silke-autocomplete-field_root_bc5daf4479:hover:not(.silke-autocomplete-field_open_bc5daf4479) .silke-autocomplete-field_arrow_bc5daf4479 {
2538
- padding-top: 4px;
2592
+
2593
+ .silke-table_table_b5946502de {
2594
+ border-collapse: collapse;
2595
+ width: 100%;
2596
+ background-color: var(--color-neutral-5);
2597
+ border-radius: var(--border-radius-medium);
2598
+ overflow: hidden;
2539
2599
  }
2540
- .silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_open_bc5daf4479:not(.silke-autocomplete-field_ghost_bc5daf4479) {
2541
- --text-field-bg: var(--color-neutral-20);
2542
- --text-field-hover-bg: var(--color-neutral-20);
2543
- --text-field-focus-border-color: transparent;
2600
+ .silke-table_table_b5946502de td {
2601
+ height: 48px;
2602
+ text-overflow: ellipsis;
2603
+ white-space: nowrap;
2544
2604
  }
2545
- .silke-autocomplete-field_root_bc5daf4479 .silke-autocomplete-field_placeholder_bc5daf4479 {
2546
- color: var(--text-field-disabled-placeholder-color);
2547
- font-size: var(--text-field-font-size);
2605
+ .silke-table_table_b5946502de tbody tr:not(:last-child) td {
2606
+ border-bottom: 1px solid var(--color-neutral-20);
2548
2607
  }
2549
-
2550
- .silke-autocomplete-field_autocompleteItem_bc5daf4479 {
2551
- cursor: pointer;
2608
+ .silke-table_table_b5946502de tbody td {
2609
+ overflow: hidden;
2610
+ padding: 0 16px;
2611
+ }
2612
+ .silke-table_table_b5946502de th {
2613
+ font-weight: 600;
2614
+ text-align: left;
2615
+ padding: 8px 16px;
2616
+ line-height: 1.3;
2617
+ }
2618
+ .silke-table_table_b5946502de tbody td.silke-table_menu_b5946502de,
2619
+ .silke-table_table_b5946502de .silke-table_head_b5946502de th.silke-table_menu_b5946502de {
2620
+ padding: 8px;
2621
+ width: 48px;
2622
+ }
2623
+ .silke-table_table_b5946502de .silke-table_check_b5946502de {
2624
+ width: 48px;
2625
+ text-align: center;
2626
+ }
2627
+ .silke-table_table_b5946502de.silke-table_hasSelected_b5946502de .silke-table_toolbar_b5946502de {
2628
+ background-color: var(--color-accent-50);
2552
2629
  }
2553
2630
 
2554
- .silke-autocomplete-field_downIcon_bc5daf4479 {
2555
- background: transparent;
2556
- outline: none;
2557
- border: none;
2558
- font-size: 0.845em;
2559
- color: var(--color-neutral-70);
2560
- transform: translateY(0);
2561
- transition: opacity 0.5s ease-in-out, transform 0.3s ease-out;
2631
+ .silke-table_fixedColumns_b5946502de {
2632
+ table-layout: fixed;
2562
2633
  }
2563
2634
 
2564
- .silke-autocomplete-field_hiddenSearch_bc5daf4479 {
2565
- width: 0;
2566
- height: 0;
2567
- overflow: hidden;
2568
- opacity: 0;
2635
+ .silke-table_loadBtn_b5946502de button {
2636
+ width: 100%;
2569
2637
  }
2570
2638
 
2571
- .silke-autocomplete-field_arrow_bc5daf4479 {
2572
- transition: padding-top 0.2s ease-out, color 0.2s ease-out;
2573
- height: 100%;
2574
- width: 16px;
2639
+ .silke-table_selectable_b5946502de:hover {
2640
+ cursor: pointer;
2575
2641
  }
2576
- .silke-autocomplete-field_arrow_bc5daf4479 i {
2577
- font-size: 10px !important;
2642
+ .silke-table_selectable_b5946502de:hover td {
2643
+ background: var(--color-neutral-20);
2578
2644
  }
2579
2645
  /**********************
2580
2646
  * SOME MATH
@@ -2669,85 +2735,6 @@ body {
2669
2735
  * Get font size base on base font size
2670
2736
  * scaling = round(size * 1.200) (Minor Third)
2671
2737
  */
2672
- .silke-table_toolbar_b5946502de {
2673
- border-radius: var(--border-radius-medium);
2674
- border-bottom-left-radius: var(--border-radius-tiny);
2675
- border-bottom-right-radius: var(--border-radius-tiny);
2676
- }
2677
-
2678
- .silke-table_toolbar_b5946502de ~ .silke-table_table_b5946502de {
2679
- border-top-left-radius: var(--border-radius-tiny);
2680
- border-top-right-radius: var(--border-radius-tiny);
2681
- }
2682
-
2683
- .silke-table_table_b5946502de {
2684
- border-collapse: collapse;
2685
- width: 100%;
2686
- background-color: var(--color-neutral-5);
2687
- border-radius: var(--border-radius-medium);
2688
- overflow: hidden;
2689
- }
2690
- .silke-table_table_b5946502de td {
2691
- height: 48px;
2692
- text-overflow: ellipsis;
2693
- white-space: nowrap;
2694
- }
2695
- .silke-table_table_b5946502de tbody tr:not(:last-child) td {
2696
- border-bottom: 1px solid var(--color-neutral-20);
2697
- }
2698
- .silke-table_table_b5946502de tbody td {
2699
- overflow: hidden;
2700
- padding: 0 16px;
2701
- }
2702
- .silke-table_table_b5946502de th {
2703
- font-weight: 600;
2704
- text-align: left;
2705
- padding: 8px 16px;
2706
- line-height: 1.3;
2707
- }
2708
- .silke-table_table_b5946502de tbody td.silke-table_menu_b5946502de,
2709
- .silke-table_table_b5946502de .silke-table_head_b5946502de th.silke-table_menu_b5946502de {
2710
- padding: 8px;
2711
- width: 48px;
2712
- }
2713
- .silke-table_table_b5946502de .silke-table_check_b5946502de {
2714
- width: 48px;
2715
- text-align: center;
2716
- }
2717
- .silke-table_table_b5946502de.silke-table_hasSelected_b5946502de .silke-table_toolbar_b5946502de {
2718
- background-color: var(--color-accent-50);
2719
- }
2720
-
2721
- .silke-table_fixedColumns_b5946502de {
2722
- table-layout: fixed;
2723
- }
2724
-
2725
- .silke-table_loadBtn_b5946502de button {
2726
- width: 100%;
2727
- }
2728
-
2729
- .silke-table_selectable_b5946502de:hover {
2730
- cursor: pointer;
2731
- }
2732
- .silke-table_selectable_b5946502de:hover td {
2733
- background: var(--color-neutral-20);
2734
- }
2735
- /**********************
2736
- * SOME MATH
2737
- ************************/
2738
- /**********************
2739
- * FONT
2740
- ************************/
2741
- /**********************
2742
- * SPACING
2743
- ************************/
2744
- /**********************
2745
- * SIZES
2746
- ************************/
2747
- /**
2748
- * Get font size base on base font size
2749
- * scaling = round(size * 1.200) (Minor Third)
2750
- */
2751
2738
  .silke-toggle_container_5fdf33c914 {
2752
2739
  position: relative;
2753
2740
  cursor: pointer;
@@ -28,6 +28,7 @@ export declare class Lexer {
28
28
  input: string;
29
29
  pos: number;
30
30
  constructor();
31
+ private isHyphen;
31
32
  private isNumber;
32
33
  private processNumber;
33
34
  private isCharacter;
@@ -14,6 +14,7 @@ export declare enum EVENT_SCOPE {
14
14
  export type VevDispatchEvent = {
15
15
  type?: string;
16
16
  contentKey?: string;
17
+ instanceKeyChain?: string;
17
18
  args?: VevProps[];
18
19
  };
19
20
  export type TriggerItem = {
@@ -19,29 +19,36 @@ export interface EditorPluginKv {
19
19
  export interface EditorPluginSettings {
20
20
  form: VevProps[];
21
21
  }
22
- export interface EditorPluginAssetSourceResult {
23
- images?: {
24
- key: string;
25
- name: string;
26
- url: string;
27
- thumb: string;
28
- metadata?: Record<string, string>;
29
- }[];
30
- videos?: {
31
- key: string;
32
- name: string;
33
- url: string;
34
- thumb: string;
35
- metadata: Record<string, string>;
36
- }[];
37
- shapes?: {
38
- key: string;
39
- name: string;
40
- url: string;
41
- thumb: string;
42
- metadata: Record<string, string>;
43
- }[];
22
+ type ImageSizes = Record<number, string>;
23
+ type MetaData = Record<string, string>;
24
+ export interface BaseProjectAsset {
25
+ key: string;
26
+ mimeType: string;
27
+ url: string;
28
+ filename?: string;
29
+ metaData?: MetaData;
30
+ selfHosted?: boolean;
44
31
  }
32
+ export interface ProjectImageAsset extends BaseProjectAsset {
33
+ dimension?: {
34
+ width: number;
35
+ height: number;
36
+ };
37
+ thumb?: string;
38
+ imageSizes?: ImageSizes;
39
+ }
40
+ export interface ProjectVideoAsset extends BaseProjectAsset {
41
+ videoThumbnail?: string;
42
+ videoSample?: string;
43
+ dimension?: {
44
+ width: number;
45
+ height: number;
46
+ };
47
+ duration?: number;
48
+ state?: 'uploading' | 'encoding' | 'completed' | 'error' | 'preUpload';
49
+ additionalSources: Omit<ProjectVideoAsset, 'additionalSources'>[];
50
+ }
51
+ export type ProjectAsset = BaseProjectAsset | ProjectImageAsset | ProjectVideoAsset;
45
52
  export declare enum EditorPluginType {
46
53
  ASSET_SOURCE = "asset-source"
47
54
  }
@@ -54,7 +61,8 @@ export interface EditorPlugin<T> {
54
61
  icon?: string;
55
62
  oauthConfig?: OAuthConfig;
56
63
  }
57
- export interface EditorPluginAssetSource extends EditorPlugin<EditorPluginAssetSourceResult> {
64
+ export type EditorPluginAssetSourceFilterFields = Record<string, string[]>;
65
+ export interface EditorPluginAssetSource extends EditorPlugin<ProjectAsset[] | EditorPluginAssetSourceFilterFields> {
58
66
  type: EditorPluginType.ASSET_SOURCE;
59
67
  }
60
68
  export type VevPluginType = EditorPluginAssetSource;
@@ -1,5 +1,6 @@
1
1
  export * from './generate-guid';
2
2
  export * from './string';
3
+ export * from './main-components';
3
4
  export { default as isString } from './is-string';
4
5
  export { default as isArray } from './is-array';
5
6
  export { default as isLength } from './is-length';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Get all inherited keys from a mocked key
3
+ * ie. 'model-instance-instance2' => ['model-instance', 'model']
4
+ * @param key mocked key
5
+ * @returns a array of all models that are inherited from the given key
6
+ */
7
+ export declare function getInheritedKeysFromKey(key: string): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vev/silke",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/silke/src/index.d.ts",
@@ -32,8 +32,8 @@
32
32
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
33
33
  "@uiw/codemirror-theme-dracula": "^4.12.3",
34
34
  "@uiw/react-codemirror": "^4.12.3",
35
- "@vev/react": "0.1.5",
36
- "@vev/utils": "1.2.2",
35
+ "@vev/react": "0.1.6",
36
+ "@vev/utils": "1.2.3",
37
37
  "classnames": ">=2.2.0",
38
38
  "flux": "^4.0.4",
39
39
  "lodash": "^4.17.21",
package/public/index.html CHANGED
@@ -15,7 +15,7 @@
15
15
  rel="stylesheet"
16
16
  />
17
17
  <!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" /> -->
18
- <link rel="stylesheet" href="https://cdn.vev.design/fontawesome/6.1.1/css/all.min.css" >
18
+ <link rel="stylesheet" href="https://cdn.vev.design/fontawesome/6.5.1/css/all.min.css" >
19
19
  </head>
20
20
  <body>
21
21
  <div id="root" style="width: 100%;height:100%;"></div>
@@ -1,15 +1,14 @@
1
- @use '../../variables' as *;
2
1
  .root {
3
2
  cursor: pointer;
4
3
  user-select: none;
5
4
 
6
- &:hover,
5
+ &:not(.disabled):hover,
7
6
  &.open {
8
7
  .downIcon{
9
8
  color: var(--color-neutral-100);
10
9
  }
11
10
  }
12
- &:hover:not(.open){
11
+ &:not(.disabled):hover:not(.open){
13
12
  .arrow{
14
13
  padding-top: 4px;
15
14
  }
@@ -21,10 +20,14 @@
21
20
  --text-field-focus-border-color: transparent;
22
21
  }
23
22
 
24
- .placeholder {
23
+ .placeholder, &.disabled [data-input] {
25
24
  color: var(--text-field-disabled-placeholder-color);
26
25
  font-size: var(--text-field-font-size);
27
26
  }
27
+
28
+ &.disabled *{
29
+ cursor: not-allowed;
30
+ }
28
31
  }
29
32
 
30
33
  .autocompleteItem {
@@ -256,8 +256,9 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
256
256
  }, [items, form.multiple, resetSearchText, form.value]);
257
257
 
258
258
  useEffect(() => {
259
- if (autoFocus) setOpen(true);
260
- }, [autoFocus]);
259
+ if (autoFocus && !disabled) setOpen(true);
260
+ else if (disabled) setOpen(false);
261
+ }, [autoFocus, disabled]);
261
262
 
262
263
  useEffect(() => {
263
264
  if (open && highlight !== undefined) {
@@ -422,7 +423,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
422
423
  case 'ArrowDown': {
423
424
  e.preventDefault();
424
425
  e.stopPropagation();
425
- if (!open) {
426
+ if (!open && !disabled) {
426
427
  setOpen(true);
427
428
  } else {
428
429
  const { key } = e;
@@ -451,6 +452,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
451
452
  let cl = styles.root;
452
453
  if (open) cl += ' ' + styles.open;
453
454
  if (styles[kind]) cl += ' ' + styles[kind];
455
+ if (disabled) cl += ' ' + styles.disabled;
454
456
 
455
457
  return (
456
458
  <>
@@ -475,6 +477,7 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
475
477
  e.preventDefault();
476
478
  e.stopPropagation();
477
479
  onMouseDown?.(e);
480
+ if (disabled) return;
478
481
  !context.readOnly &&
479
482
  setOpen((wasOpen) => {
480
483
  return !wasOpen;
@@ -504,13 +507,13 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
504
507
  ref={inputField}
505
508
  data-placeholder={placeholder}
506
509
  onKeyUp={(e: KeyboardEvent) => {
507
- if ((e.key === 'Enter' || e.key === 'ArrowDown') && !open) {
510
+ if ((e.key === 'Enter' || e.key === 'ArrowDown') && !open && !disabled) {
508
511
  e.preventDefault();
509
512
  setOpen(true);
510
513
  }
511
514
  }}
512
515
  onFocus={() => {
513
- if (!open) setOpen(true);
516
+ if (!open && !disabled) setOpen(true);
514
517
  }}
515
518
  >
516
519
  {form.multiple && form.value?.length > 0 ? (
@@ -600,7 +603,6 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
600
603
  inline="label-inside"
601
604
  label={<SilkeIcon icon="search" />}
602
605
  aria-label={'Search for ' + label}
603
- aria-role="searchbox"
604
606
  autoFocus
605
607
  size={size}
606
608
  className={disableSearch ? styles.hiddenSearch : undefined}
@@ -40,6 +40,18 @@ const [value, setValue] = React.useState("");
40
40
  value={value}
41
41
  items={items}
42
42
  />
43
+ <SilkeSelectField
44
+ key={kind}
45
+ label="Default"
46
+ name="Foobar"
47
+ disabled
48
+ placeholder="Select an item"
49
+ kind={kind}
50
+ size="xs"
51
+ onChange={setValue}
52
+ value={value}
53
+ items={items}
54
+ />
43
55
  </SilkeBox>
44
56
  ))}
45
57
  </SilkeBox>;