@wallarm-org/design-system 0.4.1-rc-fix-table-width.3 → 0.4.1-rc-fix-table-width.4

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.
@@ -1,6 +1,7 @@
1
1
  import type { FC, HTMLAttributes, Ref } from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const flexVariants: (props?: ({
4
+ inline?: boolean | null | undefined;
4
5
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
5
6
  align?: "end" | "baseline" | "start" | "center" | "stretch" | null | undefined;
6
7
  justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
@@ -2,8 +2,12 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../utils/cn.js";
5
- const flexVariants = cva('flex', {
5
+ const flexVariants = cva('', {
6
6
  variants: {
7
+ inline: {
8
+ true: 'inline-flex',
9
+ false: 'flex'
10
+ },
7
11
  direction: {
8
12
  row: 'flex-row',
9
13
  column: 'flex-col',
@@ -98,10 +102,11 @@ const flexVariants = cva('flex', {
98
102
  }
99
103
  }
100
104
  });
101
- const Flex = ({ direction = 'row', align = 'stretch', justify = 'start', wrap = 'nowrap', gap, grow, shrink, basis, fullWidth, asChild = false, children, ...props })=>{
105
+ const Flex = ({ inline = false, direction = 'row', align = 'stretch', justify = 'start', wrap = 'nowrap', gap, grow, shrink, basis, fullWidth, asChild = false, children, ...props })=>{
102
106
  const Comp = asChild ? Slot : 'div';
103
107
  return /*#__PURE__*/ jsx(Comp, {
104
108
  className: cn(flexVariants({
109
+ inline,
105
110
  direction,
106
111
  align,
107
112
  justify,
@@ -1,11 +1,14 @@
1
1
  import type { FC, HTMLAttributes, Ref } from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  declare const stackVariants: (props?: ({
4
+ inline?: boolean | null | undefined;
4
5
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
5
6
  align?: "end" | "baseline" | "start" | "center" | "stretch" | null | undefined;
6
7
  justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
7
8
  wrap?: "reverse" | "wrap" | "nowrap" | null | undefined;
9
+ fullWidth?: boolean | null | undefined;
8
10
  flexGrow?: boolean | null | undefined;
11
+ flexShrink?: boolean | null | undefined;
9
12
  spacing?: 0 | 1 | 2 | 4 | 6 | 8 | 12 | 16 | 20 | 32 | 24 | 28 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | 128 | 144 | null | undefined;
10
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
14
  type StackNativeProps = Omit<HTMLAttributes<HTMLDivElement>, 'className'>;
@@ -4,8 +4,12 @@ import { Slot } from "@radix-ui/react-slot";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../../utils/cn.js";
6
6
  import { getValidChildren } from "./utils.js";
7
- const stackVariants = cva('flex w-full', {
7
+ const stackVariants = cva('', {
8
8
  variants: {
9
+ inline: {
10
+ true: 'inline-flex',
11
+ false: 'flex'
12
+ },
9
13
  direction: {
10
14
  row: 'flex-row',
11
15
  column: 'flex-col',
@@ -32,9 +36,16 @@ const stackVariants = cva('flex w-full', {
32
36
  nowrap: 'flex-nowrap',
33
37
  reverse: 'flex-wrap-reverse'
34
38
  },
39
+ fullWidth: {
40
+ true: 'w-full'
41
+ },
35
42
  flexGrow: {
36
43
  true: 'flex-1'
37
44
  },
45
+ flexShrink: {
46
+ true: 'shrink',
47
+ false: 'shrink-0'
48
+ },
38
49
  spacing: {
39
50
  0: '',
40
51
  1: 'gap-1',
@@ -62,7 +73,7 @@ const stackVariants = cva('flex w-full', {
62
73
  }
63
74
  }
64
75
  });
65
- const Stack = ({ direction = 'column', align = 'stretch', justify = 'start', wrap = 'nowrap', spacing = 4, flexGrow = true, asChild = false, children, ...props })=>{
76
+ const Stack = ({ inline = false, direction = 'column', align = 'stretch', justify = 'start', wrap = 'nowrap', spacing = 4, fullWidth, flexGrow, flexShrink, asChild = false, children, ...props })=>{
66
77
  const clones = useMemo(()=>getValidChildren(children).map((child, index)=>{
67
78
  const key = void 0 !== child.key ? child.key : index;
68
79
  return /*#__PURE__*/ jsx(Fragment, {
@@ -75,12 +86,15 @@ const Stack = ({ direction = 'column', align = 'stretch', justify = 'start', wra
75
86
  return /*#__PURE__*/ jsx(Comp, {
76
87
  ...props,
77
88
  className: cn(stackVariants({
89
+ inline,
78
90
  direction,
79
91
  align,
80
92
  justify,
81
93
  wrap,
82
94
  spacing,
83
- flexGrow
95
+ fullWidth,
96
+ flexGrow,
97
+ flexShrink
84
98
  })),
85
99
  children: clones
86
100
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "0.4.0",
3
- "generatedAt": "2026-02-25T07:22:20.037Z",
3
+ "generatedAt": "2026-02-25T08:18:55.707Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Alert",
@@ -9363,6 +9363,12 @@
9363
9363
  "required": false,
9364
9364
  "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
9365
9365
  },
9366
+ {
9367
+ "name": "inline",
9368
+ "type": "{ true: string; false: string; }",
9369
+ "required": false,
9370
+ "defaultValue": "false"
9371
+ },
9366
9372
  {
9367
9373
  "name": "direction",
9368
9374
  "type": "{ row: string; column: string; 'row-reverse': string; 'column-reverse': string; }",
@@ -9420,6 +9426,13 @@
9420
9426
  }
9421
9427
  ],
9422
9428
  "variants": [
9429
+ {
9430
+ "name": "inline",
9431
+ "options": [
9432
+ "true",
9433
+ "false"
9434
+ ]
9435
+ },
9423
9436
  {
9424
9437
  "name": "direction",
9425
9438
  "options": [
@@ -16317,6 +16330,12 @@
16317
16330
  "required": false,
16318
16331
  "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
16319
16332
  },
16333
+ {
16334
+ "name": "inline",
16335
+ "type": "{ true: string; false: string; }",
16336
+ "required": false,
16337
+ "defaultValue": "false"
16338
+ },
16320
16339
  {
16321
16340
  "name": "direction",
16322
16341
  "type": "{ row: string; column: string; 'row-reverse': string; 'column-reverse': string; }",
@@ -16341,11 +16360,20 @@
16341
16360
  "required": false,
16342
16361
  "defaultValue": "nowrap"
16343
16362
  },
16363
+ {
16364
+ "name": "fullWidth",
16365
+ "type": "{ true: string; }",
16366
+ "required": false
16367
+ },
16344
16368
  {
16345
16369
  "name": "flexGrow",
16346
16370
  "type": "{ true: string; }",
16347
- "required": false,
16348
- "defaultValue": "true"
16371
+ "required": false
16372
+ },
16373
+ {
16374
+ "name": "flexShrink",
16375
+ "type": "{ true: string; false: string; }",
16376
+ "required": false
16349
16377
  },
16350
16378
  {
16351
16379
  "name": "spacing",
@@ -16361,6 +16389,13 @@
16361
16389
  }
16362
16390
  ],
16363
16391
  "variants": [
16392
+ {
16393
+ "name": "inline",
16394
+ "options": [
16395
+ "true",
16396
+ "false"
16397
+ ]
16398
+ },
16364
16399
  {
16365
16400
  "name": "direction",
16366
16401
  "options": [
@@ -16399,12 +16434,25 @@
16399
16434
  "reverse"
16400
16435
  ]
16401
16436
  },
16437
+ {
16438
+ "name": "fullWidth",
16439
+ "options": [
16440
+ "true"
16441
+ ]
16442
+ },
16402
16443
  {
16403
16444
  "name": "flexGrow",
16404
16445
  "options": [
16405
16446
  "true"
16406
16447
  ]
16407
16448
  },
16449
+ {
16450
+ "name": "flexShrink",
16451
+ "options": [
16452
+ "true",
16453
+ "false"
16454
+ ]
16455
+ },
16408
16456
  {
16409
16457
  "name": "spacing",
16410
16458
  "options": [
@@ -16708,6 +16756,11 @@
16708
16756
  "required": false,
16709
16757
  "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
16710
16758
  },
16759
+ {
16760
+ "name": "inline",
16761
+ "type": "{ true: string; false: string; }",
16762
+ "required": false
16763
+ },
16711
16764
  {
16712
16765
  "name": "align",
16713
16766
  "type": "{ start: string; center: string; end: string; stretch: string; baseline: string; }",
@@ -16725,11 +16778,21 @@
16725
16778
  "type": "{ wrap: string; nowrap: string; reverse: string; }",
16726
16779
  "required": false
16727
16780
  },
16781
+ {
16782
+ "name": "fullWidth",
16783
+ "type": "{ true: string; }",
16784
+ "required": false
16785
+ },
16728
16786
  {
16729
16787
  "name": "flexGrow",
16730
16788
  "type": "{ true: string; }",
16731
16789
  "required": false
16732
16790
  },
16791
+ {
16792
+ "name": "flexShrink",
16793
+ "type": "{ true: string; false: string; }",
16794
+ "required": false
16795
+ },
16733
16796
  {
16734
16797
  "name": "spacing",
16735
16798
  "type": "complex",
@@ -17015,6 +17078,11 @@
17015
17078
  "required": false,
17016
17079
  "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
17017
17080
  },
17081
+ {
17082
+ "name": "inline",
17083
+ "type": "{ true: string; false: string; }",
17084
+ "required": false
17085
+ },
17018
17086
  {
17019
17087
  "name": "align",
17020
17088
  "type": "{ start: string; center: string; end: string; stretch: string; baseline: string; }",
@@ -17031,11 +17099,21 @@
17031
17099
  "type": "{ wrap: string; nowrap: string; reverse: string; }",
17032
17100
  "required": false
17033
17101
  },
17102
+ {
17103
+ "name": "fullWidth",
17104
+ "type": "{ true: string; }",
17105
+ "required": false
17106
+ },
17034
17107
  {
17035
17108
  "name": "flexGrow",
17036
17109
  "type": "{ true: string; }",
17037
17110
  "required": false
17038
17111
  },
17112
+ {
17113
+ "name": "flexShrink",
17114
+ "type": "{ true: string; false: string; }",
17115
+ "required": false
17116
+ },
17039
17117
  {
17040
17118
  "name": "spacing",
17041
17119
  "type": "complex",
@@ -17069,6 +17147,10 @@
17069
17147
  {
17070
17148
  "name": "Wrap",
17071
17149
  "code": "({ ...args }) => (\n <Flex direction='column'>\n <Heading>Wrap enabled (width: 12rem)</Heading>\n <HStack {...args} spacing={2} wrap='wrap'>\n {new Array(40).fill(null).map((_, index) => {\n const key = `${index + 1}`;\n\n return <Box key={key}>{key}</Box>;\n })}\n </HStack>\n </Flex>\n)"
17150
+ },
17151
+ {
17152
+ "name": "FlexBehavior",
17153
+ "code": "({ ...args }) => (\n <Flex direction='column' gap={8}>\n <Flex direction='column'>\n <Heading>Default (no grow, no full width)</Heading>\n <HStack {...args} spacing={4}>\n <Box>A</Box>\n <Box>B</Box>\n <Box>C</Box>\n </HStack>\n </Flex>\n\n <Flex direction='column'>\n <Heading>fullWidth</Heading>\n <HStack {...args} spacing={4} fullWidth>\n <Box>A</Box>\n <Box>B</Box>\n <Box>C</Box>\n </HStack>\n </Flex>\n\n <Flex direction='column'>\n <Heading>flexGrow</Heading>\n <HStack>\n <VStack {...args} spacing={4} flexGrow>\n <Box>A</Box>\n <Box>B</Box>\n </VStack>\n <VStack {...args} spacing={4}>\n <Box>C</Box>\n </VStack>\n </HStack>\n </Flex>\n\n <Flex direction='column'>\n <Heading>flexShrink=false (no shrink)</Heading>\n <div className='w-48 overflow-hidden border border-gray-300 rounded'>\n <HStack {...args} spacing={4} flexShrink={false}>\n <Box>A</Box>\n <Box>B</Box>\n <Box>C</Box>\n <Box>D</Box>\n <Box>E</Box>\n </HStack>\n </div>\n </Flex>\n </Flex>\n)"
17072
17154
  }
17073
17155
  ]
17074
17156
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.4.1-rc-fix-table-width.3",
3
+ "version": "0.4.1-rc-fix-table-width.4",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",