This repository was archived by the owner on Oct 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +410
-282
lines changed Expand file tree Collapse file tree 7 files changed +410
-282
lines changed Original file line number Diff line number Diff line change 1
- 14.17.3
1
+ 16.13.1
Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
7
7
## [ Unreleased]
8
8
9
+ ## [ 2.0.0] - 2021-12-27
10
+
11
+ ### Chore
12
+
13
+ - ** Breaking** Upgrading Stimulus to ` 3.x ` and change namespace from ` stimulus ` to ` @hotwired/stimulus ` .
14
+ - Upgrading dependencies
15
+ - Upgrading Node to 16.13.1.
16
+
17
+
9
18
## [ 1.0.0] - 2021-07-14
10
19
11
20
### Added
Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 " />
5
- < meta
6
- name ="description "
7
- content ="A Stimulus controller for showing notifications. "
8
- />
5
+ < meta name ="description " content ="A Stimulus controller for showing notifications. " />
9
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
10
7
< link href ="https://unpkg.com/tailwindcss@^2.0/dist/tailwind.min.css " rel ="stylesheet " />
11
8
12
9
< title > Stimulus Notification</ title >
13
10
14
11
< script type ="module " defer >
15
- import { Application } from 'stimulus'
12
+ import { Application } from '@hotwired/ stimulus'
16
13
import Notification from './src/index'
17
14
18
15
const application = Application . start ( )
Original file line number Diff line number Diff line change 29
29
"np" : " np --no-2fa --no-tests"
30
30
},
31
31
"dependencies" : {
32
- "stimulus-use" : " ^0.25.3 "
32
+ "stimulus-use" : " ^0.50.0-2 "
33
33
},
34
34
"devDependencies" : {
35
- "@babel/core" : " ^7.14.0" ,
36
- "@babel/preset-typescript" : " ^7.13.0" ,
37
- "np" : " ^7.5.0" ,
35
+ "@babel/core" : " ^7.16.5" ,
36
+ "@babel/preset-typescript" : " ^7.16.5" ,
37
+ "@hotwired/stimulus" : " ^3.0.1" ,
38
+ "np" : " ^7.6.0" ,
38
39
"prettier-standard" : " 16.4.1" ,
39
- "stimulus" : " ^2.0.0" ,
40
- "typescript" : " ^4.2.4" ,
41
- "vite" : " ^2.2.4"
40
+ "typescript" : " ^4.5.4" ,
41
+ "vite" : " ^2.7.7"
42
42
},
43
43
"peerDependencies" : {
44
- "stimulus" : " ^2 .0.0 "
44
+ "@hotwired/ stimulus" : " ^3 .0.1 "
45
45
}
46
46
}
Original file line number Diff line number Diff line change 1
- import { Controller } from 'stimulus'
2
- import { useTransition } from 'stimulus-use/dist/use-transition '
1
+ import { Controller } from '@hotwired/ stimulus'
2
+ import { useTransition } from 'stimulus-use'
3
3
4
4
export default class extends Controller {
5
5
timeout : number
6
6
enter : ( event ?: Event ) => void
7
7
leave : ( event ?: Event ) => void
8
8
transitioned : false
9
- delayValue : false
9
+ delayValue : number
10
10
11
11
static values = {
12
- delay : Number
12
+ delay : {
13
+ type : Number ,
14
+ default : 3000
15
+ }
13
16
}
14
17
15
18
initialize ( ) {
@@ -21,7 +24,7 @@ export default class extends Controller {
21
24
22
25
this . enter ( )
23
26
24
- this . timeout = setTimeout ( this . hide , this . delayValue || 3000 )
27
+ this . timeout = setTimeout ( this . hide , this . delayValue )
25
28
}
26
29
27
30
async hide ( ) {
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ module.exports = {
7
7
name : 'stimulus-notification'
8
8
} ,
9
9
rollupOptions : {
10
- external : [ 'stimulus-use/dist/use-transition ' , 'stimulus' ] ,
10
+ external : [ 'stimulus-use' , '@hotwired/ stimulus' ] ,
11
11
output : {
12
12
globals : {
13
- stimulus : 'Stimulus' ,
14
- 'stimulus-use/dist/use-transition ' : 'useTransition'
13
+ '@hotwired/ stimulus' : 'Stimulus' ,
14
+ 'stimulus-use' : 'useTransition'
15
15
}
16
16
}
17
17
}
You can’t perform that action at this time.
0 commit comments