@startupjs-ui/div 0.1.10 → 0.1.12
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 +19 -0
- package/README.mdx +43 -20
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **span:** add animation and transition support ([d8336e2](https://github.com/startupjs/startupjs-ui/commit/d8336e259573e09c8302265b57bc993d04567e62))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.1.11](https://github.com/startupjs/startupjs-ui/compare/v0.1.10...v0.1.11) (2026-01-20)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @startupjs-ui/div
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.1.10](https://github.com/startupjs/startupjs-ui/compare/v0.1.9...v0.1.10) (2026-01-18)
|
|
7
26
|
|
|
8
27
|
|
package/README.mdx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react'
|
|
2
|
-
import { pug, u } from 'startupjs'
|
|
2
|
+
import { pug, u, styl } from 'startupjs'
|
|
3
3
|
import { Sandbox } from '@startupjs-ui/docs'
|
|
4
|
-
import { styl } from 'startupjs'
|
|
5
4
|
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'
|
|
6
5
|
import Div, { _PropsJsonSchema as DivPropsJsonSchema } from './index.tsx'
|
|
7
6
|
import Span from '@startupjs-ui/span'
|
|
@@ -194,28 +193,52 @@ Div automatically uses React Native Reanimated when a `transition` or `animation
|
|
|
194
193
|
**Note:** When using modifier classes to add transitions/animations dynamically, set `animation: none` in the base styles. This ensures Div uses the animated component from the start.
|
|
195
194
|
|
|
196
195
|
```jsx example
|
|
197
|
-
const [
|
|
198
|
-
const boxStyle = {
|
|
199
|
-
width: 50,
|
|
200
|
-
height: 50,
|
|
201
|
-
backgroundColor: isGreen ? 'green' : 'red',
|
|
202
|
-
transitionProperty: 'backgroundColor',
|
|
203
|
-
transitionDuration: 1000
|
|
204
|
-
}
|
|
205
|
-
const buttonStyle = {
|
|
206
|
-
paddingVertical: 8,
|
|
207
|
-
paddingHorizontal: 16,
|
|
208
|
-
backgroundColor: '#2962FF',
|
|
209
|
-
borderRadius: 4
|
|
210
|
-
}
|
|
196
|
+
const [isActive, setIsActive] = useState(false)
|
|
211
197
|
return (
|
|
212
|
-
<Div row align='left' vAlign='center' gap>
|
|
213
|
-
<Div
|
|
214
|
-
<Div
|
|
215
|
-
<Span style={{ color: 'white' }}>
|
|
198
|
+
<Div styleName='root' row align='left' vAlign='center' gap>
|
|
199
|
+
<Div styleName={['box', { isActive }]} />
|
|
200
|
+
<Div styleName='button' onPress={() => setIsActive(!isActive)}>
|
|
201
|
+
<Span style={{ color: 'white' }}>Activate</Span>
|
|
216
202
|
</Div>
|
|
217
203
|
</Div>
|
|
218
204
|
)
|
|
205
|
+
styl`
|
|
206
|
+
.box
|
|
207
|
+
width 50px
|
|
208
|
+
height 50px
|
|
209
|
+
background-color red
|
|
210
|
+
border-color red
|
|
211
|
+
transition background-color 1s, border-width 1s, border-color 1s
|
|
212
|
+
animation none
|
|
213
|
+
&.isActive
|
|
214
|
+
border-width 10px
|
|
215
|
+
border-color lime
|
|
216
|
+
background-color green
|
|
217
|
+
animation shake 0.5s infinite, pulse 1s infinite, radius 1s forwards, shadow 1s infinite
|
|
218
|
+
.root
|
|
219
|
+
height 60px
|
|
220
|
+
.button
|
|
221
|
+
padding 8px 16px
|
|
222
|
+
background-color #2962FF
|
|
223
|
+
border-radius 4px
|
|
224
|
+
@keyframes shake
|
|
225
|
+
0%, 100%
|
|
226
|
+
transform translateX(0) translateY(0)
|
|
227
|
+
25%
|
|
228
|
+
transform translateX(-10px) translateY(-10px)
|
|
229
|
+
75%
|
|
230
|
+
transform translateX(10px) translateY(10px)
|
|
231
|
+
@keyframes pulse
|
|
232
|
+
50%
|
|
233
|
+
width 60px
|
|
234
|
+
height 60px
|
|
235
|
+
@keyframes radius
|
|
236
|
+
100%
|
|
237
|
+
border-radius 30px
|
|
238
|
+
@keyframes shadow
|
|
239
|
+
50%
|
|
240
|
+
box-shadow 0px 0px 10px rgba(green, 1)
|
|
241
|
+
`
|
|
219
242
|
```
|
|
220
243
|
|
|
221
244
|
## Sandbox
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/div",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"./useTooltip": "./useTooltip.tsx"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@startupjs-ui/abstract-popover": "^0.1.
|
|
16
|
-
"@startupjs-ui/core": "^0.1.
|
|
17
|
-
"@startupjs-ui/span": "^0.1.
|
|
15
|
+
"@startupjs-ui/abstract-popover": "^0.1.11",
|
|
16
|
+
"@startupjs-ui/core": "^0.1.11",
|
|
17
|
+
"@startupjs-ui/span": "^0.1.12"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"react": "*",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"react-native-reanimated": ">=4.0.0",
|
|
23
23
|
"startupjs": "*"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "c0b4606437077bb6d170e2c0b16b674801c304fe"
|
|
26
26
|
}
|