@pittorica/stack-react 0.21.0 → 0.22.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 ADDED
@@ -0,0 +1,24 @@
1
+ # @pittorica/stack-react
2
+
3
+ The `Stack` component.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @pittorica/stack-react
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```jsx
14
+ import { Stack } from '@pittorica/stack-react';
15
+ // TODO: Add usage example
16
+ ```
17
+
18
+ ## License
19
+
20
+ This project is licensed under the MIT License.
21
+
22
+ **Copyright (c) 2025 Davide Di Criscito**
23
+
24
+ For the full details, see the [LICENSE](LICENSE) file.
package/dist/Stack.d.ts CHANGED
@@ -1,17 +1,7 @@
1
- import { default as React } from 'react';
2
- import { BoxProps } from '@pittorica/box-react';
3
- import { SpacingToken } from '@pittorica/styles';
4
- export declare const STACK_DIRECTIONS: readonly ["horizontal", "horizontal-reversed", "vertical", "vertical-reversed"];
5
- export type StackDirection = (typeof STACK_DIRECTIONS)[number];
6
- export declare const STACK_ALIGNS: readonly ["start", "center", "end", "stretch"];
7
- export type StackAlign = (typeof STACK_ALIGNS)[number];
8
- export declare const STACK_JUSTIFIES: readonly ["start", "center", "end", "spaceBetween", "spaceAround", "spaceEvenly"];
9
- export type StackJustify = (typeof STACK_JUSTIFIES)[number];
10
- export interface StackProps extends Omit<BoxProps, 'as' | 'display' | 'flexDirection' | 'alignItems' | 'justifyContent' | 'gap'> {
11
- direction?: StackDirection;
12
- align?: StackAlign;
13
- justify?: StackJustify;
14
- gap?: SpacingToken | string;
15
- }
16
- export declare const Stack: React.FC<StackProps>;
1
+ import { type FlexProps } from '@pittorica/flex-react';
2
+ /**
3
+ * Stack component for vertical layouts.
4
+ * Inherits all properties from Flex but defaults direction to 'column'.
5
+ */
6
+ export declare const Stack: (props: FlexProps) => import("react/jsx-runtime").JSX.Element;
17
7
  //# sourceMappingURL=Stack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItE,eAAO,MAAM,gBAAgB,iFAKnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,eAAO,MAAM,YAAY,gDAAiD,CAAC;AAE3E,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,eAAO,MAAM,eAAe,mFAOlB,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D,MAAM,WAAW,UAAW,SAAQ,IAAI,CACtC,QAAQ,EACR,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,YAAY,GAAG,gBAAgB,GAAG,KAAK,CAC7E;IACC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,GAAG,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAiCtC,CAAC"}
1
+ {"version":3,"file":"Stack.d.ts","sourceRoot":"","sources":["../src/Stack.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,SAAS,4CAErC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Stack } from './Stack';
3
+ declare const meta: Meta<typeof Stack>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Stack>;
6
+ export declare const Default: Story;
7
+ export declare const AlignedCenter: Story;
8
+ export declare const JustifyEnd: Story;
9
+ //# sourceMappingURL=Stack.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.stories.d.ts","sourceRoot":"","sources":["../src/Stack.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA2B5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAepC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @vitest-environment jsdom
3
+ */
4
+ import '@testing-library/jest-dom';
5
+ //# sourceMappingURL=Stack.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stack.test.d.ts","sourceRoot":"","sources":["../src/Stack.test.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,2BAA2B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- export type { StackAlign, StackDirection, StackJustify, StackProps, } from './Stack.js';
2
- export { Stack, STACK_ALIGNS, STACK_DIRECTIONS, STACK_JUSTIFIES, } from './Stack.js';
1
+ export { Stack } from './Stack.js';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}