@ttoss/ui 1.31.18 → 1.32.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/dist/esm/index.js CHANGED
@@ -412,4 +412,19 @@ var CloseButton = /*#__PURE__*/React9.forwardRef(({
412
412
  });
413
413
  });
414
414
  CloseButton.displayName = "CloseButton";
415
- export { Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, Label, Progress as LinearProgress, Link, Radio, Select, Slider, Spinner, Text, Textarea, ThemeProvider, useBreakpointIndex, useResponsiveValue, useTheme };
415
+
416
+ // src/components/Stack.tsx
417
+ import * as React10 from "react";
418
+ import { jsx as jsx13 } from "react/jsx-runtime";
419
+ var Stack = /*#__PURE__*/React10.forwardRef((props, ref) => {
420
+ return /* @__PURE__ */jsx13(Flex, {
421
+ ref,
422
+ ...props,
423
+ sx: {
424
+ flexDirection: "column",
425
+ ...props.sx
426
+ }
427
+ });
428
+ });
429
+ Stack.displayName = "Stack";
430
+ export { Badge, BaseStyles, Box, Button, Card, Checkbox, CloseButton, Container, Divider, Flex, Grid, Heading, HelpText, Icon, IconButton, Image, InfiniteLinearProgress, Input, Label, Progress as LinearProgress, Link, Radio, Select, Slider, Spinner, Stack, Text, Textarea, ThemeProvider, useBreakpointIndex, useResponsiveValue, useTheme };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as theme_ui from 'theme-ui';
2
- import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, SelectProps as SelectProps$1, IconButtonProps, TextareaProps as TextareaProps$1, TextProps } from 'theme-ui';
2
+ import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, SelectProps as SelectProps$1, IconButtonProps, TextareaProps as TextareaProps$1, TextProps, FlexProps } from 'theme-ui';
3
3
  export { BaseStyles, Box, BoxProps, Card, CardProps, Checkbox, CheckboxProps, Container, ContainerProps, Divider, DividerProps, Flex, FlexProps, Grid, GridProps, Heading, HeadingProps, IconButtonProps, Image, ImageProps, Progress as LinearProgress, ProgressProps as LinearProgressProps, Link, LinkProps, Radio, RadioProps, Slider, SliderProps, Spinner, SpinnerProps, Text, TextProps, Theme } from 'theme-ui';
4
4
  export { useBreakpointIndex, useResponsiveValue } from '@theme-ui/match-media';
5
5
  import * as React from 'react';
@@ -69,4 +69,10 @@ type CloseButtonProps = ButtonProps$1 & {
69
69
  };
70
70
  declare const CloseButton: React__default.ForwardRefExoticComponent<Omit<CloseButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
71
71
 
72
- export { Badge, BadgeProps, Button, ButtonProps, CloseButton, CloseButtonProps, HelpText, HelpTextProps, Icon, IconButton, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, Label, LabelProps, Select, SelectProps, Textarea, TextareaProps, ThemeProvider, ThemeProviderProps, useTheme };
72
+ type StackProps = FlexProps;
73
+ /**
74
+ * A component that renders its children in a column.
75
+ */
76
+ declare const Stack: React.ForwardRefExoticComponent<theme_ui.BoxProps & React.RefAttributes<HTMLElement>>;
77
+
78
+ export { Badge, BadgeProps, Button, ButtonProps, CloseButton, CloseButtonProps, HelpText, HelpTextProps, Icon, IconButton, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, Label, LabelProps, Select, SelectProps, Stack, StackProps, Textarea, TextareaProps, ThemeProvider, ThemeProviderProps, useTheme };
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ __export(src_exports, {
63
63
  Select: () => Select,
64
64
  Slider: () => import_theme_ui21.Slider,
65
65
  Spinner: () => import_theme_ui18.Spinner,
66
+ Stack: () => Stack,
66
67
  Text: () => import_theme_ui16.Text,
67
68
  Textarea: () => Textarea,
68
69
  ThemeProvider: () => ThemeProvider,
@@ -482,6 +483,21 @@ var CloseButton = import_react6.default.forwardRef(({
482
483
  });
483
484
  });
484
485
  CloseButton.displayName = "CloseButton";
486
+
487
+ // src/components/Stack.tsx
488
+ var React10 = __toESM(require("react"));
489
+ var import_jsx_runtime13 = require("react/jsx-runtime");
490
+ var Stack = React10.forwardRef((props, ref) => {
491
+ return /* @__PURE__ */(0, import_jsx_runtime13.jsx)(import_theme_ui8.Flex, {
492
+ ref,
493
+ ...props,
494
+ sx: {
495
+ flexDirection: "column",
496
+ ...props.sx
497
+ }
498
+ });
499
+ });
500
+ Stack.displayName = "Stack";
485
501
  // Annotate the CommonJS export names for ESM import in node:
486
502
  0 && (module.exports = {
487
503
  Badge,
@@ -509,6 +525,7 @@ CloseButton.displayName = "CloseButton";
509
525
  Select,
510
526
  Slider,
511
527
  Spinner,
528
+ Stack,
512
529
  Text,
513
530
  Textarea,
514
531
  ThemeProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "1.31.18",
3
+ "version": "1.32.0",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "3f398d2717a3ac8f7fecf4c79c028b35f0ef45fb"
49
+ "gitHead": "d8d388f73b22a40e68b59c3276bb2d3b2f486225"
50
50
  }
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import { Flex, FlexProps } from './Flex';
3
+
4
+ export type StackProps = FlexProps;
5
+
6
+ /**
7
+ * A component that renders its children in a column.
8
+ */
9
+ export const Stack = React.forwardRef<HTMLElement, StackProps>(
10
+ (props: FlexProps, ref) => {
11
+ return (
12
+ <Flex
13
+ ref={ref}
14
+ {...props}
15
+ sx={{
16
+ flexDirection: 'column',
17
+ ...props.sx,
18
+ }}
19
+ />
20
+ );
21
+ }
22
+ );
23
+
24
+ Stack.displayName = 'Stack';
package/src/index.ts CHANGED
@@ -34,3 +34,4 @@ export { Textarea, type TextareaProps } from './components/Textarea';
34
34
  export { Container, type ContainerProps } from './components/Container';
35
35
  export { HelpText, type HelpTextProps } from './components/HelpText';
36
36
  export { CloseButton, type CloseButtonProps } from './components/CloseButton';
37
+ export { Stack, type StackProps } from './components/Stack';