@keboola/design 4.1.1 → 4.1.2

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/index.d.cts CHANGED
@@ -4746,25 +4746,26 @@ declare const PageLayout: (({ ref, className, maxWidth, children, ...props }: Ro
4746
4746
  * single-entity pages with breadcrumbs.
4747
4747
  * **When NOT to use:** for layouts that don't match either pattern, host custom JSX inside
4748
4748
  * `PageLayout.Header` directly. For routing-driven tab rows below the header use `PageLayout.Tabs`.
4749
- * **Composition:** nest inside `PageLayout.Header`. Always opt into `Button argo` for any buttons passed
4750
- * into header slots. The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).
4749
+ * **Composition:** nest inside `PageLayout.Header`. Pass `@keboola/design` `Button`s into the header slots
4750
+ * (chrome is brand-driven). The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).
4751
4751
  *
4752
4752
  * @see RECIPES.md#page-header-tabs — for the canonical page-header + tabs composition
4753
4753
  */
4754
4754
  declare const PageHeader: {
4755
4755
  /** Index variant — top-level list / collection pages. No breadcrumbs; `metadata` wins over `description`. */
4756
- Index: ({ ref, className, title, description, metadata, documentation, action, headerNav, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4756
+ Index: ({ ref, className, title, description, metadata, documentation, action, headerNav, fullWidthDescription, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4757
4757
  title: react.ReactNode;
4758
4758
  description?: react.ReactNode;
4759
4759
  metadata?: react.ReactNode;
4760
4760
  documentation?: react.ReactNode;
4761
4761
  action?: react.ReactNode;
4762
4762
  headerNav?: react.ReactNode;
4763
+ fullWidthDescription?: boolean;
4763
4764
  }) & {
4764
4765
  ref?: react.Ref<react.ElementRef<"header">>;
4765
4766
  }) => react_jsx_runtime.JSX.Element;
4766
4767
  /** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */
4767
- Detail: ({ ref, className, breadcrumbs, overflowActions, title, titleIcon, badges, description, compact, primaryAction, secondaryAction, headerNav, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4768
+ Detail: ({ ref, className, breadcrumbs, overflowActions, title, titleIcon, badges, description, compact, primaryAction, secondaryAction, headerNav, fullWidthDescription, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4768
4769
  breadcrumbs: react.ReactNode;
4769
4770
  overflowActions?: react.ReactNode;
4770
4771
  title: react.ReactNode;
@@ -4775,6 +4776,7 @@ declare const PageHeader: {
4775
4776
  primaryAction?: react.ReactNode;
4776
4777
  secondaryAction?: react.ReactNode;
4777
4778
  headerNav?: react.ReactNode;
4779
+ fullWidthDescription?: boolean;
4778
4780
  }) & {
4779
4781
  ref?: react.Ref<react.ElementRef<"header">>;
4780
4782
  }) => react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -4746,25 +4746,26 @@ declare const PageLayout: (({ ref, className, maxWidth, children, ...props }: Ro
4746
4746
  * single-entity pages with breadcrumbs.
4747
4747
  * **When NOT to use:** for layouts that don't match either pattern, host custom JSX inside
4748
4748
  * `PageLayout.Header` directly. For routing-driven tab rows below the header use `PageLayout.Tabs`.
4749
- * **Composition:** nest inside `PageLayout.Header`. Always opt into `Button argo` for any buttons passed
4750
- * into header slots. The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).
4749
+ * **Composition:** nest inside `PageLayout.Header`. Pass `@keboola/design` `Button`s into the header slots
4750
+ * (chrome is brand-driven). The variant types enforce pattern constraints (e.g. `Index` rejects breadcrumbs).
4751
4751
  *
4752
4752
  * @see RECIPES.md#page-header-tabs — for the canonical page-header + tabs composition
4753
4753
  */
4754
4754
  declare const PageHeader: {
4755
4755
  /** Index variant — top-level list / collection pages. No breadcrumbs; `metadata` wins over `description`. */
4756
- Index: ({ ref, className, title, description, metadata, documentation, action, headerNav, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4756
+ Index: ({ ref, className, title, description, metadata, documentation, action, headerNav, fullWidthDescription, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4757
4757
  title: react.ReactNode;
4758
4758
  description?: react.ReactNode;
4759
4759
  metadata?: react.ReactNode;
4760
4760
  documentation?: react.ReactNode;
4761
4761
  action?: react.ReactNode;
4762
4762
  headerNav?: react.ReactNode;
4763
+ fullWidthDescription?: boolean;
4763
4764
  }) & {
4764
4765
  ref?: react.Ref<react.ElementRef<"header">>;
4765
4766
  }) => react_jsx_runtime.JSX.Element;
4766
4767
  /** Detail variant — single-entity pages with required breadcrumbs and an overflow-actions slot. Max 2 visible actions. */
4767
- Detail: ({ ref, className, breadcrumbs, overflowActions, title, titleIcon, badges, description, compact, primaryAction, secondaryAction, headerNav, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4768
+ Detail: ({ ref, className, breadcrumbs, overflowActions, title, titleIcon, badges, description, compact, primaryAction, secondaryAction, headerNav, fullWidthDescription, ...props }: (Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>, "ref">, "title"> & {
4768
4769
  breadcrumbs: react.ReactNode;
4769
4770
  overflowActions?: react.ReactNode;
4770
4771
  title: react.ReactNode;
@@ -4775,6 +4776,7 @@ declare const PageHeader: {
4775
4776
  primaryAction?: react.ReactNode;
4776
4777
  secondaryAction?: react.ReactNode;
4777
4778
  headerNav?: react.ReactNode;
4779
+ fullWidthDescription?: boolean;
4778
4780
  }) & {
4779
4781
  ref?: react.Ref<react.ElementRef<"header">>;
4780
4782
  }) => react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -13361,28 +13361,52 @@ var PageHeaderDetail = ({
13361
13361
  primaryAction,
13362
13362
  secondaryAction,
13363
13363
  headerNav,
13364
+ fullWidthDescription = false,
13364
13365
  ...props
13365
- }) => /* @__PURE__ */ jsxs("header", { ref, className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className), ...props, children: [
13366
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-between tw-gap-4", children: [
13367
- /* @__PURE__ */ jsx("div", { className: "tw-min-w-0 tw-flex-1", children: breadcrumbs }),
13368
- overflowActions && /* @__PURE__ */ jsx("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: overflowActions })
13369
- ] }),
13370
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13371
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-64 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
13372
- /* @__PURE__ */ jsxs("div", { className: titleRowClass, children: [
13373
- titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
13374
- /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
13375
- badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
13376
- ] }),
13377
- description && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: description })
13378
- ] }),
13379
- (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "tw-ml-auto tw-flex tw-flex-wrap tw-items-center tw-justify-end tw-gap-2", children: [
13380
- secondaryAction,
13381
- primaryAction
13382
- ] })
13383
- ] }),
13384
- headerNav
13385
- ] });
13366
+ }) => {
13367
+ const titleRow = /* @__PURE__ */ jsxs("div", { className: cn(titleRowClass, "tw-min-w-64 tw-flex-1 tw-pr-2"), children: [
13368
+ titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
13369
+ /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
13370
+ badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
13371
+ ] });
13372
+ const actions = (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs("div", { className: "tw-ml-auto tw-flex tw-flex-wrap tw-items-center tw-justify-end tw-gap-2", children: [
13373
+ secondaryAction,
13374
+ primaryAction
13375
+ ] });
13376
+ const descriptionNode = description && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: description });
13377
+ return /* @__PURE__ */ jsxs(
13378
+ "header",
13379
+ {
13380
+ ref,
13381
+ className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className),
13382
+ ...props,
13383
+ children: [
13384
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-center tw-justify-between tw-gap-4", children: [
13385
+ /* @__PURE__ */ jsx("div", { className: "tw-min-w-0 tw-flex-1", children: breadcrumbs }),
13386
+ overflowActions && /* @__PURE__ */ jsx("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: overflowActions })
13387
+ ] }),
13388
+ fullWidthDescription ? /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-col tw-gap-2", children: [
13389
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13390
+ titleRow,
13391
+ actions
13392
+ ] }),
13393
+ descriptionNode
13394
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13395
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-64 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
13396
+ /* @__PURE__ */ jsxs("div", { className: titleRowClass, children: [
13397
+ titleIcon && /* @__PURE__ */ jsx("span", { className: "tw-flex tw-shrink-0 tw-items-center", children: titleIcon }),
13398
+ /* @__PURE__ */ jsx("h1", { className: compact ? titleCompactClass : titleClass, children: title }),
13399
+ badges && /* @__PURE__ */ jsx("div", { className: badgesClass, children: badges })
13400
+ ] }),
13401
+ descriptionNode
13402
+ ] }),
13403
+ actions
13404
+ ] }),
13405
+ headerNav
13406
+ ]
13407
+ }
13408
+ );
13409
+ };
13386
13410
  var PageHeaderIndex = ({
13387
13411
  ref,
13388
13412
  className,
@@ -13392,9 +13416,11 @@ var PageHeaderIndex = ({
13392
13416
  documentation,
13393
13417
  action,
13394
13418
  headerNav,
13419
+ fullWidthDescription = false,
13395
13420
  ...props
13396
13421
  }) => {
13397
13422
  const subtitle = metadata ?? description;
13423
+ const hasActions = Boolean(documentation || action);
13398
13424
  return /* @__PURE__ */ jsxs(
13399
13425
  "header",
13400
13426
  {
@@ -13402,12 +13428,21 @@ var PageHeaderIndex = ({
13402
13428
  className: cn("tw-flex tw-w-full tw-flex-col tw-gap-4", className),
13403
13429
  ...props,
13404
13430
  children: [
13405
- /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between tw-gap-4", children: [
13431
+ fullWidthDescription ? /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-col tw-gap-2", children: [
13432
+ /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-flex-wrap tw-items-start tw-justify-between tw-gap-x-4 tw-gap-y-3", children: [
13433
+ /* @__PURE__ */ jsx("div", { className: cn(titleRowClass, "tw-min-w-64 tw-flex-1 tw-pr-2"), children: /* @__PURE__ */ jsx("h1", { className: titleClass, children: title }) }),
13434
+ hasActions && /* @__PURE__ */ jsxs("div", { className: "tw-ml-auto tw-flex tw-flex-wrap tw-items-center tw-justify-end tw-gap-2", children: [
13435
+ documentation,
13436
+ action
13437
+ ] })
13438
+ ] }),
13439
+ subtitle && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: subtitle })
13440
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-w-full tw-items-start tw-justify-between tw-gap-4", children: [
13406
13441
  /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-min-w-0 tw-flex-1 tw-flex-col tw-gap-2 tw-pr-2", children: [
13407
13442
  /* @__PURE__ */ jsx("div", { className: titleRowClass, children: /* @__PURE__ */ jsx("h1", { className: titleClass, children: title }) }),
13408
13443
  subtitle && /* @__PURE__ */ jsx("p", { className: descriptionClass, children: subtitle })
13409
13444
  ] }),
13410
- (documentation || action) && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: [
13445
+ hasActions && /* @__PURE__ */ jsxs("div", { className: "tw-flex tw-shrink-0 tw-items-center tw-gap-2", children: [
13411
13446
  documentation,
13412
13447
  action
13413
13448
  ] })