@lazar-ui/kit 0.5.2 → 0.6.0
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 +18 -0
- package/dist/Actions-CEIXfLKN.mjs +26 -0
- package/dist/Actions.css +1 -0
- package/dist/ActiveFilters-BJojmc-d.mjs +29 -0
- package/dist/ActiveFilters.css +1 -0
- package/dist/Button-BN85EtaZ.mjs +52 -0
- package/dist/Button.css +1 -1
- package/dist/Cell-BPBvEyeL.mjs +21 -0
- package/dist/Cell.css +1 -0
- package/dist/Checkbox-Chfzm1Z9.mjs +46 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Content-ru2X8iBx.mjs +13 -0
- package/dist/Content.css +1 -0
- package/dist/Group-DyDpeqOP.mjs +16 -0
- package/dist/Group.css +1 -0
- package/dist/Header-Clhgyr0J.mjs +29 -0
- package/dist/Header.css +1 -0
- package/dist/Heading-CL47Fqe7.mjs +30 -0
- package/dist/Heading.css +1 -0
- package/dist/InputBase-BHZWQT9-.mjs +46 -0
- package/dist/Item-JbyvZy05.mjs +66 -0
- package/dist/Item.css +1 -0
- package/dist/Panel-Q06TIYep.mjs +12 -0
- package/dist/Provider-CBfZpO45.mjs +12 -0
- package/dist/Row-C-3TXoDz.mjs +15 -0
- package/dist/Row.css +1 -0
- package/dist/Tab-CR0KvVaA.mjs +39 -0
- package/dist/Tab.css +1 -0
- package/dist/Text-DiOqZt8E.mjs +49 -0
- package/dist/Text.css +1 -0
- package/dist/Title-aOeFD24v.mjs +13 -0
- package/dist/Title.css +1 -0
- package/dist/Toolbar-BJQy4qFI.mjs +11 -0
- package/dist/Toolbar.css +1 -0
- package/dist/Trigger-C_4De6l1.mjs +11 -0
- package/dist/accordion.js +1 -1
- package/dist/actions.d.ts +13 -0
- package/dist/actions.js +4 -0
- package/dist/active-filters.d.ts +35 -0
- package/dist/active-filters.js +4 -0
- package/dist/breadcrumbs.js +1 -1
- package/dist/button.js +1 -1
- package/dist/cell.d.ts +20 -0
- package/dist/cell.js +4 -0
- package/dist/checkbox.d.ts +10 -35
- package/dist/checkbox.js +2 -40
- package/dist/content.d.ts +8 -0
- package/dist/content.js +4 -0
- package/dist/context.d.ts +44 -0
- package/dist/context.js +7 -0
- package/dist/dialog.css +1 -1
- package/dist/dialog.js +37 -44
- package/dist/drawer.css +1 -1
- package/dist/drawer.js +72 -93
- package/dist/empty-state.css +1 -1
- package/dist/empty-state.js +29 -48
- package/dist/enums-BnuDYTua.mjs +4 -0
- package/dist/enums-CiPhZomh.mjs +6 -0
- package/dist/enums-DUZMBQDd.mjs +7 -0
- package/dist/{getComponentSlots-DwAYUFNk.mjs → getComponentSlots-DD4iju8N.mjs} +1 -1
- package/dist/group.d.ts +12 -0
- package/dist/group.js +4 -0
- package/dist/header.d.ts +21 -0
- package/dist/header.js +4 -0
- package/dist/heading.d.ts +55 -0
- package/dist/heading.js +7 -0
- package/dist/input-base.d.ts +29 -0
- package/dist/input-base.js +4 -0
- package/dist/input.js +86 -124
- package/dist/isValidReactNode-D1buElhX.mjs +17 -0
- package/dist/item.d.ts +16 -0
- package/dist/item.js +4 -0
- package/dist/menu.css +1 -1
- package/dist/menu.js +46 -103
- package/dist/pagination.js +48 -60
- package/dist/panel.d.ts +9 -0
- package/dist/panel.js +4 -0
- package/dist/radio.css +1 -1
- package/dist/radio.js +42 -98
- package/dist/row.d.ts +12 -0
- package/dist/row.js +4 -0
- package/dist/tab.d.ts +30 -0
- package/dist/tab.js +4 -0
- package/dist/table.css +1 -1
- package/dist/table.js +25 -74
- package/dist/tabs.css +1 -1
- package/dist/tabs.js +30 -72
- package/dist/text.d.ts +74 -0
- package/dist/text.js +8 -0
- package/dist/title.d.ts +8 -0
- package/dist/title.js +4 -0
- package/dist/toolbar.d.ts +20 -0
- package/dist/toolbar.js +4 -0
- package/dist/trigger.d.ts +8 -0
- package/dist/trigger.js +4 -0
- package/dist/typography.d.ts +90 -40
- package/dist/typography.js +4 -38
- package/dist/useTabsContext-DdF09jQq.mjs +11 -0
- package/dist/utils.d.ts +2 -55
- package/dist/utils.js +14 -15
- package/package.json +1 -1
- package/dist/Button-jq8mFP6t.mjs +0 -52
- package/dist/checkbox.css +0 -1
- package/dist/isValidReactNode-CmYwTWCE.mjs +0 -18
- package/dist/typography.css +0 -1
- /package/dist/{input.css → InputBase.css} +0 -0
package/dist/Title.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._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%}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import './Toolbar.css';const r = "Table.Toolbar", a = "_root_d4szt_6", c = {
|
|
3
|
+
root: a
|
|
4
|
+
}, e = (o) => {
|
|
5
|
+
const { children: t } = o;
|
|
6
|
+
return /* @__PURE__ */ s("div", { className: c.root, children: t });
|
|
7
|
+
};
|
|
8
|
+
e.displayName = r;
|
|
9
|
+
export {
|
|
10
|
+
e as T
|
|
11
|
+
};
|
package/dist/Toolbar.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--toolbar-gap: var(--lui-space-3);--toolbar-padding: var(--lui-space-3) 0}._root_d4szt_6{align-items:center;display:flex;gap:var(--toolbar-gap);padding:var(--toolbar-padding)}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { usePopoverContext as a } from "./popover.js";
|
|
3
|
+
import { E as n } from "./enums-DUZMBQDd.mjs";
|
|
4
|
+
const s = (e) => {
|
|
5
|
+
const { children: o } = e, { triggerRef: t, state: r } = a();
|
|
6
|
+
return /* @__PURE__ */ p("span", { "aria-expanded": r.isOpen, "aria-haspopup": "true", onClick: () => r.toggle(), ref: t, children: o });
|
|
7
|
+
};
|
|
8
|
+
s.displayName = n.TRIGGER;
|
|
9
|
+
export {
|
|
10
|
+
s as T
|
|
11
|
+
};
|
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-D1buElhX.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";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Wrapper for action buttons inside EmptyState.
|
|
5
|
+
* Accepts only `<Button>` components as children.
|
|
6
|
+
* Auto-assigns variant based on position:
|
|
7
|
+
* - first child → `primary`
|
|
8
|
+
* - subsequent children → `secondary`
|
|
9
|
+
* unless the Button already has an explicit `variant` prop.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Actions: default_2.FC<default_2.PropsWithChildren>;
|
|
12
|
+
|
|
13
|
+
export { }
|
package/dist/actions.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Table.ActiveFilters — displays active filter chips with individual remove buttons
|
|
5
|
+
* and an optional "Clear all" button.
|
|
6
|
+
*
|
|
7
|
+
* Returns `null` when there are no active filters.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <Table.ActiveFilters
|
|
12
|
+
* filters={[
|
|
13
|
+
* { key: 'status', label: 'Status', value: 'Active' },
|
|
14
|
+
* { key: 'role', label: 'Role', value: 'Admin' },
|
|
15
|
+
* ]}
|
|
16
|
+
* onRemove={(key) => console.log('remove', key)}
|
|
17
|
+
* onClearAll={() => console.log('clear all')}
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const ActiveFilters: default_2.FC<IActiveFiltersProps>;
|
|
22
|
+
|
|
23
|
+
export declare interface IActiveFiltersProps {
|
|
24
|
+
filters: IFilterItem[];
|
|
25
|
+
onRemove: (key: string) => void;
|
|
26
|
+
onClearAll?: () => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface IFilterItem {
|
|
30
|
+
key: string;
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { }
|
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-D1buElhX.mjs";
|
|
5
5
|
import "lodash/camelCase";
|
|
6
6
|
import './breadcrumbs.css';const _ = "Breadcrumbs", I = "/";
|
|
7
7
|
var N = ((l) => (l.ITEM = `${_}.Item`, l))(N || {});
|
package/dist/button.js
CHANGED
package/dist/cell.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Table cell. Must be used as a child of `<Table.Row>`.
|
|
5
|
+
* Supports text alignment and header styling via `as="th"`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const Cell: default_2.FC<IProps>;
|
|
8
|
+
|
|
9
|
+
declare interface IProps extends default_2.PropsWithChildren {
|
|
10
|
+
/** Text alignment. */
|
|
11
|
+
align?: 'left' | 'center' | 'right';
|
|
12
|
+
/** HTML tag: `'td'` (default) or `'th'`. */
|
|
13
|
+
as?: 'td' | 'th';
|
|
14
|
+
/** Tooltip text (native `title` attribute). */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Cell width. */
|
|
17
|
+
width?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { }
|
package/dist/cell.js
ADDED
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,41 +1,16 @@
|
|
|
1
1
|
import { default as default_2 } from 'react';
|
|
2
2
|
|
|
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>>;
|
|
3
|
+
export declare const Checkbox: default_2.FC<IProps>;
|
|
19
4
|
|
|
20
|
-
declare
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
export declare interface IProps {
|
|
6
|
+
/** Children (item label). */
|
|
7
|
+
children: default_2.ReactNode;
|
|
8
|
+
/** Whether the item is checked. */
|
|
9
|
+
checked: boolean;
|
|
10
|
+
/** Callback when checked state changes. */
|
|
11
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
12
|
+
/** Whether the item is disabled. */
|
|
13
|
+
disabled?: boolean;
|
|
24
14
|
}
|
|
25
15
|
|
|
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
|
-
|
|
41
16
|
export { }
|
package/dist/checkbox.js
CHANGED
|
@@ -1,42 +1,4 @@
|
|
|
1
|
-
import {
|
|
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;
|
|
1
|
+
import { C as r } from "./Checkbox-Chfzm1Z9.mjs";
|
|
40
2
|
export {
|
|
41
|
-
|
|
3
|
+
r as Checkbox
|
|
42
4
|
};
|
package/dist/content.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Context as Context_2 } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
|
|
4
|
+
export declare const Context: Context_2<IContext | null>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enumerates the variants of a Tabs component.
|
|
8
|
+
*/
|
|
9
|
+
declare enum ETabsVariant {
|
|
10
|
+
/** Tabs are displayed as toggle buttons. */
|
|
11
|
+
BUTTONS = "buttons",
|
|
12
|
+
/** Default display of Tabs. */
|
|
13
|
+
DEFAULT = "default"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Tabs Context.
|
|
18
|
+
*/
|
|
19
|
+
declare interface IContext {
|
|
20
|
+
/** Index of current active tab. */
|
|
21
|
+
activeIndex: number;
|
|
22
|
+
/** Base ID for generating IDs for ARIA. */
|
|
23
|
+
baseId: string;
|
|
24
|
+
/** Active tab change handler. */
|
|
25
|
+
setActiveTab: (index: number) => void;
|
|
26
|
+
/** Get panel ID. */
|
|
27
|
+
getPanelId: (index: number) => string;
|
|
28
|
+
/** Get tab ID. */
|
|
29
|
+
getTabId: (index: number) => string;
|
|
30
|
+
/** Variant. */
|
|
31
|
+
variant: ETabsVariant;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare interface IProps extends default_2.PropsWithChildren {
|
|
35
|
+
defaultActiveIndex?: number;
|
|
36
|
+
onTabChange?: (index: number) => void;
|
|
37
|
+
variant: ETabsVariant;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export declare const Provider: default_2.FC<IProps>;
|
|
41
|
+
|
|
42
|
+
export declare const useTabsContext: () => IContext;
|
|
43
|
+
|
|
44
|
+
export { }
|
package/dist/context.js
ADDED
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)}
|
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 {
|
|
1
|
+
import { jsx as o, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { E as s, T as I } from "./Title-aOeFD24v.mjs";
|
|
3
|
+
import { useRef as u, useMemo as L } from "react";
|
|
4
|
+
import A from "clsx";
|
|
5
|
+
import { useDialog as b, useModalOverlay as x, Overlay as M, UNSAFE_PortalProvider as P } from "react-aria";
|
|
6
|
+
import { useOverlayTriggerState as R } from "react-stately";
|
|
7
|
+
import { I as X } from "./Icon-DUCBChX2.mjs";
|
|
8
|
+
import { u as $ } from "./useLocale-CJh-krrY.mjs";
|
|
9
|
+
import { g as k } from "./getComponentSlots-DD4iju8N.mjs";
|
|
9
10
|
import { g as w } from "./getVariantClassName-DoCNtwBw.mjs";
|
|
10
|
-
import './dialog.css';
|
|
11
|
-
const F = "_root_1fxwu_1", K = {
|
|
11
|
+
import './dialog.css';const F = "_root_1fxwu_1", K = {
|
|
12
12
|
root: F
|
|
13
|
-
}, g = (
|
|
14
|
-
const { children:
|
|
15
|
-
return /* @__PURE__ */
|
|
13
|
+
}, g = (t) => {
|
|
14
|
+
const { children: a } = t;
|
|
15
|
+
return /* @__PURE__ */ o("div", { className: K.root, children: a });
|
|
16
16
|
};
|
|
17
|
-
g.displayName =
|
|
17
|
+
g.displayName = s.ACTIONS;
|
|
18
18
|
const U = "_root_jagsa_1", V = {
|
|
19
19
|
root: U
|
|
20
|
-
},
|
|
21
|
-
const { children:
|
|
22
|
-
return /* @__PURE__ */
|
|
20
|
+
}, p = (t) => {
|
|
21
|
+
const { children: a } = t;
|
|
22
|
+
return /* @__PURE__ */ o("div", { className: V.root, children: a });
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
const Y = "Dialog", q = [
|
|
24
|
+
p.displayName = s.CONTENT;
|
|
25
|
+
const Y = "Dialog", q = [s.ACTIONS, s.CONTENT, s.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", e = {
|
|
26
26
|
underlay: B,
|
|
27
27
|
modal: G,
|
|
28
28
|
dialog: H,
|
|
@@ -33,42 +33,35 @@ const Y = "Dialog", q = [e.ACTIONS, e.CONTENT, e.TITLE], B = "_underlay_100vj_25
|
|
|
33
33
|
header: oo,
|
|
34
34
|
close: so,
|
|
35
35
|
actions: eo
|
|
36
|
-
},
|
|
37
|
-
const { children:
|
|
38
|
-
{ isDismissable: !
|
|
36
|
+
}, N = (t) => {
|
|
37
|
+
const { children: a, container: v, open: i, modal: f = !0, onOpenChange: C, size: T = "md" } = t, h = $(), r = u(null), n = u(null), { dialogProps: y } = b(t, r), c = R({ isOpen: i, onOpenChange: C }), { modalProps: z, underlayProps: S } = x(
|
|
38
|
+
{ isDismissable: !f, isKeyboardDismissDisabled: !1 },
|
|
39
39
|
c,
|
|
40
40
|
n
|
|
41
41
|
), {
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
} =
|
|
46
|
-
|
|
42
|
+
[s.ACTIONS]: d,
|
|
43
|
+
[s.CONTENT]: m,
|
|
44
|
+
[s.TITLE]: j
|
|
45
|
+
} = L(() => k(a, q), [a]), O = (E) => {
|
|
46
|
+
E.preventDefault(), c.close();
|
|
47
47
|
};
|
|
48
48
|
if (!i)
|
|
49
49
|
return null;
|
|
50
|
-
const
|
|
51
|
-
return /* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */ _("div", { className:
|
|
50
|
+
const D = A(e.dialog, w("size", T, e));
|
|
51
|
+
return /* @__PURE__ */ o(M, { portalContainer: v, children: /* @__PURE__ */ o("div", { className: e.underlay, ...S, children: /* @__PURE__ */ o("div", { className: e.modal, ...z, ref: n, children: /* @__PURE__ */ o(P, { getContainer: () => n.current, children: /* @__PURE__ */ _("div", { className: D, ...y, ref: r, children: [
|
|
52
|
+
/* @__PURE__ */ _("div", { className: e.header, children: [
|
|
53
53
|
j,
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ o("button", { "aria-label": h.Dialog.close, className: e.close, onClick: O, children: /* @__PURE__ */ o(X, { name: "x", size: 16 }) })
|
|
55
55
|
] }),
|
|
56
|
-
m && /* @__PURE__ */
|
|
57
|
-
d && /* @__PURE__ */
|
|
56
|
+
m && /* @__PURE__ */ o("div", { children: m }),
|
|
57
|
+
d && /* @__PURE__ */ o("div", { className: e.actions, children: d })
|
|
58
58
|
] }) }) }) }) });
|
|
59
59
|
};
|
|
60
|
-
|
|
61
|
-
const
|
|
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;
|
|
60
|
+
N.displayName = Y;
|
|
61
|
+
const l = N;
|
|
69
62
|
l.Actions = g;
|
|
70
|
-
l.Content =
|
|
71
|
-
l.Title =
|
|
63
|
+
l.Content = p;
|
|
64
|
+
l.Title = I;
|
|
72
65
|
export {
|
|
73
66
|
l as Dialog,
|
|
74
67
|
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}
|