@vev/silke 1.0.18 → 1.0.20
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 +16 -0
- package/dist/{chunk-SOFGXMET.js → chunk-PP74IZDW.js} +3 -3
- package/dist/{chunk-SOFGXMET.js.map → chunk-PP74IZDW.js.map} +2 -2
- package/dist/index.js +22 -23
- 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 +120 -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 +26 -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 +6 -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 +9 -0
- package/dist/silke/src/components/silke-tabs/silke-tabs.d.ts +8 -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 +38 -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 +33 -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 +356 -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-4TSQ5KJ3.js +25 -0
- package/dist/silke-code-editor-4TSQ5KJ3.js.map +7 -0
- package/dist/styles.css +826 -890
- 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-interaction-map.d.ts +3 -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 +7 -0
- package/dist/utils/src/interactions/interaction-map-to-array.d.ts +2 -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 +18 -0
- package/dist/utils/src/types/interaction.d.ts +86 -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/oauth.d.ts +13 -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 +61 -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 +10 -9
- package/src/components/index.ts +1 -0
- package/src/components/silke-autocomplete-field/autocomplete-item.tsx +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.scss +18 -4
- package/src/components/silke-autocomplete-field/silke-autocomplete-field.tsx +14 -9
- package/src/components/silke-box/silke-box.mdx +2 -2
- package/src/components/silke-box/silke-box.scss +2 -1
- package/src/components/silke-box/silke-box.tsx +1 -2
- package/src/components/silke-button/silke-button.scss +2 -2
- package/src/components/silke-card/silke-card-grid.tsx +16 -15
- package/src/components/silke-card/silke-card.mdx +56 -23
- package/src/components/silke-card/silke-card.scss +172 -112
- package/src/components/silke-card/silke-card.tsx +191 -112
- package/src/components/silke-code-snippet/silke-code-snippet.tsx +2 -2
- 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/image-field.tsx +4 -2
- package/src/components/silke-form-schema/fields/link-field.tsx +2 -6
- package/src/components/silke-form-schema/fields/number-field.tsx +53 -36
- package/src/components/silke-form-schema/fields/object-field.tsx +1 -1
- package/src/components/silke-form-schema/fields/select-field.tsx +37 -54
- package/src/components/silke-form-schema/fields/string-field.tsx +7 -8
- package/src/components/silke-form-schema/fields/styles.scss +3 -1
- package/src/components/silke-form-schema/fields/toggle-field.tsx +9 -12
- 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.mdx +14 -26
- package/src/components/silke-form-schema/silke-form-schema.tsx +11 -3
- 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 +40 -15
- 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-icon-picker/silke-icon-picker.tsx +1 -1
- 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-list-card/silke-list-card.tsx +0 -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 +2 -1
- 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-tabs/silke-tab.tsx +17 -50
- package/src/components/silke-tabs/silke-tabs.mdx +4 -16
- package/src/components/silke-tabs/silke-tabs.scss +24 -81
- package/src/components/silke-tabs/silke-tabs.tsx +12 -10
- package/src/components/silke-tag/silke-tag.mdx +78 -24
- package/src/components/silke-tag/silke-tag.scss +110 -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 -59
- package/src/components/silke-text/silke-title.tsx +27 -17
- package/src/components/silke-text-field/silke-text-field-outline.tsx +28 -16
- package/src/components/silke-text-field/silke-text-field.mdx +12 -0
- package/src/components/silke-text-field/silke-text-field.scss +8 -2
- package/src/components/silke-text-field/silke-text-field.tsx +8 -5
- package/src/components/silke-tooltip/silke-tooltip.tsx +3 -0
- package/src/components/silke-upload-field/silke-upload-field.tsx +21 -10
- 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 +12 -35
- package/src/styles/core.scss +6 -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-PP74IZDW.js.LEGAL.txt} +0 -0
- /package/dist/{silke-code-editor-LBP2WDX3.js.LEGAL.txt → silke-code-editor-4TSQ5KJ3.js.LEGAL.txt} +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import classnames from 'classnames/bind';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { BoxProps, SilkeBox } from '../silke-box';
|
|
2
|
+
import { BoxDivProps, BoxSize, BoxSpace, SilkeBox } from '../silke-box';
|
|
5
3
|
import styles from './silke-tabs.scss';
|
|
6
4
|
|
|
7
|
-
const cl = classnames.bind(styles);
|
|
8
|
-
|
|
9
5
|
type TabsProps = {
|
|
10
|
-
|
|
11
|
-
bg?: SilkeColor;
|
|
6
|
+
size?: 's' | 'base';
|
|
12
7
|
children: React.ReactNode;
|
|
13
|
-
} &
|
|
8
|
+
} & Omit<BoxDivProps, 'size' | 'height' | 'width'>;
|
|
14
9
|
|
|
15
|
-
export function SilkeTabs({
|
|
10
|
+
export function SilkeTabs({ children, size, className, ...rest }: TabsProps) {
|
|
11
|
+
let gap: BoxSpace = 'm';
|
|
12
|
+
let cl = styles.tabs;
|
|
13
|
+
if (size === 's') {
|
|
14
|
+
cl += ' ' + styles.s;
|
|
15
|
+
gap = 's';
|
|
16
|
+
}
|
|
17
|
+
if (className) cl += ' ' + className;
|
|
16
18
|
return (
|
|
17
|
-
<SilkeBox className={cl
|
|
19
|
+
<SilkeBox className={cl} gap={gap} {...rest}>
|
|
18
20
|
{children}
|
|
19
21
|
</SilkeBox>
|
|
20
22
|
);
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
```js
|
|
2
2
|
<SilkeBox column gap>
|
|
3
|
-
{[
|
|
3
|
+
{[
|
|
4
|
+
"sand",
|
|
5
|
+
"yellow",
|
|
6
|
+
"green",
|
|
7
|
+
"red",
|
|
8
|
+
"gray",
|
|
9
|
+
"blue",
|
|
10
|
+
"brandYellow",
|
|
11
|
+
"dark",
|
|
12
|
+
].map((color) => (
|
|
4
13
|
<SilkeBox gap key={color}>
|
|
5
14
|
<SilkeTag color={color} label={color} />
|
|
6
15
|
<SilkeTag color={color} label={ipsum.name()} onRemove={() => {}} />
|
|
7
16
|
<SilkeTag color={color} label={ipsum.name(10)} onRemove={() => {}} />
|
|
8
|
-
<SilkeTag color={color} label="Disabled" disabled/>
|
|
17
|
+
<SilkeTag color={color} label="Disabled" disabled />
|
|
9
18
|
</SilkeBox>
|
|
10
19
|
))}
|
|
11
20
|
</SilkeBox>
|
|
@@ -15,7 +24,16 @@
|
|
|
15
24
|
|
|
16
25
|
```js
|
|
17
26
|
<SilkeBox gap>
|
|
18
|
-
{[
|
|
27
|
+
{[
|
|
28
|
+
"sand",
|
|
29
|
+
"yellow",
|
|
30
|
+
"green",
|
|
31
|
+
"red",
|
|
32
|
+
"gray",
|
|
33
|
+
"blue",
|
|
34
|
+
"brandYellow",
|
|
35
|
+
"dark",
|
|
36
|
+
].map((color) => (
|
|
19
37
|
<SilkeBox gap key={color} col>
|
|
20
38
|
<SilkeTag kind="outlined" color={color} label={color} outline />
|
|
21
39
|
</SilkeBox>
|
|
@@ -27,12 +45,27 @@
|
|
|
27
45
|
|
|
28
46
|
```js
|
|
29
47
|
<SilkeBox gap>
|
|
30
|
-
{[
|
|
48
|
+
{[
|
|
49
|
+
"sand",
|
|
50
|
+
"yellow",
|
|
51
|
+
"green",
|
|
52
|
+
"red",
|
|
53
|
+
"gray",
|
|
54
|
+
"blue",
|
|
55
|
+
"brandYellow",
|
|
56
|
+
"dark",
|
|
57
|
+
].map((color) => (
|
|
31
58
|
<SilkeBox gap key={color} col>
|
|
32
|
-
<SilkeTag
|
|
59
|
+
<SilkeTag
|
|
60
|
+
kind="secondary"
|
|
61
|
+
color={color}
|
|
62
|
+
label={color}
|
|
63
|
+
outline
|
|
64
|
+
icon="react"
|
|
65
|
+
/>
|
|
33
66
|
</SilkeBox>
|
|
34
67
|
))}
|
|
35
|
-
|
|
68
|
+
<SilkeTag kind="secondary" label="Emoji" outline icon="😎" />
|
|
36
69
|
</SilkeBox>
|
|
37
70
|
```
|
|
38
71
|
|
|
@@ -40,18 +73,21 @@
|
|
|
40
73
|
|
|
41
74
|
```js
|
|
42
75
|
<SilkeBox gap column>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
76
|
+
<SilkeBox gap>
|
|
77
|
+
<SilkeTag label="Primary base" />
|
|
78
|
+
<SilkeTag size="tiny" label=" Primary tiny" />
|
|
79
|
+
<SilkeTag size="tiny" icon="eye" label=" Primary tiny" />
|
|
80
|
+
</SilkeBox>
|
|
81
|
+
<SilkeBox gap>
|
|
82
|
+
<SilkeTag kind="outlined" label="Outlined base" />
|
|
83
|
+
<SilkeTag kind="outlined" size="tiny" label="Outlined tiny" />
|
|
84
|
+
<SilkeTag kind="outlined" size="tiny" icon="eye" label="Outlined tiny" />
|
|
85
|
+
</SilkeBox>
|
|
86
|
+
<SilkeBox gap>
|
|
87
|
+
<SilkeTag kind="secondary" label="Secondary base" />
|
|
88
|
+
<SilkeTag kind="secondary" size="tiny" label="Secondary tiny" />
|
|
89
|
+
<SilkeTag kind="secondary" size="tiny" icon="eye" label="Secondary tiny" />
|
|
90
|
+
</SilkeBox>
|
|
55
91
|
</SilkeBox>
|
|
56
92
|
```
|
|
57
93
|
|
|
@@ -59,7 +95,16 @@
|
|
|
59
95
|
|
|
60
96
|
```js
|
|
61
97
|
<SilkeBox gap>
|
|
62
|
-
{[
|
|
98
|
+
{[
|
|
99
|
+
"sand",
|
|
100
|
+
"yellow",
|
|
101
|
+
"green",
|
|
102
|
+
"red",
|
|
103
|
+
"gray",
|
|
104
|
+
"blue",
|
|
105
|
+
"brandYellow",
|
|
106
|
+
"dark",
|
|
107
|
+
].map((color) => (
|
|
63
108
|
<SilkeBox gap key={color} col>
|
|
64
109
|
<SilkeTag color={color} label={color} icon="react" />
|
|
65
110
|
</SilkeBox>
|
|
@@ -71,14 +116,23 @@
|
|
|
71
116
|
|
|
72
117
|
```js
|
|
73
118
|
<SilkeBox gap>
|
|
74
|
-
{[
|
|
119
|
+
{[
|
|
120
|
+
"sand",
|
|
121
|
+
"yellow",
|
|
122
|
+
"green",
|
|
123
|
+
"red",
|
|
124
|
+
"gray",
|
|
125
|
+
"blue",
|
|
126
|
+
"brandYellow",
|
|
127
|
+
"dark",
|
|
128
|
+
].map((color) => (
|
|
75
129
|
<SilkeBox gap key={color} col>
|
|
76
|
-
<SilkeTag color={color}
|
|
130
|
+
<SilkeTag color={color} icon="react" />
|
|
77
131
|
</SilkeBox>
|
|
78
132
|
))}
|
|
79
|
-
<SilkeBox gap
|
|
80
|
-
|
|
81
|
-
|
|
133
|
+
<SilkeBox gap col>
|
|
134
|
+
<SilkeTag kind="secondary" color="green" icon="react" />
|
|
135
|
+
</SilkeBox>
|
|
82
136
|
</SilkeBox>
|
|
83
137
|
```
|
|
84
138
|
|
|
@@ -1,112 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
@use "sass:math";
|
|
3
|
-
|
|
4
|
-
$tag-height: $size-s;
|
|
5
|
-
$tag-width-min: auto;
|
|
6
|
-
$tag-width-max: 150px;
|
|
7
|
-
$btn-size: $size-xs;
|
|
8
|
-
$btn-font-size: $font-small;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$colors: (
|
|
12
|
-
name: "gray",
|
|
13
|
-
bg: var(--color-neutral-40-rgb),
|
|
14
|
-
outline: var(--color-neutral-40-rgb),
|
|
15
|
-
color: var(--color-neutral-100),
|
|
16
|
-
btn-bg-hover: var(--color-neutral-30),
|
|
17
|
-
),
|
|
18
|
-
(
|
|
19
|
-
name: "sand",
|
|
20
|
-
bg: var(--color-brand-quaternary-30-rgb),
|
|
21
|
-
outline: var(--color-brand-quaternary-30-rgb),
|
|
22
|
-
color: var(--color-neutral-0),
|
|
23
|
-
btn-bg-hover: var(--color-support-primary-20),
|
|
24
|
-
),
|
|
25
|
-
(
|
|
26
|
-
name: "yellow",
|
|
27
|
-
bg: var(--color-warning-30-rgb),
|
|
28
|
-
outline: var(--color-warning-30-rgb),
|
|
29
|
-
color: var(--color-neutral-0),
|
|
30
|
-
btn-bg-hover: var(--color-warning-20),
|
|
31
|
-
),
|
|
32
|
-
(
|
|
33
|
-
name: "green",
|
|
34
|
-
bg: var(--color-success-30-rgb),
|
|
35
|
-
outline: var(--color-success-30-rgb),
|
|
36
|
-
color: var(--color-neutral-0),
|
|
37
|
-
btn-bg-hover: var(--color-success-20),
|
|
38
|
-
),
|
|
39
|
-
(
|
|
40
|
-
name: "red",
|
|
41
|
-
bg: var(--color-error-30-rgb),
|
|
42
|
-
outline: var(--color-error-30-rgb),
|
|
43
|
-
color: var(--color-neutral-0),
|
|
44
|
-
btn-bg-hover: var(--color-error-20),
|
|
45
|
-
),
|
|
46
|
-
(
|
|
47
|
-
name: "blue",
|
|
48
|
-
bg: var(--color-support-secondary-30-rgb),
|
|
49
|
-
outline: var(--color-support-secondary-30-rgb),
|
|
50
|
-
color: var(--color-neutral-0),
|
|
51
|
-
btn-bg-hover: var(--color-accent-20),
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
name: "brandYellow",
|
|
55
|
-
bg: var(--color-brand-primary-40-rgb),
|
|
56
|
-
outline: var(--color-brand-primary-40-rgb),
|
|
57
|
-
color: var(--color-neutral-0),
|
|
58
|
-
btn-bg-hover: var(--color-brand-primary-50),
|
|
59
|
-
),
|
|
60
|
-
(
|
|
61
|
-
name: "dark",
|
|
62
|
-
bg: (var(--color-neutral-0-rgb), .64),
|
|
63
|
-
outline: var(--color-neutral-20-rgb),
|
|
64
|
-
color: var(--color-neutral-100),
|
|
65
|
-
btn-bg-hover: var(--color-neutral-20),
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
.tag {
|
|
1
|
+
:root {
|
|
69
2
|
--tag-background: transparent;
|
|
70
3
|
--tag-color: var(--color-neutral-0);
|
|
71
|
-
--tag-icon-color:
|
|
4
|
+
--tag-icon-color: currentColor;
|
|
72
5
|
--tag-button-background: transparent;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
max-height: $tag-height;
|
|
76
|
-
min-width: $tag-width-min;
|
|
77
|
-
max-width: $tag-width-max;
|
|
78
|
-
font-size: $font-small;
|
|
79
|
-
border-radius: math.div($tag-height , 2);
|
|
80
|
-
color: var(--tag-color);
|
|
6
|
+
--tag-height: 24px;
|
|
7
|
+
}
|
|
81
8
|
|
|
9
|
+
.gray {
|
|
10
|
+
--tag-background: var(--color-neutral-30-rgb);
|
|
11
|
+
--tag-outline: var(--color-neutral-30-rgb);
|
|
12
|
+
--tag-color: var(--color-neutral-100);
|
|
13
|
+
--tag-button-background: var(--color-neutral-20);
|
|
14
|
+
}
|
|
82
15
|
|
|
16
|
+
.sand {
|
|
17
|
+
--tag-background: var(--color-brand-quaternary-30-rgb);
|
|
18
|
+
--tag-outline: var(--color-brand-quaternary-30-rgb);
|
|
19
|
+
--tag-color: var(--color-neutral-0);
|
|
20
|
+
--tag-button-background: var(--color-support-primary-20);
|
|
21
|
+
}
|
|
83
22
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
--tag-icon-color: #{map-get($color, "bg")};
|
|
91
|
-
}
|
|
92
|
-
}
|
|
23
|
+
.yellow {
|
|
24
|
+
--tag-background: var(--color-warning-30-rgb);
|
|
25
|
+
--tag-outline: var(--color-warning-30-rgb);
|
|
26
|
+
--tag-color: var(--color-neutral-0);
|
|
27
|
+
--tag-button-background: var(--color-warning-20);
|
|
28
|
+
}
|
|
93
29
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
30
|
+
.green {
|
|
31
|
+
--tag-background: var(--color-success-30-rgb);
|
|
32
|
+
--tag-outline: var(--color-success-30-rgb);
|
|
33
|
+
--tag-color: var(--color-neutral-0);
|
|
34
|
+
--tag-button-background: var(--color-success-20);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.red {
|
|
38
|
+
--tag-background: var(--color-error-30-rgb);
|
|
39
|
+
--tag-outline: var(--color-error-30-rgb);
|
|
40
|
+
--tag-color: var(--color-neutral-0);
|
|
41
|
+
--tag-button-background: var(--color-error-20);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.blue {
|
|
45
|
+
--tag-background: var(--color-support-secondary-30-rgb);
|
|
46
|
+
--tag-outline: var(--color-support-secondary-30-rgb);
|
|
47
|
+
--tag-color: var(--color-neutral-0);
|
|
48
|
+
--tag-button-background: var(--color-accent-20);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.brandYellow {
|
|
52
|
+
--tag-background: var(--color-brand-primary-40-rgb);
|
|
53
|
+
--tag-outline: var(--color-brand-primary-40-rgb);
|
|
54
|
+
--tag-color: var(--color-neutral-0);
|
|
55
|
+
--tag-button-background: var(--color-brand-primary-50);
|
|
56
|
+
}
|
|
97
57
|
|
|
98
|
-
|
|
58
|
+
.dark {
|
|
59
|
+
--tag-background: (var(--color-neutral-0-rgb), 0.64);
|
|
60
|
+
--tag-outline: var(--color-neutral-20-rgb);
|
|
61
|
+
--tag-color: var(--color-neutral-100);
|
|
62
|
+
--tag-button-background: var(--color-neutral-20);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.tag {
|
|
66
|
+
background-color: rgb(var(--tag-background));
|
|
67
|
+
height: var(--tag-height);
|
|
68
|
+
max-height: var(--tag-height);
|
|
69
|
+
min-width: var(--tag-height);
|
|
70
|
+
max-width: 150px;
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
border-radius: calc(var(--tag-height) / 2);
|
|
73
|
+
color: var(--tag-color);
|
|
74
|
+
|
|
75
|
+
&.secondary {
|
|
76
|
+
--tag-icon-color: rgb(var(--tag-background));
|
|
99
77
|
--tag-color: var(--color-neutral-100);
|
|
100
|
-
background-color: rgb(var(--color-neutral-20-rgb), .
|
|
78
|
+
background-color: rgb(var(--color-neutral-20-rgb), 0.64);
|
|
101
79
|
border-radius: var(--border-radius-tiny);
|
|
102
80
|
backdrop-filter: blur(8px);
|
|
81
|
+
|
|
82
|
+
&.gray{
|
|
83
|
+
--tag-icon-color: var(--color-neutral-80);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.dark {
|
|
87
|
+
--tag-icon-color: var(--color-neutral-100);
|
|
88
|
+
}
|
|
103
89
|
}
|
|
104
90
|
|
|
105
|
-
&.outlined{
|
|
91
|
+
&.outlined {
|
|
106
92
|
--tag-color: var(--color-neutral-100);
|
|
107
|
-
border: 1px solid
|
|
108
|
-
background-color: rgb(var(--tag-background), .24);
|
|
109
|
-
|
|
93
|
+
border: 1px solid rgb(var(--tag-outline));
|
|
94
|
+
background-color: rgb(var(--tag-background), 0.24);
|
|
110
95
|
}
|
|
111
96
|
|
|
112
97
|
&.selectable {
|
|
@@ -115,8 +100,8 @@ $colors: (
|
|
|
115
100
|
|
|
116
101
|
button {
|
|
117
102
|
color: var(--tag-color);
|
|
118
|
-
width:
|
|
119
|
-
height:
|
|
103
|
+
width: calc(var(--tag-height) - 8px);
|
|
104
|
+
height: calc(var(--tag-height) - 8px);
|
|
120
105
|
background-color: transparent;
|
|
121
106
|
border: none;
|
|
122
107
|
outline: none;
|
|
@@ -124,31 +109,38 @@ $colors: (
|
|
|
124
109
|
padding: 0;
|
|
125
110
|
margin: 0;
|
|
126
111
|
cursor: pointer;
|
|
127
|
-
&:hover{
|
|
112
|
+
&:hover {
|
|
128
113
|
background-color: var(--tag-button-background);
|
|
129
114
|
}
|
|
130
115
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
padding: 0;
|
|
139
|
-
padding: 0 $space-xs;
|
|
140
|
-
}
|
|
116
|
+
.label {
|
|
117
|
+
padding: 0 4px;
|
|
118
|
+
}
|
|
119
|
+
.tagIcon {
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
color: var(--tag-icon-color);
|
|
122
|
+
}
|
|
141
123
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
124
|
+
&.tiny {
|
|
125
|
+
--tag-height: 16px;
|
|
126
|
+
.label {
|
|
127
|
+
padding: 0;
|
|
128
|
+
padding: 0 4px;
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
}
|
|
131
|
+
.tagIcon{
|
|
132
|
+
font-size:12px;
|
|
133
|
+
}
|
|
146
134
|
|
|
147
|
-
.
|
|
148
|
-
|
|
149
|
-
|
|
135
|
+
&.tiny .disabled {
|
|
136
|
+
background-color: var(--color-neutral-40);
|
|
137
|
+
color: var(--color-neutral-70);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
150
140
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
141
|
+
&.link {
|
|
142
|
+
.label span:hover {
|
|
143
|
+
text-decoration: underline;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
154
146
|
}
|
|
@@ -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;
|