@ttoss/ui 1.31.18 → 1.32.1

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,6 +1,6 @@
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';
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';
2
+ import { Theme, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, InputProps as InputProps$1, LabelProps as LabelProps$1, SelectProps, IconButtonProps, TextareaProps as TextareaProps$1, TextProps, FlexProps } from 'theme-ui';
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, SelectProps, 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';
6
6
  import React__default from 'react';
@@ -34,10 +34,10 @@ type ButtonProps = ButtonProps$1 & {
34
34
  };
35
35
  declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
36
36
 
37
- type InputProps = InputProps$1 & {
37
+ interface InputProps extends InputProps$1 {
38
38
  leadingIcon?: IconType;
39
39
  trailingIcon?: IconType;
40
- };
40
+ }
41
41
  declare const Input: React__default.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
42
42
 
43
43
  type LabelProps = LabelProps$1 & {
@@ -46,16 +46,15 @@ type LabelProps = LabelProps$1 & {
46
46
  };
47
47
  declare const Label: ({ children, onTooltipClick, tooltip, ...props }: LabelProps) => JSX.Element;
48
48
 
49
- type SelectProps = SelectProps$1;
50
- declare const Select: React__default.ForwardRefExoticComponent<Omit<SelectProps$1, "ref"> & React__default.RefAttributes<HTMLSelectElement>>;
49
+ declare const Select: React__default.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React__default.RefAttributes<HTMLSelectElement>>;
51
50
 
52
51
  declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
53
52
 
54
53
  declare const InfiniteLinearProgress: () => JSX.Element;
55
54
 
56
- type TextareaProps = TextareaProps$1 & {
55
+ interface TextareaProps extends TextareaProps$1 {
57
56
  trailingIcon?: IconType;
58
- };
57
+ }
59
58
  declare const Textarea: React__default.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React__default.RefAttributes<HTMLTextAreaElement>>;
60
59
 
61
60
  type HelpTextProps = Omit<TextProps, 'variant'> & {
@@ -69,4 +68,10 @@ type CloseButtonProps = ButtonProps$1 & {
69
68
  };
70
69
  declare const CloseButton: React__default.ForwardRefExoticComponent<Omit<CloseButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
71
70
 
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 };
71
+ type StackProps = FlexProps;
72
+ /**
73
+ * A component that renders its children in a column.
74
+ */
75
+ declare const Stack: React.ForwardRefExoticComponent<theme_ui.BoxProps & React.RefAttributes<HTMLElement>>;
76
+
77
+ export { Badge, BadgeProps, Button, ButtonProps, CloseButton, CloseButtonProps, HelpText, HelpTextProps, Icon, IconButton, IconProps, IconType, InfiniteLinearProgress, Input, InputProps, Label, LabelProps, Select, 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.1",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -15,7 +15,6 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "tsup",
18
- "dev": "yarn workspace @docs/storybook run dev",
19
18
  "test": "jest"
20
19
  },
21
20
  "sideEffects": false,
@@ -24,16 +23,19 @@
24
23
  "@emotion/react": "^11.10.6",
25
24
  "@iconify-icon/react": "^1.0.7",
26
25
  "@theme-ui/match-media": "^0.15.7",
27
- "@ttoss/theme": "^1.4.15",
26
+ "@ttoss/theme": "^1.4.16",
28
27
  "theme-ui": "^0.15.7"
29
28
  },
30
29
  "peerDependencies": {
31
30
  "react": ">=16.8.0"
32
31
  },
33
32
  "devDependencies": {
34
- "@ttoss/config": "^1.29.3",
35
- "@ttoss/test-utils": "^1.21.2",
33
+ "@iconify-icons/mdi-light": "^1.2.5",
34
+ "@iconify/types": "^2.0.0",
35
+ "@ttoss/config": "^1.29.4",
36
+ "@ttoss/test-utils": "^1.21.3",
36
37
  "@types/jest": "^29.5.0",
38
+ "@types/react": "^18.0.35",
37
39
  "jest": "^29.5.0",
38
40
  "react": "^18.2.0",
39
41
  "tsup": "^6.7.0"
@@ -46,5 +48,5 @@
46
48
  "publishConfig": {
47
49
  "access": "public"
48
50
  },
49
- "gitHead": "3f398d2717a3ac8f7fecf4c79c028b35f0ef45fb"
51
+ "gitHead": "81c9da91988b338a6449d84b4dfc183ccf9ed941"
50
52
  }
@@ -1,11 +1,11 @@
1
1
  import { Flex, Icon, type IconType, Text } from '..';
2
- import { type InputProps as InputPropsUI, Input as InputUI } from 'theme-ui';
2
+ import { InputProps as InputPropsUI, Input as InputUI } from 'theme-ui';
3
3
  import React from 'react';
4
4
 
5
- export type InputProps = InputPropsUI & {
5
+ export interface InputProps extends InputPropsUI {
6
6
  leadingIcon?: IconType;
7
7
  trailingIcon?: IconType;
8
- };
8
+ }
9
9
 
10
10
  export const Input = React.forwardRef<HTMLInputElement, InputProps>(
11
11
  ({ leadingIcon, trailingIcon, className, sx, ...inputProps }, ref) => {
@@ -1,11 +1,8 @@
1
1
  import { Icon, Text } from '..';
2
- import {
3
- type SelectProps as SelectPropsUi,
4
- Select as SelectUi,
5
- } from 'theme-ui';
2
+ import { SelectProps, Select as SelectUi } from 'theme-ui';
6
3
  import React from 'react';
7
4
 
8
- export type SelectProps = SelectPropsUi;
5
+ export { type SelectProps };
9
6
 
10
7
  export const Select = React.forwardRef<HTMLSelectElement, SelectProps>(
11
8
  ({ arrow, ...props }, ref) => {
@@ -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';
@@ -5,9 +5,9 @@ import {
5
5
  } from 'theme-ui';
6
6
  import React from 'react';
7
7
 
8
- export type TextareaProps = TextareaPropsUI & {
8
+ export interface TextareaProps extends TextareaPropsUI {
9
9
  trailingIcon?: IconType;
10
- };
10
+ }
11
11
 
12
12
  export const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
13
13
  ({ trailingIcon, className, sx, ...textareaProps }, ref) => {
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';