@postenbring/hedwig-react 0.0.67 → 0.0.69
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/_tsup-dts-rollup.d.mts +135 -0
- package/dist/_tsup-dts-rollup.d.ts +135 -0
- package/dist/chunk-25R7DBK6.mjs +59 -0
- package/dist/chunk-25R7DBK6.mjs.map +1 -0
- package/dist/chunk-BVG5VSZK.mjs +1 -0
- package/dist/chunk-JDXYRFLJ.mjs +13 -0
- package/dist/chunk-JDXYRFLJ.mjs.map +1 -0
- package/dist/{chunk-QGZU7Z2W.mjs → chunk-VVPJOVFP.mjs} +27 -3
- package/dist/chunk-VVPJOVFP.mjs.map +1 -0
- package/dist/chunk-ZQHLYAJU.mjs +1 -0
- package/dist/chunk-ZQHLYAJU.mjs.map +1 -0
- package/dist/footer/footer.mjs +1 -1
- package/dist/footer/index.mjs +1 -1
- package/dist/index-no-css.d.mts +5 -1
- package/dist/index-no-css.d.ts +5 -1
- package/dist/index-no-css.js +270 -196
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +30 -21
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +270 -196
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -21
- package/dist/index.mjs.map +1 -1
- package/dist/layout/grid/grid.d.mts +4 -0
- package/dist/layout/grid/grid.d.ts +4 -0
- package/dist/layout/grid/grid.js +122 -0
- package/dist/layout/grid/grid.js.map +1 -0
- package/dist/layout/grid/grid.mjs +12 -0
- package/dist/layout/grid/grid.mjs.map +1 -0
- package/dist/layout/grid/index.d.mts +4 -0
- package/dist/layout/grid/index.d.ts +4 -0
- package/dist/layout/grid/index.js +128 -0
- package/dist/layout/grid/index.js.map +1 -0
- package/dist/layout/grid/index.mjs +14 -0
- package/dist/layout/grid/index.mjs.map +1 -0
- package/dist/layout/index.d.mts +5 -1
- package/dist/layout/index.d.ts +5 -1
- package/dist/layout/index.js +91 -17
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +13 -4
- package/dist/layout/stack/index.js +26 -2
- package/dist/layout/stack/index.js.map +1 -1
- package/dist/layout/stack/index.mjs +2 -1
- package/dist/layout/stack/stack.js +26 -2
- package/dist/layout/stack/stack.js.map +1 -1
- package/dist/layout/stack/stack.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-L4GQJETB.mjs +0 -1
- package/dist/chunk-QGZU7Z2W.mjs.map +0 -1
- /package/dist/{chunk-L4GQJETB.mjs.map → chunk-BVG5VSZK.mjs.map} +0 -0
|
@@ -930,6 +930,124 @@ export declare function getResponsiveProps<T>(variable: `--hds-${string}`, input
|
|
|
930
930
|
|
|
931
931
|
export declare function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes): string;
|
|
932
932
|
|
|
933
|
+
/**
|
|
934
|
+
* 🚧 A simple opionated abstraction over CSS Grid.
|
|
935
|
+
*
|
|
936
|
+
* The grid is always a 12 column grid.
|
|
937
|
+
*
|
|
938
|
+
* example
|
|
939
|
+
* ```tsx
|
|
940
|
+
* <Grid gap="12-16" span={{ small: 6 }}>
|
|
941
|
+
* <div>6/12</div>
|
|
942
|
+
* <div>6/12</div>
|
|
943
|
+
* <Grid.Item span={{ small: 12 }}>12/12</Grid.Item>
|
|
944
|
+
* <div>6/12</div>
|
|
945
|
+
* <div>6/12</div>
|
|
946
|
+
* </Grid>
|
|
947
|
+
* ```
|
|
948
|
+
*/
|
|
949
|
+
export declare const Grid_alias_3: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>>;
|
|
950
|
+
|
|
951
|
+
declare const GridComponent: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>> & {
|
|
952
|
+
Item: typeof GridItem;
|
|
953
|
+
};
|
|
954
|
+
export { GridComponent as Grid }
|
|
955
|
+
export { GridComponent as Grid_alias_1 }
|
|
956
|
+
export { GridComponent as Grid_alias_2 }
|
|
957
|
+
export { GridComponent as Grid_alias_4 }
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* 🚧 Grid.Item
|
|
961
|
+
*
|
|
962
|
+
* Use as the direct child of a `Grid` to override `span` and `center` for individual items.
|
|
963
|
+
*/
|
|
964
|
+
declare const GridItem: ForwardRefExoticComponent<GridItemProps & RefAttributes<HTMLDivElement>>;
|
|
965
|
+
export { GridItem }
|
|
966
|
+
export { GridItem as GridItem_alias_1 }
|
|
967
|
+
export { GridItem as GridItem_alias_2 }
|
|
968
|
+
export { GridItem as GridItem_alias_3 }
|
|
969
|
+
export { GridItem as GridItem_alias_4 }
|
|
970
|
+
|
|
971
|
+
declare interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
972
|
+
children: React.ReactNode;
|
|
973
|
+
/**
|
|
974
|
+
* Column span for the grid item
|
|
975
|
+
*
|
|
976
|
+
* `default` is `12`
|
|
977
|
+
*/
|
|
978
|
+
span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;
|
|
979
|
+
/**
|
|
980
|
+
* Center the grid item horizontally
|
|
981
|
+
*
|
|
982
|
+
* Offsets the start position of the grid item relative to it's span so that it appears centered.
|
|
983
|
+
*
|
|
984
|
+
* assumes a span of 2, 4, 6, 8, or 10
|
|
985
|
+
*
|
|
986
|
+
* a span of `12` is 100% width and centering has no effect
|
|
987
|
+
*
|
|
988
|
+
* `default` is `false`
|
|
989
|
+
*/
|
|
990
|
+
center?: ResponsiveProp<boolean>;
|
|
991
|
+
/**
|
|
992
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
993
|
+
*/
|
|
994
|
+
asChild?: boolean;
|
|
995
|
+
}
|
|
996
|
+
export { GridItemProps }
|
|
997
|
+
export { GridItemProps as GridItemProps_alias_1 }
|
|
998
|
+
export { GridItemProps as GridItemProps_alias_2 }
|
|
999
|
+
export { GridItemProps as GridItemProps_alias_3 }
|
|
1000
|
+
export { GridItemProps as GridItemProps_alias_4 }
|
|
1001
|
+
|
|
1002
|
+
declare interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1003
|
+
children: React.ReactNode;
|
|
1004
|
+
/**
|
|
1005
|
+
* Space between grid items. Both horizontal and vertical.
|
|
1006
|
+
*
|
|
1007
|
+
* Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.
|
|
1008
|
+
*
|
|
1009
|
+
* Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.
|
|
1010
|
+
*
|
|
1011
|
+
* Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.
|
|
1012
|
+
*/
|
|
1013
|
+
gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1014
|
+
/**
|
|
1015
|
+
* Space between grid items horizontally
|
|
1016
|
+
*/
|
|
1017
|
+
gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1018
|
+
/**
|
|
1019
|
+
* Space between grid items vertically
|
|
1020
|
+
*/
|
|
1021
|
+
gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1022
|
+
/**
|
|
1023
|
+
* Column span for the grid items
|
|
1024
|
+
*
|
|
1025
|
+
* `default` is `12`
|
|
1026
|
+
*/
|
|
1027
|
+
span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Center grid items horizontally
|
|
1030
|
+
*
|
|
1031
|
+
* Offsets the start position of the grid items relative to their span so that it appears centered.
|
|
1032
|
+
*
|
|
1033
|
+
* assumes a span of 2, 4, 6, 8, or 10
|
|
1034
|
+
*
|
|
1035
|
+
* a span of `12` is 100% width and centering has no effect
|
|
1036
|
+
*
|
|
1037
|
+
* `default` is `false`
|
|
1038
|
+
*/
|
|
1039
|
+
center?: ResponsiveProp<boolean>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
1042
|
+
*/
|
|
1043
|
+
asChild?: boolean;
|
|
1044
|
+
}
|
|
1045
|
+
export { GridProps }
|
|
1046
|
+
export { GridProps as GridProps_alias_1 }
|
|
1047
|
+
export { GridProps as GridProps_alias_2 }
|
|
1048
|
+
export { GridProps as GridProps_alias_3 }
|
|
1049
|
+
export { GridProps as GridProps_alias_4 }
|
|
1050
|
+
|
|
933
1051
|
declare interface HeadingProps {
|
|
934
1052
|
variant: "h1-display" | "h1" | "h2" | "h3" | "h3-title";
|
|
935
1053
|
as: React_3.ElementType;
|
|
@@ -1728,7 +1846,24 @@ export { Stack as Stack_alias_4 }
|
|
|
1728
1846
|
|
|
1729
1847
|
declare interface StackProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1730
1848
|
children: React_2.ReactNode;
|
|
1849
|
+
/**
|
|
1850
|
+
* Space between items. Both horizontal and vertical.
|
|
1851
|
+
*
|
|
1852
|
+
* Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.
|
|
1853
|
+
*
|
|
1854
|
+
* Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.
|
|
1855
|
+
*
|
|
1856
|
+
* Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.
|
|
1857
|
+
*/
|
|
1731
1858
|
gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1859
|
+
/**
|
|
1860
|
+
* Space between items horizontally
|
|
1861
|
+
*/
|
|
1862
|
+
gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1863
|
+
/**
|
|
1864
|
+
* Space between items vertically
|
|
1865
|
+
*/
|
|
1866
|
+
gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1732
1867
|
direction?: ResponsiveProp<React_2.CSSProperties["flexDirection"]>;
|
|
1733
1868
|
wrap?: ResponsiveProp<boolean>;
|
|
1734
1869
|
align?: ResponsiveProp<React_2.CSSProperties["alignItems"]>;
|
|
@@ -930,6 +930,124 @@ export declare function getResponsiveProps<T>(variable: `--hds-${string}`, input
|
|
|
930
930
|
|
|
931
931
|
export declare function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes): string;
|
|
932
932
|
|
|
933
|
+
/**
|
|
934
|
+
* 🚧 A simple opionated abstraction over CSS Grid.
|
|
935
|
+
*
|
|
936
|
+
* The grid is always a 12 column grid.
|
|
937
|
+
*
|
|
938
|
+
* example
|
|
939
|
+
* ```tsx
|
|
940
|
+
* <Grid gap="12-16" span={{ small: 6 }}>
|
|
941
|
+
* <div>6/12</div>
|
|
942
|
+
* <div>6/12</div>
|
|
943
|
+
* <Grid.Item span={{ small: 12 }}>12/12</Grid.Item>
|
|
944
|
+
* <div>6/12</div>
|
|
945
|
+
* <div>6/12</div>
|
|
946
|
+
* </Grid>
|
|
947
|
+
* ```
|
|
948
|
+
*/
|
|
949
|
+
export declare const Grid_alias_3: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>>;
|
|
950
|
+
|
|
951
|
+
declare const GridComponent: ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>> & {
|
|
952
|
+
Item: typeof GridItem;
|
|
953
|
+
};
|
|
954
|
+
export { GridComponent as Grid }
|
|
955
|
+
export { GridComponent as Grid_alias_1 }
|
|
956
|
+
export { GridComponent as Grid_alias_2 }
|
|
957
|
+
export { GridComponent as Grid_alias_4 }
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* 🚧 Grid.Item
|
|
961
|
+
*
|
|
962
|
+
* Use as the direct child of a `Grid` to override `span` and `center` for individual items.
|
|
963
|
+
*/
|
|
964
|
+
declare const GridItem: ForwardRefExoticComponent<GridItemProps & RefAttributes<HTMLDivElement>>;
|
|
965
|
+
export { GridItem }
|
|
966
|
+
export { GridItem as GridItem_alias_1 }
|
|
967
|
+
export { GridItem as GridItem_alias_2 }
|
|
968
|
+
export { GridItem as GridItem_alias_3 }
|
|
969
|
+
export { GridItem as GridItem_alias_4 }
|
|
970
|
+
|
|
971
|
+
declare interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
972
|
+
children: React.ReactNode;
|
|
973
|
+
/**
|
|
974
|
+
* Column span for the grid item
|
|
975
|
+
*
|
|
976
|
+
* `default` is `12`
|
|
977
|
+
*/
|
|
978
|
+
span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;
|
|
979
|
+
/**
|
|
980
|
+
* Center the grid item horizontally
|
|
981
|
+
*
|
|
982
|
+
* Offsets the start position of the grid item relative to it's span so that it appears centered.
|
|
983
|
+
*
|
|
984
|
+
* assumes a span of 2, 4, 6, 8, or 10
|
|
985
|
+
*
|
|
986
|
+
* a span of `12` is 100% width and centering has no effect
|
|
987
|
+
*
|
|
988
|
+
* `default` is `false`
|
|
989
|
+
*/
|
|
990
|
+
center?: ResponsiveProp<boolean>;
|
|
991
|
+
/**
|
|
992
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
993
|
+
*/
|
|
994
|
+
asChild?: boolean;
|
|
995
|
+
}
|
|
996
|
+
export { GridItemProps }
|
|
997
|
+
export { GridItemProps as GridItemProps_alias_1 }
|
|
998
|
+
export { GridItemProps as GridItemProps_alias_2 }
|
|
999
|
+
export { GridItemProps as GridItemProps_alias_3 }
|
|
1000
|
+
export { GridItemProps as GridItemProps_alias_4 }
|
|
1001
|
+
|
|
1002
|
+
declare interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1003
|
+
children: React.ReactNode;
|
|
1004
|
+
/**
|
|
1005
|
+
* Space between grid items. Both horizontal and vertical.
|
|
1006
|
+
*
|
|
1007
|
+
* Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.
|
|
1008
|
+
*
|
|
1009
|
+
* Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.
|
|
1010
|
+
*
|
|
1011
|
+
* Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.
|
|
1012
|
+
*/
|
|
1013
|
+
gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1014
|
+
/**
|
|
1015
|
+
* Space between grid items horizontally
|
|
1016
|
+
*/
|
|
1017
|
+
gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1018
|
+
/**
|
|
1019
|
+
* Space between grid items vertically
|
|
1020
|
+
*/
|
|
1021
|
+
gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1022
|
+
/**
|
|
1023
|
+
* Column span for the grid items
|
|
1024
|
+
*
|
|
1025
|
+
* `default` is `12`
|
|
1026
|
+
*/
|
|
1027
|
+
span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Center grid items horizontally
|
|
1030
|
+
*
|
|
1031
|
+
* Offsets the start position of the grid items relative to their span so that it appears centered.
|
|
1032
|
+
*
|
|
1033
|
+
* assumes a span of 2, 4, 6, 8, or 10
|
|
1034
|
+
*
|
|
1035
|
+
* a span of `12` is 100% width and centering has no effect
|
|
1036
|
+
*
|
|
1037
|
+
* `default` is `false`
|
|
1038
|
+
*/
|
|
1039
|
+
center?: ResponsiveProp<boolean>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
1042
|
+
*/
|
|
1043
|
+
asChild?: boolean;
|
|
1044
|
+
}
|
|
1045
|
+
export { GridProps }
|
|
1046
|
+
export { GridProps as GridProps_alias_1 }
|
|
1047
|
+
export { GridProps as GridProps_alias_2 }
|
|
1048
|
+
export { GridProps as GridProps_alias_3 }
|
|
1049
|
+
export { GridProps as GridProps_alias_4 }
|
|
1050
|
+
|
|
933
1051
|
declare interface HeadingProps {
|
|
934
1052
|
variant: "h1-display" | "h1" | "h2" | "h3" | "h3-title";
|
|
935
1053
|
as: React_3.ElementType;
|
|
@@ -1728,7 +1846,24 @@ export { Stack as Stack_alias_4 }
|
|
|
1728
1846
|
|
|
1729
1847
|
declare interface StackProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
1730
1848
|
children: React_2.ReactNode;
|
|
1849
|
+
/**
|
|
1850
|
+
* Space between items. Both horizontal and vertical.
|
|
1851
|
+
*
|
|
1852
|
+
* Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.
|
|
1853
|
+
*
|
|
1854
|
+
* Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.
|
|
1855
|
+
*
|
|
1856
|
+
* Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.
|
|
1857
|
+
*/
|
|
1731
1858
|
gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1859
|
+
/**
|
|
1860
|
+
* Space between items horizontally
|
|
1861
|
+
*/
|
|
1862
|
+
gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1863
|
+
/**
|
|
1864
|
+
* Space between items vertically
|
|
1865
|
+
*/
|
|
1866
|
+
gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;
|
|
1732
1867
|
direction?: ResponsiveProp<React_2.CSSProperties["flexDirection"]>;
|
|
1733
1868
|
wrap?: ResponsiveProp<boolean>;
|
|
1734
1869
|
align?: ResponsiveProp<React_2.CSSProperties["alignItems"]>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getResponsiveProps
|
|
3
|
+
} from "./chunk-F4STR6SD.mjs";
|
|
4
|
+
import {
|
|
5
|
+
getSpacingVariable
|
|
6
|
+
} from "./chunk-NE6W2PCD.mjs";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-R4SQKVDQ.mjs";
|
|
12
|
+
|
|
13
|
+
// src/layout/grid/grid.tsx
|
|
14
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
15
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
16
|
+
import { forwardRef } from "react";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
var Grid = forwardRef(
|
|
19
|
+
(_a, ref) => {
|
|
20
|
+
var _b = _a, { children, asChild, className, span, center, style: _style, gap, gapX, gapY } = _b, rest = __objRest(_b, ["children", "asChild", "className", "span", "center", "style", "gap", "gapX", "gapY"]);
|
|
21
|
+
const Component = asChild ? Slot : "div";
|
|
22
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-grid-gap", gap, getSpacingVariable)), getResponsiveProps("--hds-grid-gap-x", gapX, getSpacingVariable)), getResponsiveProps("--hds-grid-gap-y", gapY, getSpacingVariable)), getResponsiveProps("--hds-grid-span", span)), getResponsiveProps("--hds-grid-center", center, (value) => value ? "1" : "0"));
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
Component,
|
|
25
|
+
__spreadProps(__spreadValues({
|
|
26
|
+
style,
|
|
27
|
+
className: clsx("hds-grid", className),
|
|
28
|
+
ref
|
|
29
|
+
}, rest), {
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
Grid.displayName = "Grid";
|
|
36
|
+
var GridItem = forwardRef(
|
|
37
|
+
(_a, ref) => {
|
|
38
|
+
var _b = _a, { children, asChild, className, span, center, style: _style } = _b, rest = __objRest(_b, ["children", "asChild", "className", "span", "center", "style"]);
|
|
39
|
+
const Component = asChild ? Slot : "div";
|
|
40
|
+
const style = __spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-grid-item-span", span)), getResponsiveProps("--hds-grid-item-center", center, (value) => value ? "1" : "0"));
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
Component,
|
|
43
|
+
__spreadProps(__spreadValues({
|
|
44
|
+
style,
|
|
45
|
+
className: clsx("hds-grid__item", className),
|
|
46
|
+
ref
|
|
47
|
+
}, rest), {
|
|
48
|
+
children
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
GridItem.displayName = "Grid.Item";
|
|
54
|
+
|
|
55
|
+
export {
|
|
56
|
+
Grid,
|
|
57
|
+
GridItem
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-25R7DBK6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layout/grid/grid.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\nimport { type SpacingSizes, type ResponsiveSpacingSizes, getSpacingVariable } from \"../spacing\";\n\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between grid items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between grid items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Column span for the grid items\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center grid items horizontally\n *\n * Offsets the start position of the grid items relative to their span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚧 A simple opionated abstraction over CSS Grid.\n *\n * The grid is always a 12 column grid.\n *\n * example\n * ```tsx\n * <Grid gap=\"12-16\" span={{ small: 6 }}>\n * <div>6/12</div>\n * <div>6/12</div>\n * <Grid.Item span={{ small: 12 }}>12/12</Grid.Item>\n * <div>6/12</div>\n * <div>6/12</div>\n * </Grid>\n * ```\n */\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(\n (\n { children, asChild, className, span, center, style: _style, gap, gapX, gapY, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-grid-span\", span),\n ...getResponsiveProps(\"--hds-grid-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nGrid.displayName = \"Grid\";\n\nexport interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Column span for the grid item\n *\n * `default` is `12`\n */\n span?: ResponsiveProp<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12>;\n\n /**\n * Center the grid item horizontally\n *\n * Offsets the start position of the grid item relative to it's span so that it appears centered.\n *\n * assumes a span of 2, 4, 6, 8, or 10\n *\n * a span of `12` is 100% width and centering has no effect\n *\n * `default` is `false`\n */\n center?: ResponsiveProp<boolean>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚧 Grid.Item\n *\n * Use as the direct child of a `Grid` to override `span` and `center` for individual items.\n */\nexport const GridItem = forwardRef<HTMLDivElement, GridItemProps>(\n ({ children, asChild, className, span, center, style: _style, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n const style: React.CSSProperties = {\n ..._style,\n ...getResponsiveProps(\"--hds-grid-item-span\", span),\n ...getResponsiveProps(\"--hds-grid-item-center\", center, (value) => (value ? \"1\" : \"0\")),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-grid__item\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nGridItem.displayName = \"Grid.Item\";\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAqFrB;AAfC,IAAM,OAAO;AAAA,EAClB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,SAAS,WAAW,MAAM,QAAQ,OAAO,QAAQ,KAAK,MAAM,KA1E5E,IA0EI,IAAiF,iBAAjF,IAAiF,CAA/E,YAAU,WAAS,aAAW,QAAM,UAAQ,SAAe,OAAK,QAAM;AAGxE,UAAM,YAAY,UAAU,OAAO;AACnC,UAAM,QAA6B,8FAC9B,SACA,mBAAmB,kBAAkB,KAAK,kBAAkB,IAC5D,mBAAmB,oBAAoB,MAAM,kBAAkB,IAC/D,mBAAmB,oBAAoB,MAAM,kBAAkB,IAC/D,mBAAmB,mBAAmB,IAAI,IAC1C,mBAAmB,qBAAqB,QAAQ,CAAC,UAAW,QAAQ,MAAM,GAAI;AAEnF,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,KAAK,YAAY,SAAsB;AAAA,QAClD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,KAAK,cAAc;AAoCZ,IAAM,WAAW;AAAA,EACtB,CAAC,IAAwE,QAAQ;AAAhF,iBAAE,YAAU,SAAS,WAAW,MAAM,QAAQ,OAAO,OAvIxD,IAuIG,IAAgE,iBAAhE,IAAgE,CAA9D,YAAU,WAAS,aAAW,QAAM,UAAQ;AAC7C,UAAM,YAAY,UAAU,OAAO;AACnC,UAAM,QAA6B,iDAC9B,SACA,mBAAmB,wBAAwB,IAAI,IAC/C,mBAAmB,0BAA0B,QAAQ,CAAC,UAAW,QAAQ,MAAM,GAAI;AAExF,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,KAAK,kBAAkB,SAAsB;AAAA,QACxD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-BVG5VSZK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layout/grid/index.tsx"],"sourcesContent":["import { Grid, GridItem } from \"./grid\";\n\nconst GridComponent = Grid as typeof Grid & {\n Item: typeof GridItem;\n};\n\nGridComponent.Item = GridItem;\n\nexport { GridComponent as Grid, GridItem };\n\nexport type * from \"./grid\";\n"],"mappings":";;;;;;AAEA,IAAM,gBAAgB;AAItB,cAAc,OAAO;","names":[]}
|
|
@@ -18,9 +18,33 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
19
19
|
var Stack = forwardRef(
|
|
20
20
|
(_a, ref) => {
|
|
21
|
-
var _b = _a, {
|
|
21
|
+
var _b = _a, {
|
|
22
|
+
children,
|
|
23
|
+
asChild,
|
|
24
|
+
className,
|
|
25
|
+
style: _style,
|
|
26
|
+
gap,
|
|
27
|
+
gapX,
|
|
28
|
+
gapY,
|
|
29
|
+
direction,
|
|
30
|
+
wrap,
|
|
31
|
+
align,
|
|
32
|
+
justify
|
|
33
|
+
} = _b, rest = __objRest(_b, [
|
|
34
|
+
"children",
|
|
35
|
+
"asChild",
|
|
36
|
+
"className",
|
|
37
|
+
"style",
|
|
38
|
+
"gap",
|
|
39
|
+
"gapX",
|
|
40
|
+
"gapY",
|
|
41
|
+
"direction",
|
|
42
|
+
"wrap",
|
|
43
|
+
"align",
|
|
44
|
+
"justify"
|
|
45
|
+
]);
|
|
22
46
|
const Component = asChild ? Slot : "div";
|
|
23
|
-
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-stack-gap", gap, getSpacingVariable)), getResponsiveProps("--hds-stack-direction", direction)), getResponsiveProps("--hds-stack-wrap", wrap, (value) => value ? "wrap" : "nowrap")), getResponsiveProps("--hds-stack-align", align)), getResponsiveProps("--hds-stack-justify", justify));
|
|
47
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-stack-gap", gap, getSpacingVariable)), getResponsiveProps("--hds-stack-gap-x", gapX, getSpacingVariable)), getResponsiveProps("--hds-stack-gap-y", gapY, getSpacingVariable)), getResponsiveProps("--hds-stack-direction", direction)), getResponsiveProps("--hds-stack-wrap", wrap, (value) => value ? "wrap" : "nowrap")), getResponsiveProps("--hds-stack-align", align)), getResponsiveProps("--hds-stack-justify", justify));
|
|
24
48
|
return /* @__PURE__ */ jsx(
|
|
25
49
|
Component,
|
|
26
50
|
__spreadProps(__spreadValues({
|
|
@@ -48,4 +72,4 @@ export {
|
|
|
48
72
|
HStack,
|
|
49
73
|
VStack
|
|
50
74
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
75
|
+
//# sourceMappingURL=chunk-VVPJOVFP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layout/stack/stack.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n /**\n * Space between items. Both horizontal and vertical.\n *\n * Use the responsive shorthand `12-16` to jump a level at the `large` breakpoint.\n *\n * Or use the responsive object `{ initial: 40, large: 64 }` to set different values at different breakpoints.\n *\n * Use `gapX` and `gapY` to set different values for horizontal and vertical spacing.\n */\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items horizontally\n */\n gapX?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n /**\n * Space between items vertically\n */\n gapY?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n {\n children,\n asChild,\n className,\n style: _style,\n gap,\n gapX,\n gapY,\n direction,\n wrap,\n align,\n justify,\n ...rest\n },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-x\", gapX, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-gap-y\", gapY, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAuB;AACvB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AAqFf;AA9BC,IAAM,QAAQ;AAAA,EACnB,CACE,IAcA,QACG;AAfH,iBACE;AAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAvEN,IA4DI,IAYK,iBAZL,IAYK;AAAA,MAXH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,YAAY,UAAU,OAAO;AACnC,UAAM,QAA8B,4HAC/B,SACA,mBAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,qBAAqB,MAAM,kBAAkB,IAChE,mBAAmB,qBAAqB,MAAM,kBAAkB,IAChE,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW,KAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,SAAS,WAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,oBAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,SAAS,WAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,oBAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-ZQHLYAJU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/footer/footer.mjs
CHANGED
|
@@ -9,11 +9,11 @@ import "../chunk-GJDRW6PA.mjs";
|
|
|
9
9
|
import "../chunk-PMLDK3VC.mjs";
|
|
10
10
|
import "../chunk-HT2EIJAD.mjs";
|
|
11
11
|
import "../chunk-XYIY6FHW.mjs";
|
|
12
|
+
import "../chunk-OUHO4LGN.mjs";
|
|
12
13
|
import "../chunk-GUB3UCXO.mjs";
|
|
13
14
|
import "../chunk-YXHXRUFX.mjs";
|
|
14
15
|
import "../chunk-62F4I3MQ.mjs";
|
|
15
16
|
import "../chunk-VRIY65P5.mjs";
|
|
16
|
-
import "../chunk-OUHO4LGN.mjs";
|
|
17
17
|
import "../chunk-V3PAFMK5.mjs";
|
|
18
18
|
import "../chunk-R4SQKVDQ.mjs";
|
|
19
19
|
export {
|
package/dist/footer/index.mjs
CHANGED
|
@@ -11,11 +11,11 @@ import "../chunk-GJDRW6PA.mjs";
|
|
|
11
11
|
import "../chunk-PMLDK3VC.mjs";
|
|
12
12
|
import "../chunk-HT2EIJAD.mjs";
|
|
13
13
|
import "../chunk-XYIY6FHW.mjs";
|
|
14
|
+
import "../chunk-OUHO4LGN.mjs";
|
|
14
15
|
import "../chunk-GUB3UCXO.mjs";
|
|
15
16
|
import "../chunk-YXHXRUFX.mjs";
|
|
16
17
|
import "../chunk-62F4I3MQ.mjs";
|
|
17
18
|
import "../chunk-VRIY65P5.mjs";
|
|
18
|
-
import "../chunk-OUHO4LGN.mjs";
|
|
19
19
|
import "../chunk-V3PAFMK5.mjs";
|
|
20
20
|
import "../chunk-R4SQKVDQ.mjs";
|
|
21
21
|
export {
|
package/dist/index-no-css.d.mts
CHANGED
|
@@ -65,10 +65,14 @@ export { FooterProps } from './_tsup-dts-rollup';
|
|
|
65
65
|
export { FooterButtonLinkProps } from './_tsup-dts-rollup';
|
|
66
66
|
export { ContainerProps } from './_tsup-dts-rollup';
|
|
67
67
|
export { Container } from './_tsup-dts-rollup';
|
|
68
|
-
export {
|
|
68
|
+
export { Grid } from './_tsup-dts-rollup';
|
|
69
|
+
export { GridItem } from './_tsup-dts-rollup';
|
|
70
|
+
export { GridProps } from './_tsup-dts-rollup';
|
|
71
|
+
export { GridItemProps } from './_tsup-dts-rollup';
|
|
69
72
|
export { Stack } from './_tsup-dts-rollup';
|
|
70
73
|
export { HStack } from './_tsup-dts-rollup';
|
|
71
74
|
export { VStack } from './_tsup-dts-rollup';
|
|
75
|
+
export { StackProps } from './_tsup-dts-rollup';
|
|
72
76
|
export { Link } from './_tsup-dts-rollup';
|
|
73
77
|
export { LinkProps } from './_tsup-dts-rollup';
|
|
74
78
|
export { UnorderedList } from './_tsup-dts-rollup';
|
package/dist/index-no-css.d.ts
CHANGED
|
@@ -65,10 +65,14 @@ export { FooterProps } from './_tsup-dts-rollup';
|
|
|
65
65
|
export { FooterButtonLinkProps } from './_tsup-dts-rollup';
|
|
66
66
|
export { ContainerProps } from './_tsup-dts-rollup';
|
|
67
67
|
export { Container } from './_tsup-dts-rollup';
|
|
68
|
-
export {
|
|
68
|
+
export { Grid } from './_tsup-dts-rollup';
|
|
69
|
+
export { GridItem } from './_tsup-dts-rollup';
|
|
70
|
+
export { GridProps } from './_tsup-dts-rollup';
|
|
71
|
+
export { GridItemProps } from './_tsup-dts-rollup';
|
|
69
72
|
export { Stack } from './_tsup-dts-rollup';
|
|
70
73
|
export { HStack } from './_tsup-dts-rollup';
|
|
71
74
|
export { VStack } from './_tsup-dts-rollup';
|
|
75
|
+
export { StackProps } from './_tsup-dts-rollup';
|
|
72
76
|
export { Link } from './_tsup-dts-rollup';
|
|
73
77
|
export { LinkProps } from './_tsup-dts-rollup';
|
|
74
78
|
export { UnorderedList } from './_tsup-dts-rollup';
|