@almach/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/components/alert.d.ts +33 -0
  3. package/dist/components/alert.d.ts.map +1 -0
  4. package/dist/components/alert.js +54 -0
  5. package/dist/components/alert.js.map +1 -0
  6. package/dist/components/avatar.d.ts +15 -0
  7. package/dist/components/avatar.d.ts.map +1 -0
  8. package/dist/components/avatar.js +33 -0
  9. package/dist/components/avatar.js.map +1 -0
  10. package/dist/components/badge.d.ts +10 -0
  11. package/dist/components/badge.d.ts.map +1 -0
  12. package/dist/components/badge.js +24 -0
  13. package/dist/components/badge.js.map +1 -0
  14. package/dist/components/button.d.ts +15 -0
  15. package/dist/components/button.d.ts.map +1 -0
  16. package/dist/components/button.js +47 -0
  17. package/dist/components/button.js.map +1 -0
  18. package/dist/components/calendar.d.ts +4 -0
  19. package/dist/components/calendar.d.ts.map +1 -0
  20. package/dist/components/calendar.js +73 -0
  21. package/dist/components/calendar.js.map +1 -0
  22. package/dist/components/card.d.ts +30 -0
  23. package/dist/components/card.d.ts.map +1 -0
  24. package/dist/components/card.js +54 -0
  25. package/dist/components/card.js.map +1 -0
  26. package/dist/components/carousel.d.ts +21 -0
  27. package/dist/components/carousel.d.ts.map +1 -0
  28. package/dist/components/carousel.js +149 -0
  29. package/dist/components/carousel.js.map +1 -0
  30. package/dist/components/checkbox.d.ts +7 -0
  31. package/dist/components/checkbox.d.ts.map +1 -0
  32. package/dist/components/checkbox.js +9 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/collapsible.d.ts +7 -0
  35. package/dist/components/collapsible.d.ts.map +1 -0
  36. package/dist/components/collapsible.js +19 -0
  37. package/dist/components/collapsible.js.map +1 -0
  38. package/dist/components/combobox.d.ts +11 -0
  39. package/dist/components/combobox.d.ts.map +1 -0
  40. package/dist/components/combobox.js +10 -0
  41. package/dist/components/combobox.js.map +1 -0
  42. package/dist/components/command.d.ts +85 -0
  43. package/dist/components/command.d.ts.map +1 -0
  44. package/dist/components/command.js +46 -0
  45. package/dist/components/command.js.map +1 -0
  46. package/dist/components/dialog.d.ts +36 -0
  47. package/dist/components/dialog.d.ts.map +1 -0
  48. package/dist/components/dialog.js +37 -0
  49. package/dist/components/dialog.js.map +1 -0
  50. package/dist/components/drawer.d.ts +34 -0
  51. package/dist/components/drawer.d.ts.map +1 -0
  52. package/dist/components/drawer.js +36 -0
  53. package/dist/components/drawer.js.map +1 -0
  54. package/dist/components/dropdown-menu.d.ts +30 -0
  55. package/dist/components/dropdown-menu.d.ts.map +1 -0
  56. package/dist/components/dropdown-menu.js +46 -0
  57. package/dist/components/dropdown-menu.js.map +1 -0
  58. package/dist/components/group.d.ts +26 -0
  59. package/dist/components/group.d.ts.map +1 -0
  60. package/dist/components/group.js +13 -0
  61. package/dist/components/group.js.map +1 -0
  62. package/dist/components/input.d.ts +34 -0
  63. package/dist/components/input.d.ts.map +1 -0
  64. package/dist/components/input.js +156 -0
  65. package/dist/components/input.js.map +1 -0
  66. package/dist/components/label.d.ts +7 -0
  67. package/dist/components/label.d.ts.map +1 -0
  68. package/dist/components/label.js +9 -0
  69. package/dist/components/label.js.map +1 -0
  70. package/dist/components/layered-card.d.ts +13 -0
  71. package/dist/components/layered-card.d.ts.map +1 -0
  72. package/dist/components/layered-card.js +13 -0
  73. package/dist/components/layered-card.js.map +1 -0
  74. package/dist/components/modal.d.ts +36 -0
  75. package/dist/components/modal.d.ts.map +1 -0
  76. package/dist/components/modal.js +72 -0
  77. package/dist/components/modal.js.map +1 -0
  78. package/dist/components/progress.d.ts +5 -0
  79. package/dist/components/progress.d.ts.map +1 -0
  80. package/dist/components/progress.js +11 -0
  81. package/dist/components/progress.js.map +1 -0
  82. package/dist/components/radio.d.ts +11 -0
  83. package/dist/components/radio.d.ts.map +1 -0
  84. package/dist/components/radio.js +17 -0
  85. package/dist/components/radio.js.map +1 -0
  86. package/dist/components/select.d.ts +41 -0
  87. package/dist/components/select.d.ts.map +1 -0
  88. package/dist/components/select.js +49 -0
  89. package/dist/components/select.js.map +1 -0
  90. package/dist/components/separator.d.ts +5 -0
  91. package/dist/components/separator.d.ts.map +1 -0
  92. package/dist/components/separator.js +11 -0
  93. package/dist/components/separator.js.map +1 -0
  94. package/dist/components/skeleton.d.ts +6 -0
  95. package/dist/components/skeleton.d.ts.map +1 -0
  96. package/dist/components/skeleton.js +7 -0
  97. package/dist/components/skeleton.js.map +1 -0
  98. package/dist/components/switch.d.ts +11 -0
  99. package/dist/components/switch.d.ts.map +1 -0
  100. package/dist/components/switch.js +44 -0
  101. package/dist/components/switch.js.map +1 -0
  102. package/dist/components/table.d.ts +36 -0
  103. package/dist/components/table.d.ts.map +1 -0
  104. package/dist/components/table.js +77 -0
  105. package/dist/components/table.js.map +1 -0
  106. package/dist/components/tabs.d.ts +18 -0
  107. package/dist/components/tabs.d.ts.map +1 -0
  108. package/dist/components/tabs.js +63 -0
  109. package/dist/components/tabs.js.map +1 -0
  110. package/dist/components/tag-input.d.ts +14 -0
  111. package/dist/components/tag-input.d.ts.map +1 -0
  112. package/dist/components/tag-input.js +53 -0
  113. package/dist/components/tag-input.js.map +1 -0
  114. package/dist/components/textarea.d.ts +7 -0
  115. package/dist/components/textarea.d.ts.map +1 -0
  116. package/dist/components/textarea.js +9 -0
  117. package/dist/components/textarea.js.map +1 -0
  118. package/dist/components/toast.d.ts +19 -0
  119. package/dist/components/toast.d.ts.map +1 -0
  120. package/dist/components/toast.js +51 -0
  121. package/dist/components/toast.js.map +1 -0
  122. package/dist/components/toaster.d.ts +2 -0
  123. package/dist/components/toaster.d.ts.map +1 -0
  124. package/dist/components/toaster.js +11 -0
  125. package/dist/components/toaster.js.map +1 -0
  126. package/dist/components/tooltip.d.ts +9 -0
  127. package/dist/components/tooltip.d.ts.map +1 -0
  128. package/dist/components/tooltip.js +17 -0
  129. package/dist/components/tooltip.js.map +1 -0
  130. package/dist/hooks/use-copy-to-clipboard.d.ts +8 -0
  131. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  132. package/dist/hooks/use-copy-to-clipboard.js +23 -0
  133. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  134. package/dist/hooks/use-media-query.d.ts +7 -0
  135. package/dist/hooks/use-media-query.d.ts.map +1 -0
  136. package/dist/hooks/use-media-query.js +21 -0
  137. package/dist/hooks/use-media-query.js.map +1 -0
  138. package/dist/hooks/use-toast.d.ts +45 -0
  139. package/dist/hooks/use-toast.d.ts.map +1 -0
  140. package/dist/hooks/use-toast.js +102 -0
  141. package/dist/hooks/use-toast.js.map +1 -0
  142. package/dist/index.d.ts +46 -0
  143. package/dist/index.d.ts.map +1 -0
  144. package/dist/index.js +36 -0
  145. package/dist/index.js.map +1 -0
  146. package/package.json +74 -0
  147. package/src/styles/globals.css +241 -0
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ import * as React from "react";
4
+ import { cn } from "@almach/utils";
5
+ /* ── Root ─────────────────────────────────────────────────────────────────── */
6
+ const RadioGroupRoot = React.forwardRef(({ className, ...props }, ref) => (_jsx(RadioGroupPrimitive.Root, { ref: ref, className: cn("grid gap-2", className), ...props })));
7
+ RadioGroupRoot.displayName = "Radio.Group";
8
+ const RadioItem = React.forwardRef(({ className, label, description, id, ...props }, ref) => {
9
+ const innerId = id ?? React.useId();
10
+ return (_jsxs("label", { htmlFor: innerId, className: cn("flex cursor-pointer items-start gap-3", props.disabled && "cursor-not-allowed opacity-50"), children: [_jsx(RadioGroupPrimitive.Item, { ref: ref, id: innerId, className: cn("mt-0.5 flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-full", "border border-input bg-background", "transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", "data-[state=checked]:border-foreground data-[state=checked]:bg-foreground", "disabled:pointer-events-none", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { children: _jsx("span", { className: "block h-2 w-2 rounded-full bg-background" }) }) }), (label || description) && (_jsxs("div", { className: "flex flex-col gap-0.5", children: [label && (_jsx("span", { className: "text-sm font-medium leading-none", children: label })), description && (_jsx("span", { className: "text-xs text-muted-foreground leading-relaxed", children: description }))] }))] }));
11
+ });
12
+ RadioItem.displayName = "Radio.Item";
13
+ /* ── Compound export ──────────────────────────────────────────────────────── */
14
+ export const Radio = Object.assign(RadioGroupRoot, {
15
+ Item: RadioItem,
16
+ });
17
+ //# sourceMappingURL=radio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio.js","sourceRoot":"","sources":["../../src/components/radio.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,iFAAiF;AACjF,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,KAAC,mBAAmB,CAAC,IAAI,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAClC,KAAK,GACR,CACF,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,aAAa,CAAC;AAS3C,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGhC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC1D,MAAM,OAAO,GAAG,EAAE,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IACpC,OAAO,CACN,iBACC,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,EAAE,CACZ,uCAAuC,EACvC,KAAK,CAAC,QAAQ,IAAI,+BAA+B,CACjD,aAED,KAAC,mBAAmB,CAAC,IAAI,IACxB,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,OAAO,EACX,SAAS,EAAE,EAAE,CACZ,iFAAiF,EACjF,mCAAmC,EACnC,mBAAmB,EACnB,4HAA4H,EAC5H,2EAA2E,EAC3E,8BAA8B,EAC9B,SAAS,CACT,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,cAC7B,eAAM,SAAS,EAAC,0CAA0C,GAAG,GAC9B,GACN,EAC1B,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CAC1B,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAK,IAAI,CACT,eAAM,SAAS,EAAC,kCAAkC,YAAE,KAAK,GAAQ,CACjE,EACA,WAAW,IAAI,CACf,eAAM,SAAS,EAAC,+CAA+C,YAC7D,WAAW,GACN,CACP,IACI,CACN,IACM,CACR,CAAC;AACH,CAAC,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,YAAY,CAAC;AAErC,iFAAiF;AACjF,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE;IAClD,IAAI,EAAE,SAAS;CACf,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import * as SelectPrimitive from "@radix-ui/react-select";
2
+ import * as React from "react";
3
+ declare function SelectSeparator({ className, ...props }: React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
4
+ export interface SelectSearchableOption {
5
+ value: string;
6
+ label: string;
7
+ disabled?: boolean;
8
+ }
9
+ export interface SelectSearchableProps {
10
+ options: SelectSearchableOption[];
11
+ value?: string;
12
+ onChange?: (value: string) => void;
13
+ placeholder?: string;
14
+ searchPlaceholder?: string;
15
+ empty?: React.ReactNode;
16
+ disabled?: boolean;
17
+ error?: boolean;
18
+ className?: string;
19
+ }
20
+ declare function SelectSearchable({ options, value, onChange, placeholder, searchPlaceholder, empty, disabled, error, className, }: SelectSearchableProps): import("react/jsx-runtime").JSX.Element;
21
+ declare namespace SelectSearchable {
22
+ var displayName: string;
23
+ }
24
+ declare const Select: React.FC<SelectPrimitive.SelectProps> & {
25
+ Group: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
26
+ Value: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
27
+ Trigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
28
+ error?: boolean;
29
+ } & React.RefAttributes<HTMLButtonElement>>;
30
+ Content: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
31
+ Label: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
32
+ Item: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
33
+ Separator: typeof SelectSeparator;
34
+ ScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
35
+ ScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
36
+ /** Searchable/combobox variant — renders a popover with a search input */
37
+ Searchable: typeof SelectSearchable;
38
+ };
39
+ export { Select };
40
+ export type { SelectSearchableOption as ComboboxOption, SelectSearchableProps as ComboboxProps };
41
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ import { Command as CommandPrimitive } from "cmdk";
5
+ import { Check, ChevronDown, ChevronUp, ChevronsUpDown, Search } from "lucide-react";
6
+ import * as React from "react";
7
+ import { cn } from "@almach/utils";
8
+ /* ── Sub-components ────────────────────────────────────────────────────── */
9
+ const SelectTrigger = React.forwardRef(({ className, children, error, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-9 w-full items-center justify-between gap-2 rounded-lg border border-input bg-background", "px-3 text-sm transition-all outline-none", "hover:border-ring/50 focus:ring-2 focus:ring-ring focus:ring-offset-2", "placeholder:text-muted-foreground", "disabled:cursor-not-allowed disabled:opacity-50", "[&>span]:line-clamp-1", error && "border-destructive focus:ring-destructive", className), "aria-invalid": error, ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50 shrink-0" }) })] })));
10
+ SelectTrigger.displayName = "Select.Trigger";
11
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
12
+ SelectScrollUpButton.displayName = "Select.ScrollUpButton";
13
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
14
+ SelectScrollDownButton.displayName = "Select.ScrollDownButton";
15
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-xl", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "w-[var(--radix-select-trigger-width)] translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: "p-1.5", children: children }), _jsx(SelectScrollDownButton, {})] }) })));
16
+ SelectContent.displayName = "Select.Content";
17
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", className), ...props })));
18
+ SelectLabel.displayName = "Select.Label";
19
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-lg py-1.5 pl-8 pr-2 text-sm outline-none", "focus:bg-accent focus:text-accent-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
20
+ SelectItem.displayName = "Select.Item";
21
+ function SelectSeparator({ className, ...props }) {
22
+ return (_jsx(SelectPrimitive.Separator, { className: cn("-mx-1.5 my-1 h-px bg-border", className), ...props }));
23
+ }
24
+ function SelectSearchable({ options, value, onChange, placeholder = "Select…", searchPlaceholder = "Search…", empty = "No results.", disabled, error, className, }) {
25
+ const [open, setOpen] = React.useState(false);
26
+ const selected = options.find((o) => o.value === value);
27
+ const handleSelect = (val) => {
28
+ onChange?.(val === value ? "" : val);
29
+ setOpen(false);
30
+ };
31
+ return (_jsxs(PopoverPrimitive.Root, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverPrimitive.Trigger, { asChild: true, children: _jsxs("button", { type: "button", role: "combobox", "aria-expanded": open, "aria-haspopup": "listbox", disabled: disabled, className: cn("flex h-9 w-full items-center justify-between rounded-lg border border-input bg-background px-3 text-sm", "transition-all outline-none", "hover:border-ring/50 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", error && "border-destructive focus-visible:ring-destructive", !selected && "text-muted-foreground", className), children: [_jsx("span", { className: "truncate", children: selected?.label ?? placeholder }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { className: cn("z-50 w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-xl border bg-popover p-0 shadow-xl", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "translate-y-1"), align: "start", sideOffset: 4, children: _jsxs(CommandPrimitive, { className: "flex flex-col", "aria-label": placeholder, children: [_jsxs("div", { className: "flex items-center gap-2 border-b px-3", "cmdk-input-wrapper": "", children: [_jsx(Search, { className: "h-4 w-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }), _jsx(CommandPrimitive.Input, { placeholder: searchPlaceholder, "aria-label": searchPlaceholder, className: "flex h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground" })] }), _jsxs(CommandPrimitive.List, { className: "max-h-56 overflow-y-auto p-1", role: "listbox", "aria-label": "Options", children: [_jsx(CommandPrimitive.Empty, { className: "py-4 text-center text-sm text-muted-foreground", children: empty }), options.map((opt) => (_jsxs(CommandPrimitive.Item, { value: opt.value, ...(opt.disabled !== undefined && { disabled: opt.disabled }), onSelect: handleSelect, role: "option", "aria-selected": value === opt.value, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none", "transition-colors", "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50"), children: [_jsx(Check, { className: cn("h-4 w-4 shrink-0", value === opt.value ? "opacity-100" : "opacity-0"), "aria-hidden": "true" }), opt.label] }, opt.value)))] })] }) }) })] }));
32
+ }
33
+ SelectSearchable.displayName = "Select.Searchable";
34
+ /* ── Compound export ───────────────────────────────────────────────────── */
35
+ const Select = Object.assign(SelectPrimitive.Root, {
36
+ Group: SelectPrimitive.Group,
37
+ Value: SelectPrimitive.Value,
38
+ Trigger: SelectTrigger,
39
+ Content: SelectContent,
40
+ Label: SelectLabel,
41
+ Item: SelectItem,
42
+ Separator: SelectSeparator,
43
+ ScrollUpButton: SelectScrollUpButton,
44
+ ScrollDownButton: SelectScrollDownButton,
45
+ /** Searchable/combobox variant — renders a popover with a search input */
46
+ Searchable: SelectSearchable,
47
+ });
48
+ export { Select };
49
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,8EAA8E;AAC9E,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,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AE,YAAY,EACtB,IAAI,EAAC,QAAQ,mBACE,KAAK,KAAK,GAAG,CAAC,KAAK,EAClC,SAAS,EAAE,EAAE,CACZ,yGAAyG,EACzG,mBAAmB,EACnB,4EAA4E,EAC5E,0EAA0E,CAC1E,aAED,KAAC,KAAK,IACL,SAAS,EAAE,EAAE,CACZ,kBAAkB,EAClB,KAAK,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CACjD,iBACW,MAAM,GACjB,EACD,GAAG,CAAC,KAAK,KApBL,GAAG,CAAC,KAAK,CAqBS,CACxB,CAAC,IACqB,IACN,GACO,GACF,IACH,CACxB,CAAC;AACH,CAAC;AACD,gBAAgB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAEnD,8EAA8E;AAC9E,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,EAAE;IAClD,KAAK,EAAE,eAAe,CAAC,KAAK;IAC5B,KAAK,EAAE,eAAe,CAAC,KAAK;IAC5B,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,eAAe;IAC1B,cAAc,EAAE,oBAAoB;IACpC,gBAAgB,EAAE,sBAAsB;IACxC,0EAA0E;IAC1E,UAAU,EAAE,gBAAgB;CAC5B,CAAC,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
2
+ import * as React from "react";
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
5
+ //# sourceMappingURL=separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,SAAS,6JAsBd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
+ import * as React from "react";
5
+ import { cn } from "@almach/utils";
6
+ const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border", orientation === "horizontal"
7
+ ? "h-px w-full"
8
+ : "h-full w-px", className), ...props })));
9
+ Separator.displayName = SeparatorPrimitive.Root.displayName;
10
+ export { Separator };
11
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAIjC,CACC,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EACtE,GAAG,EACF,EAAE,CAAC,CACJ,KAAC,kBAAkB,CAAC,IAAI,IACvB,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,CACZ,oBAAoB,EACpB,WAAW,KAAK,YAAY;QAC3B,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,aAAa,EAChB,SAAS,CACT,KACG,KAAK,GACR,CACF,CACD,CAAC;AACF,SAAS,CAAC,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ declare function Skeleton({ className, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
5
+ export { Skeleton };
6
+ //# sourceMappingURL=skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAI;AAExE,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAOvD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "@almach/utils";
3
+ function Skeleton({ className, ...props }) {
4
+ return (_jsx("div", { className: cn("rounded-md skeleton-shimmer", className), ...props }));
5
+ }
6
+ export { Skeleton };
7
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/components/skeleton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAInC,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAiB;IACvD,OAAO,CACN,cACC,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,KACnD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
+ declare const switchTrack: (props?: ({
5
+ size?: "default" | "sm" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>, VariantProps<typeof switchTrack> {
8
+ }
9
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export { Switch };
11
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,WAAW;;8EAqBhB,CAAC;AAsBF,MAAM,WAAW,WAChB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,EACnE,YAAY,CAAC,OAAO,WAAW,CAAC;CAAI;AAErC,QAAA,MAAM,MAAM,uFAWV,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ import { cva } from "class-variance-authority";
4
+ import * as React from "react";
5
+ import { cn } from "@almach/utils";
6
+ /* ── Variants ─────────────────────────────────────────────────────────────── */
7
+ const switchTrack = cva([
8
+ "relative inline-flex shrink-0 cursor-pointer items-center rounded-full",
9
+ "border-2 border-transparent",
10
+ "transition-colors duration-200 ease-[cubic-bezier(0.25,0.46,0.45,0.94)]",
11
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",
12
+ "disabled:cursor-not-allowed disabled:opacity-50",
13
+ // Uses CSS variables from globals.css — override --switch-on / --switch-off to theme
14
+ // Note: --switch-on/off are full color values (e.g. hsl(...)), so use var() directly
15
+ "bg-[var(--switch-off)] data-[state=checked]:bg-[var(--switch-on)]",
16
+ ], {
17
+ variants: {
18
+ size: {
19
+ sm: "h-[22px] w-[38px]",
20
+ default: "h-[28px] w-[48px]",
21
+ lg: "h-[34px] w-[60px]",
22
+ },
23
+ },
24
+ defaultVariants: { size: "default" },
25
+ });
26
+ const switchThumb = cva([
27
+ "pointer-events-none block rounded-full bg-white",
28
+ // Shadow makes thumb visible on any background color in both light and dark modes
29
+ "shadow-[0_1px_3px_rgba(0,0,0,0.35)] ring-1 ring-black/[0.08]",
30
+ "transition-transform duration-200 ease-[cubic-bezier(0.25,0.46,0.45,0.94)]",
31
+ ], {
32
+ variants: {
33
+ size: {
34
+ sm: "h-[16px] w-[16px] data-[state=checked]:translate-x-[16px] data-[state=unchecked]:translate-x-0",
35
+ default: "h-[22px] w-[22px] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",
36
+ lg: "h-[28px] w-[28px] data-[state=checked]:translate-x-[26px] data-[state=unchecked]:translate-x-0",
37
+ },
38
+ },
39
+ defaultVariants: { size: "default" },
40
+ });
41
+ const Switch = React.forwardRef(({ className, size, ...props }, ref) => (_jsx(SwitchPrimitive.Root, { ref: ref, className: cn(switchTrack({ size }), className), ...props, children: _jsx(SwitchPrimitive.Thumb, { className: switchThumb({ size }) }) })));
42
+ Switch.displayName = "Switch";
43
+ export { Switch };
44
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,O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react";
2
+ import { type ColumnDef } from "@tanstack/react-table";
3
+ export type { ColumnDef };
4
+ declare function TableRoot({ className, ...props }: React.HTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TableHeader({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TableBody({ className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
7
+ declare function TableRow({ className, ...props }: React.HTMLAttributes<HTMLTableRowElement>): import("react/jsx-runtime").JSX.Element;
8
+ declare function TableHead({ className, ...props }: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
9
+ declare function TableCell({ className, ...props }: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
10
+ declare function TableCaption({ className, ...props }: React.HTMLAttributes<HTMLTableCaptionElement>): import("react/jsx-runtime").JSX.Element;
11
+ interface DataTableProps<TData, TValue> {
12
+ columns: ColumnDef<TData, TValue>[];
13
+ data: TData[];
14
+ /** Enable column sorting */
15
+ sortable?: boolean;
16
+ /** Enable global filter (search) */
17
+ filterable?: boolean;
18
+ /** Enable pagination */
19
+ paginated?: boolean;
20
+ /** Rows per page. Default: 10 */
21
+ pageSize?: number;
22
+ /** Show row count + pagination controls */
23
+ showFooter?: boolean;
24
+ className?: string;
25
+ }
26
+ declare function DataTable<TData, TValue>({ columns, data, sortable, filterable, paginated, pageSize, showFooter, className, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
27
+ export declare const Table: typeof TableRoot & {
28
+ Header: typeof TableHeader;
29
+ Body: typeof TableBody;
30
+ Row: typeof TableRow;
31
+ Head: typeof TableHead;
32
+ Cell: typeof TableCell;
33
+ Caption: typeof TableCaption;
34
+ Data: typeof DataTable;
35
+ };
36
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":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,OAAO,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EACjC,OAAO,EACP,IAAI,EACJ,QAAgB,EAChB,UAAkB,EAClB,SAAiB,EACjB,QAAa,EACb,UAAiB,EACjB,SAAS,GACT,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,2CAkJ/B;AAGD,eAAO,MAAM,KAAK;;;;;;;;CAQhB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { flexRender, getCoreRowModel, getSortedRowModel, getFilteredRowModel, getPaginationRowModel, useReactTable, } from "@tanstack/react-table";
4
+ import { ChevronDown, ChevronUp, ChevronsUpDown } from "lucide-react";
5
+ import { cn } from "@almach/utils";
6
+ import { Button } from "./button";
7
+ /* ─── Primitive HTML table parts ──────────────────────────────────────────── */
8
+ function TableRoot({ className, ...props }) {
9
+ return (_jsx("div", { className: "w-full overflow-auto rounded-xl border", children: _jsx("table", { className: cn("w-full caption-bottom text-sm", className), ...props }) }));
10
+ }
11
+ function TableHeader({ className, ...props }) {
12
+ return (_jsx("thead", { className: cn("[&_tr]:border-b [&_tr]:bg-muted/50", className), ...props }));
13
+ }
14
+ function TableBody({ className, ...props }) {
15
+ return (_jsx("tbody", { className: cn("[&_tr:last-child]:border-0", className), ...props }));
16
+ }
17
+ function TableRow({ className, ...props }) {
18
+ return (_jsx("tr", { className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className), ...props }));
19
+ }
20
+ function TableHead({ className, ...props }) {
21
+ return (_jsx("th", { className: cn("h-10 px-4 text-left align-middle font-medium text-muted-foreground", "[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
22
+ }
23
+ function TableCell({ className, ...props }) {
24
+ return (_jsx("td", { className: cn("px-4 py-3 align-middle", "[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
25
+ }
26
+ function TableCaption({ className, ...props }) {
27
+ return (_jsx("caption", { className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
28
+ }
29
+ function DataTable({ columns, data, sortable = false, filterable = false, paginated = false, pageSize = 10, showFooter = true, className, }) {
30
+ const [sorting, setSorting] = React.useState([]);
31
+ const [columnFilters, setColumnFilters] = React.useState([]);
32
+ const [columnVisibility, setColumnVisibility] = React.useState({});
33
+ const [rowSelection, setRowSelection] = React.useState({});
34
+ const [globalFilter, setGlobalFilter] = React.useState("");
35
+ const table = useReactTable({
36
+ data,
37
+ columns,
38
+ state: {
39
+ sorting,
40
+ columnFilters,
41
+ columnVisibility,
42
+ rowSelection,
43
+ globalFilter,
44
+ pagination: { pageIndex: 0, pageSize },
45
+ },
46
+ onSortingChange: setSorting,
47
+ onColumnFiltersChange: setColumnFilters,
48
+ onColumnVisibilityChange: setColumnVisibility,
49
+ onRowSelectionChange: setRowSelection,
50
+ onGlobalFilterChange: setGlobalFilter,
51
+ getCoreRowModel: getCoreRowModel(),
52
+ ...(sortable && { getSortedRowModel: getSortedRowModel() }),
53
+ ...(filterable && { getFilteredRowModel: getFilteredRowModel() }),
54
+ ...(paginated && { getPaginationRowModel: getPaginationRowModel() }),
55
+ enableSorting: sortable,
56
+ enableGlobalFilter: filterable,
57
+ enableRowSelection: true,
58
+ });
59
+ return (_jsxs("div", { className: cn("space-y-3", className), children: [filterable && (_jsx("input", { value: globalFilter, onChange: (e) => setGlobalFilter(e.target.value), placeholder: "Search\u2026", className: "flex h-9 w-full max-w-xs rounded-lg border bg-background px-3 text-sm outline-none ring-offset-background placeholder:text-muted-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" })), _jsxs(TableRoot, { children: [_jsx(TableHeader, { children: table.getHeaderGroups().map((hg) => (_jsx(TableRow, { children: hg.headers.map((header) => {
60
+ const canSort = header.column.getCanSort();
61
+ const sorted = header.column.getIsSorted();
62
+ return (_jsx(TableHead, { colSpan: header.colSpan, children: header.isPlaceholder ? null : canSort ? (_jsxs("button", { className: "inline-flex items-center gap-1.5 font-medium text-muted-foreground hover:text-foreground transition-colors", onClick: header.column.getToggleSortingHandler(), children: [flexRender(header.column.columnDef.header, header.getContext()), sorted === "asc" ? (_jsx(ChevronUp, { className: "h-3.5 w-3.5" })) : sorted === "desc" ? (_jsx(ChevronDown, { className: "h-3.5 w-3.5" })) : (_jsx(ChevronsUpDown, { className: "h-3.5 w-3.5 opacity-50" }))] })) : (flexRender(header.column.columnDef.header, header.getContext())) }, header.id));
63
+ }) }, hg.id))) }), _jsx(TableBody, { children: table.getRowModel().rows.length ? (table.getRowModel().rows.map((row) => (_jsx(TableRow, { "data-state": row.getIsSelected() ? "selected" : undefined, children: row.getVisibleCells().map((cell) => (_jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: columns.length, className: "h-24 text-center text-muted-foreground", children: "No results." }) })) })] }), showFooter && (_jsxs("div", { className: "flex items-center justify-between text-sm text-muted-foreground", children: [_jsxs("span", { children: [table.getFilteredSelectedRowModel().rows.length > 0
64
+ ? `${table.getFilteredSelectedRowModel().rows.length} of `
65
+ : "", table.getFilteredRowModel().rows.length, " row", table.getFilteredRowModel().rows.length !== 1 ? "s" : ""] }), paginated && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: "Previous" }), _jsxs("span", { className: "text-xs", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: "Next" })] }))] }))] }));
66
+ }
67
+ /* ─── Compound export ─────────────────────────────────────────────────────── */
68
+ export const Table = Object.assign(TableRoot, {
69
+ Header: TableHeader,
70
+ Body: TableBody,
71
+ Row: TableRow,
72
+ Head: TableHead,
73
+ Cell: TableCell,
74
+ Caption: TableCaption,
75
+ Data: DataTable,
76
+ });
77
+ //# sourceMappingURL=table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAMN,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,GACb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAKlC,iFAAiF;AACjF,SAAS,SAAS,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACgC;IACxC,OAAO,CACN,cAAK,SAAS,EAAC,wCAAwC,YACtD,gBACC,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACR,GACG,CACN,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACuC;IAC/C,OAAO,CACN,gBACC,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,KAC1D,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACuC;IAC/C,OAAO,CACN,gBACC,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClD,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAA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AC,UAAU,CAAC,SAAS,GAAG,CAAC,SAAK,GAAG,EACtD,KAAK,CAAC,YAAY,EAAE,IACf,EACP,KAAC,MAAM,IACN,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,EAC/B,QAAQ,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,qBAGzB,IACJ,CACN,IACI,CACN,IACI,CACN,CAAC;AACH,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;IAC7C,MAAM,EAAE,WAAW;IACnB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,QAAQ;IACb,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,SAAS;CACf,CAAC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import * as React from "react";
4
+ declare const tabsListVariants: (props?: ({
5
+ variant?: "underline" | "pill" | "minimal" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare const tabsTriggerVariants: (props?: ({
8
+ variant?: "underline" | "pill" | "minimal" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ interface TabsListProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>, VariantProps<typeof tabsListVariants> {
11
+ }
12
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>> & {
13
+ List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
14
+ Trigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ Content: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ };
17
+ export { Tabs, tabsListVariants, tabsTriggerVariants };
18
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,gBAAgB;;8EAYrB,CAAC;AAEF,QAAA,MAAM,mBAAmB;;8EA8BxB,CAAC;AAMF,UAAU,aACT,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EACjE,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAI;AAkD1C,QAAA,MAAM,IAAI;;;;CAIR,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ import { cva } from "class-variance-authority";
4
+ import * as React from "react";
5
+ import { cn } from "@almach/utils";
6
+ /* ── TabsList variants ─────────────────────────────────────────────────── */
7
+ const tabsListVariants = cva("inline-flex items-center", {
8
+ variants: {
9
+ variant: {
10
+ pill: "gap-1 rounded-xl bg-muted p-1",
11
+ underline: "gap-0 border-b border-border",
12
+ minimal: "gap-4",
13
+ },
14
+ },
15
+ defaultVariants: { variant: "pill" },
16
+ });
17
+ const tabsTriggerVariants = cva("inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all outline-none", {
18
+ variants: {
19
+ variant: {
20
+ pill: [
21
+ "rounded-lg px-3 py-1.5 text-muted-foreground",
22
+ "hover:text-foreground",
23
+ "data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
24
+ "focus-visible:ring-2 focus-visible:ring-ring",
25
+ "disabled:pointer-events-none disabled:opacity-50",
26
+ ],
27
+ underline: [
28
+ "relative px-4 py-2 text-muted-foreground border-b-2 border-transparent -mb-px",
29
+ "hover:text-foreground",
30
+ "data-[state=active]:border-foreground data-[state=active]:text-foreground",
31
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
32
+ "disabled:pointer-events-none disabled:opacity-50",
33
+ ],
34
+ minimal: [
35
+ "px-0 py-1.5 text-muted-foreground",
36
+ "hover:text-foreground",
37
+ "data-[state=active]:text-foreground data-[state=active]:font-semibold",
38
+ "focus-visible:ring-2 focus-visible:ring-ring",
39
+ "disabled:pointer-events-none disabled:opacity-50",
40
+ ],
41
+ },
42
+ },
43
+ defaultVariants: { variant: "pill" },
44
+ });
45
+ /* ── Variant context ───────────────────────────────────────────────────── */
46
+ const TabsVariantCtx = React.createContext("pill");
47
+ const TabsList = React.forwardRef(({ className, variant = "pill", children, ...props }, ref) => (_jsx(TabsVariantCtx.Provider, { value: variant ?? "pill", children: _jsx(TabsPrimitive.List, { ref: ref, className: cn(tabsListVariants({ variant }), className), ...props, children: children }) })));
48
+ TabsList.displayName = "Tabs.List";
49
+ const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => {
50
+ const variant = React.useContext(TabsVariantCtx);
51
+ return (_jsx(TabsPrimitive.Trigger, { ref: ref, className: cn(tabsTriggerVariants({ variant }), className), ...props }));
52
+ });
53
+ TabsTrigger.displayName = "Tabs.Trigger";
54
+ const TabsContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(TabsPrimitive.Content, { ref: ref, className: cn("mt-3 outline-none", "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-lg", className), ...props })));
55
+ TabsContent.displayName = "Tabs.Content";
56
+ /* ── Compound export ───────────────────────────────────────────────────── */
57
+ const Tabs = Object.assign(TabsPrimitive.Root, {
58
+ List: TabsList,
59
+ Trigger: TabsTrigger,
60
+ Content: TabsContent,
61
+ });
62
+ export { Tabs, tabsListVariants, tabsTriggerVariants };
63
+ //# sourceMappingURL=tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,8EAA8E;AAC9E,MAAM,gBAAgB,GAAG,GAAG,CAC3B,0BAA0B,EAC1B;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,IAAI,EAAE,+BAA+B;YACrC,SAAS,EAAE,8BAA8B;YACzC,OAAO,EAAE,OAAO;SAChB;KACD;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CACpC,CACD,CAAC;AAEF,MAAM,mBAAmB,GAAG,GAAG,CAC9B,2GAA2G,EAC3G;IACC,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,8CAA8C;gBAC9C,uBAAuB;gBACvB,qGAAqG;gBACrG,8CAA8C;gBAC9C,kDAAkD;aAClD;YACD,SAAS,EAAE;gBACV,+EAA+E;gBAC/E,uBAAuB;gBACvB,2EAA2E;gBAC3E,0EAA0E;gBAC1E,kDAAkD;aAClD;YACD,OAAO,EAAE;gBACR,mCAAmC;gBACnC,uBAAuB;gBACvB,uEAAuE;gBACvE,8CAA8C;gBAC9C,kDAAkD;aAClD;SACD;KACD;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CACpC,CACD,CAAC;AAEF,8EAA8E;AAC9E,MAAM,cAAc,GAAG,KAAK,CAAC,aAAa,C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AAEzC,8EAA8E;AAC9E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;IAC9C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;CACpB,CAAC,CAAC;AAEH,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ export interface TagInputProps {
2
+ id?: string;
3
+ value?: string[];
4
+ onChange?: (tags: string[]) => void;
5
+ placeholder?: string;
6
+ max?: number;
7
+ disabled?: boolean;
8
+ error?: boolean;
9
+ /** Called to validate/transform a tag before adding. Return null to reject. */
10
+ transform?: (tag: string) => string | null;
11
+ className?: string;
12
+ }
13
+ export declare function TagInput({ id, value, onChange, placeholder, max, disabled, error, transform, className, }: TagInputProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=tag-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-input.d.ts","sourceRoot":"","sources":["../../src/components/tag-input.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,aAAa;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,wBAAgB,QAAQ,CAAC,EACxB,EAAE,EACF,KAAK,EACL,QAAQ,EACR,WAAwB,EACxB,GAAG,EACH,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,GACT,EAAE,aAAa,2CA4Ff"}
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { X } from "lucide-react";
4
+ import * as React from "react";
5
+ import { cn } from "@almach/utils";
6
+ /* ── TagInput ─────────────────────────────────────────────────────────────── */
7
+ export function TagInput({ id, value, onChange, placeholder = "Add tag…", max, disabled, error, transform, className, }) {
8
+ const [tags, setTags] = React.useState(value ?? []);
9
+ // id passed to the inner input for label association
10
+ const [input, setInput] = React.useState("");
11
+ const inputRef = React.useRef(null);
12
+ // Sync from controlled value
13
+ React.useEffect(() => {
14
+ if (value !== undefined)
15
+ setTags(value);
16
+ }, [value]);
17
+ const emit = (next) => {
18
+ setTags(next);
19
+ onChange?.(next);
20
+ };
21
+ const addTag = (raw) => {
22
+ const trimmed = raw.trim();
23
+ if (!trimmed)
24
+ return;
25
+ const processed = transform ? transform(trimmed) : trimmed;
26
+ if (processed === null)
27
+ return;
28
+ if (tags.includes(processed))
29
+ return;
30
+ if (max !== undefined && tags.length >= max)
31
+ return;
32
+ emit([...tags, processed]);
33
+ setInput("");
34
+ };
35
+ const removeTag = (index) => {
36
+ emit(tags.filter((_, i) => i !== index));
37
+ };
38
+ const handleKeyDown = (e) => {
39
+ if (e.key === "Enter" || e.key === ",") {
40
+ e.preventDefault();
41
+ addTag(input);
42
+ }
43
+ if (e.key === "Backspace" && !input && tags.length > 0) {
44
+ removeTag(tags.length - 1);
45
+ }
46
+ };
47
+ const isAtMax = max !== undefined && tags.length >= max;
48
+ return (_jsxs("div", { className: cn("flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-lg border bg-background px-2.5 py-1.5", "ring-offset-background transition-colors", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2", error && "border-destructive focus-within:ring-destructive", disabled && "cursor-not-allowed opacity-50", className), onClick: () => inputRef.current?.focus(), children: [tags.map((tag, i) => (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs font-medium text-secondary-foreground", children: [tag, !disabled && (_jsx("button", { type: "button", onClick: (e) => {
49
+ e.stopPropagation();
50
+ removeTag(i);
51
+ }, className: "flex h-3.5 w-3.5 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground focus:outline-none", "aria-label": `Remove ${tag}`, children: _jsx(X, { className: "h-2.5 w-2.5" }) }))] }, tag))), !isAtMax && !disabled && (_jsx("input", { ref: inputRef, id: id, value: input, onChange: (e) => setInput(e.target.value), onKeyDown: handleKeyDown, onBlur: () => addTag(input), placeholder: tags.length === 0 ? placeholder : "", className: "min-w-[6rem] flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground", disabled: disabled }))] }));
52
+ }
53
+ //# sourceMappingURL=tag-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-input.js","sourceRoot":"","sources":["../../src/components/tag-input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAgBnC,iFAAiF;AACjF,MAAM,UAAU,QAAQ,CAAC,EACxB,EAAE,EACF,KAAK,EACL,QAAQ,EACR,WAAW,GAAG,UAAU,EACxB,GAAG,EACH,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,GACM;IACf,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAW,KAAK,IAAI,EAAE,CAAC,CAAC;IAC9D,qDAAqD;IACrD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEtD,6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a,EACxB,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3B,WAAW,EAAE,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EACjD,SAAS,EAAC,2FAA2F,EACrG,QAAQ,EAAE,QAAQ,GACjB,CACF,IACI,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ error?: boolean;
4
+ }
5
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
6
+ export { Textarea };
7
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/components/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,aAChB,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;IACzD,KAAK,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,QAAA,MAAM,QAAQ,2FAoBb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC"}