@lazar-ui/kit 0.6.0 → 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 +21 -0
- package/dist/accordion.js +1 -1
- package/dist/breadcrumbs.js +1 -1
- package/dist/checkbox.css +1 -0
- package/dist/checkbox.d.ts +35 -10
- package/dist/checkbox.js +40 -2
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +44 -37
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +93 -72
- package/dist/empty-state.css +1 -1
- package/dist/empty-state.js +48 -29
- package/dist/{getComponentSlots-DD4iju8N.mjs → getComponentSlots-DwAYUFNk.mjs} +1 -1
- package/dist/getDecorationStyle-BCBONKEl.mjs +7 -0
- package/dist/heading.js +31 -5
- package/dist/input.js +124 -86
- package/dist/isValidReactNode-CmYwTWCE.mjs +18 -0
- package/dist/menu.css +1 -1
- package/dist/menu.js +103 -46
- package/dist/pagination.js +60 -48
- package/dist/radio.css +1 -1
- package/dist/radio.js +98 -42
- package/dist/table.css +1 -1
- package/dist/table.js +74 -25
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +72 -30
- package/dist/text.js +48 -6
- package/dist/utils.d.ts +75 -2
- package/dist/utils.js +17 -14
- package/package.json +1 -1
- package/dist/Actions-CEIXfLKN.mjs +0 -26
- 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/Checkbox-Chfzm1Z9.mjs +0 -46
- package/dist/Checkbox.css +0 -1
- package/dist/Content-ru2X8iBx.mjs +0 -13
- package/dist/Content.css +0 -1
- 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-JbyvZy05.mjs +0 -66
- package/dist/Item.css +0 -1
- package/dist/Panel-Q06TIYep.mjs +0 -12
- package/dist/Provider-CBfZpO45.mjs +0 -12
- package/dist/Row-C-3TXoDz.mjs +0 -15
- package/dist/Row.css +0 -1
- package/dist/Tab-CR0KvVaA.mjs +0 -39
- package/dist/Tab.css +0 -1
- package/dist/Text-DiOqZt8E.mjs +0 -49
- package/dist/Title-aOeFD24v.mjs +0 -13
- 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 -44
- package/dist/context.js +0 -7
- package/dist/enums-BnuDYTua.mjs +0 -4
- package/dist/enums-CiPhZomh.mjs +0 -6
- package/dist/enums-DUZMBQDd.mjs +0 -7
- 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/isValidReactNode-D1buElhX.mjs +0 -17
- package/dist/item.d.ts +0 -16
- 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/useTabsContext-DdF09jQq.mjs +0 -11
- /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,26 @@
|
|
|
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
|
+
|
|
18
|
+
## [0.6.1] - 2026-06-10
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
- **build**: исправлен экспорт утилит (`getComponentSlots`, `filterValidChildren` и др.) — Pagination/utils/index.ts больше не перезаписывает entry point `utils` в конфиге сборки
|
|
23
|
+
|
|
3
24
|
## [0.6.0] - 2026-06-10
|
|
4
25
|
|
|
5
26
|
### ⚠ BREAKING CHANGES
|
package/dist/accordion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import O, { createContext as T, useContext as E, useState as g, useCallback as v } from "react";
|
|
3
|
-
import { i as y } from "./isValidReactNode-
|
|
3
|
+
import { i as y } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
4
4
|
import M from "clsx";
|
|
5
5
|
import { I as P } from "./Icon-DUCBChX2.mjs";
|
|
6
6
|
import './accordion.css';const f = T(null), S = () => E(f), N = "Accordion";
|
package/dist/breadcrumbs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import b from "clsx";
|
|
3
3
|
import E from "react";
|
|
4
|
-
import { i as k } from "./isValidReactNode-
|
|
4
|
+
import { i as k } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
5
5
|
import "lodash/camelCase";
|
|
6
6
|
import './breadcrumbs.css';const _ = "Breadcrumbs", I = "/";
|
|
7
7
|
var N = ((l) => (l.ITEM = `${_}.Item`, l))(N || {});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--checkbox-bg: var(--lui-color-background-primary);--checkbox-border: var(--lui-color-border-primary);--checkbox-checked-bg: var(--lui-color-background-brand);--checkbox-checked-border: var(--lui-color-background-brand);--checkbox-check-color: var(--lui-color-text-on-brand);--checkbox-disabled-bg: var(--lui-color-background-disabled);--checkbox-disabled-border: var(--lui-color-border-disabled);--checkbox-disabled-check: var(--lui-color-text-disabled);--checkbox-invalid-border: var(--lui-color-border-focus-error);--checkbox-radius: var(--lui-radius-1);--checkbox-gap-sm: var(--lui-space-1);--checkbox-gap-md: var(--lui-space-2)}._root_tw8jr_16{align-items:center;cursor:pointer;display:flex;position:relative;-webkit-user-select:none;user-select:none;width:100%}._root_tw8jr_16._disabled_tw8jr_24{cursor:not-allowed}._root_tw8jr_16._disabled_tw8jr_24 ._checkbox_tw8jr_27:before{background-color:var(--checkbox-disabled-bg);border-color:var(--checkbox-disabled-border)}._root_tw8jr_16._disabled_tw8jr_24 ._input_tw8jr_31:checked+._checkbox_tw8jr_27:after,._root_tw8jr_16._disabled_tw8jr_24._indeterminate_tw8jr_31 ._checkbox_tw8jr_27:after{background-color:var(--checkbox-disabled-check)}._root_tw8jr_16._invalid_tw8jr_34 ._checkbox_tw8jr_27:before{border-color:var(--checkbox-invalid-border)}._root_tw8jr_16._sizeSm_tw8jr_37{gap:var(--checkbox-gap-sm)}._root_tw8jr_16._sizeSm_tw8jr_37 ._checkbox_tw8jr_27{flex-basis:20px;height:20px;width:20px}._root_tw8jr_16._sizeSm_tw8jr_37 ._checkbox_tw8jr_27:after{height:12px;width:12px}._root_tw8jr_16._sizeSm_tw8jr_37 ._label_tw8jr_49{font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-medium);line-height:var(--line-height-sm)}._root_tw8jr_16._sizeMd_tw8jr_54{gap:var(--checkbox-gap-md)}._root_tw8jr_16._sizeMd_tw8jr_54 ._checkbox_tw8jr_27{flex-basis:24px;height:24px;width:24px}._root_tw8jr_16._sizeMd_tw8jr_54 ._checkbox_tw8jr_27:after{height:14px;width:14px}._root_tw8jr_16._sizeMd_tw8jr_54 ._label_tw8jr_49{font-size:var(--lui-font-size-md);font-weight:var(--lui-font-weight-medium);line-height:var(--line-height-md)}._root_tw8jr_16._sizeLg_tw8jr_71{gap:var(--checkbox-gap-md)}._root_tw8jr_16._sizeLg_tw8jr_71 ._checkbox_tw8jr_27{flex-basis:28px;height:28px;width:28px}._root_tw8jr_16._sizeLg_tw8jr_71 ._checkbox_tw8jr_27:after{height:16px;width:16px}._root_tw8jr_16._sizeLg_tw8jr_71 ._label_tw8jr_49{font-size:var(--lui-font-size-lg);font-weight:var(--lui-font-weight-medium);line-height:var(--line-height-lg)}._checkbox_tw8jr_27{flex-grow:0;flex-shrink:0;padding:2px;position:relative}._checkbox_tw8jr_27:after{background-color:var(--checkbox-bg);content:"";height:14px;inset:0;margin:auto;position:absolute;width:14px}._checkbox_tw8jr_27:before{background-color:var(--checkbox-bg);border:1px solid var(--checkbox-border);border-radius:var(--checkbox-radius);content:"";inset:2px;position:absolute}._input_tw8jr_31:checked+._checkbox_tw8jr_27:before,._indeterminate_tw8jr_31 ._checkbox_tw8jr_27:before{background-color:var(--checkbox-checked-bg);border-color:var(--checkbox-checked-border)}._input_tw8jr_31:checked+._checkbox_tw8jr_27:after{clip-path:path(evenodd,"M10.9593 2.79299C11.3498 2.40252 11.9828 2.40263 12.3734 2.79299C12.7639 3.18352 12.7639 3.81653 12.3734 4.20706L5.95735 10.624C5.56693 11.0145 4.93383 11.0142 4.54328 10.624L1.62629 7.70706L1.55793 7.63089C1.23758 7.23811 1.26018 6.65911 1.62629 6.29299C1.99241 5.92688 2.57141 5.90429 2.96418 6.22464L3.04035 6.29299L5.24934 8.50198L10.9593 2.79299Z")}._indeterminate_tw8jr_31 ._checkbox_tw8jr_27:after{clip-path:path(evenodd,"M11.0836 6L11.1852 6.00488C11.6896 6.05592 12.0836 6.4821 12.0836 7C12.0836 7.5179 11.6896 7.94408 11.1852 7.99512L11.0836 8H2.91666C2.36437 8 1.91666 7.55228 1.91666 7C1.91666 6.44772 2.36437 6 2.91666 6H11.0836Z")}._input_tw8jr_31{left:0;position:absolute;visibility:hidden}._label_tw8jr_49{color:var(--lui-color-text-secondary);display:block}
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,16 +1,41 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Checkbox component. Renders a native checkbox with a custom visual indicator, label, and support for indeterminate state.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <Checkbox>Accept terms</Checkbox>
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Checkbox indeterminate checked={false}>
|
|
14
|
+
* Select all
|
|
15
|
+
* </Checkbox>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const Checkbox: default_2.FC<default_2.PropsWithChildren<IProps>>;
|
|
4
19
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
checked: boolean;
|
|
10
|
-
/** Callback when checked state changes. */
|
|
11
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
12
|
-
/** Whether the item is disabled. */
|
|
13
|
-
disabled?: boolean;
|
|
20
|
+
declare enum ECheckboxSize {
|
|
21
|
+
SM = "sm",
|
|
22
|
+
MD = "md",
|
|
23
|
+
LG = "lg"
|
|
14
24
|
}
|
|
15
25
|
|
|
26
|
+
export declare interface IProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'size' | 'type' | 'onChange'> {
|
|
27
|
+
/** Ref to the native input element. */
|
|
28
|
+
ref?: default_2.Ref<HTMLInputElement>;
|
|
29
|
+
/** When true, the checkbox shows a dash instead of a checkmark. Useful for "select all" states. */
|
|
30
|
+
indeterminate?: boolean;
|
|
31
|
+
/** When true, the checkbox border turns red to indicate a validation error. */
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
/** Checkbox size: sm, md, lg. */
|
|
34
|
+
size?: TCheckboxSize;
|
|
35
|
+
/** Change handler, receives the new checked state. */
|
|
36
|
+
onChange?: (checked: boolean) => void;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare type TCheckboxSize = `${ECheckboxSize.SM | ECheckboxSize.MD | ECheckboxSize.LG}`;
|
|
40
|
+
|
|
16
41
|
export { }
|
package/dist/checkbox.js
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as u, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useCallback as h, useEffect as j } from "react";
|
|
3
|
+
import x from "clsx";
|
|
4
|
+
import { g as z } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
5
|
+
import './checkbox.css';const w = "Checkbox", g = "_root_tw8jr_16", k = "_disabled_tw8jr_24", C = "_checkbox_tw8jr_27", N = "_input_tw8jr_31", v = "_indeterminate_tw8jr_31", y = "_invalid_tw8jr_34", L = "_sizeSm_tw8jr_37", M = "_label_tw8jr_49", S = "_sizeMd_tw8jr_54", R = "_sizeLg_tw8jr_71", e = {
|
|
6
|
+
root: g,
|
|
7
|
+
disabled: k,
|
|
8
|
+
checkbox: C,
|
|
9
|
+
input: N,
|
|
10
|
+
indeterminate: v,
|
|
11
|
+
invalid: y,
|
|
12
|
+
sizeSm: L,
|
|
13
|
+
label: M,
|
|
14
|
+
sizeMd: S,
|
|
15
|
+
sizeLg: R
|
|
16
|
+
}, A = (o) => {
|
|
17
|
+
const { ref: t, children: r, indeterminate: n, invalid: l = !1, size: _ = "md", onChange: d, ...c } = o, i = p(null), m = h(
|
|
18
|
+
(s) => {
|
|
19
|
+
i.current = s, typeof t == "function" ? t(s) : t && (t.current = s);
|
|
20
|
+
},
|
|
21
|
+
[t]
|
|
22
|
+
);
|
|
23
|
+
j(() => {
|
|
24
|
+
i.current && (i.current.indeterminate = !!n);
|
|
25
|
+
}, [n]);
|
|
26
|
+
const b = x(e.root, z("size", _, e), {
|
|
27
|
+
[e.disabled]: c.disabled === !0,
|
|
28
|
+
[e.indeterminate]: n,
|
|
29
|
+
[e.invalid]: l
|
|
30
|
+
}), f = (s) => {
|
|
31
|
+
d?.(s.target.checked);
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ u("label", { className: b, children: [
|
|
34
|
+
/* @__PURE__ */ a("input", { ref: m, className: e.input, onChange: f, type: "checkbox", ...c }),
|
|
35
|
+
/* @__PURE__ */ a("span", { className: e.checkbox }),
|
|
36
|
+
r && /* @__PURE__ */ a("span", { className: e.label, children: r })
|
|
37
|
+
] });
|
|
38
|
+
};
|
|
39
|
+
A.displayName = w;
|
|
2
40
|
export {
|
|
3
|
-
|
|
41
|
+
A as Checkbox
|
|
4
42
|
};
|
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(--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,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { g as k } from "./getComponentSlots-DD4iju8N.mjs";
|
|
1
|
+
import { jsx as s, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as N, useMemo as A } from "react";
|
|
3
|
+
import E from "clsx";
|
|
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";
|
|
6
|
+
import { I as R } from "./Icon-DUCBChX2.mjs";
|
|
7
|
+
import { u as X } from "./useLocale-CJh-krrY.mjs";
|
|
8
|
+
import { g as k } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
10
9
|
import { g as w } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
11
|
-
import './dialog.css';
|
|
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
12
|
root: F
|
|
13
|
-
}, g = (
|
|
14
|
-
const { children:
|
|
15
|
-
return /* @__PURE__ */
|
|
13
|
+
}, g = (o) => {
|
|
14
|
+
const { children: t } = o;
|
|
15
|
+
return /* @__PURE__ */ s("div", { className: K.root, children: t });
|
|
16
16
|
};
|
|
17
|
-
g.displayName =
|
|
17
|
+
g.displayName = e.ACTIONS;
|
|
18
18
|
const U = "_root_jagsa_1", V = {
|
|
19
19
|
root: U
|
|
20
|
-
},
|
|
21
|
-
const { children:
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
}, u = (o) => {
|
|
21
|
+
const { children: t } = o;
|
|
22
|
+
return /* @__PURE__ */ s("div", { className: V.root, children: t });
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
const Y = "Dialog", q = [
|
|
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
26
|
underlay: B,
|
|
27
27
|
modal: G,
|
|
28
28
|
dialog: H,
|
|
@@ -33,35 +33,42 @@ const Y = "Dialog", q = [s.ACTIONS, s.CONTENT, s.TITLE], B = "_underlay_100vj_25
|
|
|
33
33
|
header: oo,
|
|
34
34
|
close: so,
|
|
35
35
|
actions: eo
|
|
36
|
-
},
|
|
37
|
-
const { children:
|
|
38
|
-
{ isDismissable: !
|
|
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 },
|
|
39
39
|
c,
|
|
40
40
|
n
|
|
41
41
|
), {
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
} =
|
|
46
|
-
|
|
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();
|
|
47
47
|
};
|
|
48
48
|
if (!i)
|
|
49
49
|
return null;
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ _("div", { className:
|
|
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
53
|
j,
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ s("button", { "aria-label": y.Dialog.close, className: a.close, onClick: I, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
|
|
55
55
|
] }),
|
|
56
|
-
m && /* @__PURE__ */
|
|
57
|
-
d && /* @__PURE__ */
|
|
56
|
+
m && /* @__PURE__ */ s("div", { children: m }),
|
|
57
|
+
d && /* @__PURE__ */ s("div", { className: a.actions, children: d })
|
|
58
58
|
] }) }) }) }) });
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
const
|
|
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;
|
|
62
69
|
l.Actions = g;
|
|
63
|
-
l.Content =
|
|
64
|
-
l.Title =
|
|
70
|
+
l.Content = u;
|
|
71
|
+
l.Title = v;
|
|
65
72
|
export {
|
|
66
73
|
l as Dialog,
|
|
67
74
|
l as default
|
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/empty-state.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._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}
|
|
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.js
CHANGED
|
@@ -1,34 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { jsx as e, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import S, { cloneElement as T } from "react";
|
|
3
|
+
import { i as f } from "./isValidReactNode-CmYwTWCE.mjs";
|
|
4
|
+
import "lodash/camelCase";
|
|
5
|
+
import A from "clsx";
|
|
6
|
+
import { I as x } from "./Icon-DUCBChX2.mjs";
|
|
7
|
+
import { g as u } from "./getComponentSlots-DwAYUFNk.mjs";
|
|
8
|
+
import './empty-state.css';const l = "EmptyState";
|
|
9
|
+
var o = ((t) => (t.ACTIONS = `${l}.Actions`, t.CONTENT = `${l}.Content`, t))(o || {});
|
|
10
|
+
const v = "_actions_dl9xv_1", E = {
|
|
11
|
+
actions: v
|
|
12
|
+
}, p = ({ children: t }) => {
|
|
13
|
+
const s = S.Children.toArray(t), i = s.map((n, c) => {
|
|
14
|
+
if (!f("Button", n))
|
|
15
|
+
return n;
|
|
16
|
+
const r = n.props.variant;
|
|
17
|
+
return T(n, {
|
|
18
|
+
key: c,
|
|
19
|
+
...r ? {} : { variant: r ?? (c === 0 ? "primary" : "secondary") }
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
return s.length === 0 ? null : /* @__PURE__ */ e("div", { className: E.actions, children: i });
|
|
11
23
|
};
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
p.displayName = o.ACTIONS;
|
|
25
|
+
const O = "_content_laixm_1", h = {
|
|
26
|
+
content: O
|
|
27
|
+
}, d = (t) => {
|
|
28
|
+
const { children: s } = t;
|
|
29
|
+
return /* @__PURE__ */ e("div", { className: h.content, children: s });
|
|
30
|
+
};
|
|
31
|
+
d.displayName = o.CONTENT;
|
|
32
|
+
const I = "_root_1fqx3_5", g = "_icon_1fqx3_14", q = "_title_1fqx3_20", $ = "_description_1fqx3_28", a = {
|
|
33
|
+
root: I,
|
|
34
|
+
icon: g,
|
|
35
|
+
title: q,
|
|
36
|
+
description: $
|
|
37
|
+
}, L = [o.ACTIONS, o.CONTENT], N = (t) => {
|
|
38
|
+
const { children: s, description: i, icon: n, title: c } = t, r = A(a.root), { [o.ACTIONS]: m, [o.CONTENT]: y } = u(s, L);
|
|
39
|
+
return /* @__PURE__ */ C("div", { className: r, children: [
|
|
40
|
+
n && /* @__PURE__ */ e("div", { className: a.icon, children: /* @__PURE__ */ e(x, { name: n, size: 48 }) }),
|
|
41
|
+
c && /* @__PURE__ */ e("h3", { className: a.title, children: c }),
|
|
42
|
+
i && /* @__PURE__ */ e("p", { className: a.description, children: i }),
|
|
43
|
+
y,
|
|
44
|
+
m
|
|
26
45
|
] });
|
|
27
46
|
};
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
N.displayName = l;
|
|
48
|
+
const _ = N;
|
|
49
|
+
_.Actions = p;
|
|
50
|
+
_.Content = d;
|
|
32
51
|
export {
|
|
33
|
-
|
|
52
|
+
_ as EmptyState
|
|
34
53
|
};
|