@pushwoosh/dumb-components 4.5.0 → 4.5.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.
@@ -1,11 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { UnitSize } from '@pushwoosh/kit-constants';
3
- import { Columns, Horizontal } from '@pushwoosh/kit-helpers';
2
+ import { Columns } from '@pushwoosh/kit-helpers';
4
3
  import { ArrowRoundIcon } from '@pushwoosh/kit-icons';
5
4
  import { H1 } from '@pushwoosh/kit-typography';
6
5
  import { Button } from '../../../Button';
7
6
  import { PageHeaderError } from '../PageHeaderError';
8
- import { RootBox, BackButton, TitleBox, TitleWithExtraBox, TitleWrapBox, TitleExtraBox, DescriptionBox, ActionsBox, MoreActionsBox } from './styles';
7
+ import { RootBox, BackButton, TitleBox, TitleWithExtraBox, TitleWrapBox, TitleCell, TitleExtraBox, DescriptionBox, ActionsBox, MoreActionsBox } from './styles';
9
8
  /**
10
9
  * Page-level header with a title, optional back arrow, description, inline error bar
11
10
  * and submit/cancel/extra actions.
@@ -49,9 +48,7 @@ export function PageHeader(props) {
49
48
  "$gap": 24,
50
49
  children: [titleExtra ? _jsxs(TitleWithExtraBox, {
51
50
  children: [backButton, _jsxs(TitleWrapBox, {
52
- children: [_jsx(Horizontal, {
53
- "$minHeight": UnitSize.FIELD_HEIGHT,
54
- "$alignItems": "center",
51
+ children: [_jsx(TitleCell, {
55
52
  children: _jsx(H1, {
56
53
  children: title
57
54
  })
@@ -18,6 +18,9 @@ export declare const TitleWithExtraBox: import("styled-components/dist/types").I
18
18
  [key: `--${string}`]: string | number | undefined;
19
19
  }) | undefined;
20
20
  }> & string;
21
+ export declare const TitleCell: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
22
+ style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
23
+ }> & string;
21
24
  export declare const TitleWrapBox: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
22
25
  style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
23
26
  }> & string;
@@ -19,25 +19,29 @@ export const TitleWithExtraBox = styled(TitleBox).withConfig({
19
19
  displayName: "TitleWithExtraBox",
20
20
  componentId: "sc-1qwo99q-3"
21
21
  })(["align-items:flex-start;flex-shrink:1;min-width:0;"]);
22
+ export const TitleCell = styled.div.withConfig({
23
+ displayName: "TitleCell",
24
+ componentId: "sc-1qwo99q-4"
25
+ })(["display:flex;align-items:center;min-height:", ";"], UnitSize.FIELD_HEIGHT);
22
26
  export const TitleWrapBox = styled.div.withConfig({
23
27
  displayName: "TitleWrapBox",
24
- componentId: "sc-1qwo99q-4"
25
- })(["display:flex;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:calc(8px - (", " - ", ") / 2);min-width:0;&:has([", "]){--page-header-extra-inset:", "px;}&:has([", "]){flex-wrap:nowrap;}"], UnitSize.FIELD_HEIGHT, TITLE_LINE_HEIGHT, PAGE_HEADER_INSET_ATTRIBUTE, STEP_CELL_INSET, PAGE_HEADER_RENAME_ATTRIBUTE);
28
+ componentId: "sc-1qwo99q-5"
29
+ })(["display:flex;flex-wrap:wrap;align-items:center;column-gap:8px;row-gap:calc(8px - (", " - ", ") / 2);min-width:0;&:has([", "]){--page-header-extra-inset:", "px;}&:has([", "]){flex-wrap:nowrap;& > ", "{flex-shrink:0;}}"], UnitSize.FIELD_HEIGHT, TITLE_LINE_HEIGHT, PAGE_HEADER_INSET_ATTRIBUTE, STEP_CELL_INSET, PAGE_HEADER_RENAME_ATTRIBUTE, TitleCell);
26
30
  export const TitleExtraBox = styled.div.withConfig({
27
31
  displayName: "TitleExtraBox",
28
- componentId: "sc-1qwo99q-5"
32
+ componentId: "sc-1qwo99q-6"
29
33
  })(["display:flex;align-items:center;min-width:0;margin-left:calc(-1 * var(--page-header-extra-inset,0px));"]);
30
34
  export const ActionsBox = styled.div.withConfig({
31
35
  displayName: "ActionsBox",
32
- componentId: "sc-1qwo99q-6"
36
+ componentId: "sc-1qwo99q-7"
33
37
  })(["display:flex;justify-content:flex-end;gap:8px;"]);
34
38
  export const MoreActionsBox = styled.div.withConfig({
35
39
  displayName: "MoreActionsBox",
36
- componentId: "sc-1qwo99q-7"
40
+ componentId: "sc-1qwo99q-8"
37
41
  })(["display:flex;margin-right:", ";"], ({
38
42
  $hasActions
39
43
  }) => $hasActions ? '16px' : '0');
40
44
  export const DescriptionBox = styled(Paragraph).withConfig({
41
45
  displayName: "DescriptionBox",
42
- componentId: "sc-1qwo99q-8"
46
+ componentId: "sc-1qwo99q-9"
43
47
  })(["margin-top:16px;"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",