@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,219 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+ @import "./shadcn-vendored.css";
4
+ @import "@fontsource-variable/inter";
5
+
6
+ @source "../ui/**/*.{ts,js,mjs,jsx,tsx}";
7
+ @source "../components/**/*.{ts,js,mjs,jsx,tsx}";
8
+
9
+ @custom-variant dark (&:is(.dark *));
10
+
11
+ :root {
12
+ --background: oklch(1 0 0);
13
+ --foreground: oklch(0.145 0 0);
14
+ --card: oklch(1 0 0);
15
+ --card-foreground: oklch(0.145 0 0);
16
+ --popover: oklch(1 0 0);
17
+ --popover-foreground: oklch(0.145 0 0);
18
+ --primary: oklch(0.6 0.13 163);
19
+ --primary-foreground: oklch(0.98 0.02 166);
20
+ --secondary: oklch(0.967 0.001 286.375);
21
+ --secondary-foreground: oklch(0.21 0.006 285.885);
22
+ --muted: oklch(0.97 0 0);
23
+ --muted-foreground: oklch(0.556 0 0);
24
+ --accent: oklch(0.97 0 0);
25
+ --accent-foreground: oklch(0.205 0 0);
26
+ --destructive: oklch(0.58 0.22 27);
27
+ --border: oklch(0.922 0 0);
28
+ --input: oklch(0.922 0 0);
29
+ --ring: oklch(0.708 0 0);
30
+ --chart-1: oklch(0.85 0.13 165);
31
+ --chart-2: oklch(0.77 0.15 163);
32
+ --chart-3: oklch(0.7 0.15 162);
33
+ --chart-4: oklch(0.6 0.13 163);
34
+ --chart-5: oklch(0.51 0.1 166);
35
+ --radius: 0.625rem;
36
+ --sidebar: oklch(0.985 0 0);
37
+ --sidebar-foreground: oklch(0.145 0 0);
38
+ --sidebar-primary: oklch(0.6 0.13 163);
39
+ --sidebar-primary-foreground: oklch(0.98 0.02 166);
40
+ --sidebar-accent: oklch(0.97 0 0);
41
+ --sidebar-accent-foreground: oklch(0.205 0 0);
42
+ --sidebar-border: oklch(0.922 0 0);
43
+ --sidebar-ring: oklch(0.708 0 0);
44
+ --shiki-background: var(--card);
45
+ --shiki-foreground: var(--card-foreground);
46
+ --shiki-token-comment: #6b7280;
47
+ --shiki-token-string: #0f766e;
48
+ --shiki-token-string-expression: #0e7490;
49
+ --shiki-token-constant: #c2410c;
50
+ --shiki-token-keyword: #1d4ed8;
51
+ --shiki-token-parameter: #334155;
52
+ --shiki-token-function: #0369a1;
53
+ --shiki-token-punctuation: #94a3b8;
54
+ --shiki-token-link: #2563eb;
55
+ --shiki-token-inserted: #15803d;
56
+ --shiki-token-deleted: #b91c1c;
57
+ --shiki-token-changed: #a16207;
58
+ }
59
+
60
+ .dark {
61
+ --background: oklch(0.145 0 0);
62
+ --foreground: oklch(0.985 0 0);
63
+ --card: oklch(0.205 0 0);
64
+ --card-foreground: oklch(0.985 0 0);
65
+ --popover: oklch(0.205 0 0);
66
+ --popover-foreground: oklch(0.985 0 0);
67
+ --primary: oklch(0.7 0.15 162);
68
+ --primary-foreground: oklch(0.26 0.05 173);
69
+ --secondary: oklch(0.274 0.006 286.033);
70
+ --secondary-foreground: oklch(0.985 0 0);
71
+ --muted: oklch(0.269 0 0);
72
+ --muted-foreground: oklch(0.708 0 0);
73
+ --accent: oklch(0.371 0 0);
74
+ --accent-foreground: oklch(0.985 0 0);
75
+ --destructive: oklch(0.704 0.191 22.216);
76
+ --border: oklch(1 0 0 / 10%);
77
+ --input: oklch(1 0 0 / 15%);
78
+ --ring: oklch(0.556 0 0);
79
+ --chart-1: oklch(0.85 0.13 165);
80
+ --chart-2: oklch(0.77 0.15 163);
81
+ --chart-3: oklch(0.7 0.15 162);
82
+ --chart-4: oklch(0.6 0.13 163);
83
+ --chart-5: oklch(0.51 0.1 166);
84
+ --sidebar: oklch(0.205 0 0);
85
+ --sidebar-foreground: oklch(0.985 0 0);
86
+ --sidebar-primary: oklch(0.77 0.15 163);
87
+ --sidebar-primary-foreground: oklch(0.26 0.05 173);
88
+ --sidebar-accent: oklch(0.269 0 0);
89
+ --sidebar-accent-foreground: oklch(0.985 0 0);
90
+ --sidebar-border: oklch(1 0 0 / 10%);
91
+ --sidebar-ring: oklch(0.556 0 0);
92
+ --shiki-background: var(--card);
93
+ --shiki-foreground: var(--card-foreground);
94
+ --shiki-token-comment: #94a3b8;
95
+ --shiki-token-string: #2dd4bf;
96
+ --shiki-token-string-expression: #22d3ee;
97
+ --shiki-token-constant: #fb923c;
98
+ --shiki-token-keyword: #60a5fa;
99
+ --shiki-token-parameter: #cbd5e1;
100
+ --shiki-token-function: #38bdf8;
101
+ --shiki-token-punctuation: #64748b;
102
+ --shiki-token-link: #93c5fd;
103
+ --shiki-token-inserted: #4ade80;
104
+ --shiki-token-deleted: #f87171;
105
+ --shiki-token-changed: #fbbf24;
106
+ }
107
+
108
+ @theme inline {
109
+ --font-sans: "Inter Variable", sans-serif;
110
+ --color-sidebar-ring: var(--sidebar-ring);
111
+ --color-sidebar-border: var(--sidebar-border);
112
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
113
+ --color-sidebar-accent: var(--sidebar-accent);
114
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
115
+ --color-sidebar-primary: var(--sidebar-primary);
116
+ --color-sidebar-foreground: var(--sidebar-foreground);
117
+ --color-sidebar: var(--sidebar);
118
+ --color-chart-5: var(--chart-5);
119
+ --color-chart-4: var(--chart-4);
120
+ --color-chart-3: var(--chart-3);
121
+ --color-chart-2: var(--chart-2);
122
+ --color-chart-1: var(--chart-1);
123
+ --color-ring: var(--ring);
124
+ --color-input: var(--input);
125
+ --color-border: var(--border);
126
+ --color-destructive: var(--destructive);
127
+ --color-accent-foreground: var(--accent-foreground);
128
+ --color-accent: var(--accent);
129
+ --color-muted-foreground: var(--muted-foreground);
130
+ --color-muted: var(--muted);
131
+ --color-secondary-foreground: var(--secondary-foreground);
132
+ --color-secondary: var(--secondary);
133
+ --color-primary-foreground: var(--primary-foreground);
134
+ --color-primary: var(--primary);
135
+ --color-popover-foreground: var(--popover-foreground);
136
+ --color-popover: var(--popover);
137
+ --color-card-foreground: var(--card-foreground);
138
+ --color-card: var(--card);
139
+ --color-foreground: var(--foreground);
140
+ --color-background: var(--background);
141
+ --radius-sm: calc(var(--radius) - 4px);
142
+ --radius-md: calc(var(--radius) - 2px);
143
+ --radius-lg: var(--radius);
144
+ --radius-xl: calc(var(--radius) + 4px);
145
+ --radius-2xl: calc(var(--radius) + 8px);
146
+ --radius-3xl: calc(var(--radius) + 12px);
147
+ --radius-4xl: calc(var(--radius) + 16px);
148
+ }
149
+
150
+
151
+ @layer base {
152
+ * {
153
+ @apply border-border outline-ring/50;
154
+ }
155
+
156
+ body {
157
+ @apply font-sans bg-background text-foreground;
158
+ }
159
+
160
+ html {
161
+ @apply font-sans;
162
+ }
163
+ }
164
+
165
+ @layer components {
166
+ .shiki.shiki-code,
167
+ .shiki-root pre {
168
+ @apply text-foreground rounded-md text-[12px] leading-[13px] overflow-auto border;
169
+ white-space: pre;
170
+ word-break: normal;
171
+ overflow-wrap: normal;
172
+ background: var(--card);
173
+ box-shadow: none;
174
+ position: relative;
175
+ padding: 0.5rem 0.75rem 0.5rem 2.25rem;
176
+ counter-reset: shiki-line;
177
+ }
178
+
179
+ .shiki.shiki-code code,
180
+ .shiki-root pre > code {
181
+ @apply font-mono;
182
+ white-space: inherit;
183
+ word-break: normal;
184
+ overflow-wrap: normal;
185
+ }
186
+
187
+ .shiki-code__line {
188
+ @apply block px-1 -mx-1 rounded;
189
+ position: relative;
190
+ counter-increment: shiki-line;
191
+ }
192
+
193
+ .shiki-code__line::before {
194
+ content: counter(shiki-line);
195
+ @apply absolute -left-8 top-0 w-6 text-right text-[0.65rem] text-muted-foreground/70;
196
+ }
197
+
198
+ .shiki-decor {
199
+ @apply relative inline-flex items-center rounded-sm;
200
+ padding: 0 0.1rem;
201
+ background: color-mix(in oklab, var(--primary) 8%, transparent);
202
+ border-bottom: 1px solid color-mix(in oklab, var(--primary) 30%, transparent);
203
+ }
204
+
205
+ .shiki-decor::after {
206
+ content: "";
207
+ display: none;
208
+ }
209
+
210
+ .shiki-decor-route {
211
+ border-bottom-color: color-mix(in oklab, var(--primary) 45%, transparent);
212
+ }
213
+
214
+ .shiki-decor-route::after,
215
+ .shiki-decor-id::after,
216
+ .shiki-decor-name::after {
217
+ content: "";
218
+ }
219
+ }
@@ -0,0 +1,95 @@
1
+ @theme inline {
2
+ @keyframes accordion-down {
3
+ from {
4
+ height: 0;
5
+ }
6
+ to {
7
+ height: var(
8
+ --radix-accordion-content-height,
9
+ var(--accordion-panel-height, auto)
10
+ );
11
+ }
12
+ }
13
+
14
+ @keyframes accordion-up {
15
+ from {
16
+ height: var(
17
+ --radix-accordion-content-height,
18
+ var(--accordion-panel-height, auto)
19
+ );
20
+ }
21
+ to {
22
+ height: 0;
23
+ }
24
+ }
25
+ }
26
+
27
+ /* Custom variants */
28
+ @custom-variant data-open {
29
+ &:where([data-state="open"]),
30
+ &:where([data-open]:not([data-open="false"])) {
31
+ @slot;
32
+ }
33
+ }
34
+
35
+ @custom-variant data-closed {
36
+ &:where([data-state="closed"]),
37
+ &:where([data-closed]:not([data-closed="false"])) {
38
+ @slot;
39
+ }
40
+ }
41
+
42
+ @custom-variant data-checked {
43
+ &:where([data-state="checked"]),
44
+ &:where([data-checked]:not([data-checked="false"])) {
45
+ @slot;
46
+ }
47
+ }
48
+
49
+ @custom-variant data-unchecked {
50
+ &:where([data-state="unchecked"]),
51
+ &:where([data-unchecked]:not([data-unchecked="false"])) {
52
+ @slot;
53
+ }
54
+ }
55
+
56
+ @custom-variant data-selected {
57
+ &:where([data-selected="true"]) {
58
+ @slot;
59
+ }
60
+ }
61
+
62
+ @custom-variant data-disabled {
63
+ &:where([data-disabled="true"]),
64
+ &:where([data-disabled]:not([data-disabled="false"])) {
65
+ @slot;
66
+ }
67
+ }
68
+
69
+ @custom-variant data-active {
70
+ &:where([data-state="active"]),
71
+ &:where([data-active]:not([data-active="false"])) {
72
+ @slot;
73
+ }
74
+ }
75
+
76
+ @custom-variant data-horizontal {
77
+ &:where([data-orientation="horizontal"]) {
78
+ @slot;
79
+ }
80
+ }
81
+
82
+ @custom-variant data-vertical {
83
+ &:where([data-orientation="vertical"]) {
84
+ @slot;
85
+ }
86
+ }
87
+
88
+ @utility no-scrollbar {
89
+ -ms-overflow-style: none;
90
+ scrollbar-width: none;
91
+
92
+ &::-webkit-scrollbar {
93
+ display: none;
94
+ }
95
+ }
@@ -0,0 +1,58 @@
1
+ import { Button } from "./button.mjs";
2
+ import * as React from "react";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
+ import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
5
+
6
+ //#region src/ui/alert-dialog.d.ts
7
+ declare function AlertDialog({
8
+ ...props
9
+ }: AlertDialog$1.Root.Props): react_jsx_runtime0.JSX.Element;
10
+ declare function AlertDialogTrigger({
11
+ ...props
12
+ }: AlertDialog$1.Trigger.Props): react_jsx_runtime0.JSX.Element;
13
+ declare function AlertDialogPortal({
14
+ ...props
15
+ }: AlertDialog$1.Portal.Props): react_jsx_runtime0.JSX.Element;
16
+ declare function AlertDialogOverlay({
17
+ className,
18
+ ...props
19
+ }: AlertDialog$1.Backdrop.Props): react_jsx_runtime0.JSX.Element;
20
+ declare function AlertDialogContent({
21
+ className,
22
+ size,
23
+ ...props
24
+ }: AlertDialog$1.Popup.Props & {
25
+ size?: "default" | "sm";
26
+ }): react_jsx_runtime0.JSX.Element;
27
+ declare function AlertDialogHeader({
28
+ className,
29
+ ...props
30
+ }: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
31
+ declare function AlertDialogFooter({
32
+ className,
33
+ ...props
34
+ }: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
35
+ declare function AlertDialogMedia({
36
+ className,
37
+ ...props
38
+ }: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
39
+ declare function AlertDialogTitle({
40
+ className,
41
+ ...props
42
+ }: React.ComponentProps<typeof AlertDialog$1.Title>): react_jsx_runtime0.JSX.Element;
43
+ declare function AlertDialogDescription({
44
+ className,
45
+ ...props
46
+ }: React.ComponentProps<typeof AlertDialog$1.Description>): react_jsx_runtime0.JSX.Element;
47
+ declare function AlertDialogAction({
48
+ className,
49
+ ...props
50
+ }: React.ComponentProps<typeof Button>): react_jsx_runtime0.JSX.Element;
51
+ declare function AlertDialogCancel({
52
+ className,
53
+ variant,
54
+ size,
55
+ ...props
56
+ }: AlertDialog$1.Close.Props & Pick<React.ComponentProps<typeof Button>, "variant" | "size">): react_jsx_runtime0.JSX.Element;
57
+ //#endregion
58
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger };