@alpic-ai/ui 0.0.0-dev.g850e581 → 0.0.0-dev.g8868278

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 (57) hide show
  1. package/dist/components/accordion-card.d.mts +5 -6
  2. package/dist/components/accordion.d.mts +5 -6
  3. package/dist/components/alert.d.mts +9 -11
  4. package/dist/components/attachment-tile.d.mts +1 -3
  5. package/dist/components/avatar.d.mts +8 -10
  6. package/dist/components/badge.d.mts +2 -4
  7. package/dist/components/breadcrumb.d.mts +10 -11
  8. package/dist/components/button.d.mts +6 -8
  9. package/dist/components/card.d.mts +9 -10
  10. package/dist/components/checkbox.d.mts +2 -3
  11. package/dist/components/collapsible.d.mts +4 -5
  12. package/dist/components/combobox.d.mts +12 -11
  13. package/dist/components/combobox.mjs +7 -4
  14. package/dist/components/command.d.mts +9 -10
  15. package/dist/components/copyable.d.mts +2 -3
  16. package/dist/components/description-list.d.mts +5 -6
  17. package/dist/components/dialog.d.mts +15 -17
  18. package/dist/components/dropdown-menu.d.mts +18 -20
  19. package/dist/components/form.d.mts +38 -21
  20. package/dist/components/form.mjs +6 -6
  21. package/dist/components/github-button.d.mts +1 -2
  22. package/dist/components/input-group.d.mts +5 -7
  23. package/dist/components/input.d.mts +4 -5
  24. package/dist/components/input.mjs +2 -2
  25. package/dist/components/label.d.mts +2 -3
  26. package/dist/components/page-loader.d.mts +1 -3
  27. package/dist/components/pagination.d.mts +3 -4
  28. package/dist/components/popover.d.mts +5 -6
  29. package/dist/components/radio-group.d.mts +3 -4
  30. package/dist/components/scroll-area.d.mts +3 -4
  31. package/dist/components/select-trigger-variants.d.mts +1 -3
  32. package/dist/components/select.d.mts +9 -10
  33. package/dist/components/separator.d.mts +2 -3
  34. package/dist/components/sheet.d.mts +11 -12
  35. package/dist/components/shimmer-text.d.mts +2 -2
  36. package/dist/components/sidebar.d.mts +34 -36
  37. package/dist/components/sidebar.mjs +10 -10
  38. package/dist/components/skeleton.d.mts +2 -4
  39. package/dist/components/sonner.d.mts +5 -6
  40. package/dist/components/spinner.d.mts +3 -5
  41. package/dist/components/status-dot.d.mts +2 -4
  42. package/dist/components/switch.d.mts +2 -3
  43. package/dist/components/table.d.mts +10 -11
  44. package/dist/components/tabs.d.mts +12 -14
  45. package/dist/components/tag.d.mts +3 -5
  46. package/dist/components/task-progress.d.mts +1 -3
  47. package/dist/components/textarea.d.mts +3 -4
  48. package/dist/components/textarea.mjs +2 -2
  49. package/dist/components/toggle-group.d.mts +4 -6
  50. package/dist/components/toggle-group.mjs +3 -3
  51. package/dist/components/tooltip-icon-button.d.mts +1 -2
  52. package/dist/components/tooltip.d.mts +5 -6
  53. package/dist/components/typography.d.mts +4 -5
  54. package/dist/components/wizard.d.mts +4 -5
  55. package/dist/hooks/use-mobile.mjs +3 -3
  56. package/package.json +26 -26
  57. package/src/components/combobox.tsx +9 -2
@@ -1,14 +1,12 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import { VariantProps } from "class-variance-authority";
3
- import * as React from "react";
2
+ import * as React$1 from "react";
4
3
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
- import * as _$class_variance_authority_types0 from "class-variance-authority/types";
6
4
 
7
5
  //#region src/components/toggle-group.d.ts
8
6
  declare const toggleGroupItemVariants: (props?: ({
9
7
  variant?: "default" | "outline" | null | undefined;
10
8
  size?: "default" | "sm" | null | undefined;
11
- } & _$class_variance_authority_types0.ClassProp) | undefined) => string;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
10
  type ToggleGroupContextValue = VariantProps<typeof toggleGroupItemVariants>;
13
11
  declare function ToggleGroup({
14
12
  className,
@@ -16,13 +14,13 @@ declare function ToggleGroup({
16
14
  size,
17
15
  children,
18
16
  ...props
19
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & ToggleGroupContextValue): _$react_jsx_runtime0.JSX.Element;
17
+ }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & ToggleGroupContextValue): React$1.JSX.Element;
20
18
  declare function ToggleGroupItem({
21
19
  className,
22
20
  children,
23
21
  variant,
24
22
  size,
25
23
  ...props
26
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleGroupItemVariants>): _$react_jsx_runtime0.JSX.Element;
24
+ }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleGroupItemVariants>): React$1.JSX.Element;
27
25
  //#endregion
