@lazar-ui/kit 0.3.0 → 0.5.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 CHANGED
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0] - 2026-06-08
4
+
5
+ ### Features
6
+
7
+ - **Chip**: add new Chip component with multiple variants, sizes, and deletable state
8
+ - **Input.Date**: add Date variant for Input component with `inputMode="numeric"` and date validation
9
+ - **Table.ActiveFilters**: add ActiveFilters sub-component for displaying and clearing active column filters
10
+ - **Table.Toolbar**: add Toolbar sub-component for Table with action slots
11
+ - **i18n**: restructure locale system for better extensibility and component-scoped translations
12
+
13
+ ### Bug Fixes
14
+
15
+ - **CI**: fix vitest processes hang and excessive RAM consumption (4GB) by setting `NODE_OPTIONS="--max-old-space-size=8192"` in CI config
16
+
17
+ ### Chores
18
+
19
+ - **CI**: run TSM once instead of per package to speed up type declaration generation
20
+ - **styles**: apply prettier fixes across the codebase
21
+
22
+ ## [0.4.0] - 2026-06-05
23
+
24
+ ### ⚠ BREAKING CHANGES
25
+
26
+ - **Radio**: refactored from standalone component + `RadioGroup` into single compound component `Radio` + `Radio.Item`. Old `RadioGroup` removed. Use `<Radio name="..." value/ defaultValue onChange><Radio.Item value="...">Label</Radio.Item></Radio>`.
27
+
28
+ ### Features
29
+
30
+ - **Radio**: add compound component pattern (`Radio` + `Radio.Item`) with context-driven state management
31
+ - **Radio**: restructure Context — extract `Provider.tsx`, add `useRadioContext` hook with guard (aligned with Tabs pattern)
32
+ - **Radio**: add `useId()` fallback for `name` prop to prevent cross-story conflicts in Storybook autodocs
33
+
34
+ ### Bug Fixes
35
+
36
+ - **Radio**: fix checked state — handle `undefined` vs `false` for uncontrolled mode
37
+ - **Radio**: fix double opacity on disabled state
38
+ - **Radio**: add CSS custom properties (`--radio-content-gap`, `--radio-content-padding-top`) replacing hardcoded px values
39
+
40
+ ### Documentation
41
+
42
+ - **Radio**: add ADR for fieldset/legend/aria composability pattern (`docs/decisions/radio-fieldset-legend-aria.md`)
43
+
44
+ ### Code Refactoring
45
+
46
+ - **Radio**: rename `error` prop to `invalid` for consistency with other form components
47
+ - **Radio**: rename `TStory` type alias to `Story` in stories
48
+
49
+ ### Tests
50
+
51
+ - **Radio**: rewrite test suite for compound API (13 tests); remove `RadioGroup.test.tsx`
52
+ - **Radio**: fix test assertions — use `aria-invalid` attribute instead of raw CSS class name
53
+
54
+ ### Chores
55
+
56
+ - **Radio**: add missing exports (`IItemProps`, `ERadioSize`) to public API
57
+ - **Radio**: update VISION.md, ROADMAP.md, test-coverage.json
58
+ - **CI**: add `NODE_OPTIONS="--max-old-space-size=8192"` to build step to prevent OOM with `vite-plugin-dts`
59
+
3
60
  ## [0.3.0] - 2026-06-04
4
61
 
5
62
  ### Features
