@vev/silke 1.0.23 → 1.0.25
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 +17 -0
- package/dist/index.js +71 -30
- package/dist/index.js.LEGAL.txt +10 -0
- package/dist/silke/src/components/index.d.ts +1 -0
- package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-field.d.ts +5 -1
- package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-popup.d.ts +13 -0
- package/dist/silke/src/components/silke-box/silke-box.d.ts +1 -1
- package/dist/silke/src/components/silke-button/silke-button.d.ts +11 -11
- package/dist/silke/src/components/silke-card/silke-card.d.ts +13 -13
- package/dist/silke/src/components/silke-color-swatches/silke-color-swatch-button.d.ts +1 -1
- package/dist/silke/src/components/silke-css-number-field/index.d.ts +0 -1
- package/dist/silke/src/components/silke-css-number-field/silke-css-context.d.ts +1 -1
- package/dist/silke/src/components/silke-css-number-field/silke-css-number-field.d.ts +0 -2
- package/dist/silke/src/components/silke-form/form-types.d.ts +0 -1
- package/dist/silke/src/components/silke-form-schema/fields/number-field.d.ts +1 -1
- package/dist/silke/src/components/silke-form-schema/fields/utils/generate-title.d.ts +2 -2
- package/dist/silke/src/components/silke-form-schema/silke-schema-context.d.ts +1 -1
- package/dist/silke/src/components/silke-iframe-portal/silke-iframe-context.d.ts +0 -1
- package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-utils.d.ts +0 -1
- package/dist/silke/src/components/silke-table/table-types.d.ts +0 -1
- package/dist/silke/src/components/silke-tag/silke-tag.d.ts +8 -8
- package/dist/silke/src/components/silke-text/silke-text.d.ts +11 -11
- package/dist/silke/src/components/silke-text-field/silke-text-field-outline.d.ts +0 -3
- package/dist/silke/src/components/silke-tooltip/silke-shortcuts.d.ts +2 -33
- package/dist/silke/src/components/silke-variables-wrapper/index.d.ts +1 -0
- package/dist/silke/src/components/silke-variables-wrapper/silke-variables-wrapper-form.d.ts +12 -0
- package/dist/silke/src/components/silke-variables-wrapper/silke-variables-wrapper.d.ts +22 -0
- package/dist/silke/src/docs/data/app/constants.d.ts +0 -1
- package/dist/silke/src/hooks/use-mouse.d.ts +0 -1
- package/dist/styles.css +235 -212
- package/dist/utils/src/css/number-format.d.ts +1 -1
- package/dist/utils/src/index.d.ts +0 -2
- package/dist/utils/src/keyboard/hooks.d.ts +0 -1
- package/dist/utils/src/mouse/mouse-manager.d.ts +0 -1
- package/dist/utils/src/types/event.d.ts +1 -2
- package/dist/utils/src/types/index.d.ts +0 -1
- package/dist/utils/src/types/vev-props.d.ts +1 -1
- package/esbuild.config.mjs +3 -3
- package/package.json +3 -3
- package/src/components/index.ts +1 -0
- package/src/components/silke-autocomplete-field/autocomplete-item.tsx +7 -2
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.mdx +40 -0
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.scss +6 -2
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +22 -425
- package/src/components/silke-autocomplete-field/silke-autocomplete-popup.tsx +486 -0
- package/src/components/silke-button/silke-button.mdx +24 -0
- package/src/components/silke-button/silke-dropdown-button.tsx +2 -2
- package/src/components/silke-context-menu/silke-context-menu.tsx +2 -2
- package/src/components/silke-css-number-field/index.ts +0 -1
- package/src/components/silke-css-number-field/silke-css-context.tsx +7 -1
- package/src/components/silke-css-number-field/silke-css-number-field.mdx +3 -3
- package/src/components/silke-css-number-field/silke-css-number-field.scss +0 -12
- package/src/components/silke-css-number-field/silke-css-number-field.tsx +18 -101
- package/src/components/silke-css-number-field/utils.ts +5 -1
- package/src/components/silke-form-schema/fields/string-field.tsx +7 -2
- package/src/components/silke-form-schema/safe-eval/iframe-handler.ts +1 -0
- package/src/components/silke-icon/silke-icon.tsx +7 -3
- package/src/components/silke-navigation-link/silke-navigation-link.tsx +1 -1
- package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +2 -2
- package/src/components/silke-text-field/silke-text-field-outline.tsx +0 -17
- package/src/components/silke-text-field/silke-text-field.scss +1 -58
- package/src/components/silke-text-field/silke-text-field.tsx +0 -6
- package/src/components/silke-variables-wrapper/index.ts +1 -0
- package/src/components/silke-variables-wrapper/silke-variables-wrapper-form.tsx +64 -0
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.mdx +126 -0
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.scss +72 -0
- package/src/components/silke-variables-wrapper/silke-variables-wrapper.tsx +260 -0
- package/src/components/silke-virtual/silke-virtual-row.tsx +9 -6
- package/src/hooks/use-drop-zone.ts +1 -1
- package/src/hooks/use-mouse.ts +11 -4
- package/src/hooks/use-size.ts +14 -11
- package/dist/chunk-PP74IZDW.js +0 -22
- package/dist/chunk-PP74IZDW.js.LEGAL.txt +0 -11
- package/dist/chunk-PP74IZDW.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/silke/src/components/silke-css-number-field/variable-picker.d.ts +0 -17
- package/dist/silke-code-editor-LK4ESGQO.js +0 -25
- package/dist/silke-code-editor-LK4ESGQO.js.LEGAL.txt +0 -0
- package/dist/silke-code-editor-LK4ESGQO.js.map +0 -7
- package/dist/utils/src/events/condition-parser/evaluate-condition-expression.d.ts +0 -2
- package/dist/utils/src/events/condition-parser/index.d.ts +0 -1
- package/dist/utils/src/events/condition-parser/lexer.d.ts +0 -37
- package/dist/utils/src/events/condition-parser/parser.d.ts +0 -11
- package/dist/utils/src/interactions/get-interaction-map.d.ts +0 -3
- package/dist/utils/src/interactions/get-node-type.d.ts +0 -2
- package/dist/utils/src/interactions/has-link.d.ts +0 -5
- package/dist/utils/src/interactions/has-pointer-event.d.ts +0 -5
- package/dist/utils/src/interactions/index.d.ts +0 -7
- package/dist/utils/src/interactions/interaction-map-to-array.d.ts +0 -2
- package/dist/utils/src/interactions/is-target-global.d.ts +0 -2
- package/dist/utils/src/interactions/is-trigger-global.d.ts +0 -2
- package/dist/utils/src/types/interaction.d.ts +0 -93
- package/src/components/silke-css-number-field/variable-picker.tsx +0 -181
package/dist/styles.css
CHANGED
|
@@ -1136,8 +1136,12 @@ div[data-shadow=level4] {
|
|
|
1136
1136
|
.silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_disabled_bc5daf4479 * {
|
|
1137
1137
|
cursor: not-allowed;
|
|
1138
1138
|
}
|
|
1139
|
-
.silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-
|
|
1140
|
-
color: var(--color-support-tertiary-
|
|
1139
|
+
.silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_variable_bc5daf4479 [data-input] {
|
|
1140
|
+
color: var(--color-support-tertiary-40);
|
|
1141
|
+
}
|
|
1142
|
+
.silke-autocomplete-field_root_bc5daf4479.silke-autocomplete-field_open_bc5daf4479.silke-autocomplete-field_variable_bc5daf4479 {
|
|
1143
|
+
--current-border-color: var(--color-support-tertiary-40);
|
|
1144
|
+
--text-field-border-color: var(--color-support-tertiary-40);
|
|
1141
1145
|
}
|
|
1142
1146
|
|
|
1143
1147
|
.silke-autocomplete-field_autocompleteItem_bc5daf4479 {
|
|
@@ -1948,6 +1952,62 @@ img.silke-icon_icon_84f9e9d6b3 {
|
|
|
1948
1952
|
.silke-icon_emoji_84f9e9d6b3 {
|
|
1949
1953
|
font-size: 1.1428571429em;
|
|
1950
1954
|
}
|
|
1955
|
+
/**********************
|
|
1956
|
+
* SOME MATH
|
|
1957
|
+
************************/
|
|
1958
|
+
/**********************
|
|
1959
|
+
* FONT
|
|
1960
|
+
************************/
|
|
1961
|
+
/**********************
|
|
1962
|
+
* SPACING
|
|
1963
|
+
************************/
|
|
1964
|
+
/**********************
|
|
1965
|
+
* SIZES
|
|
1966
|
+
************************/
|
|
1967
|
+
/**
|
|
1968
|
+
* Get font size base on base font size
|
|
1969
|
+
* scaling = round(size * 1.200) (Minor Third)
|
|
1970
|
+
*/
|
|
1971
|
+
.silke-toolbar_root_dde856ffa5 {
|
|
1972
|
+
position: relative;
|
|
1973
|
+
}
|
|
1974
|
+
.silke-toolbar_root_dde856ffa5:before {
|
|
1975
|
+
background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
|
|
1976
|
+
position: absolute;
|
|
1977
|
+
content: "";
|
|
1978
|
+
bottom: 0;
|
|
1979
|
+
left: 0;
|
|
1980
|
+
right: 0;
|
|
1981
|
+
height: 1px;
|
|
1982
|
+
}
|
|
1983
|
+
/**********************
|
|
1984
|
+
* SOME MATH
|
|
1985
|
+
************************/
|
|
1986
|
+
/**********************
|
|
1987
|
+
* FONT
|
|
1988
|
+
************************/
|
|
1989
|
+
/**********************
|
|
1990
|
+
* SPACING
|
|
1991
|
+
************************/
|
|
1992
|
+
/**********************
|
|
1993
|
+
* SIZES
|
|
1994
|
+
************************/
|
|
1995
|
+
/**
|
|
1996
|
+
* Get font size base on base font size
|
|
1997
|
+
* scaling = round(size * 1.200) (Minor Third)
|
|
1998
|
+
*/
|
|
1999
|
+
.silke-steps_number_e3e97b6c1a {
|
|
2000
|
+
width: 24px;
|
|
2001
|
+
height: 24px;
|
|
2002
|
+
outline: 1px solid #fff;
|
|
2003
|
+
border-radius: 50%;
|
|
2004
|
+
text-align: center;
|
|
2005
|
+
transition: 500ms outline;
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
.silke-steps_number_e3e97b6c1a.silke-steps_done_e3e97b6c1a {
|
|
2009
|
+
outline: 1px solid var(--color-success-30);
|
|
2010
|
+
}
|
|
1951
2011
|
body {
|
|
1952
2012
|
--silke-card-border-radius: 8px;
|
|
1953
2013
|
--silke-card-aspect-ratio: 16/10;
|
|
@@ -2141,62 +2201,6 @@ body {
|
|
|
2141
2201
|
* Get font size base on base font size
|
|
2142
2202
|
* scaling = round(size * 1.200) (Minor Third)
|
|
2143
2203
|
*/
|
|
2144
|
-
.silke-steps_number_e3e97b6c1a {
|
|
2145
|
-
width: 24px;
|
|
2146
|
-
height: 24px;
|
|
2147
|
-
outline: 1px solid #fff;
|
|
2148
|
-
border-radius: 50%;
|
|
2149
|
-
text-align: center;
|
|
2150
|
-
transition: 500ms outline;
|
|
2151
|
-
}
|
|
2152
|
-
|
|
2153
|
-
.silke-steps_number_e3e97b6c1a.silke-steps_done_e3e97b6c1a {
|
|
2154
|
-
outline: 1px solid var(--color-success-30);
|
|
2155
|
-
}
|
|
2156
|
-
/**********************
|
|
2157
|
-
* SOME MATH
|
|
2158
|
-
************************/
|
|
2159
|
-
/**********************
|
|
2160
|
-
* FONT
|
|
2161
|
-
************************/
|
|
2162
|
-
/**********************
|
|
2163
|
-
* SPACING
|
|
2164
|
-
************************/
|
|
2165
|
-
/**********************
|
|
2166
|
-
* SIZES
|
|
2167
|
-
************************/
|
|
2168
|
-
/**
|
|
2169
|
-
* Get font size base on base font size
|
|
2170
|
-
* scaling = round(size * 1.200) (Minor Third)
|
|
2171
|
-
*/
|
|
2172
|
-
.silke-toolbar_root_dde856ffa5 {
|
|
2173
|
-
position: relative;
|
|
2174
|
-
}
|
|
2175
|
-
.silke-toolbar_root_dde856ffa5:before {
|
|
2176
|
-
background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
|
|
2177
|
-
position: absolute;
|
|
2178
|
-
content: "";
|
|
2179
|
-
bottom: 0;
|
|
2180
|
-
left: 0;
|
|
2181
|
-
right: 0;
|
|
2182
|
-
height: 1px;
|
|
2183
|
-
}
|
|
2184
|
-
/**********************
|
|
2185
|
-
* SOME MATH
|
|
2186
|
-
************************/
|
|
2187
|
-
/**********************
|
|
2188
|
-
* FONT
|
|
2189
|
-
************************/
|
|
2190
|
-
/**********************
|
|
2191
|
-
* SPACING
|
|
2192
|
-
************************/
|
|
2193
|
-
/**********************
|
|
2194
|
-
* SIZES
|
|
2195
|
-
************************/
|
|
2196
|
-
/**
|
|
2197
|
-
* Get font size base on base font size
|
|
2198
|
-
* scaling = round(size * 1.200) (Minor Third)
|
|
2199
|
-
*/
|
|
2200
2204
|
.silke-breadcrumb_breadbrumbs_4495c248fa {
|
|
2201
2205
|
padding: 0;
|
|
2202
2206
|
margin: 0;
|
|
@@ -2917,6 +2921,84 @@ body {
|
|
|
2917
2921
|
* Get font size base on base font size
|
|
2918
2922
|
* scaling = round(size * 1.200) (Minor Third)
|
|
2919
2923
|
*/
|
|
2924
|
+
.silke-variables-wrapper_wrapper_59f7ecc06c {
|
|
2925
|
+
position: relative;
|
|
2926
|
+
}
|
|
2927
|
+
.silke-variables-wrapper_wrapper_59f7ecc06c:hover .silke-variables-wrapper_variableDot_59f7ecc06c:before {
|
|
2928
|
+
opacity: 1;
|
|
2929
|
+
transform: scale(1);
|
|
2930
|
+
}
|
|
2931
|
+
.silke-variables-wrapper_wrapper_59f7ecc06c[data-open=true] *::after {
|
|
2932
|
+
--current-border-color: var(--color-support-tertiary-40) !important;
|
|
2933
|
+
--text-field-border-color: var(--color-support-tertiary-40) !important;
|
|
2934
|
+
}
|
|
2935
|
+
.silke-variables-wrapper_wrapper_59f7ecc06c[data-is-variable=true]:hover *::after {
|
|
2936
|
+
--current-border-color: var(--color-support-tertiary-40) !important;
|
|
2937
|
+
--text-field-border-color: var(--color-support-tertiary-40) !important;
|
|
2938
|
+
}
|
|
2939
|
+
.silke-variables-wrapper_wrapper_59f7ecc06c[data-full-width=true] {
|
|
2940
|
+
width: 100%;
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
.silke-variables-wrapper_variableDot_59f7ecc06c {
|
|
2944
|
+
position: absolute;
|
|
2945
|
+
left: 0px;
|
|
2946
|
+
top: 0px;
|
|
2947
|
+
width: 12px;
|
|
2948
|
+
height: 12px;
|
|
2949
|
+
padding: 0;
|
|
2950
|
+
z-index: 1;
|
|
2951
|
+
cursor: pointer;
|
|
2952
|
+
}
|
|
2953
|
+
.silke-variables-wrapper_variableDot_59f7ecc06c:after, .silke-variables-wrapper_variableDot_59f7ecc06c:before {
|
|
2954
|
+
content: "";
|
|
2955
|
+
position: absolute;
|
|
2956
|
+
width: 12px;
|
|
2957
|
+
height: 12px;
|
|
2958
|
+
border-radius: 50%;
|
|
2959
|
+
background: var(--color-neutral-100);
|
|
2960
|
+
margin-top: -6px;
|
|
2961
|
+
margin-left: -6px;
|
|
2962
|
+
border: 4px solid var(--color-support-tertiary-40);
|
|
2963
|
+
opacity: 0;
|
|
2964
|
+
transform-origin: center center;
|
|
2965
|
+
transition: transform 0.2s ease;
|
|
2966
|
+
}
|
|
2967
|
+
.silke-variables-wrapper_variableDot_59f7ecc06c:before {
|
|
2968
|
+
transform: scale(0);
|
|
2969
|
+
transform-origin: center center;
|
|
2970
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
2971
|
+
}
|
|
2972
|
+
.silke-variables-wrapper_variableDot_59f7ecc06c:after {
|
|
2973
|
+
content: attr(data-icon);
|
|
2974
|
+
display: flex;
|
|
2975
|
+
align-items: center;
|
|
2976
|
+
justify-content: center;
|
|
2977
|
+
line-height: 0;
|
|
2978
|
+
font-weight: bold;
|
|
2979
|
+
background: var(--color-support-tertiary-40);
|
|
2980
|
+
transition: opacity 0.2s ease;
|
|
2981
|
+
}
|
|
2982
|
+
.silke-variables-wrapper_variableDot_59f7ecc06c:hover:after {
|
|
2983
|
+
transform: scale(1.2);
|
|
2984
|
+
opacity: 1;
|
|
2985
|
+
}
|
|
2986
|
+
/**********************
|
|
2987
|
+
* SOME MATH
|
|
2988
|
+
************************/
|
|
2989
|
+
/**********************
|
|
2990
|
+
* FONT
|
|
2991
|
+
************************/
|
|
2992
|
+
/**********************
|
|
2993
|
+
* SPACING
|
|
2994
|
+
************************/
|
|
2995
|
+
/**********************
|
|
2996
|
+
* SIZES
|
|
2997
|
+
************************/
|
|
2998
|
+
/**
|
|
2999
|
+
* Get font size base on base font size
|
|
3000
|
+
* scaling = round(size * 1.200) (Minor Third)
|
|
3001
|
+
*/
|
|
2920
3002
|
.silke-skeleton_skeleton_bbf326f3d4 {
|
|
2921
3003
|
position: relative;
|
|
2922
3004
|
background-color: rgba(var(--color-neutral-100-rgb), var(--opacity-level-light));
|
|
@@ -3115,6 +3197,101 @@ body {
|
|
|
3115
3197
|
* Get font size base on base font size
|
|
3116
3198
|
* scaling = round(size * 1.200) (Minor Third)
|
|
3117
3199
|
*/
|
|
3200
|
+
.silke-css-number-field_root_c14b30381d {
|
|
3201
|
+
overflow: hidden;
|
|
3202
|
+
}
|
|
3203
|
+
.silke-css-number-field_root_c14b30381d:hover .silke-css-number-field_downIcon_c14b30381d, .silke-css-number-field_root_c14b30381d.silke-css-number-field_openFormat_c14b30381d .silke-css-number-field_downIcon_c14b30381d {
|
|
3204
|
+
opacity: 1;
|
|
3205
|
+
transform: translateX(0);
|
|
3206
|
+
}
|
|
3207
|
+
.silke-css-number-field_root_c14b30381d.silke-css-number-field_openFormat_c14b30381d.silke-css-number-field_openFormat_c14b30381d {
|
|
3208
|
+
--text-field-bg: var(--color-neutral-20);
|
|
3209
|
+
--text-field-hover-bg: var(--color-neutral-20);
|
|
3210
|
+
--text-field-focus-border-color: transparent;
|
|
3211
|
+
}
|
|
3212
|
+
|
|
3213
|
+
.silke-css-number-field_field_c14b30381d {
|
|
3214
|
+
outline: none;
|
|
3215
|
+
border: none;
|
|
3216
|
+
display: flex;
|
|
3217
|
+
align-items: center;
|
|
3218
|
+
white-space: nowrap;
|
|
3219
|
+
align-self: center;
|
|
3220
|
+
justify-self: end;
|
|
3221
|
+
overflow: hidden;
|
|
3222
|
+
min-width: 1px;
|
|
3223
|
+
padding: 0 !important;
|
|
3224
|
+
flex: none !important;
|
|
3225
|
+
text-align: right;
|
|
3226
|
+
position: relative;
|
|
3227
|
+
}
|
|
3228
|
+
.silke-css-number-field_field_c14b30381d.silke-css-number-field_hasFormats_c14b30381d, .silke-css-number-field_field_c14b30381d.silke-css-number-field_hasVariables_c14b30381d {
|
|
3229
|
+
max-width: calc(100% - 16px);
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
.silke-css-number-field_inputHolder_c14b30381d:first-child {
|
|
3233
|
+
padding: 0 4px;
|
|
3234
|
+
}
|
|
3235
|
+
.silke-css-number-field_inputHolder_c14b30381d:not(:first-child) {
|
|
3236
|
+
padding: 0;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
.silke-css-number-field_disabled_c14b30381d {
|
|
3240
|
+
cursor: not-allowed;
|
|
3241
|
+
}
|
|
3242
|
+
.silke-css-number-field_disabled_c14b30381d .silke-css-number-field_field_c14b30381d {
|
|
3243
|
+
pointer-events: none;
|
|
3244
|
+
color: var(--color-neutral-40);
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
.silke-css-number-field_counterCanvas_c14b30381d {
|
|
3248
|
+
width: 100vw;
|
|
3249
|
+
height: 100vh;
|
|
3250
|
+
position: fixed;
|
|
3251
|
+
background: transparent;
|
|
3252
|
+
inset: 0 0 0 0;
|
|
3253
|
+
z-index: 1000000;
|
|
3254
|
+
}
|
|
3255
|
+
|
|
3256
|
+
.silke-css-number-field_dragBar_c14b30381d {
|
|
3257
|
+
position: absolute;
|
|
3258
|
+
bottom: -5px;
|
|
3259
|
+
height: 10px;
|
|
3260
|
+
width: 100%;
|
|
3261
|
+
cursor: ew-resize;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
.silke-css-number-field_downIcon_c14b30381d {
|
|
3265
|
+
background: transparent;
|
|
3266
|
+
outline: none;
|
|
3267
|
+
border: none;
|
|
3268
|
+
opacity: 0;
|
|
3269
|
+
font-size: 0.845em;
|
|
3270
|
+
transform: translateX(4px);
|
|
3271
|
+
color: var(--text-field-placeholder-color);
|
|
3272
|
+
transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
.silke-css-number-field_downIcon_c14b30381d:hover,
|
|
3276
|
+
.silke-css-number-field_openFormat_c14b30381d .silke-css-number-field_downIcon_c14b30381d {
|
|
3277
|
+
color: var(--text-field-color);
|
|
3278
|
+
}
|
|
3279
|
+
/**********************
|
|
3280
|
+
* SOME MATH
|
|
3281
|
+
************************/
|
|
3282
|
+
/**********************
|
|
3283
|
+
* FONT
|
|
3284
|
+
************************/
|
|
3285
|
+
/**********************
|
|
3286
|
+
* SPACING
|
|
3287
|
+
************************/
|
|
3288
|
+
/**********************
|
|
3289
|
+
* SIZES
|
|
3290
|
+
************************/
|
|
3291
|
+
/**
|
|
3292
|
+
* Get font size base on base font size
|
|
3293
|
+
* scaling = round(size * 1.200) (Minor Third)
|
|
3294
|
+
*/
|
|
3118
3295
|
body {
|
|
3119
3296
|
--checkbox-size: 16px;
|
|
3120
3297
|
}
|
|
@@ -3327,109 +3504,6 @@ body {
|
|
|
3327
3504
|
* Get font size base on base font size
|
|
3328
3505
|
* scaling = round(size * 1.200) (Minor Third)
|
|
3329
3506
|
*/
|
|
3330
|
-
.silke-css-number-field_root_c14b30381d {
|
|
3331
|
-
overflow: hidden;
|
|
3332
|
-
}
|
|
3333
|
-
.silke-css-number-field_root_c14b30381d:hover .silke-css-number-field_downIcon_c14b30381d, .silke-css-number-field_root_c14b30381d.silke-css-number-field_openFormat_c14b30381d .silke-css-number-field_downIcon_c14b30381d {
|
|
3334
|
-
opacity: 1;
|
|
3335
|
-
transform: translateX(0);
|
|
3336
|
-
}
|
|
3337
|
-
.silke-css-number-field_root_c14b30381d.silke-css-number-field_openFormat_c14b30381d.silke-css-number-field_openFormat_c14b30381d {
|
|
3338
|
-
--text-field-bg: var(--color-neutral-20);
|
|
3339
|
-
--text-field-hover-bg: var(--color-neutral-20);
|
|
3340
|
-
--text-field-focus-border-color: transparent;
|
|
3341
|
-
}
|
|
3342
|
-
.silke-css-number-field_root_c14b30381d.silke-css-number-field_openVariables_c14b30381d {
|
|
3343
|
-
--current-border-color: var(--color-support-tertiary-30) !important;
|
|
3344
|
-
--text-field-hover-border-color: var(--color-support-tertiary-30) !important;
|
|
3345
|
-
}
|
|
3346
|
-
|
|
3347
|
-
.silke-css-number-field_field_c14b30381d {
|
|
3348
|
-
outline: none;
|
|
3349
|
-
border: none;
|
|
3350
|
-
display: flex;
|
|
3351
|
-
align-items: center;
|
|
3352
|
-
white-space: nowrap;
|
|
3353
|
-
align-self: center;
|
|
3354
|
-
justify-self: end;
|
|
3355
|
-
overflow: hidden;
|
|
3356
|
-
min-width: 1px;
|
|
3357
|
-
padding: 0 !important;
|
|
3358
|
-
flex: none !important;
|
|
3359
|
-
text-align: right;
|
|
3360
|
-
position: relative;
|
|
3361
|
-
}
|
|
3362
|
-
.silke-css-number-field_field_c14b30381d.silke-css-number-field_hasFormats_c14b30381d, .silke-css-number-field_field_c14b30381d.silke-css-number-field_hasVariables_c14b30381d {
|
|
3363
|
-
max-width: calc(100% - 16px);
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
.silke-css-number-field_inputHolder_c14b30381d:first-child {
|
|
3367
|
-
padding: 0 4px;
|
|
3368
|
-
}
|
|
3369
|
-
.silke-css-number-field_inputHolder_c14b30381d:not(:first-child) {
|
|
3370
|
-
padding: 0;
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
.silke-css-number-field_disabled_c14b30381d {
|
|
3374
|
-
cursor: not-allowed;
|
|
3375
|
-
}
|
|
3376
|
-
.silke-css-number-field_disabled_c14b30381d .silke-css-number-field_field_c14b30381d {
|
|
3377
|
-
pointer-events: none;
|
|
3378
|
-
color: var(--color-neutral-40);
|
|
3379
|
-
}
|
|
3380
|
-
|
|
3381
|
-
.silke-css-number-field_variable_c14b30381d .silke-css-number-field_field_c14b30381d {
|
|
3382
|
-
color: var(--color-support-tertiary-30);
|
|
3383
|
-
}
|
|
3384
|
-
|
|
3385
|
-
.silke-css-number-field_counterCanvas_c14b30381d {
|
|
3386
|
-
width: 100vw;
|
|
3387
|
-
height: 100vh;
|
|
3388
|
-
position: fixed;
|
|
3389
|
-
background: transparent;
|
|
3390
|
-
inset: 0 0 0 0;
|
|
3391
|
-
z-index: 1000000;
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
|
-
.silke-css-number-field_dragBar_c14b30381d {
|
|
3395
|
-
position: absolute;
|
|
3396
|
-
bottom: -5px;
|
|
3397
|
-
height: 10px;
|
|
3398
|
-
width: 100%;
|
|
3399
|
-
cursor: ew-resize;
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
.silke-css-number-field_downIcon_c14b30381d {
|
|
3403
|
-
background: transparent;
|
|
3404
|
-
outline: none;
|
|
3405
|
-
border: none;
|
|
3406
|
-
opacity: 0;
|
|
3407
|
-
font-size: 0.845em;
|
|
3408
|
-
transform: translateX(4px);
|
|
3409
|
-
color: var(--text-field-placeholder-color);
|
|
3410
|
-
transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
.silke-css-number-field_downIcon_c14b30381d:hover,
|
|
3414
|
-
.silke-css-number-field_openFormat_c14b30381d .silke-css-number-field_downIcon_c14b30381d {
|
|
3415
|
-
color: var(--text-field-color);
|
|
3416
|
-
}
|
|
3417
|
-
/**********************
|
|
3418
|
-
* SOME MATH
|
|
3419
|
-
************************/
|
|
3420
|
-
/**********************
|
|
3421
|
-
* FONT
|
|
3422
|
-
************************/
|
|
3423
|
-
/**********************
|
|
3424
|
-
* SPACING
|
|
3425
|
-
************************/
|
|
3426
|
-
/**********************
|
|
3427
|
-
* SIZES
|
|
3428
|
-
************************/
|
|
3429
|
-
/**
|
|
3430
|
-
* Get font size base on base font size
|
|
3431
|
-
* scaling = round(size * 1.200) (Minor Third)
|
|
3432
|
-
*/
|
|
3433
3507
|
.silke-divider_light_1989024e4e {
|
|
3434
3508
|
background-color: rgba(var(--color-neutral-70-rgb), var(--opacity-level-light));
|
|
3435
3509
|
}
|
|
@@ -4850,10 +4924,6 @@ body {
|
|
|
4850
4924
|
position: relative;
|
|
4851
4925
|
width: 100%;
|
|
4852
4926
|
}
|
|
4853
|
-
.silke-text-field_wrapper_11ab0f12bf:hover .silke-text-field_variableDot_11ab0f12bf:before {
|
|
4854
|
-
opacity: 1;
|
|
4855
|
-
transform: scale(1);
|
|
4856
|
-
}
|
|
4857
4927
|
|
|
4858
4928
|
.silke-text-field_root_11ab0f12bf {
|
|
4859
4929
|
--text-field-font-size: 14px;
|
|
@@ -4930,9 +5000,6 @@ body {
|
|
|
4930
5000
|
.silke-text-field_root_11ab0f12bf .silke-text-field_field_11ab0f12bf:has([data-input]:focus) {
|
|
4931
5001
|
--current-border-color: var(--text-field-focus-border-color);
|
|
4932
5002
|
}
|
|
4933
|
-
.silke-text-field_root_11ab0f12bf.silke-text-field_activeVariable_11ab0f12bf .silke-text-field_input_11ab0f12bf {
|
|
4934
|
-
color: var(--color-support-tertiary-30);
|
|
4935
|
-
}
|
|
4936
5003
|
|
|
4937
5004
|
.silke-text-field_tiny_11ab0f12bf,
|
|
4938
5005
|
.silke-text-field_small_11ab0f12bf {
|
|
@@ -5050,50 +5117,6 @@ textarea {
|
|
|
5050
5117
|
.silke-text-field_itemBefore_11ab0f12bf ~ .silke-text-field_input_11ab0f12bf, .silke-text-field_itemBefore_11ab0f12bf ~ [data-input] {
|
|
5051
5118
|
padding: 0;
|
|
5052
5119
|
}
|
|
5053
|
-
|
|
5054
|
-
.silke-text-field_variableDot_11ab0f12bf {
|
|
5055
|
-
position: absolute;
|
|
5056
|
-
left: 0px;
|
|
5057
|
-
top: 0px;
|
|
5058
|
-
width: 12px;
|
|
5059
|
-
height: 12px;
|
|
5060
|
-
padding: 0;
|
|
5061
|
-
z-index: 1;
|
|
5062
|
-
cursor: pointer;
|
|
5063
|
-
}
|
|
5064
|
-
.silke-text-field_variableDot_11ab0f12bf:after, .silke-text-field_variableDot_11ab0f12bf:before {
|
|
5065
|
-
content: "";
|
|
5066
|
-
position: absolute;
|
|
5067
|
-
width: 12px;
|
|
5068
|
-
height: 12px;
|
|
5069
|
-
border-radius: 50%;
|
|
5070
|
-
background: var(--color-neutral-100);
|
|
5071
|
-
margin-top: -6px;
|
|
5072
|
-
margin-left: -6px;
|
|
5073
|
-
border: 4px solid var(--color-support-tertiary-30);
|
|
5074
|
-
opacity: 0;
|
|
5075
|
-
transform-origin: center center;
|
|
5076
|
-
transition: transform 0.2s ease;
|
|
5077
|
-
}
|
|
5078
|
-
.silke-text-field_variableDot_11ab0f12bf:before {
|
|
5079
|
-
transform: scale(0);
|
|
5080
|
-
transform-origin: center center;
|
|
5081
|
-
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
5082
|
-
}
|
|
5083
|
-
.silke-text-field_variableDot_11ab0f12bf:after {
|
|
5084
|
-
content: attr(data-icon);
|
|
5085
|
-
display: flex;
|
|
5086
|
-
align-items: center;
|
|
5087
|
-
justify-content: center;
|
|
5088
|
-
line-height: 0;
|
|
5089
|
-
font-weight: bold;
|
|
5090
|
-
background: var(--color-support-tertiary-30);
|
|
5091
|
-
transition: opacity 0.2s ease;
|
|
5092
|
-
}
|
|
5093
|
-
.silke-text-field_variableDot_11ab0f12bf:hover:after {
|
|
5094
|
-
transform: scale(1.2);
|
|
5095
|
-
opacity: 1;
|
|
5096
|
-
}
|
|
5097
5120
|
/**********************
|
|
5098
5121
|
* SOME MATH
|
|
5099
5122
|
************************/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getCSSNumberFormat(value: string): '%' | 'px' | 'vh' | 'vw' | 'em' | 'rem' | 'cm' | 'deg' | 'rad' | 's' | 'ms';
|
|
1
|
+
export declare function getCSSNumberFormat(value: string, allowNoFormat?: boolean): '%' | 'px' | 'vh' | 'vw' | 'em' | 'rem' | 'cm' | 'deg' | 'rad' | 's' | 'ms' | '';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ShortcutModel } from './keyboard';
|
|
3
2
|
import { KeyboardEventCode, ModifierKey } from './keys';
|
|
4
3
|
export declare function useKey(key: KeyboardEventCode | KeyboardEventCode[] | undefined, cb: (e: KeyboardEvent) => void, deps?: React.DependencyList): void;
|
package/esbuild.config.mjs
CHANGED
|
@@ -38,9 +38,9 @@ async function buildSilke(watch) {
|
|
|
38
38
|
entryPoints: [path.resolve(__dirname, './src/index.ts')],
|
|
39
39
|
outdir: path.resolve(__dirname, './dist'),
|
|
40
40
|
bundle: true,
|
|
41
|
-
minify:
|
|
42
|
-
sourcemap:
|
|
43
|
-
splitting:
|
|
41
|
+
minify: !watch,
|
|
42
|
+
sourcemap: watch ? 'inline' : false,
|
|
43
|
+
splitting: false,
|
|
44
44
|
format: 'esm',
|
|
45
45
|
legalComments: 'linked',
|
|
46
46
|
target: ['es2020'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vev/silke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
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.
|
|
36
|
-
"@vev/utils": "1.2.
|
|
35
|
+
"@vev/react": "0.1.9",
|
|
36
|
+
"@vev/utils": "1.2.5",
|
|
37
37
|
"classnames": ">=2.2.0",
|
|
38
38
|
"flux": "^4.0.4",
|
|
39
39
|
"lodash": "^4.17.21",
|
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { BoxSize, SilkeBox } from '../silke-box';
|
|
3
3
|
import { SilkeCheckbox } from '../silke-checkbox';
|
|
4
|
-
import { SilkeText } from '../silke-text';
|
|
4
|
+
import { SilkeText, SilkeTextMicro } from '../silke-text';
|
|
5
5
|
import { Data, Entry } from './autocomplete-types';
|
|
6
6
|
import styles from './silke-autocomplete-field.scss';
|
|
7
7
|
import { SilkeIcon } from '../silke-icon';
|
|
@@ -51,11 +51,15 @@ export default function AutocompleteItem<T, U extends Entry<T>>({
|
|
|
51
51
|
// else if (size === 'xs') iconSize = 's';
|
|
52
52
|
// console.log('###### SIZE', size);
|
|
53
53
|
|
|
54
|
+
// For items with sublabel we need more space
|
|
55
|
+
let boxSize: BoxSize = size || 'm';
|
|
56
|
+
if (item.subLabel && (size === 's' || size === 'xs')) boxSize = 'base';
|
|
57
|
+
|
|
54
58
|
return (
|
|
55
59
|
<SilkeBox
|
|
56
60
|
ref={ref}
|
|
57
61
|
role="option"
|
|
58
|
-
height={
|
|
62
|
+
height={boxSize}
|
|
59
63
|
hPad={ItemRender || item.icon || item.image ? undefined : 's'}
|
|
60
64
|
bg={highlight ? 'neutral-30' : undefined}
|
|
61
65
|
bgHover={isDisabled ? undefined : 'neutral-30'}
|
|
@@ -88,6 +92,7 @@ export default function AutocompleteItem<T, U extends Entry<T>>({
|
|
|
88
92
|
<SilkeIcon icon={item.icon} />
|
|
89
93
|
</SilkeBox>
|
|
90
94
|
)}
|
|
95
|
+
|
|
91
96
|
<SilkeText
|
|
92
97
|
size={size === 's' ? 'small' : undefined}
|
|
93
98
|
tag={size === 's' ? 'small' : undefined}
|
|
@@ -31,6 +31,46 @@ const [value, setValue] = React.useState("");
|
|
|
31
31
|
</>;
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
## Items with subLabels and icons
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
const items = ipsum.list((i) => ({
|
|
38
|
+
value: i,
|
|
39
|
+
label: ipsum.name(),
|
|
40
|
+
subLabel: ipsum.name(),
|
|
41
|
+
icon: "variable.color",
|
|
42
|
+
}));
|
|
43
|
+
const [value, setValue] = React.useState("");
|
|
44
|
+
<>
|
|
45
|
+
<h5>Value: {value || "No value"}</h5>
|
|
46
|
+
<SilkeTextField name="test" label="Text before" />
|
|
47
|
+
{["default", "zombie", "ghost"].map((kind) => (
|
|
48
|
+
<SilkeBox key={kind} gap="s">
|
|
49
|
+
<SilkeAutocompleteField
|
|
50
|
+
label={kind}
|
|
51
|
+
kind={kind}
|
|
52
|
+
name="Foobar"
|
|
53
|
+
placeholder="Placeholder"
|
|
54
|
+
onChange={setValue}
|
|
55
|
+
value={value}
|
|
56
|
+
items={items}
|
|
57
|
+
/>
|
|
58
|
+
<SilkeAutocompleteField
|
|
59
|
+
label={kind}
|
|
60
|
+
kind={kind}
|
|
61
|
+
size="xs"
|
|
62
|
+
name="Foobar"
|
|
63
|
+
placeholder="Placeholder"
|
|
64
|
+
onChange={setValue}
|
|
65
|
+
value={value}
|
|
66
|
+
items={items}
|
|
67
|
+
/>
|
|
68
|
+
</SilkeBox>
|
|
69
|
+
))}
|
|
70
|
+
<SilkeTextField name="test" label="Text after" />
|
|
71
|
+
</>;
|
|
72
|
+
```
|
|
73
|
+
|
|
34
74
|
## Autocomplete multiple
|
|
35
75
|
|
|
36
76
|
```js
|
|
@@ -29,11 +29,15 @@
|
|
|
29
29
|
cursor: not-allowed;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
&.
|
|
32
|
+
&.variable {
|
|
33
33
|
[data-input] {
|
|
34
|
-
color: var(--color-support-tertiary-
|
|
34
|
+
color: var(--color-support-tertiary-40);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
&.open.variable {
|
|
38
|
+
--current-border-color: var(--color-support-tertiary-40);
|
|
39
|
+
--text-field-border-color: var(--color-support-tertiary-40);
|
|
40
|
+
}
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
.autocompleteItem {
|