28
26
  export { ToggleGroup, ToggleGroupItem, toggleGroupItemVariants };
@@ -2,7 +2,7 @@
2
2
  import { cn } from "../lib/cn.mjs";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { cva } from "class-variance-authority";
5
- import * as React from "react";
5
+ import * as React$1 from "react";
6
6
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
7
7
  //#region src/components/toggle-group.tsx
8
8
  const toggleGroupItemVariants = cva([
@@ -36,7 +36,7 @@ const toggleGroupItemVariants = cva([
36
36
  size: "default"
37
37
  }
38
38
  });
39
- const ToggleGroupContext = React.createContext({
39
+ const ToggleGroupContext = React$1.createContext({
40
40
  size: "default",
41
41
  variant: "default"
42
42
  });
@@ -55,7 +55,7 @@ function ToggleGroup({ className, variant, size, children, ...props }) {
55
55
  });
56
56
  }
57
57
  function ToggleGroupItem({ className, children, variant, size, ...props }) {
58
- const context = React.useContext(ToggleGroupContext);
58
+ const context = React$1.useContext(ToggleGroupContext);
59
59
  const resolvedVariant = context.variant ?? variant;
60
60
  const resolvedSize = context.size ?? size;
61
61
  return /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, {
@@ -1,5 +1,4 @@
1
1
  import { Button } from "./button.mjs";
2
- import * as _$react from "react";
3
2
  import { ComponentPropsWithRef } from "react";
4
3
 
5
4
  //#region src/components/tooltip-icon-button.d.ts
@@ -7,6 +6,6 @@ type TooltipIconButtonProps = ComponentPropsWithRef<typeof Button> & {
7
6
  tooltip: string;
8
7
  side?: "top" | "bottom" | "left" | "right";
9
8
  };
10
- declare const TooltipIconButton: _$react.ForwardRefExoticComponent<Omit<TooltipIconButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
9
+ declare const TooltipIconButton: import("react").ForwardRefExoticComponent<Omit<TooltipIconButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
11
10
  //#endregion
12
11
  export { TooltipIconButton, type TooltipIconButtonProps };
@@ -1,23 +1,22 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
- import * as React from "react";
1
+ import * as React$1 from "react";
3
2
  import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
3
 
5
4
  //#region src/components/tooltip.d.ts
6
5
  declare function TooltipProvider({
7
6
  delayDuration,
8
7
  ...props
9
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>): _$react_jsx_runtime0.JSX.Element;
8
+ }: React$1.ComponentProps<typeof TooltipPrimitive.Provider>): React$1.JSX.Element;
10
9
  declare function Tooltip({
11
10
  ...props
12
- }: React.ComponentProps<typeof TooltipPrimitive.Root>): _$react_jsx_runtime0.JSX.Element;
11
+ }: React$1.ComponentProps<typeof TooltipPrimitive.Root>): React$1.JSX.Element;
13
12
  declare function TooltipTrigger({
14
13
  ...props
15
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): _$react_jsx_runtime0.JSX.Element;
14
+ }: React$1.ComponentProps<typeof TooltipPrimitive.Trigger>): React$1.JSX.Element;
16
15
  declare function TooltipContent({
17
16
  className,
18
17
  sideOffset,
19
18
  children,
20
19
  ...props
21
- }: React.ComponentProps<typeof TooltipPrimitive.Content>): _$react_jsx_runtime0.JSX.Element;
20
+ }: React$1.ComponentProps<typeof TooltipPrimitive.Content>): React$1.JSX.Element;
22
21
  //#endregion
23
22
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -1,4 +1,3 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
1
  import { ReactNode } from "react";
3
2
 
4
3
  //#region src/components/typography.d.ts
@@ -8,27 +7,27 @@ declare function H1({
8
7
  }: {
9
8
  children: ReactNode;
10
9
  className?: string;
11
- }): _$react_jsx_runtime0.JSX.Element;
10
+ }): import("react").JSX.Element;
12
11
  declare function H2({
13
12
  children,
14
13
  className
15
14
  }: {
16
15
  children: ReactNode;
17
16
  className?: string;
18
- }): _$react_jsx_runtime0.JSX.Element;
17
+ }): import("react").JSX.Element;
19
18
  declare function H3({
20
19
  children,
21
20
  className
22
21
  }: {
23
22
  children: ReactNode;
24
23
  className?: string;
25
- }): _$react_jsx_runtime0.JSX.Element;
24
+ }): import("react").JSX.Element;
26
25
  declare function H4({
27
26
  children,
28
27
  className
29
28
  }: {
30
29
  children: ReactNode;
31
30
  className?: string;
32
- }): _$react_jsx_runtime0.JSX.Element;
31
+ }): import("react").JSX.Element;
33
32
  //#endregion
