@startupjs-ui/div 0.1.11 → 0.1.13

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.mdx +43 -20
  3. package/package.json +3 -3
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.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/div
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.1.12](https://github.com/startupjs/startupjs-ui/compare/v0.1.11...v0.1.12) (2026-01-21)
15
+
16
+
17
+ ### Features
18
+
19
+ * **span:** add animation and transition support ([d8336e2](https://github.com/startupjs/startupjs-ui/commit/d8336e259573e09c8302265b57bc993d04567e62))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.1.11](https://github.com/startupjs/startupjs-ui/compare/v0.1.10...v0.1.11) (2026-01-20)
7
26
 
8
27
  **Note:** Version bump only for package @startupjs-ui/div
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 [isGreen, setIsGreen] = useState(false)
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 style={boxStyle} />
214
- <Div style={buttonStyle} onPress={() => setIsGreen(!isGreen)}>
215
- <Span style={{ color: 'white' }}>Toggle Color</Span>
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.11",
3
+ "version": "0.1.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "@startupjs-ui/abstract-popover": "^0.1.11",
16
16
  "@startupjs-ui/core": "^0.1.11",
17
- "@startupjs-ui/span": "^0.1.11"
17
+ "@startupjs-ui/span": "^0.1.13"
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": "b21659a9d8408cd921560196db22a18fd8eda82d"
25
+ "gitHead": "5cfdccf2bdae3873e968289a3e6b938fad02101a"
26
26
  }