welcome-ui 7.3.0 → 7.4.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.
package/dist/Text.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import p from "react";
3
- import f, { css as n, th as r, system as d } from "@xstyled/styled-components";
4
- import { forwardRef as b } from "./System.mjs";
5
- const x = {
2
+ import f from "react";
3
+ import b, { css as i, th as d, system as a } from "@xstyled/styled-components";
4
+ import { forwardRef as x } from "./System.mjs";
5
+ const g = {
6
6
  h0: "h1",
7
7
  h1: "h2",
8
8
  h2: "h3",
@@ -10,7 +10,7 @@ const x = {
10
10
  h4: "h5",
11
11
  h5: "h6",
12
12
  h6: "h6"
13
- }, g = (e) => n`
13
+ }, k = (e) => i`
14
14
  /* stylelint-disable-next-line value-no-vendor-prefix */
15
15
  display: -webkit-box;
16
16
  /* stylelint-disable-next-line property-no-vendor-prefix */
@@ -20,17 +20,18 @@ const x = {
20
20
  line-height: normal;
21
21
  overflow: hidden;
22
22
  word-break: ${e === 1 ? "break-all" : null};
23
- `, y = f.p(({ lines: e, theme: o, variant: t, withDash: s }) => {
24
- const l = x[t], h = t == null ? void 0 : t.startsWith("h"), i = e && e !== 1 / 0 && t.startsWith("h") && o.fonts.headings.includes("welcome-font");
25
- return n`
26
- ${r(`texts.${l || t}`)};
23
+ `, y = b.p(({ lines: e, theme: n, variant: t, withDash: s, wordBreak: l }) => {
24
+ const h = g[t], r = t == null ? void 0 : t.startsWith("h"), o = e && e !== 1 / 0 && t.startsWith("h") && n.fonts.headings.includes("welcome-font");
25
+ return i`
26
+ ${d(`texts.${h || t}`)};
27
+ word-break: ${l};
27
28
 
28
29
  /* Start fallback for non-webkit */
29
30
  display: block;
30
- ${e && e !== 1 / 0 && g(e)};
31
+ ${e && e !== 1 / 0 && k(e)};
31
32
  /* End fallback for non-webkit */
32
33
 
33
- ${s && h && n`
34
+ ${s && r && i`
34
35
  display: flex;
35
36
 
36
37
  &:before {
@@ -46,19 +47,19 @@ const x = {
46
47
  `}
47
48
 
48
49
  @media (min-width: lg) {
49
- ${r(`texts.${t}`)};
50
- ${d};
50
+ ${d(`texts.${t}`)};
51
+ ${a};
51
52
  }
52
53
 
53
- ${i && n`
54
+ ${o && i`
54
55
  & {
55
56
  line-height: 1.4;
56
57
  }
57
58
  `}
58
59
 
59
- ${d};
60
+ ${a};
60
61
  `;
61
- }), k = {
62
+ }), w = {
62
63
  h0: "h1",
63
64
  h1: "h1",
64
65
  h2: "h2",
@@ -72,26 +73,36 @@ const x = {
72
73
  xs: "p",
73
74
  "subtitle-md": "span",
74
75
  "subtitle-sm": "span"
75
- }, u = b(
76
- ({ as: e, children: o, dataTestId: t, lines: s, variant: l = "md", withDash: h, ...i }, a) => {
77
- const c = e || k[l], m = i.className || "";
78
- return /* @__PURE__ */ p.createElement(
76
+ }, $ = x(
77
+ ({
78
+ as: e,
79
+ children: n,
80
+ dataTestId: t,
81
+ lines: s,
82
+ variant: l = "md",
83
+ withDash: h,
84
+ wordBreak: r = "break-word",
85
+ ...o
86
+ }, c) => {
87
+ const m = e || w[l], p = o.className || "";
88
+ return /* @__PURE__ */ f.createElement(
79
89
  y,
80
90
  {
81
- as: c,
91
+ as: m,
82
92
  "data-testid": t,
83
93
  lines: s,
84
- ref: a,
94
+ ref: c,
85
95
  variant: l,
86
96
  withDash: h,
87
- ...i,
88
- className: `${m} wui-text`
97
+ wordBreak: r,
98
+ ...o,
99
+ className: `${p} wui-text`
89
100
  },
90
- o
101
+ n
91
102
  );
92
103
  }
93
104
  );
94
- u.displayName = "Text";
105
+ $.displayName = "Text";
95
106
  export {
96
- u as Text
107
+ $ as Text
97
108
  };
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { CreateWuiProps } from '../System';
2
3
  declare const TAG_NAMES: {
3
4
  h0: string;
@@ -19,6 +20,7 @@ export interface TextOptions {
19
20
  lines?: number;
20
21
  variant?: Variant;
21
22
  withDash?: boolean;
23
+ wordBreak?: CSSProperties['wordBreak'];
22
24
  }
23
25
  export type TextProps = CreateWuiProps<'p', TextOptions>;
24
26
  export declare const Text: import('../System').CreateWuiComponent<"p", TextProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "7.3.0",
3
+ "version": "7.4.0",
4
4
  "description": "Customizable design system with react • styled-components • styled-system and ariakit.",
5
5
  "files": [
6
6
  "dist"