@carbonid1/design-system 7.2.1 → 7.3.1

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/README.md CHANGED
@@ -5,7 +5,7 @@ Shared React UI primitives + Tailwind v4 theme presets (`reader`, `dashboard`) +
5
5
  ## Install
6
6
 
7
7
  ```sh
8
- pnpm add @carbonid1/design-system react react-dom @base-ui/react class-variance-authority clsx tailwind-merge lucide-react next-themes react-hotkeys-hook
8
+ pnpm add @carbonid1/design-system
9
9
  ```
10
10
 
11
11
  And Tailwind CSS v4 (with `tw-animate-css` + `shadcn/tailwind.css` if you want matching utilities/base):
@@ -77,6 +77,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
77
77
  | `Switch` | Boolean setting control with a compound `Root` / `Thumb` API |
78
78
  | `ContextMenu` | Right-click / long-press menu (compound API) |
79
79
  | `Select` | Base UI-backed dropdown with a convenience wrapper and compound `Root` / `Trigger` / `Popup` / `Item` parts |
80
+ | `Autocomplete` | Searchable single selection with compound input, trigger, clear, popup, list, and item parts |
80
81
  | `Tooltip` | Hover/focus tooltip with a convenience wrapper and compound `Provider` / `Root` / `Trigger` / `Popup` parts |
81
82
  | `Toaster` | Base UI-backed toast notification root (renders once in layout) |
82
83
  | `toast` | Imperative toast trigger for default, success, error, action, persistent, and dismissible notifications |
@@ -102,7 +103,7 @@ you want the same styled native input through the Field namespace:
102
103
 
103
104
  ## Helpers
104
105
 