34
33
  export { H1, H2, H3, H4 };
@@ -1,5 +1,4 @@
1
- import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
- import * as React from "react";
1
+ import * as React$1 from "react";
3
2
 
4
3
  //#region src/components/wizard.d.ts
5
4
  interface WizardStep {
@@ -19,8 +18,8 @@ declare function WizardSteps({
19
18
  onSelect,
20
19
  ariaLabel,
21
20
  className
22
- }: WizardStepsProps): _$react_jsx_runtime0.JSX.Element;
23
- interface WizardProgressProps extends React.ComponentProps<"div"> {
21
+ }: WizardStepsProps): React$1.JSX.Element;
22
+ interface WizardProgressProps extends React$1.ComponentProps<"div"> {
24
23
  current: number;
25
24
  total: number;
26
25
  }
@@ -29,6 +28,6 @@ declare function WizardProgress({
29
28
  total,
30
29
  className,
31
30
  ...props
32
- }: WizardProgressProps): _$react_jsx_runtime0.JSX.Element;
31
+ }: WizardProgressProps): React$1.JSX.Element;
33
32
  //#endregion
34
33
  export { WizardProgress, type WizardStep, WizardSteps };
@@ -1,9 +1,9 @@
1
- import * as React from "react";
1
+ import * as React$1 from "react";
2
2
  //#region src/hooks/use-mobile.ts
3
3
  const MOBILE_BREAKPOINT = 768;
