@freightos/freightwind 1.0.0 → 1.1.1

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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +28 -0
  3. package/dist/cjs/components/alert.js +33 -16
  4. package/dist/cjs/components/avatar.js +53 -58
  5. package/dist/cjs/components/badge.js +42 -18
  6. package/dist/cjs/components/button.js +35 -24
  7. package/dist/cjs/components/checkbox.js +21 -3
  8. package/dist/cjs/components/chip.js +67 -9
  9. package/dist/cjs/components/message.js +38 -0
  10. package/dist/cjs/components/pop-confirm.js +86 -0
  11. package/dist/cjs/components/radio-button-group.js +31 -35
  12. package/dist/cjs/components/radio-group.js +2 -1
  13. package/dist/cjs/components/slider.js +14 -6
  14. package/dist/cjs/components/switch.js +29 -10
  15. package/dist/cjs/components/tooltip.js +40 -11
  16. package/dist/cjs/index.js +38 -84
  17. package/dist/cjs/lib/icon-utils.js +5 -0
  18. package/dist/cjs/{components/aspect-ratio.js → lib/use-stable-id.js} +7 -4
  19. package/dist/cjs/lib/utils.js +18 -1
  20. package/dist/esm/components/alert.js +34 -17
  21. package/dist/esm/components/avatar.js +53 -22
  22. package/dist/esm/components/badge.js +45 -19
  23. package/dist/esm/components/button.js +36 -25
  24. package/dist/esm/components/checkbox.js +22 -4
  25. package/dist/esm/components/chip.js +34 -9
  26. package/dist/esm/components/message.js +34 -0
  27. package/dist/esm/components/pop-confirm.js +51 -0
  28. package/dist/esm/components/radio-button-group.js +31 -33
  29. package/dist/esm/components/radio-group.js +2 -1
  30. package/dist/esm/components/slider.js +14 -6
  31. package/dist/esm/components/switch.js +30 -11
  32. package/dist/esm/components/tooltip.js +40 -7
  33. package/dist/esm/index.js +18 -66
  34. package/dist/esm/lib/icon-utils.js +1 -0
  35. package/dist/esm/lib/use-stable-id.js +6 -0
  36. package/dist/esm/lib/utils.js +18 -1
  37. package/dist/types/components/alert.d.ts +5 -5
  38. package/dist/types/components/avatar.d.ts +14 -19
  39. package/dist/types/components/badge.d.ts +22 -8
  40. package/dist/types/components/button.d.ts +15 -9
  41. package/dist/types/components/checkbox.d.ts +8 -2
  42. package/dist/types/components/chip.d.ts +14 -8
  43. package/dist/types/components/message.d.ts +14 -0
  44. package/dist/types/components/pop-confirm.d.ts +28 -0
  45. package/dist/types/components/radio-button-group.d.ts +19 -14
  46. package/dist/types/components/slider.d.ts +10 -2
  47. package/dist/types/components/switch.d.ts +7 -6
  48. package/dist/types/components/tooltip.d.ts +9 -6
  49. package/dist/types/index.d.ts +25 -61
  50. package/dist/types/lib/icon-utils.d.ts +1 -0
  51. package/dist/types/lib/use-stable-id.d.ts +1 -0
  52. package/guidelines/Guidelines.md +54 -0
  53. package/guidelines/design-tokens/colors.md +81 -0
  54. package/guidelines/design-tokens/spacing.md +45 -0
  55. package/guidelines/design-tokens/typography.md +50 -0
  56. package/guidelines/overview-components.md +252 -0
  57. package/guidelines/overview-icons.md +52 -0
  58. package/package.json +63 -54
  59. package/tokens.css +409 -0
  60. package/dist/cjs/components/accordion.js +0 -57
  61. package/dist/cjs/components/breadcrumb.js +0 -65
  62. package/dist/cjs/components/calendar.js +0 -106
  63. package/dist/cjs/components/card.js +0 -59
  64. package/dist/cjs/components/chart.js +0 -176
  65. package/dist/cjs/components/collapsible.js +0 -43
  66. package/dist/cjs/components/command.js +0 -73
  67. package/dist/cjs/components/context-menu.js +0 -83
  68. package/dist/cjs/components/country-select.js +0 -155
  69. package/dist/cjs/components/date-picker.js +0 -59
  70. package/dist/cjs/components/date-range-picker.js +0 -59
  71. package/dist/cjs/components/date-time-picker.js +0 -106
  72. package/dist/cjs/components/dialog.js +0 -70
  73. package/dist/cjs/components/drawer.js +0 -68
  74. package/dist/cjs/components/dropdown-menu.js +0 -85
  75. package/dist/cjs/components/empty.js +0 -42
  76. package/dist/cjs/components/file-preview.js +0 -73
  77. package/dist/cjs/components/form.js +0 -106
  78. package/dist/cjs/components/inline-edit.js +0 -83
  79. package/dist/cjs/components/input-group.js +0 -70
  80. package/dist/cjs/components/input-otp.js +0 -58
  81. package/dist/cjs/components/input.js +0 -57
  82. package/dist/cjs/components/label.js +0 -45
  83. package/dist/cjs/components/menubar.js +0 -96
  84. package/dist/cjs/components/navigation-menu.js +0 -68
  85. package/dist/cjs/components/pagination.js +0 -65
  86. package/dist/cjs/components/phone-input.js +0 -218
  87. package/dist/cjs/components/popover.js +0 -49
  88. package/dist/cjs/components/progress.js +0 -43
  89. package/dist/cjs/components/resizable.js +0 -47
  90. package/dist/cjs/components/rich-text-editor.js +0 -152
  91. package/dist/cjs/components/route.js +0 -47
  92. package/dist/cjs/components/scroll-area.js +0 -48
  93. package/dist/cjs/components/select.js +0 -71
  94. package/dist/cjs/components/separator.js +0 -43
  95. package/dist/cjs/components/sheet.js +0 -245
  96. package/dist/cjs/components/skeleton.js +0 -8
  97. package/dist/cjs/components/sonner.js +0 -25
  98. package/dist/cjs/components/spinner.js +0 -25
  99. package/dist/cjs/components/stepper.js +0 -99
  100. package/dist/cjs/components/steps.js +0 -127
  101. package/dist/cjs/components/table.js +0 -66
  102. package/dist/cjs/components/tabs.js +0 -51
  103. package/dist/cjs/components/textarea.js +0 -44
  104. package/dist/cjs/components/time-picker.js +0 -110
  105. package/dist/cjs/components/toast.js +0 -75
  106. package/dist/cjs/components/toaster.js +0 -12
  107. package/dist/cjs/components/toggle-group.js +0 -58
  108. package/dist/cjs/components/toggle.js +0 -62
  109. package/dist/cjs/hooks/use-toast.js +0 -166
  110. package/dist/cjs/lib/countryUtils.js +0 -93
  111. package/dist/esm/components/accordion.js +0 -18
  112. package/dist/esm/components/aspect-ratio.js +0 -3
  113. package/dist/esm/components/breadcrumb.js +0 -23
  114. package/dist/esm/components/calendar.js +0 -70
  115. package/dist/esm/components/card.js +0 -18
  116. package/dist/esm/components/chart.js +0 -135
  117. package/dist/esm/components/collapsible.js +0 -5
  118. package/dist/esm/components/command.js +0 -29
  119. package/dist/esm/components/context-menu.js +0 -33
  120. package/dist/esm/components/country-select.js +0 -118
  121. package/dist/esm/components/date-picker.js +0 -23
  122. package/dist/esm/components/date-range-picker.js +0 -23
  123. package/dist/esm/components/date-time-picker.js +0 -70
  124. package/dist/esm/components/dialog.js +0 -24
  125. package/dist/esm/components/drawer.js +0 -23
  126. package/dist/esm/components/dropdown-menu.js +0 -35
  127. package/dist/esm/components/empty.js +0 -6
  128. package/dist/esm/components/file-preview.js +0 -69
  129. package/dist/esm/components/form.js +0 -63
  130. package/dist/esm/components/inline-edit.js +0 -47
  131. package/dist/esm/components/input-group.js +0 -63
  132. package/dist/esm/components/input-otp.js +0 -19
  133. package/dist/esm/components/input.js +0 -21
  134. package/dist/esm/components/label.js +0 -9
  135. package/dist/esm/components/menubar.js +0 -45
  136. package/dist/esm/components/navigation-menu.js +0 -24
  137. package/dist/esm/components/pagination.js +0 -23
  138. package/dist/esm/components/phone-input.js +0 -181
  139. package/dist/esm/components/popover.js +0 -10
  140. package/dist/esm/components/progress.js +0 -7
  141. package/dist/esm/components/resizable.js +0 -9
  142. package/dist/esm/components/rich-text-editor.js +0 -145
  143. package/dist/esm/components/route.js +0 -11
  144. package/dist/esm/components/scroll-area.js +0 -11
  145. package/dist/esm/components/select.js +0 -26
  146. package/dist/esm/components/separator.js +0 -7
  147. package/dist/esm/components/sheet.js +0 -197
  148. package/dist/esm/components/skeleton.js +0 -6
  149. package/dist/esm/components/sonner.js +0 -22
  150. package/dist/esm/components/spinner.js +0 -21
  151. package/dist/esm/components/stepper.js +0 -57
  152. package/dist/esm/components/steps.js +0 -80
  153. package/dist/esm/components/table.js +0 -22
  154. package/dist/esm/components/tabs.js +0 -12
  155. package/dist/esm/components/textarea.js +0 -8
  156. package/dist/esm/components/time-picker.js +0 -74
  157. package/dist/esm/components/toast.js +0 -33
  158. package/dist/esm/components/toaster.js +0 -9
  159. package/dist/esm/components/toggle-group.js +0 -21
  160. package/dist/esm/components/toggle.js +0 -25
  161. package/dist/esm/hooks/use-toast.js +0 -128
  162. package/dist/esm/lib/countryUtils.js +0 -87
  163. package/dist/styles.css +0 -152
  164. package/dist/types/components/accordion.d.ts +0 -11
  165. package/dist/types/components/aspect-ratio.d.ts +0 -3
  166. package/dist/types/components/breadcrumb.d.ts +0 -19
  167. package/dist/types/components/calendar.d.ts +0 -7
  168. package/dist/types/components/card.d.ts +0 -11
  169. package/dist/types/components/chart.d.ts +0 -66
  170. package/dist/types/components/collapsible.d.ts +0 -5
  171. package/dist/types/components/command.d.ts +0 -80
  172. package/dist/types/components/context-menu.d.ts +0 -27
  173. package/dist/types/components/country-select.d.ts +0 -17
  174. package/dist/types/components/date-picker.d.ts +0 -9
  175. package/dist/types/components/date-range-picker.d.ts +0 -10
  176. package/dist/types/components/date-time-picker.d.ts +0 -10
  177. package/dist/types/components/dialog.d.ts +0 -23
  178. package/dist/types/components/drawer.d.ts +0 -22
  179. package/dist/types/components/dropdown-menu.d.ts +0 -27
  180. package/dist/types/components/empty.d.ts +0 -6
  181. package/dist/types/components/file-preview.d.ts +0 -9
  182. package/dist/types/components/form.d.ts +0 -23
  183. package/dist/types/components/inline-edit.d.ts +0 -10
  184. package/dist/types/components/input-group.d.ts +0 -16
  185. package/dist/types/components/input-otp.d.ts +0 -34
  186. package/dist/types/components/input.d.ts +0 -9
  187. package/dist/types/components/label.d.ts +0 -5
  188. package/dist/types/components/menubar.d.ts +0 -28
  189. package/dist/types/components/navigation-menu.d.ts +0 -12
  190. package/dist/types/components/pagination.d.ts +0 -29
  191. package/dist/types/components/phone-input.d.ts +0 -20
  192. package/dist/types/components/popover.d.ts +0 -9
  193. package/dist/types/components/progress.d.ts +0 -4
  194. package/dist/types/components/resizable.d.ts +0 -23
  195. package/dist/types/components/rich-text-editor.d.ts +0 -8
  196. package/dist/types/components/route.d.ts +0 -10
  197. package/dist/types/components/scroll-area.d.ts +0 -5
  198. package/dist/types/components/select.d.ts +0 -13
  199. package/dist/types/components/separator.d.ts +0 -4
  200. package/dist/types/components/sheet.d.ts +0 -49
  201. package/dist/types/components/skeleton.d.ts +0 -2
  202. package/dist/types/components/sonner.d.ts +0 -4
  203. package/dist/types/components/spinner.d.ts +0 -8
  204. package/dist/types/components/stepper.d.ts +0 -17
  205. package/dist/types/components/steps.d.ts +0 -64
  206. package/dist/types/components/table.d.ts +0 -14
  207. package/dist/types/components/tabs.d.ts +0 -7
  208. package/dist/types/components/textarea.d.ts +0 -3
  209. package/dist/types/components/time-picker.d.ts +0 -10
  210. package/dist/types/components/toast.d.ts +0 -15
  211. package/dist/types/components/toaster.d.ts +0 -1
  212. package/dist/types/components/toggle-group.d.ts +0 -12
  213. package/dist/types/components/toggle.d.ts +0 -12
  214. package/dist/types/hooks/use-toast.d.ts +0 -44
  215. package/dist/types/lib/countryUtils.d.ts +0 -20
  216. package/tailwind-preset.js +0 -70
