@vokality/design-system 1.3.0 → 2.0.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/CHANGELOG.md +26 -0
- package/README.md +2 -2
- package/dist/components/Field/Field.js +2 -2
- package/dist/components/Fieldset/Fieldset.js +3 -3
- package/dist/components/Grid/Grid.d.ts +866 -4
- package/dist/components/Grid/Grid.js +2 -3
- package/dist/components/Inline/Inline.d.ts +866 -4
- package/dist/components/Inline/Inline.js +2 -3
- package/dist/components/Stack/Stack.d.ts +866 -4
- package/dist/components/Stack/Stack.js +2 -3
- package/dist/components/Text/Text.d.ts +9 -5
- package/dist/components/Text/Text.js +3 -4
- package/dist/components.css +102 -52
- package/dist/internal/describedBy.d.ts +3 -0
- package/dist/internal/describedBy.js +4 -0
- package/dist/tokens.css +2 -0
- package/dist/tokens.dtcg.json +10 -0
- package/dist/tokens.json +10 -0
- package/dist/types.d.ts +6 -1
- package/dist/vokality.css +104 -52
- package/dist/vokality.iife.js +331 -349
- package/docs/brand.md +2 -2
- package/docs/components/Badge/README.md +1 -1
- package/docs/components/Button/README.md +4 -2
- package/docs/components/Inline/README.md +1 -1
- package/docs/components/Text/README.md +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createElement } from "react";
|
|
2
2
|
import { cx } from "../../lib/cx.js";
|
|
3
3
|
import { space } from "../../lib/space.js";
|
|
4
4
|
/** A responsive grid: a fixed number of columns, or as many columns of at least `min` width as fit. */
|
|
5
5
|
export function Grid({ as, columns, min, gap, children, className, style, ...rest }) {
|
|
6
|
-
const Tag = as || "div";
|
|
7
6
|
const fixed = typeof columns === "number";
|
|
8
7
|
const template = fixed ? "repeat(" + columns + ", minmax(0, 1fr))" : "repeat(auto-fit, minmax(min(" + (min || "16rem") + ", 100%), 1fr))";
|
|
9
|
-
return
|
|
8
|
+
return createElement(as || "div", { className: cx("vk-layout-grid", fixed ? "vk-layout-grid-fixed" : null, className), style: { gap: space(gap, "lg"), gridTemplateColumns: template, ...style }, ...rest }, children);
|
|
10
9
|
}
|