@pushwoosh/dumb-components 4.18.0 → 4.18.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Color } from '@pushwoosh/kit-constants';
3
- import { Vertical } from '@pushwoosh/kit-helpers';
3
+ import { Horizontal, Vertical } from '@pushwoosh/kit-helpers';
4
4
  import { CheckRoundIcon, LockIcon } from '@pushwoosh/kit-icons';
5
5
  import { H1, Paragraph } from '@pushwoosh/kit-typography';
6
6
  import { Banner } from '../Banner';
@@ -68,7 +68,12 @@ export function GetStartedPage(props) {
68
68
  view: "filled",
69
69
  size: "small"
70
70
  })
71
- }), actions]
71
+ }), actions && _jsx(Horizontal, {
72
+ "$alignItems": "center",
73
+ "$justifyContent": "start",
74
+ "$gap": 8,
75
+ children: actions
76
+ })]
72
77
  })]
73
78
  }), _jsx(Image, {
74
79
  alt: title,
@@ -15,6 +15,6 @@ export interface GetStartedPageProps {
15
15
  checkList?: string[];
16
16
  /** Marker of checklist items: check icons (default) or step numbers. */
17
17
  checkListView?: GetStartedPageCheckListView;
18
- /** Call-to-action controls. */
18
+ /** Action controls, laid out in a row at their own width. */
19
19
  actions?: ReactNode;
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "4.18.0",
3
+ "version": "4.18.2",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -45,8 +45,8 @@
45
45
  "@codemirror/view": "^6.43.11",
46
46
  "@floating-ui/react-dom": "^2.1.9",
47
47
  "@lezer/highlight": "^1.2.1",
48
- "@pushwoosh/kit-constants": "^3.2.1",
49
- "@pushwoosh/kit-helpers": "^4.17.2",
48
+ "@pushwoosh/kit-constants": "^3.3.0",
49
+ "@pushwoosh/kit-helpers": "^4.18.0",
50
50
  "@pushwoosh/kit-icons": "^3.0.2",
51
51
  "@pushwoosh/kit-typography": "^2.2.0",
52
52
  "@tippyjs/react": "^4.2.6",
@@ -22,5 +22,5 @@ export declare function parseDc(value: string): DynamicContent;
22
22
  export declare function isIgnoringNonTagged(dc: DynamicContent): boolean;
23
23
  /** Serializes a token back to `{tagName|modifier|defaultValue}`. */
24
24
  export declare function stringifyDc(dc: DynamicContent): string;
25
- /** Whether the sender substitutes this token, or ships it verbatim (dates are case-sensitive, other modifiers are not). */
25
+ /** Whether the sender substitutes this token, or ships it verbatim. */
26
26
  export declare function isResolvableDc(dc: DynamicContent): boolean;
@@ -1,3 +1,4 @@
1
+ import { isResolvableModifier } from '@pushwoosh/kit-constants';
1
2
  // Localization placeholders (`{{key|text}}`) contain a token-shaped substring,
2
3
  // so they are matched first and kept literal.
3
4
  const PART_REGEX = /(\{\{[^{}]*\}\}|\{(?=[^{}]*\|)[^{}]*\})/;
@@ -48,13 +49,7 @@ export function stringifyDc(dc) {
48
49
  } = dc;
49
50
  return `{${tagName}|${modifier}${isIgnoringNonTagged(dc) ? '' : `|${defaultValue}`}}`;
50
51
  }
51
- const CASE_INSENSITIVE_MODIFIERS = ['capitalizefirst', 'capitalizeallfirst', 'uppercase', 'lowercase', 'regular', 'base64', 'cent', 'dollar', 'comma', 'euro', 'jpy', 'lira'];
52
- const DATE_MODIFIERS = ['M-d-y', 'm-d-y', 'M d y', 'M d Y', 'l', 'M d', 'H:i', 'm-d-y H:i'];
53
- /** Whether the sender substitutes this token, or ships it verbatim (dates are case-sensitive, other modifiers are not). */
52
+ /** Whether the sender substitutes this token, or ships it verbatim. */
54
53
  export function isResolvableDc(dc) {
55
- const {
56
- tagName,
57
- modifier
58
- } = dc;
59
- return Boolean(tagName) && (CASE_INSENSITIVE_MODIFIERS.includes(modifier.toLowerCase()) || DATE_MODIFIERS.includes(modifier));
54
+ return Boolean(dc.tagName) && isResolvableModifier(dc.modifier);
60
55
  }