@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.
Files changed (106) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Actions-CEIXfLKN.mjs +26 -0
  3. package/dist/Actions.css +1 -0
  4. package/dist/ActiveFilters-BJojmc-d.mjs +29 -0
  5. package/dist/ActiveFilters.css +1 -0
  6. package/dist/Button-BN85EtaZ.mjs +52 -0
  7. package/dist/Button.css +1 -1
  8. package/dist/Cell-BPBvEyeL.mjs +21 -0
  9. package/dist/Cell.css +1 -0
  10. package/dist/Checkbox-Chfzm1Z9.mjs +46 -0
  11. package/dist/Checkbox.css +1 -0
  12. package/dist/Content-ru2X8iBx.mjs +13 -0
  13. package/dist/Content.css +1 -0
  14. package/dist/Group-DyDpeqOP.mjs +16 -0
  15. package/dist/Group.css +1 -0
  16. package/dist/Header-Clhgyr0J.mjs +29 -0
  17. package/dist/Header.css +1 -0
  18. package/dist/Heading-CL47Fqe7.mjs +30 -0
  19. package/dist/Heading.css +1 -0
  20. package/dist/InputBase-BHZWQT9-.mjs +46 -0
  21. package/dist/Item-JbyvZy05.mjs +66 -0
  22. package/dist/Item.css +1 -0
  23. package/dist/Panel-Q06TIYep.mjs +12 -0
  24. package/dist/Provider-CBfZpO45.mjs +12 -0
  25. package/dist/Row-C-3TXoDz.mjs +15 -0
  26. package/dist/Row.css +1 -0
  27. package/dist/Tab-CR0KvVaA.mjs +39 -0
  28. package/dist/Tab.css +1 -0
  29. package/dist/Text-DiOqZt8E.mjs +49 -0
  30. package/dist/Text.css +1 -0
  31. package/dist/Title-aOeFD24v.mjs +13 -0
  32. package/dist/Title.css +1 -0
  33. package/dist/Toolbar-BJQy4qFI.mjs +11 -0
  34. package/dist/Toolbar.css +1 -0
  35. package/dist/Trigger-C_4De6l1.mjs +11 -0
  36. package/dist/accordion.js +1 -1
  37. package/dist/actions.d.ts +13 -0
  38. package/dist/actions.js +4 -0
  39. package/dist/active-filters.d.ts +35 -0
  40. package/dist/active-filters.js +4 -0
  41. package/dist/breadcrumbs.js +1 -1
  42. package/dist/button.js +1 -1
  43. package/dist/cell.d.ts +20 -0
  44. package/dist/cell.js +4 -0
  45. package/dist/checkbox.d.ts +10 -35
  46. package/dist/checkbox.js +2 -40
  47. package/dist/content.d.ts +8 -0
  48. package/dist/content.js +4 -0
  49. package/dist/context.d.ts +44 -0
  50. package/dist/context.js +7 -0
  51. package/dist/dialog.css +1 -1
  52. package/dist/dialog.js +37 -44
  53. package/dist/drawer.css +1 -1
  54. package/dist/drawer.js +72 -93
  55. package/dist/empty-state.css +1 -1
  56. package/dist/empty-state.js +29 -48
  57. package/dist/enums-BnuDYTua.mjs +4 -0
  58. package/dist/enums-CiPhZomh.mjs +6 -0
  59. package/dist/enums-DUZMBQDd.mjs +7 -0
  60. package/dist/{getComponentSlots-DwAYUFNk.mjs → getComponentSlots-DD4iju8N.mjs} +1 -1
  61. package/dist/group.d.ts +12 -0
  62. package/dist/group.js +4 -0
  63. package/dist/header.d.ts +21 -0
  64. package/dist/header.js +4 -0
  65. package/dist/heading.d.ts +55 -0
  66. package/dist/heading.js +7 -0
  67. package/dist/input-base.d.ts +29 -0
  68. package/dist/input-base.js +4 -0
  69. package/dist/input.js +86 -124
  70. package/dist/isValidReactNode-D1buElhX.mjs +17 -0
  71. package/dist/item.d.ts +16 -0
  72. package/dist/item.js +4 -0
  73. package/dist/menu.css +1 -1
  74. package/dist/menu.js +46 -103
  75. package/dist/pagination.js +48 -60
  76. package/dist/panel.d.ts +9 -0
  77. package/dist/panel.js +4 -0
  78. package/dist/radio.css +1 -1
  79. package/dist/radio.js +42 -98
  80. package/dist/row.d.ts +12 -0
  81. package/dist/row.js +4 -0
  82. package/dist/tab.d.ts +30 -0
  83. package/dist/tab.js +4 -0
  84. package/dist/table.css +1 -1
  85. package/dist/table.js +25 -74
  86. package/dist/tabs.css +1 -1
  87. package/dist/tabs.js +30 -72
  88. package/dist/text.d.ts +74 -0
  89. package/dist/text.js +8 -0
  90. package/dist/title.d.ts +8 -0
  91. package/dist/title.js +4 -0
  92. package/dist/toolbar.d.ts +20 -0
  93. package/dist/toolbar.js +4 -0
  94. package/dist/trigger.d.ts +8 -0
  95. package/dist/trigger.js +4 -0
  96. package/dist/typography.d.ts +90 -40
  97. package/dist/typography.js +4 -38
  98. package/dist/useTabsContext-DdF09jQq.mjs +11 -0
  99. package/dist/utils.d.ts +2 -55
  100. package/dist/utils.js +14 -15
  101. package/package.json +1 -1
  102. package/dist/Button-jq8mFP6t.mjs +0 -52
  103. package/dist/checkbox.css +0 -1
  104. package/dist/isValidReactNode-CmYwTWCE.mjs +0 -18
  105. package/dist/typography.css +0 -1
  106. /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
