oneslash-design-system 2.4.0 → 2.6.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.
@@ -13,7 +13,7 @@ export declare function Stack({ children, gap, align, className }: StackProps):
13
13
  export declare function Cluster({ children, gap, className }: LayoutProps): React.JSX.Element;
14
14
  interface GridProps extends LayoutProps {
15
15
  /** How many columns from the medium breakpoint up. Below it: two for `compact`, otherwise one. */
16
- columns?: 2 | 3 | 4;
16
+ columns?: 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
17
17
  compact?: boolean;
18
18
  /** `stretch` makes the items in a row the same height; `start` lets each keep its own. */
19
19
  align?: 'stretch' | 'start';
@@ -18,7 +18,17 @@ export function Cluster(_a) {
18
18
  var children = _a.children, _b = _a.gap, gap = _b === void 0 ? 'medium' : _b, _c = _a.className, className = _c === void 0 ? '' : _c;
19
19
  return <div className={"flex flex-wrap items-center ".concat(gaps[gap], " ").concat(className)}>{children}</div>;
20
20
  }
21
- var mdColumns = { 2: 'md:grid-cols-2', 3: 'md:grid-cols-3', 4: 'md:grid-cols-4' };
21
+ var mdColumns = {
22
+ 2: 'md:grid-cols-2',
23
+ 3: 'md:grid-cols-3',
24
+ 4: 'md:grid-cols-4',
25
+ 5: 'md:grid-cols-5',
26
+ 6: 'md:grid-cols-6',
27
+ 7: 'md:grid-cols-7',
28
+ 8: 'md:grid-cols-8',
29
+ 9: 'md:grid-cols-9',
30
+ 10: 'md:grid-cols-10',
31
+ };
22
32
  export function Grid(_a) {
23
33
  var children = _a.children, _b = _a.columns, columns = _b === void 0 ? 2 : _b, _c = _a.compact, compact = _c === void 0 ? false : _c, _d = _a.align, align = _d === void 0 ? 'stretch' : _d, _e = _a.gap, gap = _e === void 0 ? 'large' : _e, _f = _a.className, className = _f === void 0 ? '' : _f;
24
34
  return (<div className={"grid ".concat(compact ? 'grid-cols-2' : 'grid-cols-1', " ").concat(mdColumns[columns], " ").concat(align === 'start' ? 'items-start' : '', " ").concat(gaps[gap], " ").concat(className)}>
@@ -3,6 +3,8 @@ interface PageShellProps extends React.ComponentPropsWithoutRef<'main'> {
3
3
  children: React.ReactNode;
4
4
  /** Let the column grow from the 2xl breakpoint, for pages with wide figures. */
5
5
  wide?: boolean;
6
+ /** Let the column run the full width of the window, for a page that is a feed of images. Keeps the side space. */
7
+ fluid?: boolean;
6
8
  }
7
- export default function PageShell({ children, wide, className, ...rest }: PageShellProps): React.JSX.Element;
9
+ export default function PageShell({ children, wide, fluid, className, ...rest }: PageShellProps): React.JSX.Element;
8
10
  export {};
@@ -13,9 +13,9 @@ import React from 'react';
13
13
  // The frame of a page: the column, its side space, and the space between sections.
14
14
  // Anything else given (data-* attributes, an id) goes to the <main>.
15
15
  export default function PageShell(_a) {
16
- var children = _a.children, _b = _a.wide, wide = _b === void 0 ? false : _b, _c = _a.className, className = _c === void 0 ? '' : _c, rest = __rest(_a, ["children", "wide", "className"]);
16
+ var children = _a.children, _b = _a.wide, wide = _b === void 0 ? false : _b, _c = _a.fluid, fluid = _c === void 0 ? false : _c, _d = _a.className, className = _d === void 0 ? '' : _d, rest = __rest(_a, ["children", "wide", "fluid", "className"]);
17
17
  return (<main className={"min-h-screen ".concat(className)} {...rest}>
18
- <div className={"mx-auto flex w-full max-w-page flex-col gap-section px-xlarge pb-page pt-giant md:px-xxlarge ".concat(wide ? '2xl:max-w-page-wide' : '')}>
18
+ <div className={"mx-auto flex w-full flex-col gap-section px-xlarge pb-page pt-giant md:px-xxlarge ".concat(fluid ? '' : "max-w-page ".concat(wide ? '2xl:max-w-page-wide' : ''))}>
19
19
  {children}
20
20
  </div>
21
21
  </main>);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oneslash-design-system",
3
3
  "description": "A design system for the Oneslash projects",
4
- "version": "2.4.0",
4
+ "version": "2.6.0",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",