105
- - `cn(...inputs)` — `clsx` + `tailwind-merge`
106
+ - `cn(...inputs)` — joins class names and merges conflicting Tailwind classes (built on [`cn`](https://www.npmjs.com/package/cn))
106
107
  - `getModKey()` — returns `'Cmd'` on Mac, `'Ctrl'` elsewhere
107
108
 
108
109
  ## Theming
@@ -0,0 +1,22 @@
1
+ import { Combobox as BaseCombobox } from '@base-ui/react/combobox';
2
+ import type { AutocompleteClearProps, AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompletePopupProps, AutocompletePositionerProps, AutocompleteRootProps, AutocompleteStatusProps, AutocompleteTriggerProps } from './Autocomplete.types';
3
+ /** Searchable single selection, built on Base UI Combobox. Input text filters; only items are selected. */
4
+ export declare const Autocomplete: {
5
+ Root: <Value>({ autoHighlight, modal, ...props }: AutocompleteRootProps<Value>) => import("react/jsx-runtime").JSX.Element;
6
+ InputGroup: ({ className, ...props }: AutocompleteInputGroupProps) => import("react/jsx-runtime").JSX.Element;
7
+ Input: (props: AutocompleteInputProps) => import("react/jsx-runtime").JSX.Element;
8
+ Trigger: ({ children, className, "aria-label": ariaLabel, ...props }: AutocompleteTriggerProps) => import("react/jsx-runtime").JSX.Element;
9
+ Clear: ({ children, className, "aria-label": ariaLabel, keepMounted, ...props }: AutocompleteClearProps) => import("react/jsx-runtime").JSX.Element;
10
+ Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AutocompletePortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
11
+ Positioner: ({ className, sideOffset, collisionPadding, positionMethod, ...props }: AutocompletePositionerProps) => import("react/jsx-runtime").JSX.Element;
12
+ Popup: ({ className, ...props }: AutocompletePopupProps) => import("react/jsx-runtime").JSX.Element;
13
+ List: ({ className, ...props }: AutocompleteListProps) => import("react/jsx-runtime").JSX.Element;
14
+ Item: ({ children, className, ...props }: AutocompleteItemProps) => import("react/jsx-runtime").JSX.Element;
15
+ Empty: ({ className, ...props }: AutocompleteEmptyProps) => import("react/jsx-runtime").JSX.Element;
16
+ Group: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AutocompleteGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
+ GroupLabel: ({ className, ...props }: AutocompleteGroupLabelProps) => import("react/jsx-runtime").JSX.Element;
18
+ Collection: typeof BaseCombobox.Collection;
19
+ Status: ({ className, ...props }: AutocompleteStatusProps) => import("react/jsx-runtime").JSX.Element;
20
+ useFilter: typeof BaseCombobox.useFilter;
21
+ useFilteredItems: typeof BaseCombobox.useFilteredItems;
22
+ };
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Combobox as BaseCombobox } from '@base-ui/react/combobox';
4
+ import { Check, ChevronDown, X } from 'lucide-react';
5
+ import { InputGroup as StyledInputGroup } from '../InputGroup/InputGroup';
6
+ import { mergeStatefulClassName } from '../helpers/mergeStatefulClassName/mergeStatefulClassName';
7
+ const Root = ({ autoHighlight = true, modal = false, ...props }) => (_jsx(BaseCombobox.Root, { autoHighlight: autoHighlight, modal: modal, ...props, multiple: false }));
8
+ const InputGroup = ({ className, ...props }) => (_jsx(BaseCombobox.InputGroup, { render: _jsx(StyledInputGroup.Root, {}), className: mergeStatefulClassName('min-h-9 gap-0 p-0.5', className), ...props }));
9
+ /** Compose inside InputGroup so the input and its actions share one focus ring and surface. */
10
+ const Input = (props) => (_jsx(BaseCombobox.Input, { render: _jsx(StyledInputGroup.Control, {}), ...props }));
11
+ const Trigger = ({ children, className, 'aria-label': ariaLabel = 'Show options', ...props }) => (_jsx(BaseCombobox.Trigger, { "aria-label": ariaLabel, "aria-labelledby": undefined, render: _jsx(StyledInputGroup.Action, { variant: "ghost" }), className: mergeStatefulClassName('group motion-reduce:transition-none forced-colors:focus-visible:outline-2 forced-colors:focus-visible:outline-[Highlight]', className), ...props, children: children ?? (_jsx(ChevronDown, { "aria-hidden": true, className: "size-4 transition-transform group-data-[popup-open]:rotate-180 motion-reduce:transition-none" })) }));
12
+ const Clear = ({ children, className, 'aria-label': ariaLabel = 'Clear selection', keepMounted = true, ...props }) => (_jsx(BaseCombobox.Clear, { "aria-label": ariaLabel, keepMounted: keepMounted, render: _jsx(StyledInputGroup.Action, { variant: "ghost" }), className: mergeStatefulClassName('not-data-[visible]:invisible motion-reduce:transition-none forced-colors:focus-visible:outline-2 forced-colors:focus-visible:outline-[Highlight]', className), ...props, children: children ?? _jsx(X, { "aria-hidden": true, className: "size-4" }) }));
13
+ const Positioner = ({ className, sideOffset = 4, collisionPadding = 8, positionMethod = 'fixed', ...props }) => (_jsx(BaseCombobox.Positioner, { sideOffset: sideOffset, collisionPadding: collisionPadding, positionMethod: positionMethod, className: mergeStatefulClassName('z-50 outline-hidden', className), ...props }));
14
+ const Popup = ({ className, ...props }) => (_jsx(BaseCombobox.Popup, { className: mergeStatefulClassName('border-border bg-popover text-popover-foreground shadow-popover flex max-h-[var(--available-height)] w-[var(--anchor-width)] max-w-[var(--available-width)] flex-col overflow-hidden rounded-lg border outline-hidden', className), ...props }));
15
+ const List = ({ className, ...props }) => (_jsx(BaseCombobox.List, { className: mergeStatefulClassName('max-h-60 min-h-0 scroll-py-1 space-y-1 overflow-y-auto overscroll-contain p-1 empty:p-0', className), ...props }));
16
+ const Item = ({ children, className, ...props }) => (_jsxs(BaseCombobox.Item, { className: mergeStatefulClassName('data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[selected]:bg-primary/10 data-[selected]:ring-primary/20 relative flex min-h-9 cursor-default items-center gap-2 rounded-lg px-2.5 py-2 text-sm break-words outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[selected]:font-medium data-[selected]:ring-1 data-[selected]:ring-inset forced-colors:data-[highlighted]:outline-2 forced-colors:data-[highlighted]:outline-offset-[-2px] forced-colors:data-[highlighted]:outline-[Highlight]', className), ...props, children: [_jsx("span", { className: "min-w-0 flex-1", children: children }), _jsx(BaseCombobox.ItemIndicator, { keepMounted: true, className: "invisible shrink-0 data-[selected]:visible", children: _jsx(Check, { "aria-hidden": true, className: "size-4" }) })] }));
17
+ const Empty = ({ className, ...props }) => (_jsx(BaseCombobox.Empty, { className: mergeStatefulClassName('text-muted-foreground overflow-y-auto px-3 text-sm not-empty:py-3', className), ...props }));
18
+ const GroupLabel = ({ className, ...props }) => (_jsx(BaseCombobox.GroupLabel, { className: mergeStatefulClassName('text-muted-foreground px-2.5 pt-2 pb-1 text-xs font-medium', className), ...props }));
19
+ const Status = ({ className, ...props }) => (_jsx(BaseCombobox.Status, { className: mergeStatefulClassName('text-muted-foreground px-3 text-sm not-empty:py-2', className), ...props }));
20
+ /** Searchable single selection, built on Base UI Combobox. Input text filters; only items are selected. */
21
+ export const Autocomplete = {
22
+ Root,
23
+ InputGroup,
24
+ Input,
25
+ Trigger,
26
+ Clear,
27
+ Portal: BaseCombobox.Portal,
28
+ Positioner,
29
+ Popup,
30
+ List,
31
+ Item,
32
+ Empty,
33
+ Group: BaseCombobox.Group,
34
+ GroupLabel,
35
+ Collection: BaseCombobox.Collection,
36
+ Status,
37
+ useFilter: BaseCombobox.useFilter,
38
+ useFilteredItems: BaseCombobox.useFilteredItems,
39
+ };
@@ -0,0 +1,37 @@
1
+ import type { Combobox as BaseCombobox } from '@base-ui/react/combobox';
2
+ import type { Ref } from 'react';
3
+ /** A searchable single-selection control. `value` is the selected item; `inputValue` is the query. */
4
+ export type AutocompleteRootProps<Value> = Omit<BaseCombobox.Root.Props<Value>, 'multiple'>;
5
+ export type AutocompleteInputGroupProps = BaseCombobox.InputGroup.Props & {
6
+ ref?: Ref<HTMLDivElement>;
7
+ };
8
+ export type AutocompleteInputProps = BaseCombobox.Input.Props & {
9
+ ref?: Ref<HTMLInputElement>;
10
+ };
11
+ export type AutocompleteTriggerProps = BaseCombobox.Trigger.Props & {
12
+ ref?: Ref<HTMLButtonElement>;
13
+ };
14
+ export type AutocompleteClearProps = BaseCombobox.Clear.Props & {
15
+ ref?: Ref<HTMLButtonElement>;
16
+ };
17
+ export type AutocompletePositionerProps = BaseCombobox.Positioner.Props & {
18
+ ref?: Ref<HTMLDivElement>;
19
+ };
20
+ export type AutocompletePopupProps = BaseCombobox.Popup.Props & {
21
+ ref?: Ref<HTMLDivElement>;
22
+ };
23
+ export type AutocompleteListProps = BaseCombobox.List.Props & {
24
+ ref?: Ref<HTMLDivElement>;
25
+ };
26
+ export type AutocompleteItemProps = BaseCombobox.Item.Props & {
27
+ ref?: Ref<HTMLDivElement>;
28
+ };
29
+ export type AutocompleteEmptyProps = BaseCombobox.Empty.Props & {
30
+ ref?: Ref<HTMLDivElement>;
31
+ };
32
+ export type AutocompleteGroupLabelProps = BaseCombobox.GroupLabel.Props & {
33
+ ref?: Ref<HTMLDivElement>;
34
+ };
35
+ export type AutocompleteStatusProps = BaseCombobox.Status.Props & {
36
+ ref?: Ref<HTMLDivElement>;
37
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  import type { ElementType } from 'react';
2
2
  import type { ItemActionsProps, ItemContentProps, ItemDescriptionProps, ItemMediaProps, ItemRootProps, ItemTitleProps } from './Item.types';
3
3
  declare const itemVariants: (props?: ({
4
- surface?: "inset" | "outline" | "raised" | "plain" | null | undefined;
4
+ surface?: "outline" | "raised" | "plain" | "inset" | null | undefined;
5
5
  interactive?: boolean | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  /**
@@ -6,11 +6,11 @@ import type { TextProps } from './Text.types';
6
6
  * composes with any font family or color context.
7
7
  */
8
8
  declare const textVariants: (props?: ({
9
- variant?: "caption" | "display" | "title" | "heading" | "body" | "label" | "subheading" | "bodyLg" | "overline" | null | undefined;
9
+ variant?: "title" | "heading" | "display" | "body" | "caption" | "label" | "subheading" | "bodyLg" | "overline" | null | undefined;
10
10
  color?: "default" | "primary" | "success" | "attention" | "destructive" | "highlight" | "muted" | null | undefined;
11
11
  font?: "sans" | "serif" | "mono" | null | undefined;
12
12
  weight?: "bold" | "regular" | "medium" | "semibold" | null | undefined;
13
- align?: "end" | "start" | "center" | null | undefined;
13
+ align?: "end" | "center" | "start" | null | undefined;
14
14
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
15
  declare const Text: <E extends ElementType = "p">({ as, variant, color, font, weight, align, numeric, truncate, lines, className, style, title, children, ...props }: TextProps<E>) => import("react/jsx-runtime").JSX.Element;
16
16
  export { Text, textVariants };
@@ -1,2 +1,2 @@
1
- import { type ClassValue } from 'clsx';
2
- export declare function cn(...inputs: ClassValue[]): string;
1
+ import type { CnFunction } from 'cn';
2
+ export declare const cn: CnFunction;
@@ -1,12 +1,3 @@
1
- import { clsx } from 'clsx';
2
- import { extendTailwindMerge } from 'tailwind-merge';
3
- const mergeTailwindClasses = extendTailwindMerge({
4
- extend: {
5
- theme: {
6
- 'inset-shadow': ['surface'],
7
- },
8
- },
9
- });
10
- export function cn(...inputs) {
11
- return mergeTailwindClasses(clsx(inputs));
12
- }
1
+ import { createCn } from 'cn/engine';
2
+ import tables from './cn.tables';
3
+ export const cn = createCn(tables);
@@ -0,0 +1,51 @@
1
+ declare namespace _default {
2
+ export { GROUP_COUNT };
3
+ export { customValidatorNames };
4
+ export { edgeStart };
5
+ export { labelStart };
6
+ export { labelText };
7
+ export { edgeTarget };
8
+ export { nodeGroup };
9
+ export { nodeVlist };
10
+ export { vlistPat };
11
+ export { vlistOps };
12
+ export { vlistRef };
13
+ export { vlistGroup };
14
+ export { litAnchor };
15
+ export { litGroup };
16
+ export { litPool };
17
+ export { poolOffsets };
18
+ export { poolText };
19
+ export { adjGid };
20
+ export { adjStart };
21
+ export { adjTgt };
22
+ export { patGid };
23
+ export { patTgt };
24
+ export { postfixLookupGroups };
25
+ export { orderSensitiveModifiers };
26
+ }
27
+ export default _default;
28
+ declare const GROUP_COUNT: 384;
29
+ declare const customValidatorNames: any[];
30
+ declare const edgeStart: Int32Array<any>;
31
+ declare const labelStart: Int32Array<any>;
32
+ declare const labelText: "@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom";
33
+ declare const edgeTarget: Int32Array<ArrayBuffer>;
34
+ declare const nodeGroup: Int32Array<any>;
35
+ declare const nodeVlist: Int32Array<ArrayBuffer>;
36
+ declare const vlistPat: Int32Array<any>;
37
+ declare const vlistOps: Int32Array<any>;
38
+ declare const vlistRef: Int32Array<any>;
39
+ declare const vlistGroup: Int32Array<any>;
40
+ declare const litAnchor: Int32Array<ArrayBuffer>;
41
+ declare const litGroup: Int32Array<ArrayBuffer>;
42
+ declare const litPool: Int32Array<ArrayBuffer>;
43
+ declare const poolOffsets: Int32Array<ArrayBuffer>;
44
+ declare let poolText: string;
45
+ declare const adjGid: Int32Array<any>;
46
+ declare const adjStart: Int32Array<any>;
47
+ declare const adjTgt: Int32Array<any>;
48
+ declare const patGid: Int32Array<any>;
49
+ declare const patTgt: Int32Array<any>;
50
+ declare const postfixLookupGroups: Int32Array<any>;
51
+ declare const orderSensitiveModifiers: "* ** after backdrop before details-content file first-letter first-line marker placeholder selection";
@@ -0,0 +1,125 @@
1
+ // GENERATED by `cn build` — do not edit.
2
+ // Pair with createCn from "cn/engine":
3
+ // import tables from "./cn.tables.js"
4
+ // import { createCn } from "cn/engine"
5
+ // export const cn = createCn(tables)
6
+ const P = 48;
7
+ const U = (s, o = 0) => {
8
+ const out = new Int32Array(s.length);
9
+ for (let i = 0; i < s.length; i++)
10
+ out[i] = s.charCodeAt(i) - P - o;
11
+ return out;
12
+ };
13
+ const PS = (counts) => {
14
+ const out = new Int32Array(counts.length + 1);
15
+ for (let i = 0; i < counts.length; i++)
16
+ out[i + 1] = out[i] + counts[i];
17
+ return out;
18
+ };
19
+ // zigzag-delta stream → running values
20
+ const DZ = (s) => {
21
+ const out = new Int32Array(s.length);
22
+ let a = 0;
23
+ for (let i = 0; i < s.length; i++) {
24
+ const z = s.charCodeAt(i) - P;
25
+ a += (z >>> 1) ^ -(z & 1);
26
+ out[i] = a;
27
+ }
28
+ return out;
29
+ };
30
+ const GROUP_COUNT = 384;
31
+ const customValidatorNames = [];
32
+ const edgeStart = PS(U("E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010"));
33
+ const labelStart = PS(U(":11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3"));
34
+ const labelText = "@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom";
35
+ // pre-order tree: targets derived from edge counts via subtree sizes
36
+ const edgeTarget = (() => {
37
+ const N = edgeStart.length - 1;
38
+ const sizes = new Int32Array(N);
39
+ for (let i = N - 1; i >= 0; i--) {
40
+ let s = 1;
41
+ let c = i + 1;
42
+ for (let k = edgeStart[i]; k < edgeStart[i + 1]; k++) {
43
+ s += sizes[c];
44
+ c += sizes[c];
45
+ }
46
+ sizes[i] = s;
47
+ }
48
+ const out = new Int32Array(edgeStart[N]);
49
+ let e = 0;
50
+ for (let i = 0; i < N; i++) {
51
+ let c = i + 1;
52
+ for (let k = edgeStart[i]; k < edgeStart[i + 1]; k++) {
53
+ out[e++] = c;
54
+ c += sizes[c];
55
+ }
56
+ }
57
+ return out;
58
+ })();
59
+ const nodeGroup = U("02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000…ŏ000ˆ0000ŏ0000000000—0000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000", 1);
60
+ // vlists = op-pattern pool + per-list refs; the engine indexes these directly
61
+ const vlistPat = PS(U("1233333593464636351265367151576"));
62
+ const vlistOps = U("93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0324325853;D>E?3257D>03258432585:0325B:;0328B:032");
63
+ const vlistRef = U("012123445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EJK4444::EJ4444441691;644444114244444:;L6666555555555555555999666664444444444444444444444226?6:66644M9N?D:111::::6DJ199");
64
+ const vlistGroup = DZ("0202002020020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200");
65
+ // nodeVlist rebuilt sparse: (anchor deltas, vlist ids)
66
+ const nodeVlist = (() => {
67
+ const out = new Int32Array(319).fill(-1);
68
+ const A = DZ("02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222");
69
+ const V = DZ("02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222");
70
+ for (let i = 0; i < A.length; i++)
71
+ out[A[i]] = V[i];
72
+ return out;
73
+ })();
74
+ const SETS = "container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top|none | auto square video| auto fr max min px| auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| none surface| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform".split('|').map((s) => {
75
+ const tails = s.split(' ');
76
+ const prefix = tails.shift();
77
+ for (let i = 0; i < tails.length; i++) {
78
+ tails[i] = prefix + tails[i];
79
+ }
80
+ return tails;
81
+ });
82
+ const AA = DZ("0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422");
83
+ const AG = DZ("ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622");
84
+ const AS = DZ("02222222222222222222222222222222222222222222222222222222222222222203062222222222IL2200IL021042222]`222IL0gj2e50n2222U00X202[^2y0000|{0~}€…ˆ22‹Ž>22~22222222222G000sˆQXI00000œ2>40000ŽŸB00000Iª¯000²00000000000000021Q´³00¶•000000000000000000000˜222HGHa5À222Å6Â2222ÏÒ000¯²2³");
85
+ const litAnchor = new Int32Array(992);
86
+ const litGroup = new Int32Array(992);
87
+ const litPool = new Int32Array(992);
88
+ let poolText = '';
89
+ const poolOffsets = new Int32Array(1032);
90
+ {
91
+ const tailRef = new Map();
92
+ let nextRef = 0;
93
+ let e = 0;
94
+ for (let i = 0; i < AA.length; i++) {
95
+ for (const tail of SETS[AS[i]]) {
96
+ let r = tailRef.get(tail);
97
+ if (r === undefined) {
98
+ r = nextRef++;
99
+ tailRef.set(tail, r);
100
+ poolOffsets[r * 2] = poolText.length;
101
+ poolOffsets[r * 2 + 1] = tail.length;
102
+ poolText += tail;
103
+ }
104
+ litAnchor[e] = AA[i];
105
+ litGroup[e] = AG[i];
106
+ litPool[e] = r;
107
+ e++;
108
+ }
109
+ }
110
+ }
111
+ // conflict adjacency (engine builds claim bitmask CSR at init)
112
+ const adjGid = DZ("0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p");
113
+ const adjStart = PS(U("1::22222432:222:22:22>222222:22:2221322511111311111114"));
114
+ const adjTgt = DZ("2Š4A;33N=C@H4A;33N=C@<2;363@QTQʰ222ˉºŴŽ2R2=18cƴÅҜÜÛŲǝȈ:ħ25=11D3A@216Er25;11B3?<438Cn9@7=<8192>2E121@9@EHE@9>2T25511<398216=V25511<398216=„ƧNž2Đå242L222290000f22500ɛ000ǘ222");
115
+ const patGid = U("ij");
116
+ const patTgt = U("—");
117
+ const postfixLookupGroups = U("1");
118
+ const orderSensitiveModifiers = "* ** after backdrop before details-content file first-letter first-line marker placeholder selection";
119
+ export default {
120
+ GROUP_COUNT, customValidatorNames, edgeStart, labelStart, labelText,
121
+ edgeTarget, nodeGroup, nodeVlist, vlistPat, vlistOps, vlistRef, vlistGroup,
122
+ litAnchor, litGroup, litPool, poolOffsets, poolText,
123
+ adjGid, adjStart, adjTgt, patGid, patTgt, postfixLookupGroups,
124
+ orderSensitiveModifiers,
125
+ };
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export { buttonVariants } from './Button/Button.variants';
7
7
  export type { ButtonProps } from './Button/Button.types';
8
8
  export { Input } from './Input/Input';
9
9
  export type { InputProps } from './Input/Input.types';
10
+ export { Autocomplete } from './Autocomplete/Autocomplete';
11
+ export type { AutocompleteClearProps, AutocompleteEmptyProps, AutocompleteGroupLabelProps, AutocompleteInputGroupProps, AutocompleteInputProps, AutocompleteItemProps, AutocompleteListProps, AutocompletePopupProps, AutocompletePositionerProps, AutocompleteRootProps, AutocompleteStatusProps, AutocompleteTriggerProps, } from './Autocomplete/Autocomplete.types';
10
12
  export { Field } from './Field/Field';
11
13
  export type { FieldControlProps, FieldDescriptionProps, FieldErrorProps, FieldItemProps, FieldLabelProps, FieldRootActions, FieldRootProps, FieldValidityProps, FieldValidityState, } from './Field/Field.types';
12
14
  export { InputGroup } from './InputGroup/InputGroup';
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ export { badgeVariants } from './Badge/Badge.variants';
4
4
  export { Button } from './Button/Button';
5
5
  export { buttonVariants } from './Button/Button.variants';
6
6
  export { Input } from './Input/Input';
7
+ export { Autocomplete } from './Autocomplete/Autocomplete';
7
8
  export { Field } from './Field/Field';
8
9
  export { InputGroup } from './InputGroup/InputGroup';
9
10
  export { Card, cardVariants } from './Card/Card';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonid1/design-system",
3
- "version": "7.2.1",
3
+ "version": "7.3.1",
4
4
  "description": "Shared React UI primitives + design tokens (themes, postcss config)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,10 @@
35
35
  "dependencies": {
36
36
  "@tailwindcss/postcss": "^4.2.0",
37
37
  "class-variance-authority": "^0.7.1",
38
- "clsx": "^2.1.1",
38
+ "cn": "0.3.0",
39
39
  "lucide-react": "^1.8.0",
40
40
  "next-themes": "^0.4.6",
41
41
  "react-hotkeys-hook": "^5.2.4",
42
- "tailwind-merge": "^3.5.0",
43
42
  "tailwindcss": "^4.2.0"
44
43
  },
45
44
  "peerDependencies": {
@@ -79,7 +79,7 @@ application components that must retain their own design-system styling.
79
79
  {label}
80
80
  </Link>
81
81
  ```
82
- The `cn(...)` wrap is load-bearing, not cosmetic: `buttonVariants` is cva, which concatenates without merging, so only `cn` (tailwind-merge) drops the variant's own `hover:bg-accent` in favor of the `selected` tint.
82
+ The `cn(...)` wrap is load-bearing, not cosmetic: `buttonVariants` is cva, which concatenates without merging, so only `cn`, which merges conflicting classes, drops the variant's own `hover:bg-accent` in favor of the `selected` tint.
83
83
 
84
84
  ## Visual Language
85
85
 
@@ -56,4 +56,6 @@ A package change is invisible outside this repo until it's published. For releas
56
56
 
57
57
  `pnpm release` is a local agent-run release step, not CI/GitHub automation. It versions packages, publishes to npm, pushes tags, and expects a clean `main`. Run it only for release-ready package work; don't run it for exploratory or unfinished changes.
58
58
 
59
- Stop only for real blockers: failing checks, an unexpected major or breaking release, npm auth/2FA prompts, unrelated dirty work, merge conflicts, an unexpected release prompt, or a release script failure. Otherwise publish and continue.
59
+ **Publishing auth is exclusively `NPM_TOKEN`**, loaded by the packages repo's release script from its gitignored `.env.local` or an explicitly exported environment variable. Never print or commit it. Do not use `npm login`, `pnpm login`, browser/QR CLI login, OTP prompts, `~/.npmrc` session credentials, a direct publish command, or publishing CI as a fallback. If authentication fails, inspect the token's expiry and package write permissions and replace that token in `.env.local`; token rotation in npm's account settings must not become an alternate publishing session.
60
+
61
+ Stop only for real blockers: failing checks, an unexpected major or breaking release, a missing or rejected publishing token, unrelated dirty work, merge conflicts, an unexpected release prompt, or a release script failure. Otherwise publish and continue.