4
4
  function useIsMobile() {
5
- const [isMobile, setIsMobile] = React.useState(void 0);
6
- React.useEffect(() => {
5
+ const [isMobile, setIsMobile] = React$1.useState(void 0);
6
+ React$1.useEffect(() => {
7
7
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
8
8
  const onChange = () => setIsMobile(mql.matches);
9
9
  mql.addEventListener("change", onChange);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alpic-ai/ui",
3
- "version": "0.0.0-dev.g850e581",
3
+ "version": "0.0.0-dev.g8868278",
4
4
  "description": "Alpic design system — shared UI components",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,32 +23,32 @@
23
23
  "src"
24
24
  ],
25
25
  "peerDependencies": {
26
- "lucide-react": "^1.14.0",
27
- "react": "^19.2.6",
28
- "react-dom": "^19.2.6",
29
- "react-hook-form": "^7.75.0",
26
+ "lucide-react": "^1.17.0",
27
+ "react": "^19.2.7",
28
+ "react-dom": "^19.2.7",
29
+ "react-hook-form": "^7.77.0",
30
30
  "sonner": "^2.0.7",
31
31
  "tailwindcss": "^4.3.0",
32
32
  "tw-animate-css": "^1.4.0"
33
33
  },
34
34
  "dependencies": {
35
- "@radix-ui/react-accordion": "^1.2.12",
36
- "@radix-ui/react-avatar": "^1.1.11",
37
- "@radix-ui/react-checkbox": "^1.3.3",
38
- "@radix-ui/react-collapsible": "^1.1.12",
39
- "@radix-ui/react-dialog": "^1.1.15",
40
- "@radix-ui/react-dropdown-menu": "^2.1.16",
41
- "@radix-ui/react-label": "^2.1.8",
42
- "@radix-ui/react-popover": "^1.1.15",
43
- "@radix-ui/react-radio-group": "^1.3.8",
44
- "@radix-ui/react-scroll-area": "^1.2.10",
45
- "@radix-ui/react-select": "^2.2.6",
46
- "@radix-ui/react-separator": "^1.1.8",
47
- "@radix-ui/react-slot": "^1.2.4",
48
- "@radix-ui/react-switch": "^1.2.6",
49
- "@radix-ui/react-tabs": "^1.1.13",
50
- "@radix-ui/react-toggle-group": "^1.1.11",
51
- "@radix-ui/react-tooltip": "^1.2.8",
35
+ "@radix-ui/react-accordion": "^1.2.13",
36
+ "@radix-ui/react-avatar": "^1.1.12",
37
+ "@radix-ui/react-checkbox": "^1.3.4",
38
+ "@radix-ui/react-collapsible": "^1.1.13",
39
+ "@radix-ui/react-dialog": "^1.1.16",
40
+ "@radix-ui/react-dropdown-menu": "^2.1.17",
41
+ "@radix-ui/react-label": "^2.1.9",
42
+ "@radix-ui/react-popover": "^1.1.16",
43
+ "@radix-ui/react-radio-group": "^1.4.0",
44
+ "@radix-ui/react-scroll-area": "^1.2.11",
45
+ "@radix-ui/react-select": "^2.3.0",
46
+ "@radix-ui/react-separator": "^1.1.9",
47
+ "@radix-ui/react-slot": "^1.2.5",
48
+ "@radix-ui/react-switch": "^1.3.0",
49
+ "@radix-ui/react-tabs": "^1.1.14",
50
+ "@radix-ui/react-toggle-group": "^1.1.12",
51
+ "@radix-ui/react-tooltip": "^1.2.9",
52
52
  "class-variance-authority": "^0.7.1",
53
53
  "clsx": "^2.1.1",
54
54
  "cmdk": "^1.1.1",
@@ -57,14 +57,14 @@
57
57
  "devDependencies": {
58
58
  "@ladle/react": "^5.1.1",
59
59
  "@tailwindcss/postcss": "^4.3.0",
60
- "@types/react": "19.2.14",
60
+ "@types/react": "19.2.17",
61
61
  "@types/react-dom": "19.2.3",
62
- "lucide-react": "^1.14.0",
63
- "react-hook-form": "^7.75.0",
62
+ "lucide-react": "^1.17.0",
63
+ "react-hook-form": "^7.77.0",
64
64
  "shx": "^0.4.0",
65
65
  "sonner": "^2.0.7",
66
66
  "tailwindcss": "^4.3.0",
67
- "tsdown": "^0.22.0",
67
+ "tsdown": "^0.22.2",
68
68
  "tw-animate-css": "^1.4.0",
69
69
  "typescript": "^6.0.3"
70
70
  },
@@ -21,6 +21,8 @@ interface ComboboxContextValue {
21
21
  isSelected: (itemValue: string) => boolean;
22
22
  open: boolean;
23
23
  onOpenChange: (open: boolean) => void;
24
+ /** Resolves a selected value to a display label (e.g. for multi-select tags). Defaults to the value. */
25
+ getOptionLabel?: (value: string) => string;
24
26
  }
25
27
 
26
28
  const ComboboxContext = createContext<ComboboxContextValue | null>(null);
@@ -40,6 +42,8 @@ interface ComboboxBaseProps {
40
42
  open?: boolean;
41
43
  defaultOpen?: boolean;
42
44
  onOpenChange?: (open: boolean) => void;
45
+ /** Resolves a selected value to a display label (e.g. for multi-select tags). Defaults to the value. */
46
+ getOptionLabel?: (value: string) => string;
43
47
  }
44
48
 
45
49
  interface ComboboxSingleProps extends ComboboxBaseProps {
@@ -65,6 +69,7 @@ function Combobox(props: ComboboxProps) {
65
69
  open: controlledOpen,
66
70
  defaultOpen = false,
67
71
  onOpenChange: controlledOnOpenChange,
72
+ getOptionLabel,
68
73
  } = props;
69
74
 
70
75
  // Single mode state
@@ -175,8 +180,9 @@ function Combobox(props: ComboboxProps) {
175
180
  isSelected,
176
181
  open,
177
182
  onOpenChange,
183
+ getOptionLabel,
178
184
  }),
179
- [multiple, singleValue, multiValues, onSelect, onDeselect, isSelected, open, onOpenChange],
185
+ [multiple, singleValue, multiValues, onSelect, onDeselect, isSelected, open, onOpenChange, getOptionLabel],
180
186
  );
181
187
 
182
188
  return (
@@ -229,6 +235,7 @@ function ComboboxTrigger({ className, size, placeholder, children, ...props }: C
229
235
  /* ── Tags (internal, for multi-select trigger) ────────────────────────────── */
230
236
 
231
237
  function ComboboxTags({ values, onDeselect }: { values: string[]; onDeselect: (value: string) => void }) {
238
+ const { getOptionLabel } = useComboboxContext();
232
239
  return (
233
240
  <>
234
241
  {values.map((tagValue) => (
@@ -237,7 +244,7 @@ function ComboboxTags({ values, onDeselect }: { values: string[]; onDeselect: (v
237
244
  onClick={(event) => event.stopPropagation()}
238
245
  onDismiss={() => onDeselect(tagValue)}
239
246
  >
240
- {tagValue}
247
+ {getOptionLabel ? getOptionLabel(tagValue) : tagValue}
241
248
  </TagDismissible>
242
249
  ))}
243
250
  </>