+ };
@@ -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-CmYwTWCE.mjs";
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 { }
@@ -0,0 +1,4 @@
1
+ import { A as s } from "./Actions-CEIXfLKN.mjs";
2
+ export {
3
+ s as Actions
4
+ };
@@ -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 { }
@@ -0,0 +1,4 @@
1
+ import { A as t } from "./ActiveFilters-BJojmc-d.mjs";
2
+ export {
3
+ t as ActiveFilters
4
+ };
@@ -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-CmYwTWCE.mjs";
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
@@ -1,4 +1,4 @@
1
- import { B as r } from "./Button-jq8mFP6t.mjs";
1
+ import { B as r } from "./Button-BN85EtaZ.mjs";
2
2
  export {
3
3
  r as Button
4
4
  };
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
@@ -0,0 +1,4 @@
1
+ import { C as o } from "./Cell-BPBvEyeL.mjs";
2
+ export {
3
+ o as Cell
4
+ };
@@ -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 enum ECheckboxSize {
21
- SM = "sm",
22
- MD = "md",
23
- LG = "lg"
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 { 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;
1
+ import { C as r } from "./Checkbox-Chfzm1Z9.mjs";
40
2
  export {
41
- A as Checkbox
3
+ r as Checkbox
42
4
  };
@@ -0,0 +1,8 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Content: default_2.FC<IProps>;
4
+
5
+ export declare interface IProps extends default_2.PropsWithChildren {
6
+ }
7
+
8
+ export { }
@@ -0,0 +1,4 @@
1
+ import { C as e } from "./Content-ru2X8iBx.mjs";
2
+ export {
3
+ e as Content
4
+ };
@@ -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 { }
@@ -0,0 +1,7 @@
1
+ import { C as r, u as t } from "./useTabsContext-DdF09jQq.mjs";
2
+ import { P as a } from "./Provider-CBfZpO45.mjs";
3
+ export {
4
+ r as Context,
5
+ a as Provider,
6
+ t as useTabsContext
7
+ };
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)}._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%}
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 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";
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';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 = {
11
+ import './dialog.css';const F = "_root_1fxwu_1", K = {
12
12
  root: F
13
- }, g = (o) => {
14
- const { children: t } = o;
15
- return /* @__PURE__ */ s("div", { className: K.root, children: t });
13
+ }, g = (t) => {
14
+ const { children: a } = t;
15
+ return /* @__PURE__ */ o("div", { className: K.root, children: a });
16
16
  };
17
- g.displayName = e.ACTIONS;
17
+ g.displayName = s.ACTIONS;
18
18
  const U = "_root_jagsa_1", V = {
19
19
  root: U
20
- }, u = (o) => {
21
- const { children: t } = o;
22
- return /* @__PURE__ */ s("div", { className: V.root, children: t });
20
+ }, p = (t) => {
21
+ const { children: a } = t;
22
+ return /* @__PURE__ */ o("div", { className: V.root, children: a });
23
23
  };
24
- u.displayName = e.CONTENT;
25
- const Y = "Dialog", q = [e.ACTIONS, e.CONTENT, e.TITLE], B = "_underlay_100vj_25", G = "_modal_100vj_34", H = "_dialog_100vj_41", J = "_sizeXs_100vj_51", Q = "_sizeSm_100vj_54", W = "_sizeMd_100vj_57", Z = "_sizeLg_100vj_60", oo = "_header_100vj_64", so = "_close_100vj_71", eo = "_actions_100vj_79", a = {
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
- }, 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 },
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
- [e.ACTIONS]: d,
43
- [e.CONTENT]: m,
44
- [e.TITLE]: j
45
- } = A(() => k(t, q), [t]), I = (L) => {
46
- L.preventDefault(), c.close();
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 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: [
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__ */ s("button", { "aria-label": y.Dialog.close, className: a.close, onClick: I, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
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__ */ s("div", { children: m }),
57
- d && /* @__PURE__ */ s("div", { className: a.actions, children: d })
56
+ m && /* @__PURE__ */ o("div", { children: m }),
57
+ d && /* @__PURE__ */ o("div", { className: e.actions, children: d })
58
58
  ] }) }) }) }) });
59
59
  };
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;
60
+ N.displayName = Y;
61
+ const l = N;
69
62
  l.Actions = g;
70
- l.Content = u;
71
- l.Title = v;
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}: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%)}
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}