@veiag/payload-cmdk 1.0.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 (38) hide show
  1. package/README.md +594 -0
  2. package/dist/components/CommandMenuContext.d.ts +15 -0
  3. package/dist/components/CommandMenuContext.js +430 -0
  4. package/dist/components/CommandMenuContext.js.map +1 -0
  5. package/dist/components/SearchButton.d.ts +8 -0
  6. package/dist/components/SearchButton.js +106 -0
  7. package/dist/components/SearchButton.js.map +1 -0
  8. package/dist/components/SearchButton.scss +133 -0
  9. package/dist/components/cmdk/command.scss +334 -0
  10. package/dist/components/cmdk/index.d.ts +12 -0
  11. package/dist/components/cmdk/index.js +77 -0
  12. package/dist/components/cmdk/index.js.map +1 -0
  13. package/dist/components/modal.scss +94 -0
  14. package/dist/endpoints/customEndpointHandler.d.ts +2 -0
  15. package/dist/endpoints/customEndpointHandler.js +7 -0
  16. package/dist/endpoints/customEndpointHandler.js.map +1 -0
  17. package/dist/exports/client.d.ts +2 -0
  18. package/dist/exports/client.js +4 -0
  19. package/dist/exports/client.js.map +1 -0
  20. package/dist/exports/rsc.d.ts +0 -0
  21. package/dist/exports/rsc.js +2 -0
  22. package/dist/exports/rsc.js.map +1 -0
  23. package/dist/hooks/useMutationObserver.d.ts +1 -0
  24. package/dist/hooks/useMutationObserver.js +21 -0
  25. package/dist/hooks/useMutationObserver.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.js +74 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/translations/index.d.ts +32 -0
  30. package/dist/translations/index.js +38 -0
  31. package/dist/translations/index.js.map +1 -0
  32. package/dist/types.d.ts +223 -0
  33. package/dist/types.js +6 -0
  34. package/dist/types.js.map +1 -0
  35. package/dist/utils/index.d.ts +30 -0
  36. package/dist/utils/index.js +191 -0
  37. package/dist/utils/index.js.map +1 -0
  38. package/package.json +126 -0
