@lazar-ui/kit 0.1.0 → 0.2.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 +83 -0
- package/LICENSE +21 -0
- package/README.md +64 -23
- package/dist/Icon-flib0kme.mjs +684 -0
- package/dist/Icon.css +1 -0
- package/dist/{Overlay-RmiBtqDR.mjs → Overlay-OYo7gW8m.mjs} +165 -156
- package/dist/accordion.css +1 -1
- package/dist/accordion.d.ts +59 -9
- package/dist/accordion.js +59 -41
- package/dist/alert.css +1 -1
- package/dist/alert.js +12 -12
- package/dist/avatar.css +1 -1
- package/dist/avatar.d.ts +2 -2
- package/dist/avatar.js +18 -18
- package/dist/badge.css +1 -1
- package/dist/badge.d.ts +3 -3
- package/dist/badge.js +8 -8
- package/dist/breadcrumbs.css +1 -1
- package/dist/breadcrumbs.js +35 -35
- package/dist/button.css +1 -1
- package/dist/button.d.ts +2 -0
- package/dist/button.js +41 -35
- package/dist/card.css +1 -1
- package/dist/card.js +15 -15
- package/dist/checkbox.css +1 -1
- package/dist/checkbox.js +25 -25
- package/dist/css/palettes/indigo.css +75 -75
- package/dist/css/palettes/monochrome.css +75 -75
- package/dist/css/semantic.css +67 -67
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +61 -60
- package/dist/drawer.css +1 -1
- package/dist/drawer.d.ts +11 -0
- package/dist/drawer.js +102 -81
- package/dist/empty-state.css +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +27 -26
- package/dist/error-boundary.css +1 -1
- package/dist/error-boundary.js +9 -9
- package/dist/flex.js +6 -6
- package/dist/form-field.css +1 -1
- package/dist/form-field.js +10 -10
- package/dist/icon.d.ts +30 -0
- package/dist/icon.js +4 -0
- package/dist/input.css +1 -1
- package/dist/input.js +77 -103
- package/dist/{config-provider.d.ts → lazar-ui-provider.d.ts} +33 -33
- package/dist/lazar-ui-provider.js +14 -0
- package/dist/menu.css +1 -1
- package/dist/menu.d.ts +3 -3
- package/dist/menu.js +73 -91
- package/dist/pagination.css +1 -1
- package/dist/pagination.js +49 -48
- package/dist/popover.css +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.js +26 -25
- package/dist/select.css +1 -1
- package/dist/select.js +81 -119
- package/dist/separator.css +1 -1
- package/dist/separator.d.ts +2 -2
- package/dist/separator.js +9 -9
- package/dist/skeleton.css +1 -1
- package/dist/skeleton.js +13 -13
- package/dist/spinner.css +1 -1
- package/dist/spinner.d.ts +2 -2
- package/dist/spinner.js +7 -7
- package/dist/switch.css +1 -1
- package/dist/switch.js +15 -15
- package/dist/table.css +1 -1
- package/dist/table.js +23 -23
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +48 -48
- package/dist/textarea.css +1 -1
- package/dist/textarea.js +17 -17
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.js +34 -33
- package/dist/typography.css +1 -0
- package/dist/typography.d.ts +76 -0
- package/dist/typography.js +40 -0
- package/dist/{useLocale-D2Z0JH0l.mjs → useLocale-DdHNhmvT.mjs} +24 -24
- package/dist/{useModalOverlay-D5Bs9FCB.mjs → useModalOverlay-B93fkWbb.mjs} +2 -2
- package/dist/{useOverlayPosition-DVu1Qziq.mjs → useOverlayPosition-CK3oEqVS.mjs} +1 -1
- package/dist/{useOverlayTriggerState-BIo1Jcba.mjs → useOverlayTriggerState-DK8Xy6Kr.mjs} +1 -1
- package/package.json +17 -4
- package/dist/config-provider.js +0 -14
package/dist/css/semantic.css
CHANGED
|
@@ -4,88 +4,88 @@
|
|
|
4
4
|
═══════════════════════════════════════════════════ */
|
|
5
5
|
|
|
6
6
|
/* Background */
|
|
7
|
-
--color-background-brand: var(--palette-brand);
|
|
8
|
-
--color-background-brand-hover: var(--palette-brand-hover);
|
|
9
|
-
--color-background-brand-secondary: var(--palette-brand-secondary);
|
|
10
|
-
--color-background-primary: var(--palette-white);
|
|
11
|
-
--color-background-secondary: var(--palette-gray-50);
|
|
12
|
-
--color-background-tertiary: var(--palette-gray-100);
|
|
13
|
-
--color-background-disabled: var(--palette-gray-100);
|
|
14
|
-
--color-background-error: var(--palette-red-500);
|
|
15
|
-
--color-background-error-hover: var(--palette-red-600);
|
|
16
|
-
--color-background-overlay: var(--palette-overlay);
|
|
7
|
+
--lui-color-background-brand: var(--lui-palette-brand);
|
|
8
|
+
--lui-color-background-brand-hover: var(--lui-palette-brand-hover);
|
|
9
|
+
--lui-color-background-brand-secondary: var(--lui-palette-brand-secondary);
|
|
10
|
+
--lui-color-background-primary: var(--lui-palette-white);
|
|
11
|
+
--lui-color-background-secondary: var(--lui-palette-gray-50);
|
|
12
|
+
--lui-color-background-tertiary: var(--lui-palette-gray-100);
|
|
13
|
+
--lui-color-background-disabled: var(--lui-palette-gray-100);
|
|
14
|
+
--lui-color-background-error: var(--lui-palette-red-500);
|
|
15
|
+
--lui-color-background-error-hover: var(--lui-palette-red-600);
|
|
16
|
+
--lui-color-background-overlay: var(--lui-palette-overlay);
|
|
17
17
|
|
|
18
18
|
/* Text */
|
|
19
|
-
--color-text-primary: var(--palette-gray-900);
|
|
20
|
-
--color-text-secondary: var(--palette-gray-600);
|
|
21
|
-
--color-text-tertiary: var(--palette-gray-500);
|
|
22
|
-
--color-text-quaternary: var(--palette-gray-300);
|
|
23
|
-
--color-text-disabled: var(--palette-gray-300);
|
|
24
|
-
--color-text-on-brand: var(--palette-white);
|
|
25
|
-
--color-text-on-dark: var(--palette-white);
|
|
26
|
-
--color-text-link: var(--palette-blue-500);
|
|
27
|
-
--color-text-link-hover: var(--palette-blue-600);
|
|
28
|
-
--color-text-error: var(--palette-red-500);
|
|
29
|
-
--color-text-error-hover: var(--palette-red-600);
|
|
30
|
-
--color-text-success: var(--palette-green-600);
|
|
31
|
-
--color-text-success-hover: var(--palette-green-600);
|
|
32
|
-
--color-text-warning: var(--palette-orange-500);
|
|
33
|
-
--color-text-warning-hover: var(--palette-orange-600);
|
|
19
|
+
--lui-color-text-primary: var(--lui-palette-gray-900);
|
|
20
|
+
--lui-color-text-secondary: var(--lui-palette-gray-600);
|
|
21
|
+
--lui-color-text-tertiary: var(--lui-palette-gray-500);
|
|
22
|
+
--lui-color-text-quaternary: var(--lui-palette-gray-300);
|
|
23
|
+
--lui-color-text-disabled: var(--lui-palette-gray-300);
|
|
24
|
+
--lui-color-text-on-brand: var(--lui-palette-white);
|
|
25
|
+
--lui-color-text-on-dark: var(--lui-palette-white);
|
|
26
|
+
--lui-color-text-link: var(--lui-palette-blue-500);
|
|
27
|
+
--lui-color-text-link-hover: var(--lui-palette-blue-600);
|
|
28
|
+
--lui-color-text-error: var(--lui-palette-red-500);
|
|
29
|
+
--lui-color-text-error-hover: var(--lui-palette-red-600);
|
|
30
|
+
--lui-color-text-success: var(--lui-palette-green-600);
|
|
31
|
+
--lui-color-text-success-hover: var(--lui-palette-green-600);
|
|
32
|
+
--lui-color-text-warning: var(--lui-palette-orange-500);
|
|
33
|
+
--lui-color-text-warning-hover: var(--lui-palette-orange-600);
|
|
34
34
|
|
|
35
35
|
/* Border */
|
|
36
|
-
--color-border-primary: var(--palette-gray-200);
|
|
37
|
-
--color-border-secondary: var(--palette-gray-100);
|
|
38
|
-
--color-border-disabled: var(--palette-gray-200);
|
|
39
|
-
--color-border-disabled-subtle: var(--palette-gray-200);
|
|
40
|
-
--color-border-focus: var(--palette-brand);
|
|
41
|
-
--color-border-focus-error: var(--palette-red-500);
|
|
36
|
+
--lui-color-border-primary: var(--lui-palette-gray-200);
|
|
37
|
+
--lui-color-border-secondary: var(--lui-palette-gray-100);
|
|
38
|
+
--lui-color-border-disabled: var(--lui-palette-gray-200);
|
|
39
|
+
--lui-color-border-disabled-subtle: var(--lui-palette-gray-200);
|
|
40
|
+
--lui-color-border-focus: var(--lui-palette-brand);
|
|
41
|
+
--lui-color-border-focus-error: var(--lui-palette-red-500);
|
|
42
42
|
|
|
43
43
|
/* ═══════════════════════════════════════════════════
|
|
44
44
|
Space (base: 4px)
|
|
45
45
|
═══════════════════════════════════════════════════ */
|
|
46
46
|
|
|
47
|
-
--space-1: 4px;
|
|
48
|
-
--space-2: 8px;
|
|
49
|
-
--space-3: 12px;
|
|
50
|
-
--space-4: 16px;
|
|
51
|
-
--space-5: 20px;
|
|
52
|
-
--space-6: 24px;
|
|
53
|
-
--space-7: 28px;
|
|
54
|
-
--space-8: 32px;
|
|
55
|
-
--space-10: 40px;
|
|
56
|
-
--space-12: 48px;
|
|
57
|
-
--space-14: 56px;
|
|
58
|
-
--space-16: 64px;
|
|
47
|
+
--lui-space-1: 4px;
|
|
48
|
+
--lui-space-2: 8px;
|
|
49
|
+
--lui-space-3: 12px;
|
|
50
|
+
--lui-space-4: 16px;
|
|
51
|
+
--lui-space-5: 20px;
|
|
52
|
+
--lui-space-6: 24px;
|
|
53
|
+
--lui-space-7: 28px;
|
|
54
|
+
--lui-space-8: 32px;
|
|
55
|
+
--lui-space-10: 40px;
|
|
56
|
+
--lui-space-12: 48px;
|
|
57
|
+
--lui-space-14: 56px;
|
|
58
|
+
--lui-space-16: 64px;
|
|
59
59
|
|
|
60
60
|
/* ═══════════════════════════════════════════════════
|
|
61
61
|
Radius
|
|
62
62
|
═══════════════════════════════════════════════════ */
|
|
63
63
|
|
|
64
|
-
--radius-1: 4px;
|
|
65
|
-
--radius-2: 8px;
|
|
66
|
-
--radius-3: 12px;
|
|
67
|
-
--radius-4: 16px;
|
|
68
|
-
--radius-full: 9999px;
|
|
64
|
+
--lui-radius-1: 4px;
|
|
65
|
+
--lui-radius-2: 8px;
|
|
66
|
+
--lui-radius-3: 12px;
|
|
67
|
+
--lui-radius-4: 16px;
|
|
68
|
+
--lui-radius-full: 9999px;
|
|
69
69
|
|
|
70
70
|
/* ═══════════════════════════════════════════════════
|
|
71
71
|
Font
|
|
72
72
|
═══════════════════════════════════════════════════ */
|
|
73
73
|
|
|
74
|
-
--font-family-body: "Inter", "Arial", "Helvetica", sans-serif;
|
|
74
|
+
--lui-font-family-body: "Inter", "Arial", "Helvetica", sans-serif;
|
|
75
75
|
|
|
76
76
|
/* Font Sizes. */
|
|
77
|
-
--font-size-xs: 12px;
|
|
78
|
-
--font-size-sm: 13px;
|
|
79
|
-
--font-size-md: 14px;
|
|
80
|
-
--font-size-lg: 16px;
|
|
81
|
-
--font-size-xl: 20px;
|
|
82
|
-
--font-size-2xl: 24px;
|
|
77
|
+
--lui-font-size-xs: 12px;
|
|
78
|
+
--lui-font-size-sm: 13px;
|
|
79
|
+
--lui-font-size-md: 14px;
|
|
80
|
+
--lui-font-size-lg: 16px;
|
|
81
|
+
--lui-font-size-xl: 20px;
|
|
82
|
+
--lui-font-size-2xl: 24px;
|
|
83
83
|
|
|
84
84
|
/* Font Weights. */
|
|
85
|
-
--font-weight-normal: 400;
|
|
86
|
-
--font-weight-medium: 500;
|
|
87
|
-
--font-weight-semibold: 600;
|
|
88
|
-
--font-weight-bold: 700;
|
|
85
|
+
--lui-font-weight-normal: 400;
|
|
86
|
+
--lui-font-weight-medium: 500;
|
|
87
|
+
--lui-font-weight-semibold: 600;
|
|
88
|
+
--lui-font-weight-bold: 700;
|
|
89
89
|
|
|
90
90
|
/* Line-height на сетке 4px */
|
|
91
91
|
--line-height-xs: 16px;
|
|
@@ -99,15 +99,15 @@
|
|
|
99
99
|
Shadow
|
|
100
100
|
═══════════════════════════════════════════════════ */
|
|
101
101
|
|
|
102
|
-
--shadow-xs: 0 1px 2px 0 rgb(0, 0, 0 / 0.05);
|
|
103
|
-
--shadow-sm: 0 1px 3px 0 rgb(0, 0, 0 / 0.1), 0 1px 2px -1px rgb(0, 0, 0 / 0.1);
|
|
104
|
-
--shadow-md: 0 4px 6px -1px rgb(0, 0, 0 / 0.1), 0 2px 4px -2px rgb(0, 0, 0 / 0.1);
|
|
105
|
-
--shadow-lg: 0 10px 15px -3px rgb(0, 0, 0 / 0.1), 0 4px 6px -4px rgb(0, 0, 0 / 0.1);
|
|
102
|
+
--lui-shadow-xs: 0 1px 2px 0 rgb(0, 0, 0 / 0.05);
|
|
103
|
+
--lui-shadow-sm: 0 1px 3px 0 rgb(0, 0, 0 / 0.1), 0 1px 2px -1px rgb(0, 0, 0 / 0.1);
|
|
104
|
+
--lui-shadow-md: 0 4px 6px -1px rgb(0, 0, 0 / 0.1), 0 2px 4px -2px rgb(0, 0, 0 / 0.1);
|
|
105
|
+
--lui-shadow-lg: 0 10px 15px -3px rgb(0, 0, 0 / 0.1), 0 4px 6px -4px rgb(0, 0, 0 / 0.1);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
[data-theme="dark"] {
|
|
109
|
-
--color-border-primary: var(--palette-gray-700);
|
|
110
|
-
--color-border-secondary: var(--palette-gray-600);
|
|
111
|
-
--color-border-disabled: var(--palette-gray-600);
|
|
112
|
-
--color-border-disabled-subtle: var(--palette-gray-500);
|
|
109
|
+
--lui-color-border-primary: var(--lui-palette-gray-700);
|
|
110
|
+
--lui-color-border-secondary: var(--lui-palette-gray-600);
|
|
111
|
+
--lui-color-border-disabled: var(--lui-palette-gray-600);
|
|
112
|
+
--lui-color-border-disabled-subtle: var(--lui-palette-gray-500);
|
|
113
113
|
}
|
package/dist/dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._root_1fxwu_1{display:flex;gap:var(--dialog-actions-gap)}._root_jagsa_1{max-height:100%;overflow-y:auto}:root{--dialog-underlay: var(--color-background-overlay);--dialog-bg: var(--color-background-primary);--dialog-radius: var(--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(--space-8);--dialog-gap: var(--space-6);--dialog-header-gap: var(--space-6);--dialog-header-min-height: calc(24px + var(--space-6));--dialog-close-color: var(--palette-gray-400);--dialog-close-padding: var(--space-3);--dialog-actions-padding-top: var(--space-10);--dialog-width-xs: 384px;--dialog-width-sm: 480px;--dialog-width-md: 560px;--dialog-width-lg: 640px;--dialog-title-font-size: var(--font-size-md);--dialog-title-weight: var(--font-weight-semibold);--dialog-title-color: var(--color-text-primary);--dialog-title-font-family: var(--font-family-body);--dialog-title-line-height: var(--line-height-md);--dialog-actions-gap: var(--space-4)}.
|
|
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,75 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { $ as
|
|
5
|
-
import {
|
|
6
|
-
import { a as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { g as
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, h = (o) => {
|
|
14
|
-
const { children: t } = o;
|
|
15
|
-
return /* @__PURE__ */ e("div", { className: k.root, children: t });
|
|
16
|
-
};
|
|
17
|
-
h.displayName = s.ACTIONS;
|
|
18
|
-
const K = "_root_jagsa_1", V = {
|
|
1
|
+
import { jsx as s, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as f, useMemo as L } from "react";
|
|
3
|
+
import { c as O } from "./clsx-OuTLNxxd.mjs";
|
|
4
|
+
import { $ as S, a as A } from "./useModalOverlay-B93fkWbb.mjs";
|
|
5
|
+
import { s as E, i as M } from "./Overlay-OYo7gW8m.mjs";
|
|
6
|
+
import { a as P } from "./useOverlayTriggerState-DK8Xy6Kr.mjs";
|
|
7
|
+
import { I as R } from "./Icon-flib0kme.mjs";
|
|
8
|
+
import { u as X } from "./useLocale-DdHNhmvT.mjs";
|
|
9
|
+
import { g as k } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
10
|
+
import { g as w } from "./getVariantClassName-D7Nhpuec.mjs";
|
|
11
|
+
import './dialog.css';var e = /* @__PURE__ */ ((o) => (o.ACTIONS = "Dialog.Actions", o.CONTENT = "Dialog.Content", o.TITLE = "Dialog.Title", o))(e || {});
|
|
12
|
+
const K = "_root_1fxwu_1", V = {
|
|
19
13
|
root: K
|
|
20
14
|
}, N = (o) => {
|
|
21
15
|
const { children: t } = o;
|
|
22
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ s("div", { className: V.root, children: t });
|
|
17
|
+
};
|
|
18
|
+
N.displayName = e.ACTIONS;
|
|
19
|
+
const Y = "_root_jagsa_1", q = {
|
|
20
|
+
root: Y
|
|
21
|
+
}, p = (o) => {
|
|
22
|
+
const { children: t } = o;
|
|
23
|
+
return /* @__PURE__ */ s("div", { className: q.root, children: t });
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
underlay:
|
|
27
|
-
modal:
|
|
28
|
-
dialog:
|
|
29
|
-
sizeXs:
|
|
30
|
-
sizeSm:
|
|
31
|
-
sizeMd:
|
|
32
|
-
sizeLg:
|
|
33
|
-
header:
|
|
34
|
-
close:
|
|
35
|
-
actions:
|
|
36
|
-
},
|
|
37
|
-
const { children: t, container:
|
|
38
|
-
{ isDismissable: !
|
|
25
|
+
p.displayName = e.CONTENT;
|
|
26
|
+
const B = "Dialog", F = [e.ACTIONS, e.CONTENT, e.TITLE], G = "_underlay_100vj_25", H = "_modal_100vj_34", J = "_dialog_100vj_41", Q = "_sizeXs_100vj_51", U = "_sizeSm_100vj_54", W = "_sizeMd_100vj_57", Z = "_sizeLg_100vj_60", oo = "_header_100vj_64", so = "_close_100vj_71", eo = "_actions_100vj_79", a = {
|
|
27
|
+
underlay: G,
|
|
28
|
+
modal: H,
|
|
29
|
+
dialog: J,
|
|
30
|
+
sizeXs: Q,
|
|
31
|
+
sizeSm: U,
|
|
32
|
+
sizeMd: W,
|
|
33
|
+
sizeLg: Z,
|
|
34
|
+
header: oo,
|
|
35
|
+
close: so,
|
|
36
|
+
actions: eo
|
|
37
|
+
}, g = (o) => {
|
|
38
|
+
const { children: t, container: u, open: l, modal: v = !0, onOpenChange: $, size: C = "md" } = o, h = X(), c = f(null), n = f(null), { dialogProps: b } = S(o, c), r = P({ isOpen: l, onOpenChange: $ }), { modalProps: y, underlayProps: z } = A(
|
|
39
|
+
{ isDismissable: !v, isKeyboardDismissDisabled: !1 },
|
|
39
40
|
r,
|
|
40
|
-
|
|
41
|
+
n
|
|
41
42
|
), {
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
} =
|
|
46
|
-
|
|
43
|
+
[e.ACTIONS]: d,
|
|
44
|
+
[e.CONTENT]: m,
|
|
45
|
+
[e.TITLE]: j
|
|
46
|
+
} = L(() => k(t, F), [t]), D = (x) => {
|
|
47
|
+
x.preventDefault(), r.close();
|
|
47
48
|
};
|
|
48
49
|
if (!l)
|
|
49
50
|
return null;
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */
|
|
51
|
+
const I = O(a.dialog, w("size", C, a));
|
|
52
|
+
return /* @__PURE__ */ s(E, { portalContainer: u, children: /* @__PURE__ */ s("div", { className: a.underlay, ...z, children: /* @__PURE__ */ s("div", { className: a.modal, ...y, ref: n, children: /* @__PURE__ */ s(M, { getContainer: () => n.current, children: /* @__PURE__ */ _("div", { className: I, ...b, ref: c, children: [
|
|
53
|
+
/* @__PURE__ */ _("div", { className: a.header, children: [
|
|
54
|
+
j,
|
|
55
|
+
/* @__PURE__ */ s("button", { "aria-label": h.dialog.close, className: a.close, onClick: D, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
|
|
55
56
|
] }),
|
|
56
|
-
m && /* @__PURE__ */
|
|
57
|
-
d && /* @__PURE__ */
|
|
58
|
-
] }) }) }) });
|
|
57
|
+
m && /* @__PURE__ */ s("div", { children: m }),
|
|
58
|
+
d && /* @__PURE__ */ s("div", { className: a.actions, children: d })
|
|
59
|
+
] }) }) }) }) });
|
|
59
60
|
};
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
root:
|
|
63
|
-
},
|
|
61
|
+
g.displayName = B;
|
|
62
|
+
const to = "_root_1ae0y_1", ao = {
|
|
63
|
+
root: to
|
|
64
|
+
}, T = (o) => {
|
|
64
65
|
const { children: t } = o;
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
+
return /* @__PURE__ */ s("div", { className: ao.root, children: t });
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
T.displayName = e.TITLE;
|
|
69
|
+
const i = g;
|
|
70
|
+
i.Actions = N;
|
|
71
|
+
i.Content = p;
|
|
72
|
+
i.Title = T;
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
i as Dialog,
|
|
75
|
+
i as default
|
|
75
76
|
};
|
package/dist/drawer.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._root_jagsa_1{max-height:100%;overflow-y:auto}:root{--drawer-underlay: var(--color-background-overlay);--drawer-bg: var(--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(--space-8);--drawer-gap: var(--space-6);--drawer-header-gap: var(--space-6);--drawer-header-min-height: calc(24px + var(--space-6));--drawer-close-color: var(--palette-gray-400);--drawer-close-padding: var(--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(--font-size-md);--drawer-title-weight: var(--font-weight-semibold);--drawer-title-color: var(--color-text-primary);--drawer-title-font-family: var(--font-family-body);--drawer-title-line-height: var(--line-height-md)}.
|
|
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.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { AriaDialogProps } from 'react-aria';
|
|
2
2
|
import { default as default_2 } from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Wrapper for action buttons inside Drawer.
|
|
6
|
+
* Accepts only `<Button>` components as children.
|
|
7
|
+
* Auto-assigns variant based on position:
|
|
8
|
+
* - first child → `primary`
|
|
9
|
+
* - subsequent children → `secondary`
|
|
10
|
+
* unless the Button already has an explicit `variant` prop.
|
|
11
|
+
*/
|
|
12
|
+
declare const Actions: default_2.FC<default_2.PropsWithChildren>;
|
|
13
|
+
|
|
4
14
|
/**
|
|
5
15
|
* Drawer Content sub-component.
|
|
6
16
|
*
|
|
@@ -111,6 +121,7 @@ export declare interface IHeaderProps extends default_2.PropsWithChildren {
|
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
declare type TDrawerCompoundComponent = typeof Drawer_2 & {
|
|
124
|
+
Actions: typeof Actions;
|
|
114
125
|
Content: typeof Content;
|
|
115
126
|
Header: typeof Header;
|
|
116
127
|
};
|
package/dist/drawer.js
CHANGED
|
@@ -1,106 +1,127 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsx as t, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import M, { cloneElement as H, createContext as P, useContext as B, useRef as p, useState as A, useEffect as j, useMemo as F } from "react";
|
|
3
|
+
import { i as V } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
4
|
+
import "./camelCase-PtIYufW8.mjs";
|
|
5
|
+
import { c as U } from "./clsx-OuTLNxxd.mjs";
|
|
6
|
+
import { $ as K, a as Y } from "./useModalOverlay-B93fkWbb.mjs";
|
|
7
|
+
import { s as G, i as J } from "./Overlay-OYo7gW8m.mjs";
|
|
8
|
+
import { a as Q } from "./useOverlayTriggerState-DK8Xy6Kr.mjs";
|
|
9
|
+
import { g as W } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
10
|
+
import { g as D } from "./getVariantClassName-D7Nhpuec.mjs";
|
|
11
|
+
import { I as X } from "./Icon-flib0kme.mjs";
|
|
12
|
+
import { u as Z } from "./useLocale-DdHNhmvT.mjs";
|
|
13
|
+
import './drawer.css';var o = /* @__PURE__ */ ((e) => (e.ACTIONS = "Drawer.Actions", e.CONTENT = "Drawer.Content", e.HEADER = "Drawer.Header", e))(o || {});
|
|
14
|
+
const ee = "_root_1m4yu_1", te = {
|
|
15
|
+
root: ee
|
|
16
|
+
}, g = ({ children: e }) => {
|
|
17
|
+
const r = M.Children.toArray(e), l = r.map((s, c) => {
|
|
18
|
+
if (!V("Button", s))
|
|
19
|
+
return s;
|
|
20
|
+
const n = s.props.variant;
|
|
21
|
+
return H(s, {
|
|
22
|
+
key: c,
|
|
23
|
+
...n ? {} : { variant: n ?? (c === 0 ? "primary" : "secondary") }
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
return r.length === 0 ? null : /* @__PURE__ */ t("div", { className: te.root, children: l });
|
|
16
27
|
};
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
28
|
+
g.displayName = o.ACTIONS;
|
|
29
|
+
const oe = "_root_jagsa_1", re = {
|
|
30
|
+
root: oe
|
|
31
|
+
}, w = (e) => {
|
|
32
|
+
const { children: r } = e;
|
|
33
|
+
return /* @__PURE__ */ t("div", { className: re.root, children: r });
|
|
34
|
+
};
|
|
35
|
+
w.displayName = o.CONTENT;
|
|
36
|
+
const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], q = P(null), ae = () => {
|
|
37
|
+
const e = B(q);
|
|
20
38
|
if (!e)
|
|
21
39
|
throw new Error("Drawer sub-components must be used within a Drawer component.");
|
|
22
40
|
return e;
|
|
23
|
-
},
|
|
24
|
-
underlay:
|
|
25
|
-
modal:
|
|
26
|
-
drawer:
|
|
27
|
-
placementLeft:
|
|
28
|
-
entered:
|
|
29
|
-
placementRight:
|
|
30
|
-
placementTop:
|
|
31
|
-
placementBottom:
|
|
32
|
-
sizeSm:
|
|
33
|
-
sizeMd:
|
|
34
|
-
sizeLg:
|
|
35
|
-
content:
|
|
36
|
-
},
|
|
37
|
-
const { children:
|
|
38
|
-
{ isDismissable:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
), [
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
|
|
45
|
-
const
|
|
41
|
+
}, ce = "_underlay_qcy0k_24", le = "_modal_qcy0k_32", ie = "_drawer_qcy0k_37", me = "_placementLeft_qcy0k_47", de = "_entered_qcy0k_53", pe = "_placementRight_qcy0k_56", ue = "_placementTop_qcy0k_65", _e = "_placementBottom_qcy0k_74", fe = "_sizeSm_qcy0k_83", ye = "_sizeMd_qcy0k_90", Ne = "_sizeLg_qcy0k_97", Ce = "_content_qcy0k_105", a = {
|
|
42
|
+
underlay: ce,
|
|
43
|
+
modal: le,
|
|
44
|
+
drawer: ie,
|
|
45
|
+
placementLeft: me,
|
|
46
|
+
entered: de,
|
|
47
|
+
placementRight: pe,
|
|
48
|
+
placementTop: ue,
|
|
49
|
+
placementBottom: _e,
|
|
50
|
+
sizeSm: fe,
|
|
51
|
+
sizeMd: ye,
|
|
52
|
+
sizeLg: Ne,
|
|
53
|
+
content: Ce
|
|
54
|
+
}, be = 300, k = (e) => {
|
|
55
|
+
const { children: r, container: l, dismissable: s = !0, onOpenChange: c, open: n, placement: f = "right", size: v = "md" } = e, y = p(null), i = p(null), { dialogProps: x } = K(e, y), N = Q({ isOpen: n, onOpenChange: c }), { modalProps: I, underlayProps: O } = Y(
|
|
56
|
+
{ isDismissable: s, isKeyboardDismissDisabled: !1 },
|
|
57
|
+
N,
|
|
58
|
+
i
|
|
59
|
+
), [C, b] = A(n || !1), [R, $] = A(!1), m = p(C);
|
|
60
|
+
j(() => {
|
|
61
|
+
if (n) {
|
|
62
|
+
m.current = !0, b(!0);
|
|
63
|
+
const d = requestAnimationFrame(() => {
|
|
46
64
|
requestAnimationFrame(() => {
|
|
47
|
-
|
|
65
|
+
$(!0);
|
|
48
66
|
});
|
|
49
67
|
});
|
|
50
|
-
return () => cancelAnimationFrame(
|
|
68
|
+
return () => cancelAnimationFrame(d);
|
|
51
69
|
}
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
return () => clearTimeout(
|
|
70
|
+
if (m.current) {
|
|
71
|
+
$(!1);
|
|
72
|
+
const d = setTimeout(() => {
|
|
73
|
+
m.current = !1, b(!1);
|
|
74
|
+
}, be);
|
|
75
|
+
return () => clearTimeout(d);
|
|
58
76
|
}
|
|
59
|
-
}, [
|
|
77
|
+
}, [n]);
|
|
60
78
|
const {
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
[o.ACTIONS]: z,
|
|
80
|
+
[o.CONTENT]: h,
|
|
81
|
+
[o.HEADER]: S
|
|
82
|
+
} = F(() => W(r, se), [r]), L = U(
|
|
83
|
+
a.drawer,
|
|
84
|
+
D("size", v, a),
|
|
85
|
+
D("placement", f, a),
|
|
86
|
+
{ [a.entered]: R }
|
|
68
87
|
);
|
|
69
|
-
return
|
|
88
|
+
return C ? /* @__PURE__ */ t(G, { portalContainer: l, children: /* @__PURE__ */ t("div", { className: a.underlay, ...O, children: /* @__PURE__ */ t("div", { className: a.modal, ...I, ref: i, children: /* @__PURE__ */ t(J, { getContainer: () => i.current, children: /* @__PURE__ */ t(q.Provider, { value: { close: () => N.close() }, children: /* @__PURE__ */ T(
|
|
70
89
|
"div",
|
|
71
90
|
{
|
|
72
91
|
"aria-label": "Drawer",
|
|
73
92
|
"aria-modal": "true",
|
|
74
|
-
className:
|
|
93
|
+
className: L,
|
|
75
94
|
role: "dialog",
|
|
76
|
-
...
|
|
77
|
-
ref:
|
|
95
|
+
...x,
|
|
96
|
+
ref: y,
|
|
78
97
|
children: [
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
S,
|
|
99
|
+
h && /* @__PURE__ */ t("div", { className: a.content, children: h }),
|
|
100
|
+
z
|
|
81
101
|
]
|
|
82
102
|
}
|
|
83
|
-
) }) }) }) }) : null;
|
|
103
|
+
) }) }) }) }) }) : null;
|
|
84
104
|
};
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
root:
|
|
88
|
-
title:
|
|
89
|
-
close:
|
|
90
|
-
},
|
|
91
|
-
const { children:
|
|
92
|
-
|
|
105
|
+
k.displayName = ne;
|
|
106
|
+
const $e = "_root_1mypq_13", he = "_title_1mypq_21", Ae = "_close_1mypq_31", u = {
|
|
107
|
+
root: $e,
|
|
108
|
+
title: he,
|
|
109
|
+
close: Ae
|
|
110
|
+
}, E = (e) => {
|
|
111
|
+
const { children: r } = e, { close: l } = ae(), s = Z(), c = (n) => {
|
|
112
|
+
n.preventDefault(), l();
|
|
93
113
|
};
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */ t("div", { className:
|
|
96
|
-
/* @__PURE__ */ t("button", { "aria-label":
|
|
114
|
+
return /* @__PURE__ */ T("div", { className: u.root, children: [
|
|
115
|
+
/* @__PURE__ */ t("div", { className: u.title, children: r }),
|
|
116
|
+
/* @__PURE__ */ t("button", { "aria-label": s.dialog.close, className: u.close, onClick: c, type: "button", children: /* @__PURE__ */ t(X, { name: "x", size: 16 }) })
|
|
97
117
|
] });
|
|
98
118
|
};
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
E.displayName = o.HEADER;
|
|
120
|
+
const _ = k;
|
|
121
|
+
_.Actions = g;
|
|
122
|
+
_.Content = w;
|
|
123
|
+
_.Header = E;
|
|
103
124
|
export {
|
|
104
|
-
|
|
105
|
-
|
|
125
|
+
_ as Drawer,
|
|
126
|
+
_ as default
|
|
106
127
|
};
|
package/dist/empty-state.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._actions_dl9xv_1{align-items:center;display:flex;gap:var(--lui-space-2);margin-top:var(--lui-space-2)}._content_laixm_1{width:100%}:root{--empty-state-icon-size: 48px}._root_1fqx3_5{align-items:center;display:flex;flex-direction:column;gap:var(--lui-space-2);padding:var(--lui-space-10) var(--lui-space-5);text-align:center}._icon_1fqx3_14{font-size:var(--empty-state-icon-size);line-height:1;margin-bottom:var(--lui-space-2)}._title_1fqx3_20{color:var(--lui-color-text-primary);font-size:var(--lui-font-size-lg);font-weight:var(--lui-font-weight-semibold);line-height:var(--line-height-lg);margin:0}._description_1fqx3_28{color:var(--lui-color-text-secondary);font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm);margin:0;max-width:400px}
|
package/dist/empty-state.d.ts
CHANGED