@ufoui/core 0.0.126 → 0.0.136

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.
@@ -40,8 +40,6 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
40
40
  borderColor?: BorderColor;
41
41
  /** React children inside the box. */
42
42
  children?: ReactNode;
43
- /** Layout direction shortcut. Same as `direction="col"`. */
44
- col?: boolean;
45
43
  /** Surface background token. Default: `'surface'`. */
46
44
  color?: BaseColor;
47
45
  /** Grid template columns (`3` → `repeat(3, 1fr)`). */
@@ -71,11 +69,19 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
71
69
  /** Enables flex-grow (fills remaining space). */
72
70
  grow?: boolean;
73
71
  /** Height. */
74
- h?: number | string;
72
+ height?: number | string;
75
73
  /** Renders as `inline-flex`, `inline-grid` or `inline-block`. */
76
74
  inline?: boolean;
77
75
  /** Maps to `justify-content` (main-axis alignment). */
78
76
  justifyContent?: CSSProperties['justifyContent'];
77
+ /** Maximum height. */
78
+ maxHeight?: number | string;
79
+ /** Maximum width. */
80
+ maxWidth?: number | string;
81
+ /** Minimum height. */
82
+ minHeight?: number | string;
83
+ /** Minimum width. */
84
+ minWidth?: number | string;
79
85
  /** Padding (all sides). */
80
86
  p?: number | string;
81
87
  /** Padding bottom. */
@@ -92,8 +98,6 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
92
98
  px?: number | string;
93
99
  /** Vertical padding (`padding-top` + `padding-bottom`). */
94
100
  py?: number | string;
95
- /** Layout direction shortcut. Same as `direction="row"`. */
96
- row?: boolean;
97
101
  /** Grid template rows (`2` → `repeat(2, 1fr)`). */
98
102
  rows?: number | string;
99
103
  /** Shape/border-radius token (round, rounded, smooth, square). */
@@ -101,7 +105,7 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
101
105
  /** Layout mode (`flex`, `grid`, `block`). Default: `flex`. */
102
106
  type?: BoxType;
103
107
  /** Width. */
104
- w?: number | string;
108
+ width?: number | string;
105
109
  /** Enables wrapping (`flex-wrap: wrap`). */
106
110
  wrap?: boolean;
107
111
  }
@@ -1,15 +1,15 @@
1
1
  import { default as React, HTMLAttributes, ReactNode } from 'react';
2
- import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape } from '../../utils';
2
+ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, WrapperProps } from '../../utils';
3
3
  import { TextColor } from '../../types';
4
4
  /**
5
5
  * Props for {@link TextBase}.
6
6
  *
7
- * Defines typography and visual styling for text-level elements
8
- * without introducing layout behaviour.
7
+ * Defines typography and visual styling for text-level elements,
8
+ * plus outer placement (margin, positioning) via {@link WrapperProps}.
9
9
  *
10
10
  * @category Text
11
11
  */
12
- export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
12
+ export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>, WrapperProps {
13
13
  /** Custom HTML element/component. Default: span. */
14
14
  as?: React.ElementType;
15
15
  /** Border width (0–5). */
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base/boxBase';
7
7
  *
8
8
  * @category Div
9
9
  */
10
- export type DivProps = Omit<BoxBaseProps, 'type' | 'direction' | 'flow' | 'cols' | 'rows' | 'wrap'>;
10
+ export type DivProps = Omit<BoxBaseProps, 'type' | 'direction' | 'flow' | 'cols' | 'rows' | 'wrap' | 'gap' | 'gapX' | 'gapY' | 'justifyContent' | 'alignItems' | 'placeItems' | 'alignContent'>;
11
11
  /**
12
12
  * Generic block-level container.
13
13
  *
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base/boxBase';
7
7
  *
8
8
  * @category Flex
9
9
  */
10
- export type FlexProps = Omit<BoxBaseProps, 'elementClass' | 'type' | 'cols' | 'rows' | 'flow'>;
10
+ export type FlexProps = Omit<BoxBaseProps, 'elementClass' | 'type' | 'cols' | 'rows' | 'flow' | 'placeItems'>;
11
11
  /**
12
12
  * Flex layout container.
13
13
  *
@@ -9,3 +9,4 @@ export * from './header';
9
9
  export * from './main';
10
10
  export * from './nav';
11
11
  export * from './section';
12
+ export * from './stack';
@@ -0,0 +1,31 @@
1
+ import { FlexProps } from './flex';
2
+ /**
3
+ * Props for the {@link Stack} component.
4
+ *
5
+ * Extends {@link FlexProps} with the layout direction removed —
6
+ * a Stack is always a vertical column.
7
+ *
8
+ * @category Stack
9
+ */
10
+ export type StackProps = Omit<FlexProps, 'direction'>;
11
+ /**
12
+ * Vertical flex layout container.
13
+ *
14
+ * Renders a flexbox column — the equivalent of `<Flex direction="col">`,
15
+ * exposed as its own component because vertical stacking is the most common
16
+ * layout need. Use this component to stack children top-to-bottom; reach for
17
+ * {@link Flex} when you need a horizontal or configurable direction.
18
+ *
19
+ * Built on top of {@link BoxBase} with `type="flex"` and a locked column direction.
20
+ *
21
+ * @category Stack
22
+ * @function
23
+ * @param props - Vertical flex layout props inherited from {@link Flex}.
24
+ *
25
+ * @example
26
+ * <Stack gap={8}>
27
+ * <Header />
28
+ * <Content />
29
+ * </Stack>
30
+ */
31
+ export declare const Stack: import('react').ForwardRefExoticComponent<StackProps & import('react').RefAttributes<HTMLDivElement>>;