@@ -1,166 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.reducer = void 0;
38
- exports.useToast = useToast;
39
- exports.toast = toast;
40
- // Inspired by react-hot-toast library
41
- const React = __importStar(require("react"));
42
- const TOAST_LIMIT = 1;
43
- const TOAST_REMOVE_DELAY = 1000000;
44
- const actionTypes = {
45
- ADD_TOAST: "ADD_TOAST",
46
- UPDATE_TOAST: "UPDATE_TOAST",
47
- DISMISS_TOAST: "DISMISS_TOAST",
48
- REMOVE_TOAST: "REMOVE_TOAST",
49
- };
50
- let count = 0;
51
- function genId() {
52
- count = (count + 1) % Number.MAX_SAFE_INTEGER;
53
- return count.toString();
54
- }
55
- const toastTimeouts = new Map();
56
- const addToRemoveQueue = (toastId) => {
57
- if (toastTimeouts.has(toastId)) {
58
- return;
59
- }
60
- const timeout = setTimeout(() => {
61
- toastTimeouts.delete(toastId);
62
- dispatch({
63
- type: "REMOVE_TOAST",
64
- toastId: toastId,
65
- });
66
- }, TOAST_REMOVE_DELAY);
67
- toastTimeouts.set(toastId, timeout);
68
- };
69
- const reducer = (state, action) => {
70
- switch (action.type) {
71
- case "ADD_TOAST":
72
- return {
73
- ...state,
74
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),
75
- };
76
- case "UPDATE_TOAST":
77
- return {
78
- ...state,
79
- toasts: state.toasts.map((t) => t.id === action.toast.id ? { ...t, ...action.toast } : t),
80
- };
81
- case "DISMISS_TOAST": {
82
- const { toastId } = action;
83
- // ! Side effects ! - This could be extracted into a dismissToast() action,
84
- // but I'll keep it here for simplicity
85
- if (toastId) {
86
- addToRemoveQueue(toastId);
87
- }
88
- else {
89
- state.toasts.forEach((toast) => {
90
- addToRemoveQueue(toast.id);
91
- });
92
- }
93
- return {
94
- ...state,
95
- toasts: state.toasts.map((t) => t.id === toastId || toastId === undefined
96
- ? {
97
- ...t,
98
- open: false,
99
- }
100
- : t),
101
- };
102
- }
103
- case "REMOVE_TOAST":
104
- if (action.toastId === undefined) {
105
- return {
106
- ...state,
107
- toasts: [],
108
- };
109
- }
110
- return {
111
- ...state,
112
- toasts: state.toasts.filter((t) => t.id !== action.toastId),
113
- };
114
- }
115
- };
116
- exports.reducer = reducer;
117
- const listeners = [];
118
- let memoryState = { toasts: [] };
119
- function dispatch(action) {
120
- memoryState = (0, exports.reducer)(memoryState, action);
121
- listeners.forEach((listener) => {
122
- listener(memoryState);
123
- });
124
- }
125
- function toast({ ...props }) {
126
- const id = genId();
127
- const update = (props) => dispatch({
128
- type: "UPDATE_TOAST",
129
- toast: { ...props, id },
130
- });
131
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
132
- dispatch({
133
- type: "ADD_TOAST",
134
- toast: {
135
- ...props,
136
- id,
137
- open: true,
138
- onOpenChange: (open) => {
139
- if (!open)
140
- dismiss();
141
- },
142
- },
143
- });
144
- return {
145
- id: id,
146
- dismiss,
147
- update,
148
- };
149
- }
150
- function useToast() {
151
- const [state, setState] = React.useState(memoryState);
152
- React.useEffect(() => {
153
- listeners.push(setState);
154
- return () => {
155
- const index = listeners.indexOf(setState);
156
- if (index > -1) {
157
- listeners.splice(index, 1);
158
- }
159
- };
160
- }, [state]);
161
- return {
162
- ...state,
163
- toast,
164
- dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId }),
165
- };
166
- }
@@ -1,93 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCountryInfo = exports.getCountryFlagEmoji = exports.getCountryFlag = void 0;
4
- /**
5
- * Get flag image URL for country code (ISO 3166-1 alpha-2)
6
- * Uses Freightos festatic CDN for flag images
7
- * @param countryCode Two-letter country code (e.g., 'US', 'GB', 'FR')
8
- * @returns Flag image URL or empty string if invalid
9
- */
10
- const getCountryFlag = (countryCode) => {
11
- if (!countryCode || countryCode.length !== 2)
12
- return '';
13
- const lowerCode = countryCode.toLowerCase();
14
- // Use Freightos festatic CDN for flag images
15
- return `https://festatic.freightos.com/flags/1x1/${lowerCode}.svg`;
16
- };
17
- exports.getCountryFlag = getCountryFlag;
18
- /**
19
- * Get flag emoji for country code (ISO 3166-1 alpha-2)
20
- * Uses Unicode regional indicator symbols to display flag emojis
21
- */
22
- const getCountryFlagEmoji = (countryCode) => {
23
- if (!countryCode || countryCode.length !== 2)
24
- return '';
25
- const upperCode = countryCode.toUpperCase();
26
- // Convert country code to regional indicator symbols (flag emoji)
27
- const codePoints = [...upperCode].map(char => 0x1F1E6 + char.charCodeAt(0) - 65);
28
- return String.fromCodePoint(...codePoints);
29
- };
30
- exports.getCountryFlagEmoji = getCountryFlagEmoji;
31
- /**
32
- * Common country names mapping (ISO 3166-1 alpha-2 codes)
33
- */
34
- const COUNTRY_NAMES = {
35
- US: 'United States',
36
- GB: 'United Kingdom',
37
- CA: 'Canada',
38
- FR: 'France',
39
- DE: 'Germany',
40
- IT: 'Italy',
41
- ES: 'Spain',
42
- NL: 'Netherlands',
43
- BE: 'Belgium',
44
- CH: 'Switzerland',
45
- AT: 'Austria',
46
- SE: 'Sweden',
47
- NO: 'Norway',
48
- DK: 'Denmark',
49
- FI: 'Finland',
50
- PL: 'Poland',
51
- CZ: 'Czech Republic',
52
- IE: 'Ireland',
53
- PT: 'Portugal',
54
- GR: 'Greece',
55
- CN: 'China',
56
- JP: 'Japan',
57
- KR: 'South Korea',
58
- IN: 'India',
59
- AU: 'Australia',
60
- NZ: 'New Zealand',
61
- SG: 'Singapore',
62
- HK: 'Hong Kong',
63
- TW: 'Taiwan',
64
- TH: 'Thailand',
65
- MY: 'Malaysia',
66
- ID: 'Indonesia',
67
- PH: 'Philippines',
68
- VN: 'Vietnam',
69
- BR: 'Brazil',
70
- MX: 'Mexico',
71
- AR: 'Argentina',
72
- CL: 'Chile',
73
- CO: 'Colombia',
74
- PE: 'Peru',
75
- ZA: 'South Africa',
76
- EG: 'Egypt',
77
- IL: 'Israel',
78
- AE: 'United Arab Emirates',
79
- SA: 'Saudi Arabia',
80
- TR: 'Turkey',
81
- RU: 'Russia',
82
- UA: 'Ukraine',
83
- };
84
- /**
85
- * Get country information including flag, code, and name
86
- */
87
- const getCountryInfo = (countryCode) => {
88
- const upperCode = countryCode?.toUpperCase() || '';
89
- const flag = (0, exports.getCountryFlag)(upperCode);
90
- const name = COUNTRY_NAMES[upperCode] || upperCode;
91
- return { flag, code: upperCode, name };
92
- };
93
- exports.getCountryInfo = getCountryInfo;
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
- import * as React from 'react';
4
- import { IconCaretDown } from '@freightos/icons';
5
- import { cn } from '../lib/utils';
6
- const Accordion = AccordionPrimitive.Root;
7
- const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn(className), ...props })));
8
- AccordionItem.displayName = 'AccordionItem';
9
- const AccordionTrigger = React.forwardRef(({ className, children, caretPosition = 'end', bottom, ...props }, ref) => {
10
- const caretIcon = (_jsx(IconCaretDown, { size: 18, className: "h-6 w-6 shrink-0 transition-transform duration-200" }));
11
- return (_jsxs(AccordionPrimitive.Header, { className: "flex flex-col", children: [_jsxs(AccordionPrimitive.Trigger, { ref: ref, className: cn('flex flex-1 cursor-pointer items-center py-4 transition-all [&[data-state=open]>svg]:rotate-180', caretPosition === 'end'
12
- ? 'justify-between pe-fds-lg'
13
- : 'gap-fds-md ps-fds-lg', className), ...props, children: [caretPosition === 'start' && caretIcon, children, caretPosition === 'end' && caretIcon] }), bottom && _jsx("div", { children: bottom })] }));
14
- });
15
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
16
- const AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsx(AccordionPrimitive.Content, { ref: ref, className: "overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn(className), children: children }) })));
17
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
18
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
@@ -1,3 +0,0 @@
1
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
2
- const AspectRatio = AspectRatioPrimitive.Root;
3
- export { AspectRatio };
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { Slot } from "@radix-ui/react-slot";
4
- import { ChevronRight, MoreHorizontal } from "lucide-react";
5
- import { cn } from "../lib/utils";
6
- const Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
- Breadcrumb.displayName = "Breadcrumb";
8
- const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
9
- BreadcrumbList.displayName = "BreadcrumbList";
10
- const BreadcrumbItem = React.forwardRef(({ className, ...props }, ref) => (_jsx("li", { ref: ref, className: cn("inline-flex items-center gap-1.5", className), ...props })));
11
- BreadcrumbItem.displayName = "BreadcrumbItem";
12
- const BreadcrumbLink = React.forwardRef(({ asChild, className, ...props }, ref) => {
13
- const Comp = asChild ? Slot : "a";
14
- return (_jsx(Comp, { ref: ref, className: cn("transition-colors hover:text-foreground", className), ...props }));
15
- });
16
- BreadcrumbLink.displayName = "BreadcrumbLink";
17
- const BreadcrumbPage = React.forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, role: "link", "aria-disabled": "true", "aria-current": "page", className: cn("font-normal text-foreground", className), ...props })));
18
- BreadcrumbPage.displayName = "BreadcrumbPage";
19
- const BreadcrumbSeparator = ({ children, className, ...props }) => (_jsx("li", { role: "presentation", "aria-hidden": "true", className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className), ...props, children: children ?? _jsx(ChevronRight, {}) }));
20
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
21
- const BreadcrumbEllipsis = ({ className, ...props }) => (_jsxs("span", { role: "presentation", "aria-hidden": "true", className: cn("flex h-9 w-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontal, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "More" })] }));
22
- BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
23
- export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
@@ -1,70 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from 'lucide-react';
4
- import * as React from 'react';
5
- import { DayPicker, getDefaultClassNames } from 'react-day-picker';
6
- import { buttonVariants } from './button';
7
- import { cn } from '../lib/utils';
8
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = 'label', buttonVariant = 'text', formatters, components, ...props }) {
9
- const defaultClassNames = getDefaultClassNames();
10
- return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn('group/calendar bg-card p-3 [--cell-size:2rem]', String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
11
- formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),
12
- ...formatters,
13
- }, classNames: {
14
- root: cn('w-fit', defaultClassNames.root),
15
- months: cn('flex gap-4 flex-col md:flex-row relative', defaultClassNames.months),
16
- month: cn('flex flex-col w-full gap-4', defaultClassNames.month),
17
- nav: cn('flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between', defaultClassNames.nav),
18
- button_previous: cn(buttonVariants({ type: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_previous),
19
- button_next: cn(buttonVariants({ type: buttonVariant }), 'size-(--cell-size) aria-disabled:opacity-50 p-0 select-none', defaultClassNames.button_next),
20
- month_caption: cn('flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)', defaultClassNames.month_caption),
21
- dropdowns: cn('w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5', defaultClassNames.dropdowns),
22
- dropdown_root: cn('relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md', defaultClassNames.dropdown_root),
23
- dropdown: cn('absolute bg-popover inset-0 opacity-0', defaultClassNames.dropdown),
24
- caption_label: cn('select-none font-medium', captionLayout === 'label'
25
- ? 'text-sm'
26
- : 'rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5', defaultClassNames.caption_label),
27
- table: 'w-full border-collapse',
28
- weekdays: cn('flex', defaultClassNames.weekdays),
29
- weekday: cn('text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none', defaultClassNames.weekday),
30
- week: cn('flex w-full mt-2', defaultClassNames.week),
31
- week_number_header: cn('select-none w-(--cell-size)', defaultClassNames.week_number_header),
32
- week_number: cn('text-[0.8rem] select-none text-muted-foreground', defaultClassNames.week_number),
33
- day: cn('relative w-full h-full p-0 text-center group/day aspect-square select-none', defaultClassNames.day),
34
- range_start: cn('[&_button]:bg-primary [&_button]:text-primary-foreground [&_button]:rounded-l-md [&_button]:rounded-r-none [&_button]:hover:bg-primary [&_button]:hover:text-primary-foreground', defaultClassNames.range_start),
35
- range_middle: cn('[&_button]:bg-fds-blue-10 [&_button]:text-fds-gray [&_button]:rounded-none [&_button]:hover:bg-fds-blue-20 [&_button]:hover:text-fds-gray', defaultClassNames.range_middle),
36
- range_end: cn('[&_button]:bg-primary [&_button]:text-primary-foreground [&_button]:rounded-r-md [&_button]:rounded-l-none [&_button]:hover:bg-primary [&_button]:hover:text-primary-foreground', defaultClassNames.range_end),
37
- today: cn('bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none', defaultClassNames.today),
38
- outside: cn('text-muted-foreground aria-selected:text-muted-foreground', defaultClassNames.outside),
39
- disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),
40
- hidden: cn('invisible', defaultClassNames.hidden),
41
- ...classNames,
42
- }, components: {
43
- Root: ({ className, rootRef, ...props }) => {
44
- return (_jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props }));
45
- },
46
- Chevron: ({ className, orientation, ...props }) => {
47
- if (orientation === 'left') {
48
- return (_jsx(ChevronLeftIcon, { className: cn('size-4', className), ...props }));
49
- }
50
- if (orientation === 'right') {
51
- return (_jsx(ChevronRightIcon, { className: cn('size-4', className), ...props }));
52
- }
53
- return (_jsx(ChevronDownIcon, { className: cn('size-4', className), ...props }));
54
- },
55
- DayButton: CalendarDayButton,
56
- WeekNumber: ({ children, ...props }) => {
57
- return (_jsx("td", { ...props, children: _jsx("div", { className: "size-(--cell-size) flex items-center justify-center text-center", children: children }) }));
58
- },
59
- ...components,
60
- }, ...props }));
61
- }
62
- function CalendarDayButton({ className, day, modifiers, ...props }) {
63
- const ref = React.useRef(null);
64
- React.useEffect(() => {
65
- if (modifiers.focused)
66
- ref.current?.focus();
67
- }, [modifiers.focused]);
68
- return (_jsx("button", { ref: ref, type: "button", "data-day": day.date.toLocaleDateString(), className: cn('inline-flex items-center justify-center rounded-md text-sm font-normal transition-colors', 'hover:bg-accent hover:text-accent-foreground', 'focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', 'disabled:pointer-events-none disabled:opacity-50', 'h-9 w-9 p-0', 'aria-selected:bg-primary aria-selected:text-primary-foreground aria-selected:hover:bg-primary aria-selected:hover:text-primary-foreground', className), ...props }));
69
- }
70
- export { Calendar, CalendarDayButton };
@@ -1,18 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '../lib/utils';
4
- const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('rounded-lg bg-card p-fds-xl shadow-fds-sm', 'text-card-foreground', className), ...props })));
5
- Card.displayName = 'Card';
6
- const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-slot": "card-header", className: cn('@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 has-[[data-slot=card-action]]:grid-cols-[1fr_auto]', className), ...props })));
7
- CardHeader.displayName = 'CardHeader';
8
- const CardAction = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-slot": "card-action", className: cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className), ...props })));
9
- CardAction.displayName = 'CardAction';
10
- const CardTitle = React.forwardRef(({ className, size = 'medium', ...props }, ref) => {
11
- return (_jsx("div", { ref: ref, className: cn('font-fds-bold leading-none tracking-tight', size === 'small' ? 'text-fds-h5' : 'text-fds-h3', className), ...props }));
12
- });
13
- CardTitle.displayName = 'CardTitle';
14
- const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('pt-0', className), ...props })));
15
- CardContent.displayName = 'CardContent';
16
- const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
17
- CardFooter.displayName = 'CardFooter';
18
- export { Card, CardAction, CardContent, CardFooter, CardHeader, CardTitle };
@@ -1,135 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as RechartsPrimitive from "recharts";
5
- import { cn } from "../lib/utils";
6
- // Format: { THEME_NAME: CSS_SELECTOR }
7
- const THEMES = { light: "", dark: ".dark" };
8
- const ChartContext = React.createContext(null);
9
- function useChart() {
10
- const context = React.useContext(ChartContext);
11
- if (!context) {
12
- throw new Error("useChart must be used within a <ChartContainer />");
13
- }
14
- return context;
15
- }
16
- const ChartContainer = React.forwardRef(({ id, className, children, config, ...props }, ref) => {
17
- const uniqueId = React.useId();
18
- const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
19
- return (_jsx(ChartContext.Provider, { value: { config }, children: _jsxs("div", { "data-chart": chartId, ref: ref, className: cn("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none", className), ...props, children: [_jsx(ChartStyle, { id: chartId, config: config }), _jsx(RechartsPrimitive.ResponsiveContainer, { children: children })] }) }));
20
- });
21
- ChartContainer.displayName = "Chart";
22
- const ChartStyle = ({ id, config }) => {
23
- const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);
24
- if (!colorConfig.length) {
25
- return null;
26
- }
27
- return (_jsx("style", { dangerouslySetInnerHTML: {
28
- __html: Object.entries(THEMES)
29
- .map(([theme, prefix]) => `
30
- ${prefix} [data-chart=${id}] {
31
- ${colorConfig
32
- .map(([key, itemConfig]) => {
33
- const color = itemConfig.theme?.[theme] ||
34
- itemConfig.color;
35
- return color ? ` --color-${key}: ${color};` : null;
36
- })
37
- .join("\n")}
38
- }
39
- `)
40
- .join("\n"),
41
- } }));
42
- };
43
- const ChartTooltip = RechartsPrimitive.Tooltip;
44
- const ChartTooltipContent = React.forwardRef(({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }, ref) => {
45
- const { config } = useChart();
46
- const tooltipLabel = React.useMemo(() => {
47
- if (hideLabel || !payload?.length) {
48
- return null;
49
- }
50
- const [item] = payload;
51
- const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
52
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
53
- const value = !labelKey && typeof label === "string"
54
- ? config[label]?.label || label
55
- : itemConfig?.label;
56
- if (labelFormatter) {
57
- return (_jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) }));
58
- }
59
- if (!value) {
60
- return null;
61
- }
62
- return _jsx("div", { className: cn("font-medium", labelClassName), children: value });
63
- }, [
64
- label,
65
- labelFormatter,
66
- payload,
67
- hideLabel,
68
- labelClassName,
69
- config,
70
- labelKey,
71
- ]);
72
- if (!active || !payload?.length) {
73
- return null;
74
- }
75
- const nestLabel = payload.length === 1 && indicator !== "dot";
76
- return (_jsxs("div", { ref: ref, className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
77
- .filter((item) => item.type !== "none")
78
- .map((item, index) => {
79
- const key = `${nameKey || item.name || item.dataKey || "value"}`;
80
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
81
- const indicatorColor = color || item.payload?.fill || item.color;
82
- return (_jsx("div", { className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", indicator === "dot" && "items-center"), children: formatter && item?.value !== undefined && item.name ? (formatter(item.value, item.name, item, index, item.payload)) : (_jsxs(_Fragment, { children: [itemConfig?.icon ? (_jsx(itemConfig.icon, {})) : (!hideIndicator && (_jsx("div", { className: cn("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]", {
83
- "h-2.5 w-2.5": indicator === "dot",
84
- "w-1": indicator === "line",
85
- "w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
86
- "my-0.5": nestLabel && indicator === "dashed",
87
- }), style: {
88
- "--color-bg": indicatorColor,
89
- "--color-border": indicatorColor,
90
- } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })] }), item.value && (_jsx("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() }))] })] })) }, item.dataKey));
91
- }) })] }));
92
- });
93
- ChartTooltipContent.displayName = "ChartTooltip";
94
- const ChartLegend = RechartsPrimitive.Legend;
95
- const ChartLegendContent = React.forwardRef(({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
96
- const { config } = useChart();
97
- if (!payload?.length) {
98
- return null;
99
- }
100
- return (_jsx("div", { ref: ref, className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className), children: payload
101
- .filter((item) => item.type !== "none")
102
- .map((item) => {
103
- const key = `${nameKey || item.dataKey || "value"}`;
104
- const itemConfig = getPayloadConfigFromPayload(config, item, key);
105
- return (_jsxs("div", { className: cn("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"), children: [itemConfig?.icon && !hideIcon ? (_jsx(itemConfig.icon, {})) : (_jsx("div", { className: "h-2 w-2 shrink-0 rounded-[2px]", style: {
106
- backgroundColor: item.color,
107
- } })), itemConfig?.label] }, item.value));
108
- }) }));
109
- });
110
- ChartLegendContent.displayName = "ChartLegend";
111
- // Helper to extract item config from a payload.
112
- function getPayloadConfigFromPayload(config, payload, key) {
113
- if (typeof payload !== "object" || payload === null) {
114
- return undefined;
115
- }
116
- const payloadPayload = "payload" in payload &&
117
- typeof payload.payload === "object" &&
118
- payload.payload !== null
119
- ? payload.payload
120
- : undefined;
121
- let configLabelKey = key;
122
- if (key in payload &&
123
- typeof payload[key] === "string") {
124
- configLabelKey = payload[key];
125
- }
126
- else if (payloadPayload &&
127
- key in payloadPayload &&
128
- typeof payloadPayload[key] === "string") {
129
- configLabelKey = payloadPayload[key];
130
- }
131
- return configLabelKey in config
132
- ? config[configLabelKey]
133
- : config[key];
134
- }
135
- export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, };
@@ -1,5 +0,0 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
2
- const Collapsible = CollapsiblePrimitive.Root;
3
- const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
4
- const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
5
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -1,29 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
4
- import { Command as CommandPrimitive } from 'cmdk';
5
- import { Search } from 'lucide-react';
6
- import { cn } from '../lib/utils';
7
- import { Dialog, DialogContent } from './dialog';
8
- const Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn('flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground', className), ...props })));
9
- Command.displayName = CommandPrimitive.displayName;
10
- const CommandDialog = ({ children, ...props }) => {
11
- return (_jsx(Dialog, { ...props, children: _jsx(DialogContent, { className: "overflow-hidden p-0 shadow-lg", children: _jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) }) }));
12
- };
13
- const CommandInput = React.forwardRef(({ className, ...props }, ref) => (_jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [_jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { ref: ref, className: cn('flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50', className), ...props })] })));
14
- CommandInput.displayName = CommandPrimitive.Input.displayName;
15
- const CommandList = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.List, { ref: ref, className: cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className), ...props })));
16
- CommandList.displayName = CommandPrimitive.List.displayName;
17
- const CommandEmpty = React.forwardRef((props, ref) => (_jsx(CommandPrimitive.Empty, { ref: ref, className: "py-6 text-center text-sm", ...props })));
18
- CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
19
- const CommandGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Group, { ref: ref, className: cn('overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', className), ...props })));
20
- CommandGroup.displayName = CommandPrimitive.Group.displayName;
21
- const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Separator, { ref: ref, className: cn('-mx-1 h-px bg-border', className), ...props })));
22
- CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
23
- const CommandItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive.Item, { ref: ref, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none hover:bg-fds-blue-10 hover:text-foreground data-[disabled=true]:pointer-events-none data-[selected='true']:bg-fds-blue-10 data-[selected=true]:text-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", className), ...props })));
24
- CommandItem.displayName = CommandPrimitive.Item.displayName;
25
- const CommandShortcut = ({ className, ...props }) => {
26
- return (_jsx("span", { className: cn('ml-auto text-xs tracking-widest text-muted-foreground', className), ...props }));
27
- };
28
- CommandShortcut.displayName = 'CommandShortcut';
29
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4
- import { Check, ChevronRight, Circle } from "lucide-react";
5
- import { cn } from "../lib/utils";
6
- const ContextMenu = ContextMenuPrimitive.Root;
7
- const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
8
- const ContextMenuGroup = ContextMenuPrimitive.Group;
9
- const ContextMenuPortal = ContextMenuPrimitive.Portal;
10
- const ContextMenuSub = ContextMenuPrimitive.Sub;
11
- const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
12
- const ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
13
- ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
14
- const ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 origin-[--radix-context-menu-content-transform-origin]", className), ...props })));
15
- ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
16
- const ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { ref: ref, className: cn("z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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 origin-[--radix-context-menu-content-transform-origin]", className), ...props }) })));
17
- ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
18
- const ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(ContextMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
19
- ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
20
- const ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(ContextMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm 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), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
21
- ContextMenuCheckboxItem.displayName =
22
- ContextMenuPrimitive.CheckboxItem.displayName;
23
- const ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ContextMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-default select-none items-center rounded-sm 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(ContextMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
24
- ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
25
- const ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(ContextMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className), ...props })));
26
- ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
27
- const ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(ContextMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-border", className), ...props })));
28
- ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
29
- const ContextMenuShortcut = ({ className, ...props }) => {
30
- return (_jsx("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
31
- };
32
- ContextMenuShortcut.displayName = "ContextMenuShortcut";
33
- export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };