This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +105
-23
lines changed
Expand file tree Collapse file tree 10 files changed +105
-23
lines changed Original file line number Diff line number Diff line change 5353 "vue" : " ^2.6.10"
5454 },
5555 "devDependencies" : {
56+ "@fortawesome/fontawesome-common-types" : " ^0.2.36" ,
5657 "rimraf" : " ^3.0.2"
5758 },
5859 "keywords" : [
Original file line number Diff line number Diff line change 1+ interface ChakraToastOptions {
2+ position ?: 'bottom' | 'top' | 'right' | 'left'
3+ duration ?: number
4+ render ?: ( options : { onClose ?: VoidFunction , id : any } ) => any
5+ title ?: string
6+ description ?: string
7+ status ?: 'info' | 'warning' | 'success' | 'error'
8+ variant ?: 'solid' | 'subtle' | 'top-accent' | 'left-accent'
9+ isClosable ?: boolean
10+ }
11+
12+ function useToast ( ) : ( options : ChakraToastOptions ) => void
13+
14+ export default useToast
Original file line number Diff line number Diff line change 1+ import CToast from './CToast'
2+ export default CToast
Original file line number Diff line number Diff line change 11import { PluginObject } from "vue"
2+ import { IconPack } from "@fortawesome/fontawesome-common-types"
3+ import { Theme } from "../../chakra-ui-theme/types"
24
3- export type Theme = {
4- breakpoints : any
5- zIndices : any
6- radii : any
7- opacity : any
8- borders : any
9- colors : any
10- borderWidths : any
11- sizes : any
12- shadows : any
13- space : any
14- fontSizes : any
15- fonts : any
16- fontWeights : any
17- lineHeights : any
18- letterSpacings : any
5+ export type Icon = {
6+ path : string
7+ viewBox ?: string
8+ attrs ?: any
199}
2010
2111export type Options = {
2212 theme : Theme
2313 extendTheme : Theme
2414 icons : {
25- extend : any
15+ extend : { [ name : string ] : Icon }
2616 iconPack : string
27- iconSet : any
17+ iconSet : IconPack
2818 }
2919}
3020
31- export type Chakra = PluginObject < Options >
21+ export type ChakraPlugin = PluginObject < Options >
3222
33- declare let chakra : Chakra
34- export default chakra
23+ declare let chakra : ChakraPlugin
24+ export default chakra
Original file line number Diff line number Diff line change 1- import Chakra from "./chakra"
1+ import Chakra , { Icon } from "./chakra"
2+ import { Theme } from "../../chakra-ui-theme/types"
3+ import useToast from "../src/CToast"
4+
5+ declare module 'vue/types/vue' {
6+ interface Vue {
7+ $toast : ReturnType < typeof useToast >
8+ $chakra : {
9+ theme : Theme
10+ icons : { [ name : string ] : Icon }
11+ }
12+ }
13+ }
214
315export * from './component'
4- export default Chakra
16+ export default Chakra
Original file line number Diff line number Diff line change 1111 ],
1212 "files" : [" lib" ],
1313 "main" : " lib/module.js" ,
14+ "types" : " types/index.d.ts" ,
1415 "scripts" : {
1516 "dev" : " nuxt example/base" ,
1617 "lint" : " eslint --ext .js,.vue ." ,
Original file line number Diff line number Diff line change 1+ import Chakra , { Icon } from "./chakra"
2+ import { Theme } from "../../chakra-ui-theme/types"
3+ import useToast from "../src/CToast"
4+
5+ declare module '@nuxt/types' {
6+ interface Context {
7+ $toast ?: ReturnType < typeof useToast >
8+ $chakra : {
9+ theme : Theme
10+ icons : { [ name : string ] : Icon }
11+ }
12+ }
13+
14+ interface NuxtAppOptions {
15+ $toast ?: ReturnType < typeof useToast >
16+ $chakra : {
17+ theme : Theme
18+ icons : { [ name : string ] : Icon }
19+ }
20+ }
21+ }
22+
23+ declare module 'vue/types/vue' {
24+ interface Vue {
25+ $toast : ReturnType < typeof useToast >
26+ $chakra : {
27+ theme : Theme
28+ icons : { [ name : string ] : Icon }
29+ }
30+ }
31+ }
Original file line number Diff line number Diff line change 1717 "license" : " MIT" ,
1818 "main" : " dist/index.js" ,
1919 "module" : " src/index.js" ,
20+ "types" : " types/index.d.ts" ,
2021 "files" : [
2122 " dist" ,
2223 " src"
Original file line number Diff line number Diff line change 1+ export type Theme = {
2+ breakpoints : { [ key : string ] : string }
3+ zIndices : { [ key : string ] : string | number }
4+ radii : { [ key : string ] : string }
5+ opacity : { [ key : string ] : string }
6+ borders : { [ key : string ] : string }
7+ colors : { [ key : string ] : string | { [ opacity : string ] : string } }
8+ fonts : {
9+ heading : string
10+ body : string
11+ mono : string
12+ }
13+ fontSizes : { [ key : string ] : string }
14+ fontWeights : { [ key : string ] : number }
15+ letterSpacings : { [ key : string ] : string }
16+ lineHeights : { [ key : string ] : string }
17+ borderWidths : { [ key : string ] : string }
18+ shadows : { [ key : string ] : string }
19+ sizes : { [ key : string ] : string }
20+ space : { [ key : string ] : string }
21+ }
22+
23+ declare const theme : Theme
24+
25+ export default theme
Original file line number Diff line number Diff line change 30613061 unique-filename "^1.1.1"
30623062 which "^1.3.1"
30633063
3064+ "@fortawesome/fontawesome-common-types@^0.2.36":
3065+ version "0.2.36"
3066+ resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.36.tgz#b44e52db3b6b20523e0c57ef8c42d315532cb903"
3067+ integrity sha512-a/7BiSgobHAgBWeN7N0w+lAhInrGxksn13uK7231n2m8EDPE3BMCl9NZLTGrj9ZXfCmC6LM0QLqXidIizVQ6yg==
3068+
30643069"@gulp-sourcemaps/map-sources@1.X":
30653070 version "1.0.0"
30663071 resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
You can’t perform that action at this time.
0 commit comments