@@ -0,0 +1,52 @@
1
+ import { jsxs as z, jsx as s } from "react/jsx-runtime";
2
+ import v from "clsx";
3
+ import { I as y } from "./Icon-DsTlU3j3.mjs";
4
+ import { g as o } from "./getVariantClassName-D7Nhpuec.mjs";
5
+ import './Button.css';const g = "Button", h = "_root_1lm86_21", x = "_modeFilled_1lm86_32", S = "_variantPrimary_1lm86_32", b = "_pressed_1lm86_36", N = "_variantSecondary_1lm86_42", W = "_variantDanger_1lm86_52", C = "_disabled_1lm86_62", D = "_modeOutlined_1lm86_69", L = "_modeText_1lm86_94", M = "_fullWidth_1lm86_118", P = "_sizeSm_1lm86_121", B = "_sizeMd_1lm86_128", F = "_sizeLg_1lm86_135", I = "_icon_1lm86_143", e = {
6
+ root: h,
7
+ modeFilled: x,
8
+ variantPrimary: S,
9
+ pressed: b,
10
+ variantSecondary: N,
11
+ variantDanger: W,
12
+ disabled: C,
13
+ modeOutlined: D,
14
+ modeText: L,
15
+ fullWidth: M,
16
+ sizeSm: P,
17
+ sizeMd: B,
18
+ sizeLg: F,
19
+ icon: I
20
+ }, O = (a) => {
21
+ const {
22
+ children: t,
23
+ disabled: i = !1,
24
+ fullWidth: l = !1,
25
+ icon: n,
26
+ mode: r = "filled",
27
+ onClick: d,
28
+ size: m = "md",
29
+ variant: _ = "primary",
30
+ pressed: c,
31
+ as: p = "button",
32
+ ...f
33
+ } = a, u = v(
34
+ e.root,
35
+ o("size", m, e),
36
+ o("variant", _, e),
37
+ o("mode", r, e),
38
+ {
39
+ [e.fullWidth]: l,
40
+ [e.pressed]: c,
41
+ [e.disabled]: i
42
+ }
43
+ );
44
+ return /* @__PURE__ */ z(p, { className: u, disabled: i, onClick: d, ...f, children: [
45
+ n && /* @__PURE__ */ s("span", { className: e.icon, children: /* @__PURE__ */ s(y, { name: n, size: 16 }) }),
46
+ t && /* @__PURE__ */ s("span", { children: t })
47
+ ] });
48
+ };
49
+ O.displayName = g;
50
+ export {
51
+ O as B
52
+ };
@@ -0,0 +1 @@
1
+ :root{--button-bg: var(--lui-color-background-brand);--button-bg-hover: var(--lui-color-background-brand-hover);--button-text: var(--lui-color-text-on-brand);--button-bg-secondary: var(--lui-color-background-primary);--button-text-secondary: var(--lui-color-text-secondary);--button-bg-secondary-hover: var(--lui-color-background-secondary);--button-bg-danger: var(--lui-color-background-error);--button-text-danger: var(--lui-color-text-on-brand);--button-bg-danger-hover: var(--lui-color-background-error-hover);--button-bg-disabled: var(--lui-color-background-disabled);--button-text-disabled: var(--lui-color-text-disabled);--button-border-disabled: var(--lui-color-border-disabled);--button-focus-ring: var(--lui-color-border-focus);--button-focus-ring-error: var(--lui-color-border-focus-error);--button-radius: var(--lui-radius-2);--button-border: var(--lui-color-border-primary);--button-shadow: var(--lui-shadow-xs)}._root_1lm86_21{align-items:center;border:1px solid var(--button-border);border-radius:var(--button-radius);box-shadow:var(--button-shadow);display:inline-flex;flex-direction:row;justify-content:center;outline-offset:2px;transition:background-color .2s,color .2s}._root_1lm86_21._modeFilled_1lm86_32._variantPrimary_1lm86_32{background:var(--button-bg);color:var(--button-text)}._root_1lm86_21._modeFilled_1lm86_32._variantPrimary_1lm86_32._pressed_1lm86_36,._root_1lm86_21._modeFilled_1lm86_32._variantPrimary_1lm86_32:active,._root_1lm86_21._modeFilled_1lm86_32._variantPrimary_1lm86_32:hover{background:var(--button-bg-hover)}._root_1lm86_21._modeFilled_1lm86_32._variantPrimary_1lm86_32:focus-visible{outline:2px solid var(--button-focus-ring)}._root_1lm86_21._modeFilled_1lm86_32._variantSecondary_1lm86_42{background:var(--button-bg-secondary);color:var(--button-text-secondary)}._root_1lm86_21._modeFilled_1lm86_32._variantSecondary_1lm86_42:active,._root_1lm86_21._modeFilled_1lm86_32._variantSecondary_1lm86_42._pressed_1lm86_36,._root_1lm86_21._modeFilled_1lm86_32._variantSecondary_1lm86_42:hover{background:var(--button-bg-secondary-hover)}._root_1lm86_21._modeFilled_1lm86_32._variantSecondary_1lm86_42:focus-visible{outline:2px solid var(--button-focus-ring)}._root_1lm86_21._modeFilled_1lm86_32._variantDanger_1lm86_52{background:var(--button-bg-danger);color:var(--button-text-danger)}._root_1lm86_21._modeFilled_1lm86_32._variantDanger_1lm86_52:active,._root_1lm86_21._modeFilled_1lm86_32._variantDanger_1lm86_52._pressed_1lm86_36,._root_1lm86_21._modeFilled_1lm86_32._variantDanger_1lm86_52:hover{background:var(--button-bg-danger-hover)}._root_1lm86_21._modeFilled_1lm86_32._variantDanger_1lm86_52:focus-visible{outline:2px solid var(--button-focus-ring-error)}._root_1lm86_21._modeFilled_1lm86_32:disabled,._root_1lm86_21._modeFilled_1lm86_32._disabled_1lm86_62{background:var(--button-bg-disabled);border-color:var(--button-border-disabled);color:var(--button-text-disabled);cursor:not-allowed;pointer-events:none}._root_1lm86_21._modeOutlined_1lm86_69{background:transparent;box-shadow:none}._root_1lm86_21._modeOutlined_1lm86_69._variantPrimary_1lm86_32{border-color:var(--lui-color-background-brand);color:var(--lui-color-background-brand)}._root_1lm86_21._modeOutlined_1lm86_69._variantPrimary_1lm86_32:hover{background:var(--lui-color-background-brand-secondary)}._root_1lm86_21._modeOutlined_1lm86_69._variantSecondary_1lm86_42{color:var(--lui-color-text-secondary)}._root_1lm86_21._modeOutlined_1lm86_69._variantSecondary_1lm86_42:hover{background:var(--lui-color-background-secondary)}._root_1lm86_21._modeOutlined_1lm86_69._variantDanger_1lm86_52{border-color:var(--lui-color-background-error);color:var(--lui-color-background-error)}._root_1lm86_21._modeOutlined_1lm86_69._variantDanger_1lm86_52:hover{background:var(--lui-color-background-error);color:var(--lui-color-text-on-brand)}._root_1lm86_21._modeText_1lm86_94{background:transparent;border-color:transparent;box-shadow:none}._root_1lm86_21._modeText_1lm86_94._variantPrimary_1lm86_32{color:var(--lui-color-background-brand)}._root_1lm86_21._modeText_1lm86_94._variantPrimary_1lm86_32:hover{background:var(--lui-color-background-brand-secondary)}._root_1lm86_21._modeText_1lm86_94._variantSecondary_1lm86_42{color:var(--lui-color-text-secondary)}._root_1lm86_21._modeText_1lm86_94._variantSecondary_1lm86_42:hover{background:var(--lui-color-background-secondary)}._root_1lm86_21._modeText_1lm86_94._variantDanger_1lm86_52{color:var(--lui-color-background-error)}._root_1lm86_21._modeText_1lm86_94._variantDanger_1lm86_52:hover{background:var(--lui-color-background-error);color:var(--lui-color-text-on-brand)}._root_1lm86_21._fullWidth_1lm86_118{width:100%}._root_1lm86_21._sizeSm_1lm86_121{font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-semibold);gap:var(--lui-space-1);line-height:var(--line-height-sm);padding:var(--lui-space-1) var(--lui-space-3)}._root_1lm86_21._sizeMd_1lm86_128{font-size:var(--lui-font-size-sm);font-weight:var(--lui-font-weight-semibold);gap:var(--lui-space-1);line-height:var(--line-height-sm);padding:var(--lui-space-2) var(--lui-space-4)}._root_1lm86_21._sizeLg_1lm86_135{font-size:var(--lui-font-size-md);font-weight:var(--lui-font-weight-semibold);gap:var(--lui-space-2);line-height:var(--line-height-md);padding:var(--lui-space-3) var(--lui-space-4)}._icon_1lm86_143{align-items:center;display:flex;flex:0 0 20px;height:20px;justify-content:center;width:20px}
@@ -0,0 +1,51 @@
1
+ import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
+ import _ from "clsx";
3
+ import { I as p } from "./Icon-DsTlU3j3.mjs";
4
+ import { u as g } from "./useLocale-CJh-krrY.mjs";
5
+ import "react";
6
+ import { g as u } from "./getVariantClassName-D7Nhpuec.mjs";
7
+ import './Chip.css';const b = "Chip", h = "_root_1nzgz_6", f = "_disabled_1nzgz_20", C = "_content_1nzgz_25", N = "_deleteButton_1nzgz_30", x = "_sizeLg_1nzgz_56", y = "_sizeMd_1nzgz_62", L = "_sizeSm_1nzgz_68", e = {
8
+ root: h,
9
+ disabled: f,
10
+ content: C,
11
+ deleteButton: N,
12
+ sizeLg: x,
13
+ sizeMd: y,
14
+ sizeSm: L
15
+ }, B = (n) => {
16
+ const { children: a, color: i, disabled: o = !1, onDelete: t, size: l = "md" } = n, c = g(), r = _(
17
+ e.root,
18
+ u("size", l, e),
19
+ {
20
+ [e.disabled]: o
21
+ }
22
+ ), d = (z) => {
23
+ z.stopPropagation(), !o && t && t();
24
+ };
25
+ return /* @__PURE__ */ m(
26
+ "span",
27
+ {
28
+ className: r,
29
+ style: { "--chip-color": i ?? "var(--lui-color-text-secondary)" },
30
+ children: [
31
+ /* @__PURE__ */ s("span", { className: e.content, children: a }),
32
+ t && /* @__PURE__ */ s(
33
+ "button",
34
+ {
35
+ "aria-disabled": o || void 0,
36
+ "aria-label": c.Chip.remove,
37
+ className: e.deleteButton,
38
+ disabled: o,
39
+ onClick: d,
40
+ type: "button",
41
+ children: /* @__PURE__ */ s(p, { name: "x", size: 14 })
42
+ }
43
+ )
44
+ ]
45
+ }
46
+ );
47
+ };
48
+ B.displayName = b;
49
+ export {
50
+ B as C
51
+ };
package/dist/Chip.css ADDED
@@ -0,0 +1 @@
1
+ :root{--chip-radius: var(--lui-radius-full);--chip-font-weight: var(--lui-font-weight-medium)}._root_1nzgz_6{align-items:center;background:color-mix(in sRGB,var(--chip-color) 12%,transparent);border:1px solid color-mix(in sRGB,var(--chip-color) 24%,transparent);border-radius:var(--chip-radius);color:var(--chip-color);display:inline-flex;font-weight:var(--chip-font-weight);gap:var(--lui-space-1);justify-content:center;line-height:1;white-space:nowrap;width:fit-content}._root_1nzgz_6._disabled_1nzgz_20{opacity:.5;pointer-events:none}._content_1nzgz_25{overflow:hidden;text-overflow:ellipsis}._deleteButton_1nzgz_30{align-items:center;appearance:none;background:none;border:none;border-radius:var(--lui-radius-full);color:inherit;cursor:pointer;display:inline-flex;flex-shrink:0;justify-content:center;margin-inline-end:calc(var(--lui-space-1) * -1);padding:var(--lui-space-1)}._deleteButton_1nzgz_30:hover{background:color-mix(in sRGB,var(--chip-color) 20%,transparent)}._deleteButton_1nzgz_30:focus-visible{outline:2px solid var(--chip-color);outline-offset:-2px}._deleteButton_1nzgz_30:disabled{cursor:default;pointer-events:none}._sizeLg_1nzgz_56{font-size:var(--lui-font-size-md);line-height:var(--line-height-md);padding:3px var(--lui-space-4)}._sizeMd_1nzgz_62{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm);padding:1px var(--lui-space-3)}._sizeSm_1nzgz_68{font-size:var(--lui-font-size-xs);line-height:var(--line-height-xs);padding:1px var(--lui-space-2)}
package/dist/button.js CHANGED
@@ -1,52 +1,4 @@
1
- import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
- import u from "clsx";
3
- import { I as v } from "./Icon-DsTlU3j3.mjs";
4
- import { g as o } from "./getVariantClassName-D7Nhpuec.mjs";
5
- import './button.css';const y = "Button", h = "_root_26zpg_21", x = "_modeFilled_26zpg_32", S = "_variantPrimary_26zpg_32", b = "_pressed_26zpg_36", N = "_variantSecondary_26zpg_42", W = "_variantDanger_26zpg_52", C = "_disabled_26zpg_62", D = "_modeOutlined_26zpg_69", L = "_modeText_26zpg_94", M = "_fullWidth_26zpg_118", P = "_sizeSm_26zpg_121", F = "_sizeMd_26zpg_128", I = "_sizeLg_26zpg_135", O = "_icon_26zpg_143", e = {
6
- root: h,
7
- modeFilled: x,
8
- variantPrimary: S,
9
- pressed: b,
10
- variantSecondary: N,
11
- variantDanger: W,
12
- disabled: C,
13
- modeOutlined: D,
14
- modeText: L,
15
- fullWidth: M,
16
- sizeSm: P,
17
- sizeMd: F,
18
- sizeLg: I,
19
- icon: O
20
- }, T = (a) => {
21
- const {
22
- children: t,
23
- disabled: i = !1,
24
- fullWidth: r = !1,
25
- icon: n,
26
- mode: d = "filled",
27
- onClick: _,
28
- size: l = "md",
29
- variant: c = "primary",
30
- pressed: m,
31
- as: p = "button",
32
- ...z
33
- } = a, g = u(
34
- e.root,
35
- o("size", l, e),
36
- o("variant", c, e),
37
- o("mode", d, e),
38
- {
39
- [e.fullWidth]: r,
40
- [e.pressed]: m,
41
- [e.disabled]: i
42
- }
43
- );
44
- return /* @__PURE__ */ f(p, { className: g, disabled: i, onClick: _, ...z, children: [
45
- n && /* @__PURE__ */ s("span", { className: e.icon, children: /* @__PURE__ */ s(v, { name: n, size: 16 }) }),
46
- t && /* @__PURE__ */ s("span", { children: t })
47
- ] });
48
- };
49
- T.displayName = y;
1
+ import { B as r } from "./Button-BYnrV9av.mjs";
50
2
  export {
51
- T as Button
3
+ r as Button
52
4
  };
package/dist/chip.d.ts ADDED
@@ -0,0 +1,37 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ /**
4
+ * Chip component. A small interactive element that displays content and optionally can be removed.
5
+ *
6
+ * Background is computed via CSS `color-mix()` — pass any CSS color value as `color` and
7
+ * the component automatically generates a tinted background and subtle border.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Chip>Readonly chip</Chip>
12
+ * <Chip onDelete={() => {}}>Status: Active</Chip>
13
+ * <Chip size="sm" color="var(--lui-palette-orange-500)" onDelete={fn}>Tag</Chip>
14
+ * ```
15
+ */
16
+ export declare const Chip: default_2.FC<IProps>;
17
+
18
+ declare enum EChipSize {
19
+ LG = "lg",
20
+ MD = "md",
21
+ SM = "sm"
22
+ }
23
+
24
+ declare interface IProps extends default_2.PropsWithChildren {
25
+ /** CSS color value. Background is derived via `color-mix()`. Default: `var(--lui-color-text-secondary)`. */
26
+ color?: string;
27
+ /** Disable the chip. */
28
+ disabled?: boolean;
29
+ /** When provided, renders a delete ("×") icon button. */
30
+ onDelete?: () => void;
31
+ /** Size. Default: `'md'`. */
32
+ size?: TChipSize;
33
+ }
34
+
35
+ declare type TChipSize = `${EChipSize.LG | EChipSize.MD | EChipSize.SM}`;
36
+
37
+ export { }
package/dist/chip.js ADDED
@@ -0,0 +1,4 @@
1
+ import { C as r } from "./Chip-DLfYGIQG.mjs";
2
+ export {
3
+ r as Chip
4
+ };
package/dist/dialog.js CHANGED
@@ -5,7 +5,7 @@ import { $ as S, a as A } from "./useModalOverlay-C311Y5HK.mjs";
5
5
  import { s as E, i as M } from "./Overlay-OYo7gW8m.mjs";
