@vinyasa/layout 1.0.19
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 +164 -0
- package/dist/cjs/aspect-ratio.cjs +271 -0
- package/dist/cjs/box.cjs +268 -0
- package/dist/cjs/center.cjs +457 -0
- package/dist/cjs/center.css +80 -0
- package/dist/cjs/container.cjs +275 -0
- package/dist/cjs/container.css +31 -0
- package/dist/cjs/divider.cjs +389 -0
- package/dist/cjs/divider.css +16 -0
- package/dist/cjs/flex.cjs +425 -0
- package/dist/cjs/flex.css +80 -0
- package/dist/cjs/grid.cjs +419 -0
- package/dist/cjs/grid.css +84 -0
- package/dist/cjs/index.cjs +1806 -0
- package/dist/cjs/index.css +302 -0
- package/dist/cjs/inline.cjs +456 -0
- package/dist/cjs/inline.css +80 -0
- package/dist/cjs/portal.cjs +67 -0
- package/dist/cjs/scroll-area.cjs +303 -0
- package/dist/cjs/scroll-area.css +59 -0
- package/dist/cjs/spacer.cjs +137 -0
- package/dist/cjs/spacer.css +4 -0
- package/dist/cjs/stack.cjs +456 -0
- package/dist/cjs/stack.css +80 -0
- package/dist/cjs/surface.cjs +390 -0
- package/dist/cjs/surface.css +28 -0
- package/dist/esm/207.css +80 -0
- package/dist/esm/207.js +88 -0
- package/dist/esm/474.js +76 -0
- package/dist/esm/953.js +87 -0
- package/dist/esm/aspect-ratio.js +36 -0
- package/dist/esm/box.js +35 -0
- package/dist/esm/center.js +14 -0
- package/dist/esm/components/aspect-ratio/AspectRatio.d.ts +11 -0
- package/dist/esm/components/aspect-ratio/index.d.ts +3 -0
- package/dist/esm/components/box/Box.d.ts +5 -0
- package/dist/esm/components/box/index.d.ts +3 -0
- package/dist/esm/components/center/Center.d.ts +4 -0
- package/dist/esm/components/center/index.d.ts +3 -0
- package/dist/esm/components/container/Container.css.d.ts +1 -0
- package/dist/esm/components/container/Container.d.ts +11 -0
- package/dist/esm/components/container/index.d.ts +3 -0
- package/dist/esm/components/divider/Divider.css.d.ts +12 -0
- package/dist/esm/components/divider/Divider.d.ts +16 -0
- package/dist/esm/components/divider/index.d.ts +3 -0
- package/dist/esm/components/flex/Flex.css.d.ts +69 -0
- package/dist/esm/components/flex/Flex.d.ts +14 -0
- package/dist/esm/components/flex/index.d.ts +3 -0
- package/dist/esm/components/grid/Grid.css.d.ts +70 -0
- package/dist/esm/components/grid/Grid.d.ts +23 -0
- package/dist/esm/components/grid/index.d.ts +3 -0
- package/dist/esm/components/inline/Inline.d.ts +4 -0
- package/dist/esm/components/inline/index.d.ts +3 -0
- package/dist/esm/components/portal/Portal.d.ts +11 -0
- package/dist/esm/components/portal/index.d.ts +3 -0
- package/dist/esm/components/scroll-area/ScrollArea.css.d.ts +5 -0
- package/dist/esm/components/scroll-area/ScrollArea.d.ts +29 -0
- package/dist/esm/components/scroll-area/index.d.ts +3 -0
- package/dist/esm/components/spacer/Spacer.css.d.ts +1 -0
- package/dist/esm/components/spacer/Spacer.d.ts +4 -0
- package/dist/esm/components/spacer/index.d.ts +3 -0
- package/dist/esm/components/stack/Stack.d.ts +4 -0
- package/dist/esm/components/stack/index.d.ts +3 -0
- package/dist/esm/components/surface/Surface.css.d.ts +24 -0
- package/dist/esm/components/surface/Surface.d.ts +11 -0
- package/dist/esm/components/surface/index.d.ts +3 -0
- package/dist/esm/container.css +30 -0
- package/dist/esm/container.js +40 -0
- package/dist/esm/divider.css +16 -0
- package/dist/esm/divider.js +67 -0
- package/dist/esm/flex.js +4 -0
- package/dist/esm/grid.css +84 -0
- package/dist/esm/grid.js +88 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +13 -0
- package/dist/esm/inline.js +13 -0
- package/dist/esm/polymorphic.d.ts +5 -0
- package/dist/esm/portal.js +14 -0
- package/dist/esm/scroll-area.css +58 -0
- package/dist/esm/scroll-area.js +68 -0
- package/dist/esm/spacer.css +4 -0
- package/dist/esm/spacer.js +18 -0
- package/dist/esm/spacing.d.ts +19 -0
- package/dist/esm/stack.js +13 -0
- package/dist/esm/surface.css +28 -0
- package/dist/esm/surface.js +64 -0
- package/package.json +153 -0
package/dist/esm/953.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
function toPrimitive(t, r) {
|
|
2
|
+
if ("object" != typeof t || !t) return t;
|
|
3
|
+
var e = t[Symbol.toPrimitive];
|
|
4
|
+
if (void 0 !== e) {
|
|
5
|
+
var i = e.call(t, r || "default");
|
|
6
|
+
if ("object" != typeof i) return i;
|
|
7
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
8
|
+
}
|
|
9
|
+
return ("string" === r ? String : Number)(t);
|
|
10
|
+
}
|
|
11
|
+
function toPropertyKey(t) {
|
|
12
|
+
var i = toPrimitive(t, "string");
|
|
13
|
+
return "symbol" == typeof i ? i : String(i);
|
|
14
|
+
}
|
|
15
|
+
function _defineProperty(obj, key, value) {
|
|
16
|
+
key = toPropertyKey(key);
|
|
17
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
18
|
+
value: value,
|
|
19
|
+
enumerable: true,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: true
|
|
22
|
+
});
|
|
23
|
+
else obj[key] = value;
|
|
24
|
+
return obj;
|
|
25
|
+
}
|
|
26
|
+
function ownKeys(e, r) {
|
|
27
|
+
var t = Object.keys(e);
|
|
28
|
+
if (Object.getOwnPropertySymbols) {
|
|
29
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
30
|
+
r && (o = o.filter(function(r) {
|
|
31
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
32
|
+
})), t.push.apply(t, o);
|
|
33
|
+
}
|
|
34
|
+
return t;
|
|
35
|
+
}
|
|
36
|
+
function _objectSpread2(e) {
|
|
37
|
+
for(var r = 1; r < arguments.length; r++){
|
|
38
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
39
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
40
|
+
_defineProperty(e, r, t[r]);
|
|
41
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
42
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return e;
|
|
46
|
+
}
|
|
47
|
+
function mapValues(input, fn) {
|
|
48
|
+
var result = {};
|
|
49
|
+
for(var _key in input)result[_key] = fn(input[_key], _key);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
var shouldApplyCompound = (compoundCheck, selections, defaultVariants)=>{
|
|
53
|
+
for (var key of Object.keys(compoundCheck)){
|
|
54
|
+
var _selections$key;
|
|
55
|
+
if (compoundCheck[key] !== (null != (_selections$key = selections[key]) ? _selections$key : defaultVariants[key])) return false;
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
};
|
|
59
|
+
var createRuntimeFn = (config)=>{
|
|
60
|
+
var runtimeFn = (options)=>{
|
|
61
|
+
var className = config.defaultClassName;
|
|
62
|
+
var selections = _objectSpread2(_objectSpread2({}, config.defaultVariants), options);
|
|
63
|
+
for(var variantName in selections){
|
|
64
|
+
var _selections$variantNa;
|
|
65
|
+
var variantSelection = null != (_selections$variantNa = selections[variantName]) ? _selections$variantNa : config.defaultVariants[variantName];
|
|
66
|
+
if (null != variantSelection) {
|
|
67
|
+
var selection = variantSelection;
|
|
68
|
+
if ('boolean' == typeof selection) selection = true === selection ? 'true' : 'false';
|
|
69
|
+
var selectionClassName = config.variantClassNames[variantName][selection];
|
|
70
|
+
if (selectionClassName) className += ' ' + selectionClassName;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (var [compoundCheck, compoundClassName] of config.compoundVariants)if (shouldApplyCompound(compoundCheck, selections, config.defaultVariants)) className += ' ' + compoundClassName;
|
|
74
|
+
return className;
|
|
75
|
+
};
|
|
76
|
+
runtimeFn.variants = ()=>Object.keys(config.variantClassNames);
|
|
77
|
+
runtimeFn.classNames = {
|
|
78
|
+
get base () {
|
|
79
|
+
return config.defaultClassName.split(' ')[0];
|
|
80
|
+
},
|
|
81
|
+
get variants () {
|
|
82
|
+
return mapValues(config.variantClassNames, (classNames)=>mapValues(classNames, (className)=>className.split(' ')[0]));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
return runtimeFn;
|
|
86
|
+
};
|
|
87
|
+
export { createRuntimeFn };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
4
|
+
const AspectRatio = /*#__PURE__*/ forwardRef(({ as: Component = 'div', ratio = 1, m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, style, children, ...rest }, ref)=>{
|
|
5
|
+
const computedStyle = {
|
|
6
|
+
...resolveSpacingStyle({
|
|
7
|
+
m,
|
|
8
|
+
mt,
|
|
9
|
+
mr,
|
|
10
|
+
mb,
|
|
11
|
+
ml,
|
|
12
|
+
mx,
|
|
13
|
+
my,
|
|
14
|
+
p,
|
|
15
|
+
pt,
|
|
16
|
+
pr,
|
|
17
|
+
pb,
|
|
18
|
+
pl,
|
|
19
|
+
px,
|
|
20
|
+
py
|
|
21
|
+
}),
|
|
22
|
+
aspectRatio: String(ratio),
|
|
23
|
+
...style
|
|
24
|
+
};
|
|
25
|
+
return /*#__PURE__*/ jsx(Component, {
|
|
26
|
+
ref: ref,
|
|
27
|
+
style: computedStyle,
|
|
28
|
+
...rest,
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
AspectRatio.displayName = 'AspectRatio';
|
|
33
|
+
const aspect_ratio_AspectRatio = AspectRatio;
|
|
34
|
+
const aspect_ratio = aspect_ratio_AspectRatio;
|
|
35
|
+
export default aspect_ratio;
|
|
36
|
+
export { aspect_ratio as AspectRatio };
|
package/dist/esm/box.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { resolveSpacingStyle } from "./474.js";
|
|
4
|
+
const Box = /*#__PURE__*/ forwardRef(({ as: Component = 'div', m, mt, mr, mb, ml, mx, my, p, pt, pr, pb, pl, px, py, style, children, ...rest }, ref)=>{
|
|
5
|
+
const computedStyle = {
|
|
6
|
+
...resolveSpacingStyle({
|
|
7
|
+
m,
|
|
8
|
+
mt,
|
|
9
|
+
mr,
|
|
10
|
+
mb,
|
|
11
|
+
ml,
|
|
12
|
+
mx,
|
|
13
|
+
my,
|
|
14
|
+
p,
|
|
15
|
+
pt,
|
|
16
|
+
pr,
|
|
17
|
+
pb,
|
|
18
|
+
pl,
|
|
19
|
+
px,
|
|
20
|
+
py
|
|
21
|
+
}),
|
|
22
|
+
...style
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/ jsx(Component, {
|
|
25
|
+
ref: ref,
|
|
26
|
+
style: computedStyle,
|
|
27
|
+
...rest,
|
|
28
|
+
children: children
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
Box.displayName = 'Box';
|
|
32
|
+
const box_Box = Box;
|
|
33
|
+
const box = box_Box;
|
|
34
|
+
export default box;
|
|
35
|
+
export { box as Box };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { flex_Flex } from "./207.js";
|
|
4
|
+
const Center = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(flex_Flex, {
|
|
5
|
+
ref: ref,
|
|
6
|
+
align: "center",
|
|
7
|
+
justify: "center",
|
|
8
|
+
...props
|
|
9
|
+
}));
|
|
10
|
+
Center.displayName = 'Center';
|
|
11
|
+
const center_Center = Center;
|
|
12
|
+
const center = center_Center;
|
|
13
|
+
export default center;
|
|
14
|
+
export { center as Center };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type AspectRatioProps = PolymorphicProps & SpacingProps & {
|
|
4
|
+
/** Width-to-height ratio, e.g. `16 / 9`. An arbitrary runtime number, not a themed/discrete design value — this is why it's a plain inline style rather than a `recipe()` variant. */
|
|
5
|
+
ratio?: number;
|
|
6
|
+
};
|
|
7
|
+
declare const AspectRatio: import("react").ForwardRefExoticComponent<PolymorphicProps & SpacingProps & {
|
|
8
|
+
/** Width-to-height ratio, e.g. `16 / 9`. An arbitrary runtime number, not a themed/discrete design value — this is why it's a plain inline style rather than a `recipe()` variant. */
|
|
9
|
+
ratio?: number;
|
|
10
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
11
|
+
export default AspectRatio;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type BoxProps = PolymorphicProps & SpacingProps;
|
|
4
|
+
declare const Box: import("react").ForwardRefExoticComponent<PolymorphicProps & SpacingProps & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
+
export default Box;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const container: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type ContainerProps = PolymorphicProps & SpacingProps & {
|
|
4
|
+
/** Escape hatch for a narrower container than the responsive default (e.g. a login form). */
|
|
5
|
+
maxWidth?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const Container: import("react").ForwardRefExoticComponent<PolymorphicProps & SpacingProps & {
|
|
8
|
+
/** Escape hatch for a narrower container than the responsive default (e.g. a login form). */
|
|
9
|
+
maxWidth?: string;
|
|
10
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
11
|
+
export default Container;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
import { divider } from './Divider.css';
|
|
5
|
+
type DividerVariants = RecipeVariants<typeof divider>;
|
|
6
|
+
export type DividerProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & DividerVariants & SpacingProps & {
|
|
7
|
+
/** Purely visual divider with no semantic meaning — renders `aria-hidden` instead of `role="separator"` on the vertical branch (an `<hr>` is inherently non-decorative, so this has no effect when `orientation="horizontal"`). */
|
|
8
|
+
decorative?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const Divider: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & {
|
|
11
|
+
orientation?: "horizontal" | "vertical" | undefined;
|
|
12
|
+
} & SpacingProps & {
|
|
13
|
+
/** Purely visual divider with no semantic meaning — renders `aria-hidden` instead of `role="separator"` on the vertical branch (an `<hr>` is inherently non-decorative, so this has no effect when `orientation="horizontal"`). */
|
|
14
|
+
decorative?: boolean;
|
|
15
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
16
|
+
export default Divider;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const flex: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
direction: {
|
|
3
|
+
row: {
|
|
4
|
+
flexDirection: "row";
|
|
5
|
+
};
|
|
6
|
+
column: {
|
|
7
|
+
flexDirection: "column";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
align: {
|
|
11
|
+
start: {
|
|
12
|
+
alignItems: "flex-start";
|
|
13
|
+
};
|
|
14
|
+
center: {
|
|
15
|
+
alignItems: "center";
|
|
16
|
+
};
|
|
17
|
+
end: {
|
|
18
|
+
alignItems: "flex-end";
|
|
19
|
+
};
|
|
20
|
+
stretch: {
|
|
21
|
+
alignItems: "stretch";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
justify: {
|
|
25
|
+
start: {
|
|
26
|
+
justifyContent: "flex-start";
|
|
27
|
+
};
|
|
28
|
+
center: {
|
|
29
|
+
justifyContent: "center";
|
|
30
|
+
};
|
|
31
|
+
end: {
|
|
32
|
+
justifyContent: "flex-end";
|
|
33
|
+
};
|
|
34
|
+
between: {
|
|
35
|
+
justifyContent: "space-between";
|
|
36
|
+
};
|
|
37
|
+
around: {
|
|
38
|
+
justifyContent: "space-around";
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
wrap: {
|
|
42
|
+
nowrap: {
|
|
43
|
+
flexWrap: "nowrap";
|
|
44
|
+
};
|
|
45
|
+
wrap: {
|
|
46
|
+
flexWrap: "wrap";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
gap: {
|
|
50
|
+
1: {
|
|
51
|
+
gap: `var(--${string})`;
|
|
52
|
+
};
|
|
53
|
+
2: {
|
|
54
|
+
gap: `var(--${string})`;
|
|
55
|
+
};
|
|
56
|
+
3: {
|
|
57
|
+
gap: `var(--${string})`;
|
|
58
|
+
};
|
|
59
|
+
4: {
|
|
60
|
+
gap: `var(--${string})`;
|
|
61
|
+
};
|
|
62
|
+
5: {
|
|
63
|
+
gap: `var(--${string})`;
|
|
64
|
+
};
|
|
65
|
+
6: {
|
|
66
|
+
gap: `var(--${string})`;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
import { flex } from './Flex.css';
|
|
5
|
+
type FlexVariants = RecipeVariants<typeof flex>;
|
|
6
|
+
export type FlexProps = PolymorphicProps & FlexVariants & SpacingProps;
|
|
7
|
+
declare const Flex: import("react").ForwardRefExoticComponent<PolymorphicProps & {
|
|
8
|
+
direction?: "column" | "row" | undefined;
|
|
9
|
+
align?: "center" | "stretch" | "end" | "start" | undefined;
|
|
10
|
+
justify?: "center" | "end" | "start" | "between" | "around" | undefined;
|
|
11
|
+
wrap?: "nowrap" | "wrap" | undefined;
|
|
12
|
+
gap?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
13
|
+
} & SpacingProps & import("react").RefAttributes<HTMLElement>>;
|
|
14
|
+
export default Flex;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const grid: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
gap: {
|
|
3
|
+
1: {
|
|
4
|
+
gap: `var(--${string})`;
|
|
5
|
+
};
|
|
6
|
+
2: {
|
|
7
|
+
gap: `var(--${string})`;
|
|
8
|
+
};
|
|
9
|
+
3: {
|
|
10
|
+
gap: `var(--${string})`;
|
|
11
|
+
};
|
|
12
|
+
4: {
|
|
13
|
+
gap: `var(--${string})`;
|
|
14
|
+
};
|
|
15
|
+
5: {
|
|
16
|
+
gap: `var(--${string})`;
|
|
17
|
+
};
|
|
18
|
+
6: {
|
|
19
|
+
gap: `var(--${string})`;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
align: {
|
|
23
|
+
start: {
|
|
24
|
+
alignItems: "flex-start";
|
|
25
|
+
};
|
|
26
|
+
center: {
|
|
27
|
+
alignItems: "center";
|
|
28
|
+
};
|
|
29
|
+
end: {
|
|
30
|
+
alignItems: "flex-end";
|
|
31
|
+
};
|
|
32
|
+
stretch: {
|
|
33
|
+
alignItems: "stretch";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
justify: {
|
|
37
|
+
start: {
|
|
38
|
+
justifyContent: "flex-start";
|
|
39
|
+
};
|
|
40
|
+
center: {
|
|
41
|
+
justifyContent: "center";
|
|
42
|
+
};
|
|
43
|
+
end: {
|
|
44
|
+
justifyContent: "flex-end";
|
|
45
|
+
};
|
|
46
|
+
between: {
|
|
47
|
+
justifyContent: "space-between";
|
|
48
|
+
};
|
|
49
|
+
around: {
|
|
50
|
+
justifyContent: "space-around";
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
flow: {
|
|
54
|
+
row: {
|
|
55
|
+
gridAutoFlow: "row";
|
|
56
|
+
};
|
|
57
|
+
column: {
|
|
58
|
+
gridAutoFlow: "column";
|
|
59
|
+
};
|
|
60
|
+
dense: {
|
|
61
|
+
gridAutoFlow: "dense";
|
|
62
|
+
};
|
|
63
|
+
'row-dense': {
|
|
64
|
+
gridAutoFlow: "row dense";
|
|
65
|
+
};
|
|
66
|
+
'column-dense': {
|
|
67
|
+
gridAutoFlow: "column dense";
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
import { grid } from './Grid.css';
|
|
5
|
+
type GridVariants = RecipeVariants<typeof grid>;
|
|
6
|
+
export type GridProps = PolymorphicProps & GridVariants & SpacingProps & {
|
|
7
|
+
/** Number of equal-width columns, or a raw `grid-template-columns` value for advanced layouts. */
|
|
8
|
+
columns?: number | string;
|
|
9
|
+
/** Number of equal-height rows, or a raw `grid-template-rows` value for advanced layouts. */
|
|
10
|
+
rows?: number | string;
|
|
11
|
+
};
|
|
12
|
+
declare const Grid: import("react").ForwardRefExoticComponent<PolymorphicProps & {
|
|
13
|
+
gap?: 1 | 2 | 3 | 4 | 5 | 6 | undefined;
|
|
14
|
+
align?: "center" | "stretch" | "end" | "start" | undefined;
|
|
15
|
+
justify?: "center" | "end" | "start" | "between" | "around" | undefined;
|
|
16
|
+
flow?: "column" | "row" | "dense" | "row-dense" | "column-dense" | undefined;
|
|
17
|
+
} & SpacingProps & {
|
|
18
|
+
/** Number of equal-width columns, or a raw `grid-template-columns` value for advanced layouts. */
|
|
19
|
+
columns?: number | string;
|
|
20
|
+
/** Number of equal-height rows, or a raw `grid-template-rows` value for advanced layouts. */
|
|
21
|
+
rows?: number | string;
|
|
22
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
23
|
+
export default Grid;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface PortalProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Defaults to document.body. */
|
|
5
|
+
container?: Element;
|
|
6
|
+
}
|
|
7
|
+
declare const Portal: {
|
|
8
|
+
({ children, container }: PortalProps): import("react").ReactPortal | null;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export default Portal;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type SpacingProps } from '../../spacing';
|
|
3
|
+
export type ScrollAreaProps = Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'dir'> & SpacingProps & {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Applied as a real `height` (not `max-height`) on the underlying Radix
|
|
7
|
+
* Root — Radix's internal Viewport uses `height: 100%`, which only
|
|
8
|
+
* resolves to a bounded value against an ancestor with an explicit
|
|
9
|
+
* height; `max-height` alone leaves it undefined per the CSS spec, so
|
|
10
|
+
* the content never actually clips/scrolls.
|
|
11
|
+
*/
|
|
12
|
+
maxHeight?: CSSProperties['height'];
|
|
13
|
+
/** Same reasoning as `maxHeight`, applied as `width` for horizontal scrolling. */
|
|
14
|
+
maxWidth?: CSSProperties['width'];
|
|
15
|
+
};
|
|
16
|
+
declare const ScrollArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "dir" | "children"> & SpacingProps & {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Applied as a real `height` (not `max-height`) on the underlying Radix
|
|
20
|
+
* Root — Radix's internal Viewport uses `height: 100%`, which only
|
|
21
|
+
* resolves to a bounded value against an ancestor with an explicit
|
|
22
|
+
* height; `max-height` alone leaves it undefined per the CSS spec, so
|
|
23
|
+
* the content never actually clips/scrolls.
|
|
24
|
+
*/
|
|
25
|
+
maxHeight?: CSSProperties["height"];
|
|
26
|
+
/** Same reasoning as `maxHeight`, applied as `width` for horizontal scrolling. */
|
|
27
|
+
maxWidth?: CSSProperties["width"];
|
|
28
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export default ScrollArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const spacer: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type SpacerProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
3
|
+
declare const Spacer: import("react").ForwardRefExoticComponent<SpacerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default Spacer;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const surface: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
|
+
radius: {
|
|
3
|
+
sm: {
|
|
4
|
+
borderRadius: `var(--${string})`;
|
|
5
|
+
};
|
|
6
|
+
md: {
|
|
7
|
+
borderRadius: `var(--${string})`;
|
|
8
|
+
};
|
|
9
|
+
full: {
|
|
10
|
+
borderRadius: `var(--${string})`;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
elevation: {
|
|
14
|
+
raised: {
|
|
15
|
+
boxShadow: `var(--${string})`;
|
|
16
|
+
};
|
|
17
|
+
overlay: {
|
|
18
|
+
boxShadow: `var(--${string})`;
|
|
19
|
+
};
|
|
20
|
+
modal: {
|
|
21
|
+
boxShadow: `var(--${string})`;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RecipeVariants } from '@vanilla-extract/recipes';
|
|
2
|
+
import type { PolymorphicProps } from '../../polymorphic';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
import { surface } from './Surface.css';
|
|
5
|
+
type SurfaceVariants = RecipeVariants<typeof surface>;
|
|
6
|
+
export type SurfaceProps = PolymorphicProps & SurfaceVariants & SpacingProps;
|
|
7
|
+
declare const Surface: import("react").ForwardRefExoticComponent<PolymorphicProps & {
|
|
8
|
+
radius?: "sm" | "md" | "full" | undefined;
|
|
9
|
+
elevation?: "overlay" | "raised" | "modal" | undefined;
|
|
10
|
+
} & SpacingProps & import("react").RefAttributes<HTMLElement>>;
|
|
11
|
+
export default Surface;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.n27f480 {
|
|
2
|
+
width: 100%;
|
|
3
|
+
padding-inline: var(--vinyasa-space4);
|
|
4
|
+
margin-inline: auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@media (min-width: 640px) {
|
|
8
|
+
.n27f480 {
|
|
9
|
+
max-width: 640px;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media (min-width: 768px) {
|
|
14
|
+
.n27f480 {
|
|
15
|
+
max-width: 768px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (min-width: 1024px) {
|
|
20
|
+
.n27f480 {
|
|
21
|
+
max-width: 1024px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 1280px) {
|
|
26
|
+
.n27f480 {
|
|
27
|
+
max-width: 1280px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|