@manakind/ui-core 0.30.0 → 0.30.1

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.
@@ -25,6 +25,14 @@
25
25
  & > .ds-split-layout__aside {
26
26
  min-width: 0;
27
27
  }
28
+
29
+ /*
30
+ * Left without its aside, as while a side panel needs the room, the main
31
+ * region spans the aside's column too rather than falling into it.
32
+ */
33
+ & > .ds-split-layout__main:only-child {
34
+ grid-column: 1 / -1;
35
+ }
28
36
  }
29
37
 
30
38
  @media (width >= 40rem) {
@@ -20,7 +20,8 @@ export interface SplitLayoutProps extends ComponentProps<typeof ark.div> {
20
20
  * Side by side from `collapseBelow` up, with the aside at a fixed content
21
21
  * width and the main region taking the rest; stacked on a narrower viewport
22
22
  * with the main region first in reading order whatever side the aside
23
- * takes. Compose with {@link SplitMain} and {@link SplitAside}.
23
+ * takes. Compose with {@link SplitMain} and {@link SplitAside}. A layout
24
+ * rendered without its aside gives the main region the whole width.
24
25
  */
25
26
  export declare function SplitLayout({ collapseBelow, asideWidth, asidePosition, className, children, ...props }: SplitLayoutProps): import("react/jsx-runtime").JSX.Element;
26
27
  export type SplitMainProps = ComponentProps<typeof ark.div>;
@@ -1 +1 @@
1
- {"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../src/split-layout/split-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;IACtE;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1C,mFAAmF;IACnF,UA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,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAC1B,aAAoB,EACpB,UAAiB,EACjB,aAAqB,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAelB;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAE5D,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAM1E;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;AAE/D,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E"}
@@ -9,7 +9,8 @@ import { cx } from '../cx';
9
9
  * Side by side from `collapseBelow` up, with the aside at a fixed content
10
10
  * width and the main region taking the rest; stacked on a narrower viewport
11
11
  * with the main region first in reading order whatever side the aside
12
- * takes. Compose with {@link SplitMain} and {@link SplitAside}.
12
+ * takes. Compose with {@link SplitMain} and {@link SplitAside}. A layout
13
+ * rendered without its aside gives the main region the whole width.
13
14
  */
14
15
  export function SplitLayout({ collapseBelow = 'lg', asideWidth = 'sm', asidePosition = 'end', className, children, ...props }) {
15
16
  return (_jsx(ark.div, { className: cx('ds-split-layout', `ds-split-layout--collapse-${collapseBelow}`, `ds-split-layout--aside-${asideWidth}`, `ds-split-layout--aside-${asidePosition}`, className), ...props, children: children }));
@@ -1 +1 @@
1
- {"version":3,"file":"split-layout.js","sourceRoot":"","sources":["../../src/split-layout/split-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAe3B;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,aAAa,GAAG,IAAI,EACpB,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS;IACjB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,6BAA6B,aAAa,EAAE,EAC5C,0BAA0B,UAAU,EAAE,EACtC,0BAA0B,aAAa,EAAE,EACzC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,qFAAqF;AACrF,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IACzE,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAAM,KAAK,YAClE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,KAAK,IAAC,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAAM,KAAK,YACrE,QAAQ,GACC,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './split-layout.css';\nimport { cx } from '../cx';\nimport type { Breakpoint, ContentWidth } from '../layout/layout';\n\nexport interface SplitLayoutProps extends ComponentProps<typeof ark.div> {\n /**\n * The viewport step from which the two regions sit side by side; below it\n * they stack, main first. Defaults to `lg`.\n */\n collapseBelow?: Exclude<Breakpoint, 'xl'>;\n /** The aside's width when side by side: a content width step. Defaults to `sm`. */\n asideWidth?: Exclude<ContentWidth, 'lg' | 'xl'>;\n /** Which side the aside takes when side by side. Defaults to `end`. */\n asidePosition?: 'start' | 'end';\n}\n\n/**\n * A main region with an aside: content and its filters, a detail and its\n * facts, a list and a summary.\n *\n * Side by side from `collapseBelow` up, with the aside at a fixed content\n * width and the main region taking the rest; stacked on a narrower viewport\n * with the main region first in reading order whatever side the aside\n * takes. Compose with {@link SplitMain} and {@link SplitAside}.\n */\nexport function SplitLayout({\n collapseBelow = 'lg',\n asideWidth = 'sm',\n asidePosition = 'end',\n className,\n children,\n ...props\n}: SplitLayoutProps) {\n return (\n <ark.div\n className={cx(\n 'ds-split-layout',\n `ds-split-layout--collapse-${collapseBelow}`,\n `ds-split-layout--aside-${asideWidth}`,\n `ds-split-layout--aside-${asidePosition}`,\n className,\n )}\n {...props}\n >\n {children}\n </ark.div>\n );\n}\n\nexport type SplitMainProps = ComponentProps<typeof ark.div>;\n\n/** The main region. Pass `asChild` to make it a landmark (`<main>`, `<section>`). */\nexport function SplitMain({ className, children, ...props }: SplitMainProps) {\n return (\n <ark.div className={cx('ds-split-layout__main', className)} {...props}>\n {children}\n </ark.div>\n );\n}\n\nexport type SplitAsideProps = ComponentProps<typeof ark.aside>;\n\n/** The aside. Renders an `aside`; name it with `aria-label` when a page has more than one. */\nexport function SplitAside({ className, children, ...props }: SplitAsideProps) {\n return (\n <ark.aside className={cx('ds-split-layout__aside', className)} {...props}>\n {children}\n </ark.aside>\n );\n}\n"]}
1
+ {"version":3,"file":"split-layout.js","sourceRoot":"","sources":["../../src/split-layout/split-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAe3B;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,aAAa,GAAG,IAAI,EACpB,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS;IACjB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,6BAA6B,aAAa,EAAE,EAC5C,0BAA0B,UAAU,EAAE,EACtC,0BAA0B,aAAa,EAAE,EACzC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,qFAAqF;AACrF,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IACzE,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAAM,KAAK,YAClE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,KAAK,IAAC,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAAM,KAAK,YACrE,QAAQ,GACC,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { ark } from '@ark-ui/react/factory';\nimport type { ComponentProps } from 'react';\nimport './split-layout.css';\nimport { cx } from '../cx';\nimport type { Breakpoint, ContentWidth } from '../layout/layout';\n\nexport interface SplitLayoutProps extends ComponentProps<typeof ark.div> {\n /**\n * The viewport step from which the two regions sit side by side; below it\n * they stack, main first. Defaults to `lg`.\n */\n collapseBelow?: Exclude<Breakpoint, 'xl'>;\n /** The aside's width when side by side: a content width step. Defaults to `sm`. */\n asideWidth?: Exclude<ContentWidth, 'lg' | 'xl'>;\n /** Which side the aside takes when side by side. Defaults to `end`. */\n asidePosition?: 'start' | 'end';\n}\n\n/**\n * A main region with an aside: content and its filters, a detail and its\n * facts, a list and a summary.\n *\n * Side by side from `collapseBelow` up, with the aside at a fixed content\n * width and the main region taking the rest; stacked on a narrower viewport\n * with the main region first in reading order whatever side the aside\n * takes. Compose with {@link SplitMain} and {@link SplitAside}. A layout\n * rendered without its aside gives the main region the whole width.\n */\nexport function SplitLayout({\n collapseBelow = 'lg',\n asideWidth = 'sm',\n asidePosition = 'end',\n className,\n children,\n ...props\n}: SplitLayoutProps) {\n return (\n <ark.div\n className={cx(\n 'ds-split-layout',\n `ds-split-layout--collapse-${collapseBelow}`,\n `ds-split-layout--aside-${asideWidth}`,\n `ds-split-layout--aside-${asidePosition}`,\n className,\n )}\n {...props}\n >\n {children}\n </ark.div>\n );\n}\n\nexport type SplitMainProps = ComponentProps<typeof ark.div>;\n\n/** The main region. Pass `asChild` to make it a landmark (`<main>`, `<section>`). */\nexport function SplitMain({ className, children, ...props }: SplitMainProps) {\n return (\n <ark.div className={cx('ds-split-layout__main', className)} {...props}>\n {children}\n </ark.div>\n );\n}\n\nexport type SplitAsideProps = ComponentProps<typeof ark.aside>;\n\n/** The aside. Renders an `aside`; name it with `aria-label` when a page has more than one. */\nexport function SplitAside({ className, children, ...props }: SplitAsideProps) {\n return (\n <ark.aside className={cx('ds-split-layout__aside', className)} {...props}>\n {children}\n </ark.aside>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/ui-core",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {