@acronis-platform/ui-react 0.35.1 → 0.36.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.
@@ -0,0 +1,70 @@
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
+ import * as h from "react";
3
+ import { TimesIcon as b } from "@acronis-platform/icons-react/stroke-mono";
4
+ import { cva as m } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
+ import { cn as f } from "../../../lib/utils.js";
6
+ const g = m(
7
+ "inline-flex h-[var(--ui-chips-container-height)] min-w-[var(--ui-chips-container-width-min)] items-center justify-center gap-[var(--ui-chips-container-gap)] rounded-[var(--ui-chips-border-radius)] border-[length:var(--ui-chips-border-width)] border-solid border-[var(--ui-chips-border-color-idle)] bg-[var(--ui-chips-container-color-idle)] px-[var(--ui-chips-container-padding-x)] text-sm leading-6 text-[var(--ui-chips-label-color)] hover:border-[var(--ui-chips-border-color-hover)] hover:bg-[var(--ui-chips-container-color-hover)] [&_svg]:size-[var(--ui-chips-icon-size)] [&_svg]:shrink-0 [&_svg]:text-[var(--ui-chips-icon-color)]",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ removable: "focus-within:outline-none focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chips-border-color-active)] active:bg-[var(--ui-chips-container-color-active)]",
12
+ selectable: "cursor-pointer focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chips-border-color-active)] data-[selected=true]:bg-[var(--ui-chips-container-color-active)]"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ variant: "removable"
17
+ }
18
+ }
19
+ ), x = h.forwardRef(
20
+ ({
21
+ className: t,
22
+ variant: i = "removable",
23
+ icon: s,
24
+ selected: a,
25
+ onRemove: n,
26
+ removeLabel: l = "Remove",
27
+ children: u,
28
+ onKeyDown: e,
29
+ ...v
30
+ }, p) => {
31
+ const c = i === "selectable";
32
+ return /* @__PURE__ */ d(
33
+ "div",
34
+ {
35
+ ref: p,
36
+ className: f(g({ variant: i }), t),
37
+ onKeyDown: (r) => {
38
+ c && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click()), e == null || e(r);
39
+ },
40
+ ...c ? {
41
+ role: "button",
42
+ tabIndex: 0,
43
+ "aria-pressed": !!a,
44
+ "data-selected": a ? "true" : void 0
45
+ } : {},
46
+ ...v,
47
+ children: [
48
+ s,
49
+ /* @__PURE__ */ o("span", { className: "min-w-0 truncate", children: u }),
50
+ i === "removable" && /* @__PURE__ */ o(
51
+ "button",
52
+ {
53
+ type: "button",
54
+ "aria-label": l,
55
+ onClick: n,
56
+ className: "-mr-1 flex shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-none",
57
+ children: /* @__PURE__ */ o(b, {})
58
+ }
59
+ )
60
+ ]
61
+ }
62
+ );
63
+ }
64
+ );
65
+ x.displayName = "Chip";
66
+ export {
67
+ x as Chip,
68
+ g as chipVariants
69
+ };
70
+ //# sourceMappingURL=chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chip.js","sources":["../../../../src/components/ui/chip/chip.tsx"],"sourcesContent":["import * as React from 'react';\nimport { TimesIcon } from '@acronis-platform/icons-react/stroke-mono';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// A compact, interactive label. `variant` mirrors the Figma \"Chip\" `type`:\n// `removable` carries a trailing × (remove) button; `selectable` toggles a\n// selected state. The container fill/border/label/icon all wire to the dedicated\n// `--ui-chips-*` tier from @acronis-platform/tokens-pd; geometry (height, gap,\n// padding, min-width, radius, border width, icon size) is tokenized too.\n// The Figma `state` enum (idle / hover / active / focused) maps to interaction\n// states, not props: `hover:` → the hover tokens, `:focus`/`focus-visible` → the\n// 3px `--ui-focus-primary` ring, and the `active` look is the pressed state for\n// `removable` (`active:`) and the selected state for `selectable`\n// (`data-[selected]`, driven by the `selected` prop).\nconst chipVariants = cva(\n \"inline-flex h-[var(--ui-chips-container-height)] min-w-[var(--ui-chips-container-width-min)] items-center justify-center gap-[var(--ui-chips-container-gap)] rounded-[var(--ui-chips-border-radius)] border-[length:var(--ui-chips-border-width)] border-solid border-[var(--ui-chips-border-color-idle)] bg-[var(--ui-chips-container-color-idle)] px-[var(--ui-chips-container-padding-x)] text-sm leading-6 text-[var(--ui-chips-label-color)] hover:border-[var(--ui-chips-border-color-hover)] hover:bg-[var(--ui-chips-container-color-hover)] [&_svg]:size-[var(--ui-chips-icon-size)] [&_svg]:shrink-0 [&_svg]:text-[var(--ui-chips-icon-color)]\",\n {\n variants: {\n variant: {\n removable:\n 'focus-within:outline-none focus-within:ring-[3px] focus-within:ring-[var(--ui-focus-primary)] active:border-[var(--ui-chips-border-color-active)] active:bg-[var(--ui-chips-container-color-active)]',\n selectable:\n 'cursor-pointer focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[var(--ui-focus-primary)] data-[selected=true]:border-[var(--ui-chips-border-color-active)] data-[selected=true]:bg-[var(--ui-chips-container-color-active)]',\n },\n },\n defaultVariants: {\n variant: 'removable',\n },\n }\n);\n\nexport interface ChipProps\n extends\n React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof chipVariants> {\n /** Optional leading icon, rendered at 16px before the label. */\n icon?: React.ReactNode;\n /**\n * `selectable` only — applies the selected (active) styling and exposes the\n * chip as a pressed toggle (`role=\"button\"` + `aria-pressed`).\n */\n selected?: boolean;\n /** `removable` only — called when the trailing remove (×) button is pressed. */\n onRemove?: () => void;\n /** Accessible label for the remove button (`removable`). */\n removeLabel?: string;\n}\n\nconst Chip = React.forwardRef<HTMLDivElement, ChipProps>(\n (\n {\n className,\n variant = 'removable',\n icon,\n selected,\n onRemove,\n removeLabel = 'Remove',\n children,\n onKeyDown,\n ...props\n },\n ref\n ) => {\n const selectable = variant === 'selectable';\n return (\n <div\n ref={ref}\n className={cn(chipVariants({ variant }), className)}\n onKeyDown={(event) => {\n // The selectable chip is a div with button semantics; mirror native\n // button activation so Enter/Space fire its click handler.\n if (selectable && (event.key === 'Enter' || event.key === ' ')) {\n event.preventDefault();\n event.currentTarget.click();\n }\n onKeyDown?.(event);\n }}\n {...(selectable\n ? {\n role: 'button',\n tabIndex: 0,\n 'aria-pressed': Boolean(selected),\n 'data-selected': selected ? 'true' : undefined,\n }\n : {})}\n {...props}\n >\n {icon}\n <span className=\"min-w-0 truncate\">{children}</span>\n {variant === 'removable' && (\n <button\n type=\"button\"\n aria-label={removeLabel}\n onClick={onRemove}\n className=\"-mr-1 flex shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-none\"\n >\n <TimesIcon />\n </button>\n )}\n </div>\n );\n }\n);\nChip.displayName = 'Chip';\n\nexport { Chip, chipVariants };\n"],"names":["chipVariants","cva","Chip","React","className","variant","icon","selected","onRemove","removeLabel","children","onKeyDown","props","ref","selectable","jsxs","cn","event","jsx","TimesIcon"],"mappings":";;;;;AAgBA,MAAMA,IAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,WACE;AAAA,QACF,YACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ,GAmBMC,IAAOC,EAAM;AAAA,EACjB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAaT,MAAY;AAC/B,WACE,gBAAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAF;AAAA,QACA,WAAWG,EAAGhB,EAAa,EAAE,SAAAK,EAAA,CAAS,GAAGD,CAAS;AAAA,QAClD,WAAW,CAACa,MAAU;AAGpB,UAAIH,MAAeG,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SACxDA,EAAM,eAAA,GACNA,EAAM,cAAc,MAAA,IAEtBN,KAAA,QAAAA,EAAYM;AAAA,QACd;AAAA,QACC,GAAIH,IACD;AAAA,UACE,MAAM;AAAA,UACN,UAAU;AAAA,UACV,gBAAgB,EAAQP;AAAA,UACxB,iBAAiBA,IAAW,SAAS;AAAA,QAAA,IAEvC,CAAA;AAAA,QACH,GAAGK;AAAA,QAEH,UAAA;AAAA,UAAAN;AAAA,UACD,gBAAAY,EAAC,QAAA,EAAK,WAAU,oBAAoB,UAAAR,EAAA,CAAS;AAAA,UAC5CL,MAAY,eACX,gBAAAa;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAYT;AAAA,cACZ,SAASD;AAAA,cACT,WAAU;AAAA,cAEV,4BAACW,GAAA,CAAA,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACb;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AACAjB,EAAK,cAAc;"}
package/dist/index.js CHANGED
@@ -1,33 +1,34 @@
1
1
  import { cn as t } from "./lib/utils.js";
2
2
  import { Avatar as o, AvatarFallback as n, AvatarGroup as S, AvatarImage as i, avatarVariants as c } from "./components/ui/avatar/avatar.js";
3
- import { Breadcrumb as p, BreadcrumbEllipsis as l, BreadcrumbItem as d, BreadcrumbLink as m, BreadcrumbList as b, BreadcrumbPage as I, BreadcrumbSeparator as s } from "./components/ui/breadcrumb/breadcrumb.js";
3
+ import { Breadcrumb as u, BreadcrumbEllipsis as l, BreadcrumbItem as d, BreadcrumbLink as m, BreadcrumbList as b, BreadcrumbPage as I, BreadcrumbSeparator as s } from "./components/ui/breadcrumb/breadcrumb.js";
4
4
  import { Button as y, buttonVariants as f } from "./components/ui/button/button.js";
5
5
  import { ButtonIcon as P, buttonIconVariants as M } from "./components/ui/button-icon/button-icon.js";
6
- import { ButtonMenu as C, buttonMenuVariants as B } from "./components/ui/button-menu/button-menu.js";
7
- import { CardFilter as L, cardFilterVariants as G } from "./components/ui/card-filter/card-filter.js";
6
+ import { ButtonMenu as C, buttonMenuVariants as V } from "./components/ui/button-menu/button-menu.js";
7
+ import { CardFilter as h, cardFilterVariants as L } from "./components/ui/card-filter/card-filter.js";
8
8
  import { Checkbox as v } from "./components/ui/checkbox/checkbox.js";
9
- import { Input as k } from "./components/ui/input/input.js";
10
- import { InputDatePicker as R } from "./components/ui/input-date-picker/input-date-picker.js";
11
- import { InputSearch as z } from "./components/ui/input-search/input-search.js";
12
- import { InputSelect as D, InputSelectContent as w, InputSelectDescription as j, InputSelectError as q, InputSelectField as J, InputSelectGroup as K, InputSelectItem as N, InputSelectLabel as O, InputSelectSearch as Q, InputSelectSection as U, InputSelectSectionLabel as W, InputSelectStatus as X, InputSelectTrigger as Y, InputSelectValue as Z, InputSelect as _, InputSelectContent as $, InputSelectSection as ee, InputSelectSectionLabel as re, InputSelectItem as te, InputSelectTrigger as ae, InputSelectValue as oe } from "./components/ui/input-select/input-select.js";
13
- import { InputText as Se } from "./components/ui/input-text/input-text.js";
14
- import { InputTextArea as ce } from "./components/ui/input-text-area/input-text-area.js";
15
- import { Link as pe } from "./components/ui/link/link.js";
16
- import { Radio as de, RadioGroup as me } from "./components/ui/radio/radio.js";
17
- import { ResizableHandle as Ie, ResizablePanel as se, ResizablePanelGroup as xe } from "./components/ui/resizable/resizable.js";
18
- import { Search as fe } from "./components/ui/search/search.js";
19
- import { SearchGlobal as Pe } from "./components/ui/search-global/search-global.js";
20
- import { SidebarPrimary as Te, SidebarPrimaryCollapseTrigger as Ce, SidebarPrimaryContent as Be, SidebarPrimaryFooter as Ve, SidebarPrimaryHeader as Le, SidebarPrimaryMenu as Ge, SidebarPrimaryMenuItem as he, SidebarPrimaryMenuItemExtras as ve, SidebarPrimarySection as Fe, sidebarPrimaryMenuItemVariants as ke } from "./components/ui/sidebar-primary/sidebar-primary.js";
21
- import { SidebarSecondary as Re, SidebarSecondaryCollapseTrigger as Ee, SidebarSecondaryCollapsedBreadcrumb as ze, SidebarSecondaryContent as He, SidebarSecondaryFooter as De, SidebarSecondaryHeader as we, SidebarSecondaryMenu as je, SidebarSecondaryMenuItem as qe, SidebarSecondaryMenuItemExtras as Je, SidebarSecondaryMenuSub as Ke, SidebarSecondaryMenuSubContent as Ne, SidebarSecondaryMenuSubItem as Oe, SidebarSecondaryMenuSubTrigger as Qe, SidebarSecondarySection as Ue, SidebarSecondarySectionLabel as We, sidebarSecondaryMenuItemVariants as Xe } from "./components/ui/sidebar-secondary/sidebar-secondary.js";
22
- import { Switch as Ze } from "./components/ui/switch/switch.js";
23
- import { Tag as $e, tagVariants as er } from "./components/ui/tag/tag.js";
24
- import { Tooltip as tr, TooltipContent as ar, TooltipProvider as or, TooltipTrigger as nr } from "./components/ui/tooltip/tooltip.js";
9
+ import { Chip as k, chipVariants as A } from "./components/ui/chip/chip.js";
10
+ import { Input as E } from "./components/ui/input/input.js";
11
+ import { InputDatePicker as H } from "./components/ui/input-date-picker/input-date-picker.js";
12
+ import { InputSearch as w } from "./components/ui/input-search/input-search.js";
13
+ import { InputSelect as q, InputSelectContent as J, InputSelectDescription as K, InputSelectError as N, InputSelectField as O, InputSelectGroup as Q, InputSelectItem as U, InputSelectLabel as W, InputSelectSearch as X, InputSelectSection as Y, InputSelectSectionLabel as Z, InputSelectStatus as _, InputSelectTrigger as $, InputSelectValue as ee, InputSelect as re, InputSelectContent as te, InputSelectSection as ae, InputSelectSectionLabel as oe, InputSelectItem as ne, InputSelectTrigger as Se, InputSelectValue as ie } from "./components/ui/input-select/input-select.js";
14
+ import { InputText as pe } from "./components/ui/input-text/input-text.js";
15
+ import { InputTextArea as le } from "./components/ui/input-text-area/input-text-area.js";
16
+ import { Link as me } from "./components/ui/link/link.js";
17
+ import { Radio as Ie, RadioGroup as se } from "./components/ui/radio/radio.js";
18
+ import { ResizableHandle as ye, ResizablePanel as fe, ResizablePanelGroup as ge } from "./components/ui/resizable/resizable.js";
19
+ import { Search as Me } from "./components/ui/search/search.js";
20
+ import { SearchGlobal as Ce } from "./components/ui/search-global/search-global.js";
21
+ import { SidebarPrimary as Be, SidebarPrimaryCollapseTrigger as he, SidebarPrimaryContent as Le, SidebarPrimaryFooter as Ge, SidebarPrimaryHeader as ve, SidebarPrimaryMenu as Fe, SidebarPrimaryMenuItem as ke, SidebarPrimaryMenuItemExtras as Ae, SidebarPrimarySection as Re, sidebarPrimaryMenuItemVariants as Ee } from "./components/ui/sidebar-primary/sidebar-primary.js";
22
+ import { SidebarSecondary as He, SidebarSecondaryCollapseTrigger as De, SidebarSecondaryCollapsedBreadcrumb as we, SidebarSecondaryContent as je, SidebarSecondaryFooter as qe, SidebarSecondaryHeader as Je, SidebarSecondaryMenu as Ke, SidebarSecondaryMenuItem as Ne, SidebarSecondaryMenuItemExtras as Oe, SidebarSecondaryMenuSub as Qe, SidebarSecondaryMenuSubContent as Ue, SidebarSecondaryMenuSubItem as We, SidebarSecondaryMenuSubTrigger as Xe, SidebarSecondarySection as Ye, SidebarSecondarySectionLabel as Ze, sidebarSecondaryMenuItemVariants as _e } from "./components/ui/sidebar-secondary/sidebar-secondary.js";
23
+ import { Switch as er } from "./components/ui/switch/switch.js";
24
+ import { Tag as tr, tagVariants as ar } from "./components/ui/tag/tag.js";
25
+ import { Tooltip as nr, TooltipContent as Sr, TooltipProvider as ir, TooltipTrigger as cr } from "./components/ui/tooltip/tooltip.js";
25
26
  export {
26
27
  o as Avatar,
27
28
  n as AvatarFallback,
28
29
  S as AvatarGroup,
29
30
  i as AvatarImage,
30
- p as Breadcrumb,
31
+ u as Breadcrumb,
31
32
  l as BreadcrumbEllipsis,
32
33
  d as BreadcrumbItem,
33
34
  m as BreadcrumbLink,
@@ -37,80 +38,82 @@ export {
37
38
  y as Button,
38
39
  P as ButtonIcon,
39
40
  C as ButtonMenu,
40
- L as CardFilter,
41
+ h as CardFilter,
41
42
  v as Checkbox,
42
- k as Input,
43
- R as InputDatePicker,
44
- z as InputSearch,
45
- D as InputSelect,
46
- w as InputSelectContent,
47
- j as InputSelectDescription,
48
- q as InputSelectError,
49
- J as InputSelectField,
50
- K as InputSelectGroup,
51
- N as InputSelectItem,
52
- O as InputSelectLabel,
53
- Q as InputSelectSearch,
54
- U as InputSelectSection,
55
- W as InputSelectSectionLabel,
56
- X as InputSelectStatus,
57
- Y as InputSelectTrigger,
58
- Z as InputSelectValue,
59
- Se as InputText,
60
- ce as InputTextArea,
61
- pe as Link,
62
- de as Radio,
63
- me as RadioGroup,
64
- Ie as ResizableHandle,
65
- se as ResizablePanel,
66
- xe as ResizablePanelGroup,
67
- fe as Search,
68
- Pe as SearchGlobal,
69
- _ as Select,
70
- $ as SelectContent,
71
- ee as SelectGroup,
72
- re as SelectGroupLabel,
73
- te as SelectItem,
74
- ae as SelectTrigger,
75
- oe as SelectValue,
76
- Te as SidebarPrimary,
77
- Ce as SidebarPrimaryCollapseTrigger,
78
- Be as SidebarPrimaryContent,
79
- Ve as SidebarPrimaryFooter,
80
- Le as SidebarPrimaryHeader,
81
- Ge as SidebarPrimaryMenu,
82
- he as SidebarPrimaryMenuItem,
83
- ve as SidebarPrimaryMenuItemExtras,
84
- Fe as SidebarPrimarySection,
85
- Re as SidebarSecondary,
86
- Ee as SidebarSecondaryCollapseTrigger,
87
- ze as SidebarSecondaryCollapsedBreadcrumb,
88
- He as SidebarSecondaryContent,
89
- De as SidebarSecondaryFooter,
90
- we as SidebarSecondaryHeader,
91
- je as SidebarSecondaryMenu,
92
- qe as SidebarSecondaryMenuItem,
93
- Je as SidebarSecondaryMenuItemExtras,
94
- Ke as SidebarSecondaryMenuSub,
95
- Ne as SidebarSecondaryMenuSubContent,
96
- Oe as SidebarSecondaryMenuSubItem,
97
- Qe as SidebarSecondaryMenuSubTrigger,
98
- Ue as SidebarSecondarySection,
99
- We as SidebarSecondarySectionLabel,
100
- Ze as Switch,
101
- $e as Tag,
102
- tr as Tooltip,
103
- ar as TooltipContent,
104
- or as TooltipProvider,
105
- nr as TooltipTrigger,
43
+ k as Chip,
44
+ E as Input,
45
+ H as InputDatePicker,
46
+ w as InputSearch,
47
+ q as InputSelect,
48
+ J as InputSelectContent,
49
+ K as InputSelectDescription,
50
+ N as InputSelectError,
51
+ O as InputSelectField,
52
+ Q as InputSelectGroup,
53
+ U as InputSelectItem,
54
+ W as InputSelectLabel,
55
+ X as InputSelectSearch,
56
+ Y as InputSelectSection,
57
+ Z as InputSelectSectionLabel,
58
+ _ as InputSelectStatus,
59
+ $ as InputSelectTrigger,
60
+ ee as InputSelectValue,
61
+ pe as InputText,
62
+ le as InputTextArea,
63
+ me as Link,
64
+ Ie as Radio,
65
+ se as RadioGroup,
66
+ ye as ResizableHandle,
67
+ fe as ResizablePanel,
68
+ ge as ResizablePanelGroup,
69
+ Me as Search,
70
+ Ce as SearchGlobal,
71
+ re as Select,
72
+ te as SelectContent,
73
+ ae as SelectGroup,
74
+ oe as SelectGroupLabel,
75
+ ne as SelectItem,
76
+ Se as SelectTrigger,
77
+ ie as SelectValue,
78
+ Be as SidebarPrimary,
79
+ he as SidebarPrimaryCollapseTrigger,
80
+ Le as SidebarPrimaryContent,
81
+ Ge as SidebarPrimaryFooter,
82
+ ve as SidebarPrimaryHeader,
83
+ Fe as SidebarPrimaryMenu,
84
+ ke as SidebarPrimaryMenuItem,
85
+ Ae as SidebarPrimaryMenuItemExtras,
86
+ Re as SidebarPrimarySection,
87
+ He as SidebarSecondary,
88
+ De as SidebarSecondaryCollapseTrigger,
89
+ we as SidebarSecondaryCollapsedBreadcrumb,
90
+ je as SidebarSecondaryContent,
91
+ qe as SidebarSecondaryFooter,
92
+ Je as SidebarSecondaryHeader,
93
+ Ke as SidebarSecondaryMenu,
94
+ Ne as SidebarSecondaryMenuItem,
95
+ Oe as SidebarSecondaryMenuItemExtras,
96
+ Qe as SidebarSecondaryMenuSub,
97
+ Ue as SidebarSecondaryMenuSubContent,
98
+ We as SidebarSecondaryMenuSubItem,
99
+ Xe as SidebarSecondaryMenuSubTrigger,
100
+ Ye as SidebarSecondarySection,
101
+ Ze as SidebarSecondarySectionLabel,
102
+ er as Switch,
103
+ tr as Tag,
104
+ nr as Tooltip,
105
+ Sr as TooltipContent,
106
+ ir as TooltipProvider,
107
+ cr as TooltipTrigger,
106
108
  c as avatarVariants,
107
109
  M as buttonIconVariants,
108
- B as buttonMenuVariants,
110
+ V as buttonMenuVariants,
109
111
  f as buttonVariants,
110
- G as cardFilterVariants,
112
+ L as cardFilterVariants,
113
+ A as chipVariants,
111
114
  t as cn,
112
- ke as sidebarPrimaryMenuItemVariants,
113
- Xe as sidebarSecondaryMenuItemVariants,
114
- er as tagVariants
115
+ Ee as sidebarPrimaryMenuItemVariants,
116
+ _e as sidebarSecondaryMenuItemVariants,
117
+ ar as tagVariants
115
118
  };
116
119
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/react.js CHANGED
@@ -1,33 +1,34 @@
1
1
  import { cn as t } from "./lib/utils.js";
2
2
  import { Avatar as o, AvatarFallback as n, AvatarGroup as S, AvatarImage as i, avatarVariants as c } from "./components/ui/avatar/avatar.js";
3
- import { Breadcrumb as p, BreadcrumbEllipsis as l, BreadcrumbItem as d, BreadcrumbLink as m, BreadcrumbList as b, BreadcrumbPage as I, BreadcrumbSeparator as s } from "./components/ui/breadcrumb/breadcrumb.js";
3
+ import { Breadcrumb as u, BreadcrumbEllipsis as l, BreadcrumbItem as d, BreadcrumbLink as m, BreadcrumbList as b, BreadcrumbPage as I, BreadcrumbSeparator as s } from "./components/ui/breadcrumb/breadcrumb.js";
4
4
  import { Button as y, buttonVariants as f } from "./components/ui/button/button.js";
5
5
  import { ButtonIcon as P, buttonIconVariants as M } from "./components/ui/button-icon/button-icon.js";
6
- import { ButtonMenu as C, buttonMenuVariants as B } from "./components/ui/button-menu/button-menu.js";
7
- import { CardFilter as L, cardFilterVariants as G } from "./components/ui/card-filter/card-filter.js";
6
+ import { ButtonMenu as C, buttonMenuVariants as V } from "./components/ui/button-menu/button-menu.js";
7
+ import { CardFilter as h, cardFilterVariants as L } from "./components/ui/card-filter/card-filter.js";
8
8
  import { Checkbox as v } from "./components/ui/checkbox/checkbox.js";
9
- import { Input as k } from "./components/ui/input/input.js";
10
- import { InputDatePicker as R } from "./components/ui/input-date-picker/input-date-picker.js";
11
- import { InputSearch as z } from "./components/ui/input-search/input-search.js";
12
- import { InputSelect as D, InputSelectContent as w, InputSelectDescription as j, InputSelectError as q, InputSelectField as J, InputSelectGroup as K, InputSelectItem as N, InputSelectLabel as O, InputSelectSearch as Q, InputSelectSection as U, InputSelectSectionLabel as W, InputSelectStatus as X, InputSelectTrigger as Y, InputSelectValue as Z, InputSelect as _, InputSelectContent as $, InputSelectSection as ee, InputSelectSectionLabel as re, InputSelectItem as te, InputSelectTrigger as ae, InputSelectValue as oe } from "./components/ui/input-select/input-select.js";
13
- import { InputText as Se } from "./components/ui/input-text/input-text.js";
14
- import { InputTextArea as ce } from "./components/ui/input-text-area/input-text-area.js";
15
- import { Link as pe } from "./components/ui/link/link.js";
16
- import { Radio as de, RadioGroup as me } from "./components/ui/radio/radio.js";
17
- import { ResizableHandle as Ie, ResizablePanel as se, ResizablePanelGroup as xe } from "./components/ui/resizable/resizable.js";
18
- import { Search as fe } from "./components/ui/search/search.js";
19
- import { SearchGlobal as Pe } from "./components/ui/search-global/search-global.js";
20
- import { SidebarPrimary as Te, SidebarPrimaryCollapseTrigger as Ce, SidebarPrimaryContent as Be, SidebarPrimaryFooter as Ve, SidebarPrimaryHeader as Le, SidebarPrimaryMenu as Ge, SidebarPrimaryMenuItem as he, SidebarPrimaryMenuItemExtras as ve, SidebarPrimarySection as Fe, sidebarPrimaryMenuItemVariants as ke } from "./components/ui/sidebar-primary/sidebar-primary.js";
21
- import { SidebarSecondary as Re, SidebarSecondaryCollapseTrigger as Ee, SidebarSecondaryCollapsedBreadcrumb as ze, SidebarSecondaryContent as He, SidebarSecondaryFooter as De, SidebarSecondaryHeader as we, SidebarSecondaryMenu as je, SidebarSecondaryMenuItem as qe, SidebarSecondaryMenuItemExtras as Je, SidebarSecondaryMenuSub as Ke, SidebarSecondaryMenuSubContent as Ne, SidebarSecondaryMenuSubItem as Oe, SidebarSecondaryMenuSubTrigger as Qe, SidebarSecondarySection as Ue, SidebarSecondarySectionLabel as We, sidebarSecondaryMenuItemVariants as Xe } from "./components/ui/sidebar-secondary/sidebar-secondary.js";
22
- import { Switch as Ze } from "./components/ui/switch/switch.js";
23
- import { Tag as $e, tagVariants as er } from "./components/ui/tag/tag.js";
24
- import { Tooltip as tr, TooltipContent as ar, TooltipProvider as or, TooltipTrigger as nr } from "./components/ui/tooltip/tooltip.js";
9
+ import { Chip as k, chipVariants as A } from "./components/ui/chip/chip.js";
10
+ import { Input as E } from "./components/ui/input/input.js";
11
+ import { InputDatePicker as H } from "./components/ui/input-date-picker/input-date-picker.js";
12
+ import { InputSearch as w } from "./components/ui/input-search/input-search.js";
13
+ import { InputSelect as q, InputSelectContent as J, InputSelectDescription as K, InputSelectError as N, InputSelectField as O, InputSelectGroup as Q, InputSelectItem as U, InputSelectLabel as W, InputSelectSearch as X, InputSelectSection as Y, InputSelectSectionLabel as Z, InputSelectStatus as _, InputSelectTrigger as $, InputSelectValue as ee, InputSelect as re, InputSelectContent as te, InputSelectSection as ae, InputSelectSectionLabel as oe, InputSelectItem as ne, InputSelectTrigger as Se, InputSelectValue as ie } from "./components/ui/input-select/input-select.js";
14
+ import { InputText as pe } from "./components/ui/input-text/input-text.js";
15
+ import { InputTextArea as le } from "./components/ui/input-text-area/input-text-area.js";
16
+ import { Link as me } from "./components/ui/link/link.js";
17
+ import { Radio as Ie, RadioGroup as se } from "./components/ui/radio/radio.js";
18
+ import { ResizableHandle as ye, ResizablePanel as fe, ResizablePanelGroup as ge } from "./components/ui/resizable/resizable.js";
19
+ import { Search as Me } from "./components/ui/search/search.js";
20
+ import { SearchGlobal as Ce } from "./components/ui/search-global/search-global.js";
21
+ import { SidebarPrimary as Be, SidebarPrimaryCollapseTrigger as he, SidebarPrimaryContent as Le, SidebarPrimaryFooter as Ge, SidebarPrimaryHeader as ve, SidebarPrimaryMenu as Fe, SidebarPrimaryMenuItem as ke, SidebarPrimaryMenuItemExtras as Ae, SidebarPrimarySection as Re, sidebarPrimaryMenuItemVariants as Ee } from "./components/ui/sidebar-primary/sidebar-primary.js";
22
+ import { SidebarSecondary as He, SidebarSecondaryCollapseTrigger as De, SidebarSecondaryCollapsedBreadcrumb as we, SidebarSecondaryContent as je, SidebarSecondaryFooter as qe, SidebarSecondaryHeader as Je, SidebarSecondaryMenu as Ke, SidebarSecondaryMenuItem as Ne, SidebarSecondaryMenuItemExtras as Oe, SidebarSecondaryMenuSub as Qe, SidebarSecondaryMenuSubContent as Ue, SidebarSecondaryMenuSubItem as We, SidebarSecondaryMenuSubTrigger as Xe, SidebarSecondarySection as Ye, SidebarSecondarySectionLabel as Ze, sidebarSecondaryMenuItemVariants as _e } from "./components/ui/sidebar-secondary/sidebar-secondary.js";
23
+ import { Switch as er } from "./components/ui/switch/switch.js";
24
+ import { Tag as tr, tagVariants as ar } from "./components/ui/tag/tag.js";
25
+ import { Tooltip as nr, TooltipContent as Sr, TooltipProvider as ir, TooltipTrigger as cr } from "./components/ui/tooltip/tooltip.js";
25
26
  export {
26
27
  o as Avatar,
27
28
  n as AvatarFallback,
28
29
  S as AvatarGroup,
29
30
  i as AvatarImage,
30
- p as Breadcrumb,
31
+ u as Breadcrumb,
31
32
  l as BreadcrumbEllipsis,
32
33
  d as BreadcrumbItem,
33
34
  m as BreadcrumbLink,
@@ -37,80 +38,82 @@ export {
37
38
  y as Button,
38
39
  P as ButtonIcon,
39
40
  C as ButtonMenu,
40
- L as CardFilter,
41
+ h as CardFilter,
41
42
  v as Checkbox,
42
- k as Input,
43
- R as InputDatePicker,
44
- z as InputSearch,
45
- D as InputSelect,
46
- w as InputSelectContent,
47
- j as InputSelectDescription,
48
- q as InputSelectError,
49
- J as InputSelectField,
50
- K as InputSelectGroup,
51
- N as InputSelectItem,
52
- O as InputSelectLabel,
53
- Q as InputSelectSearch,
54
- U as InputSelectSection,
55
- W as InputSelectSectionLabel,
56
- X as InputSelectStatus,
57
- Y as InputSelectTrigger,
58
- Z as InputSelectValue,
59
- Se as InputText,
60
- ce as InputTextArea,
61
- pe as Link,
62
- de as Radio,
63
- me as RadioGroup,
64
- Ie as ResizableHandle,
65
- se as ResizablePanel,
66
- xe as ResizablePanelGroup,
67
- fe as Search,
68
- Pe as SearchGlobal,
69
- _ as Select,
70
- $ as SelectContent,
71
- ee as SelectGroup,
72
- re as SelectGroupLabel,
73
- te as SelectItem,
74
- ae as SelectTrigger,
75
- oe as SelectValue,
76
- Te as SidebarPrimary,
77
- Ce as SidebarPrimaryCollapseTrigger,
78
- Be as SidebarPrimaryContent,
79
- Ve as SidebarPrimaryFooter,
80
- Le as SidebarPrimaryHeader,
81
- Ge as SidebarPrimaryMenu,
82
- he as SidebarPrimaryMenuItem,
83
- ve as SidebarPrimaryMenuItemExtras,
84
- Fe as SidebarPrimarySection,
85
- Re as SidebarSecondary,
86
- Ee as SidebarSecondaryCollapseTrigger,
87
- ze as SidebarSecondaryCollapsedBreadcrumb,
88
- He as SidebarSecondaryContent,
89
- De as SidebarSecondaryFooter,
90
- we as SidebarSecondaryHeader,
91
- je as SidebarSecondaryMenu,
92
- qe as SidebarSecondaryMenuItem,
93
- Je as SidebarSecondaryMenuItemExtras,
94
- Ke as SidebarSecondaryMenuSub,
95
- Ne as SidebarSecondaryMenuSubContent,
96
- Oe as SidebarSecondaryMenuSubItem,
97
- Qe as SidebarSecondaryMenuSubTrigger,
98
- Ue as SidebarSecondarySection,
99
- We as SidebarSecondarySectionLabel,
100
- Ze as Switch,
101
- $e as Tag,
102
- tr as Tooltip,
103
- ar as TooltipContent,
104
- or as TooltipProvider,
105
- nr as TooltipTrigger,
43
+ k as Chip,
44
+ E as Input,
45
+ H as InputDatePicker,
46
+ w as InputSearch,
47
+ q as InputSelect,
48
+ J as InputSelectContent,
49
+ K as InputSelectDescription,
50
+ N as InputSelectError,
51
+ O as InputSelectField,
52
+ Q as InputSelectGroup,
53
+ U as InputSelectItem,
54
+ W as InputSelectLabel,
55
+ X as InputSelectSearch,
56
+ Y as InputSelectSection,
57
+ Z as InputSelectSectionLabel,
58
+ _ as InputSelectStatus,
59
+ $ as InputSelectTrigger,
60
+ ee as InputSelectValue,
61
+ pe as InputText,
62
+ le as InputTextArea,
63
+ me as Link,
64
+ Ie as Radio,
65
+ se as RadioGroup,
66
+ ye as ResizableHandle,
67
+ fe as ResizablePanel,
68
+ ge as ResizablePanelGroup,
69
+ Me as Search,
70
+ Ce as SearchGlobal,
71
+ re as Select,
72
+ te as SelectContent,
73
+ ae as SelectGroup,
74
+ oe as SelectGroupLabel,
75
+ ne as SelectItem,
76
+ Se as SelectTrigger,
77
+ ie as SelectValue,
78
+ Be as SidebarPrimary,
79
+ he as SidebarPrimaryCollapseTrigger,
80
+ Le as SidebarPrimaryContent,
81
+ Ge as SidebarPrimaryFooter,
82
+ ve as SidebarPrimaryHeader,
83
+ Fe as SidebarPrimaryMenu,
84
+ ke as SidebarPrimaryMenuItem,
85
+ Ae as SidebarPrimaryMenuItemExtras,
86
+ Re as SidebarPrimarySection,
87
+ He as SidebarSecondary,
88
+ De as SidebarSecondaryCollapseTrigger,
89
+ we as SidebarSecondaryCollapsedBreadcrumb,
90
+ je as SidebarSecondaryContent,
91
+ qe as SidebarSecondaryFooter,
92
+ Je as SidebarSecondaryHeader,
93
+ Ke as SidebarSecondaryMenu,
94
+ Ne as SidebarSecondaryMenuItem,
95
+ Oe as SidebarSecondaryMenuItemExtras,
96
+ Qe as SidebarSecondaryMenuSub,
97
+ Ue as SidebarSecondaryMenuSubContent,
98
+ We as SidebarSecondaryMenuSubItem,
99
+ Xe as SidebarSecondaryMenuSubTrigger,
100
+ Ye as SidebarSecondarySection,
101
+ Ze as SidebarSecondarySectionLabel,
102
+ er as Switch,
103
+ tr as Tag,
104
+ nr as Tooltip,
105
+ Sr as TooltipContent,
106
+ ir as TooltipProvider,
107
+ cr as TooltipTrigger,
106
108
  c as avatarVariants,
107
109
  M as buttonIconVariants,
108
- B as buttonMenuVariants,
110
+ V as buttonMenuVariants,
109
111
  f as buttonVariants,
110
- G as cardFilterVariants,
112
+ L as cardFilterVariants,
113
+ A as chipVariants,
111
114
  t as cn,
112
- ke as sidebarPrimaryMenuItemVariants,
113
- Xe as sidebarSecondaryMenuItemVariants,
114
- er as tagVariants
115
+ Ee as sidebarPrimaryMenuItemVariants,
116
+ _e as sidebarSecondaryMenuItemVariants,
117
+ ar as tagVariants
115
118
  };
116
119
  //# sourceMappingURL=react.js.map
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"react.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,20 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const chipVariants: (props?: ({
4
+ variant?: "removable" | "selectable" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface ChipProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof chipVariants> {
7
+ /** Optional leading icon, rendered at 16px before the label. */
8
+ icon?: React.ReactNode;
9
+ /**
10
+ * `selectable` only — applies the selected (active) styling and exposes the
11
+ * chip as a pressed toggle (`role="button"` + `aria-pressed`).
12
+ */
13
+ selected?: boolean;
14
+ /** `removable` only — called when the trailing remove (×) button is pressed. */
15
+ onRemove?: () => void;
16
+ /** Accessible label for the remove button (`removable`). */
17
+ removeLabel?: string;
18
+ }
19
+ declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
20
+ export { Chip, chipVariants };
@@ -0,0 +1 @@
1
+ export { Chip, chipVariants, type ChipProps } from './chip';
@@ -21,7 +21,7 @@ declare const SidebarPrimaryFooter: React.ForwardRefExoticComponent<Omit<React.D
21
21
  declare const SidebarPrimarySection: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
22
22
  declare const SidebarPrimaryMenu: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
23
23
  declare const sidebarPrimaryMenuItemVariants: (props?: ({
24
- variant?: "unselected" | "selected" | null | undefined;
24
+ variant?: "selected" | "unselected" | null | undefined;
25
25
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
26
26
  export interface SidebarPrimaryMenuItemProps extends Omit<React.ComponentPropsWithoutRef<'a'>, 'children'>, Omit<VariantProps<typeof sidebarPrimaryMenuItemVariants>, 'variant'> {
27
27
  /** Marks the current route: sets the `selected` variant + `aria-current="page"`. */
@@ -58,7 +58,7 @@ export interface SidebarSecondarySectionLabelProps extends React.ComponentPropsW
58
58
  declare const SidebarSecondarySectionLabel: React.ForwardRefExoticComponent<SidebarSecondarySectionLabelProps & React.RefAttributes<HTMLDivElement>>;
59
59
  declare const SidebarSecondaryMenu: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
60
60
  declare const sidebarSecondaryMenuItemVariants: (props?: ({
61
- variant?: "unselected" | "selected" | null | undefined;
61
+ variant?: "selected" | "unselected" | null | undefined;
62
62
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
63
63
  export interface SidebarSecondaryMenuItemProps extends Omit<React.ComponentPropsWithoutRef<'a'>, 'children'>, Omit<VariantProps<typeof sidebarSecondaryMenuItemVariants>, 'variant'> {
64
64
  /** Marks the current route: sets the `selected` variant + `aria-current="page"`. */
@@ -5,6 +5,7 @@ export * from './components/ui/button';
5
5
  export * from './components/ui/button-menu';
6
6
  export * from './components/ui/card-filter';
7
7
  export * from './components/ui/checkbox';
8
+ export * from './components/ui/chip';
8
9
  export * from './components/ui/radio';
9
10
  export * from './components/ui/input';
10
11
  export * from './components/ui/input-date-picker';