@entur/layout 3.3.3 → 3.4.0-beta.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/beta/cjs/Contrast.cjs +21 -0
- package/dist/beta/cjs/Contrast.cjs.map +1 -0
- package/dist/beta/cjs/Flex/Flex.cjs +111 -0
- package/dist/beta/cjs/Flex/Flex.cjs.map +1 -0
- package/dist/beta/cjs/Flex/FlexSpacer.cjs +25 -0
- package/dist/beta/cjs/Flex/FlexSpacer.cjs.map +1 -0
- package/dist/beta/cjs/Flex/index.cjs +12 -0
- package/dist/beta/cjs/Flex/index.cjs.map +1 -0
- package/dist/beta/cjs/Grid/Grid.cjs +65 -0
- package/dist/beta/cjs/Grid/Grid.cjs.map +1 -0
- package/dist/beta/cjs/Grid/GridItem.cjs +49 -0
- package/dist/beta/cjs/Grid/GridItem.cjs.map +1 -0
- package/dist/beta/cjs/Grid/index.cjs +12 -0
- package/dist/beta/cjs/Grid/index.cjs.map +1 -0
- package/dist/beta/cjs/LayoutWrapper/LayoutWrapper.cjs +31 -0
- package/dist/beta/cjs/LayoutWrapper/LayoutWrapper.cjs.map +1 -0
- package/dist/beta/cjs/LayoutWrapper/useLayoutValues.cjs +15 -0
- package/dist/beta/cjs/LayoutWrapper/useLayoutValues.cjs.map +1 -0
- package/dist/beta/cjs/LayoutWrapper/useResponsiveValue.cjs +78 -0
- package/dist/beta/cjs/LayoutWrapper/useResponsiveValue.cjs.map +1 -0
- package/dist/beta/cjs/LayoutWrapper/utils.cjs +49 -0
- package/dist/beta/cjs/LayoutWrapper/utils.cjs.map +1 -0
- package/dist/beta/cjs/index.cjs +18 -0
- package/dist/beta/cjs/index.cjs.map +1 -0
- package/dist/beta/cjs/templates/Sidebar.cjs +90 -0
- package/dist/beta/cjs/templates/Sidebar.cjs.map +1 -0
- package/dist/beta/cjs/templates/index.cjs +8 -0
- package/dist/beta/cjs/templates/index.cjs.map +1 -0
- package/dist/beta/cjs/templates/portal/Portal.cjs +51 -0
- package/dist/beta/cjs/templates/portal/Portal.cjs.map +1 -0
- package/dist/beta/esm/Contrast.mjs +21 -0
- package/dist/beta/esm/Contrast.mjs.map +1 -0
- package/dist/beta/esm/Flex/Flex.mjs +111 -0
- package/dist/beta/esm/Flex/Flex.mjs.map +1 -0
- package/dist/beta/esm/Flex/FlexSpacer.mjs +25 -0
- package/dist/beta/esm/Flex/FlexSpacer.mjs.map +1 -0
- package/dist/beta/esm/Flex/index.mjs +12 -0
- package/dist/beta/esm/Flex/index.mjs.map +1 -0
- package/dist/beta/esm/Grid/Grid.mjs +65 -0
- package/dist/beta/esm/Grid/Grid.mjs.map +1 -0
- package/dist/beta/esm/Grid/GridItem.mjs +49 -0
- package/dist/beta/esm/Grid/GridItem.mjs.map +1 -0
- package/dist/beta/esm/Grid/index.mjs +12 -0
- package/dist/beta/esm/Grid/index.mjs.map +1 -0
- package/dist/beta/esm/LayoutWrapper/LayoutWrapper.mjs +31 -0
- package/dist/beta/esm/LayoutWrapper/LayoutWrapper.mjs.map +1 -0
- package/dist/beta/esm/LayoutWrapper/useLayoutValues.mjs +15 -0
- package/dist/beta/esm/LayoutWrapper/useLayoutValues.mjs.map +1 -0
- package/dist/beta/esm/LayoutWrapper/useResponsiveValue.mjs +78 -0
- package/dist/beta/esm/LayoutWrapper/useResponsiveValue.mjs.map +1 -0
- package/dist/beta/esm/LayoutWrapper/utils.mjs +49 -0
- package/dist/beta/esm/LayoutWrapper/utils.mjs.map +1 -0
- package/dist/beta/esm/index.mjs +18 -0
- package/dist/beta/esm/index.mjs.map +1 -0
- package/dist/beta/esm/templates/Sidebar.mjs +90 -0
- package/dist/beta/esm/templates/Sidebar.mjs.map +1 -0
- package/dist/beta/esm/templates/index.mjs +8 -0
- package/dist/beta/esm/templates/index.mjs.map +1 -0
- package/dist/beta/esm/templates/portal/Portal.mjs +51 -0
- package/dist/beta/esm/templates/portal/Portal.mjs.map +1 -0
- package/dist/beta/styles/index.css +186 -0
- package/dist/beta/types/Flex/Flex.d.ts +65 -0
- package/dist/beta/types/Flex/FlexSpacer.d.ts +16 -0
- package/dist/beta/types/Flex/index.d.ts +24 -0
- package/dist/beta/types/Grid/Grid.d.ts +37 -0
- package/dist/beta/types/Grid/GridItem.d.ts +28 -0
- package/dist/beta/types/Grid/index.d.ts +29 -0
- package/dist/beta/types/LayoutWrapper/LayoutWrapper.d.ts +13 -0
- package/dist/beta/types/LayoutWrapper/index.d.ts +6 -0
- package/dist/beta/types/LayoutWrapper/useLayoutValues.d.ts +2 -0
- package/dist/beta/types/LayoutWrapper/useResponsiveValue.d.ts +2 -0
- package/dist/beta/types/LayoutWrapper/utils.d.ts +15 -0
- package/dist/beta/types/index.d.ts +7 -0
- package/dist/beta/types/templates/Sidebar.d.ts +21 -0
- package/dist/beta/types/templates/index.d.ts +7 -0
- package/dist/beta/types/templates/portal/Portal.d.ts +12 -0
- package/dist/beta/types/templates/portal/index.d.ts +2 -0
- package/package.json +27 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const classNames = require("classnames");
|
|
6
|
+
const defaultElement = "div";
|
|
7
|
+
const Contrast = React.forwardRef(function Contrast2({ className, as, ...rest }, ref) {
|
|
8
|
+
const Element = as || defaultElement;
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ContrastContext.Provider, { value: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
+
Element,
|
|
11
|
+
{
|
|
12
|
+
className: classNames("eds-contrast", className),
|
|
13
|
+
ref,
|
|
14
|
+
...rest
|
|
15
|
+
}
|
|
16
|
+
) });
|
|
17
|
+
});
|
|
18
|
+
const ContrastContext = React.createContext(false);
|
|
19
|
+
exports.Contrast = Contrast;
|
|
20
|
+
exports.ContrastContext = ContrastContext;
|
|
21
|
+
//# sourceMappingURL=Contrast.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contrast.cjs","sources":["../../../src/Contrast.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentPropsWithRef, PolymorphicRef } from '@entur/utils';\n\nexport type ContrastBaseProps = {\n /** Ekstra klassenavn */\n className?: string;\n};\n\nexport type ContrastProps<T extends React.ElementType> =\n PolymorphicComponentPropsWithRef<T, ContrastBaseProps>;\n\nexport type ContrastComponent = <\n T extends React.ElementType = typeof defaultElement,\n>(\n props: ContrastProps<T>,\n) => React.ReactElement | null;\n\nconst defaultElement = 'div';\n\nexport const Contrast: ContrastComponent = React.forwardRef(function Contrast<\n T extends React.ElementType = typeof defaultElement,\n>(\n { className, as, ...rest }: ContrastProps<T>,\n ref: PolymorphicRef<T>,\n): JSX.Element {\n const Element: React.ElementType = as || defaultElement;\n return (\n <ContrastContext.Provider value={true}>\n <Element\n className={classNames('eds-contrast', className)}\n ref={ref}\n {...rest}\n />\n </ContrastContext.Provider>\n );\n});\n\nexport const ContrastContext = React.createContext<boolean>(false);\n\nexport const useContrast: () => boolean = () =>\n React.useContext(ContrastContext);\n"],"names":["Contrast","jsx"],"mappings":";;;;;AAkBA,MAAM,iBAAiB;AAEhB,MAAM,WAA8B,MAAM,WAAW,SAASA,UAGnE,EAAE,WAAW,IAAI,GAAG,KAAA,GACpB,KACa;AACb,QAAM,UAA6B,MAAM;AACzC,SACEC,2BAAAA,IAAC,gBAAgB,UAAhB,EAAyB,OAAO,MAC/B,UAAAA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,gBAAgB,SAAS;AAAA,MAC/C;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA,GAER;AAEJ,CAAC;AAEM,MAAM,kBAAkB,MAAM,cAAuB,KAAK;;;"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const classNames = require("classnames");
|
|
5
|
+
const utils = require("../LayoutWrapper/utils.cjs");
|
|
6
|
+
const useResponsiveValue = require("../LayoutWrapper/useResponsiveValue.cjs");
|
|
7
|
+
;/* empty css */
|
|
8
|
+
const defaultElement = "div";
|
|
9
|
+
const Flex = ({
|
|
10
|
+
direction,
|
|
11
|
+
wrap,
|
|
12
|
+
align,
|
|
13
|
+
justify,
|
|
14
|
+
alignContent,
|
|
15
|
+
gap,
|
|
16
|
+
rowGap,
|
|
17
|
+
columnGap,
|
|
18
|
+
flex,
|
|
19
|
+
grow,
|
|
20
|
+
shrink,
|
|
21
|
+
basis,
|
|
22
|
+
width,
|
|
23
|
+
height,
|
|
24
|
+
minWidth,
|
|
25
|
+
minHeight,
|
|
26
|
+
maxWidth,
|
|
27
|
+
maxHeight,
|
|
28
|
+
as,
|
|
29
|
+
className,
|
|
30
|
+
children,
|
|
31
|
+
style,
|
|
32
|
+
...rest
|
|
33
|
+
}) => {
|
|
34
|
+
const Element = as || defaultElement;
|
|
35
|
+
const resolvedDirection = useResponsiveValue.useResponsiveValue(direction);
|
|
36
|
+
const resolvedWrap = useResponsiveValue.useResponsiveValue(wrap);
|
|
37
|
+
const resolvedAlign = useResponsiveValue.useResponsiveValue(align);
|
|
38
|
+
const resolvedJustify = useResponsiveValue.useResponsiveValue(justify);
|
|
39
|
+
const resolvedAlignContent = useResponsiveValue.useResponsiveValue(alignContent);
|
|
40
|
+
const resolvedGap = useResponsiveValue.useResponsiveValue(gap);
|
|
41
|
+
const resolvedRowGap = useResponsiveValue.useResponsiveValue(rowGap);
|
|
42
|
+
const resolvedColumnGap = useResponsiveValue.useResponsiveValue(columnGap);
|
|
43
|
+
const flexStyle = {
|
|
44
|
+
...resolvedDirection && {
|
|
45
|
+
"--flex-direction": resolvedDirection
|
|
46
|
+
},
|
|
47
|
+
...resolvedWrap && {
|
|
48
|
+
"--flex-wrap": resolvedWrap
|
|
49
|
+
},
|
|
50
|
+
...resolvedAlign && {
|
|
51
|
+
"--flex-align-items": resolvedAlign
|
|
52
|
+
},
|
|
53
|
+
...resolvedJustify && {
|
|
54
|
+
"--flex-justify-content": resolvedJustify
|
|
55
|
+
},
|
|
56
|
+
...resolvedAlignContent && {
|
|
57
|
+
"--flex-align-content": resolvedAlignContent
|
|
58
|
+
},
|
|
59
|
+
...resolvedGap && {
|
|
60
|
+
"--flex-gap": utils.getSpacingValue(resolvedGap, "Flex")
|
|
61
|
+
},
|
|
62
|
+
...resolvedRowGap && {
|
|
63
|
+
"--flex-row-gap": utils.getSpacingValue(resolvedRowGap, "Flex")
|
|
64
|
+
},
|
|
65
|
+
...resolvedColumnGap && {
|
|
66
|
+
"--flex-column-gap": utils.getSpacingValue(resolvedColumnGap, "Flex")
|
|
67
|
+
},
|
|
68
|
+
...flex !== void 0 && {
|
|
69
|
+
"--flex": flex
|
|
70
|
+
},
|
|
71
|
+
...grow !== void 0 && {
|
|
72
|
+
"--flex-grow": grow
|
|
73
|
+
},
|
|
74
|
+
...shrink !== void 0 && {
|
|
75
|
+
"--flex-shrink": shrink
|
|
76
|
+
},
|
|
77
|
+
...basis !== void 0 && {
|
|
78
|
+
"--flex-basis": basis
|
|
79
|
+
},
|
|
80
|
+
...width && {
|
|
81
|
+
"--flex-width": width
|
|
82
|
+
},
|
|
83
|
+
...height && {
|
|
84
|
+
"--flex-height": height
|
|
85
|
+
},
|
|
86
|
+
...minWidth && {
|
|
87
|
+
"--flex-min-width": minWidth
|
|
88
|
+
},
|
|
89
|
+
...minHeight && {
|
|
90
|
+
"--flex-min-height": minHeight
|
|
91
|
+
},
|
|
92
|
+
...maxWidth && {
|
|
93
|
+
"--flex-max-width": maxWidth
|
|
94
|
+
},
|
|
95
|
+
...maxHeight && {
|
|
96
|
+
"--flex-max-height": maxHeight
|
|
97
|
+
},
|
|
98
|
+
...style
|
|
99
|
+
};
|
|
100
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
+
Element,
|
|
102
|
+
{
|
|
103
|
+
className: classNames("eds-layout-flex", className),
|
|
104
|
+
style: flexStyle,
|
|
105
|
+
...rest,
|
|
106
|
+
children
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
};
|
|
110
|
+
exports.Flex = Flex;
|
|
111
|
+
//# sourceMappingURL=Flex.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.cjs","sources":["../../../../src/beta/Flex/Flex.tsx"],"sourcesContent":["import React from 'react';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport classNames from 'classnames';\nimport { getSpacingValue } from '../LayoutWrapper/utils';\nimport type { GridSpacingValue, ResponsiveValue } from '../LayoutWrapper/utils';\nimport { useResponsiveValue } from '../LayoutWrapper/useResponsiveValue';\n\nimport './Flex.scss';\n\nexport type FlexSpacingValue = GridSpacingValue;\n\ntype FlexDirection = React.CSSProperties['flexDirection'];\ntype FlexWrap = React.CSSProperties['flexWrap'];\ntype AlignItems = React.CSSProperties['alignItems'];\ntype JustifyContent = React.CSSProperties['justifyContent'];\ntype AlignContent = React.CSSProperties['alignContent'];\ntype FlexBasis = React.CSSProperties['flexBasis'];\ntype FlexValue = React.CSSProperties['flex'];\n\nexport type FlexOwnProps = {\n /** CSS flex-direction value (supports responsive objects)\n * @default \"row\"\n */\n direction?: FlexDirection | ResponsiveValue<FlexDirection>;\n /** CSS flex-wrap value (supports responsive objects)\n * @default \"nowrap\"\n */\n wrap?: FlexWrap | ResponsiveValue<FlexWrap>;\n /** CSS align-items value (supports responsive objects) */\n align?: AlignItems | ResponsiveValue<AlignItems>;\n /** CSS justify-content value (supports responsive objects) */\n justify?: JustifyContent | ResponsiveValue<JustifyContent>;\n /** CSS align-content value (supports responsive objects) */\n alignContent?: AlignContent | ResponsiveValue<AlignContent>;\n /** Spacing between flex items (supports responsive objects) */\n gap?: FlexSpacingValue | ResponsiveValue<FlexSpacingValue>;\n /** Vertical spacing between rows (supports responsive objects) */\n rowGap?: FlexSpacingValue | ResponsiveValue<FlexSpacingValue>;\n /** Horizontal spacing between columns (supports responsive objects) */\n columnGap?: FlexSpacingValue | ResponsiveValue<FlexSpacingValue>;\n /** CSS flex shorthand value */\n flex?: FlexValue;\n /** CSS flex-grow value */\n grow?: number;\n /** CSS flex-shrink value */\n shrink?: number;\n /** CSS flex-basis value */\n basis?: FlexBasis;\n /** CSS width value */\n width?: string;\n /** CSS height value */\n height?: string;\n /** CSS min-width value */\n minWidth?: string;\n /** CSS min-height value */\n minHeight?: string;\n /** CSS max-width value */\n maxWidth?: string;\n /** CSS max-height value */\n maxHeight?: string;\n /** HTML element or React component used to render the Flex container\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Additional class names */\n className?: string;\n /** Content of the Flex container */\n children?: React.ReactNode;\n};\n\nexport type FlexProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, FlexOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Flex = <E extends React.ElementType = typeof defaultElement>({\n direction,\n wrap,\n align,\n justify,\n alignContent,\n gap,\n rowGap,\n columnGap,\n flex,\n grow,\n shrink,\n basis,\n width,\n height,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n as,\n className,\n children,\n style,\n ...rest\n}: FlexProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n\n const resolvedDirection = useResponsiveValue(direction);\n const resolvedWrap = useResponsiveValue(wrap);\n const resolvedAlign = useResponsiveValue(align);\n const resolvedJustify = useResponsiveValue(justify);\n const resolvedAlignContent = useResponsiveValue(alignContent);\n const resolvedGap = useResponsiveValue(gap);\n const resolvedRowGap = useResponsiveValue(rowGap);\n const resolvedColumnGap = useResponsiveValue(columnGap);\n\n const flexStyle: React.CSSProperties = {\n ...(resolvedDirection && {\n '--flex-direction': resolvedDirection,\n }),\n ...(resolvedWrap && {\n '--flex-wrap': resolvedWrap,\n }),\n ...(resolvedAlign && {\n '--flex-align-items': resolvedAlign,\n }),\n ...(resolvedJustify && {\n '--flex-justify-content': resolvedJustify,\n }),\n ...(resolvedAlignContent && {\n '--flex-align-content': resolvedAlignContent,\n }),\n ...(resolvedGap && {\n '--flex-gap': getSpacingValue(resolvedGap, 'Flex'),\n }),\n ...(resolvedRowGap && {\n '--flex-row-gap': getSpacingValue(resolvedRowGap, 'Flex'),\n }),\n ...(resolvedColumnGap && {\n '--flex-column-gap': getSpacingValue(resolvedColumnGap, 'Flex'),\n }),\n ...(flex !== undefined && {\n '--flex': flex,\n }),\n ...(grow !== undefined && {\n '--flex-grow': grow,\n }),\n ...(shrink !== undefined && {\n '--flex-shrink': shrink,\n }),\n ...(basis !== undefined && {\n '--flex-basis': basis,\n }),\n ...(width && {\n '--flex-width': width,\n }),\n ...(height && {\n '--flex-height': height,\n }),\n ...(minWidth && {\n '--flex-min-width': minWidth,\n }),\n ...(minHeight && {\n '--flex-min-height': minHeight,\n }),\n ...(maxWidth && {\n '--flex-max-width': maxWidth,\n }),\n ...(maxHeight && {\n '--flex-max-height': maxHeight,\n }),\n ...style,\n } as React.CSSProperties;\n\n return (\n <Element\n className={classNames('eds-layout-flex', className)}\n style={flexStyle}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n"],"names":["useResponsiveValue","getSpacingValue","jsx"],"mappings":";;;;;;;AAyEA,MAAM,iBAAiB;AAEhB,MAAM,OAAO,CAAsD;AAAA,EACxE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAiC;AAC/B,QAAM,UAA6B,MAAM;AAEzC,QAAM,oBAAoBA,mBAAAA,mBAAmB,SAAS;AACtD,QAAM,eAAeA,mBAAAA,mBAAmB,IAAI;AAC5C,QAAM,gBAAgBA,mBAAAA,mBAAmB,KAAK;AAC9C,QAAM,kBAAkBA,mBAAAA,mBAAmB,OAAO;AAClD,QAAM,uBAAuBA,mBAAAA,mBAAmB,YAAY;AAC5D,QAAM,cAAcA,mBAAAA,mBAAmB,GAAG;AAC1C,QAAM,iBAAiBA,mBAAAA,mBAAmB,MAAM;AAChD,QAAM,oBAAoBA,mBAAAA,mBAAmB,SAAS;AAEtD,QAAM,YAAiC;AAAA,IACrC,GAAI,qBAAqB;AAAA,MACvB,oBAAoB;AAAA,IAAA;AAAA,IAEtB,GAAI,gBAAgB;AAAA,MAClB,eAAe;AAAA,IAAA;AAAA,IAEjB,GAAI,iBAAiB;AAAA,MACnB,sBAAsB;AAAA,IAAA;AAAA,IAExB,GAAI,mBAAmB;AAAA,MACrB,0BAA0B;AAAA,IAAA;AAAA,IAE5B,GAAI,wBAAwB;AAAA,MAC1B,wBAAwB;AAAA,IAAA;AAAA,IAE1B,GAAI,eAAe;AAAA,MACjB,cAAcC,MAAAA,gBAAgB,aAAa,MAAM;AAAA,IAAA;AAAA,IAEnD,GAAI,kBAAkB;AAAA,MACpB,kBAAkBA,MAAAA,gBAAgB,gBAAgB,MAAM;AAAA,IAAA;AAAA,IAE1D,GAAI,qBAAqB;AAAA,MACvB,qBAAqBA,MAAAA,gBAAgB,mBAAmB,MAAM;AAAA,IAAA;AAAA,IAEhE,GAAI,SAAS,UAAa;AAAA,MACxB,UAAU;AAAA,IAAA;AAAA,IAEZ,GAAI,SAAS,UAAa;AAAA,MACxB,eAAe;AAAA,IAAA;AAAA,IAEjB,GAAI,WAAW,UAAa;AAAA,MAC1B,iBAAiB;AAAA,IAAA;AAAA,IAEnB,GAAI,UAAU,UAAa;AAAA,MACzB,gBAAgB;AAAA,IAAA;AAAA,IAElB,GAAI,SAAS;AAAA,MACX,gBAAgB;AAAA,IAAA;AAAA,IAElB,GAAI,UAAU;AAAA,MACZ,iBAAiB;AAAA,IAAA;AAAA,IAEnB,GAAI,YAAY;AAAA,MACd,oBAAoB;AAAA,IAAA;AAAA,IAEtB,GAAI,aAAa;AAAA,MACf,qBAAqB;AAAA,IAAA;AAAA,IAEvB,GAAI,YAAY;AAAA,MACd,oBAAoB;AAAA,IAAA;AAAA,IAEtB,GAAI,aAAa;AAAA,MACf,qBAAqB;AAAA,IAAA;AAAA,IAEvB,GAAG;AAAA,EAAA;AAGL,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,mBAAmB,SAAS;AAAA,MAClD,OAAO;AAAA,MACN,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const classNames = require("classnames");
|
|
5
|
+
const defaultElement = "div";
|
|
6
|
+
const FlexSpacer = ({
|
|
7
|
+
as,
|
|
8
|
+
className,
|
|
9
|
+
style,
|
|
10
|
+
...rest
|
|
11
|
+
}) => {
|
|
12
|
+
const Element = as || defaultElement;
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
+
Element,
|
|
15
|
+
{
|
|
16
|
+
className: classNames("eds-layout-flex-spacer", className),
|
|
17
|
+
style,
|
|
18
|
+
...rest,
|
|
19
|
+
role: "presentation",
|
|
20
|
+
"aria-hidden": "true"
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
exports.FlexSpacer = FlexSpacer;
|
|
25
|
+
//# sourceMappingURL=FlexSpacer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlexSpacer.cjs","sources":["../../../../src/beta/Flex/FlexSpacer.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { PolymorphicComponentProps } from '@entur/utils';\n\nexport type FlexSpacerOwnProps = {\n /** HTML element or React component used to render Flex.Spacer\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Additional class name */\n className?: string;\n /** Spacer should not render children */\n children?: never;\n};\n\nexport type FlexSpacerProps<\n T extends React.ElementType = typeof defaultElement,\n> = PolymorphicComponentProps<T, FlexSpacerOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const FlexSpacer = <\n E extends React.ElementType = typeof defaultElement,\n>({\n as,\n className,\n style,\n ...rest\n}: FlexSpacerProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n\n return (\n <Element\n className={classNames('eds-layout-flex-spacer', className)}\n style={style}\n {...rest}\n role=\"presentation\"\n aria-hidden=\"true\"\n ></Element>\n );\n};\n"],"names":["jsx"],"mappings":";;;;AAmBA,MAAM,iBAAiB;AAEhB,MAAM,aAAa,CAExB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAuC;AACrC,QAAM,UAA6B,MAAM;AAEzC,SACEA,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,0BAA0B,SAAS;AAAA,MACzD;AAAA,MACC,GAAG;AAAA,MACJ,MAAK;AAAA,MACL,eAAY;AAAA,IAAA;AAAA,EAAA;AAGlB;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Flex = require("./Flex.cjs");
|
|
4
|
+
const FlexSpacer = require("./FlexSpacer.cjs");
|
|
5
|
+
const FlexComponent = Object.assign(Flex.Flex, {
|
|
6
|
+
Spacer: FlexSpacer.FlexSpacer
|
|
7
|
+
});
|
|
8
|
+
FlexComponent.Spacer.displayName = "Flex.Spacer";
|
|
9
|
+
exports.FlexSpacer = FlexSpacer.FlexSpacer;
|
|
10
|
+
exports.Flex = FlexComponent;
|
|
11
|
+
exports.FlexComponent = FlexComponent;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/beta/Flex/index.ts"],"sourcesContent":["import { Flex as FlexParent } from './Flex';\nimport { FlexSpacer } from './FlexSpacer';\n\ntype Flex = typeof FlexParent & {\n /**\n * A spacer element that fills available space in Flex.\n *\n * @example\n * <Flex>\n * <Button>Left</Button>\n * <Flex.Spacer />\n * <Button>Right</Button>\n * </Flex>\n */\n Spacer: typeof FlexSpacer & { displayName?: string };\n};\n\n/**\n * A Flex component for organizing content in a flexible layout.\n */\nexport const FlexComponent: Flex = Object.assign(FlexParent, {\n Spacer: FlexSpacer,\n});\n\nFlexComponent.Spacer.displayName = 'Flex.Spacer';\n\nexport type { FlexProps, FlexOwnProps, FlexSpacingValue } from './Flex';\nexport type { FlexSpacerProps, FlexSpacerOwnProps } from './FlexSpacer';\nexport { FlexComponent as Flex, FlexSpacer };\n"],"names":["FlexParent","FlexSpacer"],"mappings":";;;;AAoBO,MAAM,gBAAsB,OAAO,OAAOA,WAAY;AAAA,EAC3D,QAAQC,WAAAA;AACV,CAAC;AAED,cAAc,OAAO,cAAc;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const utils = require("../LayoutWrapper/utils.cjs");
|
|
5
|
+
const useResponsiveValue = require("../LayoutWrapper/useResponsiveValue.cjs");
|
|
6
|
+
const classNames = require("classnames");
|
|
7
|
+
;/* empty css */
|
|
8
|
+
const defaultElement = "div";
|
|
9
|
+
const Grid = ({
|
|
10
|
+
templateColumns,
|
|
11
|
+
templateRows,
|
|
12
|
+
gap = "m",
|
|
13
|
+
rowGap,
|
|
14
|
+
columnGap,
|
|
15
|
+
autoFlow = "row",
|
|
16
|
+
height,
|
|
17
|
+
as,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
style,
|
|
21
|
+
...rest
|
|
22
|
+
}) => {
|
|
23
|
+
const Element = as || defaultElement;
|
|
24
|
+
const resolvedTemplateColumns = useResponsiveValue.useResponsiveValue(templateColumns) ?? "repeat(12, 1fr)";
|
|
25
|
+
const resolvedTemplateRows = useResponsiveValue.useResponsiveValue(templateRows);
|
|
26
|
+
const resolvedGap = useResponsiveValue.useResponsiveValue(gap);
|
|
27
|
+
const resolvedRowGap = useResponsiveValue.useResponsiveValue(rowGap);
|
|
28
|
+
const resolvedColumnGap = useResponsiveValue.useResponsiveValue(columnGap);
|
|
29
|
+
const resolvedAutoFlow = useResponsiveValue.useResponsiveValue(autoFlow) ?? "row";
|
|
30
|
+
const gridStyle = {
|
|
31
|
+
...resolvedTemplateColumns && {
|
|
32
|
+
"--grid-template-columns": resolvedTemplateColumns
|
|
33
|
+
},
|
|
34
|
+
...resolvedTemplateRows && {
|
|
35
|
+
"--grid-template-rows": resolvedTemplateRows
|
|
36
|
+
},
|
|
37
|
+
...resolvedAutoFlow && {
|
|
38
|
+
"--grid-auto-flow": resolvedAutoFlow
|
|
39
|
+
},
|
|
40
|
+
...resolvedGap && {
|
|
41
|
+
"--grid-gap": utils.getSpacingValue(resolvedGap)
|
|
42
|
+
},
|
|
43
|
+
...resolvedRowGap && {
|
|
44
|
+
"--grid-row-gap": utils.getSpacingValue(resolvedRowGap)
|
|
45
|
+
},
|
|
46
|
+
...resolvedColumnGap && {
|
|
47
|
+
"--grid-column-gap": utils.getSpacingValue(resolvedColumnGap)
|
|
48
|
+
},
|
|
49
|
+
...height && {
|
|
50
|
+
"--grid-height": height
|
|
51
|
+
},
|
|
52
|
+
...style
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
Element,
|
|
56
|
+
{
|
|
57
|
+
className: classNames("eds-layout-grid", className),
|
|
58
|
+
style: gridStyle,
|
|
59
|
+
...rest,
|
|
60
|
+
children
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
exports.Grid = Grid;
|
|
65
|
+
//# sourceMappingURL=Grid.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.cjs","sources":["../../../../src/beta/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport { getSpacingValue } from '../LayoutWrapper/utils';\nimport type { GridSpacingValue, ResponsiveValue } from '../LayoutWrapper/utils';\nimport { useResponsiveValue } from '../LayoutWrapper/useResponsiveValue';\nimport classNames from 'classnames';\n\nimport './Grid.scss';\n\nexport type GridOwnProps = {\n /** CSS grid-template-columns value (supports responsive objects)\n * @default \"repeat(12, 1fr)\"\n */\n templateColumns?: string | ResponsiveValue<string>;\n /** Spacing between grid items (supports responsive objects)\n * @default \"m\"\n */\n gap?: GridSpacingValue | ResponsiveValue<GridSpacingValue>;\n /** Vertical spacing between grid rows (supports responsive objects) */\n rowGap?: GridSpacingValue | ResponsiveValue<GridSpacingValue>;\n /** Horizontal spacing between grid columns (supports responsive objects) */\n columnGap?: GridSpacingValue | ResponsiveValue<GridSpacingValue>;\n /** CSS grid-template-rows value (supports responsive objects) */\n templateRows?: string | ResponsiveValue<string>;\n /** CSS grid-auto-flow value (supports responsive objects)\n * @default \"row\"\n */\n autoFlow?:\n | 'row'\n | 'column'\n | 'dense'\n | 'row dense'\n | 'column dense'\n | ResponsiveValue<\n 'row' | 'column' | 'dense' | 'row dense' | 'column dense'\n >;\n /** The height of the grid container */\n height?: string;\n /** HTML element or React component used to render the Grid\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Additional class names */\n className?: string;\n /** Content of the Grid container */\n children?: React.ReactNode;\n};\n\nexport type GridProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridOwnProps>;\n\nconst defaultElement = 'div';\n\nexport const Grid = <E extends React.ElementType = typeof defaultElement>({\n templateColumns,\n templateRows,\n gap = 'm',\n rowGap,\n columnGap,\n autoFlow = 'row',\n height,\n as,\n className,\n children,\n style,\n ...rest\n}: GridProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n\n const resolvedTemplateColumns =\n useResponsiveValue(templateColumns) ?? 'repeat(12, 1fr)';\n const resolvedTemplateRows = useResponsiveValue(templateRows);\n const resolvedGap = useResponsiveValue(gap);\n const resolvedRowGap = useResponsiveValue(rowGap);\n const resolvedColumnGap = useResponsiveValue(columnGap);\n const resolvedAutoFlow = useResponsiveValue(autoFlow) ?? 'row';\n\n const gridStyle: React.CSSProperties = {\n ...(resolvedTemplateColumns && {\n '--grid-template-columns': resolvedTemplateColumns,\n }),\n ...(resolvedTemplateRows && {\n '--grid-template-rows': resolvedTemplateRows,\n }),\n ...(resolvedAutoFlow && {\n '--grid-auto-flow': resolvedAutoFlow,\n }),\n ...(resolvedGap && {\n '--grid-gap': getSpacingValue(resolvedGap),\n }),\n ...(resolvedRowGap && {\n '--grid-row-gap': getSpacingValue(resolvedRowGap),\n }),\n ...(resolvedColumnGap && {\n '--grid-column-gap': getSpacingValue(resolvedColumnGap),\n }),\n ...(height && {\n '--grid-height': height,\n }),\n ...style,\n } as React.CSSProperties;\n\n return (\n <Element\n className={classNames('eds-layout-grid', className)}\n style={gridStyle}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n"],"names":["useResponsiveValue","getSpacingValue","jsx"],"mappings":";;;;;;;AAmDA,MAAM,iBAAiB;AAEhB,MAAM,OAAO,CAAsD;AAAA,EACxE;AAAA,EACA;AAAA,EACA,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAiC;AAC/B,QAAM,UAA6B,MAAM;AAEzC,QAAM,0BACJA,mBAAAA,mBAAmB,eAAe,KAAK;AACzC,QAAM,uBAAuBA,mBAAAA,mBAAmB,YAAY;AAC5D,QAAM,cAAcA,mBAAAA,mBAAmB,GAAG;AAC1C,QAAM,iBAAiBA,mBAAAA,mBAAmB,MAAM;AAChD,QAAM,oBAAoBA,mBAAAA,mBAAmB,SAAS;AACtD,QAAM,mBAAmBA,mBAAAA,mBAAmB,QAAQ,KAAK;AAEzD,QAAM,YAAiC;AAAA,IACrC,GAAI,2BAA2B;AAAA,MAC7B,2BAA2B;AAAA,IAAA;AAAA,IAE7B,GAAI,wBAAwB;AAAA,MAC1B,wBAAwB;AAAA,IAAA;AAAA,IAE1B,GAAI,oBAAoB;AAAA,MACtB,oBAAoB;AAAA,IAAA;AAAA,IAEtB,GAAI,eAAe;AAAA,MACjB,cAAcC,MAAAA,gBAAgB,WAAW;AAAA,IAAA;AAAA,IAE3C,GAAI,kBAAkB;AAAA,MACpB,kBAAkBA,MAAAA,gBAAgB,cAAc;AAAA,IAAA;AAAA,IAElD,GAAI,qBAAqB;AAAA,MACvB,qBAAqBA,MAAAA,gBAAgB,iBAAiB;AAAA,IAAA;AAAA,IAExD,GAAI,UAAU;AAAA,MACZ,iBAAiB;AAAA,IAAA;AAAA,IAEnB,GAAG;AAAA,EAAA;AAGL,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,mBAAmB,SAAS;AAAA,MAClD,OAAO;AAAA,MACN,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const useResponsiveValue = require("../LayoutWrapper/useResponsiveValue.cjs");
|
|
5
|
+
const classNames = require("classnames");
|
|
6
|
+
;/* empty css */
|
|
7
|
+
const defaultElement = "div";
|
|
8
|
+
const formatGridSpan = (value) => {
|
|
9
|
+
if (value === void 0) {
|
|
10
|
+
return void 0;
|
|
11
|
+
}
|
|
12
|
+
if (typeof value === "number") {
|
|
13
|
+
return `span ${value}`;
|
|
14
|
+
}
|
|
15
|
+
return value;
|
|
16
|
+
};
|
|
17
|
+
const GridItem = ({
|
|
18
|
+
colSpan,
|
|
19
|
+
rowSpan = 1,
|
|
20
|
+
as,
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
style,
|
|
24
|
+
...rest
|
|
25
|
+
}) => {
|
|
26
|
+
const Element = as || defaultElement;
|
|
27
|
+
const resolvedColSpan = useResponsiveValue.useResponsiveValue(colSpan);
|
|
28
|
+
const resolvedRowSpan = useResponsiveValue.useResponsiveValue(rowSpan);
|
|
29
|
+
const itemStyle = {
|
|
30
|
+
...resolvedColSpan !== void 0 && {
|
|
31
|
+
"--grid-item-column": formatGridSpan(resolvedColSpan)
|
|
32
|
+
},
|
|
33
|
+
...resolvedRowSpan !== void 0 && {
|
|
34
|
+
"--grid-item-row": formatGridSpan(resolvedRowSpan)
|
|
35
|
+
},
|
|
36
|
+
...style
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39
|
+
Element,
|
|
40
|
+
{
|
|
41
|
+
className: classNames("eds-layout-grid-item", className),
|
|
42
|
+
style: itemStyle,
|
|
43
|
+
...rest,
|
|
44
|
+
children
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
exports.GridItem = GridItem;
|
|
49
|
+
//# sourceMappingURL=GridItem.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.cjs","sources":["../../../../src/beta/Grid/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport { PolymorphicComponentProps } from '@entur/utils';\nimport { useResponsiveValue } from '../LayoutWrapper/useResponsiveValue';\nimport type { ResponsiveValue } from '../LayoutWrapper/utils';\nimport classNames from 'classnames';\n\nimport './GridItem.scss';\n\nexport type GridItemOwnProps = {\n /** Number of columns the item should span (supports responsive objects)\n * If number: adds \"span\" prefix (e.g., 6 → \"span 6\")\n * If string: used directly (e.g., \"span 3\" or \"1 / 3\")\n */\n colSpan?: number | string | ResponsiveValue<number | string>;\n /** Number of rows the item should span (supports responsive objects)\n * @default 1\n * If number: adds \"span\" prefix (e.g., 2 → \"span 2\")\n * If string: used directly (e.g., \"span 2\" or \"1 / 3\")\n */\n rowSpan?: number | string | ResponsiveValue<number | string>;\n /** HTML element or React component used to render the Grid item\n * @default \"div\"\n */\n as?: string | React.ElementType;\n /** Additional class names */\n className?: string;\n /** Content of the Grid item */\n children?: React.ReactNode;\n};\n\nexport type GridItemProps<T extends React.ElementType = typeof defaultElement> =\n PolymorphicComponentProps<T, GridItemOwnProps>;\n\nconst defaultElement = 'div';\n\nconst formatGridSpan = (\n value: number | string | undefined,\n): string | undefined => {\n if (value === undefined) {\n return undefined;\n }\n\n if (typeof value === 'number') {\n return `span ${value}`;\n }\n\n return value;\n};\n\nexport const GridItem = <E extends React.ElementType = typeof defaultElement>({\n colSpan,\n rowSpan = 1,\n as,\n className,\n children,\n style,\n ...rest\n}: GridItemProps<E>): JSX.Element => {\n const Element: React.ElementType = as || defaultElement;\n\n const resolvedColSpan = useResponsiveValue(colSpan);\n const resolvedRowSpan = useResponsiveValue(rowSpan);\n\n const itemStyle: React.CSSProperties = {\n ...(resolvedColSpan !== undefined && {\n '--grid-item-column': formatGridSpan(resolvedColSpan),\n }),\n ...(resolvedRowSpan !== undefined && {\n '--grid-item-row': formatGridSpan(resolvedRowSpan),\n }),\n ...style,\n } as React.CSSProperties;\n\n return (\n <Element\n className={classNames('eds-layout-grid-item', className)}\n style={itemStyle}\n {...rest}\n >\n {children}\n </Element>\n );\n};\n"],"names":["useResponsiveValue","jsx"],"mappings":";;;;;;AAiCA,MAAM,iBAAiB;AAEvB,MAAM,iBAAiB,CACrB,UACuB;AACvB,MAAI,UAAU,QAAW;AACvB,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO,QAAQ,KAAK;AAAA,EACtB;AAEA,SAAO;AACT;AAEO,MAAM,WAAW,CAAsD;AAAA,EAC5E;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAqC;AACnC,QAAM,UAA6B,MAAM;AAEzC,QAAM,kBAAkBA,mBAAAA,mBAAmB,OAAO;AAClD,QAAM,kBAAkBA,mBAAAA,mBAAmB,OAAO;AAElD,QAAM,YAAiC;AAAA,IACrC,GAAI,oBAAoB,UAAa;AAAA,MACnC,sBAAsB,eAAe,eAAe;AAAA,IAAA;AAAA,IAEtD,GAAI,oBAAoB,UAAa;AAAA,MACnC,mBAAmB,eAAe,eAAe;AAAA,IAAA;AAAA,IAEnD,GAAG;AAAA,EAAA;AAGL,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,WAAW,wBAAwB,SAAS;AAAA,MACvD,OAAO;AAAA,MACN,GAAG;AAAA,MAEH;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const Grid = require("./Grid.cjs");
|
|
4
|
+
const GridItem = require("./GridItem.cjs");
|
|
5
|
+
const GridComponent = Object.assign(Grid.Grid, {
|
|
6
|
+
Item: GridItem.GridItem
|
|
7
|
+
});
|
|
8
|
+
GridComponent.Item.displayName = "Grid.Item";
|
|
9
|
+
exports.GridItem = GridItem.GridItem;
|
|
10
|
+
exports.Grid = GridComponent;
|
|
11
|
+
exports.GridComponent = GridComponent;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/beta/Grid/index.ts"],"sourcesContent":["import { Grid as GridParent } from './Grid';\nimport { GridItem } from './GridItem';\n\ntype Grid = typeof GridParent & {\n /**\n * An item inside a Grid.\n *\n * @example\n * <Grid.Item colSpan={6}>Content</Grid.Item>\n */\n Item: typeof GridItem & { displayName?: string };\n};\n\n/**\n * A CSS Grid component for organizing content in a grid.\n *\n * @example\n * <Grid>\n * <Grid.Item colSpan={6}>Content</Grid.Item>\n * <Grid.Item colSpan={6}>Content</Grid.Item>\n * </Grid>\n */\nexport const GridComponent: Grid = Object.assign(GridParent, {\n Item: GridItem,\n});\n\nGridComponent.Item.displayName = 'Grid.Item';\n\nexport type { GridProps, GridOwnProps } from './Grid';\nexport type { GridSpacingValue, ResponsiveValue } from '../LayoutWrapper/utils';\nexport type { GridItemProps, GridItemOwnProps } from './GridItem';\nexport { GridComponent as Grid, GridItem };\nexport { LayoutWrapper } from '../LayoutWrapper/LayoutWrapper';\nexport { useLayoutValues } from '../LayoutWrapper/useLayoutValues';\n"],"names":["GridParent","GridItem"],"mappings":";;;;AAsBO,MAAM,gBAAsB,OAAO,OAAOA,WAAY;AAAA,EAC3D,MAAMC,SAAAA;AACR,CAAC;AAED,cAAc,KAAK,cAAc;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const utils = require("./utils.cjs");
|
|
6
|
+
const LayoutContext = React.createContext(null);
|
|
7
|
+
const LayoutWrapper = ({
|
|
8
|
+
breakpoints: customBreakpoints,
|
|
9
|
+
children
|
|
10
|
+
}) => {
|
|
11
|
+
const breakpoints = React.useMemo(
|
|
12
|
+
() => ({
|
|
13
|
+
...utils.DEFAULT_BREAKPOINTS,
|
|
14
|
+
...customBreakpoints
|
|
15
|
+
}),
|
|
16
|
+
[customBreakpoints]
|
|
17
|
+
);
|
|
18
|
+
const layoutValues = React.useMemo(
|
|
19
|
+
() => ({
|
|
20
|
+
breakpoints
|
|
21
|
+
}),
|
|
22
|
+
[breakpoints]
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LayoutContext.Provider, { value: layoutValues, children });
|
|
25
|
+
};
|
|
26
|
+
const useLayoutContext = () => {
|
|
27
|
+
return React.useContext(LayoutContext);
|
|
28
|
+
};
|
|
29
|
+
exports.LayoutWrapper = LayoutWrapper;
|
|
30
|
+
exports.useLayoutContext = useLayoutContext;
|
|
31
|
+
//# sourceMappingURL=LayoutWrapper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutWrapper.cjs","sources":["../../../../src/beta/LayoutWrapper/LayoutWrapper.tsx"],"sourcesContent":["import React, { createContext, useContext, useMemo } from 'react';\nimport { DEFAULT_BREAKPOINTS, type Breakpoints } from './utils';\n\nexport type LayoutValues = {\n breakpoints: Breakpoints;\n};\n\nconst LayoutContext = createContext<LayoutValues | null>(null);\n\nexport type LayoutWrapperProps = {\n /** Custom breakpoint values to override defaults */\n breakpoints?: Partial<Breakpoints>;\n /** Children components that can use layout values */\n children: React.ReactNode;\n};\n\nexport const LayoutWrapper = ({\n breakpoints: customBreakpoints,\n children,\n}: LayoutWrapperProps): JSX.Element => {\n const breakpoints = useMemo<Breakpoints>(\n () => ({\n ...DEFAULT_BREAKPOINTS,\n ...customBreakpoints,\n }),\n [customBreakpoints],\n );\n\n const layoutValues = useMemo<LayoutValues>(\n () => ({\n breakpoints,\n }),\n [breakpoints],\n );\n\n return (\n <LayoutContext.Provider value={layoutValues}>\n {children}\n </LayoutContext.Provider>\n );\n};\n\nexport const useLayoutContext = (): LayoutValues | null => {\n return useContext(LayoutContext);\n};\n"],"names":["createContext","useMemo","DEFAULT_BREAKPOINTS","useContext"],"mappings":";;;;;AAOA,MAAM,gBAAgBA,MAAAA,cAAmC,IAAI;AAStD,MAAM,gBAAgB,CAAC;AAAA,EAC5B,aAAa;AAAA,EACb;AACF,MAAuC;AACrC,QAAM,cAAcC,MAAAA;AAAAA,IAClB,OAAO;AAAA,MACL,GAAGC,MAAAA;AAAAA,MACH,GAAG;AAAA,IAAA;AAAA,IAEL,CAAC,iBAAiB;AAAA,EAAA;AAGpB,QAAM,eAAeD,MAAAA;AAAAA,IACnB,OAAO;AAAA,MACL;AAAA,IAAA;AAAA,IAEF,CAAC,WAAW;AAAA,EAAA;AAGd,wCACG,cAAc,UAAd,EAAuB,OAAO,cAC5B,UACH;AAEJ;AAEO,MAAM,mBAAmB,MAA2B;AACzD,SAAOE,MAAAA,WAAW,aAAa;AACjC;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const utils = require("./utils.cjs");
|
|
4
|
+
const LayoutWrapper = require("./LayoutWrapper.cjs");
|
|
5
|
+
const useLayoutValues = () => {
|
|
6
|
+
const context = LayoutWrapper.useLayoutContext();
|
|
7
|
+
if (context) {
|
|
8
|
+
return context;
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
breakpoints: utils.DEFAULT_BREAKPOINTS
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
exports.useLayoutValues = useLayoutValues;
|
|
15
|
+
//# sourceMappingURL=useLayoutValues.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutValues.cjs","sources":["../../../../src/beta/LayoutWrapper/useLayoutValues.ts"],"sourcesContent":["import { DEFAULT_BREAKPOINTS } from './utils';\nimport { useLayoutContext, type LayoutValues } from './LayoutWrapper';\n\nexport const useLayoutValues = (): LayoutValues => {\n const context = useLayoutContext();\n\n if (context) {\n return context;\n }\n\n return {\n breakpoints: DEFAULT_BREAKPOINTS,\n };\n};\n"],"names":["useLayoutContext","DEFAULT_BREAKPOINTS"],"mappings":";;;;AAGO,MAAM,kBAAkB,MAAoB;AACjD,QAAM,UAAUA,cAAAA,iBAAA;AAEhB,MAAI,SAAS;AACX,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,aAAaC,MAAAA;AAAAA,EAAA;AAEjB;;"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const useLayoutValues = require("./useLayoutValues.cjs");
|
|
5
|
+
const isResponsiveObject = (value) => {
|
|
6
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && ("sm" in value || "md" in value || "lg" in value);
|
|
7
|
+
};
|
|
8
|
+
const getCurrentBreakpoint = (breakpoints, windowWidth) => {
|
|
9
|
+
if (windowWidth >= breakpoints.lg) {
|
|
10
|
+
return "lg";
|
|
11
|
+
}
|
|
12
|
+
if (windowWidth >= breakpoints.md) {
|
|
13
|
+
return "md";
|
|
14
|
+
}
|
|
15
|
+
return "sm";
|
|
16
|
+
};
|
|
17
|
+
const useResponsiveValue = (value) => {
|
|
18
|
+
const { breakpoints } = useLayoutValues.useLayoutValues();
|
|
19
|
+
const [currentBreakpoint, setCurrentBreakpoint] = React.useState(() => {
|
|
20
|
+
if (typeof window === "undefined") {
|
|
21
|
+
return "sm";
|
|
22
|
+
}
|
|
23
|
+
return getCurrentBreakpoint(breakpoints, window.innerWidth);
|
|
24
|
+
});
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const updateBreakpoint = () => {
|
|
30
|
+
setCurrentBreakpoint(
|
|
31
|
+
getCurrentBreakpoint(breakpoints, window.innerWidth)
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
const mediaQueries = [
|
|
35
|
+
window.matchMedia(`(min-width: ${breakpoints.md}px)`),
|
|
36
|
+
window.matchMedia(`(min-width: ${breakpoints.lg}px)`)
|
|
37
|
+
];
|
|
38
|
+
updateBreakpoint();
|
|
39
|
+
const handleChange = () => {
|
|
40
|
+
updateBreakpoint();
|
|
41
|
+
};
|
|
42
|
+
mediaQueries.forEach((mq) => {
|
|
43
|
+
if (mq.addEventListener) {
|
|
44
|
+
mq.addEventListener("change", handleChange);
|
|
45
|
+
} else {
|
|
46
|
+
mq.addListener(handleChange);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return () => {
|
|
50
|
+
mediaQueries.forEach((mq) => {
|
|
51
|
+
if (mq.removeEventListener) {
|
|
52
|
+
mq.removeEventListener("change", handleChange);
|
|
53
|
+
} else {
|
|
54
|
+
mq.removeListener(handleChange);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
}, [breakpoints]);
|
|
59
|
+
if (!value) {
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
if (!isResponsiveObject(value)) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
const responsiveValue = value[currentBreakpoint];
|
|
66
|
+
if (responsiveValue !== void 0) {
|
|
67
|
+
return responsiveValue;
|
|
68
|
+
}
|
|
69
|
+
const fallbackOrder = currentBreakpoint === "lg" ? ["lg", "md", "sm"] : currentBreakpoint === "md" ? ["md", "sm"] : ["sm"];
|
|
70
|
+
for (const bp of fallbackOrder) {
|
|
71
|
+
if (value[bp] !== void 0) {
|
|
72
|
+
return value[bp];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return void 0;
|
|
76
|
+
};
|
|
77
|
+
exports.useResponsiveValue = useResponsiveValue;
|
|
78
|
+
//# sourceMappingURL=useResponsiveValue.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResponsiveValue.cjs","sources":["../../../../src/beta/LayoutWrapper/useResponsiveValue.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport { useLayoutValues } from './useLayoutValues';\nimport type { ResponsiveValue } from './utils';\n\nconst isResponsiveObject = <T>(\n value: ResponsiveValue<T>,\n): value is { sm?: T; md?: T; lg?: T } => {\n return (\n typeof value === 'object' &&\n value !== null &&\n !Array.isArray(value) &&\n ('sm' in value || 'md' in value || 'lg' in value)\n );\n};\n\nconst getCurrentBreakpoint = (\n breakpoints: { sm: number; md: number; lg: number },\n windowWidth: number,\n): 'sm' | 'md' | 'lg' => {\n if (windowWidth >= breakpoints.lg) {\n return 'lg';\n }\n if (windowWidth >= breakpoints.md) {\n return 'md';\n }\n return 'sm';\n};\n\nexport const useResponsiveValue = <T>(\n value: ResponsiveValue<T> | undefined,\n): T | undefined => {\n const { breakpoints } = useLayoutValues();\n const [currentBreakpoint, setCurrentBreakpoint] = useState<\n 'sm' | 'md' | 'lg'\n >(() => {\n if (typeof window === 'undefined') {\n return 'sm';\n }\n return getCurrentBreakpoint(breakpoints, window.innerWidth);\n });\n\n useEffect(() => {\n if (\n typeof window === 'undefined' ||\n typeof window.matchMedia !== 'function'\n ) {\n return;\n }\n\n const updateBreakpoint = () => {\n setCurrentBreakpoint(\n getCurrentBreakpoint(breakpoints, window.innerWidth),\n );\n };\n\n const mediaQueries = [\n window.matchMedia(`(min-width: ${breakpoints.md}px)`),\n window.matchMedia(`(min-width: ${breakpoints.lg}px)`),\n ];\n\n updateBreakpoint();\n\n const handleChange = () => {\n updateBreakpoint();\n };\n\n mediaQueries.forEach(mq => {\n if (mq.addEventListener) {\n mq.addEventListener('change', handleChange);\n } else {\n mq.addListener(handleChange);\n }\n });\n\n return () => {\n mediaQueries.forEach(mq => {\n if (mq.removeEventListener) {\n mq.removeEventListener('change', handleChange);\n } else {\n mq.removeListener(handleChange);\n }\n });\n };\n }, [breakpoints]);\n\n if (!value) {\n return undefined;\n }\n\n if (!isResponsiveObject(value)) {\n return value;\n }\n\n const responsiveValue = value[currentBreakpoint];\n if (responsiveValue !== undefined) {\n return responsiveValue;\n }\n\n const fallbackOrder: Array<'lg' | 'md' | 'sm'> =\n currentBreakpoint === 'lg'\n ? ['lg', 'md', 'sm']\n : currentBreakpoint === 'md'\n ? ['md', 'sm']\n : ['sm'];\n\n for (const bp of fallbackOrder) {\n if (value[bp] !== undefined) {\n return value[bp];\n }\n }\n\n return undefined;\n};\n"],"names":["useLayoutValues","useState","useEffect"],"mappings":";;;;AAIA,MAAM,qBAAqB,CACzB,UACwC;AACxC,SACE,OAAO,UAAU,YACjB,UAAU,QACV,CAAC,MAAM,QAAQ,KAAK,MACnB,QAAQ,SAAS,QAAQ,SAAS,QAAQ;AAE/C;AAEA,MAAM,uBAAuB,CAC3B,aACA,gBACuB;AACvB,MAAI,eAAe,YAAY,IAAI;AACjC,WAAO;AAAA,EACT;AACA,MAAI,eAAe,YAAY,IAAI;AACjC,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAEO,MAAM,qBAAqB,CAChC,UACkB;AAClB,QAAM,EAAE,YAAA,IAAgBA,gCAAA;AACxB,QAAM,CAAC,mBAAmB,oBAAoB,IAAIC,MAAAA,SAEhD,MAAM;AACN,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,WAAO,qBAAqB,aAAa,OAAO,UAAU;AAAA,EAC5D,CAAC;AAEDC,QAAAA,UAAU,MAAM;AACd,QACE,OAAO,WAAW,eAClB,OAAO,OAAO,eAAe,YAC7B;AACA;AAAA,IACF;AAEA,UAAM,mBAAmB,MAAM;AAC7B;AAAA,QACE,qBAAqB,aAAa,OAAO,UAAU;AAAA,MAAA;AAAA,IAEvD;AAEA,UAAM,eAAe;AAAA,MACnB,OAAO,WAAW,eAAe,YAAY,EAAE,KAAK;AAAA,MACpD,OAAO,WAAW,eAAe,YAAY,EAAE,KAAK;AAAA,IAAA;AAGtD,qBAAA;AAEA,UAAM,eAAe,MAAM;AACzB,uBAAA;AAAA,IACF;AAEA,iBAAa,QAAQ,CAAA,OAAM;AACzB,UAAI,GAAG,kBAAkB;AACvB,WAAG,iBAAiB,UAAU,YAAY;AAAA,MAC5C,OAAO;AACL,WAAG,YAAY,YAAY;AAAA,MAC7B;AAAA,IACF,CAAC;AAED,WAAO,MAAM;AACX,mBAAa,QAAQ,CAAA,OAAM;AACzB,YAAI,GAAG,qBAAqB;AAC1B,aAAG,oBAAoB,UAAU,YAAY;AAAA,QAC/C,OAAO;AACL,aAAG,eAAe,YAAY;AAAA,QAChC;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,WAAW,CAAC;AAEhB,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,mBAAmB,KAAK,GAAG;AAC9B,WAAO;AAAA,EACT;AAEA,QAAM,kBAAkB,MAAM,iBAAiB;AAC/C,MAAI,oBAAoB,QAAW;AACjC,WAAO;AAAA,EACT;AAEA,QAAM,gBACJ,sBAAsB,OAClB,CAAC,MAAM,MAAM,IAAI,IACjB,sBAAsB,OACtB,CAAC,MAAM,IAAI,IACX,CAAC,IAAI;AAEX,aAAW,MAAM,eAAe;AAC9B,QAAI,MAAM,EAAE,MAAM,QAAW;AAC3B,aAAO,MAAM,EAAE;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const VALID_SPACING_VALUES = [
|
|
4
|
+
"2xs",
|
|
5
|
+
"xs",
|
|
6
|
+
"s",
|
|
7
|
+
"s-m",
|
|
8
|
+
"m",
|
|
9
|
+
"m-l",
|
|
10
|
+
"l",
|
|
11
|
+
"xl",
|
|
12
|
+
"2xl",
|
|
13
|
+
"3xl",
|
|
14
|
+
"4xl",
|
|
15
|
+
"5xl",
|
|
16
|
+
"6xl",
|
|
17
|
+
"7xl",
|
|
18
|
+
"8xl",
|
|
19
|
+
"9xl",
|
|
20
|
+
"10xl",
|
|
21
|
+
"11xl",
|
|
22
|
+
"none"
|
|
23
|
+
];
|
|
24
|
+
const DEFAULT_BREAKPOINTS = {
|
|
25
|
+
sm: 0,
|
|
26
|
+
md: 800,
|
|
27
|
+
lg: 1200
|
|
28
|
+
};
|
|
29
|
+
const isValidSpacingValue = (value) => {
|
|
30
|
+
return typeof value === "string" && VALID_SPACING_VALUES.includes(value);
|
|
31
|
+
};
|
|
32
|
+
const getSpacingValue = (spacing, componentName = "Grid") => {
|
|
33
|
+
if (!spacing) return void 0;
|
|
34
|
+
if (spacing === "none") return "0";
|
|
35
|
+
if (!isValidSpacingValue(spacing)) {
|
|
36
|
+
if (process.env.NODE_ENV !== "production") {
|
|
37
|
+
console.warn(
|
|
38
|
+
`Invalid ${componentName} spacing value: "${spacing}". Valid values are: ${VALID_SPACING_VALUES.join(
|
|
39
|
+
", "
|
|
40
|
+
)}. Falling back to undefined.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
return `var(--${spacing})`;
|
|
46
|
+
};
|
|
47
|
+
exports.DEFAULT_BREAKPOINTS = DEFAULT_BREAKPOINTS;
|
|
48
|
+
exports.getSpacingValue = getSpacingValue;
|
|
49
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","sources":["../../../../src/beta/LayoutWrapper/utils.ts"],"sourcesContent":["const VALID_SPACING_VALUES = [\n '2xs',\n 'xs',\n 's',\n 's-m',\n 'm',\n 'm-l',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n '7xl',\n '8xl',\n '9xl',\n '10xl',\n '11xl',\n 'none',\n] as const;\n\nexport type GridSpacingValue = (typeof VALID_SPACING_VALUES)[number];\n\nexport type ResponsiveValue<T> =\n | T\n | {\n sm?: T;\n md?: T;\n lg?: T;\n };\n\nexport type Breakpoints = {\n sm: number;\n md: number;\n lg: number;\n};\n\nexport const DEFAULT_BREAKPOINTS: Breakpoints = {\n sm: 0,\n md: 800,\n lg: 1200,\n};\n\nconst isValidSpacingValue = (value: unknown): value is GridSpacingValue => {\n return (\n typeof value === 'string' &&\n VALID_SPACING_VALUES.includes(value as GridSpacingValue)\n );\n};\n\nexport const getSpacingValue = (\n spacing: GridSpacingValue | undefined,\n componentName = 'Grid',\n): string | undefined => {\n if (!spacing) return undefined;\n if (spacing === 'none') return '0';\n\n if (!isValidSpacingValue(spacing)) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `Invalid ${componentName} spacing value: \"${spacing}\". Valid values are: ${VALID_SPACING_VALUES.join(\n ', ',\n )}. Falling back to undefined.`,\n );\n }\n return undefined;\n }\n\n return `var(--${spacing})`;\n};\n"],"names":[],"mappings":";;AAAA,MAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAkBO,MAAM,sBAAmC;AAAA,EAC9C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,sBAAsB,CAAC,UAA8C;AACzE,SACE,OAAO,UAAU,YACjB,qBAAqB,SAAS,KAAyB;AAE3D;AAEO,MAAM,kBAAkB,CAC7B,SACA,gBAAgB,WACO;AACvB,MAAI,CAAC,QAAS,QAAO;AACrB,MAAI,YAAY,OAAQ,QAAO;AAE/B,MAAI,CAAC,oBAAoB,OAAO,GAAG;AACjC,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,cAAQ;AAAA,QACN,WAAW,aAAa,oBAAoB,OAAO,wBAAwB,qBAAqB;AAAA,UAC9F;AAAA,QAAA,CACD;AAAA,MAAA;AAAA,IAEL;AACA,WAAO;AAAA,EACT;AAEA,SAAO,SAAS,OAAO;AACzB;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const index = require("./Grid/index.cjs");
|
|
5
|
+
const index$1 = require("./Flex/index.cjs");
|
|
6
|
+
const index$2 = require("./templates/index.cjs");
|
|
7
|
+
const GridItem = require("./Grid/GridItem.cjs");
|
|
8
|
+
const LayoutWrapper = require("./LayoutWrapper/LayoutWrapper.cjs");
|
|
9
|
+
const useLayoutValues = require("./LayoutWrapper/useLayoutValues.cjs");
|
|
10
|
+
const FlexSpacer = require("./Flex/FlexSpacer.cjs");
|
|
11
|
+
exports.Grid = index.GridComponent;
|
|
12
|
+
exports.Flex = index$1.FlexComponent;
|
|
13
|
+
exports.Template = index$2.Template;
|
|
14
|
+
exports.GridItem = GridItem.GridItem;
|
|
15
|
+
exports.LayoutWrapper = LayoutWrapper.LayoutWrapper;
|
|
16
|
+
exports.useLayoutValues = useLayoutValues.useLayoutValues;
|
|
17
|
+
exports.FlexSpacer = FlexSpacer.FlexSpacer;
|
|
18
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|