0.0.72 • Published 4 months ago

mediacube-ui-v2 v0.0.72

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

mediacube-ui-v2 by Mediacube corp.

This template should help get you started developing with Vue 3 in Vite.

Installation

Using npm or yarn

yarn add mediacube-ui-v2
#or
npm install mediacube-ui-v2

Usage

Nuxt@3.X

//Nuxt plugin
import { defineNuxtPlugin } from '#app';
import MediacubeUi from 'mediacube-ui-v2'
import 'mediacube-ui-v2/style'

export default defineNuxtPlugin( (nuxtApp) => {
  nuxtApp.vueApp.use(MediacubeUi, {
    drawerComponents: {},
    modalComponents: {}
  })
})

Vue@3.X

import MediacubeUi from 'mediacube-ui-v2'
import 'mediacube-ui-v2/style'

app.use(MediacubeUi, {
  drawerComponents: {},
  modalComponents: {}
})

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking.

CSS example:

/**
 * @tokens Colors
 * @presenter Color
 */

:root {
  --n0: #fff; /* Token Description */
  --n100: #fbfbfb;
  --n200: #edeeef;
  --n300: #e4e5e7;
  --primary: var(--n300);
}

/**
 * @tokens Border Radius
 * @presenter BorderRadius
 */

:root {
  --border-radius-m: 4px;
  --border-radius-l: 8px;
}

SCSS example:

/**
 * @tokens Colors
 * @presenter Color
 */

$n0: #fff; /* Token Description */
$n100: #fbfbfb;
$n200: #edeeef;
$n300: #e4e5e7;
$primary: $n300;

/**
 * @tokens Border Radius
 * @presenter BorderRadius
 */

$border-radius-m: 4px;
$border-radius-l: 8px;

SVG example:

<svg
  data-token-name="check"
  width="24px"
  height="24px"
  viewBox="0 0 24 24"
  version="1.1"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
>
  <path
    d="M9.35221912,16.3536125 L19.5004166,5.34255149 C19.9029667,4.90884428 20.5808871,4.88358644 21.0145944,5.28613652 C21.4483016,5.6886866 21.4735594,6.36660707 21.0710093,6.80031428 L10.1375155,18.6574532 C9.71359736,19.1141823 8.99084087,19.1141823 8.56692275,18.6574532 L3.28613652,12.890538 C2.88358644,12.4568308 2.90884428,11.7789103 3.34255149,11.3763602 C3.77625869,10.9738101 4.45417917,10.999068 4.85672925,11.4327752 L9.35221912,16.3536125 Z"
    fill="currentColor"
  ></path>
</svg>

Make sure to specify the data-token-name attribute.

Variables

Variables used to build DS styles. Available for use in your project

For global use:

@use mediacube-ui-v2/variables as *;

For each component use tokens

//For example
<style lang="scss">
@use 'mediacube-ui-v2/tokens/colors' as colors;

.class-name {
  &__background {
    background: colors.$color-red;
  }
}
</style>

The following tokens are available:

  • animations
  • border-radius
  • box-shadows
  • colors
  • durations
  • easings
  • font-families
  • font-sizes
  • font-weights
  • gradients
  • letter-spacing
  • line-height
  • media-queries
  • opacities
  • sizes
  • spacings
  • z-indexes

For each component use style helpers

//For example
<style lang="scss">
@use 'mediacube-ui-v2/styles/mixins' as mixins;
@use 'mediacube-ui-v2/tokens/spacings' as spacings;

.class-name {
  &__inner {
    @include mixins.child-indent-bottom(spacings.$space-200);
  }
}
</style>

The following style files are available:

  • functions
  • mixins
  • spacing
  • toast

Storybook interface support

info image storybook interface

0.0.72

4 months ago

0.0.71

4 months ago

0.0.70

4 months ago

0.0.69

4 months ago

0.0.68

4 months ago

0.0.67

5 months ago

0.0.66

5 months ago

0.0.65

5 months ago

0.0.64

5 months ago

0.0.63

5 months ago

0.0.62

5 months ago

0.0.60

5 months ago

0.0.59

5 months ago

0.0.58

5 months ago

0.0.57

5 months ago

0.0.56

5 months ago

0.0.55

7 months ago

0.0.54

7 months ago

0.0.53

7 months ago

0.0.52

7 months ago

0.0.51

7 months ago

0.0.50

7 months ago

0.0.49

7 months ago

0.0.48

7 months ago

0.0.47

7 months ago

0.0.46

7 months ago

0.0.45

7 months ago

0.0.44

7 months ago

0.0.43

7 months ago

0.0.42

7 months ago

0.0.41

7 months ago

0.0.40

7 months ago

0.0.39

7 months ago

0.0.38

7 months ago

0.0.37

7 months ago

0.0.36

7 months ago

0.0.35

7 months ago

0.0.34

7 months ago

0.0.33

7 months ago

0.0.32

7 months ago

0.0.31

7 months ago

0.0.30

7 months ago

0.0.29

7 months ago

0.0.28

7 months ago

0.0.27

7 months ago

0.0.26

7 months ago

0.0.25

7 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.17

7 months ago

0.0.16

7 months ago

0.0.15

7 months ago

0.0.14

7 months ago

0.0.13

7 months ago

0.0.12

7 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago

0.0.0

7 months ago