@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `value` is a valid array-like length.
|
|
3
|
+
*
|
|
4
|
+
* **Note:** This method is loosely based on
|
|
5
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
6
|
+
*
|
|
7
|
+
* @since 4.0.0
|
|
8
|
+
* @category Lang
|
|
9
|
+
* @param {*} value The value to check.
|
|
10
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
11
|
+
* @example
|
|
12
|
+
*
|
|
13
|
+
* isLength(3)
|
|
14
|
+
* // => true
|
|
15
|
+
*
|
|
16
|
+
* isLength(Number.MIN_VALUE)
|
|
17
|
+
* // => false
|
|
18
|
+
*
|
|
19
|
+
* isLength(Infinity)
|
|
20
|
+
* // => false
|
|
21
|
+
*
|
|
22
|
+
* isLength('3')
|
|
23
|
+
* // => false
|
|
24
|
+
*/
|
|
25
|
+
declare function isLength(value: any): boolean;
|
|
26
|
+
export default isLength;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if `value` is classified as a `String` primitive or object.
|
|
3
|
+
*
|
|
4
|
+
* @since 0.1.0
|
|
5
|
+
* @category Lang
|
|
6
|
+
* @param {*} value The value to check.
|
|
7
|
+
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* isString('abc')
|
|
11
|
+
* // => true
|
|
12
|
+
*
|
|
13
|
+
* isString(1)
|
|
14
|
+
* // => false
|
|
15
|
+
*/
|
|
16
|
+
export declare function isString(value: any): value is string;
|
|
17
|
+
export default isString;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a slice of `array` from `start` up to, but not including, `end`.
|
|
3
|
+
*
|
|
4
|
+
* **Note:** This method is used instead of
|
|
5
|
+
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
|
|
6
|
+
* returned.
|
|
7
|
+
*
|
|
8
|
+
* @since 3.0.0
|
|
9
|
+
* @category Array
|
|
10
|
+
* @param {Array} array The array to slice.
|
|
11
|
+
* @param {number} [start=0] The start position. A negative index will be treated as an offset from the end.
|
|
12
|
+
* @param {number} [end=array.length] The end position. A negative index will be treated as an offset from the end.
|
|
13
|
+
* @returns {Array} Returns the slice of `array`.
|
|
14
|
+
* @example
|
|
15
|
+
*
|
|
16
|
+
* var array = [1, 2, 3, 4]
|
|
17
|
+
*
|
|
18
|
+
* _.slice(array, 2)
|
|
19
|
+
* // => [3, 4]
|
|
20
|
+
*/
|
|
21
|
+
declare function slice(array: any[], start: number, end: number): any[];
|
|
22
|
+
export default slice;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts `string` to
|
|
3
|
+
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
|
|
4
|
+
*
|
|
5
|
+
* @since 3.1.0
|
|
6
|
+
* @category String
|
|
7
|
+
* @param {string} [string=''] The string to convert.
|
|
8
|
+
* @returns {string} Returns the start cased string.
|
|
9
|
+
* @see camelCase, lowerCase, kebabCase, snakeCase, upperCase, upperFirst
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* startCase('--foo-bar--')
|
|
13
|
+
* // => 'Foo Bar'
|
|
14
|
+
*
|
|
15
|
+
* startCase('fooBar')
|
|
16
|
+
* // => 'Foo Bar'
|
|
17
|
+
*
|
|
18
|
+
* startCase('__FOO_BAR__')
|
|
19
|
+
* // => 'FOO BAR'
|
|
20
|
+
*/
|
|
21
|
+
declare const startCase: (string: string) => any;
|
|
22
|
+
export default startCase;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Splits `string` into an array of its words.
|
|
3
|
+
*
|
|
4
|
+
* @since 3.0.0
|
|
5
|
+
* @category String
|
|
6
|
+
* @param {string} [string=''] The string to inspect.
|
|
7
|
+
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
8
|
+
* @returns {Array} Returns the words of `string`.
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* words('fred, barney, & pebbles')
|
|
12
|
+
* // => ['fred', 'barney', 'pebbles']
|
|
13
|
+
*
|
|
14
|
+
* words('fred, barney, & pebbles', /[^, ]+/g)
|
|
15
|
+
* // => ['fred', 'barney', '&', 'pebbles']
|
|
16
|
+
*/
|
|
17
|
+
declare function words(string: string, pattern: any): any;
|
|
18
|
+
export default words;
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vev/silke",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"main": "
|
|
6
|
-
"types": "
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/silke/src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "yarn start:docs",
|
|
9
9
|
"start:docs": "cross-env TS_NODE_PROJECT=\"../../tsconfig.webpack.json\" webpack serve --env development --config ./webpack.docs.ts",
|
|
10
|
-
"build": "run-p tsc build:code",
|
|
10
|
+
"build": "yarn clean && run-p tsc build:code",
|
|
11
11
|
"build:code": "node ./esbuild.config.mjs",
|
|
12
12
|
"build:types": "tsc --project tsconfig.types.json",
|
|
13
13
|
"build:docs": "yarn clean && cross-env TS_NODE_PROJECT=\"../../tsconfig.webpack.json\" webpack --env production --config ./webpack.docs.ts",
|
|
14
14
|
"watch": "run-p watch:tsc watch:code",
|
|
15
15
|
"watch:code": "node esbuild.config.mjs --watch",
|
|
16
|
-
"watch:tsc": "tsc --project ./tsconfig.json --
|
|
16
|
+
"watch:tsc": "tsc --project ./tsconfig.json --emitDeclarationOnly --watch",
|
|
17
17
|
"clean": "del-cli dist",
|
|
18
|
-
"tsc": "tsc --project ./tsconfig.json --
|
|
18
|
+
"tsc": "tsc --project ./tsconfig.json --emitDeclarationOnly --outDir ./dist"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.0.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
|
33
33
|
"@uiw/codemirror-theme-dracula": "^4.12.3",
|
|
34
34
|
"@uiw/react-codemirror": "^4.12.3",
|
|
35
|
-
"@vev/react": "0.1.
|
|
35
|
+
"@vev/react": "0.1.3",
|
|
36
36
|
"@vev/utils": "1.2.0",
|
|
37
37
|
"classnames": ">=2.2.0",
|
|
38
38
|
"flux": "^4.0.4",
|
package/src/components/index.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './silke-checkbox';
|
|
|
46
46
|
export * from './silke-color-picker';
|
|
47
47
|
export * from './silke-css-number-field';
|
|
48
48
|
export * from './silke-form';
|
|
49
|
+
export * from './silke-gradient-picker';
|
|
49
50
|
export * from './silke-icon-picker';
|
|
50
51
|
export * from './silke-object-field';
|
|
51
52
|
export * from './silke-radio-button';
|
|
@@ -534,7 +534,10 @@ export function SilkeAutocompleteField<T>(props: SilkeAutocompleteFieldProps<T>)
|
|
|
534
534
|
<SilkeIcon icon={selectedIcon} />
|
|
535
535
|
</SilkeBox>
|
|
536
536
|
)}
|
|
537
|
-
{selectedLabel &&
|
|
537
|
+
{selectedLabel && size === 'xs' && (
|
|
538
|
+
<SilkeTextSmall overflow>{selectedLabel}</SilkeTextSmall>
|
|
539
|
+
)}
|
|
540
|
+
{selectedLabel && size !== 'xs' && <SilkeText overflow>{selectedLabel}</SilkeText>}
|
|
538
541
|
{placeholder && !selectedLabel && (
|
|
539
542
|
<SilkeText overflow className={styles.placeholder}>
|
|
540
543
|
{placeholder}
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { BoxDivProps, BoxSpace, SilkeBox } from '../silke-box';
|
|
2
|
-
import { SilkeSkeleton } from '../silke-skeleton';
|
|
3
1
|
import React from 'react';
|
|
2
|
+
import { BoxDivProps, SilkeBox } from '../silke-box';
|
|
3
|
+
import { SilkeSkeleton } from '../silke-skeleton';
|
|
4
4
|
import styles from './silke-card.scss';
|
|
5
|
+
import { SilkeCard } from './silke-card';
|
|
6
|
+
import { SilkeText } from '../silke-text';
|
|
5
7
|
|
|
6
8
|
type SilkeCardGridProps = {
|
|
7
9
|
children: React.ReactNode;
|
|
8
|
-
|
|
10
|
+
small?: boolean;
|
|
9
11
|
loading?: boolean;
|
|
10
|
-
maxColumns?: number;
|
|
11
|
-
space?: BoxSpace;
|
|
12
12
|
} & Omit<BoxDivProps, 'tag' | 'gap' | 'size'>;
|
|
13
13
|
|
|
14
14
|
export function SilkeCardGrid({
|
|
15
15
|
loading,
|
|
16
16
|
children,
|
|
17
|
-
|
|
17
|
+
small,
|
|
18
18
|
className,
|
|
19
19
|
style = {},
|
|
20
|
-
maxColumns,
|
|
21
|
-
space = 'm',
|
|
22
20
|
...rest
|
|
23
21
|
}: SilkeCardGridProps) {
|
|
24
|
-
|
|
25
|
-
if (className) cl
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
if (maxColumns) style = { ...style, ['--max-columns' as any]: maxColumns };
|
|
22
|
+
let cl = styles.grid;
|
|
23
|
+
if (className) cl += ' ' + className;
|
|
24
|
+
if (small) cl += ' ' + styles.small;
|
|
29
25
|
|
|
30
26
|
return (
|
|
31
|
-
<SilkeBox wrap className={cl
|
|
27
|
+
<SilkeBox wrap className={cl} {...rest} style={style}>
|
|
32
28
|
{loading ? [1, 2, 3].map((key) => <SilkeSkeletonCard key={key} />) : children}
|
|
33
29
|
</SilkeBox>
|
|
34
30
|
);
|
|
35
31
|
}
|
|
36
32
|
|
|
37
33
|
export function SilkeSkeletonCard() {
|
|
38
|
-
return
|
|
34
|
+
return (
|
|
35
|
+
<SilkeBox column gap="s" className={styles.card}>
|
|
36
|
+
<SilkeBox className={styles.imageWrapper} overflow="hidden" column bg="surface-2">
|
|
37
|
+
<div className={styles.img} />
|
|
38
|
+
</SilkeBox>
|
|
39
|
+
<SilkeBox rounded="tiny" gap="m" column flex bg="surface-2" height="s" />
|
|
40
|
+
</SilkeBox>
|
|
41
|
+
);
|
|
39
42
|
}
|
|
@@ -1,46 +1,85 @@
|
|
|
1
1
|
## Card with everything
|
|
2
2
|
|
|
3
3
|
```js
|
|
4
|
+
const [checked, setChecked] = React.useState(1);
|
|
4
5
|
<SilkeCardGrid>
|
|
5
6
|
{ipsum.list(5, (key) => (
|
|
6
7
|
<SilkeCard
|
|
7
8
|
key={key}
|
|
9
|
+
colorBackdrop={key % 3 === 0 ? "neutral-5" : true}
|
|
8
10
|
title={ipsum.name()}
|
|
9
11
|
subTitle={ipsum.name(5)}
|
|
10
|
-
text={ipsum.text()}
|
|
11
12
|
image={ipsum.image()}
|
|
13
|
+
checked={checked === key}
|
|
14
|
+
onCheck={(doCheck) => setChecked(doCheck ? key : -1)}
|
|
15
|
+
tags={[
|
|
16
|
+
{ label: "This is a tag" },
|
|
17
|
+
{ label: "This is a tag with a veeeeeeeery long label" },
|
|
18
|
+
{ label: "This is a tag with a veeeeeeeery long label" },
|
|
19
|
+
]}
|
|
20
|
+
tagsTop={
|
|
21
|
+
key % 3 === 0
|
|
22
|
+
? [{ label: "Template", size: "tiny" }]
|
|
23
|
+
: key % 2 === 0
|
|
24
|
+
? [{ icon: "project-plan", color: "yellow", kind: "primary" }]
|
|
25
|
+
: []
|
|
26
|
+
}
|
|
27
|
+
menu={[{ label: "Item 1" }, { label: "Item 2" }]}
|
|
28
|
+
/>
|
|
29
|
+
))}
|
|
30
|
+
</SilkeCardGrid>;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Card with multiple images
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
<SilkeCardGrid>
|
|
37
|
+
{ipsum.list(5, (key) => (
|
|
38
|
+
<SilkeCard
|
|
39
|
+
key={key}
|
|
40
|
+
title={ipsum.name()}
|
|
41
|
+
subTitle={ipsum.name(5)}
|
|
42
|
+
image={[
|
|
43
|
+
ipsum.image(),
|
|
44
|
+
ipsum.image(),
|
|
45
|
+
ipsum.image(),
|
|
46
|
+
ipsum.image(),
|
|
47
|
+
ipsum.image(),
|
|
48
|
+
ipsum.image(),
|
|
49
|
+
]}
|
|
12
50
|
menu={[{ label: "Item 1" }, { label: "Item 2" }]}
|
|
13
|
-
|
|
14
|
-
<SilkeButtonSet>
|
|
15
|
-
<SilkeButton flex label="Button 1" />
|
|
16
|
-
<SilkeButton flex label="Button 2" />
|
|
17
|
-
</SilkeButtonSet>
|
|
18
|
-
</SilkeCard>
|
|
51
|
+
/>
|
|
19
52
|
))}
|
|
20
53
|
</SilkeCardGrid>
|
|
21
54
|
```
|
|
22
55
|
|
|
23
|
-
##
|
|
56
|
+
## Small cards
|
|
24
57
|
|
|
25
58
|
```js
|
|
26
|
-
const [
|
|
59
|
+
const [checked, setChecked] = React.useState(0);
|
|
27
60
|
|
|
28
|
-
<SilkeCardGrid>
|
|
61
|
+
<SilkeCardGrid small>
|
|
29
62
|
{ipsum.list(5, (key) => (
|
|
30
63
|
<SilkeCard
|
|
31
64
|
key={key}
|
|
32
|
-
selected={key == selected}
|
|
33
65
|
title={ipsum.name()}
|
|
34
66
|
subTitle={ipsum.name(5)}
|
|
35
|
-
text={ipsum.text()}
|
|
36
67
|
image={ipsum.image()}
|
|
37
|
-
|
|
68
|
+
checked={checked === key}
|
|
69
|
+
tagsTop={
|
|
70
|
+
key % 3 === 0
|
|
71
|
+
? [{ icon: "tooltip", kind: "primary" }]
|
|
72
|
+
: key % 2 === 0
|
|
73
|
+
? [{ icon: "project-plan", color: "yellow", kind: "primary" }]
|
|
74
|
+
: []
|
|
75
|
+
}
|
|
76
|
+
onCheck={(doCheck) => setChecked(doCheck ? key : -1)}
|
|
38
77
|
/>
|
|
39
78
|
))}
|
|
40
79
|
</SilkeCardGrid>;
|
|
41
80
|
```
|
|
42
81
|
|
|
43
|
-
## Card
|
|
82
|
+
## Card with text
|
|
44
83
|
|
|
45
84
|
```js
|
|
46
85
|
<SilkeCardGrid>
|
|
@@ -49,16 +88,10 @@ const [selected, setSelected] = React.useState(1);
|
|
|
49
88
|
key={key}
|
|
50
89
|
title={ipsum.name(10)}
|
|
51
90
|
subTitle={ipsum.name(5)}
|
|
91
|
+
image={ipsum.image()}
|
|
92
|
+
text={ipsum.text()}
|
|
52
93
|
onClick={() => console.log("Focused")}
|
|
53
|
-
|
|
54
|
-
<SilkeButton label="Can add more content" />
|
|
55
|
-
{key > 2 && (
|
|
56
|
-
<SilkeButtonSet>
|
|
57
|
-
<SilkeButton label="Button 1" />
|
|
58
|
-
<SilkeButton label="Button 2" />
|
|
59
|
-
</SilkeButtonSet>
|
|
60
|
-
)}
|
|
61
|
-
</SilkeCard>
|
|
94
|
+
/>
|
|
62
95
|
))}
|
|
63
96
|
</SilkeCardGrid>
|
|
64
97
|
```
|
|
@@ -1,152 +1,187 @@
|
|
|
1
|
-
@use "../../variables" as *;
|
|
2
|
-
|
|
3
1
|
$card-width: 256px;
|
|
4
2
|
$focus-border-width: 2px;
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
--card-border-radius: var(--border-radius-medium);
|
|
8
|
-
--card-border-radius-image: var(--card-border-radius) var(--card-border-radius) 0 0;
|
|
9
|
-
--card-size: #{$card-width};
|
|
10
|
-
--card-background: rgba(255, 255, 255, 0.082);
|
|
11
|
-
--card-background-hover: rgba(255, 255, 255, 0.072);
|
|
12
|
-
--card-background-selected: rgba(255, 255, 255, 0.15);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.small {
|
|
16
|
-
--card-size: 188px;
|
|
17
|
-
--card-border-radius: var(--border-radius-medium);
|
|
18
|
-
}
|
|
4
|
+
$transition-duration: 0.4s;
|
|
19
5
|
|
|
20
|
-
|
|
21
|
-
--card-
|
|
22
|
-
--card-
|
|
23
|
-
--card-background-selected: var(--color-neutral-30);
|
|
24
|
-
--card-border-radius-image: var(--card-border-radius);
|
|
25
|
-
padding: $space-s;
|
|
6
|
+
body {
|
|
7
|
+
--silke-card-border-radius: 8px;
|
|
8
|
+
--silke-card-aspect-ratio: 16/10;
|
|
26
9
|
}
|
|
27
10
|
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(
|
|
37
|
-
|
|
11
|
+
.card {
|
|
12
|
+
width: 100%;
|
|
13
|
+
color: var(--color-neutral-100);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
|
|
16
|
+
&.colorBackdrop {
|
|
17
|
+
.img {
|
|
18
|
+
height: calc(100% - #{(24px + 16px) * 2 - 24px});
|
|
19
|
+
max-width: calc(100% - #{(24px + 16px) * 2 - 24px});
|
|
20
|
+
width: auto;
|
|
21
|
+
aspect-ratio: 16/9;
|
|
22
|
+
scale: 1;
|
|
23
|
+
border-radius: var(--border-radius-tiny);
|
|
24
|
+
}
|
|
38
25
|
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
&:hover,
|
|
27
|
+
&:focus-visible {
|
|
28
|
+
&.hasTags {
|
|
29
|
+
.img {
|
|
30
|
+
scale: 0.97;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.img {
|
|
34
|
+
translate: 0 -5px;
|
|
35
|
+
background: var(--bgHover);
|
|
36
|
+
&.shadow {
|
|
37
|
+
filter: drop-shadow(0 0 80px rgba(0, 0, 0, 0.7));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
&:hover,
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
.tags,
|
|
46
|
+
.checkbox,
|
|
47
|
+
.overflowMenu {
|
|
48
|
+
translate: 0 0;
|
|
49
|
+
opacity: 1;
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
|
-
}
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
font-size: 36px;
|
|
56
|
-
filter: drop-shadow(
|
|
57
|
-
1px 1px 3px
|
|
58
|
-
rgba(var(--color-neutral-0-rgb), var(--opacity-level-medium))
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.skeleton {
|
|
63
|
-
height: var(--card-size);
|
|
64
|
-
overflow:hidden;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.card {
|
|
68
|
-
background: var(--card-background);
|
|
69
|
-
border-radius: var(--card-border-radius);
|
|
70
|
-
|
|
71
|
-
position: relative;
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-direction: column;
|
|
74
|
-
backface-visibility: hidden;
|
|
75
|
-
|
|
76
|
-
&:not(.secondary){
|
|
53
|
+
&.selected {
|
|
54
|
+
.imageWrapper {
|
|
55
|
+
outline: 1px solid var(--color-accent-30);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
77
58
|
|
|
59
|
+
&.checked {
|
|
60
|
+
.checkbox {
|
|
61
|
+
translate: 0 0;
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
|
78
64
|
}
|
|
79
65
|
|
|
80
66
|
&:focus-visible {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
position: absolute;
|
|
86
|
-
top: 0;
|
|
87
|
-
bottom: 0;
|
|
88
|
-
left: 0;
|
|
89
|
-
right: 0;
|
|
90
|
-
z-index: 1;
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
border-radius: var(--card-border-radius);
|
|
67
|
+
outline: none;
|
|
68
|
+
border: none;
|
|
69
|
+
.imageWrapper {
|
|
70
|
+
outline: 1px solid var(--color-neutral-50);
|
|
93
71
|
}
|
|
94
72
|
}
|
|
95
73
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
74
|
+
.ribbon {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 8px;
|
|
77
|
+
left: 8px;
|
|
99
78
|
}
|
|
100
79
|
|
|
101
|
-
|
|
102
|
-
|
|
80
|
+
.img {
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 100%;
|
|
83
|
+
object-fit: cover;
|
|
84
|
+
scale: 1;
|
|
85
|
+
transform-origin: center center;
|
|
86
|
+
transition: $transition-duration scale ease-out, 3s filter ease-out,
|
|
87
|
+
$transition-duration translate ease-out;
|
|
88
|
+
&.shadow {
|
|
89
|
+
filter: drop-shadow(0 0 50px rgba(0, 0, 0, 0.3));
|
|
90
|
+
}
|
|
103
91
|
}
|
|
104
92
|
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
.imageWrapper {
|
|
94
|
+
aspect-ratio: var(--silke-card-aspect-ratio);
|
|
95
|
+
border-radius: var(--silke-card-border-radius);
|
|
96
|
+
}
|
|
97
|
+
.overflowMenu,
|
|
98
|
+
.checkbox,
|
|
99
|
+
.tags {
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transition: $transition-duration all ease-out;
|
|
107
102
|
}
|
|
108
103
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
.
|
|
114
|
-
opacity: 1;
|
|
115
|
-
pointer-events: all;
|
|
116
|
-
}
|
|
104
|
+
.checkbox {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 8px;
|
|
107
|
+
left: 8px;
|
|
108
|
+
background: rgba(var(--color-neutral-10-rgb), 0.2);
|
|
117
109
|
}
|
|
118
110
|
|
|
119
111
|
.tags {
|
|
112
|
+
translate: 0 10px;
|
|
113
|
+
position: absolute;
|
|
114
|
+
bottom: 8px;
|
|
115
|
+
left: 8px;
|
|
116
|
+
right: 8px;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.tagsTop {
|
|
120
121
|
position: absolute;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
right: $space-m;
|
|
122
|
+
top: 8px;
|
|
123
|
+
right: 8px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
.grid {
|
|
128
|
+
--max-columns: 10;
|
|
129
|
+
--grid-gap: 24px;
|
|
130
|
+
--min-card-width: 240px;
|
|
131
|
+
|
|
132
|
+
display: grid !important;
|
|
133
|
+
gap: var(--grid-gap);
|
|
134
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--min-card-width), 1fr));
|
|
135
|
+
grid-template-rows: max-content;
|
|
136
|
+
max-width: calc(
|
|
137
|
+
var(--card-size) * var(--max-columns) + var(--grid-gap) *
|
|
138
|
+
(var(--max-columns) - 1)
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
&.small {
|
|
142
|
+
--silke-card-border-radius: 4px;
|
|
143
|
+
--min-card-width: 108px;
|
|
144
|
+
--grid-gap: 16px;
|
|
145
|
+
--silke-card-aspect-ratio: 4/3;
|
|
146
|
+
.cardText {
|
|
147
|
+
font-size: 12px;
|
|
148
|
+
line-height: 1;
|
|
149
|
+
}
|
|
134
150
|
}
|
|
151
|
+
}
|
|
135
152
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
.folderGrid {
|
|
154
|
+
width: 100%;
|
|
155
|
+
flex: 1;
|
|
156
|
+
display: grid;
|
|
157
|
+
grid-template-columns: repeat(3, 1fr);
|
|
158
|
+
grid-template-rows: repeat(2, 1fr);
|
|
159
|
+
gap: 8px;
|
|
160
|
+
background: var(--color-surface-3);
|
|
161
|
+
border-radius: 0 8px 8px 8px;
|
|
162
|
+
padding: 16px;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.folderTab {
|
|
167
|
+
width: 36%;
|
|
168
|
+
aspect-ratio: 93/16;
|
|
169
|
+
path {
|
|
170
|
+
fill: var(--color-surface-3);
|
|
171
|
+
}
|
|
172
|
+
&::before {
|
|
173
|
+
content: "";
|
|
144
174
|
position: absolute;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
);
|
|
175
|
+
top: 0;
|
|
176
|
+
right: 0;
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 16px;
|
|
179
|
+
background: var(--color-surface-3);
|
|
151
180
|
}
|
|
152
181
|
}
|
|
182
|
+
|
|
183
|
+
.folder {
|
|
184
|
+
width: 100%;
|
|
185
|
+
height: 100%;
|
|
186
|
+
padding: 12% 16%;
|
|
187
|
+
}
|