welcome-ui 10.2.0 → 10.3.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.
package/dist/Text.js CHANGED
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import './Text.css';
3
- import { createElement as p } from "react";
3
+ import { jsx as p } from "react/jsx-runtime";
4
4
  import { c as m } from "./index-PAaZGbyz.js";
5
5
  import { f as v } from "./forwardRefWithAs-8eP3ZN15.js";
6
+ import "react";
6
7
  const b = "_root_17p74_2", h = {
7
8
  root: b,
8
9
  "variant-display-xl": "_variant-display-xl_17p74_15",
@@ -36,25 +37,25 @@ const b = "_root_17p74_2", h = {
36
37
  "multi-line": "_multi-line_17p74_133",
37
38
  "with-dash": "_with-dash_17p74_136"
38
39
  }, y = m(h), x = v(
39
- ({ as: _ = "p", children: s, className: r, lines: t, variant: a = "md", withDash: l, ...e }, d) => {
40
- const o = (a == null ? void 0 : a.startsWith("heading")) || (a == null ? void 0 : a.startsWith("display")), i = t && t > 1 && t !== Number.POSITIVE_INFINITY, n = t === 1, g = y(
40
+ ({ as: _ = "p", children: s, className: r, lines: t, variant: a = "md", withDash: l, ...o }, d) => {
41
+ const e = (a == null ? void 0 : a.startsWith("heading")) || (a == null ? void 0 : a.startsWith("display")), i = t && t > 1 && t !== Number.POSITIVE_INFINITY, n = t === 1, g = y(
41
42
  "root",
42
43
  `variant-${a}`,
43
- t && "with-lines",
44
- i && "multi-line",
44
+ !!t && "with-lines",
45
+ !!i && "multi-line",
45
46
  n && "single-line",
46
- l && o && "with-dash",
47
+ l && e && "with-dash",
47
48
  r
48
49
  );
49
- return p(
50
+ return /* @__PURE__ */ p(
50
51
  _,
51
52
  {
52
53
  className: g,
53
54
  ref: d,
54
55
  style: { ...i || n ? { "--lineClamp": t } : {} },
55
- ...e
56
- },
57
- s
56
+ ...o,
57
+ children: s
58
+ }
58
59
  );
59
60
  }
60
61
  );
package/dist/Window.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import './Window.css';
3
- import { jsx as r, jsxs as _ } from "react/jsx-runtime";
3
+ import { jsx as r, jsxs as b } from "react/jsx-runtime";
4
4
  import { c as d } from "./index-PAaZGbyz.js";
5
- import { f as b } from "./forwardRefWithAs-8eP3ZN15.js";
5
+ import { f as u } from "./forwardRefWithAs-8eP3ZN15.js";
6
6
  import { forwardRef as l, useState as B } from "react";
7
- import { T as g, a as j, b as A } from "./tab-panel-BFzjhpJq.js";
8
- import { b as S } from "./Q5W46E73-ClIlNE6g.js";
9
- import { Badge as H } from "./Badge.js";
7
+ import { T as I, a as g, b as j } from "./tab-panel-BFzjhpJq.js";
8
+ import { b as A } from "./Q5W46E73-ClIlNE6g.js";
9
+ import { Badge as S } from "./Badge.js";
10
10
  import { Icon as m } from "./Icon.js";
11
- import { Text as u } from "./Text.js";
12
- const I = "_root_1r7a4_2", P = "_header_1r7a4_11", R = "_media_1r7a4_125", c = {
13
- root: I,
11
+ import { Text as h } from "./Text.js";
12
+ const H = "_root_1r7a4_2", P = "_header_1r7a4_11", R = "_media_1r7a4_125", c = {
13
+ root: H,
14
14
  header: P,
15
15
  "header-title": "_header-title_1r7a4_25",
16
16
  "header-tabs": "_header-tabs_1r7a4_31",
@@ -26,120 +26,120 @@ const I = "_root_1r7a4_2", P = "_header_1r7a4_11", R = "_media_1r7a4_125", c = {
26
26
  "size-md": "_size-md_1r7a4_149",
27
27
  "size-sm": "_size-sm_1r7a4_153",
28
28
  "size-xs": "_size-xs_1r7a4_157"
29
- }, k = d(c), h = l(
30
- ({ children: t, className: e, size: a = "md", ...s }, o) => /* @__PURE__ */ r("div", { className: k("body", `size-${a}`, e), ref: o, ...s, children: t })
29
+ }, k = d(c), p = l(
30
+ ({ children: t, className: a, size: e = "md", ...s }, o) => /* @__PURE__ */ r("div", { className: k("body", `size-${e}`, a), ref: o, ...s, children: t })
31
31
  );
32
- h.displayName = "Window.Body";
33
- const L = d(c), p = l(
34
- ({ children: t, className: e, ...a }, s) => /* @__PURE__ */ r("div", { className: L("box-text", e), ref: s, ...a, children: t })
32
+ p.displayName = "Window.Body";
33
+ const L = d(c), x = l(
34
+ ({ children: t, className: a, ...e }, s) => /* @__PURE__ */ r("div", { className: L("box-text", a), ref: s, ...e, children: t })
35
35
  );
36
- p.displayName = "Window.BoxText";
37
- const n = d(c), x = ({
36
+ x.displayName = "Window.BoxText";
37
+ const n = d(c), w = ({
38
38
  "aria-label": t,
39
- className: e,
40
- icon: a,
39
+ className: a,
40
+ icon: e,
41
41
  onClick: s,
42
42
  ...o
43
43
  }) => /* @__PURE__ */ r(
44
44
  "button",
45
45
  {
46
46
  "aria-label": t,
47
- className: n("header-action-button", e),
47
+ className: n("header-action-button", a),
48
48
  onClick: s,
49
49
  type: "button",
50
50
  ...o,
51
- children: /* @__PURE__ */ r(m, { name: a })
51
+ children: /* @__PURE__ */ r(m, { name: e })
52
52
  }
53
- ), w = ({
53
+ ), N = ({
54
54
  as: t,
55
- className: e,
56
- onClick: a
55
+ className: a,
56
+ onClick: e
57
57
  }) => /* @__PURE__ */ r(
58
- x,
58
+ w,
59
59
  {
60
60
  "aria-label": "Close window",
61
61
  as: t,
62
- className: n("header-close-button", e),
62
+ className: n("header-close-button", a),
63
63
  icon: "times",
64
- onClick: a
64
+ onClick: e
65
65
  }
66
- ), M = ({ children: t, store: e }) => /* @__PURE__ */ r(j, { className: n("header-tabs"), store: e, children: t }), O = b(
67
- ({ as: t, badge: e, children: a, icon: s, id: o, store: i, ...T }, v) => {
68
- const { selectedId: W } = S(i), $ = W === o;
69
- return /* @__PURE__ */ _(
70
- g,
66
+ ), M = ({ children: t, className: a, store: e, ...s }) => /* @__PURE__ */ r(g, { className: n("header-tabs", a), store: e, ...s, children: t }), O = u(
67
+ ({ as: t, badge: a, children: e, className: s, icon: o, id: i, store: _, ...v }, W) => {
68
+ const $ = A(_, "selectedId") === i;
69
+ return /* @__PURE__ */ b(
70
+ I,
71
71
  {
72
- className: n("header-tab-item"),
73
- id: o,
74
- ref: v,
72
+ className: n("header-tab-item", s),
73
+ id: i,
74
+ ref: W,
75
75
  render: t ? /* @__PURE__ */ r(t, {}) : void 0,
76
- store: i,
77
- ...T,
76
+ store: _,
77
+ ...v,
78
78
  children: [
79
- s ? /* @__PURE__ */ r(m, { name: s }) : null,
80
- /* @__PURE__ */ r(u, { variant: "label-sm", children: a }),
81
- e ? /* @__PURE__ */ r(H, { variant: $ ? "neutral" : "warm", children: e }) : null
79
+ o ? /* @__PURE__ */ r(m, { name: o }) : null,
80
+ /* @__PURE__ */ r(h, { variant: "label-sm", children: e }),
81
+ a ? /* @__PURE__ */ r(S, { variant: $ ? "neutral" : "warm", children: a }) : null
82
82
  ]
83
83
  },
84
- o
84
+ i
85
85
  );
86
86
  }
87
- ), E = ({ children: t, isClosable: e = !1, onClose: a }) => {
87
+ ), E = ({ children: t, isClosable: a = !1, onClose: e }) => {
88
88
  const s = () => {
89
- a == null || a();
89
+ e == null || e();
90
90
  };
91
- return /* @__PURE__ */ _("div", { className: n("header-actions"), children: [
91
+ return /* @__PURE__ */ b("div", { className: n("header-actions"), children: [
92
92
  t,
93
- e ? /* @__PURE__ */ r(w, { onClick: s }) : null
93
+ a ? /* @__PURE__ */ r(N, { onClick: s }) : null
94
94
  ] });
95
- }, q = ({ isExpandable: t = !1, onExpandChange: e }) => {
96
- const [a, s] = B(!1), o = () => {
97
- const i = !a;
98
- s(i), e == null || e(i);
95
+ }, q = ({ isExpandable: t = !1, onExpandChange: a }) => {
96
+ const [e, s] = B(!1), o = () => {
97
+ const i = !e;
98
+ s(i), a == null || a(i);
99
99
  };
100
100
  return /* @__PURE__ */ r("div", { className: n("header-actions"), children: t ? /* @__PURE__ */ r(
101
101
  "button",
102
102
  {
103
- "aria-expanded": a,
104
- "aria-label": a ? "Collapse window" : "Expand window",
103
+ "aria-expanded": e,
104
+ "aria-label": e ? "Collapse window" : "Expand window",
105
105
  className: n("header-action-button"),
106
106
  onClick: o,
107
107
  type: "button",
108
- children: /* @__PURE__ */ r(m, { name: a ? "compress-alt" : "arrow-resize-diagonal" })
108
+ children: /* @__PURE__ */ r(m, { name: e ? "compress-alt" : "arrow-resize-diagonal" })
109
109
  }
110
110
  ) : null });
111
- }, C = ({ as: t, className: e, title: a }) => /* @__PURE__ */ r(u, { as: t, className: n("header-title", e), variant: "body-md-strong", children: a }), N = l(
112
- ({ children: t, className: e, ...a }, s) => /* @__PURE__ */ r("header", { className: n("header", e), ref: s, ...a, children: t })
111
+ }, C = ({ as: t, className: a, title: e }) => /* @__PURE__ */ r(h, { as: t, className: n("header-title", a), variant: "body-md-strong", children: e }), f = l(
112
+ ({ children: t, className: a, ...e }, s) => /* @__PURE__ */ r("header", { className: n("header", a), ref: s, ...e, children: t })
113
113
  );
114
- N.displayName = "Window.Header";
115
- const D = Object.assign(N, {
116
- Button: x,
117
- CloseButton: w,
114
+ f.displayName = "Window.Header";
115
+ const D = Object.assign(f, {
116
+ Button: w,
117
+ CloseButton: N,
118
118
  LeftActions: q,
119
119
  RightActions: E,
120
120
  Tab: O,
121
121
  Tabs: M,
122
122
  Title: C
123
- }), F = d(c), f = l(
124
- ({ children: t, className: e, ...a }, s) => /* @__PURE__ */ r("div", { className: F("media", e), ref: s, ...a, children: t })
123
+ }), F = d(c), y = l(
124
+ ({ children: t, className: a, ...e }, s) => /* @__PURE__ */ r("div", { className: F("media", a), ref: s, ...e, children: t })
125
125
  );
126
- f.displayName = "Window.Media";
127
- const G = d(c), y = l(
128
- ({ children: t, store: e, tabId: a, ...s }, o) => /* @__PURE__ */ r(A, { className: G("tab-panel"), ref: o, store: e, tabId: a, ...s, children: t })
126
+ y.displayName = "Window.Media";
127
+ const G = d(c), z = l(
128
+ ({ children: t, store: a, tabId: e, ...s }, o) => /* @__PURE__ */ r(j, { className: G("tab-panel"), ref: o, store: a, tabId: e, ...s, children: t })
129
129
  );
130
- y.displayName = "Window.TabPanel";
131
- const J = d(c), z = b(
132
- ({ as: t = "div", children: e, className: a, role: s = "region", ...o }, i) => /* @__PURE__ */ r(t, { className: J("root", a), ref: i, role: s, ...o, children: e })
130
+ z.displayName = "Window.TabPanel";
131
+ const J = d(c), T = u(
132
+ ({ as: t = "div", children: a, className: e, role: s = "region", ...o }, i) => /* @__PURE__ */ r(t, { className: J("root", e), ref: i, role: s, ...o, children: a })
133
133
  );
134
- z.displayName = "Window";
135
- const te = Object.assign(z, {
136
- Body: h,
137
- BoxText: p,
134
+ T.displayName = "Window";
135
+ const se = Object.assign(T, {
136
+ Body: p,
137
+ BoxText: x,
138
138
  Header: D,
139
- Media: f,
140
- TabPanel: y
139
+ Media: y,
140
+ TabPanel: z
141
141
  });
142
142
  export {
143
- te as Window,
143
+ se as Window,
144
144
  c as windowClasses
145
145
  };