@vev/silke 1.0.18 → 1.0.19

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.
Files changed (407) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{chunk-SOFGXMET.js → chunk-FIPWO3IB.js} +3 -3
  3. package/dist/{chunk-SOFGXMET.js.map → chunk-FIPWO3IB.js.map} +1 -1
  4. package/dist/index.js +21 -22
  5. package/dist/index.js.LEGAL.txt +7 -7
  6. package/dist/index.js.map +4 -4
  7. package/dist/silke/src/components/index.d.ts +54 -0
  8. package/dist/silke/src/components/silke-autocomplete-field/autocomplete-item.d.ts +19 -0
  9. package/dist/silke/src/components/silke-autocomplete-field/autocomplete-tags.d.ts +9 -0
  10. package/dist/silke/src/components/silke-autocomplete-field/autocomplete-types.d.ts +55 -0
  11. package/dist/silke/src/components/silke-autocomplete-field/index.d.ts +5 -0
  12. package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-field.d.ts +50 -0
  13. package/dist/silke/src/components/silke-box/index.d.ts +1 -0
  14. package/dist/silke/src/components/silke-box/silke-box.d.ts +121 -0
  15. package/dist/silke/src/components/silke-breadcrumbs/index.d.ts +2 -0
  16. package/dist/silke/src/components/silke-breadcrumbs/silke-breadcrumb.d.ts +10 -0
  17. package/dist/silke/src/components/silke-breadcrumbs/silke-breadcrumbs.d.ts +7 -0
  18. package/dist/silke/src/components/silke-button/context.d.ts +14 -0
  19. package/dist/silke/src/components/silke-button/index.d.ts +7 -0
  20. package/dist/silke/src/components/silke-button/silke-big-button.d.ts +13 -0
  21. package/dist/silke/src/components/silke-button/silke-button-set.d.ts +11 -0
  22. package/dist/silke/src/components/silke-button/silke-button.d.ts +39 -0
  23. package/dist/silke/src/components/silke-button/silke-confirmation-button.d.ts +8 -0
  24. package/dist/silke/src/components/silke-button/silke-file-select-button.d.ts +9 -0
  25. package/dist/silke/src/components/silke-card/index.d.ts +2 -0
  26. package/dist/silke/src/components/silke-card/silke-card-grid.d.ts +10 -0
  27. package/dist/silke/src/components/silke-card/silke-card.d.ts +24 -0
  28. package/dist/silke/src/components/silke-checkbox/index.d.ts +1 -0
  29. package/dist/silke/src/components/silke-checkbox/silke-checkbox.d.ts +11 -0
  30. package/dist/silke/src/components/silke-code-editor/index.d.ts +3 -0
  31. package/dist/silke/src/components/silke-code-editor/silke-code-editor.d.ts +8 -0
  32. package/dist/silke/src/components/silke-code-snippet/index.d.ts +1 -0
  33. package/dist/silke/src/components/silke-code-snippet/silke-code-snippet.d.ts +17 -0
  34. package/dist/silke/src/components/silke-color-palettes/index.d.ts +2 -0
  35. package/dist/silke/src/components/silke-color-palettes/silke-color-palette.d.ts +12 -0
  36. package/dist/silke/src/components/silke-color-palettes/silke-color-palettes.d.ts +8 -0
  37. package/dist/silke/src/components/silke-color-picker/color.d.ts +31 -0
  38. package/dist/silke/src/components/silke-color-picker/hue.d.ts +7 -0
  39. package/dist/silke/src/components/silke-color-picker/index.d.ts +4 -0
  40. package/dist/silke/src/components/silke-color-picker/silke-color-info.d.ts +9 -0
  41. package/dist/silke/src/components/silke-color-picker/silke-color-picker-button.d.ts +11 -0
  42. package/dist/silke/src/components/silke-color-picker/silke-color-picker.d.ts +17 -0
  43. package/dist/silke/src/components/silke-color-picker/silke-color-space.d.ts +11 -0
  44. package/dist/silke/src/components/silke-color-picker/silke-hue-slider.d.ts +7 -0
  45. package/dist/silke/src/components/silke-color-picker/silke-opacity-slider.d.ts +8 -0
  46. package/dist/silke/src/components/silke-color-swatches/index.d.ts +2 -0
  47. package/dist/silke/src/components/silke-color-swatches/silke-color-swatch-button.d.ts +6 -0
  48. package/dist/silke/src/components/silke-color-swatches/silke-swatches.d.ts +25 -0
  49. package/dist/silke/src/components/silke-color-swatches/utils.d.ts +12 -0
  50. package/dist/silke/src/components/silke-content-column/index.d.ts +1 -0
  51. package/dist/silke/src/components/silke-content-column/silke-content-column.d.ts +7 -0
  52. package/dist/silke/src/components/silke-context-menu/index.d.ts +2 -0
  53. package/dist/silke/src/components/silke-context-menu/silke-contect-menu-hooks.d.ts +0 -0
  54. package/dist/silke/src/components/silke-context-menu/silke-context-menu-item.d.ts +12 -0
  55. package/dist/silke/src/components/silke-context-menu/silke-context-menu.d.ts +15 -0
  56. package/dist/silke/src/components/silke-css-number-field/index.d.ts +2 -0
  57. package/dist/silke/src/components/silke-css-number-field/silke-css-context.d.ts +29 -0
  58. package/dist/silke/src/components/silke-css-number-field/silke-css-number-field.d.ts +15 -0
  59. package/dist/silke/src/components/silke-css-number-field/utils.d.ts +32 -0
  60. package/dist/silke/src/components/silke-divider/index.d.ts +1 -0
  61. package/dist/silke/src/components/silke-divider/silke-divider.d.ts +13 -0
  62. package/dist/silke/src/components/silke-drawer/index.d.ts +1 -0
  63. package/dist/silke/src/components/silke-drawer/silke-drawer.d.ts +12 -0
  64. package/dist/silke/src/components/silke-form/form-context.d.ts +26 -0
  65. package/dist/silke/src/components/silke-form/form-types.d.ts +44 -0
  66. package/dist/silke/src/components/silke-form/index.d.ts +2 -0
  67. package/dist/silke/src/components/silke-form/silke-form.d.ts +22 -0
  68. package/dist/silke/src/components/silke-form-schema/fields/array-field-inline.d.ts +12 -0
  69. package/dist/silke/src/components/silke-form-schema/fields/array-field-modal.d.ts +13 -0
  70. package/dist/silke/src/components/silke-form-schema/fields/array-field.d.ts +4 -0
  71. package/dist/silke/src/components/silke-form-schema/fields/event-field.d.ts +4 -0
  72. package/dist/silke/src/components/silke-form-schema/fields/icon-field.d.ts +4 -0
  73. package/dist/silke/src/components/silke-form-schema/fields/image-field.d.ts +4 -0
  74. package/dist/silke/src/components/silke-form-schema/fields/layout-field.d.ts +3 -0
  75. package/dist/silke/src/components/silke-form-schema/fields/link-field.d.ts +4 -0
  76. package/dist/silke/src/components/silke-form-schema/fields/number-field.d.ts +4 -0
  77. package/dist/silke/src/components/silke-form-schema/fields/object-field.d.ts +3 -0
  78. package/dist/silke/src/components/silke-form-schema/fields/select-field.d.ts +4 -0
  79. package/dist/silke/src/components/silke-form-schema/fields/string-field.d.ts +4 -0
  80. package/dist/silke/src/components/silke-form-schema/fields/toggle-field.d.ts +4 -0
  81. package/dist/silke/src/components/silke-form-schema/fields/upload-field.d.ts +4 -0
  82. package/dist/silke/src/components/silke-form-schema/fields/utils/generate-image.d.ts +3 -0
  83. package/dist/silke/src/components/silke-form-schema/fields/utils/generate-title.d.ts +7 -0
  84. package/dist/silke/src/components/silke-form-schema/fields/utils/index.d.ts +2 -0
  85. package/dist/silke/src/components/silke-form-schema/fields/utils/schema-util.d.ts +2 -0
  86. package/dist/silke/src/components/silke-form-schema/index.d.ts +4 -0
  87. package/dist/silke/src/components/silke-form-schema/safe-eval/iframe-handler.d.ts +17 -0
  88. package/dist/silke/src/components/silke-form-schema/safe-eval/index.d.ts +1 -0
  89. package/dist/silke/src/components/silke-form-schema/safe-eval/safe-eval.d.ts +1 -0
  90. package/dist/silke/src/components/silke-form-schema/schema-utils.d.ts +11 -0
  91. package/dist/silke/src/components/silke-form-schema/silke-extended-fields-context.d.ts +13 -0
  92. package/dist/silke/src/components/silke-form-schema/silke-form-schema.d.ts +13 -0
  93. package/dist/silke/src/components/silke-form-schema/silke-schema-context.d.ts +9 -0
  94. package/dist/silke/src/components/silke-form-schema/silke-schema-field.d.ts +10 -0
  95. package/dist/silke/src/components/silke-form-schema/silke-schema-fields.d.ts +14 -0
  96. package/dist/silke/src/components/silke-gradient-picker/index.d.ts +1 -0
  97. package/dist/silke/src/components/silke-gradient-picker/silke-gradient-picker.d.ts +5 -0
  98. package/dist/silke/src/components/silke-gradient-picker/silke-gradient-position.d.ts +8 -0
  99. package/dist/silke/src/components/silke-gradient-picker/silke-gradient-slider.d.ts +10 -0
  100. package/dist/silke/src/components/silke-gradient-picker/silke-gradient-utils.d.ts +14 -0
  101. package/dist/silke/src/components/silke-icon/index.d.ts +2 -0
  102. package/dist/silke/src/components/silke-icon/silke-icon.d.ts +11 -0
  103. package/dist/silke/src/components/silke-icon/silke-shape.d.ts +8 -0
  104. package/dist/silke/src/components/silke-icon/silke-stacked-icon.d.ts +8 -0
  105. package/dist/silke/src/components/silke-icon-picker/emoji-tab.d.ts +3 -0
  106. package/dist/silke/src/components/silke-icon-picker/icons-tab.d.ts +3 -0
  107. package/dist/silke/src/components/silke-icon-picker/index.d.ts +1 -0
  108. package/dist/silke/src/components/silke-icon-picker/silke-icon-picker.d.ts +12 -0
  109. package/dist/silke/src/components/silke-icon-picker/upload-tab.d.ts +3 -0
  110. package/dist/silke/src/components/silke-icon-picker/utils.d.ts +5 -0
  111. package/dist/silke/src/components/silke-iframe-portal/index.d.ts +4 -0
  112. package/dist/silke/src/components/silke-iframe-portal/silke-iframe-context.d.ts +7 -0
  113. package/dist/silke/src/components/silke-iframe-portal/silke-iframe-css-link.d.ts +5 -0
  114. package/dist/silke/src/components/silke-iframe-portal/silke-iframe-portal.d.ts +10 -0
  115. package/dist/silke/src/components/silke-iframe-portal/silke-iframe-script.d.ts +6 -0
  116. package/dist/silke/src/components/silke-image/index.d.ts +2 -0
  117. package/dist/silke/src/components/silke-image/silke-image-color-backdrop.d.ts +7 -0
  118. package/dist/silke/src/components/silke-image/silke-image.d.ts +11 -0
  119. package/dist/silke/src/components/silke-link/index.d.ts +1 -0
  120. package/dist/silke/src/components/silke-link/silke-link.d.ts +23 -0
  121. package/dist/silke/src/components/silke-list/index.d.ts +2 -0
  122. package/dist/silke/src/components/silke-list/silke-list-item.d.ts +7 -0
  123. package/dist/silke/src/components/silke-list/silke-list.d.ts +10 -0
  124. package/dist/silke/src/components/silke-list-card/index.d.ts +1 -0
  125. package/dist/silke/src/components/silke-list-card/silke-list-card.d.ts +14 -0
  126. package/dist/silke/src/components/silke-loader/index.d.ts +2 -0
  127. package/dist/silke/src/components/silke-loader/silke-loader-overlay.d.ts +18 -0
  128. package/dist/silke/src/components/silke-loader/silke-loader.d.ts +18 -0
  129. package/dist/silke/src/components/silke-modal/index.d.ts +2 -0
  130. package/dist/silke/src/components/silke-modal/silke-confirmation-modal.d.ts +31 -0
  131. package/dist/silke/src/components/silke-modal/silke-modal.d.ts +18 -0
  132. package/dist/silke/src/components/silke-navigation-link/index.d.ts +1 -0
  133. package/dist/silke/src/components/silke-navigation-link/silke-navigation-link.d.ts +22 -0
  134. package/dist/silke/src/components/silke-notification/confetti.d.ts +2 -0
  135. package/dist/silke/src/components/silke-notification/index.d.ts +1 -0
  136. package/dist/silke/src/components/silke-notification/silke-notification.d.ts +22 -0
  137. package/dist/silke/src/components/silke-object-field/index.d.ts +1 -0
  138. package/dist/silke/src/components/silke-object-field/silke-object-field.d.ts +17 -0
  139. package/dist/silke/src/components/silke-overflow-menu/index.d.ts +1 -0
  140. package/dist/silke/src/components/silke-overflow-menu/silke-overflow-menu.d.ts +21 -0
  141. package/dist/silke/src/components/silke-popover/index.d.ts +1 -0
  142. package/dist/silke/src/components/silke-popover/popover-context.d.ts +8 -0
  143. package/dist/silke/src/components/silke-popover/silke-popover.d.ts +48 -0
  144. package/dist/silke/src/components/silke-progress-indicator/index.d.ts +2 -0
  145. package/dist/silke/src/components/silke-progress-indicator/silke-progress-indicator.d.ts +7 -0
  146. package/dist/silke/src/components/silke-progress-indicator/silke-progress-step.d.ts +11 -0
  147. package/dist/silke/src/components/silke-radio-button/index.d.ts +2 -0
  148. package/dist/silke/src/components/silke-radio-button/silke-radio-button-group.d.ts +15 -0
  149. package/dist/silke/src/components/silke-radio-button/silke-radio-button.d.ts +10 -0
  150. package/dist/silke/src/components/silke-search-field/index.d.ts +1 -0
  151. package/dist/silke/src/components/silke-search-field/silke-search-field.d.ts +8 -0
  152. package/dist/silke/src/components/silke-select-field/index.d.ts +1 -0
  153. package/dist/silke/src/components/silke-select-field/silke-select-field.d.ts +5 -0
  154. package/dist/silke/src/components/silke-skeleton/index.d.ts +1 -0
  155. package/dist/silke/src/components/silke-skeleton/silke-skeleton.d.ts +8 -0
  156. package/dist/silke/src/components/silke-slider/index.d.ts +1 -0
  157. package/dist/silke/src/components/silke-slider/silke-slider-point.d.ts +14 -0
  158. package/dist/silke/src/components/silke-slider/silke-slider-utils.d.ts +2 -0
  159. package/dist/silke/src/components/silke-slider/silke-slider.d.ts +20 -0
  160. package/dist/silke/src/components/silke-slider/slider-track.d.ts +9 -0
  161. package/dist/silke/src/components/silke-sortable-list/index.d.ts +2 -0
  162. package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-item.d.ts +16 -0
  163. package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-list.d.ts +25 -0
  164. package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-utils.d.ts +57 -0
  165. package/dist/silke/src/components/silke-sortable-list/silke-sortable-item-wrapper.d.ts +12 -0
  166. package/dist/silke/src/components/silke-sortable-list/silke-sortable-list.d.ts +15 -0
  167. package/dist/silke/src/components/silke-steps/index.d.ts +1 -0
  168. package/dist/silke/src/components/silke-steps/silke-steps.d.ts +12 -0
  169. package/dist/silke/src/components/silke-table/index.d.ts +2 -0
  170. package/dist/silke/src/components/silke-table/silke-table.d.ts +27 -0
  171. package/dist/silke/src/components/silke-table/table-row.d.ts +13 -0
  172. package/dist/silke/src/components/silke-table/table-types.d.ts +13 -0
  173. package/dist/silke/src/components/silke-tabs/index.d.ts +2 -0
  174. package/dist/silke/src/components/silke-tabs/silke-tab.d.ts +12 -0
  175. package/dist/silke/src/components/silke-tabs/silke-tabs.d.ts +10 -0
  176. package/dist/silke/src/components/silke-tag/index.d.ts +1 -0
  177. package/dist/silke/src/components/silke-tag/silke-tag.d.ts +40 -0
  178. package/dist/silke/src/components/silke-text/index.d.ts +3 -0
  179. package/dist/silke/src/components/silke-text/silke-text-types.d.ts +28 -0
  180. package/dist/silke/src/components/silke-text/silke-text.d.ts +275 -0
  181. package/dist/silke/src/components/silke-text/silke-title.d.ts +3 -0
  182. package/dist/silke/src/components/silke-text-field/index.d.ts +3 -0
  183. package/dist/silke/src/components/silke-text-field/silke-text-field-item.d.ts +8 -0
  184. package/dist/silke/src/components/silke-text-field/silke-text-field-outline.d.ts +39 -0
  185. package/dist/silke/src/components/silke-text-field/silke-text-field.d.ts +27 -0
  186. package/dist/silke/src/components/silke-text-field/text-field-context.d.ts +9 -0
  187. package/dist/silke/src/components/silke-theme-editor/index.d.ts +1 -0
  188. package/dist/silke/src/components/silke-theme-editor/silke-theme-editor.d.ts +9 -0
  189. package/dist/silke/src/components/silke-tile/index.d.ts +2 -0
  190. package/dist/silke/src/components/silke-tile/silke-tile-select.d.ts +26 -0
  191. package/dist/silke/src/components/silke-tile/silke-tile.d.ts +38 -0
  192. package/dist/silke/src/components/silke-toggle/index.d.ts +1 -0
  193. package/dist/silke/src/components/silke-toggle/silke-toggle.d.ts +12 -0
  194. package/dist/silke/src/components/silke-toolbar/index.d.ts +1 -0
  195. package/dist/silke/src/components/silke-toolbar/silke-toolbar.d.ts +7 -0
  196. package/dist/silke/src/components/silke-tooltip/index.d.ts +5 -0
  197. package/dist/silke/src/components/silke-tooltip/silke-definition-tooltip.d.ts +16 -0
  198. package/dist/silke/src/components/silke-tooltip/silke-icon-tooltip.d.ts +17 -0
  199. package/dist/silke/src/components/silke-tooltip/silke-interactive-tooltip.d.ts +24 -0
  200. package/dist/silke/src/components/silke-tooltip/silke-shortcuts.d.ts +37 -0
  201. package/dist/silke/src/components/silke-tooltip/silke-tooltip.d.ts +25 -0
  202. package/dist/silke/src/components/silke-tooltip/utils.d.ts +1 -0
  203. package/dist/silke/src/components/silke-upload-field/index.d.ts +1 -0
  204. package/dist/silke/src/components/silke-upload-field/silke-upload-field.d.ts +32 -0
  205. package/dist/silke/src/components/silke-virtual/index.d.ts +2 -0
  206. package/dist/silke/src/components/silke-virtual/silke-virtual-grid.d.ts +9 -0
  207. package/dist/silke/src/components/silke-virtual/silke-virtual-row.d.ts +10 -0
  208. package/dist/silke/src/docs/app.d.ts +4 -0
  209. package/dist/silke/src/docs/components/code-block/code-block.d.ts +6 -0
  210. package/dist/silke/src/docs/components/code-block/index.d.ts +1 -0
  211. package/dist/silke/src/docs/components/state-table/index.d.ts +1 -0
  212. package/dist/silke/src/docs/components/state-table/state-table.d.ts +14 -0
  213. package/dist/silke/src/docs/data/app/actions.d.ts +1 -0
  214. package/dist/silke/src/docs/data/app/constants.d.ts +6 -0
  215. package/dist/silke/src/docs/data/app/index.d.ts +3 -0
  216. package/dist/silke/src/docs/data/app/store.d.ts +8 -0
  217. package/dist/silke/src/docs/data/flux/action-decorator.d.ts +5 -0
  218. package/dist/silke/src/docs/data/flux/action-utils.d.ts +7 -0
  219. package/dist/silke/src/docs/data/flux/controller.d.ts +24 -0
  220. package/dist/silke/src/docs/data/flux/dispatcher.d.ts +7 -0
  221. package/dist/silke/src/docs/data/flux/index.d.ts +6 -0
  222. package/dist/silke/src/docs/data/flux/store.d.ts +15 -0
  223. package/dist/silke/src/docs/data/flux/use-store.d.ts +2 -0
  224. package/dist/silke/src/docs/docs-provider.d.ts +6 -0
  225. package/dist/silke/src/docs/index.d.ts +2 -0
  226. package/dist/silke/src/docs/ipsum-generator.d.ts +7 -0
  227. package/dist/silke/src/helpers/copy-to-clipboard.d.ts +5 -0
  228. package/dist/silke/src/helpers/key-code.d.ts +9 -0
  229. package/dist/silke/src/hooks/drag-and-drop/index.d.ts +2 -0
  230. package/dist/silke/src/hooks/drag-and-drop/use-drag.d.ts +10 -0
  231. package/dist/silke/src/hooks/drag-and-drop/use-drop.d.ts +8 -0
  232. package/dist/silke/src/hooks/form/index.d.ts +1 -0
  233. package/dist/silke/src/hooks/form/use-form-field.d.ts +5 -0
  234. package/dist/silke/src/hooks/image-colors/use-image-colors.d.ts +10 -0
  235. package/dist/silke/src/hooks/index.d.ts +13 -0
  236. package/dist/silke/src/hooks/use-callback-ref.d.ts +2 -0
  237. package/dist/silke/src/hooks/use-dragging.d.ts +1 -0
  238. package/dist/silke/src/hooks/use-drop-zone.d.ts +2 -0
  239. package/dist/silke/src/hooks/use-html-element.d.ts +2 -0
  240. package/dist/silke/src/hooks/use-interval.d.ts +6 -0
  241. package/dist/silke/src/hooks/use-mouse.d.ts +40 -0
  242. package/dist/silke/src/hooks/use-parent-scroll.d.ts +2 -0
  243. package/dist/silke/src/hooks/use-scroll.d.ts +1 -0
  244. package/dist/silke/src/hooks/use-size.d.ts +4 -0
  245. package/dist/silke/src/hooks/use-uniq-id.d.ts +1 -0
  246. package/dist/silke/src/hooks/use-window-resize.d.ts +1 -0
  247. package/dist/silke/src/icons.d.ts +353 -0
  248. package/dist/silke/src/index.d.ts +5 -0
  249. package/dist/silke/src/main.d.ts +1 -0
  250. package/dist/silke/src/silke-theme-provider.d.ts +16 -0
  251. package/dist/silke-code-editor-HB2Z4Q5W.js +25 -0
  252. package/dist/silke-code-editor-HB2Z4Q5W.js.map +7 -0
  253. package/dist/styles.css +622 -661
  254. package/dist/utils/src/color/hex.d.ts +2 -0
  255. package/dist/utils/src/color/index.d.ts +1 -0
  256. package/dist/utils/src/constants.d.ts +2 -0
  257. package/dist/utils/src/css/computed-to-css.d.ts +8 -0
  258. package/dist/utils/src/css/computed.d.ts +5 -0
  259. package/dist/utils/src/css/index.d.ts +4 -0
  260. package/dist/utils/src/css/number-format.d.ts +1 -0
  261. package/dist/utils/src/css/utils.d.ts +14 -0
  262. package/dist/utils/src/events/condition-parser/evaluate-condition-expression.d.ts +2 -0
  263. package/dist/utils/src/events/condition-parser/index.d.ts +1 -0
  264. package/dist/utils/src/events/condition-parser/lexer.d.ts +36 -0
  265. package/dist/utils/src/events/condition-parser/parser.d.ts +11 -0
  266. package/dist/utils/src/index.d.ts +10 -0
  267. package/dist/utils/src/interactions/get-node-type.d.ts +2 -0
  268. package/dist/utils/src/interactions/has-link.d.ts +5 -0
  269. package/dist/utils/src/interactions/has-pointer-event.d.ts +5 -0
  270. package/dist/utils/src/interactions/index.d.ts +5 -0
  271. package/dist/utils/src/interactions/is-target-global.d.ts +2 -0
  272. package/dist/utils/src/interactions/is-trigger-global.d.ts +2 -0
  273. package/dist/utils/src/keyboard/hooks.d.ts +8 -0
  274. package/dist/utils/src/keyboard/index.d.ts +4 -0
  275. package/dist/utils/src/keyboard/key-list.d.ts +4 -0
  276. package/dist/utils/src/keyboard/keyboard.d.ts +70 -0
  277. package/dist/utils/src/keyboard/keys.d.ts +4 -0
  278. package/dist/utils/src/math/index.d.ts +9 -0
  279. package/dist/utils/src/mouse/index.d.ts +3 -0
  280. package/dist/utils/src/mouse/mouse-manager.d.ts +52 -0
  281. package/dist/utils/src/types/content.d.ts +11 -0
  282. package/dist/utils/src/types/context.d.ts +74 -0
  283. package/dist/utils/src/types/css.d.ts +131 -0
  284. package/dist/utils/src/types/editable-css.d.ts +7 -0
  285. package/dist/utils/src/types/emoji.d.ts +28 -0
  286. package/dist/utils/src/types/event.d.ts +7 -0
  287. package/dist/utils/src/types/icon.d.ts +10 -0
  288. package/dist/utils/src/types/index.d.ts +17 -0
  289. package/dist/utils/src/types/interaction.d.ts +77 -0
  290. package/dist/utils/src/types/link.d.ts +47 -0
  291. package/dist/utils/src/types/manifest.d.ts +54 -0
  292. package/dist/utils/src/types/project.d.ts +23 -0
  293. package/dist/utils/src/types/shape.d.ts +20 -0
  294. package/dist/utils/src/types/transition.d.ts +15 -0
  295. package/dist/utils/src/types/vev-plugin.d.ts +30 -0
  296. package/dist/utils/src/types/vev-props.d.ts +154 -0
  297. package/dist/utils/src/types/widget-manifest.d.ts +69 -0
  298. package/dist/utils/src/types/widget.d.ts +36 -0
  299. package/dist/utils/src/utils/generate-guid.d.ts +1 -0
  300. package/dist/utils/src/utils/index.d.ts +7 -0
  301. package/dist/utils/src/utils/internals/asciiToArray.d.ts +9 -0
  302. package/dist/utils/src/utils/internals/castSlice.d.ts +11 -0
  303. package/dist/utils/src/utils/internals/createCaseFirst.d.ts +9 -0
  304. package/dist/utils/src/utils/internals/getTag.d.ts +9 -0
  305. package/dist/utils/src/utils/internals/hasUnicode.d.ts +9 -0
  306. package/dist/utils/src/utils/internals/stringToArray.d.ts +9 -0
  307. package/dist/utils/src/utils/internals/unicodeToArray.d.ts +9 -0
  308. package/dist/utils/src/utils/internals/unicodeWords.d.ts +9 -0
  309. package/dist/utils/src/utils/internals/upperFirst.d.ts +18 -0
  310. package/dist/utils/src/utils/is-array.d.ts +25 -0
  311. package/dist/utils/src/utils/is-length.d.ts +26 -0
  312. package/dist/utils/src/utils/is-string.d.ts +17 -0
  313. package/dist/utils/src/utils/slice.d.ts +22 -0
  314. package/dist/utils/src/utils/start-case.d.ts +22 -0
  315. package/dist/utils/src/utils/string.d.ts +5 -0
  316. package/dist/utils/src/utils/words.d.ts +18 -0
  317. package/package.json +7 -7
  318. package/src/components/index.ts +1 -0
  319. package/src/components/silke-autocomplete-field/autocomplete-tags.tsx +1 -1
  320. package/src/components/silke-autocomplete-field/index.ts +4 -0
  321. package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +4 -1
  322. package/src/components/silke-card/silke-card-grid.tsx +18 -15
  323. package/src/components/silke-card/silke-card.mdx +56 -23
  324. package/src/components/silke-card/silke-card.scss +150 -115
  325. package/src/components/silke-card/silke-card.tsx +173 -112
  326. package/src/components/silke-color-picker/color-picker.scss +29 -24
  327. package/src/components/silke-color-picker/hue.ts +72 -0
  328. package/src/components/silke-color-picker/index.ts +2 -1
  329. package/src/components/silke-color-picker/silke-color-picker.mdx +18 -0
  330. package/src/components/silke-color-picker/silke-color-picker.tsx +5 -5
  331. package/src/components/silke-color-picker/silke-color-space.tsx +0 -2
  332. package/src/components/silke-color-picker/silke-hue-slider.tsx +23 -8
  333. package/src/components/silke-color-picker/silke-opacity-slider.tsx +10 -12
  334. package/src/components/silke-content-column/silke-content-column.scss +2 -37
  335. package/src/components/silke-context-menu/silke-context-menu.tsx +1 -2
  336. package/src/components/silke-form/form-context.tsx +5 -5
  337. package/src/components/silke-form/form-types.ts +1 -0
  338. package/src/components/silke-form/silke-form.tsx +1 -1
  339. package/src/components/silke-form-schema/fields/array-field.tsx +2 -2
  340. package/src/components/silke-form-schema/fields/number-field.tsx +40 -27
  341. package/src/components/silke-form-schema/fields/select-field.tsx +3 -8
  342. package/src/components/silke-form-schema/fields/string-field.tsx +29 -15
  343. package/src/components/silke-form-schema/fields/styles.scss +3 -1
  344. package/src/components/silke-form-schema/fields/toggle-field.tsx +2 -3
  345. package/src/components/silke-form-schema/fields/upload-field.tsx +2 -4
  346. package/src/components/silke-form-schema/fields/utils/generate-title.ts +3 -3
  347. package/src/components/silke-form-schema/silke-form-schema.tsx +7 -2
  348. package/src/components/silke-form-schema/silke-schema-context.tsx +5 -2
  349. package/src/components/silke-form-schema/silke-schema-field.tsx +36 -40
  350. package/src/components/silke-form-schema/silke-schema-fields.tsx +39 -14
  351. package/src/components/silke-gradient-picker/index.ts +1 -0
  352. package/src/components/silke-gradient-picker/silke-gradient-picker.mdx +13 -0
  353. package/src/components/silke-gradient-picker/silke-gradient-picker.module.scss +71 -0
  354. package/src/components/silke-gradient-picker/silke-gradient-picker.tsx +71 -0
  355. package/src/components/silke-gradient-picker/silke-gradient-position.tsx +160 -0
  356. package/src/components/silke-gradient-picker/silke-gradient-slider.tsx +57 -0
  357. package/src/components/silke-gradient-picker/silke-gradient-utils.ts +132 -0
  358. package/src/components/silke-image/index.ts +1 -0
  359. package/src/components/silke-image/silke-image-color-backdrop.scss +10 -0
  360. package/src/components/silke-image/silke-image-color-backdrop.tsx +32 -0
  361. package/src/components/silke-image/silke-image.tsx +6 -2
  362. package/src/components/silke-modal/silke-confirmation-modal.tsx +33 -11
  363. package/src/components/silke-modal/silke-modal.mdx +24 -0
  364. package/src/components/silke-navigation-link/silke-navigation-link.tsx +83 -76
  365. package/src/components/silke-object-field/silke-object-field.tsx +1 -1
  366. package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +1 -0
  367. package/src/components/silke-radio-button/silke-radio-button-group.tsx +6 -23
  368. package/src/components/silke-slider/index.ts +0 -1
  369. package/src/components/silke-slider/silke-slider-point.tsx +43 -0
  370. package/src/components/silke-slider/silke-slider-utils.ts +32 -0
  371. package/src/components/silke-slider/silke-slider.mdx +45 -0
  372. package/src/components/silke-slider/silke-slider.module.scss +71 -0
  373. package/src/components/silke-slider/silke-slider.tsx +160 -66
  374. package/src/components/silke-slider/slider-track.tsx +26 -0
  375. package/src/components/silke-sortable-list/silke-sortable-item-wrapper.tsx +3 -0
  376. package/src/components/silke-sortable-list/silke-sortable-list.scss +8 -8
  377. package/src/components/silke-sortable-list/silke-sortable-list.tsx +24 -7
  378. package/src/components/silke-table/silke-table.tsx +5 -5
  379. package/src/components/silke-tag/silke-tag.scss +107 -118
  380. package/src/components/silke-tag/silke-tag.tsx +8 -4
  381. package/src/components/silke-text/silke-text-types.ts +5 -6
  382. package/src/components/silke-text/silke-text.mdx +45 -11
  383. package/src/components/silke-text/silke-text.scss +40 -19
  384. package/src/components/silke-text/silke-text.tsx +10 -16
  385. package/src/components/silke-text/silke-title.scss +36 -57
  386. package/src/components/silke-text/silke-title.tsx +27 -17
  387. package/src/components/silke-text-field/silke-text-field.scss +0 -1
  388. package/src/components/silke-text-field/silke-text-field.tsx +6 -3
  389. package/src/components/silke-tooltip/silke-tooltip.tsx +3 -0
  390. package/src/components/silke-upload-field/silke-upload-field.tsx +16 -9
  391. package/src/docs/data/flux/action-decorator.ts +4 -4
  392. package/src/docs/data/flux/store.ts +4 -2
  393. package/src/hooks/drag-and-drop/use-drag.tsx +5 -3
  394. package/src/hooks/form/use-form-field.ts +4 -0
  395. package/src/hooks/image-colors/use-image-colors.ts +83 -0
  396. package/src/hooks/index.ts +1 -0
  397. package/src/hooks/use-dragging.ts +24 -0
  398. package/src/icons.tsx +3 -16
  399. package/src/styles/core.scss +0 -48
  400. package/tsconfig.json +1 -0
  401. package/dist/silke-code-editor-LBP2WDX3.js +0 -25
  402. package/dist/silke-code-editor-LBP2WDX3.js.map +0 -7
  403. package/src/components/silke-slider/range-slider.scss +0 -52
  404. package/src/components/silke-slider/silke-range-slider.tsx +0 -108
  405. package/src/components/silke-text/silke-text-utils.ts +0 -8
  406. /package/dist/{chunk-SOFGXMET.js.LEGAL.txt → chunk-FIPWO3IB.js.LEGAL.txt} +0 -0
  407. /package/dist/{silke-code-editor-LBP2WDX3.js.LEGAL.txt → silke-code-editor-HB2Z4Q5W.js.LEGAL.txt} +0 -0
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import { BoxProps, BoxSpace, SilkeBox } from '../silke-box';
3
+ import { SilkeIcon, SilkeIcons } from '../silke-icon';
3
4
  import { SilkeText } from '../silke-text';
