welcome-ui 10.0.0-alpha.12 → 10.0.0-alpha.13
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/StickyNote.css +1 -1
- package/dist/StickyNote.js +52 -38
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +107 -107
- package/dist/types/components/StickyNote/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/StickyNote.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_1snl7_2{transform:rotate3d(0,0,1,.3deg);display:flex;border-color:var(--components-colors-sticky-note-color-border-default);border-style:solid;border-width:var(--border-width-xs);border-radius:var(--components-dimensions-sticky-note-border-radius);padding:var(--spacing-3xl) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);box-shadow:var(--elevation-30);width:var(--StickyNoteWidth);min-height:var(--StickyNoteHeight);background-color:var(--StickyNoteBackgroundColor);color:var(--StickyNoteColor)}._root_1snl7_2:before{content:"";position:absolute;top:0;left:0;width:100%;height:var(--spacing-xxl);background-color:#00000005}._shape-rectangle_1snl7_27{--StickyNoteWidth: var(--components-dimensions-sticky-note-size-width-rectangle);--StickyNoteHeight: var(--components-dimensions-sticky-note-size-height-rectangle)}._shape-square_1snl7_31{--StickyNoteWidth: var(--components-dimensions-sticky-note-size-width-square);--StickyNoteHeight: var(--components-dimensions-sticky-note-size-height-square)}._shape-full_1snl7_35{--StickyNoteWidth: 100%}._variant-brand_1snl7_38{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-brand);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-brand)}._variant-brand_1snl7_38 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-brand);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-brand )}._variant-blue_1snl7_48{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-blue);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-blue)}._variant-blue_1snl7_48 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-blue);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-blue )}._variant-green_1snl7_58{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-green);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-green)}._variant-green_1snl7_58 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-green);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-green )}._variant-violet_1snl7_68{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-violet);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-violet)}._variant-violet_1snl7_68 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-violet);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-violet )}._variant-pink_1snl7_78{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-pink);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-pink)}._variant-pink_1snl7_78 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-pink);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-pink )}._variant-orange_1snl7_88{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-orange);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-orange)}._variant-orange_1snl7_88 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-orange);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-orange )}._variant-teal_1snl7_98{--StickyNoteBackgroundColor: var(--components-colors-sticky-note-color-background-teal);--StickyNoteColor: var(--components-colors-sticky-note-color-text-body-teal)}._variant-teal_1snl7_98 ._title-icon_1snl7_42{--StickyNoteTitleIconColor: var(--components-colors-sticky-note-icon-color-icon-teal);--StickyNoteTitleIconBackgroundColor: var( --components-colors-sticky-note-icon-color-background-teal )}._close-button_1snl7_108{position:absolute;transform:rotate3d(0,0,1,-.3deg);right:var(--spacing-xs);top:var(--spacing-xs)}._content_1snl7_114{display:flex;flex-direction:column;gap:var(--components-dimensions-sticky-note-gap-content);transform:rotate3d(0,0,1,-.3deg);font-size:var(--font-size-md);line-height:var(--font-line-height-md)}._title_1snl7_42{display:flex;gap:var(--spacing-sm);align-items:center}._title-icon_1snl7_42{flex-shrink:0;padding:var(--components-dimensions-sticky-note-icon-padding-block);border-radius:var(--components-dimensions-sticky-note-icon-border-radius);color:var(--StickyNoteTitleIconColor);background-color:var(--StickyNoteTitleIconBackgroundColor)}._action_1snl7_134{margin-top:auto;width:fit-content}}
|
package/dist/StickyNote.js
CHANGED
|
@@ -1,49 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './StickyNote.css';
|
|
3
|
-
import { jsx as t, jsxs as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { c as
|
|
7
|
-
import { Button as
|
|
3
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef as b } from "react";
|
|
5
|
+
import { CloseButton as f } from "./CloseButton.js";
|
|
6
|
+
import { c as e } from "./index-PAaZGbyz.js";
|
|
7
|
+
import { Button as h } from "./Button.js";
|
|
8
8
|
import { Icon as y } from "./Icon.js";
|
|
9
|
-
import { Text as
|
|
10
|
-
const
|
|
11
|
-
root:
|
|
12
|
-
"shape-rectangle": "_shape-
|
|
13
|
-
"shape-square": "_shape-
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"variant-
|
|
18
|
-
"variant-
|
|
19
|
-
"variant-
|
|
20
|
-
"variant-
|
|
21
|
-
"variant-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */ t("
|
|
9
|
+
import { Text as g } from "./Text.js";
|
|
10
|
+
const k = "_root_1snl7_2", x = "_content_1snl7_114", B = "_title_1snl7_42", S = "_action_1snl7_134", i = {
|
|
11
|
+
root: k,
|
|
12
|
+
"shape-rectangle": "_shape-rectangle_1snl7_27",
|
|
13
|
+
"shape-square": "_shape-square_1snl7_31",
|
|
14
|
+
"shape-full": "_shape-full_1snl7_35",
|
|
15
|
+
"variant-brand": "_variant-brand_1snl7_38",
|
|
16
|
+
"title-icon": "_title-icon_1snl7_42",
|
|
17
|
+
"variant-blue": "_variant-blue_1snl7_48",
|
|
18
|
+
"variant-green": "_variant-green_1snl7_58",
|
|
19
|
+
"variant-violet": "_variant-violet_1snl7_68",
|
|
20
|
+
"variant-pink": "_variant-pink_1snl7_78",
|
|
21
|
+
"variant-orange": "_variant-orange_1snl7_88",
|
|
22
|
+
"variant-teal": "_variant-teal_1snl7_98",
|
|
23
|
+
"close-button": "_close-button_1snl7_108",
|
|
24
|
+
content: x,
|
|
25
|
+
title: B,
|
|
26
|
+
action: S
|
|
27
|
+
}, $ = e(i), c = ({ children: n, className: a, ...s }) => /* @__PURE__ */ t(h, { className: $("action", a), ...s, size: "sm", variant: "primary-neutral", children: n });
|
|
28
|
+
c.displayName = "StickyNote.Button";
|
|
29
|
+
const l = e(i), _ = ({ children: n, icon: a = "lightbulb-alt" }) => /* @__PURE__ */ r(g, { as: "div", className: l("title"), variant: "body-md-strong", children: [
|
|
30
|
+
/* @__PURE__ */ t("div", { className: l("title-icon"), children: /* @__PURE__ */ t(y, { name: a }) }),
|
|
31
|
+
/* @__PURE__ */ t("span", { children: n })
|
|
31
32
|
] });
|
|
32
33
|
_.displayName = "StickyNote.Title";
|
|
33
|
-
const
|
|
34
|
-
({ children:
|
|
35
|
-
const
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const o = e(i), m = b(
|
|
35
|
+
({ children: n, className: a, handleClose: s, isFullWidth: p, shape: u = "square", variant: v = "brand" }, d) => {
|
|
36
|
+
const N = !!s;
|
|
37
|
+
return /* @__PURE__ */ r(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: o(
|
|
41
|
+
"root",
|
|
42
|
+
`variant-${v}`,
|
|
43
|
+
`shape-${u}`,
|
|
44
|
+
p && "shape-full",
|
|
45
|
+
a
|
|
46
|
+
),
|
|
47
|
+
ref: d,
|
|
48
|
+
children: [
|
|
49
|
+
N ? /* @__PURE__ */ t(f, { className: o("close-button"), onClick: s, size: "sm" }) : null,
|
|
50
|
+
/* @__PURE__ */ t("div", { className: o("content"), children: n })
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
);
|
|
40
54
|
}
|
|
41
55
|
);
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
Button:
|
|
56
|
+
m.displayName = "StickyNote";
|
|
57
|
+
const O = Object.assign(m, {
|
|
58
|
+
Button: c,
|
|
45
59
|
Title: _
|
|
46
60
|
});
|
|
47
61
|
export {
|
|
48
|
-
|
|
62
|
+
O as StickyNote
|
|
49
63
|
};
|
package/dist/Tabs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_peui8_2{display:flex;align-items:center;transition-property:background-color,border-color,color,box-shadow;transition-timing-function:ease-in-out;cursor:pointer;border-radius:var(--radius-md);transition-duration:var(--duration-medium);font-weight:var(--font-weight-medium);gap:var(--tabGap);max-height:var(--tabItemMaxHeight);padding-block:var(--tabPaddingBlock);padding-inline:var(--tabPaddingInline);font-size:var(--tabFontSize);background-color:var(--tabItemBackgroundColor, var(--components-colors-tab-color-background-unchecked-default));color:var(--tabItemColor, var(--components-colors-tab-color-text-unchecked-default));box-shadow:inset 0 0 0 var(--tabItemBorderSize, var(--components-dimensions-tab-border-width-unchecked)) var(--tabItemBorderColor, var(--components-colors-tab-color-border-unchecked-default)),var(--tabItemBoxShadow, var(--elevation-10))}._root_peui8_2:focus{outline:none!important;--tabItemColor: var(--components-colors-tab-color-text-unchecked-pressed);--tabItemBackgroundColor: var(--components-colors-tab-color-background-unchecked-pressed);--tabItemBorderColor: var(--components-colors-tab-color-border-unchecked-pressed)}._root_peui8_2:focus[aria-selected=true]{--tabItemColor: var(--components-colors-tab-color-text-checked-pressed);--tabItemBackgroundColor: var(--components-colors-tab-color-background-checked-pressed);--tabItemBorderColor: var(--components-colors-tab-color-border-checked-pressed)}._root_peui8_2[aria-selected=true]{--tabItemColor: var(--components-colors-tab-color-text-checked-default);--tabItemBackgroundColor: var(--components-colors-tab-color-background-checked-default);--tabItemBorderColor: var(--components-colors-tab-color-border-checked-default);--tabItemBorderSize: var(--components-dimensions-tab-border-width-checked)}._root_peui8_2[aria-selected=true]:hover{--tabItemColor: var(--components-colors-tab-color-text-checked-hover);--tabItemBackgroundColor: var(--components-colors-tab-color-background-checked-hover);--tabItemBorderColor: var(--components-colors-tab-color-border-checked-hover);--tabItemBorderSize: var(--components-dimensions-tab-border-width-checked);--tabItemBoxShadow: var(--elevation-20)}._root_peui8_2[aria-disabled=true]{--tabItemColor: var(--color-icon-neutral-subtle);cursor:not-allowed}._root_peui8_2:hover:not([aria-selected=true]):not([aria-disabled=true]){--tabItemColor: var(--components-colors-tab-color-text-unchecked-hover);--tabItemBackgroundColor: var(--components-colors-tab-color-background-unchecked-hover);--tabItemBorderColor: var(--components-colors-tab-color-border-unchecked-hover);--tabItemBoxShadow: var(--elevation-20)}._size-lg_peui8_56{--tabItemMaxHeight: var(--components-dimensions-tab-size-max-height-lg);--tabPaddingBlock: var(--components-dimensions-tab-padding-block-lg);--tabPaddingInline: var(--components-dimensions-tab-padding-inline-lg);--tabFontSize: var(--font-size-sm);--tabGap: var(--components-dimensions-tab-gap-content-lg)}._size-md_peui8_63{--tabItemMaxHeight: var(--components-dimensions-tab-size-max-height-md);--tabPaddingBlock: var(--components-dimensions-tab-padding-block-md);--tabPaddingInline: var(--components-dimensions-tab-padding-inline-md);--tabFontSize: var(--font-size-xs);--tabGap: var(--components-dimensions-tab-gap-content-md)}._tab-list_peui8_73{display:flex;align-items:center;gap:var(--tabsGap, 0)}._tab-list_peui8_73._size-lg_peui8_56{--tabsGap: var(--components-dimensions-tab-gap-content-lg)}._tab-list_peui8_73._size-md_peui8_63{--tabsGap: var(--components-dimensions-tab-gap-content-md)}}
|
package/dist/Tabs.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
import './Tabs.css';
|
|
3
3
|
import { jsx as T, jsxs as pe } from "react/jsx-runtime";
|
|
4
4
|
import { C as X, a as Y, h as A, b as fe, j as ve } from "./SBSPVDDI-CmtnvvUX.js";
|
|
5
|
-
import { e as ee, y as Ie, f as
|
|
5
|
+
import { e as ee, y as Ie, f as W, c as j, b as z, _ as B, i as H, l as te, F as ge, d as S, a as f, u as F, k as oe, af as xe, v as Se, Z as Pe, M as Ce, A as $, z as O, B as V, V as U, C as Z } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
6
6
|
import { u as Te, b as _e } from "./OLVWQA7U-Dia3UUnG.js";
|
|
7
|
-
import he, { useCallback as ne, useRef as q, useEffect as G, useState as
|
|
7
|
+
import he, { useCallback as ne, useRef as q, useEffect as G, useState as Ee, createContext as se, useMemo as ke, forwardRef as re, cloneElement as ye, isValidElement as we } from "react";
|
|
8
8
|
import { c as ae } from "./index-PAaZGbyz.js";
|
|
9
|
-
import { b as
|
|
9
|
+
import { b as M, m as Ne, o as J, c as Re, s as D, d as k, f as Le, u as ce, a as Q } from "./RTNCFSKZ-BywELldk.js";
|
|
10
10
|
import { Badge as Oe } from "./Badge.js";
|
|
11
11
|
import { f as Ve } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
12
|
-
import { Icon as
|
|
13
|
-
import { u as
|
|
14
|
-
import { P as
|
|
15
|
-
import { c as
|
|
12
|
+
import { Icon as De } from "./Icon.js";
|
|
13
|
+
import { u as Me, d as $e } from "./T22PY7TE-gLuJpoOm.js";
|
|
14
|
+
import { P as Fe, b as We } from "./Y67KZUMI-BwLWwpNF.js";
|
|
15
|
+
import { c as je, a as ze, u as Be } from "./B7UTNDHN-BghjolIs.js";
|
|
16
16
|
var K = ee(
|
|
17
17
|
[Y],
|
|
18
18
|
[X]
|
|
19
|
-
), He = K.useScopedContext, ie = K.useProviderContext, le = K.ScopedContextProvider, Ke = "button", Ae =
|
|
20
|
-
var t =
|
|
19
|
+
), He = K.useScopedContext, ie = K.useProviderContext, le = K.ScopedContextProvider, Ke = "button", Ae = j(function(r) {
|
|
20
|
+
var t = r, {
|
|
21
21
|
store: e,
|
|
22
22
|
getItem: n
|
|
23
23
|
} = t, a = B(t, [
|
|
@@ -29,27 +29,27 @@ var K = ee(
|
|
|
29
29
|
e,
|
|
30
30
|
process.env.NODE_ENV !== "production" && "Tab must be wrapped in a TabList component."
|
|
31
31
|
);
|
|
32
|
-
const u = te(),
|
|
32
|
+
const u = te(), s = a.id || u, _ = ge(a), i = ne(
|
|
33
33
|
(m) => {
|
|
34
|
-
const
|
|
35
|
-
return n ? n(
|
|
34
|
+
const y = S(f({}, m), { dimmed: _ });
|
|
35
|
+
return n ? n(y) : y;
|
|
36
36
|
},
|
|
37
37
|
[_, n]
|
|
38
|
-
), v = a.onClick, I =
|
|
39
|
-
v == null || v(m), !m.defaultPrevented && (e == null || e.setSelectedId(
|
|
38
|
+
), v = a.onClick, I = F((m) => {
|
|
39
|
+
v == null || v(m), !m.defaultPrevented && (e == null || e.setSelectedId(s));
|
|
40
40
|
}), d = e.panels.useState(
|
|
41
41
|
(m) => {
|
|
42
|
-
var
|
|
43
|
-
return (
|
|
42
|
+
var y;
|
|
43
|
+
return (y = m.items.find((l) => l.tabId === s)) == null ? void 0 : y.id;
|
|
44
44
|
}
|
|
45
|
-
), p = u ? a.shouldRegisterItem : !1, g = e.useState((m) => !!
|
|
46
|
-
if (
|
|
45
|
+
), p = u ? a.shouldRegisterItem : !1, g = e.useState((m) => !!s && m.activeId === s), x = e.useState((m) => !!s && m.selectedId === s), h = e.useState((m) => !!e.item(m.activeId)), P = g || x && !h, w = x || ((b = a.accessibleWhenDisabled) != null ? b : !0);
|
|
46
|
+
if (M(
|
|
47
47
|
e.combobox || e.composite,
|
|
48
48
|
"virtualFocus"
|
|
49
49
|
) && (a = S(f({}, a), {
|
|
50
50
|
tabIndex: -1
|
|
51
51
|
})), a = S(f({
|
|
52
|
-
id:
|
|
52
|
+
id: s,
|
|
53
53
|
role: "tab",
|
|
54
54
|
"aria-selected": x,
|
|
55
55
|
"aria-controls": d || void 0
|
|
@@ -57,7 +57,7 @@ var K = ee(
|
|
|
57
57
|
onClick: I
|
|
58
58
|
}), e.composite) {
|
|
59
59
|
const m = {
|
|
60
|
-
id:
|
|
60
|
+
id: s,
|
|
61
61
|
accessibleWhenDisabled: w,
|
|
62
62
|
store: e.composite,
|
|
63
63
|
shouldRegisterItem: P && p,
|
|
@@ -81,13 +81,13 @@ var K = ee(
|
|
|
81
81
|
shouldRegisterItem: p
|
|
82
82
|
})), a;
|
|
83
83
|
}), Ue = Ie(
|
|
84
|
-
|
|
85
|
-
const t = Ae(
|
|
86
|
-
return
|
|
84
|
+
W(function(r) {
|
|
85
|
+
const t = Ae(r);
|
|
86
|
+
return z(Ke, t);
|
|
87
87
|
})
|
|
88
|
-
), Ze = "div", qe =
|
|
89
|
-
function(
|
|
90
|
-
var t =
|
|
88
|
+
), Ze = "div", qe = j(
|
|
89
|
+
function(r) {
|
|
90
|
+
var t = r, { store: e } = t, n = B(t, ["store"]);
|
|
91
91
|
const a = ie();
|
|
92
92
|
e = e || a, H(
|
|
93
93
|
e,
|
|
@@ -107,19 +107,19 @@ var K = ee(
|
|
|
107
107
|
"aria-orientation": b
|
|
108
108
|
}, n), n = Te(f({ store: e }, n)), n;
|
|
109
109
|
}
|
|
110
|
-
), Ge =
|
|
111
|
-
const t = qe(
|
|
112
|
-
return
|
|
113
|
-
}), Je = "div", Qe =
|
|
114
|
-
function(
|
|
115
|
-
var t =
|
|
110
|
+
), Ge = W(function(r) {
|
|
111
|
+
const t = qe(r);
|
|
112
|
+
return z(Ze, t);
|
|
113
|
+
}), Je = "div", Qe = j(
|
|
114
|
+
function(r) {
|
|
115
|
+
var t = r, {
|
|
116
116
|
store: e,
|
|
117
117
|
unmountOnHide: n,
|
|
118
118
|
tabId: a,
|
|
119
119
|
getItem: b,
|
|
120
120
|
scrollRestoration: c,
|
|
121
121
|
scrollElement: u
|
|
122
|
-
} = t,
|
|
122
|
+
} = t, s = B(t, [
|
|
123
123
|
"store",
|
|
124
124
|
"unmountOnHide",
|
|
125
125
|
"tabId",
|
|
@@ -132,23 +132,23 @@ var K = ee(
|
|
|
132
132
|
e,
|
|
133
133
|
process.env.NODE_ENV !== "production" && "TabPanel must receive a `store` prop or be wrapped in a TabProvider component."
|
|
134
134
|
);
|
|
135
|
-
const i = q(null), v = te(
|
|
135
|
+
const i = q(null), v = te(s.id), I = M(
|
|
136
136
|
e.panels,
|
|
137
137
|
() => {
|
|
138
138
|
var l;
|
|
139
139
|
return a || ((l = e == null ? void 0 : e.panels.item(v)) == null ? void 0 : l.tabId);
|
|
140
140
|
}
|
|
141
|
-
), d =
|
|
141
|
+
), d = M(
|
|
142
142
|
e,
|
|
143
143
|
(l) => !!I && l.selectedId === I
|
|
144
|
-
), p =
|
|
144
|
+
), p = Me({ open: d }), g = M(p, "mounted"), x = q(
|
|
145
145
|
/* @__PURE__ */ new Map()
|
|
146
|
-
), h =
|
|
146
|
+
), h = F(() => {
|
|
147
147
|
const l = i.current;
|
|
148
148
|
return l ? u ? typeof u == "function" ? u(l) : "current" in u ? u.current : u : l : null;
|
|
149
149
|
});
|
|
150
150
|
G(() => {
|
|
151
|
-
var l,
|
|
151
|
+
var l, E;
|
|
152
152
|
if (!c || !g) return;
|
|
153
153
|
const C = h();
|
|
154
154
|
if (!C) return;
|
|
@@ -158,7 +158,7 @@ var K = ee(
|
|
|
158
158
|
}
|
|
159
159
|
if (!I) return;
|
|
160
160
|
const N = x.current.get(I);
|
|
161
|
-
C.scroll((l = N == null ? void 0 : N.x) != null ? l : 0, (
|
|
161
|
+
C.scroll((l = N == null ? void 0 : N.x) != null ? l : 0, (E = N == null ? void 0 : N.y) != null ? E : 0);
|
|
162
162
|
const L = () => {
|
|
163
163
|
x.current.set(I, {
|
|
164
164
|
x: C.scrollLeft,
|
|
@@ -169,20 +169,20 @@ var K = ee(
|
|
|
169
169
|
C.removeEventListener("scroll", L);
|
|
170
170
|
};
|
|
171
171
|
}, [c, g, I, h, e]);
|
|
172
|
-
const [P, w] =
|
|
172
|
+
const [P, w] = Ee(!1);
|
|
173
173
|
G(() => {
|
|
174
174
|
const l = i.current;
|
|
175
175
|
if (!l) return;
|
|
176
|
-
const
|
|
177
|
-
w(!!
|
|
176
|
+
const E = xe(l);
|
|
177
|
+
w(!!E.length);
|
|
178
178
|
}, []);
|
|
179
179
|
const R = ne(
|
|
180
180
|
(l) => {
|
|
181
|
-
const
|
|
182
|
-
return b ? b(
|
|
181
|
+
const E = S(f({}, l), { id: v || l.id, tabId: a });
|
|
182
|
+
return b ? b(E) : E;
|
|
183
183
|
},
|
|
184
184
|
[v, a, b]
|
|
185
|
-
), m =
|
|
185
|
+
), m = s.onKeyDown, y = F((l) => {
|
|
186
186
|
if (m == null || m(l), l.defaultPrevented || !(e != null && e.composite)) return;
|
|
187
187
|
const C = {
|
|
188
188
|
ArrowLeft: e.previous,
|
|
@@ -194,38 +194,38 @@ var K = ee(
|
|
|
194
194
|
const { selectedId: N } = e.getState(), L = C({ activeId: N });
|
|
195
195
|
L && (l.preventDefault(), e.move(L));
|
|
196
196
|
});
|
|
197
|
-
return
|
|
198
|
-
|
|
197
|
+
return s = oe(
|
|
198
|
+
s,
|
|
199
199
|
(l) => /* @__PURE__ */ T(le, { value: e, children: l }),
|
|
200
200
|
[e]
|
|
201
|
-
),
|
|
201
|
+
), s = S(f({
|
|
202
202
|
id: v,
|
|
203
203
|
role: "tabpanel",
|
|
204
204
|
"aria-labelledby": I || void 0
|
|
205
|
-
},
|
|
206
|
-
children: n && !g ? null :
|
|
207
|
-
ref: Se(i,
|
|
208
|
-
onKeyDown:
|
|
209
|
-
}),
|
|
205
|
+
}, s), {
|
|
206
|
+
children: n && !g ? null : s.children,
|
|
207
|
+
ref: Se(i, s.ref),
|
|
208
|
+
onKeyDown: y
|
|
209
|
+
}), s = Pe(f({
|
|
210
210
|
// If the tab panel is rendered as part of another composite widget such
|
|
211
211
|
// as combobox, it should not be focusable.
|
|
212
212
|
focusable: !e.composite && !P
|
|
213
|
-
},
|
|
213
|
+
}, s)), s = $e(f({ store: p }, s)), s = ve(S(f({ store: e.panels }, s), { getItem: R })), s;
|
|
214
214
|
}
|
|
215
|
-
), Xe =
|
|
216
|
-
const t = Qe(
|
|
217
|
-
return
|
|
215
|
+
), Xe = W(function(r) {
|
|
216
|
+
const t = Qe(r);
|
|
217
|
+
return z(Je, t);
|
|
218
218
|
}), Ye = ee(
|
|
219
|
-
[
|
|
220
|
-
[
|
|
219
|
+
[We, Y],
|
|
220
|
+
[Fe, X]
|
|
221
221
|
), et = Ye.useContext;
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
se(!1);
|
|
223
|
+
se(null);
|
|
224
224
|
function tt(o = {}) {
|
|
225
|
-
var
|
|
225
|
+
var r = o, {
|
|
226
226
|
composite: t,
|
|
227
227
|
combobox: e
|
|
228
|
-
} =
|
|
228
|
+
} = r, n = Ce(r, [
|
|
229
229
|
"composite",
|
|
230
230
|
"combobox"
|
|
231
231
|
]);
|
|
@@ -244,7 +244,7 @@ function tt(o = {}) {
|
|
|
244
244
|
n.store,
|
|
245
245
|
J(t, a),
|
|
246
246
|
J(e, a)
|
|
247
|
-
), c = b == null ? void 0 : b.getState(), u =
|
|
247
|
+
), c = b == null ? void 0 : b.getState(), u = je($(V({}, n), {
|
|
248
248
|
store: b,
|
|
249
249
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
250
250
|
// `false` since we don't want the composite store to default it to `true`
|
|
@@ -261,7 +261,7 @@ function tt(o = {}) {
|
|
|
261
261
|
"horizontal"
|
|
262
262
|
),
|
|
263
263
|
focusLoop: O(n.focusLoop, c == null ? void 0 : c.focusLoop, !0)
|
|
264
|
-
})),
|
|
264
|
+
})), s = ze(), _ = $(V({}, u.getState()), {
|
|
265
265
|
selectedId: O(
|
|
266
266
|
n.selectedId,
|
|
267
267
|
c == null ? void 0 : c.selectedId,
|
|
@@ -273,9 +273,9 @@ function tt(o = {}) {
|
|
|
273
273
|
!0
|
|
274
274
|
)
|
|
275
275
|
}), i = Re(_, u, b);
|
|
276
|
-
|
|
276
|
+
D(
|
|
277
277
|
i,
|
|
278
|
-
() =>
|
|
278
|
+
() => k(i, ["moves"], () => {
|
|
279
279
|
const { activeId: d, selectOnMove: p } = i.getState();
|
|
280
280
|
if (!p || !d) return;
|
|
281
281
|
const g = u.item(d);
|
|
@@ -283,7 +283,7 @@ function tt(o = {}) {
|
|
|
283
283
|
})
|
|
284
284
|
);
|
|
285
285
|
let v = !0;
|
|
286
|
-
|
|
286
|
+
D(
|
|
287
287
|
i,
|
|
288
288
|
() => Le(i, ["selectedId"], (d, p) => {
|
|
289
289
|
if (!v) {
|
|
@@ -292,9 +292,9 @@ function tt(o = {}) {
|
|
|
292
292
|
}
|
|
293
293
|
t && d.selectedId === p.selectedId || i.setState("activeId", d.selectedId);
|
|
294
294
|
})
|
|
295
|
-
),
|
|
295
|
+
), D(
|
|
296
296
|
i,
|
|
297
|
-
() =>
|
|
297
|
+
() => k(i, ["selectedId", "renderedItems"], (d) => {
|
|
298
298
|
if (d.selectedId !== void 0) return;
|
|
299
299
|
const { activeId: p, renderedItems: g } = i.getState(), x = u.item(p);
|
|
300
300
|
if (x && !x.disabled && !x.dimmed)
|
|
@@ -306,23 +306,23 @@ function tt(o = {}) {
|
|
|
306
306
|
i.setState("selectedId", h == null ? void 0 : h.id);
|
|
307
307
|
}
|
|
308
308
|
})
|
|
309
|
-
),
|
|
309
|
+
), D(
|
|
310
310
|
i,
|
|
311
|
-
() =>
|
|
311
|
+
() => k(i, ["renderedItems"], (d) => {
|
|
312
312
|
const p = d.renderedItems;
|
|
313
313
|
if (p.length)
|
|
314
|
-
return
|
|
314
|
+
return k(s, ["renderedItems"], (g) => {
|
|
315
315
|
const x = g.renderedItems;
|
|
316
316
|
x.some((P) => !P.tabId) && x.forEach((P, w) => {
|
|
317
317
|
if (P.tabId) return;
|
|
318
318
|
const R = p[w];
|
|
319
|
-
R &&
|
|
319
|
+
R && s.renderItem($(V({}, P), { tabId: R.id }));
|
|
320
320
|
});
|
|
321
321
|
});
|
|
322
322
|
})
|
|
323
323
|
);
|
|
324
324
|
let I = null;
|
|
325
|
-
return
|
|
325
|
+
return D(i, () => {
|
|
326
326
|
const d = () => {
|
|
327
327
|
I = i.getState().selectedId;
|
|
328
328
|
}, p = () => {
|
|
@@ -330,54 +330,54 @@ function tt(o = {}) {
|
|
|
330
330
|
};
|
|
331
331
|
if (t && "setSelectElement" in t)
|
|
332
332
|
return U(
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
k(t, ["value"], d),
|
|
334
|
+
k(t, ["mounted"], p)
|
|
335
335
|
);
|
|
336
336
|
if (e)
|
|
337
337
|
return U(
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
k(e, ["selectedValue"], d),
|
|
339
|
+
k(e, ["mounted"], p)
|
|
340
340
|
);
|
|
341
|
-
}),
|
|
342
|
-
panels:
|
|
341
|
+
}), $(V(V({}, u), i), {
|
|
342
|
+
panels: s,
|
|
343
343
|
setSelectedId: (d) => i.setState("selectedId", d),
|
|
344
344
|
select: (d) => {
|
|
345
345
|
i.setState("selectedId", d), u.move(d);
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
348
|
}
|
|
349
|
-
function ot(o,
|
|
350
|
-
Z(
|
|
349
|
+
function ot(o, r, t) {
|
|
350
|
+
Z(r, [t.composite, t.combobox]), o = Be(o, r, t), Q(o, t, "selectedId", "setSelectedId"), Q(o, t, "selectOnMove");
|
|
351
351
|
const [e, n] = ce(() => o.panels, {});
|
|
352
352
|
return Z(n, [o, n]), Object.assign(
|
|
353
|
-
|
|
353
|
+
ke(() => S(f({}, o), { panels: e }), [o, e]),
|
|
354
354
|
{ composite: t.composite, combobox: t.combobox }
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
357
|
function St(o = {}) {
|
|
358
|
-
const
|
|
358
|
+
const r = _e(), t = et() || r;
|
|
359
359
|
o = S(f({}, o), {
|
|
360
360
|
composite: o.composite !== void 0 ? o.composite : t,
|
|
361
|
-
combobox: o.combobox !== void 0 ? o.combobox :
|
|
361
|
+
combobox: o.combobox !== void 0 ? o.combobox : r
|
|
362
362
|
});
|
|
363
363
|
const [e, n] = ce(tt, o);
|
|
364
364
|
return ot(e, n, o);
|
|
365
365
|
}
|
|
366
|
-
const nt = "
|
|
366
|
+
const nt = "_root_peui8_2", de = {
|
|
367
367
|
root: nt,
|
|
368
|
-
"size-lg": "_size-
|
|
369
|
-
"size-md": "_size-
|
|
370
|
-
"tab-list": "_tab-
|
|
368
|
+
"size-lg": "_size-lg_peui8_56",
|
|
369
|
+
"size-md": "_size-md_peui8_63",
|
|
370
|
+
"tab-list": "_tab-list_peui8_73"
|
|
371
371
|
};
|
|
372
|
-
function
|
|
372
|
+
function st({
|
|
373
373
|
icon: o,
|
|
374
|
-
iconColor:
|
|
374
|
+
iconColor: r,
|
|
375
375
|
isActive: t
|
|
376
376
|
}) {
|
|
377
377
|
if (!o) return null;
|
|
378
378
|
if (typeof o != "string") return o;
|
|
379
379
|
const e = (() => {
|
|
380
|
-
switch (
|
|
380
|
+
switch (r) {
|
|
381
381
|
case "blue":
|
|
382
382
|
return t ? "text-background-accent-blue-strong" : "text-background-accent-blue-primary";
|
|
383
383
|
case "green":
|
|
@@ -391,17 +391,17 @@ function rt({
|
|
|
391
391
|
case "violet":
|
|
392
392
|
return t ? "text-background-accent-violet-strong" : "text-background-accent-violet-primary";
|
|
393
393
|
case "warm":
|
|
394
|
-
return t ? "text-
|
|
394
|
+
return t ? "text-beige-60" : "text-background-warm-stronger";
|
|
395
395
|
default:
|
|
396
396
|
return "";
|
|
397
397
|
}
|
|
398
398
|
})();
|
|
399
|
-
return /* @__PURE__ */ T(
|
|
399
|
+
return /* @__PURE__ */ T(De, { className: e, name: o });
|
|
400
400
|
}
|
|
401
|
-
const
|
|
401
|
+
const rt = ae(de), ue = Ve(
|
|
402
402
|
({
|
|
403
403
|
as: o,
|
|
404
|
-
badge:
|
|
404
|
+
badge: r,
|
|
405
405
|
children: t,
|
|
406
406
|
className: e,
|
|
407
407
|
icon: n,
|
|
@@ -409,9 +409,9 @@ const st = ae(de), ue = Ve(
|
|
|
409
409
|
id: b,
|
|
410
410
|
size: c = "lg",
|
|
411
411
|
store: u,
|
|
412
|
-
...
|
|
412
|
+
...s
|
|
413
413
|
}, _) => {
|
|
414
|
-
const { selectedId: i } =
|
|
414
|
+
const { selectedId: i } = M(u), v = i === b, I = st({
|
|
415
415
|
icon: n,
|
|
416
416
|
iconColor: a,
|
|
417
417
|
isActive: v
|
|
@@ -419,34 +419,34 @@ const st = ae(de), ue = Ve(
|
|
|
419
419
|
return /* @__PURE__ */ pe(
|
|
420
420
|
Ue,
|
|
421
421
|
{
|
|
422
|
-
className:
|
|
422
|
+
className: rt("root", `size-${c}`, e),
|
|
423
423
|
id: b,
|
|
424
424
|
ref: _,
|
|
425
425
|
render: o ? /* @__PURE__ */ T(o, {}) : void 0,
|
|
426
426
|
store: u,
|
|
427
|
-
...
|
|
427
|
+
...s,
|
|
428
428
|
children: [
|
|
429
429
|
I,
|
|
430
430
|
t,
|
|
431
|
-
|
|
431
|
+
r ? /* @__PURE__ */ T(Oe, { size: c, variant: d, children: r }) : null
|
|
432
432
|
]
|
|
433
433
|
}
|
|
434
434
|
);
|
|
435
435
|
}
|
|
436
436
|
);
|
|
437
437
|
ue.displayName = "Tabs.Tab";
|
|
438
|
-
const me =
|
|
438
|
+
const me = re(({ children: o, ...r }, t) => /* @__PURE__ */ T(Xe, { ref: t, ...r, children: o }));
|
|
439
439
|
me.displayName = "Tabs.Panel";
|
|
440
|
-
const at = ae(de), be =
|
|
441
|
-
({ children: o, className:
|
|
440
|
+
const at = ae(de), be = re(
|
|
441
|
+
({ children: o, className: r, size: t = "lg", store: e, ...n }, a) => {
|
|
442
442
|
const b = he.Children.map(
|
|
443
443
|
o,
|
|
444
|
-
(c) => we(c) ?
|
|
444
|
+
(c) => we(c) ? ye(c, { size: t }) : c
|
|
445
445
|
);
|
|
446
446
|
return /* @__PURE__ */ T(
|
|
447
447
|
Ge,
|
|
448
448
|
{
|
|
449
|
-
className: at("tab-list", `size-${t}`,
|
|
449
|
+
className: at("tab-list", `size-${t}`, r),
|
|
450
450
|
ref: a,
|
|
451
451
|
store: e,
|
|
452
452
|
...n,
|
|
@@ -5,6 +5,7 @@ export type StickyNoteTitleProps = ComponentProps<'div'> & HTMLAttributes<HTMLDi
|
|
|
5
5
|
interface StickyNoteOptions {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
handleClose?: () => void;
|
|
8
|
+
isFullWidth?: boolean;
|
|
8
9
|
shape?: 'rectangle' | 'square';
|
|
9
10
|
variant?: 'blue' | 'brand' | 'green' | 'orange' | 'pink' | 'teal' | 'violet';
|
|
10
11
|
}
|