@ucdjs-internal/shared-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 (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/components/shiki-code.d.mts +50 -0
  4. package/dist/components/shiki-code.mjs +76 -0
  5. package/dist/components/theme-toggle.d.mts +6 -0
  6. package/dist/components/theme-toggle.mjs +75 -0
  7. package/dist/hooks/index.d.mts +3 -0
  8. package/dist/hooks/index.mjs +4 -0
  9. package/dist/hooks/use-mobile.d.mts +4 -0
  10. package/dist/hooks/use-mobile.mjs +41 -0
  11. package/dist/hooks/use-theme.d.mts +11 -0
  12. package/dist/hooks/use-theme.mjs +105 -0
  13. package/dist/index.d.mts +3 -0
  14. package/dist/index.mjs +4 -0
  15. package/dist/lib/theme-script.d.mts +5 -0
  16. package/dist/lib/theme-script.mjs +26 -0
  17. package/dist/lib/utils.d.mts +6 -0
  18. package/dist/lib/utils.mjs +10 -0
  19. package/dist/styles/globals.css +219 -0
  20. package/dist/styles/shadcn-vendored.css +95 -0
  21. package/dist/ui/alert-dialog.d.mts +58 -0
  22. package/dist/ui/alert-dialog.mjs +387 -0
  23. package/dist/ui/avatar.d.mts +34 -0
  24. package/dist/ui/avatar.mjs +208 -0
  25. package/dist/ui/badge.d.mts +17 -0
  26. package/dist/ui/badge.mjs +76 -0
  27. package/dist/ui/breadcrumb.d.mts +37 -0
  28. package/dist/ui/breadcrumb.mjs +281 -0
  29. package/dist/ui/button.d.mts +18 -0
  30. package/dist/ui/button.mjs +82 -0
  31. package/dist/ui/card.d.mts +37 -0
  32. package/dist/ui/card.mjs +239 -0
  33. package/dist/ui/checkbox.d.mts +10 -0
  34. package/dist/ui/checkbox.mjs +52 -0
  35. package/dist/ui/collapsible.d.mts +15 -0
  36. package/dist/ui/collapsible.mjs +65 -0
  37. package/dist/ui/combobox.d.mts +81 -0
  38. package/dist/ui/combobox.mjs +641 -0
  39. package/dist/ui/command.d.mts +55 -0
  40. package/dist/ui/command.mjs +378 -0
  41. package/dist/ui/context-menu.d.mts +86 -0
  42. package/dist/ui/context-menu.mjs +520 -0
  43. package/dist/ui/dialog.d.mts +51 -0
  44. package/dist/ui/dialog.mjs +331 -0
  45. package/dist/ui/dropdown-menu.d.mts +84 -0
  46. package/dist/ui/dropdown-menu.mjs +534 -0
  47. package/dist/ui/field.d.mts +64 -0
  48. package/dist/ui/field.mjs +425 -0
  49. package/dist/ui/input-group.d.mts +45 -0
  50. package/dist/ui/input-group.mjs +254 -0
  51. package/dist/ui/input.d.mts +11 -0
  52. package/dist/ui/input.mjs +47 -0
  53. package/dist/ui/label.d.mts +10 -0
  54. package/dist/ui/label.mjs +41 -0
  55. package/dist/ui/scroll-area.d.mts +16 -0
  56. package/dist/ui/scroll-area.mjs +120 -0
  57. package/dist/ui/select.d.mts +55 -0
  58. package/dist/ui/select.mjs +414 -0
  59. package/dist/ui/separator.d.mts +11 -0
  60. package/dist/ui/separator.mjs +47 -0
  61. package/dist/ui/sheet.d.mts +42 -0
  62. package/dist/ui/sheet.mjs +318 -0
  63. package/dist/ui/sidebar.d.mts +160 -0
  64. package/dist/ui/sidebar.mjs +1258 -0
  65. package/dist/ui/skeleton.d.mts +9 -0
  66. package/dist/ui/skeleton.mjs +40 -0
  67. package/dist/ui/table.d.mts +38 -0
  68. package/dist/ui/table.mjs +269 -0
  69. package/dist/ui/textarea.d.mts +10 -0
  70. package/dist/ui/textarea.mjs +41 -0
  71. package/dist/ui/tooltip.d.mts +25 -0
  72. package/dist/ui/tooltip.mjs +149 -0
  73. package/package.json +111 -0
@@ -0,0 +1,52 @@
1
+ import { cn } from "../lib/utils.mjs";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { c } from "react/compiler-runtime";
4
+ import { CheckIcon } from "lucide-react";
5
+ import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
6
+
7
+ //#region src/ui/checkbox.tsx
8
+ function Checkbox(t0) {
9
+ const $ = c(9);
10
+ let className;
11
+ let props;
12
+ if ($[0] !== t0) {
13
+ ({className, ...props} = t0);
14
+ $[0] = t0;
15
+ $[1] = className;
16
+ $[2] = props;
17
+ } else {
18
+ className = $[1];
19
+ props = $[2];
20
+ }
21
+ let t1;
22
+ if ($[3] !== className) {
23
+ t1 = cn("border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-lg border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50", className);
24
+ $[3] = className;
25
+ $[4] = t1;
26
+ } else t1 = $[4];
27
+ let t2;
28
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
29
+ t2 = /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
30
+ "data-slot": "checkbox-indicator",
31
+ className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none",
32
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
33
+ });
34
+ $[5] = t2;
35
+ } else t2 = $[5];
36
+ let t3;
37
+ if ($[6] !== props || $[7] !== t1) {
38
+ t3 = /* @__PURE__ */ jsx(Checkbox$1.Root, {
39
+ "data-slot": "checkbox",
40
+ className: t1,
41
+ ...props,
42
+ children: t2
43
+ });
44
+ $[6] = props;
45
+ $[7] = t1;
46
+ $[8] = t3;
47
+ } else t3 = $[8];
48
+ return t3;
49
+ }
50
+
51
+ //#endregion
52
+ export { Checkbox };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
3
+
4
+ //#region src/ui/collapsible.d.ts
5
+ declare function Collapsible({
6
+ ...props
7
+ }: Collapsible$1.Root.Props): react_jsx_runtime0.JSX.Element;
8
+ declare function CollapsibleTrigger({
9
+ ...props
10
+ }: Collapsible$1.Trigger.Props): react_jsx_runtime0.JSX.Element;
11
+ declare function CollapsibleContent({
12
+ ...props
13
+ }: Collapsible$1.Panel.Props): react_jsx_runtime0.JSX.Element;
14
+ //#endregion
15
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,65 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Collapsible as Collapsible$1 } from "@base-ui/react/collapsible";
4
+
5
+ //#region src/ui/collapsible.tsx
6
+ function Collapsible(t0) {
7
+ const $ = c(4);
8
+ let props;
9
+ if ($[0] !== t0) {
10
+ ({...props} = t0);
11
+ $[0] = t0;
12
+ $[1] = props;
13
+ } else props = $[1];
14
+ let t1;
15
+ if ($[2] !== props) {
16
+ t1 = /* @__PURE__ */ jsx(Collapsible$1.Root, {
17
+ "data-slot": "collapsible",
18
+ ...props
19
+ });
20
+ $[2] = props;
21
+ $[3] = t1;
22
+ } else t1 = $[3];
23
+ return t1;
24
+ }
25
+ function CollapsibleTrigger(t0) {
26
+ const $ = c(4);
27
+ let props;
28
+ if ($[0] !== t0) {
29
+ ({...props} = t0);
30
+ $[0] = t0;
31
+ $[1] = props;
32
+ } else props = $[1];
33
+ let t1;
34
+ if ($[2] !== props) {
35
+ t1 = /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
36
+ "data-slot": "collapsible-trigger",
37
+ ...props
38
+ });
39
+ $[2] = props;
40
+ $[3] = t1;
41
+ } else t1 = $[3];
42
+ return t1;
43
+ }
44
+ function CollapsibleContent(t0) {
45
+ const $ = c(4);
46
+ let props;
47
+ if ($[0] !== t0) {
48
+ ({...props} = t0);
49
+ $[0] = t0;
50
+ $[1] = props;
51
+ } else props = $[1];
52
+ let t1;
53
+ if ($[2] !== props) {
54
+ t1 = /* @__PURE__ */ jsx(Collapsible$1.Panel, {
55
+ "data-slot": "collapsible-content",
56
+ ...props
57
+ });
58
+ $[2] = props;
59
+ $[3] = t1;
60
+ } else t1 = $[3];
61
+ return t1;
62
+ }
63
+
64
+ //#endregion
65
+ export { Collapsible, CollapsibleContent, CollapsibleTrigger };
@@ -0,0 +1,81 @@
1
+ import * as React from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Combobox as Combobox$1 } from "@base-ui/react";
4
+
5
+ //#region src/ui/combobox.d.ts
6
+ declare const Combobox: typeof Combobox$1.Root;
7
+ declare function ComboboxValue({
8
+ ...props
9
+ }: Combobox$1.Value.Props): react_jsx_runtime0.JSX.Element;
10
+ declare function ComboboxTrigger({
11
+ className,
12
+ children,
13
+ ...props
14
+ }: Combobox$1.Trigger.Props): react_jsx_runtime0.JSX.Element;
15
+ declare function ComboboxInput({
16
+ className,
17
+ children,
18
+ disabled,
19
+ showTrigger,
20
+ showClear,
21
+ ...props
22
+ }: Combobox$1.Input.Props & {
23
+ showTrigger?: boolean;
24
+ showClear?: boolean;
25
+ }): react_jsx_runtime0.JSX.Element;
26
+ declare function ComboboxContent({
27
+ className,
28
+ side,
29
+ sideOffset,
30
+ align,
31
+ alignOffset,
32
+ anchor,
33
+ ...props
34
+ }: Combobox$1.Popup.Props & Pick<Combobox$1.Positioner.Props, "side" | "align" | "sideOffset" | "alignOffset" | "anchor">): react_jsx_runtime0.JSX.Element;
35
+ declare function ComboboxList({
36
+ className,
37
+ ...props
38
+ }: Combobox$1.List.Props): react_jsx_runtime0.JSX.Element;
39
+ declare function ComboboxItem({
40
+ className,
41
+ children,
42
+ ...props
43
+ }: Combobox$1.Item.Props): react_jsx_runtime0.JSX.Element;
44
+ declare function ComboboxGroup({
45
+ className,
46
+ ...props
47
+ }: Combobox$1.Group.Props): react_jsx_runtime0.JSX.Element;
48
+ declare function ComboboxLabel({
49
+ className,
50
+ ...props
51
+ }: Combobox$1.GroupLabel.Props): react_jsx_runtime0.JSX.Element;
52
+ declare function ComboboxCollection({
53
+ ...props
54
+ }: Combobox$1.Collection.Props): react_jsx_runtime0.JSX.Element;
55
+ declare function ComboboxEmpty({
56
+ className,
57
+ ...props
58
+ }: Combobox$1.Empty.Props): react_jsx_runtime0.JSX.Element;
59
+ declare function ComboboxSeparator({
60
+ className,
61
+ ...props
62
+ }: Combobox$1.Separator.Props): react_jsx_runtime0.JSX.Element;
63
+ declare function ComboboxChips({
64
+ className,
65
+ ...props
66
+ }: React.ComponentPropsWithRef<typeof Combobox$1.Chips> & Combobox$1.Chips.Props): react_jsx_runtime0.JSX.Element;
67
+ declare function ComboboxChip({
68
+ className,
69
+ children,
70
+ showRemove,
71
+ ...props
72
+ }: Combobox$1.Chip.Props & {
73
+ showRemove?: boolean;
74
+ }): react_jsx_runtime0.JSX.Element;
75
+ declare function ComboboxChipsInput({
76
+ className,
77
+ ...props
78
+ }: Combobox$1.Input.Props): react_jsx_runtime0.JSX.Element;
79
+ declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
80
+ //#endregion
81
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, useComboboxAnchor };