4
5
  import styles from './silke-tag.scss';
5
- import { SilkeIcon, SilkeIcons } from '../silke-icon';
6
- import { SilkeColor } from '../../silke-theme-provider';
7
6
 
8
7
  export type SilkeTagKind = 'primary' | 'secondary' | 'outlined';
9
8
 
@@ -26,8 +25,8 @@ export type SilkeTagProps = {
26
25
  size?: SilkeTagSize;
27
26
  icon?: SilkeIcons;
28
27
  innerGap?: BoxSpace;
29
- iconColor?: SilkeColor;
30
28
  color?: SilkeTagColor;
29
+ link?: string;
31
30
  /**
32
31
  * Will add a remove button to tag
33
32
  */
@@ -45,6 +44,7 @@ function SilkeTagComp(
45
44
  icon,
46
45
  innerGap = 'xs',
47
46
  color = 'gray',
47
+ link,
48
48
  ...rest
49
49
  }: SilkeTagProps,
50
50
  ref: any,
@@ -57,12 +57,16 @@ function SilkeTagComp(
57
57
  if (className) cl.push(className);
58
58
  if (size) cl.push(styles[size]);
59
59
  if (rest?.onClick) cl.push(styles.selectable);
60
+ if (link) cl.push(styles.link);
60
61
 
61
62
  const iconOnly = !!icon && !label;
62
63
 
63
64
  return (
64
65
  <SilkeBox
65
- {...(rest as BoxProps)}
66
+ {...(rest as any)}
67
+ tag={link ? 'link' : 'div'}
68
+ to={link}
69
+ aspectRatio={iconOnly ? '1:1' : undefined}
66
70
  className={cl.join(' ')}
67
71
  hPad={iconOnly ? 'xxs' : 'xs'}
68
72
  vAlign="center"
@@ -2,7 +2,7 @@ import React, { HTMLAttributes } from 'react';
2
2
  import { SilkeColor } from '../../silke-theme-provider';
3
3
 
4
4
  type SilkeTextType = 'small' | 'p' | 'span' | 'strong' | 'div' | 'label';
5
-
5
+ export type SilkeTitleKind = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
6
6
  export type SilkeTitleType =
7
7
  | 'h1'
8
8
  | 'h2'
@@ -15,11 +15,10 @@ export type SilkeTitleType =
15
15
  | 'p'
16
16
  | 'div';
17
17
 
18
- export type SilkeTitleKind = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
19
-
20
18
  interface SilkeTextSharedProps extends HTMLAttributes<HTMLElement> {
21
19
  color?: SilkeColor;
22
20
  weight?: 'strong' | 'light';
21
+ brandFont?: boolean;
23
22
  children: React.ReactNode;
24
23
  /** flex text block */
25
24
  flex?: boolean;
@@ -33,10 +32,10 @@ interface SilkeTextSharedProps extends HTMLAttributes<HTMLElement> {
33
32
  }
34
33
 
35
34
  export interface SilkeTextTextProps extends SilkeTextSharedProps {
36
- tag?: SilkeTextType;
35
+ tag?: SilkeTextType | SilkeTitleType;
37
36
  }
38
37
 
39
- export interface SilkeTitleProps extends SilkeTextSharedProps {
38
+ export type SilkeTitleProps = SilkeTextSharedProps & {
40
39
  tag?: SilkeTitleType;
41
40
  kind: SilkeTitleKind;
42
- }
41
+ };
@@ -3,15 +3,37 @@
3
3
  ## Basic usage
4
4
 
5
5
  ```js
6
- <SilkeText>span - Default text uses span tag</SilkeText>
7
- <SilkeText kind="p">p - Same style as default using p tag</SilkeText>
8
- <SilkeText kind="small">small - The quick brown fox jumps</SilkeText>
6
+ <SilkeBox gap="s" column>
7
+ <SilkeText>span - Default text uses span tag</SilkeText>
8
+ <SilkeText kind="p">p - Same style as default using p tag</SilkeText>
9
+ <SilkeText kind="small">small - The quick brown fox jumps</SilkeText>
10
+ </SilkeBox>
11
+ ```
12
+
13
+ ```js
14
+ <SilkeBox gap="s" column>
15
+ <SilkeText size="large" kind="p">
16
+ This is a paragraph, Large text
17
+ </SilkeText>
18
+ <SilkeTextSmall kind="p">This is a paragraph, SilkeTextSmall</SilkeTextSmall>
19
+ <SilkeTextMicro kind="p">This is a paragraph, SilkeTextMicro</SilkeTextMicro>
20
+ </SilkeBox>
9
21
  ```
10
22
 
23
+ ## Brand font (Aeonik)
24
+
11
25
  ```js
12
- <SilkeTextLarge kind="p">This is a paragraph, SilkeTextLarge</SilkeTextLarge>
13
- <SilkeTextSmall kind="p">This is a paragraph, SilkeTextSmall</SilkeTextSmall>
14
- <SilkeTextMicro kind="p">This is a paragraph, SilkeTextMicro</SilkeTextMicro>
26
+ <SilkeBox gap="s" column>
27
+ <SilkeText brandFont size="large" kind="p">
28
+ This is a paragraph, Large text
29
+ </SilkeText>
30
+ <SilkeTextSmall brandFont kind="p">
31
+ This is a paragraph, SilkeTextSmall
32
+ </SilkeTextSmall>
33
+ <SilkeTextMicro brandFont kind="p">
34
+ This is a paragraph, SilkeTextMicro
35
+ </SilkeTextMicro>
36
+ </SilkeBox>
15
37
  ```
16
38
 
17
39
  ## Titles
@@ -19,11 +41,23 @@
19
41
  Titles use Aeonik as font-family.
20
42
 
21
43
  ```js
22
- <SilkeTitle kind="xl" tag="h1">H1 - The quick brown fox jumps</SilkeTitle>
23
- <SilkeTitle kind="l" tag="h1">H1 - The quick brown fox jumps</SilkeTitle>
24
- <SilkeTitle kind="m" tag="h1">H1 - The quick brown fox jumps</SilkeTitle>
25
- <SilkeTitle kind="s" tag="h1">H1 - The quick brown fox jumps</SilkeTitle>
26
- <SilkeTitle kind="xs" tag="h1">H1 - The quick brown fox jumps</SilkeTitle>
44
+ <SilkeBox gap="s" column>
45
+ <SilkeTitle kind="xl" tag="h1">
46
+ H1 - The quick brown fox jumps
47
+ </SilkeTitle>
48
+ <SilkeTitle kind="l" tag="h1">
49
+ H1 - The quick brown fox jumps
50
+ </SilkeTitle>
51
+ <SilkeTitle kind="m" tag="h1">
52
+ H1 - The quick brown fox jumps
53
+ </SilkeTitle>
54
+ <SilkeTitle kind="s" tag="h1">
55
+ H1 - The quick brown fox jumps
56
+ </SilkeTitle>
57
+ <SilkeTitle kind="xs" tag="h1">
58
+ H1 - The quick brown fox jumps
59
+ </SilkeTitle>
60
+ </SilkeBox>
27
61
  ```
28
62
 
29
63
  ## Title shorthands
@@ -1,23 +1,49 @@
1
- @use '../../variables' as *;
1
+ @use "sass:math";
2
+ @use "../../variables" as *;
2
3
  @import "../../../src/styles/core";
3
4
 
4
- // $colors: "disabled" rgba(var(--color-neutral-100-rgb), var(--opacity-level-medium)),
5
- // "secondary" rgb(var(--color-neutral-80-rgb)),
6
- // "error" var(--color-error-30),
7
- // "primary" var(--color-accent-50),
8
- // "accent" var(--color-accent-50),
9
- // "support-4" var(--color-support-secondary-50),
10
- // "success" var(--color-brand-secondary-bright),
11
- // "dark" var(--color-neutral-0);
12
5
  $weights: "strong" 600, "light" 200;
13
6
 
14
- /***
15
- * STYLES for the html tags is placed in core,
16
- * as they're applied globally to the html tag
17
- **/
18
-
19
7
  .text {
8
+ --font-size: 14px;
9
+ --letter-spacing: 0;
10
+ --line-height: 24px;
11
+ --scale: 1;
12
+
20
13
  margin: 0;
14
+ font-size: calc(var(--font-size) * var(--scale));
15
+ font-weight: 400;
16
+ font-style: normal;
17
+ line-height: var(--line-height);
18
+ letter-spacing: var(--letter-spacing);
19
+
20
+ &.base {
21
+ --font-size: 14px;
22
+ --letter-spacing: 0;
23
+ --line-height: 24px;
24
+ }
25
+
26
+ &.micro {
27
+ --font-size: 10px;
28
+ --line-height: 16px;
29
+ --letter-spacing: 0.0002em;
30
+ }
31
+ &.small {
32
+ --font-size: 12px;
33
+ --line-height: 16px;
34
+ --letter-spacing: 0.0001em;
35
+ }
36
+
37
+ &.large {
38
+ --font-size: 19px;
39
+ --line-height: 32px;
40
+ --letter-spacing: -0.0001em;
41
+ }
42
+
43
+ &.brandFont {
44
+ font-family: $font-family-brand;
45
+ --scale: #{math.div(15, 14)};
46
+ }
21
47
  }
22
48
 
23
49
  .flex {
@@ -30,11 +56,6 @@ $weights: "strong" 600, "light" 200;
30
56
  text-overflow: ellipsis;
31
57
  }
32
58
 
33
- .size-micro { @extend .font-micro; }
34
- .size-small { @extend .font-small; }
35
- .size-base { @extend .font-base; }
36
- .size-large { @extend .font-large; }
37
-
38
59
  @each $name, $color in $colors {
39
60
  .#{$name} {
40
61
  color: $color;
@@ -1,6 +1,9 @@
1
+ import classnames from 'classnames/bind';
1
2
  import React from 'react';
2
- import { cl, getClassNames } from './silke-text-utils';
3
3
  import { SilkeTextTextProps } from './silke-text-types';
4
+ import styles from './silke-text.scss';
5
+
6
+ export const cl = classnames.bind(styles);
4
7
 
5
8
  export function SilkeText({
6
9
  tag = 'span',
@@ -8,27 +11,18 @@ export function SilkeText({
8
11
  weight,
9
12
  flex,
10
13
  overflow,
14
+ brandFont,
15
+ size,
11
16
  ...rest
12
17
  }: SilkeTextTextProps) {
13
- rest.className = cl('text', rest.className, color, weight, {
18
+ rest.className = cl('text', rest.className, color, weight, size, {
14
19
  flex,
15
20
  overflow,
21
+ brandFont,
16
22
  });
17
23
  return React.createElement(tag, rest);
18
24
  }
19
25
 
20
- export const SilkeTextLarge = ({ className, ...rest }: SilkeTextTextProps) => {
21
- return <SilkeText {...rest} className={getClassNames(className, 'font-large')} />;
22
- };
23
-
24
- export const SilkeBodyText = ({ className, ...rest }: SilkeTextTextProps) => {
25
- return <SilkeText {...rest} className={getClassNames(className, 'font-base')} />;
26
- };
27
-
28
- export const SilkeTextSmall = ({ className, ...rest }: SilkeTextTextProps) => {
29
- return <SilkeText {...rest} className={getClassNames(className, 'font-small')} />;
30
- };
26
+ export const SilkeTextSmall = (props: SilkeTextTextProps) => <SilkeText {...props} size="small" />;
31
27
 
32
- export const SilkeTextMicro = ({ className, ...rest }: SilkeTextTextProps) => {
33
- return <SilkeText {...rest} className={getClassNames(className, 'font-micro')} />;
34
- };
28
+ export const SilkeTextMicro = (props: SilkeTextTextProps) => <SilkeText {...props} size="micro" />;
@@ -1,65 +1,44 @@
1
1
  @use '../../variables' as *;
2
2
 
3
- .headerCommons {
4
- font-style: $font-style;
5
- font-weight: $font-weight-header;
6
- font-family: $font-family-brand;
7
3
 
8
- margin: 0;
4
+ .title{
5
+ &.xl {
9
6
 
10
- &.strong {
11
- font-weight: 600;
7
+ font-size: 59px;
8
+ line-height: 64px;
12
9
  }
10
+
11
+
12
+ &.l {
13
+
14
+ font-size: 44px;
15
+ line-height: 48px;
16
+ }
17
+
18
+ &.m {
19
+
20
+ font-size: 33px;
21
+ line-height: 40px;
22
+ }
23
+
24
+ &.s {
25
+
26
+ font-size: 25px;
27
+ line-height: 32px;
28
+ }
29
+
30
+ &.xs {
31
+ font-size: 16px;
32
+ line-height: 24px;
33
+ letter-spacing: 0.025em;
34
+ }
35
+
36
+ &.xxs {
37
+ font-size: 14px;
38
+ line-height: 19px;
39
+ letter-spacing: -0.001em;
40
+ }
41
+
13
42
  }
14
43
 
15
- .xl {
16
- @extend .headerCommons;
17
-
18
- font-size: 59px;
19
- line-height: 64px;
20
- }
21
-
22
-
23
- .l {
24
- @extend .headerCommons;
25
-
26
- font-size: 44px;
27
- line-height: 48px;
28
- }
29
-
30
- .m {
31
- @extend .headerCommons;
32
-
33
- font-size: 33px;
34
- line-height: 40px;
35
- }
36
-
37
- .s {
38
- @extend .headerCommons;
39
-
40
- font-size: 25px;
41
- line-height: 32px;
42
- }
43
-
44
- .xs {
45
- @extend .headerCommons;
46
-
47
- font-size: 16px;
48
- line-height: 24px;
49
- letter-spacing: 0.025em;
50
- }
51
-
52
- .xxs {
53
- @extend .headerCommons;
54
- font-family: $font-family;
55
44
 
56
- // TODO get real values, these were made up by myself - Peter
57
- font-size: 14px;
58
- line-height: 19px;
59
- letter-spacing: -0.001em;
60
- }
61
-
62
- .xxs {
63
- font-size: 14px;
64
- line-height: 24px;
65
- }
@@ -1,24 +1,34 @@
1
- import { SilkeTitleProps } from './silke-text-types';
2
- import { cl } from './silke-text-utils';
3
1
  import React from 'react';
2
+ import { SilkeText } from './silke-text';
4
3
  import styles from './silke-title.scss';
4
+ import { SilkeTitleProps } from './silke-text-types';
5
5
 
6
- export function SilkeTitle({ tag, kind, color, weight, flex, overflow, ...rest }: SilkeTitleProps) {
7
- const kindClass = styles[kind];
6
+ export function SilkeTitle({
7
+ tag,
8
+ kind,
9
+ color,
10
+ weight,
11
+ flex,
12
+ overflow,
13
+ size,
14
+ className,
15
+ ...rest
16
+ }: SilkeTitleProps) {
8
17
  const tagProp = tag || 'h2';
9
- if (weight === 'strong') {
10
- }
18
+ let cl = styles.title + ' ' + styles[kind];
19
+ if (className) cl += ' ' + className;
20
+ if (size) cl += ' ' + styles[size];
11
21
 
12
- rest.className = cl(
13
- 'text',
14
- rest.className,
15
- weight === 'strong' && styles.strong,
16
- color,
17
- kindClass,
18
- {
19
- flex,
20
- overflow,
21
- },
22
+ return (
23
+ <SilkeText
24
+ tag={tagProp}
25
+ className={cl}
26
+ color={color}
27
+ weight={weight}
28
+ flex={flex}
29
+ brandFont={kind !== 'xxs'}
30
+ overflow={overflow}
31
+ {...rest}
32
+ />
22
33
  );
23
- return React.createElement(tagProp, rest);
24
34
  }
@@ -122,7 +122,6 @@
122
122
  .field {
123
123
  position: relative;
124
124
  background-color: var(--text-field-bg);
125
- overflow: hidden;
126
125
  border-radius: var(--text-field-border-radius);
127
126
  transition: color 80ms;
128
127
 
@@ -40,7 +40,10 @@ type OmitAttrs =
40
40
  | 'readonly'
41
41
  | 'onBlur';
42
42
 
43
- type MultilineProps = { multiline: true | number; type?: string } & BaseProps<string> &
43
+ type MultilineProps = {
44
+ multiline: boolean | number | undefined;
45
+ type?: string;
46
+ } & BaseProps<string> &
44
47
  Omit<HTMLAttributes<HTMLTextAreaElement>, OmitAttrs>;
45
48
  export type SingleLineProps = {
46
49
  multiline?: undefined | false;
@@ -103,10 +106,10 @@ export const SilkeTextField = React.forwardRef<HTMLDivElement, SilkeTextFieldPro
103
106
  useEffect(() => {
104
107
  if (autoFocus && inputRef && inputRef.current) {
105
108
  const inputField = inputRef.current;
106
- // Need to wrap this in setTimeout to increase chance of it being focused when inside a popover
109
+ // Need to wrap this in setTimeout to increase the chance of it being focused when inside a popover
107
110
  setTimeout(() => {
108
111
  inputField.focus();
109
- // For some strange reason you can't do range select on email and password fields
112
+ // For some strange reason, you can't do range select on email and password fields
110
113
  if (!type || type === 'text') inputField.setSelectionRange(0, inputField.value.length);
111
114
  }, 0);
112
115
  }
@@ -37,6 +37,7 @@ export type SilkeTooltipProps = {
37
37
  anchorOrigin?: PopoverOrigin;
38
38
  title?: string;
39
39
  children?: React.ReactNode;
40
+ onRequestClose?: () => void;
40
41
  };
41
42
 
42
43
  /**
@@ -53,6 +54,7 @@ export function SilkeTooltip({
53
54
  image,
54
55
  size,
55
56
  title,
57
+ onRequestClose,
56
58
  }: SilkeTooltipProps) {
57
59
  const targetRef = useRef<HTMLDivElement>(null);
58
60
  const pathRef = useRef<SVGPathElement>(null);
@@ -142,6 +144,7 @@ export function SilkeTooltip({
142
144
  targetOrigin={targetOrigin}
143
145
  offsetY={anchorV === 'center' ? 0 : anchorV === 'top' ? -6 : 6}
144
146
  offsetX={anchorH === 'center' ? 0 : anchorH === 'left' ? -6 : 6}
147
+ onRequestClose={onRequestClose}
145
148
  >
146
149
  <div className={cl} ref={targetRef}>
147
150
  <svg>
@@ -1,7 +1,6 @@
1
1
  import { isArray, isString, last } from 'lodash';
2
2
  import React, { useRef, useState } from 'react';
3
- import { useDropZone } from '../../hooks';
4
- import { useFormField } from '../../hooks/form';
3
+ import { useDropZone, useFormField } from '../../hooks';
5
4
  import { useSilkeContext } from '../../silke-theme-provider';
6
5
  import { BoxLabelProps, SilkeBox } from '../silke-box';
7
6
  import { SilkeButton } from '../silke-button';
@@ -54,6 +53,7 @@ const validate: FormValidator<SilkeUploadFieldProps> = (props, value) => {
54
53
  export function SilkeUploadField(props: SilkeUploadFieldProps) {
55
54
  const { onFileUpload } = useSilkeContext();
56
55
  const [pending, setPending] = useState<PendingFile[]>([]);
56
+ const size = props.size || 'base';
57
57
 
58
58
  const {
59
59
  useFileModel,
@@ -81,7 +81,6 @@ export function SilkeUploadField(props: SilkeUploadFieldProps) {
81
81
 
82
82
  pendingRef.current = pending;
83
83
  valueRef.current = value;
84
-
85
84
  const handleFileUploaded = (model: PendingFile, url: string) => {
86
85
  // Do not continue if upload stopped
87
86
  if (model.stopped) return;
@@ -184,16 +183,24 @@ export function SilkeUploadField(props: SilkeUploadFieldProps) {
184
183
  className={styles.drop}
185
184
  ref={ref}
186
185
  column
187
- bg="surface-2"
186
+ bg="neutral-10"
188
187
  style={dropzoneStyle}
189
188
  >
190
- <SilkeIcon icon="file" className={styles.icon} />
191
- <SilkeBox column>
192
- <SilkeTitle kind="xs">
189
+ <SilkeIcon icon="file.arrow.up" className={styles.icon} />
190
+ <SilkeBox column gap="s">
191
+ <SilkeTitle kind={size === 'xs' ? 'xxs' : 'xs'}>
193
192
  Select a file <span style={{ color: 'white' }}>drag and drop here</span>
194
193
  </SilkeTitle>
195
- {help && !error && <SilkeText color="neutral-80">{help}</SilkeText>}
196
- {error && <SilkeText color="error-30">{error}</SilkeText>}
194
+ {help && !error && (
195
+ <SilkeText size={size === 'xs' ? 'small' : 'base'} color="neutral-80">
196
+ {help}
197
+ </SilkeText>
198
+ )}
199
+ {error && (
200
+ <SilkeText size={size === 'xs' ? 'small' : 'base'} color="error-30">
201
+ {error}
202
+ </SilkeText>
203
+ )}
197
204
  </SilkeBox>
198
205
  </SilkeBox>
199
206
  </SilkeBox>
@@ -3,12 +3,12 @@ import { Store } from './store';
3
3
  export const actionListeners: { [event: string]: PropertyDescriptor[] } = {};
4
4
  export function action(...events: string[]) {
5
5
  return function <T extends Store>(target: T, funcName: string, descriptor: PropertyDescriptor) {
6
- const actions = Reflect.get(target, '__actions') || {};
7
- for (let i = 0; i < events.length; i++) {
8
- const event = events[i];
6
+ const actions: Record<string, any> = Reflect.get(target, '__actions') || {};
7
+
8
+ events.forEach((event, i) => {
9
9
  if (!actions[event]) actions[event] = [];
10
10
  actions[event].push(funcName);
11
- }
11
+ });
12
12
 
13
13
  Reflect.set(target, '__actions', actions);
14
14
  return descriptor;
@@ -30,12 +30,14 @@ export class Store extends QueuedModel {
30
30
  }
31
31
 
32
32
  protected handleDispatch({ type, payload }: { type: string; payload: any }) {
33
- const actions = Reflect.get(this, '__actions');
33
+ const actions = Reflect.get(this, '__actions') as Record<string, any>;
34
34
  if (!actions) return;
35
+
35
36
  const listeners = actions[type];
36
37
  if (listeners) {
37
38
  for (const funcName of listeners) {
38
- // @ts-ignore don know how to make typscript support this
39
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
40
+ // @ts-ignore don know how to make typescript support this
39
41
  this[funcName](type, payload);
40
42
  }
41
43
  }
@@ -1,6 +1,6 @@
1
1
  import { MutableRefObject, useEffect, useRef, useState } from 'react';
2
2
 
3
- type SilkeDragState = 'none' | 'dragging';
3
+ export type SilkeDragState = 'none' | 'dragging';
4
4
  type DragData<T> = MutableRefObject<T>;
5
5
  let dragData: DragData<any>;
6
6
  export function getDragData(): DragData<any> {
@@ -9,9 +9,11 @@ export function getDragData(): DragData<any> {
9
9
 
10
10
  export function useDrag<T>({
11
11
  data,
12
+ disabled,
12
13
  ref,
13
14
  }: {
14
15
  data: T;
16
+ disabled?: boolean;
15
17
  ref: MutableRefObject<HTMLElement | undefined | null>;
16
18
  }): SilkeDragState {
17
19
  const [state, setState] = useState<SilkeDragState>('none');
@@ -20,7 +22,7 @@ export function useDrag<T>({
20
22
 
21
23
  useEffect(() => {
22
24
  const el = ref.current;
23
- if (el) {
25
+ if (el && !disabled) {
24
26
  const dragHandle = (el.querySelector('*[data-drag-handle]') || el) as HTMLElement;
25
27
  dragHandle.setAttribute('draggable', 'true');
26
28
 
@@ -50,7 +52,7 @@ export function useDrag<T>({
50
52
  dragHandle.removeAttribute('draggable');
51
53
  };
52
54
  }
53
- }, [ref]);
55
+ }, [ref, disabled]);
54
56
 
55
57
  return state;
56
58
  }
@@ -60,6 +60,10 @@ export function useFormField<T extends FormFieldProps<U>, U = any>(
60
60
 
61
61
  const [touched, setTouched] = useState<boolean>(false);
62
62
 
63
+ useEffect(() => {
64
+ validate();
65
+ }, [value]);
66
+
63
67
  return {
64
68
  ...props,
65
69
  value,