mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
merge conflicts resolved.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
||||||
"lint": "eslint src",
|
"lint": "eslint src",
|
||||||
"lint:fix": "eslint src --fix",
|
"lint:fix": "eslint src --fix",
|
||||||
|
"fix:imports": "node scripts/fix-duplicate-imports.mjs",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
227
scripts/fix-duplicate-imports.mjs
Normal file
227
scripts/fix-duplicate-imports.mjs
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
/**
|
||||||
|
* fix-duplicate-imports.mjs
|
||||||
|
*
|
||||||
|
* Merges duplicate import statements from the same module across all TypeScript
|
||||||
|
* source files in the project. Run this whenever `npm run lint` reports
|
||||||
|
* `no-duplicate-imports` errors.
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* node scripts/fix-duplicate-imports.mjs
|
||||||
|
*
|
||||||
|
* Handles:
|
||||||
|
* import type { A, B } from 'module' — type-only imports
|
||||||
|
* import Default from 'module' — default imports
|
||||||
|
* import Default, { A, B } from 'mod' — mixed default + named
|
||||||
|
* import { A, B } from 'module' — named imports
|
||||||
|
* import {\n A,\n B\n} from 'mod' — multi-line named imports
|
||||||
|
*
|
||||||
|
* When merging a `import type` with a value import from the same module,
|
||||||
|
* type-only specifiers are inlined as `type Name` in the merged statement.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { readFileSync, readdirSync, statSync, writeFileSync } from "fs";
|
||||||
|
import { extname, join, resolve } from "path";
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Config
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
const projectRoot = resolve(new URL(".", import.meta.url).pathname, "..");
|
||||||
|
const srcDir = join(projectRoot, "src");
|
||||||
|
const extensions = new Set([".ts", ".tsx"]);
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// File discovery — recursively find all TS/TSX files under src/
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function findFiles(dir) {
|
||||||
|
const results = [];
|
||||||
|
for (const entry of readdirSync(dir)) {
|
||||||
|
const full = join(dir, entry);
|
||||||
|
if (statSync(full).isDirectory()) {
|
||||||
|
results.push(...findFiles(full));
|
||||||
|
} else if (extensions.has(extname(entry))) {
|
||||||
|
results.push(full);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Import extraction
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extracts all top-level import statements from file content.
|
||||||
|
* Returns array of { start, end, raw, module, isType, defaultImport, namedImports }
|
||||||
|
* where start/end are character positions in the content.
|
||||||
|
*/
|
||||||
|
function extractImports(content) {
|
||||||
|
const results = [];
|
||||||
|
const importRe = /^import\s+([\s\S]*?)from\s+['"]([^'"]+)['"]\s*;?/gm;
|
||||||
|
|
||||||
|
let match;
|
||||||
|
while ((match = importRe.exec(content)) !== null) {
|
||||||
|
const raw = match[0];
|
||||||
|
const specifierPart = match[1];
|
||||||
|
const moduleName = match[2];
|
||||||
|
|
||||||
|
const isType = /^type\s+/.test(specifierPart.trimStart());
|
||||||
|
const cleanSpec = specifierPart.replace(/^type\s+/, "").trim();
|
||||||
|
|
||||||
|
let defaultImport = null;
|
||||||
|
let namedStr = null;
|
||||||
|
|
||||||
|
const namespaceMatch = cleanSpec.match(/^\*\s+as\s+(\w+)/);
|
||||||
|
if (namespaceMatch) {
|
||||||
|
defaultImport = `* as ${namespaceMatch[1]}`;
|
||||||
|
} else {
|
||||||
|
const braceIdx = cleanSpec.indexOf("{");
|
||||||
|
if (braceIdx === -1) {
|
||||||
|
const def = cleanSpec.replace(/,$/, "").trim();
|
||||||
|
if (def) defaultImport = def;
|
||||||
|
} else {
|
||||||
|
const beforeBrace = cleanSpec.slice(0, braceIdx).replace(/,$/, "").trim();
|
||||||
|
if (beforeBrace) defaultImport = beforeBrace;
|
||||||
|
const closeBrace = cleanSpec.lastIndexOf("}");
|
||||||
|
namedStr = cleanSpec.slice(braceIdx + 1, closeBrace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const namedImports = namedStr
|
||||||
|
? namedStr.split(",").map((s) => s.trim()).filter(Boolean)
|
||||||
|
: [];
|
||||||
|
|
||||||
|
results.push({
|
||||||
|
start: match.index,
|
||||||
|
end: match.index + raw.length,
|
||||||
|
raw,
|
||||||
|
module: moduleName,
|
||||||
|
isType,
|
||||||
|
defaultImport,
|
||||||
|
namedImports,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Import merging
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a single merged import statement from multiple imports of the same module.
|
||||||
|
*
|
||||||
|
* - All type imports → merged `import type { ... }`
|
||||||
|
* - Mixed type + value → merged value import with inline `type Name` specifiers
|
||||||
|
*/
|
||||||
|
function buildMergedImport(moduleName, importList) {
|
||||||
|
const allType = importList.every((i) => i.isType);
|
||||||
|
|
||||||
|
if (allType) {
|
||||||
|
const allNamed = new Set(importList.flatMap((i) => i.namedImports));
|
||||||
|
const defaultImport = importList.map((i) => i.defaultImport).find(Boolean) ?? null;
|
||||||
|
const parts = [];
|
||||||
|
if (defaultImport) parts.push(defaultImport);
|
||||||
|
if (allNamed.size > 0) parts.push(`{ ${[...allNamed].join(", ")} }`);
|
||||||
|
if (parts.length === 0) return `import type "${moduleName}";`;
|
||||||
|
return `import type ${parts.join(", ")} from "${moduleName}";`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mixed: collect value default, type-only named, value named separately
|
||||||
|
let valueDefault = null;
|
||||||
|
const typeNamed = new Set();
|
||||||
|
const valueNamed = new Set();
|
||||||
|
|
||||||
|
for (const imp of importList) {
|
||||||
|
if (imp.defaultImport && !imp.isType) valueDefault = imp.defaultImport;
|
||||||
|
for (const n of imp.namedImports) {
|
||||||
|
(imp.isType ? typeNamed : valueNamed).add(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build named specifiers: `type X` for type-only, plain for value
|
||||||
|
const typeSpecifiers = [...typeNamed].filter((n) => !valueNamed.has(n)).map((n) => `type ${n}`);
|
||||||
|
const valueSpecifiers = [...valueNamed];
|
||||||
|
const namedParts = [...typeSpecifiers, ...valueSpecifiers];
|
||||||
|
|
||||||
|
const parts = [];
|
||||||
|
if (valueDefault) parts.push(valueDefault);
|
||||||
|
if (namedParts.length > 0) parts.push(`{ ${namedParts.join(", ")} }`);
|
||||||
|
if (parts.length === 0) return `import "${moduleName}";`;
|
||||||
|
return `import ${parts.join(", ")} from "${moduleName}";`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// File fixer
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function fixFile(filePath) {
|
||||||
|
let content = readFileSync(filePath, "utf-8");
|
||||||
|
const imports = extractImports(content);
|
||||||
|
if (imports.length === 0) return null;
|
||||||
|
|
||||||
|
// Group by module
|
||||||
|
const byModule = new Map();
|
||||||
|
for (const imp of imports) {
|
||||||
|
if (!byModule.has(imp.module)) byModule.set(imp.module, []);
|
||||||
|
byModule.get(imp.module).push(imp);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (![...byModule.values()].some((v) => v.length > 1)) return null;
|
||||||
|
|
||||||
|
// Build merged text for each module
|
||||||
|
const mergedMap = new Map();
|
||||||
|
for (const [mod, imps] of byModule) {
|
||||||
|
mergedMap.set(mod, imps.length === 1 ? imps[0].raw : buildMergedImport(mod, imps));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build replacement list (process in reverse order to preserve character positions)
|
||||||
|
imports.sort((a, b) => a.start - b.start);
|
||||||
|
const placedModules = new Set();
|
||||||
|
const replacements = [];
|
||||||
|
|
||||||
|
for (const imp of imports) {
|
||||||
|
if (!placedModules.has(imp.module)) {
|
||||||
|
replacements.push({ start: imp.start, end: imp.end, replacement: mergedMap.get(imp.module) });
|
||||||
|
placedModules.add(imp.module);
|
||||||
|
} else {
|
||||||
|
// Remove duplicate, including its trailing newline
|
||||||
|
const end = content[imp.end] === "\n" ? imp.end + 1 : imp.end;
|
||||||
|
replacements.push({ start: imp.start, end, replacement: "" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
replacements.sort((a, b) => b.start - a.start);
|
||||||
|
for (const { start, end, replacement } of replacements) {
|
||||||
|
content = content.slice(0, start) + replacement + content.slice(end);
|
||||||
|
}
|
||||||
|
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Main
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
const files = findFiles(srcDir);
|
||||||
|
let fixedCount = 0;
|
||||||
|
|
||||||
|
for (const filePath of files) {
|
||||||
|
try {
|
||||||
|
const original = readFileSync(filePath, "utf-8");
|
||||||
|
const fixed = fixFile(filePath);
|
||||||
|
if (fixed && fixed !== original) {
|
||||||
|
writeFileSync(filePath, fixed, "utf-8");
|
||||||
|
const rel = filePath.replace(projectRoot + "/", "");
|
||||||
|
console.log(`Fixed: ${rel}`);
|
||||||
|
fixedCount++;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
const rel = filePath.replace(projectRoot + "/", "");
|
||||||
|
console.error(`Error: ${rel} — ${err.message}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`\nDone. Fixed ${fixedCount} file${fixedCount !== 1 ? "s" : ""}.`);
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useMemo } from "react";
|
||||||
import { useMemo } from "react";
|
|
||||||
import { faCircleCheck, faCircleExclamation, faTriangleExclamation } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCircleCheck, faCircleExclamation, faTriangleExclamation } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { Lead } from "@/types/entities";
|
import type { Lead } from "@/types/entities";
|
||||||
@@ -42,7 +41,11 @@ export const SlaMetrics = ({ leads }: SlaMetricsProps) => {
|
|||||||
return { avgHours, withinSla, total, slaPercent };
|
return { avgHours, withinSla, total, slaPercent };
|
||||||
}, [leads]);
|
}, [leads]);
|
||||||
|
|
||||||
const getTargetStatus = (): { icon: FC<{ className?: string }>; label: string; colorClass: string } => {
|
const getTargetStatus = (): {
|
||||||
|
icon: FC<{ className?: string }>;
|
||||||
|
label: string;
|
||||||
|
colorClass: string;
|
||||||
|
} => {
|
||||||
const diff = metrics.avgHours - SLA_TARGET_HOURS;
|
const diff = metrics.avgHours - SLA_TARGET_HOURS;
|
||||||
|
|
||||||
if (diff <= 0) {
|
if (diff <= 0) {
|
||||||
@@ -100,7 +103,8 @@ export const SlaMetrics = ({ leads }: SlaMetricsProps) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span className="mt-1.5 block text-xs text-tertiary">
|
<span className="mt-1.5 block text-xs text-tertiary">
|
||||||
{metrics.withinSla} of {metrics.total} leads within SLA ({Math.round(metrics.slaPercent)}%)
|
{metrics.withinSla} of {metrics.total} leads within SLA ({Math.round(metrics.slaPercent)}
|
||||||
|
%)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
import type { FC, HTMLAttributes } from "react";
|
import { type FC, type HTMLAttributes, useCallback, useEffect, useRef } from "react";
|
||||||
import { useCallback, useEffect, useRef } from "react";
|
|
||||||
import { faArrowRightFromBracket, faGear, faPhoneVolume, faSort, faUser } from "@fortawesome/pro-duotone-svg-icons";
|
import { faArrowRightFromBracket, faGear, faPhoneVolume, faSort, faUser } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { Placement } from "@react-types/overlays";
|
import type { Placement } from "@react-types/overlays";
|
||||||
import { useFocusManager } from "react-aria";
|
import { useFocusManager } from "react-aria";
|
||||||
import type { DialogProps as AriaDialogProps } from "react-aria-components";
|
import {
|
||||||
import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Popover as AriaPopover } from "react-aria-components";
|
Button as AriaButton,
|
||||||
|
Dialog as AriaDialog,
|
||||||
|
type DialogProps as AriaDialogProps,
|
||||||
|
DialogTrigger as AriaDialogTrigger,
|
||||||
|
Popover as AriaPopover,
|
||||||
|
} from "react-aria-components";
|
||||||
import { AvatarLabelGroup } from "@/components/base/avatar/avatar-label-group";
|
import { AvatarLabelGroup } from "@/components/base/avatar/avatar-label-group";
|
||||||
import { useBreakpoint } from "@/hooks/use-breakpoint";
|
import { useBreakpoint } from "@/hooks/use-breakpoint";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC, ReactNode } from "react";
|
import { type FC, type ReactNode, useState } from "react";
|
||||||
import { useState } from "react";
|
|
||||||
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { AnimatePresence, motion } from "motion/react";
|
import { AnimatePresence, motion } from "motion/react";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useState } from "react";
|
||||||
import { useState } from "react";
|
|
||||||
import { faArrowRightFromBracket, faGear, faLifeRing } from "@fortawesome/pro-duotone-svg-icons";
|
import { faArrowRightFromBracket, faGear, faLifeRing } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { AnimatePresence, motion } from "motion/react";
|
import { AnimatePresence, motion } from "motion/react";
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import type { FC, HTMLAttributes, PropsWithChildren } from "react";
|
import { type FC, Fragment, type HTMLAttributes, type PropsWithChildren, useContext, useState } from "react";
|
||||||
import { Fragment, useContext, useState } from "react";
|
|
||||||
import { faChevronLeft, faChevronRight } from "@fortawesome/pro-duotone-svg-icons";
|
import { faChevronLeft, faChevronRight } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { type CalendarDate, getLocalTimeZone, today } from "@internationalized/date";
|
import { type CalendarDate, getLocalTimeZone, today } from "@internationalized/date";
|
||||||
import type { CalendarProps as AriaCalendarProps, DateValue } from "react-aria-components";
|
|
||||||
import {
|
import {
|
||||||
Calendar as AriaCalendar,
|
Calendar as AriaCalendar,
|
||||||
CalendarContext as AriaCalendarContext,
|
CalendarContext as AriaCalendarContext,
|
||||||
@@ -11,8 +9,10 @@ import {
|
|||||||
CalendarGridBody as AriaCalendarGridBody,
|
CalendarGridBody as AriaCalendarGridBody,
|
||||||
CalendarGridHeader as AriaCalendarGridHeader,
|
CalendarGridHeader as AriaCalendarGridHeader,
|
||||||
CalendarHeaderCell as AriaCalendarHeaderCell,
|
CalendarHeaderCell as AriaCalendarHeaderCell,
|
||||||
|
type CalendarProps as AriaCalendarProps,
|
||||||
CalendarStateContext as AriaCalendarStateContext,
|
CalendarStateContext as AriaCalendarStateContext,
|
||||||
Heading as AriaHeading,
|
Heading as AriaHeading,
|
||||||
|
type DateValue,
|
||||||
useSlottedContext,
|
useSlottedContext,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
import { getDayOfWeek, getLocalTimeZone, isToday } from "@internationalized/date";
|
import { getDayOfWeek, getLocalTimeZone, isToday } from "@internationalized/date";
|
||||||
import type { CalendarCellProps as AriaCalendarCellProps } from "react-aria-components";
|
import {
|
||||||
import { CalendarCell as AriaCalendarCell, RangeCalendarContext, useLocale, useSlottedContext } from "react-aria-components";
|
CalendarCell as AriaCalendarCell,
|
||||||
|
type CalendarCellProps as AriaCalendarCellProps,
|
||||||
|
RangeCalendarContext,
|
||||||
|
useLocale,
|
||||||
|
useSlottedContext,
|
||||||
|
} from "react-aria-components";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
interface CalendarCellProps extends AriaCalendarCellProps {
|
interface CalendarCellProps extends AriaCalendarCellProps {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { DateInputProps as AriaDateInputProps } from "react-aria-components";
|
import { DateInput as AriaDateInput, type DateInputProps as AriaDateInputProps, DateSegment as AriaDateSegment } from "react-aria-components";
|
||||||
import { DateInput as AriaDateInput, DateSegment as AriaDateSegment } from "react-aria-components";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
type DateInputProps = Omit<AriaDateInputProps, "children">;
|
type DateInputProps = Omit<AriaDateInputProps, "children">;
|
||||||
|
|||||||
@@ -4,8 +4,14 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|||||||
import { getLocalTimeZone, today } from "@internationalized/date";
|
import { getLocalTimeZone, today } from "@internationalized/date";
|
||||||
import { useControlledState } from "@react-stately/utils";
|
import { useControlledState } from "@react-stately/utils";
|
||||||
import { useDateFormatter } from "react-aria";
|
import { useDateFormatter } from "react-aria";
|
||||||
import type { DatePickerProps as AriaDatePickerProps, DateValue } from "react-aria-components";
|
import {
|
||||||
import { DatePicker as AriaDatePicker, Dialog as AriaDialog, Group as AriaGroup, Popover as AriaPopover } from "react-aria-components";
|
DatePicker as AriaDatePicker,
|
||||||
|
type DatePickerProps as AriaDatePickerProps,
|
||||||
|
Dialog as AriaDialog,
|
||||||
|
Group as AriaGroup,
|
||||||
|
Popover as AriaPopover,
|
||||||
|
type DateValue,
|
||||||
|
} from "react-aria-components";
|
||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import { Calendar } from "./calendar";
|
import { Calendar } from "./calendar";
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useMemo, useState } from "react";
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { faCalendar } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCalendar } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { endOfMonth, endOfWeek, getLocalTimeZone, startOfMonth, startOfWeek, today } from "@internationalized/date";
|
import { endOfMonth, endOfWeek, getLocalTimeZone, startOfMonth, startOfWeek, today } from "@internationalized/date";
|
||||||
import { useControlledState } from "@react-stately/utils";
|
import { useControlledState } from "@react-stately/utils";
|
||||||
import { useDateFormatter } from "react-aria";
|
import { useDateFormatter } from "react-aria";
|
||||||
import type { DateRangePickerProps as AriaDateRangePickerProps, DateValue } from "react-aria-components";
|
import {
|
||||||
import { DateRangePicker as AriaDateRangePicker, Dialog as AriaDialog, Group as AriaGroup, Popover as AriaPopover, useLocale } from "react-aria-components";
|
DateRangePicker as AriaDateRangePicker,
|
||||||
|
type DateRangePickerProps as AriaDateRangePickerProps,
|
||||||
|
Dialog as AriaDialog,
|
||||||
|
Group as AriaGroup,
|
||||||
|
Popover as AriaPopover,
|
||||||
|
type DateValue,
|
||||||
|
useLocale,
|
||||||
|
} from "react-aria-components";
|
||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import { DateInput } from "./date-input";
|
import { DateInput } from "./date-input";
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import type { FC, HTMLAttributes, PropsWithChildren } from "react";
|
import { type FC, Fragment, type HTMLAttributes, type PropsWithChildren, useContext, useState } from "react";
|
||||||
import { Fragment, useContext, useState } from "react";
|
|
||||||
import { faChevronLeft, faChevronRight } from "@fortawesome/pro-duotone-svg-icons";
|
import { faChevronLeft, faChevronRight } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { CalendarDate } from "@internationalized/date";
|
import type { CalendarDate } from "@internationalized/date";
|
||||||
import { useDateFormatter } from "react-aria";
|
import { useDateFormatter } from "react-aria";
|
||||||
import type { RangeCalendarProps as AriaRangeCalendarProps, DateValue } from "react-aria-components";
|
|
||||||
import {
|
import {
|
||||||
CalendarGrid as AriaCalendarGrid,
|
CalendarGrid as AriaCalendarGrid,
|
||||||
CalendarGridBody as AriaCalendarGridBody,
|
CalendarGridBody as AriaCalendarGridBody,
|
||||||
CalendarGridHeader as AriaCalendarGridHeader,
|
CalendarGridHeader as AriaCalendarGridHeader,
|
||||||
CalendarHeaderCell as AriaCalendarHeaderCell,
|
CalendarHeaderCell as AriaCalendarHeaderCell,
|
||||||
RangeCalendar as AriaRangeCalendar,
|
RangeCalendar as AriaRangeCalendar,
|
||||||
|
type RangeCalendarProps as AriaRangeCalendarProps,
|
||||||
|
type DateValue,
|
||||||
RangeCalendarContext,
|
RangeCalendarContext,
|
||||||
RangeCalendarStateContext,
|
RangeCalendarStateContext,
|
||||||
useSlottedContext,
|
useSlottedContext,
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import type { ComponentProps, ComponentPropsWithRef, FC } from "react";
|
import { Children, type ComponentProps, type ComponentPropsWithRef, type FC, createContext, isValidElement, useContext } from "react";
|
||||||
import { Children, createContext, isValidElement, useContext } from "react";
|
|
||||||
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { FileIcon } from "@untitledui/file-icons";
|
import { FileIcon } from "@untitledui/file-icons";
|
||||||
import { FeaturedIcon as FeaturedIconbase } from "@/components/foundations/featured-icon/featured-icon";
|
import { FeaturedIcon as FeaturedIconbase } from "@/components/foundations/featured-icon/featured-icon";
|
||||||
import type { BackgroundPatternProps } from "@/components/shared-assets/background-patterns";
|
import { BackgroundPattern, type BackgroundPatternProps } from "@/components/shared-assets/background-patterns";
|
||||||
import { BackgroundPattern } from "@/components/shared-assets/background-patterns";
|
|
||||||
import { Illustration as Illustrations } from "@/components/shared-assets/illustrations";
|
import { Illustration as Illustrations } from "@/components/shared-assets/illustrations";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import type { ComponentProps, ComponentPropsWithRef, FC } from "react";
|
import { type ComponentProps, type ComponentPropsWithRef, type FC, useId, useRef, useState } from "react";
|
||||||
import { useId, useRef, useState } from "react";
|
|
||||||
import { faCircleCheck, faCircleXmark, faCloudArrowUp, faTrash } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCircleCheck, faCircleXmark, faCloudArrowUp, faTrash } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { FileIcon } from "@untitledui/file-icons";
|
import { type FileIcon, FileIcon as FileTypeIcon } from "@untitledui/file-icons";
|
||||||
import { FileIcon as FileTypeIcon } from "@untitledui/file-icons";
|
|
||||||
import { AnimatePresence, motion } from "motion/react";
|
import { AnimatePresence, motion } from "motion/react";
|
||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
import { ButtonUtility } from "@/components/base/buttons/button-utility";
|
import { ButtonUtility } from "@/components/base/buttons/button-utility";
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
import type { DialogProps as AriaDialogProps, ModalOverlayProps as AriaModalOverlayProps } from "react-aria-components";
|
import {
|
||||||
import { Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Modal as AriaModal, ModalOverlay as AriaModalOverlay } from "react-aria-components";
|
Dialog as AriaDialog,
|
||||||
|
type DialogProps as AriaDialogProps,
|
||||||
|
DialogTrigger as AriaDialogTrigger,
|
||||||
|
Modal as AriaModal,
|
||||||
|
ModalOverlay as AriaModalOverlay,
|
||||||
|
type ModalOverlayProps as AriaModalOverlayProps,
|
||||||
|
} from "react-aria-components";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
export const DialogTrigger = AriaDialogTrigger;
|
export const DialogTrigger = AriaDialogTrigger;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ToasterProps } from "sonner";
|
import { Toaster as SonnerToaster, type ToasterProps, useSonner } from "sonner";
|
||||||
import { Toaster as SonnerToaster, useSonner } from "sonner";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
export const DEFAULT_TOAST_POSITION = "bottom-right";
|
export const DEFAULT_TOAST_POSITION = "bottom-right";
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
import type { CSSProperties, FC, HTMLAttributes, ReactNode } from "react";
|
import React, {
|
||||||
import React, { cloneElement, createContext, isValidElement, useCallback, useContext, useMemo } from "react";
|
type CSSProperties,
|
||||||
|
type FC,
|
||||||
|
type HTMLAttributes,
|
||||||
|
type ReactNode,
|
||||||
|
cloneElement,
|
||||||
|
createContext,
|
||||||
|
isValidElement,
|
||||||
|
useCallback,
|
||||||
|
useContext,
|
||||||
|
useMemo,
|
||||||
|
} from "react";
|
||||||
|
|
||||||
type PaginationPage = {
|
type PaginationPage = {
|
||||||
/** The type of the pagination item. */
|
/** The type of the pagination item. */
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import type { PaginationRootProps } from "./pagination-base";
|
import { Pagination, type PaginationRootProps } from "./pagination-base";
|
||||||
import { Pagination } from "./pagination-base";
|
|
||||||
|
|
||||||
interface PaginationDotProps extends Omit<PaginationRootProps, "children"> {
|
interface PaginationDotProps extends Omit<PaginationRootProps, "children"> {
|
||||||
/** The size of the pagination dot. */
|
/** The size of the pagination dot. */
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import type { PaginationRootProps } from "./pagination-base";
|
import { Pagination, type PaginationRootProps } from "./pagination-base";
|
||||||
import { Pagination } from "./pagination-base";
|
|
||||||
|
|
||||||
interface PaginationLineProps extends Omit<PaginationRootProps, "children"> {
|
interface PaginationLineProps extends Omit<PaginationRootProps, "children"> {
|
||||||
/** The size of the pagination line. */
|
/** The size of the pagination line. */
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import { ButtonGroup, ButtonGroupItem } from "@/components/base/button-group/but
|
|||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
import { useBreakpoint } from "@/hooks/use-breakpoint";
|
import { useBreakpoint } from "@/hooks/use-breakpoint";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import type { PaginationRootProps } from "./pagination-base";
|
import { Pagination, type PaginationRootProps } from "./pagination-base";
|
||||||
import { Pagination } from "./pagination-base";
|
|
||||||
|
|
||||||
const ArrowLeft: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faArrowLeft} className={className} />;
|
const ArrowLeft: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faArrowLeft} className={className} />;
|
||||||
const ArrowRight: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faArrowRight} className={className} />;
|
const ArrowRight: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faArrowRight} className={className} />;
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import { type ComponentPropsWithRef, type ReactNode, type RefAttributes } from "react";
|
import { type ComponentPropsWithRef, type ReactNode, type RefAttributes } from "react";
|
||||||
import type {
|
import {
|
||||||
DialogProps as AriaDialogProps,
|
Dialog as AriaDialog,
|
||||||
ModalOverlayProps as AriaModalOverlayProps,
|
type DialogProps as AriaDialogProps,
|
||||||
ModalRenderProps as AriaModalRenderProps,
|
DialogTrigger as AriaDialogTrigger,
|
||||||
|
Modal as AriaModal,
|
||||||
|
ModalOverlay as AriaModalOverlay,
|
||||||
|
type ModalOverlayProps as AriaModalOverlayProps,
|
||||||
|
type ModalRenderProps as AriaModalRenderProps,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
import { Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Modal as AriaModal, ModalOverlay as AriaModalOverlay } from "react-aria-components";
|
|
||||||
import { CloseButton } from "@/components/base/buttons/close-button";
|
import { CloseButton } from "@/components/base/buttons/close-button";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,23 +1,31 @@
|
|||||||
import type { ComponentPropsWithRef, FC, HTMLAttributes, ReactNode, Ref, TdHTMLAttributes, ThHTMLAttributes } from "react";
|
import {
|
||||||
import { createContext, isValidElement, useContext } from "react";
|
type ComponentPropsWithRef,
|
||||||
|
type FC,
|
||||||
|
type HTMLAttributes,
|
||||||
|
type ReactNode,
|
||||||
|
type Ref,
|
||||||
|
type TdHTMLAttributes,
|
||||||
|
type ThHTMLAttributes,
|
||||||
|
createContext,
|
||||||
|
isValidElement,
|
||||||
|
useContext,
|
||||||
|
} from "react";
|
||||||
import { faArrowDown, faCircleQuestion, faCopy, faPenToSquare, faSort, faTrash } from "@fortawesome/pro-duotone-svg-icons";
|
import { faArrowDown, faCircleQuestion, faCopy, faPenToSquare, faSort, faTrash } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type {
|
|
||||||
CellProps as AriaCellProps,
|
|
||||||
ColumnProps as AriaColumnProps,
|
|
||||||
RowProps as AriaRowProps,
|
|
||||||
TableHeaderProps as AriaTableHeaderProps,
|
|
||||||
TableProps as AriaTableProps,
|
|
||||||
} from "react-aria-components";
|
|
||||||
import {
|
import {
|
||||||
Cell as AriaCell,
|
Cell as AriaCell,
|
||||||
|
type CellProps as AriaCellProps,
|
||||||
Collection as AriaCollection,
|
Collection as AriaCollection,
|
||||||
Column as AriaColumn,
|
Column as AriaColumn,
|
||||||
|
type ColumnProps as AriaColumnProps,
|
||||||
Group as AriaGroup,
|
Group as AriaGroup,
|
||||||
Row as AriaRow,
|
Row as AriaRow,
|
||||||
|
type RowProps as AriaRowProps,
|
||||||
Table as AriaTable,
|
Table as AriaTable,
|
||||||
TableBody as AriaTableBody,
|
TableBody as AriaTableBody,
|
||||||
TableHeader as AriaTableHeader,
|
TableHeader as AriaTableHeader,
|
||||||
|
type TableHeaderProps as AriaTableHeaderProps,
|
||||||
|
type TableProps as AriaTableProps,
|
||||||
useTableOptions,
|
useTableOptions,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
import { Badge } from "@/components/base/badges/badges";
|
import { Badge } from "@/components/base/badges/badges";
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
import type { ComponentPropsWithRef, ReactNode } from "react";
|
import { type ComponentPropsWithRef, Fragment, type ReactNode, createContext, useContext } from "react";
|
||||||
import { Fragment, createContext, useContext } from "react";
|
import {
|
||||||
import type { TabListProps as AriaTabListProps, TabProps as AriaTabProps, TabRenderProps as AriaTabRenderProps } from "react-aria-components";
|
Tab as AriaTab,
|
||||||
import { Tab as AriaTab, TabList as AriaTabList, TabPanel as AriaTabPanel, Tabs as AriaTabs, TabsContext, useSlottedContext } from "react-aria-components";
|
TabList as AriaTabList,
|
||||||
|
type TabListProps as AriaTabListProps,
|
||||||
|
TabPanel as AriaTabPanel,
|
||||||
|
type TabProps as AriaTabProps,
|
||||||
|
type TabRenderProps as AriaTabRenderProps,
|
||||||
|
Tabs as AriaTabs,
|
||||||
|
TabsContext,
|
||||||
|
useSlottedContext,
|
||||||
|
} from "react-aria-components";
|
||||||
import type { BadgeColors } from "@/components/base/badges/badge-types";
|
import type { BadgeColors } from "@/components/base/badges/badge-types";
|
||||||
import { Badge } from "@/components/base/badges/badges";
|
import { Badge } from "@/components/base/badges/badges";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC, ReactNode } from "react";
|
import { type FC, type ReactNode, isValidElement } from "react";
|
||||||
import { isValidElement } from "react";
|
|
||||||
import { faArrowRight } from "@fortawesome/pro-duotone-svg-icons";
|
import { faArrowRight } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { cx, sortCx } from "@/utils/cx";
|
import { cx, sortCx } from "@/utils/cx";
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { faXmark } from "@fortawesome/pro-duotone-svg-icons";
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Dot } from "@/components/foundations/dot-icon";
|
import { Dot } from "@/components/foundations/dot-icon";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import type { BadgeColors, BadgeTypeToColorMap, BadgeTypes, FlagTypes, IconComponentType, Sizes } from "./badge-types";
|
import { type BadgeColors, type BadgeTypeToColorMap, type BadgeTypes, type FlagTypes, type IconComponentType, type Sizes, badgeTypes } from "./badge-types";
|
||||||
import { badgeTypes } from "./badge-types";
|
|
||||||
|
|
||||||
const CloseX: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faXmark} className={className} />;
|
const CloseX: FC<{ className?: string }> = ({ className }) => <FontAwesomeIcon icon={faXmark} className={className} />;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from "react";
|
import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type DetailedHTMLProps, type FC, type ReactNode, isValidElement } from "react";
|
||||||
import { isValidElement } from "react";
|
|
||||||
import type { Placement } from "react-aria";
|
import type { Placement } from "react-aria";
|
||||||
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps } from "react-aria-components";
|
import { Button as AriaButton, type ButtonProps as AriaButtonProps, Link as AriaLink, type LinkProps as AriaLinkProps } from "react-aria-components";
|
||||||
import { Button as AriaButton, Link as AriaLink } from "react-aria-components";
|
|
||||||
import { Tooltip } from "@/components/base/tooltip/tooltip";
|
import { Tooltip } from "@/components/base/tooltip/tooltip";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import { isReactComponent } from "@/utils/is-react-component";
|
import { isReactComponent } from "@/utils/is-react-component";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from "react";
|
import React, { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type DetailedHTMLProps, type FC, type ReactNode, isValidElement } from "react";
|
||||||
import React, { isValidElement } from "react";
|
import { Button as AriaButton, type ButtonProps as AriaButtonProps, Link as AriaLink, type LinkProps as AriaLinkProps } from "react-aria-components";
|
||||||
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps } from "react-aria-components";
|
|
||||||
import { Button as AriaButton, Link as AriaLink } from "react-aria-components";
|
|
||||||
import { cx, sortCx } from "@/utils/cx";
|
import { cx, sortCx } from "@/utils/cx";
|
||||||
import { isReactComponent } from "@/utils/is-react-component";
|
import { isReactComponent } from "@/utils/is-react-component";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps } from "react";
|
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps } from "react";
|
||||||
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps } from "react-aria-components";
|
import { Button as AriaButton, type ButtonProps as AriaButtonProps, Link as AriaLink, type LinkProps as AriaLinkProps } from "react-aria-components";
|
||||||
import { Button as AriaButton, Link as AriaLink } from "react-aria-components";
|
|
||||||
import { cx, sortCx } from "@/utils/cx";
|
import { cx, sortCx } from "@/utils/cx";
|
||||||
import { AppleLogo, DribbleLogo, FacebookLogo, FigmaLogo, FigmaLogoOutlined, GoogleLogo, TwitterLogo } from "./social-logos";
|
import { AppleLogo, DribbleLogo, FacebookLogo, FigmaLogo, FigmaLogoOutlined, GoogleLogo, TwitterLogo } from "./social-logos";
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,20 @@
|
|||||||
import type { FC, RefAttributes } from "react";
|
import type { FC, RefAttributes } from "react";
|
||||||
import { faEllipsisVertical } from "@fortawesome/pro-duotone-svg-icons";
|
import { faEllipsisVertical } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type {
|
|
||||||
ButtonProps as AriaButtonProps,
|
|
||||||
MenuItemProps as AriaMenuItemProps,
|
|
||||||
MenuProps as AriaMenuProps,
|
|
||||||
PopoverProps as AriaPopoverProps,
|
|
||||||
SeparatorProps as AriaSeparatorProps,
|
|
||||||
} from "react-aria-components";
|
|
||||||
import {
|
import {
|
||||||
Button as AriaButton,
|
Button as AriaButton,
|
||||||
|
type ButtonProps as AriaButtonProps,
|
||||||
Header as AriaHeader,
|
Header as AriaHeader,
|
||||||
Menu as AriaMenu,
|
Menu as AriaMenu,
|
||||||
MenuItem as AriaMenuItem,
|
MenuItem as AriaMenuItem,
|
||||||
|
type MenuItemProps as AriaMenuItemProps,
|
||||||
|
type MenuProps as AriaMenuProps,
|
||||||
MenuSection as AriaMenuSection,
|
MenuSection as AriaMenuSection,
|
||||||
MenuTrigger as AriaMenuTrigger,
|
MenuTrigger as AriaMenuTrigger,
|
||||||
Popover as AriaPopover,
|
Popover as AriaPopover,
|
||||||
|
type PopoverProps as AriaPopoverProps,
|
||||||
Separator as AriaSeparator,
|
Separator as AriaSeparator,
|
||||||
|
type SeparatorProps as AriaSeparatorProps,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { DetailedReactHTMLElement, HTMLAttributes, ReactNode } from "react";
|
import React, { type DetailedReactHTMLElement, type HTMLAttributes, type ReactNode, cloneElement, useRef } from "react";
|
||||||
import React, { cloneElement, useRef } from "react";
|
|
||||||
import { filterDOMProps } from "@react-aria/utils";
|
import { filterDOMProps } from "@react-aria/utils";
|
||||||
|
|
||||||
interface FileTriggerProps {
|
interface FileTriggerProps {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { ReactNode, Ref } from "react";
|
import type { ReactNode, Ref } from "react";
|
||||||
import type { TextProps as AriaTextProps } from "react-aria-components";
|
import { Text as AriaText, type TextProps as AriaTextProps } from "react-aria-components";
|
||||||
import { Text as AriaText } from "react-aria-components";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
interface HintTextProps extends AriaTextProps {
|
interface HintTextProps extends AriaTextProps {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { type HTMLAttributes, type ReactNode } from "react";
|
import { type HTMLAttributes, type ReactNode } from "react";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import type { InputBaseProps } from "@/components/base/input/input";
|
import { type InputBaseProps, TextField } from "@/components/base/input/input";
|
||||||
import { TextField } from "@/components/base/input/input";
|
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
import { cx, sortCx } from "@/utils/cx";
|
import { cx, sortCx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { useControlledState } from "@react-stately/utils";
|
import { useControlledState } from "@react-stately/utils";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import type { InputBaseProps } from "@/components/base/input/input";
|
import { InputBase, type InputBaseProps, TextField } from "@/components/base/input/input";
|
||||||
import { InputBase, TextField } from "@/components/base/input/input";
|
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
import { AmexIcon, DiscoverIcon, MastercardIcon, UnionPayIcon, VisaIcon } from "@/components/foundations/payment-icons";
|
import { AmexIcon, DiscoverIcon, MastercardIcon, UnionPayIcon, VisaIcon } from "@/components/foundations/payment-icons";
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
import { type ComponentType, type HTMLAttributes, type ReactNode, type Ref, createContext, useContext } from "react";
|
import { type ComponentType, type HTMLAttributes, type ReactNode, type Ref, createContext, useContext } from "react";
|
||||||
import { faCircleExclamation, faCircleQuestion } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCircleExclamation, faCircleQuestion } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { InputProps as AriaInputProps, TextFieldProps as AriaTextFieldProps } from "react-aria-components";
|
import {
|
||||||
import { Group as AriaGroup, Input as AriaInput, TextField as AriaTextField } from "react-aria-components";
|
Group as AriaGroup,
|
||||||
|
Input as AriaInput,
|
||||||
|
type InputProps as AriaInputProps,
|
||||||
|
TextField as AriaTextField,
|
||||||
|
type TextFieldProps as AriaTextFieldProps,
|
||||||
|
} from "react-aria-components";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip";
|
import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import type { ReactNode, Ref } from "react";
|
import type { ReactNode, Ref } from "react";
|
||||||
import { faCircleQuestion } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCircleQuestion } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { LabelProps as AriaLabelProps } from "react-aria-components";
|
import { Label as AriaLabel, type LabelProps as AriaLabelProps } from "react-aria-components";
|
||||||
import { Label as AriaLabel } from "react-aria-components";
|
|
||||||
import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip";
|
import { Tooltip, TooltipTrigger } from "@/components/base/tooltip/tooltip";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ComponentPropsWithRef } from "react";
|
import { type ComponentPropsWithRef, createContext, useContext, useId } from "react";
|
||||||
import { createContext, useContext, useId } from "react";
|
|
||||||
import { OTPInput, OTPInputContext } from "input-otp";
|
import { OTPInput, OTPInputContext } from "input-otp";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,16 @@
|
|||||||
import type { FocusEventHandler, PointerEventHandler, RefAttributes, RefObject } from "react";
|
import { type FocusEventHandler, type PointerEventHandler, type RefAttributes, type RefObject, useCallback, useContext, useRef, useState } from "react";
|
||||||
import { useCallback, useContext, useRef, useState } from "react";
|
|
||||||
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps } from "react-aria-components";
|
import {
|
||||||
import { ComboBox as AriaComboBox, Group as AriaGroup, Input as AriaInput, ListBox as AriaListBox, ComboBoxStateContext } from "react-aria-components";
|
ComboBox as AriaComboBox,
|
||||||
|
type ComboBoxProps as AriaComboBoxProps,
|
||||||
|
Group as AriaGroup,
|
||||||
|
type GroupProps as AriaGroupProps,
|
||||||
|
Input as AriaInput,
|
||||||
|
ListBox as AriaListBox,
|
||||||
|
type ListBoxProps as AriaListBoxProps,
|
||||||
|
ComboBoxStateContext,
|
||||||
|
} from "react-aria-components";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
import { Popover } from "@/components/base/select/popover";
|
import { Popover } from "@/components/base/select/popover";
|
||||||
|
|||||||
@@ -1,12 +1,31 @@
|
|||||||
import type { FC, FocusEventHandler, KeyboardEvent, PointerEventHandler, RefAttributes, RefObject } from "react";
|
import {
|
||||||
import { createContext, useCallback, useContext, useRef, useState } from "react";
|
type FC,
|
||||||
|
type FocusEventHandler,
|
||||||
|
type KeyboardEvent,
|
||||||
|
type PointerEventHandler,
|
||||||
|
type RefAttributes,
|
||||||
|
type RefObject,
|
||||||
|
createContext,
|
||||||
|
useCallback,
|
||||||
|
useContext,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { FocusScope, useFilter, useFocusManager } from "react-aria";
|
import { FocusScope, useFilter, useFocusManager } from "react-aria";
|
||||||
import type { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps, Key } from "react-aria-components";
|
import {
|
||||||
import { ComboBox as AriaComboBox, Group as AriaGroup, Input as AriaInput, ListBox as AriaListBox, ComboBoxStateContext } from "react-aria-components";
|
ComboBox as AriaComboBox,
|
||||||
import type { ListData } from "react-stately";
|
type ComboBoxProps as AriaComboBoxProps,
|
||||||
import { useListData } from "react-stately";
|
Group as AriaGroup,
|
||||||
|
type GroupProps as AriaGroupProps,
|
||||||
|
Input as AriaInput,
|
||||||
|
ListBox as AriaListBox,
|
||||||
|
type ListBoxProps as AriaListBoxProps,
|
||||||
|
ComboBoxStateContext,
|
||||||
|
type Key,
|
||||||
|
} from "react-aria-components";
|
||||||
|
import { type ListData, useListData } from "react-stately";
|
||||||
import { Avatar } from "@/components/base/avatar/avatar";
|
import { Avatar } from "@/components/base/avatar/avatar";
|
||||||
import type { IconComponentType } from "@/components/base/badges/badge-types";
|
import type { IconComponentType } from "@/components/base/badges/badge-types";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { RefAttributes } from "react";
|
import type { RefAttributes } from "react";
|
||||||
import type { PopoverProps as AriaPopoverProps } from "react-aria-components";
|
import { Popover as AriaPopover, type PopoverProps as AriaPopoverProps } from "react-aria-components";
|
||||||
import { Popover as AriaPopover } from "react-aria-components";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
interface PopoverProps extends AriaPopoverProps, RefAttributes<HTMLElement> {
|
interface PopoverProps extends AriaPopoverProps, RefAttributes<HTMLElement> {
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import { isValidElement, useContext } from "react";
|
import { isValidElement, useContext } from "react";
|
||||||
import { faCheck } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCheck } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { ListBoxItemProps as AriaListBoxItemProps } from "react-aria-components";
|
import { ListBoxItem as AriaListBoxItem, type ListBoxItemProps as AriaListBoxItemProps, Text as AriaText } from "react-aria-components";
|
||||||
import { ListBoxItem as AriaListBoxItem, Text as AriaText } from "react-aria-components";
|
|
||||||
import { Avatar } from "@/components/base/avatar/avatar";
|
import { Avatar } from "@/components/base/avatar/avatar";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
import { isReactComponent } from "@/utils/is-react-component";
|
import { isReactComponent } from "@/utils/is-react-component";
|
||||||
import type { SelectItemType } from "./select";
|
import { SelectContext, type SelectItemType } from "./select";
|
||||||
import { SelectContext } from "./select";
|
|
||||||
|
|
||||||
const sizes = {
|
const sizes = {
|
||||||
sm: "p-2 pr-2.5",
|
sm: "p-2 pr-2.5",
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
import type { FC, ReactNode, Ref, RefAttributes } from "react";
|
import { type FC, type ReactNode, type Ref, type RefAttributes, createContext, isValidElement } from "react";
|
||||||
import { createContext, isValidElement } from "react";
|
|
||||||
import { faChevronDown } from "@fortawesome/pro-duotone-svg-icons";
|
import { faChevronDown } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { SelectProps as AriaSelectProps } from "react-aria-components";
|
import {
|
||||||
import { Button as AriaButton, ListBox as AriaListBox, Select as AriaSelect, SelectValue as AriaSelectValue } from "react-aria-components";
|
Button as AriaButton,
|
||||||
|
ListBox as AriaListBox,
|
||||||
|
Select as AriaSelect,
|
||||||
|
type SelectProps as AriaSelectProps,
|
||||||
|
SelectValue as AriaSelectValue,
|
||||||
|
} from "react-aria-components";
|
||||||
import { Avatar } from "@/components/base/avatar/avatar";
|
import { Avatar } from "@/components/base/avatar/avatar";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { SliderProps as AriaSliderProps } from "react-aria-components";
|
|
||||||
import {
|
import {
|
||||||
Label as AriaLabel,
|
Label as AriaLabel,
|
||||||
Slider as AriaSlider,
|
Slider as AriaSlider,
|
||||||
SliderOutput as AriaSliderOutput,
|
SliderOutput as AriaSliderOutput,
|
||||||
|
type SliderProps as AriaSliderProps,
|
||||||
SliderThumb as AriaSliderThumb,
|
SliderThumb as AriaSliderThumb,
|
||||||
SliderTrack as AriaSliderTrack,
|
SliderTrack as AriaSliderTrack,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import type { ReactNode, Ref } from "react";
|
import React, { type ReactNode, type Ref } from "react";
|
||||||
import React from "react";
|
import {
|
||||||
import type { TextAreaProps as AriaTextAreaProps, TextFieldProps as AriaTextFieldProps } from "react-aria-components";
|
TextArea as AriaTextArea,
|
||||||
import { TextArea as AriaTextArea, TextField as AriaTextField } from "react-aria-components";
|
type TextAreaProps as AriaTextAreaProps,
|
||||||
|
TextField as AriaTextField,
|
||||||
|
type TextFieldProps as AriaTextFieldProps,
|
||||||
|
} from "react-aria-components";
|
||||||
import { HintText } from "@/components/base/input/hint-text";
|
import { HintText } from "@/components/base/input/hint-text";
|
||||||
import { Label } from "@/components/base/input/label";
|
import { Label } from "@/components/base/input/label";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import type { SwitchProps as AriaSwitchProps } from "react-aria-components";
|
import { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from "react-aria-components";
|
||||||
import { Switch as AriaSwitch } from "react-aria-components";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
interface ToggleBaseProps {
|
interface ToggleBaseProps {
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import type {
|
import {
|
||||||
ButtonProps as AriaButtonProps,
|
Button as AriaButton,
|
||||||
TooltipProps as AriaTooltipProps,
|
type ButtonProps as AriaButtonProps,
|
||||||
TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,
|
OverlayArrow as AriaOverlayArrow,
|
||||||
|
Tooltip as AriaTooltip,
|
||||||
|
type TooltipProps as AriaTooltipProps,
|
||||||
|
TooltipTrigger as AriaTooltipTrigger,
|
||||||
|
type TooltipTriggerComponentProps as AriaTooltipTriggerComponentProps,
|
||||||
} from "react-aria-components";
|
} from "react-aria-components";
|
||||||
import { Button as AriaButton, OverlayArrow as AriaOverlayArrow, Tooltip as AriaTooltip, TooltipTrigger as AriaTooltipTrigger } from "react-aria-components";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, "children"> {
|
interface TooltipProps extends AriaTooltipTriggerComponentProps, Omit<AriaTooltipProps, "children"> {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ReactNode } from "react";
|
import { type ReactNode, useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
|
||||||
import { faPaperPlaneTop, faRobot, faSparkles, faUserHeadset } from "@fortawesome/pro-duotone-svg-icons";
|
import { faPaperPlaneTop, faRobot, faSparkles, faUserHeadset } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { apiClient } from "@/lib/api-client";
|
import { apiClient } from "@/lib/api-client";
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ export const AppointmentForm = ({ isOpen, onOpenChange, callerNumber, leadName,
|
|||||||
// Fetch doctors on mount
|
// Fetch doctors on mount
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isOpen) return;
|
if (!isOpen) return;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
apiClient
|
apiClient
|
||||||
.graphql<{ doctors: { edges: Array<{ node: any }> } }>(
|
.graphql<{ doctors: { edges: Array<{ node: unknown }> } }>(
|
||||||
`{ doctors(first: 50) { edges { node {
|
`{ doctors(first: 50) { edges { node {
|
||||||
id name fullName { firstName lastName } department clinic { id name clinicName }
|
id name fullName { firstName lastName } department clinic { id name clinicName }
|
||||||
} } } }`,
|
} } } }`,
|
||||||
@@ -131,9 +131,9 @@ export const AppointmentForm = ({ isOpen, onOpenChange, callerNumber, leadName,
|
|||||||
}
|
}
|
||||||
|
|
||||||
setLoadingSlots(true);
|
setLoadingSlots(true);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
apiClient
|
apiClient
|
||||||
.graphql<{ appointments: { edges: Array<{ node: any }> } }>(
|
.graphql<{ appointments: { edges: Array<{ node: unknown }> } }>(
|
||||||
`{ appointments(filter: {
|
`{ appointments(filter: {
|
||||||
doctorId: { eq: "${doctor}" },
|
doctorId: { eq: "${doctor}" },
|
||||||
scheduledAt: { gte: "${date}T00:00:00", lte: "${date}T23:59:59" }
|
scheduledAt: { gte: "${date}T00:00:00", lte: "${date}T23:59:59" }
|
||||||
|
|||||||
@@ -98,9 +98,9 @@ const Lead360Tab = ({ lead, activities }: { lead: Lead | null; activities: LeadA
|
|||||||
}
|
}
|
||||||
|
|
||||||
setLoadingPatient(true);
|
setLoadingPatient(true);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
apiClient
|
apiClient
|
||||||
.graphql<{ patients: { edges: Array<{ node: any }> } }>(
|
.graphql<{ patients: { edges: Array<{ node: unknown }> } }>(
|
||||||
`query GetPatient($id: UUID!) { patients(filter: { id: { eq: $id } }) { edges { node {
|
`query GetPatient($id: UUID!) { patients(filter: { id: { eq: $id } }) { edges { node {
|
||||||
id fullName { firstName lastName } dateOfBirth gender patientType
|
id fullName { firstName lastName } dateOfBirth gender patientType
|
||||||
phones { primaryPhoneNumber } emails { primaryEmail }
|
phones { primaryPhoneNumber } emails { primaryEmail }
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { faPhone, faPhoneArrowDownLeft, faPhoneArrowUpRight, faPhoneMissed } from "@fortawesome/pro-duotone-svg-icons";
|
import { faCircleInfo, faPhone, faPhoneArrowDownLeft, faPhoneArrowUpRight, faPhoneMissed } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { faCircleInfo } from "@fortawesome/pro-duotone-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import type { Call, Lead } from "@/types/entities";
|
import type { Call, Lead } from "@/types/entities";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC, ReactNode, Ref } from "react";
|
import { type FC, type ReactNode, type Ref, isValidElement } from "react";
|
||||||
import { isValidElement } from "react";
|
|
||||||
import { cx, sortCx } from "@/utils/cx";
|
import { cx, sortCx } from "@/utils/cx";
|
||||||
import { isReactComponent } from "@/utils/is-react-component";
|
import { isReactComponent } from "@/utils/is-react-component";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { SVGProps } from "react";
|
import { type SVGProps, useId } from "react";
|
||||||
import { useId } from "react";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
export const UntitledLogoMinimal = (props: SVGProps<SVGSVGElement>) => {
|
export const UntitledLogoMinimal = (props: SVGProps<SVGSVGElement>) => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { HTMLAttributes, SVGProps } from "react";
|
import { type HTMLAttributes, type SVGProps, useId } from "react";
|
||||||
import { useId } from "react";
|
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
// eslint-disable-next-line react-refresh/only-export-components
|
// eslint-disable-next-line react-refresh/only-export-components
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useMemo, useState } from "react";
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { faEllipsisVertical } from "@fortawesome/pro-duotone-svg-icons";
|
import { faEllipsisVertical } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { TableBody as AriaTableBody } from "react-aria-components";
|
import { TableBody as AriaTableBody, type Selection, type SortDescriptor } from "react-aria-components";
|
||||||
import type { Selection, SortDescriptor } from "react-aria-components";
|
|
||||||
import { Table } from "@/components/application/table/table";
|
import { Table } from "@/components/application/table/table";
|
||||||
import { Badge } from "@/components/base/badges/badges";
|
import { Badge } from "@/components/base/badges/badges";
|
||||||
import { Button } from "@/components/base/buttons/button";
|
import { Button } from "@/components/base/buttons/button";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ReactNode } from "react";
|
import { type ReactNode, useRef, useState } from "react";
|
||||||
import { useRef, useState } from "react";
|
|
||||||
import { faChevronDown } from "@fortawesome/pro-duotone-svg-icons";
|
import { faChevronDown } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Popover as AriaPopover } from "react-aria-components";
|
import { Button as AriaButton, Dialog as AriaDialog, DialogTrigger as AriaDialogTrigger, Popover as AriaPopover } from "react-aria-components";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useState } from "react";
|
||||||
import { useState } from "react";
|
|
||||||
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Tab, TabList, TabPanel, Tabs } from "@/components/application/tabs/tabs";
|
import { Tab, TabList, TabPanel, Tabs } from "@/components/application/tabs/tabs";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { HTMLAttributes } from "react";
|
import { type HTMLAttributes, useEffect, useRef, useState } from "react";
|
||||||
import { useEffect, useRef, useState } from "react";
|
|
||||||
import QRCodeStyling, { type Options as QRCodeStylingOptions } from "qr-code-styling";
|
import QRCodeStyling, { type Options as QRCodeStylingOptions } from "qr-code-styling";
|
||||||
import { cx } from "@/utils/cx";
|
import { cx } from "@/utils/cx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useCallback, useEffect, useRef, useState } from "react";
|
import { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import type { Socket } from "socket.io-client";
|
import { type Socket, io } from "socket.io-client";
|
||||||
import { io } from "socket.io-client";
|
|
||||||
import { startAudioCapture, stopAudioCapture } from "@/lib/audio-capture";
|
import { startAudioCapture, stopAudioCapture } from "@/lib/audio-capture";
|
||||||
import { getSipClient } from "@/state/sip-manager";
|
import { getSipClient } from "@/state/sip-manager";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, createElement } from "react";
|
||||||
import { createElement } from "react";
|
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { Socket } from "socket.io-client";
|
import { type Socket, io } from "socket.io-client";
|
||||||
import { io } from "socket.io-client";
|
|
||||||
|
|
||||||
const SIDECAR_URL = import.meta.env.VITE_SIDECAR_URL ?? "http://localhost:4100";
|
const SIDECAR_URL = import.meta.env.VITE_SIDECAR_URL ?? "http://localhost:4100";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { FC } from "react";
|
import { type FC, useMemo, useState } from "react";
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { faArrowDownToLine, faArrowLeft, faArrowUpArrowDown, faFilterList, faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
import { faArrowDownToLine, faArrowLeft, faArrowUpArrowDown, faFilterList, faMagnifyingGlass } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useSearchParams } from "react-router";
|
import { useSearchParams } from "react-router";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useMemo, useRef, useState } from "react";
|
import { type FC, useMemo, useRef, useState } from "react";
|
||||||
import type { FC } from "react";
|
|
||||||
import { faMagnifyingGlass, faPause, faPhoneArrowDown, faPhoneArrowUp, faPhoneXmark, faPlay } from "@fortawesome/pro-duotone-svg-icons";
|
import { faMagnifyingGlass, faPause, faPhoneArrowDown, faPhoneArrowUp, faPhoneXmark, faPlay } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Table, TableCard } from "@/components/application/table/table";
|
import { Table, TableCard } from "@/components/application/table/table";
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { useMemo } from "react";
|
import { type FC, useMemo } from "react";
|
||||||
import type { FC } from "react";
|
import { faArrowDown, faArrowUp, faPercent, faPhoneArrowDownLeft, faPhoneArrowUpRight, faPhoneVolume } from "@fortawesome/pro-duotone-svg-icons";
|
||||||
import { faPercent, faPhoneArrowDownLeft, faPhoneArrowUpRight, faPhoneVolume } from "@fortawesome/pro-duotone-svg-icons";
|
|
||||||
import { faArrowDown, faArrowUp } from "@fortawesome/pro-duotone-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import ReactECharts from "echarts-for-react";
|
import ReactECharts from "echarts-for-react";
|
||||||
import { BadgeWithIcon } from "@/components/base/badges/badges";
|
import { BadgeWithIcon } from "@/components/base/badges/badges";
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ReactNode } from "react";
|
import { type ReactNode, createContext, useCallback, useContext, useEffect, useState } from "react";
|
||||||
import { createContext, useCallback, useContext, useEffect, useState } from "react";
|
|
||||||
import { apiClient } from "@/lib/api-client";
|
import { apiClient } from "@/lib/api-client";
|
||||||
import { ADS_QUERY, CALLS_QUERY, CAMPAIGNS_QUERY, FOLLOW_UPS_QUERY, LEADS_QUERY, LEAD_ACTIVITIES_QUERY, PATIENTS_QUERY } from "@/lib/queries";
|
import { ADS_QUERY, CALLS_QUERY, CAMPAIGNS_QUERY, FOLLOW_UPS_QUERY, LEADS_QUERY, LEAD_ACTIVITIES_QUERY, PATIENTS_QUERY } from "@/lib/queries";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { type PropsWithChildren } from "react";
|
import { type PropsWithChildren } from "react";
|
||||||
import { RouterProvider } from "react-aria-components";
|
import { RouterProvider } from "react-aria-components";
|
||||||
import { useNavigate } from "react-router";
|
import { type NavigateOptions, useNavigate } from "react-router";
|
||||||
import type { NavigateOptions } from "react-router";
|
|
||||||
|
|
||||||
declare module "react-aria-components" {
|
declare module "react-aria-components" {
|
||||||
interface RouterConfig {
|
interface RouterConfig {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import type { ReactNode } from "react";
|
import { type ReactNode, createContext, useContext, useEffect, useState } from "react";
|
||||||
import { createContext, useContext, useEffect, useState } from "react";
|
|
||||||
|
|
||||||
type Theme = "light" | "dark" | "system";
|
type Theme = "light" | "dark" | "system";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user