@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.
- package/CHANGELOG.md +7 -0
- package/dist/{chunk-SOFGXMET.js → chunk-FIPWO3IB.js} +3 -3
- package/dist/{chunk-SOFGXMET.js.map → chunk-FIPWO3IB.js.map} +1 -1
- package/dist/index.js +21 -22
- package/dist/index.js.LEGAL.txt +7 -7
- package/dist/index.js.map +4 -4
- package/dist/silke/src/components/index.d.ts +54 -0
- package/dist/silke/src/components/silke-autocomplete-field/autocomplete-item.d.ts +19 -0
- package/dist/silke/src/components/silke-autocomplete-field/autocomplete-tags.d.ts +9 -0
- package/dist/silke/src/components/silke-autocomplete-field/autocomplete-types.d.ts +55 -0
- package/dist/silke/src/components/silke-autocomplete-field/index.d.ts +5 -0
- package/dist/silke/src/components/silke-autocomplete-field/silke-autocomplete-field.d.ts +50 -0
- package/dist/silke/src/components/silke-box/index.d.ts +1 -0
- package/dist/silke/src/components/silke-box/silke-box.d.ts +121 -0
- package/dist/silke/src/components/silke-breadcrumbs/index.d.ts +2 -0
- package/dist/silke/src/components/silke-breadcrumbs/silke-breadcrumb.d.ts +10 -0
- package/dist/silke/src/components/silke-breadcrumbs/silke-breadcrumbs.d.ts +7 -0
- package/dist/silke/src/components/silke-button/context.d.ts +14 -0
- package/dist/silke/src/components/silke-button/index.d.ts +7 -0
- package/dist/silke/src/components/silke-button/silke-big-button.d.ts +13 -0
- package/dist/silke/src/components/silke-button/silke-button-set.d.ts +11 -0
- package/dist/silke/src/components/silke-button/silke-button.d.ts +39 -0
- package/dist/silke/src/components/silke-button/silke-confirmation-button.d.ts +8 -0
- package/dist/silke/src/components/silke-button/silke-file-select-button.d.ts +9 -0
- package/dist/silke/src/components/silke-card/index.d.ts +2 -0
- package/dist/silke/src/components/silke-card/silke-card-grid.d.ts +10 -0
- package/dist/silke/src/components/silke-card/silke-card.d.ts +24 -0
- package/dist/silke/src/components/silke-checkbox/index.d.ts +1 -0
- package/dist/silke/src/components/silke-checkbox/silke-checkbox.d.ts +11 -0
- package/dist/silke/src/components/silke-code-editor/index.d.ts +3 -0
- package/dist/silke/src/components/silke-code-editor/silke-code-editor.d.ts +8 -0
- package/dist/silke/src/components/silke-code-snippet/index.d.ts +1 -0
- package/dist/silke/src/components/silke-code-snippet/silke-code-snippet.d.ts +17 -0
- package/dist/silke/src/components/silke-color-palettes/index.d.ts +2 -0
- package/dist/silke/src/components/silke-color-palettes/silke-color-palette.d.ts +12 -0
- package/dist/silke/src/components/silke-color-palettes/silke-color-palettes.d.ts +8 -0
- package/dist/silke/src/components/silke-color-picker/color.d.ts +31 -0
- package/dist/silke/src/components/silke-color-picker/hue.d.ts +7 -0
- package/dist/silke/src/components/silke-color-picker/index.d.ts +4 -0
- package/dist/silke/src/components/silke-color-picker/silke-color-info.d.ts +9 -0
- package/dist/silke/src/components/silke-color-picker/silke-color-picker-button.d.ts +11 -0
- package/dist/silke/src/components/silke-color-picker/silke-color-picker.d.ts +17 -0
- package/dist/silke/src/components/silke-color-picker/silke-color-space.d.ts +11 -0
- package/dist/silke/src/components/silke-color-picker/silke-hue-slider.d.ts +7 -0
- package/dist/silke/src/components/silke-color-picker/silke-opacity-slider.d.ts +8 -0
- package/dist/silke/src/components/silke-color-swatches/index.d.ts +2 -0
- package/dist/silke/src/components/silke-color-swatches/silke-color-swatch-button.d.ts +6 -0
- package/dist/silke/src/components/silke-color-swatches/silke-swatches.d.ts +25 -0
- package/dist/silke/src/components/silke-color-swatches/utils.d.ts +12 -0
- package/dist/silke/src/components/silke-content-column/index.d.ts +1 -0
- package/dist/silke/src/components/silke-content-column/silke-content-column.d.ts +7 -0
- package/dist/silke/src/components/silke-context-menu/index.d.ts +2 -0
- package/dist/silke/src/components/silke-context-menu/silke-contect-menu-hooks.d.ts +0 -0
- package/dist/silke/src/components/silke-context-menu/silke-context-menu-item.d.ts +12 -0
- package/dist/silke/src/components/silke-context-menu/silke-context-menu.d.ts +15 -0
- package/dist/silke/src/components/silke-css-number-field/index.d.ts +2 -0
- package/dist/silke/src/components/silke-css-number-field/silke-css-context.d.ts +29 -0
- package/dist/silke/src/components/silke-css-number-field/silke-css-number-field.d.ts +15 -0
- package/dist/silke/src/components/silke-css-number-field/utils.d.ts +32 -0
- package/dist/silke/src/components/silke-divider/index.d.ts +1 -0
- package/dist/silke/src/components/silke-divider/silke-divider.d.ts +13 -0
- package/dist/silke/src/components/silke-drawer/index.d.ts +1 -0
- package/dist/silke/src/components/silke-drawer/silke-drawer.d.ts +12 -0
- package/dist/silke/src/components/silke-form/form-context.d.ts +26 -0
- package/dist/silke/src/components/silke-form/form-types.d.ts +44 -0
- package/dist/silke/src/components/silke-form/index.d.ts +2 -0
- package/dist/silke/src/components/silke-form/silke-form.d.ts +22 -0
- package/dist/silke/src/components/silke-form-schema/fields/array-field-inline.d.ts +12 -0
- package/dist/silke/src/components/silke-form-schema/fields/array-field-modal.d.ts +13 -0
- package/dist/silke/src/components/silke-form-schema/fields/array-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/event-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/icon-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/image-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/layout-field.d.ts +3 -0
- package/dist/silke/src/components/silke-form-schema/fields/link-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/number-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/object-field.d.ts +3 -0
- package/dist/silke/src/components/silke-form-schema/fields/select-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/string-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/toggle-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/upload-field.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/fields/utils/generate-image.d.ts +3 -0
- package/dist/silke/src/components/silke-form-schema/fields/utils/generate-title.d.ts +7 -0
- package/dist/silke/src/components/silke-form-schema/fields/utils/index.d.ts +2 -0
- package/dist/silke/src/components/silke-form-schema/fields/utils/schema-util.d.ts +2 -0
- package/dist/silke/src/components/silke-form-schema/index.d.ts +4 -0
- package/dist/silke/src/components/silke-form-schema/safe-eval/iframe-handler.d.ts +17 -0
- package/dist/silke/src/components/silke-form-schema/safe-eval/index.d.ts +1 -0
- package/dist/silke/src/components/silke-form-schema/safe-eval/safe-eval.d.ts +1 -0
- package/dist/silke/src/components/silke-form-schema/schema-utils.d.ts +11 -0
- package/dist/silke/src/components/silke-form-schema/silke-extended-fields-context.d.ts +13 -0
- package/dist/silke/src/components/silke-form-schema/silke-form-schema.d.ts +13 -0
- package/dist/silke/src/components/silke-form-schema/silke-schema-context.d.ts +9 -0
- package/dist/silke/src/components/silke-form-schema/silke-schema-field.d.ts +10 -0
- package/dist/silke/src/components/silke-form-schema/silke-schema-fields.d.ts +14 -0
- package/dist/silke/src/components/silke-gradient-picker/index.d.ts +1 -0
- package/dist/silke/src/components/silke-gradient-picker/silke-gradient-picker.d.ts +5 -0
- package/dist/silke/src/components/silke-gradient-picker/silke-gradient-position.d.ts +8 -0
- package/dist/silke/src/components/silke-gradient-picker/silke-gradient-slider.d.ts +10 -0
- package/dist/silke/src/components/silke-gradient-picker/silke-gradient-utils.d.ts +14 -0
- package/dist/silke/src/components/silke-icon/index.d.ts +2 -0
- package/dist/silke/src/components/silke-icon/silke-icon.d.ts +11 -0
- package/dist/silke/src/components/silke-icon/silke-shape.d.ts +8 -0
- package/dist/silke/src/components/silke-icon/silke-stacked-icon.d.ts +8 -0
- package/dist/silke/src/components/silke-icon-picker/emoji-tab.d.ts +3 -0
- package/dist/silke/src/components/silke-icon-picker/icons-tab.d.ts +3 -0
- package/dist/silke/src/components/silke-icon-picker/index.d.ts +1 -0
- package/dist/silke/src/components/silke-icon-picker/silke-icon-picker.d.ts +12 -0
- package/dist/silke/src/components/silke-icon-picker/upload-tab.d.ts +3 -0
- package/dist/silke/src/components/silke-icon-picker/utils.d.ts +5 -0
- package/dist/silke/src/components/silke-iframe-portal/index.d.ts +4 -0
- package/dist/silke/src/components/silke-iframe-portal/silke-iframe-context.d.ts +7 -0
- package/dist/silke/src/components/silke-iframe-portal/silke-iframe-css-link.d.ts +5 -0
- package/dist/silke/src/components/silke-iframe-portal/silke-iframe-portal.d.ts +10 -0
- package/dist/silke/src/components/silke-iframe-portal/silke-iframe-script.d.ts +6 -0
- package/dist/silke/src/components/silke-image/index.d.ts +2 -0
- package/dist/silke/src/components/silke-image/silke-image-color-backdrop.d.ts +7 -0
- package/dist/silke/src/components/silke-image/silke-image.d.ts +11 -0
- package/dist/silke/src/components/silke-link/index.d.ts +1 -0
- package/dist/silke/src/components/silke-link/silke-link.d.ts +23 -0
- package/dist/silke/src/components/silke-list/index.d.ts +2 -0
- package/dist/silke/src/components/silke-list/silke-list-item.d.ts +7 -0
- package/dist/silke/src/components/silke-list/silke-list.d.ts +10 -0
- package/dist/silke/src/components/silke-list-card/index.d.ts +1 -0
- package/dist/silke/src/components/silke-list-card/silke-list-card.d.ts +14 -0
- package/dist/silke/src/components/silke-loader/index.d.ts +2 -0
- package/dist/silke/src/components/silke-loader/silke-loader-overlay.d.ts +18 -0
- package/dist/silke/src/components/silke-loader/silke-loader.d.ts +18 -0
- package/dist/silke/src/components/silke-modal/index.d.ts +2 -0
- package/dist/silke/src/components/silke-modal/silke-confirmation-modal.d.ts +31 -0
- package/dist/silke/src/components/silke-modal/silke-modal.d.ts +18 -0
- package/dist/silke/src/components/silke-navigation-link/index.d.ts +1 -0
- package/dist/silke/src/components/silke-navigation-link/silke-navigation-link.d.ts +22 -0
- package/dist/silke/src/components/silke-notification/confetti.d.ts +2 -0
- package/dist/silke/src/components/silke-notification/index.d.ts +1 -0
- package/dist/silke/src/components/silke-notification/silke-notification.d.ts +22 -0
- package/dist/silke/src/components/silke-object-field/index.d.ts +1 -0
- package/dist/silke/src/components/silke-object-field/silke-object-field.d.ts +17 -0
- package/dist/silke/src/components/silke-overflow-menu/index.d.ts +1 -0
- package/dist/silke/src/components/silke-overflow-menu/silke-overflow-menu.d.ts +21 -0
- package/dist/silke/src/components/silke-popover/index.d.ts +1 -0
- package/dist/silke/src/components/silke-popover/popover-context.d.ts +8 -0
- package/dist/silke/src/components/silke-popover/silke-popover.d.ts +48 -0
- package/dist/silke/src/components/silke-progress-indicator/index.d.ts +2 -0
- package/dist/silke/src/components/silke-progress-indicator/silke-progress-indicator.d.ts +7 -0
- package/dist/silke/src/components/silke-progress-indicator/silke-progress-step.d.ts +11 -0
- package/dist/silke/src/components/silke-radio-button/index.d.ts +2 -0
- package/dist/silke/src/components/silke-radio-button/silke-radio-button-group.d.ts +15 -0
- package/dist/silke/src/components/silke-radio-button/silke-radio-button.d.ts +10 -0
- package/dist/silke/src/components/silke-search-field/index.d.ts +1 -0
- package/dist/silke/src/components/silke-search-field/silke-search-field.d.ts +8 -0
- package/dist/silke/src/components/silke-select-field/index.d.ts +1 -0
- package/dist/silke/src/components/silke-select-field/silke-select-field.d.ts +5 -0
- package/dist/silke/src/components/silke-skeleton/index.d.ts +1 -0
- package/dist/silke/src/components/silke-skeleton/silke-skeleton.d.ts +8 -0
- package/dist/silke/src/components/silke-slider/index.d.ts +1 -0
- package/dist/silke/src/components/silke-slider/silke-slider-point.d.ts +14 -0
- package/dist/silke/src/components/silke-slider/silke-slider-utils.d.ts +2 -0
- package/dist/silke/src/components/silke-slider/silke-slider.d.ts +20 -0
- package/dist/silke/src/components/silke-slider/slider-track.d.ts +9 -0
- package/dist/silke/src/components/silke-sortable-list/index.d.ts +2 -0
- package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-item.d.ts +16 -0
- package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-list.d.ts +25 -0
- package/dist/silke/src/components/silke-sortable-list/silke-nested-sortable-utils.d.ts +57 -0
- package/dist/silke/src/components/silke-sortable-list/silke-sortable-item-wrapper.d.ts +12 -0
- package/dist/silke/src/components/silke-sortable-list/silke-sortable-list.d.ts +15 -0
- package/dist/silke/src/components/silke-steps/index.d.ts +1 -0
- package/dist/silke/src/components/silke-steps/silke-steps.d.ts +12 -0
- package/dist/silke/src/components/silke-table/index.d.ts +2 -0
- package/dist/silke/src/components/silke-table/silke-table.d.ts +27 -0
- package/dist/silke/src/components/silke-table/table-row.d.ts +13 -0
- package/dist/silke/src/components/silke-table/table-types.d.ts +13 -0
- package/dist/silke/src/components/silke-tabs/index.d.ts +2 -0
- package/dist/silke/src/components/silke-tabs/silke-tab.d.ts +12 -0
- package/dist/silke/src/components/silke-tabs/silke-tabs.d.ts +10 -0
- package/dist/silke/src/components/silke-tag/index.d.ts +1 -0
- package/dist/silke/src/components/silke-tag/silke-tag.d.ts +40 -0
- package/dist/silke/src/components/silke-text/index.d.ts +3 -0
- package/dist/silke/src/components/silke-text/silke-text-types.d.ts +28 -0
- package/dist/silke/src/components/silke-text/silke-text.d.ts +275 -0
- package/dist/silke/src/components/silke-text/silke-title.d.ts +3 -0
- package/dist/silke/src/components/silke-text-field/index.d.ts +3 -0
- package/dist/silke/src/components/silke-text-field/silke-text-field-item.d.ts +8 -0
- package/dist/silke/src/components/silke-text-field/silke-text-field-outline.d.ts +39 -0
- package/dist/silke/src/components/silke-text-field/silke-text-field.d.ts +27 -0
- package/dist/silke/src/components/silke-text-field/text-field-context.d.ts +9 -0
- package/dist/silke/src/components/silke-theme-editor/index.d.ts +1 -0
- package/dist/silke/src/components/silke-theme-editor/silke-theme-editor.d.ts +9 -0
- package/dist/silke/src/components/silke-tile/index.d.ts +2 -0
- package/dist/silke/src/components/silke-tile/silke-tile-select.d.ts +26 -0
- package/dist/silke/src/components/silke-tile/silke-tile.d.ts +38 -0
- package/dist/silke/src/components/silke-toggle/index.d.ts +1 -0
- package/dist/silke/src/components/silke-toggle/silke-toggle.d.ts +12 -0
- package/dist/silke/src/components/silke-toolbar/index.d.ts +1 -0
- package/dist/silke/src/components/silke-toolbar/silke-toolbar.d.ts +7 -0
- package/dist/silke/src/components/silke-tooltip/index.d.ts +5 -0
- package/dist/silke/src/components/silke-tooltip/silke-definition-tooltip.d.ts +16 -0
- package/dist/silke/src/components/silke-tooltip/silke-icon-tooltip.d.ts +17 -0
- package/dist/silke/src/components/silke-tooltip/silke-interactive-tooltip.d.ts +24 -0
- package/dist/silke/src/components/silke-tooltip/silke-shortcuts.d.ts +37 -0
- package/dist/silke/src/components/silke-tooltip/silke-tooltip.d.ts +25 -0
- package/dist/silke/src/components/silke-tooltip/utils.d.ts +1 -0
- package/dist/silke/src/components/silke-upload-field/index.d.ts +1 -0
- package/dist/silke/src/components/silke-upload-field/silke-upload-field.d.ts +32 -0
- package/dist/silke/src/components/silke-virtual/index.d.ts +2 -0
- package/dist/silke/src/components/silke-virtual/silke-virtual-grid.d.ts +9 -0
- package/dist/silke/src/components/silke-virtual/silke-virtual-row.d.ts +10 -0
- package/dist/silke/src/docs/app.d.ts +4 -0
- package/dist/silke/src/docs/components/code-block/code-block.d.ts +6 -0
- package/dist/silke/src/docs/components/code-block/index.d.ts +1 -0
- package/dist/silke/src/docs/components/state-table/index.d.ts +1 -0
- package/dist/silke/src/docs/components/state-table/state-table.d.ts +14 -0
- package/dist/silke/src/docs/data/app/actions.d.ts +1 -0
- package/dist/silke/src/docs/data/app/constants.d.ts +6 -0
- package/dist/silke/src/docs/data/app/index.d.ts +3 -0
- package/dist/silke/src/docs/data/app/store.d.ts +8 -0
- package/dist/silke/src/docs/data/flux/action-decorator.d.ts +5 -0
- package/dist/silke/src/docs/data/flux/action-utils.d.ts +7 -0
- package/dist/silke/src/docs/data/flux/controller.d.ts +24 -0
- package/dist/silke/src/docs/data/flux/dispatcher.d.ts +7 -0
- package/dist/silke/src/docs/data/flux/index.d.ts +6 -0
- package/dist/silke/src/docs/data/flux/store.d.ts +15 -0
- package/dist/silke/src/docs/data/flux/use-store.d.ts +2 -0
- package/dist/silke/src/docs/docs-provider.d.ts +6 -0
- package/dist/silke/src/docs/index.d.ts +2 -0
- package/dist/silke/src/docs/ipsum-generator.d.ts +7 -0
- package/dist/silke/src/helpers/copy-to-clipboard.d.ts +5 -0
- package/dist/silke/src/helpers/key-code.d.ts +9 -0
- package/dist/silke/src/hooks/drag-and-drop/index.d.ts +2 -0
- package/dist/silke/src/hooks/drag-and-drop/use-drag.d.ts +10 -0
- package/dist/silke/src/hooks/drag-and-drop/use-drop.d.ts +8 -0
- package/dist/silke/src/hooks/form/index.d.ts +1 -0
- package/dist/silke/src/hooks/form/use-form-field.d.ts +5 -0
- package/dist/silke/src/hooks/image-colors/use-image-colors.d.ts +10 -0
- package/dist/silke/src/hooks/index.d.ts +13 -0
- package/dist/silke/src/hooks/use-callback-ref.d.ts +2 -0
- package/dist/silke/src/hooks/use-dragging.d.ts +1 -0
- package/dist/silke/src/hooks/use-drop-zone.d.ts +2 -0
- package/dist/silke/src/hooks/use-html-element.d.ts +2 -0
- package/dist/silke/src/hooks/use-interval.d.ts +6 -0
- package/dist/silke/src/hooks/use-mouse.d.ts +40 -0
- package/dist/silke/src/hooks/use-parent-scroll.d.ts +2 -0
- package/dist/silke/src/hooks/use-scroll.d.ts +1 -0
- package/dist/silke/src/hooks/use-size.d.ts +4 -0
- package/dist/silke/src/hooks/use-uniq-id.d.ts +1 -0
- package/dist/silke/src/hooks/use-window-resize.d.ts +1 -0
- package/dist/silke/src/icons.d.ts +353 -0
- package/dist/silke/src/index.d.ts +5 -0
- package/dist/silke/src/main.d.ts +1 -0
- package/dist/silke/src/silke-theme-provider.d.ts +16 -0
- package/dist/silke-code-editor-HB2Z4Q5W.js +25 -0
- package/dist/silke-code-editor-HB2Z4Q5W.js.map +7 -0
- package/dist/styles.css +622 -661
- package/dist/utils/src/color/hex.d.ts +2 -0
- package/dist/utils/src/color/index.d.ts +1 -0
- package/dist/utils/src/constants.d.ts +2 -0
- package/dist/utils/src/css/computed-to-css.d.ts +8 -0
- package/dist/utils/src/css/computed.d.ts +5 -0
- package/dist/utils/src/css/index.d.ts +4 -0
- package/dist/utils/src/css/number-format.d.ts +1 -0
- package/dist/utils/src/css/utils.d.ts +14 -0
- package/dist/utils/src/events/condition-parser/evaluate-condition-expression.d.ts +2 -0
- package/dist/utils/src/events/condition-parser/index.d.ts +1 -0
- package/dist/utils/src/events/condition-parser/lexer.d.ts +36 -0
- package/dist/utils/src/events/condition-parser/parser.d.ts +11 -0
- package/dist/utils/src/index.d.ts +10 -0
- package/dist/utils/src/interactions/get-node-type.d.ts +2 -0
- package/dist/utils/src/interactions/has-link.d.ts +5 -0
- package/dist/utils/src/interactions/has-pointer-event.d.ts +5 -0
- package/dist/utils/src/interactions/index.d.ts +5 -0
- package/dist/utils/src/interactions/is-target-global.d.ts +2 -0
- package/dist/utils/src/interactions/is-trigger-global.d.ts +2 -0
- package/dist/utils/src/keyboard/hooks.d.ts +8 -0
- package/dist/utils/src/keyboard/index.d.ts +4 -0
- package/dist/utils/src/keyboard/key-list.d.ts +4 -0
- package/dist/utils/src/keyboard/keyboard.d.ts +70 -0
- package/dist/utils/src/keyboard/keys.d.ts +4 -0
- package/dist/utils/src/math/index.d.ts +9 -0
- package/dist/utils/src/mouse/index.d.ts +3 -0
- package/dist/utils/src/mouse/mouse-manager.d.ts +52 -0
- package/dist/utils/src/types/content.d.ts +11 -0
- package/dist/utils/src/types/context.d.ts +74 -0
- package/dist/utils/src/types/css.d.ts +131 -0
- package/dist/utils/src/types/editable-css.d.ts +7 -0
- package/dist/utils/src/types/emoji.d.ts +28 -0
- package/dist/utils/src/types/event.d.ts +7 -0
- package/dist/utils/src/types/icon.d.ts +10 -0
- package/dist/utils/src/types/index.d.ts +17 -0
- package/dist/utils/src/types/interaction.d.ts +77 -0
- package/dist/utils/src/types/link.d.ts +47 -0
- package/dist/utils/src/types/manifest.d.ts +54 -0
- package/dist/utils/src/types/project.d.ts +23 -0
- package/dist/utils/src/types/shape.d.ts +20 -0
- package/dist/utils/src/types/transition.d.ts +15 -0
- package/dist/utils/src/types/vev-plugin.d.ts +30 -0
- package/dist/utils/src/types/vev-props.d.ts +154 -0
- package/dist/utils/src/types/widget-manifest.d.ts +69 -0
- package/dist/utils/src/types/widget.d.ts +36 -0
- package/dist/utils/src/utils/generate-guid.d.ts +1 -0
- package/dist/utils/src/utils/index.d.ts +7 -0
- package/dist/utils/src/utils/internals/asciiToArray.d.ts +9 -0
- package/dist/utils/src/utils/internals/castSlice.d.ts +11 -0
- package/dist/utils/src/utils/internals/createCaseFirst.d.ts +9 -0
- package/dist/utils/src/utils/internals/getTag.d.ts +9 -0
- package/dist/utils/src/utils/internals/hasUnicode.d.ts +9 -0
- package/dist/utils/src/utils/internals/stringToArray.d.ts +9 -0
- package/dist/utils/src/utils/internals/unicodeToArray.d.ts +9 -0
- package/dist/utils/src/utils/internals/unicodeWords.d.ts +9 -0
- package/dist/utils/src/utils/internals/upperFirst.d.ts +18 -0
- package/dist/utils/src/utils/is-array.d.ts +25 -0
- package/dist/utils/src/utils/is-length.d.ts +26 -0
- package/dist/utils/src/utils/is-string.d.ts +17 -0
- package/dist/utils/src/utils/slice.d.ts +22 -0
- package/dist/utils/src/utils/start-case.d.ts +22 -0
- package/dist/utils/src/utils/string.d.ts +5 -0
- package/dist/utils/src/utils/words.d.ts +18 -0
- package/package.json +7 -7
- package/src/components/index.ts +1 -0
- package/src/components/silke-autocomplete-field/autocomplete-tags.tsx +1 -1
- package/src/components/silke-autocomplete-field/index.ts +4 -0
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +4 -1
- package/src/components/silke-card/silke-card-grid.tsx +18 -15
- package/src/components/silke-card/silke-card.mdx +56 -23
- package/src/components/silke-card/silke-card.scss +150 -115
- package/src/components/silke-card/silke-card.tsx +173 -112
- package/src/components/silke-color-picker/color-picker.scss +29 -24
- package/src/components/silke-color-picker/hue.ts +72 -0
- package/src/components/silke-color-picker/index.ts +2 -1
- package/src/components/silke-color-picker/silke-color-picker.mdx +18 -0
- package/src/components/silke-color-picker/silke-color-picker.tsx +5 -5
- package/src/components/silke-color-picker/silke-color-space.tsx +0 -2
- package/src/components/silke-color-picker/silke-hue-slider.tsx +23 -8
- package/src/components/silke-color-picker/silke-opacity-slider.tsx +10 -12
- package/src/components/silke-content-column/silke-content-column.scss +2 -37
- package/src/components/silke-context-menu/silke-context-menu.tsx +1 -2
- package/src/components/silke-form/form-context.tsx +5 -5
- package/src/components/silke-form/form-types.ts +1 -0
- package/src/components/silke-form/silke-form.tsx +1 -1
- package/src/components/silke-form-schema/fields/array-field.tsx +2 -2
- package/src/components/silke-form-schema/fields/number-field.tsx +40 -27
- package/src/components/silke-form-schema/fields/select-field.tsx +3 -8
- package/src/components/silke-form-schema/fields/string-field.tsx +29 -15
- package/src/components/silke-form-schema/fields/styles.scss +3 -1
- package/src/components/silke-form-schema/fields/toggle-field.tsx +2 -3
- package/src/components/silke-form-schema/fields/upload-field.tsx +2 -4
- package/src/components/silke-form-schema/fields/utils/generate-title.ts +3 -3
- package/src/components/silke-form-schema/silke-form-schema.tsx +7 -2
- package/src/components/silke-form-schema/silke-schema-context.tsx +5 -2
- package/src/components/silke-form-schema/silke-schema-field.tsx +36 -40
- package/src/components/silke-form-schema/silke-schema-fields.tsx +39 -14
- package/src/components/silke-gradient-picker/index.ts +1 -0
- package/src/components/silke-gradient-picker/silke-gradient-picker.mdx +13 -0
- package/src/components/silke-gradient-picker/silke-gradient-picker.module.scss +71 -0
- package/src/components/silke-gradient-picker/silke-gradient-picker.tsx +71 -0
- package/src/components/silke-gradient-picker/silke-gradient-position.tsx +160 -0
- package/src/components/silke-gradient-picker/silke-gradient-slider.tsx +57 -0
- package/src/components/silke-gradient-picker/silke-gradient-utils.ts +132 -0
- package/src/components/silke-image/index.ts +1 -0
- package/src/components/silke-image/silke-image-color-backdrop.scss +10 -0
- package/src/components/silke-image/silke-image-color-backdrop.tsx +32 -0
- package/src/components/silke-image/silke-image.tsx +6 -2
- package/src/components/silke-modal/silke-confirmation-modal.tsx +33 -11
- package/src/components/silke-modal/silke-modal.mdx +24 -0
- package/src/components/silke-navigation-link/silke-navigation-link.tsx +83 -76
- package/src/components/silke-object-field/silke-object-field.tsx +1 -1
- package/src/components/silke-overflow-menu/silke-overflow-menu.tsx +1 -0
- package/src/components/silke-radio-button/silke-radio-button-group.tsx +6 -23
- package/src/components/silke-slider/index.ts +0 -1
- package/src/components/silke-slider/silke-slider-point.tsx +43 -0
- package/src/components/silke-slider/silke-slider-utils.ts +32 -0
- package/src/components/silke-slider/silke-slider.mdx +45 -0
- package/src/components/silke-slider/silke-slider.module.scss +71 -0
- package/src/components/silke-slider/silke-slider.tsx +160 -66
- package/src/components/silke-slider/slider-track.tsx +26 -0
- package/src/components/silke-sortable-list/silke-sortable-item-wrapper.tsx +3 -0
- package/src/components/silke-sortable-list/silke-sortable-list.scss +8 -8
- package/src/components/silke-sortable-list/silke-sortable-list.tsx +24 -7
- package/src/components/silke-table/silke-table.tsx +5 -5
- package/src/components/silke-tag/silke-tag.scss +107 -118
- package/src/components/silke-tag/silke-tag.tsx +8 -4
- package/src/components/silke-text/silke-text-types.ts +5 -6
- package/src/components/silke-text/silke-text.mdx +45 -11
- package/src/components/silke-text/silke-text.scss +40 -19
- package/src/components/silke-text/silke-text.tsx +10 -16
- package/src/components/silke-text/silke-title.scss +36 -57
- package/src/components/silke-text/silke-title.tsx +27 -17
- package/src/components/silke-text-field/silke-text-field.scss +0 -1
- package/src/components/silke-text-field/silke-text-field.tsx +6 -3
- package/src/components/silke-tooltip/silke-tooltip.tsx +3 -0
- package/src/components/silke-upload-field/silke-upload-field.tsx +16 -9
- package/src/docs/data/flux/action-decorator.ts +4 -4
- package/src/docs/data/flux/store.ts +4 -2
- package/src/hooks/drag-and-drop/use-drag.tsx +5 -3
- package/src/hooks/form/use-form-field.ts +4 -0
- package/src/hooks/image-colors/use-image-colors.ts +83 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-dragging.ts +24 -0
- package/src/icons.tsx +3 -16
- package/src/styles/core.scss +0 -48
- package/tsconfig.json +1 -0
- package/dist/silke-code-editor-LBP2WDX3.js +0 -25
- package/dist/silke-code-editor-LBP2WDX3.js.map +0 -7
- package/src/components/silke-slider/range-slider.scss +0 -52
- package/src/components/silke-slider/silke-range-slider.tsx +0 -108
- package/src/components/silke-text/silke-text-utils.ts +0 -8
- /package/dist/{chunk-SOFGXMET.js.LEGAL.txt → chunk-FIPWO3IB.js.LEGAL.txt} +0 -0
- /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
|
|
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
|
|
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
|
-
<
|
|
7
|
-
<SilkeText
|
|
8
|
-
<SilkeText kind="
|
|
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
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
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
|
-
<
|
|
23
|
-
<SilkeTitle kind="
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<SilkeTitle kind="
|
|
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
|
|
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
|
|
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 = (
|
|
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
|
-
|
|
4
|
+
.title{
|
|
5
|
+
&.xl {
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
|
|
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({
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
18
|
+
let cl = styles.title + ' ' + styles[kind];
|
|
19
|
+
if (className) cl += ' ' + className;
|
|
20
|
+
if (size) cl += ' ' + styles[size];
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
}
|
|
@@ -40,7 +40,10 @@ type OmitAttrs =
|
|
|
40
40
|
| 'readonly'
|
|
41
41
|
| 'onBlur';
|
|
42
42
|
|
|
43
|
-
type MultilineProps = {
|
|
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="
|
|
186
|
+
bg="neutral-10"
|
|
188
187
|
style={dropzoneStyle}
|
|
189
188
|
>
|
|
190
|
-
<SilkeIcon icon="file" className={styles.icon} />
|
|
191
|
-
<SilkeBox column>
|
|
192
|
-
<SilkeTitle kind=
|
|
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 &&
|
|
196
|
-
|
|
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
|
-
|
|
8
|
-
|
|
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-
|
|
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
|
}
|