@impulse-ui-native/primitives 11.1.0 → 11.3.0
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/README.md +16 -0
- package/dist/types/button.types.d.mts +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -146,6 +146,10 @@ appearance, but does not inject label content.
|
|
|
146
146
|
|
|
147
147
|
Use `Badge` for compact states and metadata. It supports `filled`, `outlined`, and `soft` display variants and semantic tones. Its addons follow Input: use `PrefixIcon` or `Prefix`, `SuffixIcon` or `Suffix`, and optionally `onPressPrefix` or `onPressSuffix`. A custom component takes precedence over its corresponding icon. Use `Tag` when the whole label needs built-in press or close behavior.
|
|
148
148
|
|
|
149
|
+
Badges follow their parent's `alignItems` for cross-axis alignment. For example,
|
|
150
|
+
use `alignItems="center"` on a column to center badges horizontally. Use
|
|
151
|
+
`alignSelf` on a badge when it needs a different alignment from its siblings.
|
|
152
|
+
|
|
149
153
|
## Dedicated component packages
|
|
150
154
|
|
|
151
155
|
Card, List, Progress, and their prop types are exported from `@impulse-ui-native/card`, `@impulse-ui-native/list`, and `@impulse-ui-native/progress`, respectively. They remain available through `@impulse-ui-native/toolkit`. Migrate direct primitives imports to their owning packages.
|
|
@@ -164,3 +168,15 @@ to change `Typography.Code` globally; its default remains `monospace`.
|
|
|
164
168
|
In a column, fields stretch horizontally by default without growing vertically.
|
|
165
169
|
In a row, set `flex={1}` on each field to share the available width. If the
|
|
166
170
|
parent centers its children, use `alignSelf="stretch"` or an explicit `width`.
|
|
171
|
+
|
|
172
|
+
## Pressable layout
|
|
173
|
+
|
|
174
|
+
`Pressable` accepts flex and positioning props directly, alongside its existing
|
|
175
|
+
spacing, dimension, and shadow props. Native `style` objects or callbacks override
|
|
176
|
+
direct style props; `pressedStyle` applies last while pressed.
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
<Pressable flex={1} flexDirection="row" alignItems="center" gap={8} padding={16}>
|
|
180
|
+
<Typography.Master>Continue</Typography.Master>
|
|
181
|
+
</Pressable>
|
|
182
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PressableProps, ViewStyle, StyleProp } from 'react-native';
|
|
2
|
-
import { DimensionProps, SpacingProps, ShadowProps, ComponentSize, ActionVariant } from '@impulse-ui-native/theme';
|
|
2
|
+
import { DimensionProps, SpacingProps, ShadowProps, ComponentSize, ActionVariant, FlexProps } from '@impulse-ui-native/theme';
|
|
3
3
|
|
|
4
4
|
interface ButtonProps extends PressableProps, DimensionProps, SpacingProps, ShadowProps {
|
|
5
5
|
size?: ComponentSize;
|
|
@@ -14,7 +14,7 @@ interface ButtonThemeProps {
|
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
loading: boolean;
|
|
16
16
|
}
|
|
17
|
-
interface PressableCoreProps extends PressableProps, Omit<ButtonProps, "style"
|
|
17
|
+
interface PressableCoreProps extends PressableProps, Omit<ButtonProps, "style">, FlexProps {
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
pressedStyle?: StyleProp<ViewStyle>;
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impulse-ui-native/primitives",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"description": "Foundational UI primitives for building ImpulseUI Native components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
],
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@impulse-ui-native/theme": "11.
|
|
32
|
-
"@impulse-ui-native/icon": "11.
|
|
33
|
-
"@impulse-ui-native/core": "11.
|
|
31
|
+
"@impulse-ui-native/theme": "11.3.0",
|
|
32
|
+
"@impulse-ui-native/icon": "11.3.0",
|
|
33
|
+
"@impulse-ui-native/core": "11.3.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@impulse-ui-native/eslint-config": "1.0.0",
|