@lazar-ui/kit 0.6.1 → 0.6.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.
- package/CHANGELOG.md +15 -0
- package/dist/accordion.css +1 -1
- package/dist/accordion.js +62 -23
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +62 -44
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +93 -72
- package/dist/heading.js +31 -5
- package/dist/input.js +124 -86
- package/dist/menu.css +1 -1
- package/dist/menu.js +81 -63
- package/dist/separator.css +1 -0
- package/dist/separator.d.ts +21 -1
- package/dist/separator.js +22 -2
- package/dist/table.css +1 -1
- package/dist/table.js +74 -25
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +73 -34
- package/dist/text.js +48 -6
- package/package.json +1 -1
- package/dist/Actions-Cii4AnwJ.mjs +0 -12
- package/dist/Actions.css +0 -1
- package/dist/ActiveFilters-BJojmc-d.mjs +0 -29
- package/dist/ActiveFilters.css +0 -1
- package/dist/Cell-BPBvEyeL.mjs +0 -21
- package/dist/Cell.css +0 -1
- package/dist/Content-1kg0isb_.mjs +0 -12
- package/dist/Content.css +0 -1
- package/dist/Context-BjkJbHVo.mjs +0 -6
- package/dist/Group-DyDpeqOP.mjs +0 -16
- package/dist/Group.css +0 -1
- package/dist/Header-Clhgyr0J.mjs +0 -29
- package/dist/Header.css +0 -1
- package/dist/Heading-CL47Fqe7.mjs +0 -30
- package/dist/InputBase-BHZWQT9-.mjs +0 -46
- package/dist/Item-CBYGbEHN.mjs +0 -47
- package/dist/Item.css +0 -1
- package/dist/Panel-B-LZtrGB.mjs +0 -11
- package/dist/Row-BfI8268z.mjs +0 -15
- package/dist/Row.css +0 -1
- package/dist/Separator-FETQ3gHZ.mjs +0 -9
- package/dist/Separator.css +0 -1
- package/dist/Tab-BfpR10OT.mjs +0 -38
- package/dist/Tab.css +0 -1
- package/dist/Text-DQPy-DZ5.mjs +0 -46
- package/dist/Title-xHMuJWGl.mjs +0 -12
- package/dist/Title.css +0 -1
- package/dist/Toolbar-BJQy4qFI.mjs +0 -11
- package/dist/Toolbar.css +0 -1
- package/dist/Trigger-C_4De6l1.mjs +0 -11
- package/dist/actions.d.ts +0 -13
- package/dist/actions.js +0 -4
- package/dist/active-filters.d.ts +0 -35
- package/dist/active-filters.js +0 -4
- package/dist/cell.d.ts +0 -20
- package/dist/cell.js +0 -4
- package/dist/content.d.ts +0 -8
- package/dist/content.js +0 -4
- package/dist/context.d.ts +0 -17
- package/dist/context.js +0 -5
- package/dist/enums-BnuDYTua.mjs +0 -4
- package/dist/enums-DUZMBQDd.mjs +0 -7
- package/dist/enums-DfSzOa3x.mjs +0 -4
- package/dist/enums-OoI2Qgqq.mjs +0 -14
- package/dist/group.d.ts +0 -12
- package/dist/group.js +0 -4
- package/dist/header.d.ts +0 -21
- package/dist/header.js +0 -4
- package/dist/input-base.d.ts +0 -29
- package/dist/input-base.js +0 -4
- package/dist/item.d.ts +0 -42
- package/dist/item.js +0 -4
- package/dist/panel.d.ts +0 -9
- package/dist/panel.js +0 -4
- package/dist/row.d.ts +0 -12
- package/dist/row.js +0 -4
- package/dist/tab.d.ts +0 -30
- package/dist/tab.js +0 -4
- package/dist/title.d.ts +0 -8
- package/dist/title.js +0 -4
- package/dist/toolbar.d.ts +0 -20
- package/dist/toolbar.js +0 -4
- package/dist/trigger.d.ts +0 -8
- package/dist/trigger.js +0 -4
- package/dist/typography.d.ts +0 -126
- package/dist/typography.js +0 -6
- /package/dist/{Heading.css → heading.css} +0 -0
- /package/dist/{InputBase.css → input.css} +0 -0
- /package/dist/{Text.css → text.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.6.2] - 2026-06-10
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- **build**: удалён depth=1 scan подкомпонентов, который создавал мусорные entry points (`context`, `item`) и дублировал `separator`
|
|
8
|
+
|
|
9
|
+
### Refactoring
|
|
10
|
+
|
|
11
|
+
- **Heading, Text**: перемещены в `src/components/Heading/` и `src/components/Text/` как самостоятельные компоненты (ранее лежали внутри `Typography/`)
|
|
12
|
+
- **Typography**: компонент удалён
|
|
13
|
+
|
|
14
|
+
### Documentation
|
|
15
|
+
|
|
16
|
+
- **rules**: добавлены секции `Build` (память) и `Test Coverage Generation` в `.opencode/rules/ui-kit.md`
|
|
17
|
+
|
|
3
18
|
## [0.6.1] - 2026-06-10
|
|
4
19
|
|
|
5
20
|
### Bug Fixes
|
package/dist/accordion.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--accordion-border-radius: var(--lui-radius-2)}._root_grshw_5{border:1px solid var(--lui-color-border-primary);border-radius:var(--accordion-border-radius);overflow:hidden;width:100%}
|
|
1
|
+
:root{--accordion-border-radius: var(--lui-radius-2)}._root_grshw_5{border:1px solid var(--lui-color-border-primary);border-radius:var(--accordion-border-radius);overflow:hidden;width:100%}:root{--accordion-chevron-size: 8px;--accordion-transition-duration: .2s;--accordion-content-transition: .3s}._root_z83hn_7:not(:last-child){border-bottom:1px solid var(--lui-color-border-primary)}._trigger_z83hn_11{align-items:center;background:var(--lui-color-background-primary);border:none;cursor:pointer;display:flex;gap:var(--lui-space-2);justify-content:space-between;padding:var(--lui-space-6) var(--lui-space-4);transition:background-color var(--accordion-transition-duration);width:100%}._trigger_z83hn_11:hover{background:var(--lui-color-background-tertiary)}._open_z83hn_27 ._trigger_z83hn_11{background:var(--lui-color-background-brand);color:var(--lui-color-text-on-brand)}._title_z83hn_32{align-items:center;display:flex;font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-medium);gap:var(--lui-space-4);line-height:1.4}._icon_z83hn_41,._chevron_z83hn_46{align-items:center;display:flex}._chevron_z83hn_46:after{border-color:currentColor;border-style:solid;border-width:0 2px 2px 0;content:"";display:block;height:var(--accordion-chevron-size);transform:rotate(45deg);transition:transform var(--accordion-transition-duration);width:var(--accordion-chevron-size)}._open_z83hn_27 ._chevron_z83hn_46:after{transform:rotate(-135deg)}._content_z83hn_66{background:var(--lui-color-background-secondary);border-top:1px solid var(--lui-color-border-primary);font-size:var(--lui-font-size-md);line-height:1.5;max-height:0;opacity:0;overflow:hidden;padding:0 var(--lui-space-4);transition:max-height var(--accordion-content-transition) ease-out,opacity var(--accordion-content-transition) ease-out,padding var(--accordion-content-transition) ease-out}._open_z83hn_27 ._content_z83hn_66{max-height:9999px;opacity:1;padding:var(--lui-space-4)}
|
package/dist/accordion.js
CHANGED
|
@@ -1,27 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { i as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import './accordion.css';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import O, { createContext as T, useContext as E, useState as g, useCallback as v } from "react";
|
|
3
|
+
import { i as y } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
4
|
+
import M from "clsx";
|
|
5
|
+
import { I as P } from "./Icon-DUCBChX2.mjs";
|
|
6
|
+
import './accordion.css';const f = T(null), S = () => E(f), N = "Accordion";
|
|
7
|
+
var I = /* @__PURE__ */ ((r) => (r.ITEM = "Accordion.Item", r))(I || {});
|
|
8
|
+
const b = "_root_grshw_5", $ = {
|
|
9
|
+
root: b
|
|
10
|
+
}, j = [I.ITEM], x = (r) => {
|
|
11
|
+
const { children: m, defaultValue: u = null, onValueChange: s, value: o } = r, d = o !== void 0, [t, l] = g(u);
|
|
12
|
+
let e;
|
|
13
|
+
d ? e = o ?? null : e = t;
|
|
14
|
+
const p = v(
|
|
15
|
+
(n) => {
|
|
16
|
+
let i;
|
|
17
|
+
e === n ? i = null : i = n, d || l(i), s?.(i);
|
|
17
18
|
},
|
|
18
|
-
[
|
|
19
|
-
),
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
[e, d, s]
|
|
20
|
+
), _ = (n) => y(j, n) ? n : null;
|
|
21
|
+
return /* @__PURE__ */ a(f.Provider, { value: { onItemToggle: p, openValue: e }, children: /* @__PURE__ */ a("div", { className: $.root, children: O.Children.map(m, _) }) });
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
x.displayName = N;
|
|
24
|
+
const k = "_root_z83hn_7", B = "_trigger_z83hn_11", L = "_open_z83hn_27", R = "_title_z83hn_32", w = "_icon_z83hn_41", D = "_chevron_z83hn_46", U = "_content_z83hn_66", c = {
|
|
25
|
+
root: k,
|
|
26
|
+
trigger: B,
|
|
27
|
+
open: L,
|
|
28
|
+
title: R,
|
|
29
|
+
icon: w,
|
|
30
|
+
chevron: D,
|
|
31
|
+
content: U
|
|
32
|
+
}, A = (r) => {
|
|
33
|
+
const { children: m, icon: u, onOpenChange: s, open: o, title: d, value: t } = r, l = S(), e = l && t !== void 0, [p, _] = g(!1);
|
|
34
|
+
let n;
|
|
35
|
+
e ? n = l.openValue === t : o !== void 0 ? n = o : n = p;
|
|
36
|
+
const i = v(() => {
|
|
37
|
+
if (e && t !== void 0) {
|
|
38
|
+
l.onItemToggle(t);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (o !== void 0) {
|
|
42
|
+
s?.(!o);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
_((z) => {
|
|
46
|
+
const C = !z;
|
|
47
|
+
return s?.(C), C;
|
|
48
|
+
});
|
|
49
|
+
}, [e, l, t, o, s]), V = M(c.root, { [c.open]: n });
|
|
50
|
+
return /* @__PURE__ */ h("div", { className: V, children: [
|
|
51
|
+
/* @__PURE__ */ h("button", { className: c.trigger, onClick: i, type: "button", children: [
|
|
52
|
+
/* @__PURE__ */ h("span", { className: c.title, children: [
|
|
53
|
+
u && /* @__PURE__ */ a("span", { className: c.icon, children: /* @__PURE__ */ a(P, { name: u, size: 16 }) }),
|
|
54
|
+
d
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ a("span", { className: c.chevron })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ a("div", { className: c.content, children: m })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
A.displayName = `${N}.Item`;
|
|
62
|
+
const Y = x;
|
|
63
|
+
Y.Item = A;
|
|
25
64
|
export {
|
|
26
|
-
|
|
65
|
+
Y as Accordion
|
|
27
66
|
};
|
package/dist/dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--dialog-underlay: var(--lui-color-background-overlay);--dialog-bg: var(--lui-color-background-primary);--dialog-radius: var(--lui-radius-3);--dialog-shadow: 0 20px 24px -4px rgb(16 24 40 / .08), 0 8px 8px -4px rgb(16 24 40 / .03);--dialog-padding: var(--lui-space-8);--dialog-gap: var(--lui-space-6);--dialog-header-gap: var(--lui-space-6);--dialog-header-min-height: calc(24px + var(--lui-space-6));--dialog-close-color: var(--lui-palette-gray-400);--dialog-close-padding: var(--lui-space-3);--dialog-actions-padding-top: var(--lui-space-10);--dialog-width-xs: 384px;--dialog-width-sm: 480px;--dialog-width-md: 560px;--dialog-width-lg: 640px;--dialog-title-font-size: var(--lui-font-size-md);--dialog-title-weight: var(--lui-font-weight-semibold);--dialog-title-color: var(--lui-color-text-primary);--dialog-title-font-family: var(--lui-font-family-body);--dialog-title-line-height: var(--line-height-md);--dialog-actions-gap: var(--lui-space-4)}._underlay_100vj_25{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--dialog-underlay);inset:0;padding:var(--lui-space-4);position:fixed;z-index:1000}._modal_100vj_34{align-items:center;display:flex;height:100%;justify-content:center}._dialog_100vj_41{background:var(--dialog-bg);border-radius:var(--dialog-radius);box-shadow:var(--dialog-shadow);display:flex;flex-direction:column;gap:var(--dialog-gap);padding:var(--dialog-padding);position:relative}._dialog_100vj_41._sizeXs_100vj_51{width:var(--dialog-width-xs)}._dialog_100vj_41._sizeSm_100vj_54{width:var(--dialog-width-sm)}._dialog_100vj_41._sizeMd_100vj_57{width:var(--dialog-width-md)}._dialog_100vj_41._sizeLg_100vj_60{width:var(--dialog-width-lg)}._header_100vj_64{align-items:center;display:flex;gap:var(--dialog-header-gap);min-height:var(--dialog-header-min-height)}._close_100vj_71{color:var(--dialog-close-color);padding:var(--dialog-close-padding);position:absolute;right:var(--lui-space-4);top:var(--lui-space-4)}._actions_100vj_79{padding-top:var(--dialog-actions-padding-top)}
|
|
1
|
+
._root_1fxwu_1{display:flex;gap:var(--dialog-actions-gap)}._root_jagsa_1{max-height:100%;overflow-y:auto}:root{--dialog-underlay: var(--lui-color-background-overlay);--dialog-bg: var(--lui-color-background-primary);--dialog-radius: var(--lui-radius-3);--dialog-shadow: 0 20px 24px -4px rgb(16 24 40 / .08), 0 8px 8px -4px rgb(16 24 40 / .03);--dialog-padding: var(--lui-space-8);--dialog-gap: var(--lui-space-6);--dialog-header-gap: var(--lui-space-6);--dialog-header-min-height: calc(24px + var(--lui-space-6));--dialog-close-color: var(--lui-palette-gray-400);--dialog-close-padding: var(--lui-space-3);--dialog-actions-padding-top: var(--lui-space-10);--dialog-width-xs: 384px;--dialog-width-sm: 480px;--dialog-width-md: 560px;--dialog-width-lg: 640px;--dialog-title-font-size: var(--lui-font-size-md);--dialog-title-weight: var(--lui-font-weight-semibold);--dialog-title-color: var(--lui-color-text-primary);--dialog-title-font-family: var(--lui-font-family-body);--dialog-title-line-height: var(--line-height-md);--dialog-actions-gap: var(--lui-space-4)}._underlay_100vj_25{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--dialog-underlay);inset:0;padding:var(--lui-space-4);position:fixed;z-index:1000}._modal_100vj_34{align-items:center;display:flex;height:100%;justify-content:center}._dialog_100vj_41{background:var(--dialog-bg);border-radius:var(--dialog-radius);box-shadow:var(--dialog-shadow);display:flex;flex-direction:column;gap:var(--dialog-gap);padding:var(--dialog-padding);position:relative}._dialog_100vj_41._sizeXs_100vj_51{width:var(--dialog-width-xs)}._dialog_100vj_41._sizeSm_100vj_54{width:var(--dialog-width-sm)}._dialog_100vj_41._sizeMd_100vj_57{width:var(--dialog-width-md)}._dialog_100vj_41._sizeLg_100vj_60{width:var(--dialog-width-lg)}._header_100vj_64{align-items:center;display:flex;gap:var(--dialog-header-gap);min-height:var(--dialog-header-min-height)}._close_100vj_71{color:var(--dialog-close-color);padding:var(--dialog-close-padding);position:absolute;right:var(--lui-space-4);top:var(--lui-space-4)}._actions_100vj_79{padding-top:var(--dialog-actions-padding-top)}._root_1ae0y_1{color:var(--dialog-title-color);font-family:var(--dialog-title-font-family);font-size:var(--dialog-title-font-size);font-style:normal;font-weight:var(--dialog-title-weight);line-height:var(--dialog-title-line-height);max-height:100%}
|
package/dist/dialog.js
CHANGED
|
@@ -1,57 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
4
|
-
import { useRef as p, useMemo as A } from "react";
|
|
1
|
+
import { jsx as s, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as N, useMemo as A } from "react";
|
|
5
3
|
import E from "clsx";
|
|
6
|
-
import { useDialog as
|
|
7
|
-
import { useOverlayTriggerState as
|
|
4
|
+
import { useDialog as x, useModalOverlay as M, Overlay as P, UNSAFE_PortalProvider as $ } from "react-aria";
|
|
5
|
+
import { useOverlayTriggerState as b } from "react-stately";
|
|
8
6
|
import { I as R } from "./Icon-DUCBChX2.mjs";
|
|
9
7
|
import { u as X } from "./useLocale-CJh-krrY.mjs";
|
|
10
8
|
import { g as k } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
11
|
-
import { g as
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
import { g as w } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
10
|
+
import './dialog.css';var e = /* @__PURE__ */ ((o) => (o.ACTIONS = "Dialog.Actions", o.CONTENT = "Dialog.Content", o.TITLE = "Dialog.Title", o))(e || {});
|
|
11
|
+
const F = "_root_1fxwu_1", K = {
|
|
12
|
+
root: F
|
|
13
|
+
}, g = (o) => {
|
|
14
|
+
const { children: t } = o;
|
|
15
|
+
return /* @__PURE__ */ s("div", { className: K.root, children: t });
|
|
16
|
+
};
|
|
17
|
+
g.displayName = e.ACTIONS;
|
|
18
|
+
const U = "_root_jagsa_1", V = {
|
|
19
|
+
root: U
|
|
20
|
+
}, u = (o) => {
|
|
21
|
+
const { children: t } = o;
|
|
22
|
+
return /* @__PURE__ */ s("div", { className: V.root, children: t });
|
|
23
|
+
};
|
|
24
|
+
u.displayName = e.CONTENT;
|
|
25
|
+
const Y = "Dialog", q = [e.ACTIONS, e.CONTENT, e.TITLE], B = "_underlay_100vj_25", G = "_modal_100vj_34", H = "_dialog_100vj_41", J = "_sizeXs_100vj_51", Q = "_sizeSm_100vj_54", W = "_sizeMd_100vj_57", Z = "_sizeLg_100vj_60", oo = "_header_100vj_64", so = "_close_100vj_71", eo = "_actions_100vj_79", a = {
|
|
26
|
+
underlay: B,
|
|
27
|
+
modal: G,
|
|
28
|
+
dialog: H,
|
|
29
|
+
sizeXs: J,
|
|
30
|
+
sizeSm: Q,
|
|
31
|
+
sizeMd: W,
|
|
32
|
+
sizeLg: Z,
|
|
33
|
+
header: oo,
|
|
34
|
+
close: so,
|
|
35
|
+
actions: eo
|
|
36
|
+
}, T = (o) => {
|
|
37
|
+
const { children: t, container: p, open: i, modal: C = !0, onOpenChange: f, size: h = "md" } = o, y = X(), r = N(null), n = N(null), { dialogProps: z } = x(o, r), c = b({ isOpen: i, onOpenChange: f }), { modalProps: D, underlayProps: O } = M(
|
|
38
|
+
{ isDismissable: !C, isKeyboardDismissDisabled: !1 },
|
|
28
39
|
c,
|
|
29
|
-
|
|
40
|
+
n
|
|
30
41
|
), {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
} = A(() => k(t,
|
|
35
|
-
|
|
42
|
+
[e.ACTIONS]: d,
|
|
43
|
+
[e.CONTENT]: m,
|
|
44
|
+
[e.TITLE]: j
|
|
45
|
+
} = A(() => k(t, q), [t]), I = (L) => {
|
|
46
|
+
L.preventDefault(), c.close();
|
|
36
47
|
};
|
|
37
|
-
if (!
|
|
48
|
+
if (!i)
|
|
38
49
|
return null;
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */ _("div", { className:
|
|
42
|
-
|
|
43
|
-
/* @__PURE__ */
|
|
50
|
+
const S = E(a.dialog, w("size", h, a));
|
|
51
|
+
return /* @__PURE__ */ s(P, { portalContainer: p, children: /* @__PURE__ */ s("div", { className: a.underlay, ...O, children: /* @__PURE__ */ s("div", { className: a.modal, ...D, ref: n, children: /* @__PURE__ */ s($, { getContainer: () => n.current, children: /* @__PURE__ */ _("div", { className: S, ...z, ref: r, children: [
|
|
52
|
+
/* @__PURE__ */ _("div", { className: a.header, children: [
|
|
53
|
+
j,
|
|
54
|
+
/* @__PURE__ */ s("button", { "aria-label": y.Dialog.close, className: a.close, onClick: I, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
|
|
44
55
|
] }),
|
|
45
|
-
|
|
46
|
-
|
|
56
|
+
m && /* @__PURE__ */ s("div", { children: m }),
|
|
57
|
+
d && /* @__PURE__ */ s("div", { className: a.actions, children: d })
|
|
47
58
|
] }) }) }) }) });
|
|
48
59
|
};
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
60
|
+
T.displayName = Y;
|
|
61
|
+
const to = "_root_1ae0y_1", ao = {
|
|
62
|
+
root: to
|
|
63
|
+
}, v = (o) => {
|
|
64
|
+
const { children: t } = o;
|
|
65
|
+
return /* @__PURE__ */ s("div", { className: ao.root, children: t });
|
|
66
|
+
};
|
|
67
|
+
v.displayName = e.TITLE;
|
|
68
|
+
const l = T;
|
|
69
|
+
l.Actions = g;
|
|
70
|
+
l.Content = u;
|
|
71
|
+
l.Title = v;
|
|
54
72
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
73
|
+
l as Dialog,
|
|
74
|
+
l as default
|
|
57
75
|
};
|
package/dist/drawer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._root_1m4yu_1{display:flex;gap:var(--lui-space-2)}._root_jagsa_1{max-height:100%;overflow-y:auto}:root{--drawer-underlay: var(--lui-color-background-overlay);--drawer-bg: var(--lui-color-background-primary);--drawer-shadow: 0 20px 24px -4px rgb(16 24 40 / .08), 0 8px 8px -4px rgb(16 24 40 / .03);--drawer-padding: var(--lui-space-8);--drawer-gap: var(--lui-space-6);--drawer-header-gap: var(--lui-space-6);--drawer-header-min-height: calc(24px + var(--lui-space-6));--drawer-close-color: var(--lui-palette-gray-400);--drawer-close-padding: var(--lui-space-3);--drawer-width-sm: 384px;--drawer-width-md: 480px;--drawer-width-lg: 640px;--drawer-height-sm: 320px;--drawer-height-md: 480px;--drawer-height-lg: 640px;--drawer-title-font-size: var(--lui-font-size-md);--drawer-title-weight: var(--lui-font-weight-semibold);--drawer-title-color: var(--lui-color-text-primary);--drawer-title-font-family: var(--lui-font-family-body);--drawer-title-line-height: var(--line-height-md)}._underlay_qcy0k_24{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--drawer-underlay);inset:0;position:fixed;z-index:1000}._modal_qcy0k_32{display:flex;height:100%}._drawer_qcy0k_37{background:var(--drawer-bg);box-shadow:var(--drawer-shadow);display:flex;flex-direction:column;gap:var(--drawer-gap);padding:var(--drawer-padding);position:fixed;transition:transform .3s ease}._drawer_qcy0k_37._placementLeft_qcy0k_47{bottom:0;left:0;top:0;transform:translate(-100%)}._drawer_qcy0k_37._placementLeft_qcy0k_47._entered_qcy0k_53{transform:translate(0)}._drawer_qcy0k_37._placementRight_qcy0k_56{bottom:0;right:0;top:0;transform:translate(100%)}._drawer_qcy0k_37._placementRight_qcy0k_56._entered_qcy0k_53{transform:translate(0)}._drawer_qcy0k_37._placementTop_qcy0k_65{left:0;right:0;top:0;transform:translateY(-100%)}._drawer_qcy0k_37._placementTop_qcy0k_65._entered_qcy0k_53{transform:translateY(0)}._drawer_qcy0k_37._placementBottom_qcy0k_74{bottom:0;left:0;right:0;transform:translateY(100%)}._drawer_qcy0k_37._placementBottom_qcy0k_74._entered_qcy0k_53{transform:translateY(0)}._drawer_qcy0k_37._sizeSm_qcy0k_83{width:var(--drawer-width-sm)}._drawer_qcy0k_37._sizeSm_qcy0k_83._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeSm_qcy0k_83._placementBottom_qcy0k_74{height:var(--drawer-height-sm);width:100%}._drawer_qcy0k_37._sizeMd_qcy0k_90{width:var(--drawer-width-md)}._drawer_qcy0k_37._sizeMd_qcy0k_90._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeMd_qcy0k_90._placementBottom_qcy0k_74{height:var(--drawer-height-md);width:100%}._drawer_qcy0k_37._sizeLg_qcy0k_97{width:var(--drawer-width-lg)}._drawer_qcy0k_37._sizeLg_qcy0k_97._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeLg_qcy0k_97._placementBottom_qcy0k_74{height:var(--drawer-height-lg);width:100%}._content_qcy0k_105{flex:1;overflow-y:auto}
|
|
1
|
+
._root_1m4yu_1{display:flex;gap:var(--lui-space-2)}._root_jagsa_1{max-height:100%;overflow-y:auto}:root{--drawer-underlay: var(--lui-color-background-overlay);--drawer-bg: var(--lui-color-background-primary);--drawer-shadow: 0 20px 24px -4px rgb(16 24 40 / .08), 0 8px 8px -4px rgb(16 24 40 / .03);--drawer-padding: var(--lui-space-8);--drawer-gap: var(--lui-space-6);--drawer-header-gap: var(--lui-space-6);--drawer-header-min-height: calc(24px + var(--lui-space-6));--drawer-close-color: var(--lui-palette-gray-400);--drawer-close-padding: var(--lui-space-3);--drawer-width-sm: 384px;--drawer-width-md: 480px;--drawer-width-lg: 640px;--drawer-height-sm: 320px;--drawer-height-md: 480px;--drawer-height-lg: 640px;--drawer-title-font-size: var(--lui-font-size-md);--drawer-title-weight: var(--lui-font-weight-semibold);--drawer-title-color: var(--lui-color-text-primary);--drawer-title-font-family: var(--lui-font-family-body);--drawer-title-line-height: var(--line-height-md)}._underlay_qcy0k_24{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:var(--drawer-underlay);inset:0;position:fixed;z-index:1000}._modal_qcy0k_32{display:flex;height:100%}._drawer_qcy0k_37{background:var(--drawer-bg);box-shadow:var(--drawer-shadow);display:flex;flex-direction:column;gap:var(--drawer-gap);padding:var(--drawer-padding);position:fixed;transition:transform .3s ease}._drawer_qcy0k_37._placementLeft_qcy0k_47{bottom:0;left:0;top:0;transform:translate(-100%)}._drawer_qcy0k_37._placementLeft_qcy0k_47._entered_qcy0k_53{transform:translate(0)}._drawer_qcy0k_37._placementRight_qcy0k_56{bottom:0;right:0;top:0;transform:translate(100%)}._drawer_qcy0k_37._placementRight_qcy0k_56._entered_qcy0k_53{transform:translate(0)}._drawer_qcy0k_37._placementTop_qcy0k_65{left:0;right:0;top:0;transform:translateY(-100%)}._drawer_qcy0k_37._placementTop_qcy0k_65._entered_qcy0k_53{transform:translateY(0)}._drawer_qcy0k_37._placementBottom_qcy0k_74{bottom:0;left:0;right:0;transform:translateY(100%)}._drawer_qcy0k_37._placementBottom_qcy0k_74._entered_qcy0k_53{transform:translateY(0)}._drawer_qcy0k_37._sizeSm_qcy0k_83{width:var(--drawer-width-sm)}._drawer_qcy0k_37._sizeSm_qcy0k_83._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeSm_qcy0k_83._placementBottom_qcy0k_74{height:var(--drawer-height-sm);width:100%}._drawer_qcy0k_37._sizeMd_qcy0k_90{width:var(--drawer-width-md)}._drawer_qcy0k_37._sizeMd_qcy0k_90._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeMd_qcy0k_90._placementBottom_qcy0k_74{height:var(--drawer-height-md);width:100%}._drawer_qcy0k_37._sizeLg_qcy0k_97{width:var(--drawer-width-lg)}._drawer_qcy0k_37._sizeLg_qcy0k_97._placementTop_qcy0k_65,._drawer_qcy0k_37._sizeLg_qcy0k_97._placementBottom_qcy0k_74{height:var(--drawer-height-lg);width:100%}._content_qcy0k_105{flex:1;overflow-y:auto}:root{--drawer-header-gap: var(--lui-space-6);--drawer-header-min-height: calc(24px + var(--lui-space-6));--drawer-close-color: var(--lui-palette-gray-400);--drawer-close-padding: var(--lui-space-3);--drawer-title-font-size: var(--lui-font-size-md);--drawer-title-weight: var(--lui-font-weight-semibold);--drawer-title-color: var(--lui-color-text-primary);--drawer-title-font-family: var(--lui-font-family-body);--drawer-title-line-height: var(--line-height-md)}._root_1mypq_13{align-items:center;display:flex;gap:var(--drawer-header-gap);min-height:var(--drawer-header-min-height);position:relative}._title_1mypq_21{color:var(--drawer-title-color);flex:1;font-family:var(--drawer-title-font-family);font-size:var(--drawer-title-font-size);font-style:normal;font-weight:var(--drawer-title-weight);line-height:var(--drawer-title-line-height)}._close_1mypq_31{color:var(--drawer-close-color);padding:var(--drawer-close-padding);position:absolute;right:0;top:50%;transform:translateY(-50%)}
|
package/dist/drawer.js
CHANGED
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { i as
|
|
1
|
+
import { jsx as t, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import H, { cloneElement as P, createContext as $, useContext as B, useRef as u, useState as h, useEffect as F, useMemo as j } from "react";
|
|
3
|
+
import { i as V } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
4
4
|
import "lodash/camelCase";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { g as
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
import U from "clsx";
|
|
6
|
+
import { useDialog as K, useModalOverlay as Y, Overlay as G, UNSAFE_PortalProvider as J } from "react-aria";
|
|
7
|
+
import { useOverlayTriggerState as Q } from "react-stately";
|
|
8
|
+
import { g as W } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
9
|
+
import { g as T } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
10
|
+
import { I as X } from "./Icon-DUCBChX2.mjs";
|
|
11
|
+
import { u as Z } from "./useLocale-CJh-krrY.mjs";
|
|
12
|
+
import './drawer.css';var o = /* @__PURE__ */ ((e) => (e.ACTIONS = "Drawer.Actions", e.CONTENT = "Drawer.Content", e.HEADER = "Drawer.Header", e))(o || {});
|
|
13
|
+
const ee = "_root_1m4yu_1", te = {
|
|
14
|
+
root: ee
|
|
15
|
+
}, v = ({ children: e }) => {
|
|
16
|
+
const r = H.Children.toArray(e), l = r.map((s, c) => {
|
|
17
|
+
if (!V("Button", s))
|
|
18
|
+
return s;
|
|
19
|
+
const n = s.props.variant;
|
|
20
|
+
return P(s, {
|
|
19
21
|
key: c,
|
|
20
|
-
...
|
|
22
|
+
...n ? {} : { variant: n ?? (c === 0 ? "primary" : "secondary") }
|
|
21
23
|
});
|
|
22
24
|
});
|
|
23
|
-
return
|
|
25
|
+
return r.length === 0 ? null : /* @__PURE__ */ t("div", { className: te.root, children: l });
|
|
24
26
|
};
|
|
25
|
-
v.displayName =
|
|
26
|
-
const
|
|
27
|
-
root:
|
|
28
|
-
},
|
|
29
|
-
const { children:
|
|
30
|
-
return /* @__PURE__ */
|
|
27
|
+
v.displayName = o.ACTIONS;
|
|
28
|
+
const oe = "_root_jagsa_1", re = {
|
|
29
|
+
root: oe
|
|
30
|
+
}, q = (e) => {
|
|
31
|
+
const { children: r } = e;
|
|
32
|
+
return /* @__PURE__ */ t("div", { className: re.root, children: r });
|
|
31
33
|
};
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
34
|
+
q.displayName = o.CONTENT;
|
|
35
|
+
const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], E = $(null), ae = () => {
|
|
36
|
+
const e = B(E);
|
|
37
|
+
if (!e)
|
|
38
|
+
throw new Error("Drawer sub-components must be used within a Drawer component.");
|
|
39
|
+
return e;
|
|
40
|
+
}, ce = "_underlay_qcy0k_24", le = "_modal_qcy0k_32", ie = "_drawer_qcy0k_37", me = "_placementLeft_qcy0k_47", de = "_entered_qcy0k_53", ue = "_placementRight_qcy0k_56", _e = "_placementTop_qcy0k_65", pe = "_placementBottom_qcy0k_74", ye = "_sizeSm_qcy0k_83", fe = "_sizeMd_qcy0k_90", Ne = "_sizeLg_qcy0k_97", Ce = "_content_qcy0k_105", a = {
|
|
41
|
+
underlay: ce,
|
|
42
|
+
modal: le,
|
|
43
|
+
drawer: ie,
|
|
44
|
+
placementLeft: me,
|
|
45
|
+
entered: de,
|
|
46
|
+
placementRight: ue,
|
|
47
|
+
placementTop: _e,
|
|
48
|
+
placementBottom: pe,
|
|
49
|
+
sizeSm: ye,
|
|
50
|
+
sizeMd: fe,
|
|
51
|
+
sizeLg: Ne,
|
|
52
|
+
content: Ce
|
|
53
|
+
}, De = 300, O = (e) => {
|
|
54
|
+
const { children: r, container: l, dismissable: s = !0, onOpenChange: c, open: n, placement: y = "right", size: R = "md" } = e, f = u(null), i = u(null), { dialogProps: I } = K(e, f), N = Q({ isOpen: n, onOpenChange: c }), { modalProps: S, underlayProps: z } = Y(
|
|
55
|
+
{ isDismissable: s, isKeyboardDismissDisabled: !1 },
|
|
56
|
+
N,
|
|
57
|
+
i
|
|
58
|
+
), [C, D] = h(n || !1), [x, A] = h(!1), m = u(C);
|
|
59
|
+
F(() => {
|
|
60
|
+
if (n) {
|
|
61
|
+
m.current = !0, D(!0);
|
|
55
62
|
const d = requestAnimationFrame(() => {
|
|
56
63
|
requestAnimationFrame(() => {
|
|
57
64
|
A(!0);
|
|
@@ -62,44 +69,58 @@ const Z = "Drawer", ee = [t.ACTIONS, t.CONTENT, t.HEADER], te = "_underlay_qcy0k
|
|
|
62
69
|
if (m.current) {
|
|
63
70
|
A(!1);
|
|
64
71
|
const d = setTimeout(() => {
|
|
65
|
-
m.current = !1,
|
|
66
|
-
},
|
|
72
|
+
m.current = !1, D(!1);
|
|
73
|
+
}, De);
|
|
67
74
|
return () => clearTimeout(d);
|
|
68
75
|
}
|
|
69
|
-
}, [
|
|
76
|
+
}, [n]);
|
|
70
77
|
const {
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
} =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{ [
|
|
78
|
+
[o.ACTIONS]: L,
|
|
79
|
+
[o.CONTENT]: g,
|
|
80
|
+
[o.HEADER]: M
|
|
81
|
+
} = j(() => W(r, se), [r]), b = U(
|
|
82
|
+
a.drawer,
|
|
83
|
+
T("size", R, a),
|
|
84
|
+
T("placement", y, a),
|
|
85
|
+
{ [a.entered]: x }
|
|
79
86
|
);
|
|
80
|
-
return
|
|
87
|
+
return C ? /* @__PURE__ */ t(G, { portalContainer: l, children: /* @__PURE__ */ t("div", { className: a.underlay, ...z, children: /* @__PURE__ */ t("div", { className: a.modal, ...S, ref: i, children: /* @__PURE__ */ t(J, { getContainer: () => i.current, children: /* @__PURE__ */ t(E.Provider, { value: { close: () => N.close() }, children: /* @__PURE__ */ w(
|
|
81
88
|
"div",
|
|
82
89
|
{
|
|
83
90
|
"aria-label": "Drawer",
|
|
84
91
|
"aria-modal": "true",
|
|
85
|
-
className:
|
|
92
|
+
className: b,
|
|
86
93
|
role: "dialog",
|
|
87
|
-
...
|
|
94
|
+
...I,
|
|
88
95
|
ref: f,
|
|
89
96
|
children: [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
M,
|
|
98
|
+
g && /* @__PURE__ */ t("div", { className: a.content, children: g }),
|
|
99
|
+
L
|
|
93
100
|
]
|
|
94
101
|
}
|
|
95
102
|
) }) }) }) }) }) : null;
|
|
96
103
|
};
|
|
97
|
-
|
|
98
|
-
const _ =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
O.displayName = ne;
|
|
105
|
+
const Ae = "_root_1mypq_13", ge = "_title_1mypq_21", he = "_close_1mypq_31", _ = {
|
|
106
|
+
root: Ae,
|
|
107
|
+
title: ge,
|
|
108
|
+
close: he
|
|
109
|
+
}, k = (e) => {
|
|
110
|
+
const { children: r } = e, { close: l } = ae(), s = Z(), c = (n) => {
|
|
111
|
+
n.preventDefault(), l();
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ w("div", { className: _.root, children: [
|
|
114
|
+
/* @__PURE__ */ t("div", { className: _.title, children: r }),
|
|
115
|
+
/* @__PURE__ */ t("button", { "aria-label": s.Drawer.Header.close, className: _.close, onClick: c, type: "button", children: /* @__PURE__ */ t(X, { name: "x", size: 16 }) })
|
|
116
|
+
] });
|
|
117
|
+
};
|
|
118
|
+
k.displayName = o.HEADER;
|
|
119
|
+
const p = O;
|
|
120
|
+
p.Actions = v;
|
|
121
|
+
p.Content = q;
|
|
122
|
+
p.Header = k;
|
|
102
123
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
124
|
+
p as Drawer,
|
|
125
|
+
p as default
|
|
105
126
|
};
|
package/dist/heading.js
CHANGED
|
@@ -1,7 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import m from "clsx";
|
|
3
|
+
import { g as s } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
4
|
+
import './heading.css';const d = "Heading", y = "_root_aa627_1", z = "_truncate_aa627_5", D = "_sizeXs_aa627_11", u = "_sizeSm_aa627_17", S = "_sizeMd_aa627_23", p = "_sizeLg_aa627_30", A = "_colorPrimary_aa627_37", M = "_colorSecondary_aa627_41", N = "_colorTertiary_aa627_45", L = "_colorDisabled_aa627_49", R = "_colorBrand_aa627_53", r = {
|
|
5
|
+
root: y,
|
|
6
|
+
truncate: z,
|
|
7
|
+
sizeXs: D,
|
|
8
|
+
sizeSm: u,
|
|
9
|
+
sizeMd: S,
|
|
10
|
+
sizeLg: p,
|
|
11
|
+
colorPrimary: A,
|
|
12
|
+
colorSecondary: M,
|
|
13
|
+
colorTertiary: N,
|
|
14
|
+
colorDisabled: L,
|
|
15
|
+
colorBrand: R
|
|
16
|
+
}, b = (o) => {
|
|
17
|
+
const { as: t = "h2", children: c, color: a, ref: e, size: _ = "sm", truncate: n = !1 } = o, l = m(
|
|
18
|
+
r.root,
|
|
19
|
+
s("size", _, r),
|
|
20
|
+
a && s("color", a, r),
|
|
21
|
+
{
|
|
22
|
+
[r.truncate]: n
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ i(t, { className: l, ref: e, children: c });
|
|
26
|
+
};
|
|
27
|
+
b.displayName = d;
|
|
28
|
+
var f = /* @__PURE__ */ ((o) => (o.XS = "xs", o.SM = "sm", o.MD = "md", o.LG = "lg", o))(f || {}), B = /* @__PURE__ */ ((o) => (o.PRIMARY = "primary", o.SECONDARY = "secondary", o.TERTIARY = "tertiary", o.DISABLED = "disabled", o.BRAND = "brand", o))(B || {});
|
|
3
29
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
30
|
+
B as EHeadingColor,
|
|
31
|
+
f as EHeadingSize,
|
|
32
|
+
b as Heading
|
|
7
33
|
};
|