6
6
  import { a as P } from "./useOverlayTriggerState-DK8Xy6Kr.mjs";
7
7
  import { I as R } from "./Icon-DsTlU3j3.mjs";
8
- import { u as X } from "./useLocale-DdHNhmvT.mjs";
8
+ import { u as X } from "./useLocale-CJh-krrY.mjs";
9
9
  import { g as k } from "./getComponentSlots-DwAYUFNk.mjs";
10
10
  import { g as w } from "./getVariantClassName-D7Nhpuec.mjs";
11
11
  import './dialog.css';var e = /* @__PURE__ */ ((o) => (o.ACTIONS = "Dialog.Actions", o.CONTENT = "Dialog.Content", o.TITLE = "Dialog.Title", o))(e || {});
@@ -52,7 +52,7 @@ const B = "Dialog", F = [e.ACTIONS, e.CONTENT, e.TITLE], G = "_underlay_100vj_25
52
52
  return /* @__PURE__ */ s(E, { portalContainer: u, children: /* @__PURE__ */ s("div", { className: a.underlay, ...z, children: /* @__PURE__ */ s("div", { className: a.modal, ...y, ref: n, children: /* @__PURE__ */ s(M, { getContainer: () => n.current, children: /* @__PURE__ */ _("div", { className: I, ...b, ref: c, children: [
53
53
  /* @__PURE__ */ _("div", { className: a.header, children: [
54
54
  j,
55
- /* @__PURE__ */ s("button", { "aria-label": h.dialog.close, className: a.close, onClick: D, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
55
+ /* @__PURE__ */ s("button", { "aria-label": h.Dialog.close, className: a.close, onClick: D, children: /* @__PURE__ */ s(R, { name: "x", size: 16 }) })
56
56
  ] }),
57
57
  m && /* @__PURE__ */ s("div", { children: m }),
58
58
  d && /* @__PURE__ */ s("div", { className: a.actions, children: d })
package/dist/drawer.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as T } from "react/jsx-runtime";
2
- import M, { cloneElement as H, createContext as P, useContext as B, useRef as p, useState as A, useEffect as j, useMemo as F } from "react";
2
+ import M, { cloneElement as H, createContext as P, useContext as B, useRef as p, useState as h, useEffect as j, useMemo as F } from "react";
3
3
  import { i as V } from "./isValidReactNode-CmYwTWCE.mjs";
4
4
  import "./camelCase-PtIYufW8.mjs";
5
5
  import U from "clsx";
@@ -7,13 +7,13 @@ import { $ as K, a as Y } from "./useModalOverlay-C311Y5HK.mjs";
7
7
  import { s as G, i as J } from "./Overlay-OYo7gW8m.mjs";
8
8
  import { a as Q } from "./useOverlayTriggerState-DK8Xy6Kr.mjs";
9
9
  import { g as W } from "./getComponentSlots-DwAYUFNk.mjs";
10
- import { g as D } from "./getVariantClassName-D7Nhpuec.mjs";
10
+ import { g as A } from "./getVariantClassName-D7Nhpuec.mjs";
11
11
  import { I as X } from "./Icon-DsTlU3j3.mjs";
12
- import { u as Z } from "./useLocale-DdHNhmvT.mjs";
12
+ import { u as Z } from "./useLocale-CJh-krrY.mjs";
13
13
  import './drawer.css';var o = /* @__PURE__ */ ((e) => (e.ACTIONS = "Drawer.Actions", e.CONTENT = "Drawer.Content", e.HEADER = "Drawer.Header", e))(o || {});
14
14
  const ee = "_root_1m4yu_1", te = {
15
15
  root: ee
16
- }, g = ({ children: e }) => {
16
+ }, w = ({ children: e }) => {
17
17
  const r = M.Children.toArray(e), l = r.map((s, c) => {
18
18
  if (!V("Button", s))
19
19
  return s;
@@ -25,14 +25,14 @@ const ee = "_root_1m4yu_1", te = {
25
25
  });
26
26
  return r.length === 0 ? null : /* @__PURE__ */ t("div", { className: te.root, children: l });
27
27
  };
28
- g.displayName = o.ACTIONS;
28
+ w.displayName = o.ACTIONS;
29
29
  const oe = "_root_jagsa_1", re = {
30
30
  root: oe
31
- }, w = (e) => {
31
+ }, g = (e) => {
32
32
  const { children: r } = e;
33
33
  return /* @__PURE__ */ t("div", { className: re.root, children: r });
34
34
  };
35
- w.displayName = o.CONTENT;
35
+ g.displayName = o.CONTENT;
36
36
  const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], q = P(null), ae = () => {
37
37
  const e = B(q);
38
38
  if (!e)
@@ -56,19 +56,19 @@ const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], q = P(null), ae = ()
56
56
  { isDismissable: s, isKeyboardDismissDisabled: !1 },
57
57
  N,
58
58
  i
59
- ), [C, b] = A(n || !1), [R, $] = A(!1), m = p(C);
59
+ ), [C, b] = h(n || !1), [R, D] = h(!1), m = p(C);
60
60
  j(() => {
61
61
  if (n) {
62
62
  m.current = !0, b(!0);
63
63
  const d = requestAnimationFrame(() => {
64
64
  requestAnimationFrame(() => {
65
- $(!0);
65
+ D(!0);
66
66
  });
67
67
  });
68
68
  return () => cancelAnimationFrame(d);
69
69
  }
70
70
  if (m.current) {
71
- $(!1);
71
+ D(!1);
72
72
  const d = setTimeout(() => {
73
73
  m.current = !1, b(!1);
74
74
  }, be);
@@ -77,12 +77,12 @@ const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], q = P(null), ae = ()
77
77
  }, [n]);
78
78
  const {
79
79
  [o.ACTIONS]: z,
80
- [o.CONTENT]: h,
80
+ [o.CONTENT]: $,
81
81
  [o.HEADER]: S
82
82
  } = F(() => W(r, se), [r]), L = U(
83
83
  a.drawer,
84
- D("size", v, a),
85
- D("placement", f, a),
84
+ A("size", v, a),
85
+ A("placement", f, a),
86
86
  { [a.entered]: R }
87
87
  );
88
88
  return C ? /* @__PURE__ */ t(G, { portalContainer: l, children: /* @__PURE__ */ t("div", { className: a.underlay, ...O, children: /* @__PURE__ */ t("div", { className: a.modal, ...I, ref: i, children: /* @__PURE__ */ t(J, { getContainer: () => i.current, children: /* @__PURE__ */ t(q.Provider, { value: { close: () => N.close() }, children: /* @__PURE__ */ T(
@@ -96,30 +96,30 @@ const ne = "Drawer", se = [o.ACTIONS, o.CONTENT, o.HEADER], q = P(null), ae = ()
96
96
  ref: y,
97
97
  children: [
98
98
  S,
99
- h && /* @__PURE__ */ t("div", { className: a.content, children: h }),
99
+ $ && /* @__PURE__ */ t("div", { className: a.content, children: $ }),
100
100
  z
101
101
  ]
102
102
  }
103
103
  ) }) }) }) }) }) : null;
104
104
  };
105
105
  k.displayName = ne;
106
- const $e = "_root_1mypq_13", he = "_title_1mypq_21", Ae = "_close_1mypq_31", u = {
107
- root: $e,
108
- title: he,
109
- close: Ae
106
+ const De = "_root_1mypq_13", $e = "_title_1mypq_21", he = "_close_1mypq_31", u = {
107
+ root: De,
108
+ title: $e,
109
+ close: he
110
110
  }, E = (e) => {
111
111
  const { children: r } = e, { close: l } = ae(), s = Z(), c = (n) => {
112
112
  n.preventDefault(), l();
113
113
  };
114
114
  return /* @__PURE__ */ T("div", { className: u.root, children: [
115
115
  /* @__PURE__ */ t("div", { className: u.title, children: r }),
116
- /* @__PURE__ */ t("button", { "aria-label": s.dialog.close, className: u.close, onClick: c, type: "button", children: /* @__PURE__ */ t(X, { name: "x", size: 16 }) })
116
+ /* @__PURE__ */ t("button", { "aria-label": s.Drawer.Header.close, className: u.close, onClick: c, type: "button", children: /* @__PURE__ */ t(X, { name: "x", size: 16 }) })
117
117
  ] });
118
118
  };
119
119
  E.displayName = o.HEADER;
120
120
  const _ = k;
121
- _.Actions = g;
122
- _.Content = w;
121
+ _.Actions = w;
122
+ _.Content = g;
123
123
  _.Header = E;
124
124
  export {
125
125
  _ as Drawer,
package/dist/input.css CHANGED
@@ -1 +1 @@
1
- :root{--input-bg: var(--lui-color-background-secondary);--input-bg-hover: var(--lui-color-background-secondary);--input-border: var(--lui-color-border-primary);--input-border-hover: var(--lui-color-text-tertiary);--input-border-focus: var(--lui-color-border-focus);--input-border-error: var(--lui-color-border-focus-error);--input-text: var(--lui-color-text-primary);--input-text-disabled: var(--lui-color-text-disabled);--input-placeholder: var(--lui-color-text-tertiary);--input-icon: var(--lui-color-text-tertiary);--input-radius: var(--lui-radius-1);--input-shadow: var(--lui-shadow-xs);--input-gap: var(--lui-space-2)}._root_1k18n_17{align-items:center;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--input-shadow);display:inline-flex;gap:var(--input-gap);position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_1k18n_17:hover{border-color:var(--input-border-hover)}._root_1k18n_17:focus-within{border-color:var(--input-border-focus);box-shadow:0 0 0 1px var(--input-border-focus)}._root_1k18n_17._invalid_1k18n_36{border-color:var(--input-border-error)}._root_1k18n_17._invalid_1k18n_36:focus-within{box-shadow:0 0 0 1px var(--input-border-error)}._root_1k18n_17._disabled_1k18n_42{background:var(--lui-color-background-disabled);border-color:var(--lui-color-border-disabled);box-shadow:none;cursor:not-allowed}._root_1k18n_17._disabled_1k18n_42:hover{border-color:var(--lui-color-border-disabled)}._root_1k18n_17._disabled_1k18n_42:focus-within{border-color:var(--lui-color-border-disabled);box-shadow:none}._sizeSm_1k18n_56{padding:var(--lui-space-1) var(--lui-space-2)}._sizeMd_1k18n_60{padding:var(--lui-space-2) var(--lui-space-3)}._sizeLg_1k18n_64{padding:var(--lui-space-3) var(--lui-space-4)}._control_1k18n_68{background:none;border:none;color:var(--input-text);flex:1;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0;outline:none;padding:0}._control_1k18n_68::placeholder{color:var(--input-placeholder)}._control_1k18n_68:disabled{color:var(--input-text-disabled);cursor:not-allowed}._control_1k18n_68:disabled::placeholder{color:var(--input-text-disabled)}._control_1k18n_68[type=number]::-webkit-outer-spin-button,._control_1k18n_68[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}._control_1k18n_68[type=number]{appearance:textfield}._before_1k18n_99,._after_1k18n_100{align-items:center;color:var(--input-icon);display:flex;flex-shrink:0;line-height:0}._togglePassword_1k18n_108{align-items:center;background:none;border:none;color:var(--input-icon);cursor:pointer;display:flex;flex-shrink:0;line-height:0;padding:0}._togglePassword_1k18n_108:hover{color:var(--lui-color-text-secondary)}._sizeSm_1k18n_56 ._control_1k18n_68{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm)}._sizeSm_1k18n_56 ._before_1k18n_99,._sizeSm_1k18n_56 ._after_1k18n_100,._sizeSm_1k18n_56 ._togglePassword_1k18n_108{height:14px;width:14px}._sizeMd_1k18n_60 ._control_1k18n_68{font-size:var(--lui-font-size-md);line-height:var(--line-height-md)}._sizeMd_1k18n_60 ._before_1k18n_99,._sizeMd_1k18n_60 ._after_1k18n_100,._sizeMd_1k18n_60 ._togglePassword_1k18n_108{height:16px;width:16px}._sizeLg_1k18n_64 ._control_1k18n_68{font-size:var(--lui-font-size-lg);line-height:var(--line-height-lg)}._sizeLg_1k18n_64 ._before_1k18n_99,._sizeLg_1k18n_64 ._after_1k18n_100,._sizeLg_1k18n_64 ._togglePassword_1k18n_108{height:18px;width:18px}
1
+ :root{--input-bg: var(--lui-color-background-secondary);--input-bg-hover: var(--lui-color-background-secondary);--input-border: var(--lui-color-border-primary);--input-border-hover: var(--lui-color-text-tertiary);--input-border-focus: var(--lui-color-border-focus);--input-border-error: var(--lui-color-border-focus-error);--input-text: var(--lui-color-text-primary);--input-text-disabled: var(--lui-color-text-disabled);--input-placeholder: var(--lui-color-text-tertiary);--input-icon: var(--lui-color-text-tertiary);--input-radius: var(--lui-radius-1);--input-shadow: var(--lui-shadow-xs);--input-gap: var(--lui-space-2)}._root_8a405_17{align-items:center;background:var(--input-bg);border:1px solid var(--input-border);border-radius:var(--input-radius);box-shadow:var(--input-shadow);display:inline-flex;gap:var(--input-gap);position:relative;transition:border-color .15s,box-shadow .15s;width:100%}._root_8a405_17:hover{border-color:var(--input-border-hover)}._root_8a405_17:focus-within{border-color:var(--input-border-focus);box-shadow:0 0 0 1px var(--input-border-focus)}._root_8a405_17._invalid_8a405_36{border-color:var(--input-border-error)}._root_8a405_17._invalid_8a405_36:focus-within{box-shadow:0 0 0 1px var(--input-border-error)}._root_8a405_17._disabled_8a405_42{background:var(--lui-color-background-disabled);border-color:var(--lui-color-border-disabled);box-shadow:none;cursor:not-allowed}._root_8a405_17._disabled_8a405_42:hover{border-color:var(--lui-color-border-disabled)}._root_8a405_17._disabled_8a405_42:focus-within{border-color:var(--lui-color-border-disabled);box-shadow:none}._sizeSm_8a405_56{padding:var(--lui-space-1) var(--lui-space-2)}._sizeMd_8a405_60{padding:var(--lui-space-2) var(--lui-space-3)}._sizeLg_8a405_64{padding:var(--lui-space-3) var(--lui-space-4)}._control_8a405_68{background:none;border:none;color:var(--input-text);flex:1;font-family:inherit;font-size:inherit;line-height:inherit;min-width:0;outline:none;padding:0;width:100%}._control_8a405_68::placeholder{color:var(--input-placeholder)}._control_8a405_68:disabled{color:var(--input-text-disabled);cursor:not-allowed}._control_8a405_68:disabled::placeholder{color:var(--input-text-disabled)}._control_8a405_68[type=number]::-webkit-outer-spin-button,._control_8a405_68[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}._control_8a405_68[type=number]{appearance:textfield}._before_8a405_100,._after_8a405_101{align-items:center;color:var(--input-icon);display:flex;flex-shrink:0;line-height:0}._togglePassword_8a405_109{align-items:center;background:none;border:none;color:var(--input-icon);cursor:pointer;display:flex;flex-shrink:0;line-height:0;padding:0}._togglePassword_8a405_109:hover{color:var(--lui-color-text-secondary)}._sizeSm_8a405_56 ._control_8a405_68{font-size:var(--lui-font-size-sm);line-height:var(--line-height-sm)}._sizeSm_8a405_56 ._before_8a405_100,._sizeSm_8a405_56 ._after_8a405_101,._sizeSm_8a405_56 ._togglePassword_8a405_109{height:14px;width:14px}._sizeMd_8a405_60 ._control_8a405_68{font-size:var(--lui-font-size-md);line-height:var(--line-height-md)}._sizeMd_8a405_60 ._before_8a405_100,._sizeMd_8a405_60 ._after_8a405_101,._sizeMd_8a405_60 ._togglePassword_8a405_109{height:16px;width:16px}._sizeLg_8a405_64 ._control_8a405_68{font-size:var(--lui-font-size-lg);line-height:var(--line-height-lg)}._sizeLg_8a405_64 ._before_8a405_100,._sizeLg_8a405_64 ._after_8a405_101,._sizeLg_8a405_64 ._togglePassword_8a405_109{height:18px;width:18px}
package/dist/input.d.ts CHANGED
@@ -1,6 +1,19 @@
1
1
  import { default as default_2 } from 'react';
2
2
  import { FC } from 'react';
3
3
 
4
+ declare enum EDateFormat {
5
+ DD_MM_YYYY = "DD/MM/YYYY",
6
+ DD_MM_YYYY_DOT = "DD.MM.YYYY",
7
+ MM_DD_YYYY = "MM/DD/YYYY",
8
+ MM_DD_YYYY_DOT = "MM.DD.YYYY",
9
+ YYYY_MM_DD = "YYYY-MM-DD"
10
+ }
11
+
12
+ export declare interface IInputDateProps extends Omit<IInputProps, 'type'> {
13
+ /** Date format pattern that determines separator and digit order. */
14
+ format: TDateFormat;
15
+ }
16
+
4
17
  export declare interface IInputEmailProps extends Omit<IInputProps, 'type'> {
5
18
  }
6
19
 
@@ -28,12 +41,15 @@ export declare interface IInputProps extends Omit<default_2.InputHTMLAttributes<
28
41
  }
29
42
 
30
43
  export declare const Input: FC<IInputProps> & {
44
+ Date: FC<IInputDateProps>;
31
45
  Email: FC<IInputEmailProps>;
32
46
  Number: FC<IInputNumberProps>;
33
47
  Password: FC<IInputPasswordProps>;
34
48
  Phone: FC<IInputPhoneProps>;
35
49
  };
36
50
 
51
+ declare type TDateFormat = `${EDateFormat.DD_MM_YYYY}` | `${EDateFormat.DD_MM_YYYY_DOT}` | `${EDateFormat.MM_DD_YYYY}` | `${EDateFormat.MM_DD_YYYY_DOT}` | `${EDateFormat.YYYY_MM_DD}`;
52
+
37
53
  declare type TInputSize = 'sm' | 'md' | 'lg';
38
54
 
39
55
  export { }