@@ -0,0 +1,133 @@
1
+ /////////////////////////////
2
+ // SEARCH BUTTON STYLES
3
+ // Fake input button to open command menu
4
+ /////////////////////////////
5
+
6
+ @layer payload {
7
+ .search-button {
8
+ display: block;
9
+ width: 100%;
10
+ background: none;
11
+ border: none;
12
+ padding: 0;
13
+ cursor: pointer;
14
+ text-align: left;
15
+
16
+ // Nav position - full width with margin
17
+ &--nav {
18
+ margin: 0 0 calc(var(--base) * 1);
19
+ }
20
+
21
+ // Actions position - fit content, no margin
22
+ &--actions {
23
+ width: fit-content;
24
+ }
25
+ }
26
+
27
+ .search-button__wrapper {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: calc(var(--base) * 0.5);
31
+ height: calc(var(--base) * 1.5);
32
+ padding: 0 calc(var(--base) * 0.5);
33
+ background: var(--theme-elevation-0);
34
+ border: 1px solid var(--theme-border-color);
35
+ border-radius: var(--style-radius-m);
36
+ transition: all 100ms cubic-bezier(0, 0.2, 0.2, 1);
37
+
38
+ &:hover {
39
+ background: var(--theme-elevation-50);
40
+ border-color: var(--theme-elevation-400);
41
+ }
42
+
43
+ &:active {
44
+ background: var(--theme-elevation-100);
45
+ border-color: var(--theme-elevation-500);
46
+ }
47
+ }
48
+
49
+ .search-button__icon {
50
+ width: calc(var(--base) * 0.8);
51
+ height: calc(var(--base) * 0.8);
52
+ flex-shrink: 0;
53
+ opacity: 0.5;
54
+ color: var(--theme-elevation-500);
55
+ }
56
+
57
+ .search-button__placeholder {
58
+ font-family: var(--font-body);
59
+ font-size: 0.923rem; // ~12px
60
+ color: var(--theme-elevation-400);
61
+ font-weight: normal;
62
+ }
63
+
64
+ .search-button__shortcuts {
65
+ display: flex;
66
+ gap: calc(var(--base) * 0.25);
67
+ align-items: center;
68
+ margin-left: auto;
69
+
70
+ kbd {
71
+ padding: calc(var(--base) * 0.1) calc(var(--base) * 0.25);
72
+ font-family: var(--font-mono);
73
+ font-size: 0.923rem; // ~12px
74
+ background: var(--theme-elevation-100);
75
+ border: 1px solid var(--theme-elevation-200);
76
+ border-radius: var(--style-radius-s);
77
+ box-shadow: 0 1px 0 var(--theme-elevation-200);
78
+ color: var(--theme-elevation-600);
79
+ line-height: 1;
80
+ display: inline-flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+
84
+ // Ensure icons are properly aligned and sized
85
+ svg {
86
+ width: 12px;
87
+ height: 12px;
88
+ display: block;
89
+ }
90
+ }
91
+ }
92
+
93
+ // Dark theme adjustments
94
+ html[data-theme='dark'] {
95
+ .search-button__wrapper {
96
+ background: var(--theme-elevation-50);
97
+ border-color: var(--theme-elevation-200);
98
+
99
+ &:hover {
100
+ background: var(--theme-elevation-100);
101
+ border-color: var(--theme-elevation-300);
102
+ }
103
+
104
+ &:active {
105
+ background: var(--theme-elevation-150);
106
+ border-color: var(--theme-elevation-400);
107
+ }
108
+ }
109
+
110
+ .search-button__shortcuts {
111
+ kbd {
112
+ background: var(--theme-elevation-150);
113
+ border-color: var(--theme-elevation-300);
114
+ box-shadow: 0 1px 0 var(--theme-elevation-300);
115
+ }
116
+ }
117
+ }
118
+
119
+ // Responsive adjustments
120
+ @media (max-width: 768px) {
121
+ .search-button__wrapper {
122
+ height: calc(var(--base) * 1.3);
123
+ }
124
+
125
+ .search-button__placeholder {
126
+ font-size: 0.846rem; // ~11px on mobile
127
+ }
128
+
129
+ .search-button__shortcuts {
130
+ display: none; // Hide shortcuts on mobile
131
+ }
132
+ }
133
+ }
@@ -0,0 +1,334 @@
1
+ /////////////////////////////
2
+ // CMDK COMPONENT STYLES
3
+ // Uses only CSS variables from Payload runtime
4
+ /////////////////////////////
5
+
6
+ @layer payload {
7
+ // Main Command Container
8
+ .command {
9
+ display: flex;
10
+ flex-direction: column;
11
+ width: 100%;
12
+ height: auto; // Adjusts based on content
13
+ overflow: hidden;
14
+ border-radius: var(--style-radius-m);
15
+ background: var(--theme-elevation-0);
16
+ color: var(--theme-text);
17
+ border: 1px solid var(--theme-border-color);
18
+ box-shadow: 0 4px 8px -3px rgba(0, 0, 0, 0.1);
19
+ }
20
+
21
+ // Command Header (breadcrumb area for submenu)
22
+ .command__header {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: calc(var(--base) * 0.25);
26
+ padding: calc(var(--base) * 0.35) calc(var(--base) * 0.5);
27
+ border-bottom: 1px solid var(--theme-elevation-150);
28
+ background: var(--theme-elevation-50);
29
+ }
30
+
31
+ // Command Back Button
32
+ .command__back-button {
33
+ display: flex;
34
+ align-items: center;
35
+ justify-content: center;
36
+ padding: calc(var(--base) * 0.15);
37
+ background: none;
38
+ border: none;
39
+ cursor: pointer;
40
+ color: var(--theme-elevation-600);
41
+ transition: all 100ms cubic-bezier(0, 0.2, 0.2, 1);
42
+ flex-shrink: 0;
43
+ border-radius: var(--style-radius-s);
44
+
45
+ svg {
46
+ width: calc(var(--base) * 0.7);
47
+ height: calc(var(--base) * 0.7);
48
+ }
49
+
50
+ &:hover {
51
+ color: var(--theme-text);
52
+ background: var(--theme-elevation-100);
53
+ }
54
+
55
+ &:active {
56
+ background: var(--theme-elevation-150);
57
+ }
58
+ }
59
+
60
+ // Command Header Label
61
+ .command__header-label {
62
+ font-size: 0.846rem; // ~11px
63
+ font-weight: 500;
64
+ color: var(--theme-elevation-700);
65
+ }
66
+
67
+ // Command Input Wrapper
68
+ .command__input-wrapper {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: calc(var(--base) * 0.5);
72
+ height: calc(var(--base) * 2);
73
+ padding: 0 calc(var(--base) * 0.75);
74
+ border-bottom: 1px solid var(--theme-elevation-150);
75
+
76
+ svg {
77
+ width: calc(var(--base) * 0.8);
78
+ height: calc(var(--base) * 0.8);
79
+ flex-shrink: 0;
80
+ opacity: 0.5;
81
+ color: var(--theme-elevation-500);
82
+ }
83
+ }
84
+
85
+ // Command Input
86
+ .command__input {
87
+ display: flex;
88
+ width: 100%;
89
+ height: calc(var(--base) * 1.8);
90
+ padding: calc(var(--base) * 0.5) 0;
91
+ font-family: var(--font-body);
92
+ font-size: 1.077rem; // ~14px
93
+ background: transparent;
94
+ border: none;
95
+ outline: none;
96
+ color: var(--theme-text);
97
+
98
+ &::placeholder {
99
+ color: var(--theme-elevation-400);
100
+ font-weight: normal;
101
+ }
102
+
103
+ &:disabled {
104
+ cursor: not-allowed;
105
+ opacity: 0.5;
106
+ }
107
+ }
108
+
109
+ // Command List
110
+ .command__list {
111
+ max-height: 300px;
112
+ overflow-x: hidden;
113
+ overflow-y: auto;
114
+ scroll-padding: calc(var(--base) * 0.25);
115
+ padding: calc(var(--base) * 0.25);
116
+
117
+ &::-webkit-scrollbar {
118
+ width: 8px;
119
+ }
120
+
121
+ &::-webkit-scrollbar-track {
122
+ background: var(--theme-elevation-50);
123
+ border-radius: var(--style-radius-s);
124
+ }
125
+
126
+ &::-webkit-scrollbar-thumb {
127
+ background: var(--theme-elevation-250);
128
+ border-radius: var(--style-radius-s);
129
+
130
+ &:hover {
131
+ background: var(--theme-elevation-350);
132
+ }
133
+ }
134
+ }
135
+
136
+ // Command Empty State
137
+ .command__empty {
138
+ padding: calc(var(--base) * 1.5) 0;
139
+ text-align: center;
140
+ font-size: 1rem; // ~13px
141
+ color: var(--theme-elevation-500);
142
+ }
143
+
144
+ // Command Group
145
+ .command__group {
146
+ overflow: hidden;
147
+ padding: calc(var(--base) * 0.25);
148
+ color: var(--theme-text);
149
+
150
+ // Group Heading
151
+ [cmdk-group-heading] {
152
+ padding: calc(var(--base) * 0.4) calc(var(--base) * 0.5);
153
+ font-size: 0.846rem; // ~11px
154
+ font-weight: 500;
155
+ color: var(--theme-elevation-500);
156
+ text-transform: uppercase;
157
+ letter-spacing: 0.5px;
158
+ user-select: none;
159
+ }
160
+
161
+ // &:not(:first-child) {
162
+ // margin-top: calc(var(--base) * 0.25);
163
+ // }
164
+ }
165
+
166
+ // Command Separator
167
+ .command__separator {
168
+ height: 1px;
169
+ margin: calc(var(--base) * 0.25) calc(var(--base) * -0.25);
170
+ background: var(--theme-elevation-150);
171
+ }
172
+
173
+ // Command Item
174
+ .command__item {
175
+ position: relative;
176
+ display: flex;
177
+ align-items: center;
178
+ gap: calc(var(--base) * 0.5);
179
+ padding: calc(var(--base) * 0.4) calc(var(--base) * 0.5);
180
+ font-size: 1rem; // ~13px (base Payload size)
181
+ border-radius: var(--style-radius-s);
182
+ cursor: default;
183
+ user-select: none;
184
+ outline: none;
185
+ transition: all 100ms cubic-bezier(0, 0.2, 0.2, 1);
186
+
187
+ svg {
188
+ pointer-events: none;
189
+ flex-shrink: 0;
190
+ width: calc(var(--base) * 0.8);
191
+ height: calc(var(--base) * 0.8);
192
+
193
+ &:not([class*='text-']) {
194
+ color: var(--theme-elevation-500);
195
+ }
196
+ }
197
+
198
+ // Selected/Hover state
199
+ &[data-selected='true'] {
200
+ background: var(--theme-success-100);
201
+ color: var(--theme-success-800);
202
+
203
+ svg:not([class*='text-']) {
204
+ color: var(--theme-success-700);
205
+ }
206
+ }
207
+
208
+ // Disabled state
209
+ &[data-disabled='true'] {
210
+ pointer-events: none;
211
+ opacity: 0.5;
212
+ }
213
+
214
+ // Hover state (when not using keyboard navigation)
215
+ &:hover:not([data-disabled='true']) {
216
+ background: var(--theme-elevation-100);
217
+ }
218
+ }
219
+
220
+ // Command Shortcut
221
+ .command__shortcut {
222
+ margin-left: auto;
223
+ font-size: 0.846rem; // ~11px
224
+ font-family: var(--font-mono);
225
+ letter-spacing: 0.5px;
226
+ color: var(--theme-elevation-500);
227
+ opacity: 0.8;
228
+ }
229
+
230
+ // Command Footer
231
+ .command__footer {
232
+ border-top: 1px solid var(--theme-elevation-150);
233
+ padding: calc(var(--base) * 0.5) calc(var(--base) * 0.75);
234
+ font-size: 0.846rem; // ~11px
235
+ color: var(--theme-elevation-600);
236
+ display: flex;
237
+ gap: calc(var(--base) * 1);
238
+ flex-wrap: wrap;
239
+
240
+ kbd {
241
+ padding: calc(var(--base) * 0.1) calc(var(--base) * 0.25);
242
+ font-family: var(--font-mono);
243
+ font-size: 0.923rem; // ~12px
244
+ background: var(--theme-elevation-100);
245
+ border: 1px solid var(--theme-elevation-200);
246
+ border-radius: var(--style-radius-s);
247
+ box-shadow: 0 1px 0 var(--theme-elevation-200);
248
+ line-height: 1;
249
+ display: inline-flex;
250
+ align-items: center;
251
+ justify-content: center;
252
+ gap: 2px; // Small gap between icon and text when combined
253
+
254
+ // Ensure icons are properly aligned and sized
255
+ svg {
256
+ width: 12px;
257
+ height: 12px;
258
+ display: block;
259
+ }
260
+ }
261
+ }
262
+
263
+ // Dark theme adjustments
264
+ html[data-theme='dark'] {
265
+ .command {
266
+ background: var(--theme-elevation-50);
267
+ border-color: var(--theme-elevation-200);
268
+ }
269
+
270
+ .command__header {
271
+ background: var(--theme-elevation-100);
272
+ border-bottom-color: var(--theme-elevation-200);
273
+ }
274
+
275
+ .command__input-wrapper {
276
+ border-bottom-color: var(--theme-elevation-200);
277
+ }
278
+
279
+ .command__back-button {
280
+ &:hover {
281
+ background: var(--theme-elevation-150);
282
+ }
283
+
284
+ &:active {
285
+ background: var(--theme-elevation-200);
286
+ }
287
+ }
288
+
289
+ .command__footer {
290
+ border-top-color: var(--theme-elevation-200);
291
+
292
+ kbd {
293
+ background: var(--theme-elevation-150);
294
+ border-color: var(--theme-elevation-300);
295
+ box-shadow: 0 1px 0 var(--theme-elevation-300);
296
+ }
297
+ }
298
+
299
+ .command__item {
300
+ &[data-selected='true'] {
301
+ background: var(--theme-success-200);
302
+ color: var(--theme-success-900);
303
+
304
+ svg:not([class*='text-']) {
305
+ color: var(--theme-success-800);
306
+ }
307
+ }
308
+
309
+ &:hover:not([data-disabled='true']) {
310
+ background: var(--theme-elevation-150);
311
+ }
312
+ }
313
+ }
314
+
315
+ // Responsive adjustments
316
+ @media (max-width: 768px) {
317
+ .command__list {
318
+ max-height: 250px;
319
+ }
320
+
321
+ .command__input-wrapper {
322
+ padding: 0 calc(var(--base) * 0.5);
323
+ }
324
+
325
+ .command__item {
326
+ padding: calc(var(--base) * 0.35) calc(var(--base) * 0.4);
327
+ font-size: 0.923rem; // ~12px on mobile
328
+ }
329
+
330
+ .command__group [cmdk-group-heading] {
331
+ padding: calc(var(--base) * 0.35) calc(var(--base) * 0.4);
332
+ }
333
+ }
334
+ }
@@ -0,0 +1,12 @@
1
+ import { Command as CommandPrimitive } from 'cmdk';
2
+ import * as React from 'react';
3
+ import './command.scss';
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
5
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): React.JSX.Element;
6
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
7
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
8
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
9
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
10
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
11
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
12
+ export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Command as CommandPrimitive } from 'cmdk';
4
+ import { SearchIcon } from 'lucide-react';
5
+ import * as React from 'react';
6
+ import './command.scss';
7
+ // Helper to combine class names
8
+ function cn(...classes) {
9
+ return classes.filter(Boolean).join(' ');
10
+ }
11
+ // Main Command Component
12
+ function Command({ className, ...props }) {
13
+ return /*#__PURE__*/ _jsx(CommandPrimitive, {
14
+ className: cn('command', className),
15
+ ...props
16
+ });
17
+ }
18
+ // Command Input Component
19
+ function CommandInput({ className, ...props }) {
20
+ return /*#__PURE__*/ _jsxs("div", {
21
+ className: "command__input-wrapper",
22
+ children: [
23
+ /*#__PURE__*/ _jsx(SearchIcon, {
24
+ className: "command__input-icon"
25
+ }),
26
+ /*#__PURE__*/ _jsx(CommandPrimitive.Input, {
27
+ className: cn('command__input', className),
28
+ ...props
29
+ })
30
+ ]
31
+ });
32
+ }
33
+ // Command List Component
34
+ function CommandList({ className, ...props }) {
35
+ return /*#__PURE__*/ _jsx(CommandPrimitive.List, {
36
+ className: cn('command__list', className),
37
+ ...props
38
+ });
39
+ }
40
+ // Command Empty Component
41
+ function CommandEmpty({ ...props }) {
42
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Empty, {
43
+ className: "command__empty",
44
+ ...props
45
+ });
46
+ }
47
+ // Command Group Component
48
+ function CommandGroup({ className, ...props }) {
49
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Group, {
50
+ className: cn('command__group', className),
51
+ ...props
52
+ });
53
+ }
54
+ // Command Separator Component
55
+ function CommandSeparator({ className, ...props }) {
56
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Separator, {
57
+ className: cn('command__separator', className),
58
+ ...props
59
+ });
60
+ }
61
+ // Command Item Component
62
+ function CommandItem({ className, ...props }) {
63
+ return /*#__PURE__*/ _jsx(CommandPrimitive.Item, {
64
+ className: cn('command__item', className),
65
+ ...props
66
+ });
67
+ }
68
+ // Command Shortcut Component
69
+ function CommandShortcut({ className, ...props }) {
70
+ return /*#__PURE__*/ _jsx("span", {
71
+ className: cn('command__shortcut', className),
72
+ ...props
73
+ });
74
+ }
75
+ export { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, };
76
+
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/cmdk/index.tsx"],"sourcesContent":["'use client'\n\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { SearchIcon } from 'lucide-react'\nimport * as React from 'react'\n\nimport './command.scss'\n\n// Helper to combine class names\nfunction cn(...classes: (false | null | string | undefined)[]) {\n return classes.filter(Boolean).join(' ')\n}\n\n// Main Command Component\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return <CommandPrimitive className={cn('command', className)} {...props} />\n}\n\n// Command Input Component\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div className=\"command__input-wrapper\">\n <SearchIcon className=\"command__input-icon\" />\n <CommandPrimitive.Input className={cn('command__input', className)} {...props} />\n </div>\n )\n}\n\n// Command List Component\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return <CommandPrimitive.List className={cn('command__list', className)} {...props} />\n}\n\n// Command Empty Component\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return <CommandPrimitive.Empty className=\"command__empty\" {...props} />\n}\n\n// Command Group Component\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return <CommandPrimitive.Group className={cn('command__group', className)} {...props} />\n}\n\n// Command Separator Component\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return <CommandPrimitive.Separator className={cn('command__separator', className)} {...props} />\n}\n\n// Command Item Component\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return <CommandPrimitive.Item className={cn('command__item', className)} {...props} />\n}\n\n// Command Shortcut Component\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return <span className={cn('command__shortcut', className)} {...props} />\n}\n\nexport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n"],"names":["Command","CommandPrimitive","SearchIcon","React","cn","classes","filter","Boolean","join","className","props","CommandInput","div","Input","CommandList","List","CommandEmpty","Empty","CommandGroup","Group","CommandSeparator","Separator","CommandItem","Item","CommandShortcut","span"],"mappings":"AAAA;;AAEA,SAASA,WAAWC,gBAAgB,QAAQ,OAAM;AAClD,SAASC,UAAU,QAAQ,eAAc;AACzC,YAAYC,WAAW,QAAO;AAE9B,OAAO,iBAAgB;AAEvB,gCAAgC;AAChC,SAASC,GAAG,GAAGC,OAA8C;IAC3D,OAAOA,QAAQC,MAAM,CAACC,SAASC,IAAI,CAAC;AACtC;AAEA,yBAAyB;AACzB,SAASR,QAAQ,EAAES,SAAS,EAAE,GAAGC,OAAsD;IACrF,qBAAO,KAACT;QAAiBQ,WAAWL,GAAG,WAAWK;QAAa,GAAGC,KAAK;;AACzE;AAEA,0BAA0B;AAC1B,SAASC,aAAa,EACpBF,SAAS,EACT,GAAGC,OACiD;IACpD,qBACE,MAACE;QAAIH,WAAU;;0BACb,KAACP;gBAAWO,WAAU;;0BACtB,KAACR,iBAAiBY,KAAK;gBAACJ,WAAWL,GAAG,kBAAkBK;gBAAa,GAAGC,KAAK;;;;AAGnF;AAEA,yBAAyB;AACzB,SAASI,YAAY,EAAEL,SAAS,EAAE,GAAGC,OAA2D;IAC9F,qBAAO,KAACT,iBAAiBc,IAAI;QAACN,WAAWL,GAAG,iBAAiBK;QAAa,GAAGC,KAAK;;AACpF;AAEA,0BAA0B;AAC1B,SAASM,aAAa,EAAE,GAAGN,OAA4D;IACrF,qBAAO,KAACT,iBAAiBgB,KAAK;QAACR,WAAU;QAAkB,GAAGC,KAAK;;AACrE;AAEA,0BAA0B;AAC1B,SAASQ,aAAa,EACpBT,SAAS,EACT,GAAGC,OACiD;IACpD,qBAAO,KAACT,iBAAiBkB,KAAK;QAACV,WAAWL,GAAG,kBAAkBK;QAAa,GAAGC,KAAK;;AACtF;AAEA,8BAA8B;AAC9B,SAASU,iBAAiB,EACxBX,SAAS,EACT,GAAGC,OACqD;IACxD,qBAAO,KAACT,iBAAiBoB,SAAS;QAACZ,WAAWL,GAAG,sBAAsBK;QAAa,GAAGC,KAAK;;AAC9F;AAEA,yBAAyB;AACzB,SAASY,YAAY,EAAEb,SAAS,EAAE,GAAGC,OAA2D;IAC9F,qBAAO,KAACT,iBAAiBsB,IAAI;QAACd,WAAWL,GAAG,iBAAiBK;QAAa,GAAGC,KAAK;;AACpF;AAEA,6BAA6B;AAC7B,SAASc,gBAAgB,EAAEf,SAAS,EAAE,GAAGC,OAAqC;IAC5E,qBAAO,KAACe;QAAKhB,WAAWL,GAAG,qBAAqBK;QAAa,GAAGC,KAAK;;AACvE;AAEA,SACEV,OAAO,EACPgB,YAAY,EACZE,YAAY,EACZP,YAAY,EACZW,WAAW,EACXR,WAAW,EACXM,gBAAgB,EAChBI,eAAe,KAChB"}
@@ -0,0 +1,94 @@
1
+ /////////////////////////////
2
+ // COMMAND MODAL STYLES
3
+ // Wrapper class to style command inside Payload Modal
4
+ /////////////////////////////
5
+
6
+ @layer payload {
7
+ .command-modal {
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ right: 0;
12
+ bottom: 0;
13
+ // Center the command
14
+ display: flex;
15
+ align-items: flex-start;
16
+ justify-content: center;
17
+ padding: calc(var(--base) * 6) calc(var(--base) * 1);
18
+
19
+ // Transition animations - only opacity on the modal wrapper
20
+ will-change: opacity;
21
+ transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1);
22
+ opacity: 0;
23
+
24
+ // Dark background with pseudo element
25
+ &::before {
26
+ content: '';
27
+ position: absolute;
28
+ top: 0;
29
+ left: 0;
30
+ right: 0;
31
+ bottom: 0;
32
+ background: var(--theme-overlay);
33
+ z-index: -1;
34
+ }
35
+
36
+ // Add blur when enabled - apply to wrapper instead of pseudo-element
37
+ &--blur {
38
+ backdrop-filter: blur(12px);
39
+ }
40
+
41
+ @media (max-width: 768px) {
42
+ padding: calc(var(--base) * 2) calc(var(--base) * 0.5);
43
+ align-items: center;
44
+ }
45
+
46
+ // Command container inside modal
47
+ .command {
48
+ width: 100%;
49
+ max-width: 640px;
50
+ max-height: 500px;
51
+
52
+ // Transform animations on the command itself
53
+ will-change: transform;
54
+ transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
55
+ transform: scale(0.96) translateY(-20px);
56
+
57
+ @media (max-width: 768px) {
58
+ max-width: 100%;
59
+ max-height: 70vh;
60
+ }
61
+ }
62
+ }
63
+
64
+ // Enter/Appear animations (opening) - target parent dialog element
65
+ .payload__modal-item--appearActive .command-modal,
66
+ .payload__modal-item--appearDone .command-modal,
67
+ .payload__modal-item--enterActive .command-modal,
68
+ .payload__modal-item--enterDone .command-modal {
69
+ opacity: 1;
70
+
71
+ .command {
72
+ transform: scale(1) translateY(0);
73
+ }
74
+ }
75
+
76
+ // Exit animation (closing) - target parent dialog element
77
+ .payload__modal-item--exitActive .command-modal,
78
+ .payload__modal-item--exitDone .command-modal {
79
+ opacity: 0;
80
+
81
+ .command {
82
+ transform: scale(0.96) translateY(-20px);
83
+ }
84
+ }
85
+
86
+ // Dark theme
87
+ html[data-theme='dark'] {
88
+ .command-modal {
89
+ &::before {
90
+ background: rgba(0, 0, 0, 0.75);
91
+ }
92
+ }
93
+ }
94
+ }
@@ -0,0 +1,2 @@
1
+ import type { PayloadHandler } from 'payload';
2
+ export declare const customEndpointHandler: PayloadHandler;
@@ -0,0 +1,7 @@
1
+ export const customEndpointHandler = ()=>{
2
+ return Response.json({
3
+ message: 'Hello from custom endpoint'
4
+ });
5
+ };
6
+
7
+ //# sourceMappingURL=customEndpointHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/endpoints/customEndpointHandler.ts"],"sourcesContent":["import type { PayloadHandler } from 'payload'\n\nexport const customEndpointHandler: PayloadHandler = () => {\n return Response.json({ message: 'Hello from custom endpoint' })\n}\n"],"names":["customEndpointHandler","Response","json","message"],"mappings":"AAEA,OAAO,MAAMA,wBAAwC;IACnD,OAAOC,SAASC,IAAI,CAAC;QAAEC,SAAS;IAA6B;AAC/D,EAAC"}
@@ -0,0 +1,2 @@
1
+ export { CommandMenuProvider } from '../components/CommandMenuContext';
2
+ export { default as SearchButton } from '../components/SearchButton';
@@ -0,0 +1,4 @@
1
+ export { CommandMenuProvider } from '../components/CommandMenuContext';
2
+ export { default as SearchButton } from '../components/SearchButton';
3
+
4
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/exports/client.ts"],"sourcesContent":["export { CommandMenuProvider } from '../components/CommandMenuContext'\nexport { default as SearchButton } from '../components/SearchButton'\n"],"names":["CommandMenuProvider","default","SearchButton"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,mCAAkC;AACtE,SAASC,WAAWC,YAAY,QAAQ,6BAA4B"}
File without changes
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=rsc.js.map