@camunda/design-system 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/carbon-compat/breadcrumb-skeleton.js +1 -1
- package/dist/carbon-compat/breadcrumb.js +2 -2
- package/dist/carbon-compat/button.js +2 -2
- package/dist/carbon-compat/c3-cluster-tag.js +2 -2
- package/dist/carbon-compat/c3-data-table.js +9 -9
- package/dist/carbon-compat/c3-responsive-stack.js +1 -1
- package/dist/carbon-compat/checkbox-skeleton.js +1 -1
- package/dist/carbon-compat/checkbox.js +2 -2
- package/dist/carbon-compat/code-snippet.js +1 -1
- package/dist/carbon-compat/combo-box.js +3 -3
- package/dist/carbon-compat/content-switcher.js +2 -2
- package/dist/carbon-compat/data-table-skeleton.js +1 -1
- package/dist/carbon-compat/data-table.d.ts +1 -1
- package/dist/carbon-compat/data-table.js +2 -2
- package/dist/carbon-compat/dropdown.js +2 -2
- package/dist/carbon-compat/filterable-multi-select.js +2 -2
- package/dist/carbon-compat/icon-button.js +3 -3
- package/dist/carbon-compat/index.d.ts +67 -66
- package/dist/carbon-compat/index.d.ts.map +1 -1
- package/dist/carbon-compat/index.js +67 -66
- package/dist/carbon-compat/index.js.map +1 -1
- package/dist/carbon-compat/link.js +1 -1
- package/dist/carbon-compat/loading.js +1 -1
- package/dist/carbon-compat/menu-button.js +3 -3
- package/dist/carbon-compat/modal.js +4 -4
- package/dist/carbon-compat/multi-select.js +2 -2
- package/dist/carbon-compat/overflow-menu.js +3 -3
- package/dist/carbon-compat/popover.js +2 -2
- package/dist/carbon-compat/progress-bar.js +2 -2
- package/dist/carbon-compat/radio-button.js +2 -2
- package/dist/carbon-compat/search.js +2 -2
- package/dist/carbon-compat/select-skeleton.js +1 -1
- package/dist/carbon-compat/select.js +2 -2
- package/dist/carbon-compat/skeleton-text.js +1 -1
- package/dist/carbon-compat/stack.js +1 -1
- package/dist/carbon-compat/structured-list-skeleton.js +1 -1
- package/dist/carbon-compat/switch.js +2 -2
- package/dist/carbon-compat/table-batch-actions.js +2 -2
- package/dist/carbon-compat/table-container.js +1 -1
- package/dist/carbon-compat/table-expand.js +2 -2
- package/dist/carbon-compat/table-select.js +2 -2
- package/dist/carbon-compat/table-toolbar.js +3 -3
- package/dist/carbon-compat/table.js +2 -2
- package/dist/carbon-compat/tabs.js +2 -2
- package/dist/carbon-compat/tag.js +2 -2
- package/dist/carbon-compat/text-area.js +2 -2
- package/dist/carbon-compat/text-input.js +2 -2
- package/dist/carbon-compat/tile.js +2 -2
- package/dist/carbon-compat/time-picker.d.ts +8 -0
- package/dist/carbon-compat/time-picker.d.ts.map +1 -0
- package/dist/carbon-compat/time-picker.js +24 -0
- package/dist/carbon-compat/time-picker.js.map +1 -0
- package/dist/carbon-compat/toggle.js +2 -2
- package/dist/carbon-compat/tooltip.js +2 -2
- package/dist/carbon-compat/unordered-list.js +1 -1
- package/dist/src/components/ui/alert-dialog.js +3 -3
- package/dist/src/components/ui/app-header.js +3 -3
- package/dist/src/components/ui/app-sidebar.js +5 -5
- package/dist/src/components/ui/badge.js +1 -1
- package/dist/src/components/ui/breadcrumb.js +1 -1
- package/dist/src/components/ui/button.js +1 -1
- package/dist/src/components/ui/card.js +1 -1
- package/dist/src/components/ui/checkbox.js +1 -1
- package/dist/src/components/ui/command.js +1 -1
- package/dist/src/components/ui/data-table.js +6 -6
- package/dist/src/components/ui/dialog.js +3 -3
- package/dist/src/components/ui/dropdown.js +2 -2
- package/dist/src/components/ui/file-uploader.js +2 -2
- package/dist/src/components/ui/input.js +1 -1
- package/dist/src/components/ui/label.js +1 -1
- package/dist/src/components/ui/multi-select.js +5 -5
- package/dist/src/components/ui/nav-breadcrumb.js +3 -3
- package/dist/src/components/ui/popover.js +2 -2
- package/dist/src/components/ui/progress.js +1 -1
- package/dist/src/components/ui/radio-group.js +1 -1
- package/dist/src/components/ui/scroll-area.js +1 -1
- package/dist/src/components/ui/select.js +2 -2
- package/dist/src/components/ui/separator.js +1 -1
- package/dist/src/components/ui/sheet.js +3 -3
- package/dist/src/components/ui/sidebar-provider.d.ts +1 -1
- package/dist/src/components/ui/sidebar-provider.js +2 -2
- package/dist/src/components/ui/stepper.js +1 -1
- package/dist/src/components/ui/switch.js +1 -1
- package/dist/src/components/ui/table.js +1 -1
- package/dist/src/components/ui/tabs.js +1 -1
- package/dist/src/components/ui/textarea.js +1 -1
- package/dist/src/components/ui/toggle-group.d.ts +1 -1
- package/dist/src/components/ui/toggle-group.js +2 -2
- package/dist/src/components/ui/toggle.js +1 -1
- package/dist/src/components/ui/tooltip.js +2 -2
- package/dist/src/components/ui/tree-view.js +2 -2
- package/dist/src/examples/cost-dashboard/CostBreakdownChart.js +2 -2
- package/dist/src/examples/cost-dashboard/CostDashboardPage.js +6 -6
- package/dist/src/examples/cost-dashboard/TrendChart.js +2 -2
- package/dist/src/examples/project-detail/ProjectDetailPage.js +4 -4
- package/dist/src/examples/projects-list/ProjectsListPage.js +4 -4
- package/dist/src/examples/shared/AppShell.d.ts +1 -1
- package/dist/src/examples/shared/AppShell.js +2 -2
- package/dist/src/examples/shared/console-nav.d.ts +1 -1
- package/dist/src/examples/shared/console-nav.js +1 -1
- package/dist/src/examples/shared/cost-nav.d.ts +1 -1
- package/dist/src/examples/shared/cost-nav.js +1 -1
- package/dist/src/hooks/use-is-mobile.js +1 -1
- package/dist/src/index.d.ts +41 -41
- package/dist/src/index.js +39 -39
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
3
|
import { SearchIcon, XIcon } from "lucide-react";
|
|
4
|
-
import { Input } from "../src/components/ui/input";
|
|
5
|
-
import { cn, warnDroppedProps } from "../src/lib/utils";
|
|
4
|
+
import { Input } from "../src/components/ui/input.js";
|
|
5
|
+
import { cn, warnDroppedProps } from "../src/lib/utils.js";
|
|
6
6
|
function sizeClass(size) {
|
|
7
7
|
switch (size) {
|
|
8
8
|
case "sm":
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../src/lib/utils";
|
|
2
|
+
import { cn } from "../src/lib/utils.js";
|
|
3
3
|
function SelectSkeleton({ hideLabel, className, ...rest }) {
|
|
4
4
|
return (_jsxs("div", { "data-slot": "carbon-compat-select-skeleton", className: cn("flex flex-col gap-1", className), ...rest, children: [!hideLabel && (_jsx("div", { className: "h-3 w-24 animate-pulse rounded bg-muted" })), _jsx("div", { className: "h-9 w-full animate-pulse rounded-md bg-muted" })] }));
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Select as ShadcnSelect, SelectContent, SelectItem as ShadcnSelectItem, SelectTrigger, SelectValue, } from "../src/components/ui/select";
|
|
4
|
-
import { cn, warnDroppedProps } from "../src/lib/utils";
|
|
3
|
+
import { Select as ShadcnSelect, SelectContent, SelectItem as ShadcnSelectItem, SelectTrigger, SelectValue, } from "../src/components/ui/select.js";
|
|
4
|
+
import { cn, warnDroppedProps } from "../src/lib/utils.js";
|
|
5
5
|
function extractPlaceholderItem(children, placeholder) {
|
|
6
6
|
let resolvedPlaceholder = placeholder;
|
|
7
7
|
const filteredChildren = React.Children.map(children, (child) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn, warnDroppedProps } from "../src/lib/utils";
|
|
2
|
+
import { cn, warnDroppedProps } from "../src/lib/utils.js";
|
|
3
3
|
/**
|
|
4
4
|
* Carbon's spacing scale maps to the closest Tailwind `gap-N` utility.
|
|
5
5
|
* Carbon scale = $spacing-01 (2px) … $spacing-13 (160px).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../src/lib/utils";
|
|
2
|
+
import { cn } from "../src/lib/utils.js";
|
|
3
3
|
function StructuredListSkeleton({ rowCount = 5, className, ...rest }) {
|
|
4
4
|
return (_jsxs("div", { "data-slot": "carbon-compat-structured-list-skeleton", className: cn("flex flex-col", className), ...rest, children: [_jsxs("div", { className: "flex border-b py-2", children: [_jsx("div", { className: "mr-4 h-3 w-20 animate-pulse rounded bg-muted" }), _jsx("div", { className: "h-3 w-24 animate-pulse rounded bg-muted" })] }), Array.from({ length: rowCount }).map((_, i) => (_jsxs("div", { className: "flex border-b py-3", children: [_jsx("div", { className: "mr-4 h-3 w-20 animate-pulse rounded bg-muted" }), _jsx("div", { className: "h-3 w-32 animate-pulse rounded bg-muted" })] }, i)))] }));
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ToggleGroupItem } from "../src/components/ui/toggle-group";
|
|
3
|
-
import { cn } from "../src/lib/utils";
|
|
2
|
+
import { ToggleGroupItem } from "../src/components/ui/toggle-group.js";
|
|
3
|
+
import { cn } from "../src/lib/utils.js";
|
|
4
4
|
/**
|
|
5
5
|
* Switch — Carbon-shaped adapter rendering shadcn `ToggleGroupItem`.
|
|
6
6
|
*
|
|
@@ -6,8 +6,8 @@ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
|
6
6
|
* This adapter renders a styled bar controlled by `shouldShowBatchActions`.
|
|
7
7
|
*/
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import { Button } from "../src/components/ui/button";
|
|
10
|
-
import { cn } from "../src/lib/utils";
|
|
9
|
+
import { Button } from "../src/components/ui/button.js";
|
|
10
|
+
import { cn } from "../src/lib/utils.js";
|
|
11
11
|
export function TableBatchActions({ children, className, shouldShowBatchActions, totalSelected, onCancel, }) {
|
|
12
12
|
if (!shouldShowBatchActions)
|
|
13
13
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "../src/lib/utils";
|
|
3
|
+
import { cn } from "../src/lib/utils.js";
|
|
4
4
|
export function TableContainer({ children, className, title, description, stickyHeader: _stickyHeader, }) {
|
|
5
5
|
return (_jsxs("div", { className: cn("w-full", className), children: [(title || description) && (_jsxs("div", { className: "mb-2", children: [title && (_jsx("p", { className: "text-sm font-semibold leading-none", children: title })), description && (_jsx("p", { className: "text-muted-foreground mt-1 text-xs", children: description }))] })), children] }));
|
|
6
6
|
}
|
|
@@ -9,8 +9,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
*/
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import { ChevronDown, ChevronRight } from "lucide-react";
|
|
12
|
-
import { Button } from "../src/components/ui/button";
|
|
13
|
-
import { cn } from "../src/lib/utils";
|
|
12
|
+
import { Button } from "../src/components/ui/button.js";
|
|
13
|
+
import { cn } from "../src/lib/utils.js";
|
|
14
14
|
export function TableExpandHeader({ className, children, }) {
|
|
15
15
|
return _jsx("th", { className: cn("w-6", className), children: children });
|
|
16
16
|
}
|
|
@@ -7,8 +7,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* controls outside a DataTable context. Prefer enabling `rowSelection` on
|
|
8
8
|
* DS DataTable instead.
|
|
9
9
|
*/
|
|
10
|
-
import { Checkbox } from "../src/components/ui/checkbox";
|
|
11
|
-
import { warnDroppedProps } from "../src/lib/utils";
|
|
10
|
+
import { Checkbox } from "../src/components/ui/checkbox.js";
|
|
11
|
+
import { warnDroppedProps } from "../src/lib/utils.js";
|
|
12
12
|
export function TableSelectAll({ checked, indeterminate, onChange, ariaLabel, name: _name, translateWithId, className, disabled, }) {
|
|
13
13
|
warnDroppedProps("TableSelectAll", { translateWithId });
|
|
14
14
|
return (_jsx(Checkbox, { checked: indeterminate ? "indeterminate" : checked, onCheckedChange: (v) => onChange?.(v === true), "aria-label": ariaLabel ?? "Select all rows", className: className, disabled: disabled }));
|
|
@@ -10,9 +10,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
* `DropdownMenu` / `Button` directly in new code.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from "react";
|
|
13
|
-
import { Button } from "../src/components/ui/button";
|
|
14
|
-
import { Input } from "../src/components/ui/input";
|
|
15
|
-
import { cn } from "../src/lib/utils";
|
|
13
|
+
import { Button } from "../src/components/ui/button.js";
|
|
14
|
+
import { Input } from "../src/components/ui/input.js";
|
|
15
|
+
import { cn } from "../src/lib/utils.js";
|
|
16
16
|
export function TableToolbar({ children, className }) {
|
|
17
17
|
return (_jsx("div", { className: cn("mb-2 flex items-center gap-2", className), children: children }));
|
|
18
18
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Table as ShadcnTable, TableBody as ShadcnTableBody, TableCell as ShadcnTableCell, TableHead as ShadcnTableHead, TableHeader as ShadcnTableHeader, TableRow as ShadcnTableRow, } from '../src/components/ui/table';
|
|
4
|
-
import { warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Table as ShadcnTable, TableBody as ShadcnTableBody, TableCell as ShadcnTableCell, TableHead as ShadcnTableHead, TableHeader as ShadcnTableHeader, TableRow as ShadcnTableRow, } from '../src/components/ui/table.js';
|
|
4
|
+
import { warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
function Table(props) {
|
|
6
6
|
const { children, className, size, isSortable, useStaticWidth, useZebraStyles, stickyHeader, overflowMenuOnHover, experimentalAutoAlign, ...rest } = props;
|
|
7
7
|
warnDroppedProps('Table', { size, isSortable, useStaticWidth, useZebraStyles, stickyHeader, overflowMenuOnHover, experimentalAutoAlign });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Tabs as ShadcnTabs, TabsContent, TabsList, TabsTrigger } from '../src/components/ui/tabs';
|
|
4
|
-
import { warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Tabs as ShadcnTabs, TabsContent, TabsList, TabsTrigger } from '../src/components/ui/tabs.js';
|
|
4
|
+
import { warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
const TabIndexContext = React.createContext(0);
|
|
6
6
|
function indexValue(index) {
|
|
7
7
|
return `tab-${index}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Badge } from '../src/components/ui/badge';
|
|
4
|
-
import { warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Badge } from '../src/components/ui/badge.js';
|
|
4
|
+
import { warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
const TYPE_TO_VARIANT = {
|
|
6
6
|
red: 'destructive',
|
|
7
7
|
magenta: 'secondary',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Textarea } from '../src/components/ui/textarea';
|
|
4
|
-
import { cn, warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Textarea } from '../src/components/ui/textarea.js';
|
|
4
|
+
import { cn, warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
function TextArea(props) {
|
|
6
6
|
const { id, labelText, helperText, invalid, invalidText, warn, warnText, enableCounter, maxCount, counterMode, hideLabel, light, className, disabled, placeholder, value, defaultValue, onChange, onBlur, onFocus, rows, cols, readOnly, ...rest } = props;
|
|
7
7
|
warnDroppedProps('TextArea', { helperText, invalid, invalidText, warn, warnText, enableCounter, maxCount, counterMode, hideLabel, light });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Input } from '../src/components/ui/input';
|
|
4
|
-
import { cn, warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Input } from '../src/components/ui/input.js';
|
|
4
|
+
import { cn, warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
function TextInput(props) {
|
|
6
6
|
const { className, decorator, defaultValue, disabled, enableCounter, helperText, hideLabel, id, inline, invalid, invalidText, labelText, light, maxCount, onChange, onClick, placeholder, readOnly, size, slug, type, value, warn, warnText, ...rest } = props;
|
|
7
7
|
warnDroppedProps('TextInput', { decorator, enableCounter, inline, light, maxCount, size, slug, warn, warnText });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { Card } from "../src/components/ui/card";
|
|
4
|
-
import { cn, warnDroppedProps } from "../src/lib/utils";
|
|
3
|
+
import { Card } from "../src/components/ui/card.js";
|
|
4
|
+
import { cn, warnDroppedProps } from "../src/lib/utils.js";
|
|
5
5
|
function Tile(props) {
|
|
6
6
|
const { children, className, decorator, hasRoundedCorners, light, slug, ...rest } = props;
|
|
7
7
|
warnDroppedProps("Tile", { decorator, hasRoundedCorners, light, slug });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { TimePickerProps as CarbonTimePickerProps, TimePickerSelectProps as CarbonTimePickerSelectProps } from "@carbon/react";
|
|
3
|
+
export type TimePickerProps = CarbonTimePickerProps;
|
|
4
|
+
export type TimePickerSelectProps = CarbonTimePickerSelectProps;
|
|
5
|
+
declare function TimePicker(props: TimePickerProps): React.JSX.Element;
|
|
6
|
+
declare function TimePickerSelect(props: TimePickerSelectProps): React.JSX.Element;
|
|
7
|
+
export { TimePicker, TimePickerSelect };
|
|
8
|
+
//# sourceMappingURL=time-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../carbon-compat/time-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EACV,eAAe,IAAI,qBAAqB,EACxC,qBAAqB,IAAI,2BAA2B,EACrD,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE,iBAAS,UAAU,CAAC,KAAK,EAAE,eAAe,qBAuEzC;AAED,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,qBA4BrD;AAED,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Input } from "../src/components/ui/input.js";
|
|
4
|
+
import { cn, warnDroppedProps } from "../src/lib/utils.js";
|
|
5
|
+
function TimePicker(props) {
|
|
6
|
+
const { id, value, onChange, onBlur, onClick, disabled, readOnly, placeholder, labelText, hideLabel, invalid, invalidText, warning, warningText, type = "time", className, inputClassName, pickerClassName, children, light, maxLength, pattern, size, ...rest } = props;
|
|
7
|
+
warnDroppedProps("TimePicker", {
|
|
8
|
+
light,
|
|
9
|
+
maxLength,
|
|
10
|
+
pattern,
|
|
11
|
+
size,
|
|
12
|
+
inputClassName,
|
|
13
|
+
pickerClassName,
|
|
14
|
+
warning,
|
|
15
|
+
warningText,
|
|
16
|
+
});
|
|
17
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-1", className), children: [labelText !== undefined ? (_jsx("label", { htmlFor: id, className: cn("text-sm font-medium", hideLabel && "sr-only"), children: labelText })) : null, _jsxs("div", { className: cn("flex gap-1", pickerClassName), children: [_jsx(Input, { id: id, type: type, value: value, disabled: disabled, readOnly: readOnly, placeholder: placeholder, onChange: onChange, onBlur: onBlur, onClick: onClick, "aria-invalid": invalid || undefined, className: inputClassName, ...rest }), children] }), invalid && invalidText !== undefined ? (_jsx("span", { className: "text-xs text-destructive", children: invalidText })) : null] }));
|
|
18
|
+
}
|
|
19
|
+
function TimePickerSelect(props) {
|
|
20
|
+
const { id, value, defaultValue, onChange, disabled, children, className, ...rest } = props;
|
|
21
|
+
return (_jsx("select", { id: id, value: value, defaultValue: defaultValue, onChange: onChange, disabled: disabled, className: cn("h-9 rounded-lg border border-input bg-input-background px-2.5 py-1 text-sm text-foreground outline-none transition-colors focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className), ...rest, children: children }));
|
|
22
|
+
}
|
|
23
|
+
export { TimePicker, TimePickerSelect };
|
|
24
|
+
//# sourceMappingURL=time-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.js","sourceRoot":"","sources":["../../carbon-compat/time-picker.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AASxD,SAAS,UAAU,CAAC,KAAsB;IACxC,MAAM,EACJ,EAAE,EACF,KAAK,EACL,QAAQ,EACR,MAAM,EACN,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,EACX,OAAO,EACP,WAAW,EACX,IAAI,GAAG,MAAM,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,OAAO,EACP,IAAI,EACJ,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,gBAAgB,CAAC,YAAY,EAAE;QAC7B,KAAK;QACL,SAAS;QACT,OAAO;QACP,IAAI;QACJ,cAAc;QACd,eAAe;QACf,OAAO;QACP,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,aACjD,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,CACzB,gBACE,OAAO,EAAE,EAAE,EACX,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,IAAI,SAAS,CAAC,YAE3D,SAAS,GACJ,CACT,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC,aAC/C,KAAC,KAAK,IACJ,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,kBACF,OAAO,IAAI,SAAS,EAClC,SAAS,EAAE,cAAc,KACpB,IAA2C,GAChD,EACD,QAAQ,IACL,EACL,OAAO,IAAI,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,CACtC,eAAM,SAAS,EAAC,0BAA0B,YAAE,WAAW,GAAQ,CAChE,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,KAA4B;IACpD,MAAM,EACJ,EAAE,EACF,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,iBACE,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAA2B,EAClC,YAAY,EAAE,YAAkC,EAChD,QAAQ,EAAE,QAAuD,EACjE,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,kRAAkR,EAClR,SAAS,CACV,KACI,IAAsD,YAE1D,QAAQ,GACF,CACV,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Switch } from '../src/components/ui/switch';
|
|
4
|
-
import { cn, warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Switch } from '../src/components/ui/switch.js';
|
|
4
|
+
import { cn, warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
function Toggle(props) {
|
|
6
6
|
const { 'aria-labelledby': ariaLabelledby, className, defaultToggled, disabled, hideLabel, id, labelA, labelB, labelText, onClick, onToggle, readOnly, size, toggled, ...rest } = props;
|
|
7
7
|
warnDroppedProps('Toggle', { readOnly, size });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Tooltip as ShadcnTooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../src/components/ui/tooltip';
|
|
4
|
-
import { warnDroppedProps } from '../src/lib/utils';
|
|
3
|
+
import { Tooltip as ShadcnTooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../src/components/ui/tooltip.js';
|
|
4
|
+
import { warnDroppedProps } from '../src/lib/utils.js';
|
|
5
5
|
function Tooltip(props) {
|
|
6
6
|
const { label, description, children, className, align, autoAlign, enterDelayMs, leaveDelayMs, defaultOpen, dropShadow, caret, open, onOpenChange, ...rest } = props;
|
|
7
7
|
warnDroppedProps('Tooltip', { align, autoAlign, leaveDelayMs, dropShadow, caret });
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { C4Provider } from "./c4-provider";
|
|
7
|
-
import { buttonVariants } from "./button";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { C4Provider } from "./c4-provider.js";
|
|
7
|
+
import { buttonVariants } from "./button.js";
|
|
8
8
|
function AlertDialog({ ...props }) {
|
|
9
9
|
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
10
10
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import {} from "lucide-react";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { Button } from "./button";
|
|
6
|
-
import { useSidebar, SidebarTrigger } from "./sidebar-provider";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
import { useSidebar, SidebarTrigger } from "./sidebar-provider.js";
|
|
7
7
|
export function AppHeader({ logo, appName, breadcrumb, trailing, actions, globalActions, skipToContentTargetId, skipToContentLabel = "Skip to main content", showSidebarTrigger = true, className, children, ...props }) {
|
|
8
8
|
const sidebar = useSidebar();
|
|
9
9
|
const showTrigger = showSidebarTrigger && sidebar?.isMobile;
|
|
@@ -2,11 +2,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { ChevronDown, ChevronRight, ChevronLeft, PanelLeftClose, PanelLeft, X, } from "lucide-react";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { Popover, PopoverContent, PopoverTrigger } from "./popover";
|
|
7
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip";
|
|
8
|
-
import { Sheet, SheetClose, SheetContent, SheetTitle } from "./sheet";
|
|
9
|
-
import { useSidebar } from "./sidebar-provider";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
7
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
8
|
+
import { Sheet, SheetClose, SheetContent, SheetTitle } from "./sheet.js";
|
|
9
|
+
import { useSidebar } from "./sidebar-provider.js";
|
|
10
10
|
const NAV_ROW_BASE = "group/navbtn flex w-full items-center overflow-hidden rounded-md transition-colors";
|
|
11
11
|
const navButton = cva(cn(NAV_ROW_BASE, "gap-3 min-h-10 text-sm text-left whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring focus-visible:ring-inset"), {
|
|
12
12
|
variants: {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { Slot } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
const badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Slot } from "radix-ui";
|
|
5
5
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
7
|
function Breadcrumb({ ...props }) {
|
|
8
8
|
return _jsx("nav", { "data-slot": "breadcrumb", "aria-label": "breadcrumb", ...props });
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { Slot } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
4
|
function Card({ className, size = "default", ...props }) {
|
|
5
5
|
return (_jsx("div", { "data-slot": "card", "data-size": size, className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className), ...props }));
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { CheckIcon } from "lucide-react";
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
7
|
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", children: _jsx(CheckIcon, { className: "text-current" }) }) }));
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Command as CommandPrimitive } from "cmdk";
|
|
5
5
|
import { SearchIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
7
|
function Command({ className, ...props }) {
|
|
8
8
|
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className), ...props }));
|
|
9
9
|
}
|
|
@@ -3,12 +3,12 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { flexRender, getCoreRowModel, getExpandedRowModel, getPaginationRowModel, getSortedRowModel, useReactTable, } from "@tanstack/react-table";
|
|
5
5
|
import { ChevronDown, ChevronRight, ChevronsUpDown, ChevronUp, MoreVertical, } from "lucide-react";
|
|
6
|
-
import { cn, renderIconNode } from "../../lib/utils";
|
|
7
|
-
import { Button } from "./button";
|
|
8
|
-
import { Checkbox } from "./checkbox";
|
|
9
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "./dropdown";
|
|
10
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "./select";
|
|
11
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "./table";
|
|
6
|
+
import { cn, renderIconNode } from "../../lib/utils.js";
|
|
7
|
+
import { Button } from "./button.js";
|
|
8
|
+
import { Checkbox } from "./checkbox.js";
|
|
9
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, } from "./dropdown.js";
|
|
10
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "./select.js";
|
|
11
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "./table.js";
|
|
12
12
|
const DEFAULT_PAGE_SIZE = 10;
|
|
13
13
|
const DEFAULT_PAGE_SIZES = [10, 20, 50, 100];
|
|
14
14
|
const RESERVED_COLUMN_IDS = new Set(["__expand", "__actions", "__select"]);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { C4Provider } from "./c4-provider";
|
|
7
|
-
import { Button } from "../ui/button";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { C4Provider } from "./c4-provider.js";
|
|
7
|
+
import { Button } from "../ui/button.js";
|
|
8
8
|
import { XIcon } from "lucide-react";
|
|
9
9
|
function Dialog({ ...props }) {
|
|
10
10
|
return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
|
|
5
5
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { C4Provider } from "./c4-provider";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { C4Provider } from "./c4-provider.js";
|
|
8
8
|
function DropdownMenu({ ...props }) {
|
|
9
9
|
return _jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
10
10
|
}
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { CheckCircle2, Loader2, UploadCloud, X, XCircle } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
import { Button, buttonVariants } from "./button";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { Button, buttonVariants } from "./button.js";
|
|
8
8
|
// 2. cva() variants
|
|
9
9
|
const dropZoneVariants = cva([
|
|
10
10
|
"relative flex flex-col items-center justify-center gap-3 rounded-lg border-2 border-dashed border-border",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
4
|
function Input({ className, type, ...props }) {
|
|
5
5
|
return (_jsx("input", { type: type, "data-slot": "input", className: cn("h-9 w-full min-w-0 rounded-lg border border-input bg-input-background px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className), ...props }));
|
|
6
6
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Label as LabelPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
function Label({ className, ...props }) {
|
|
7
7
|
return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-normal select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
|
|
8
8
|
}
|
|
@@ -4,11 +4,11 @@ import * as React from "react";
|
|
|
4
4
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
5
5
|
import { ChevronDownIcon, XIcon, ListChecksIcon } from "lucide-react";
|
|
6
6
|
import {} from "lucide-react";
|
|
7
|
-
import { cn } from "../../lib/utils";
|
|
8
|
-
import { Badge } from "./badge";
|
|
9
|
-
import { C4Provider } from "./c4-provider";
|
|
10
|
-
import { Checkbox } from "./checkbox";
|
|
11
|
-
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./command";
|
|
7
|
+
import { cn } from "../../lib/utils.js";
|
|
8
|
+
import { Badge } from "./badge.js";
|
|
9
|
+
import { C4Provider } from "./c4-provider.js";
|
|
10
|
+
import { Checkbox } from "./checkbox.js";
|
|
11
|
+
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, } from "./command.js";
|
|
12
12
|
function isGroup(item) {
|
|
13
13
|
return "heading" in item;
|
|
14
14
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ChevronDown } from "lucide-react";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { Button } from "./button";
|
|
7
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "./dropdown";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, } from "./dropdown.js";
|
|
8
8
|
/**
|
|
9
9
|
* Top-nav context switcher — chain of split-button segments separated by `/`.
|
|
10
10
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
import { C4Provider } from "./c4-provider";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { C4Provider } from "./c4-provider.js";
|
|
6
6
|
function Popover({ ...props }) {
|
|
7
7
|
return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Progress as ProgressPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
function Progress({ className, value, ...props }) {
|
|
7
7
|
const clamped = typeof value === "number" ? Math.max(0, Math.min(100, value)) : value;
|
|
8
8
|
return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", value: clamped, className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (clamped ?? 0)}%)` } }) }));
|
|
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
5
5
|
import { CircleIcon } from "lucide-react";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
7
|
function RadioGroup({ className, ...props }) {
|
|
8
8
|
return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn("grid gap-3", className), ...props }));
|
|
9
9
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
function ScrollArea({ className, children, ...props }) {
|
|
7
7
|
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", tabIndex: 0, className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
8
8
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Select as SelectPrimitive } from "radix-ui";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
import { C4Provider } from "./c4-provider";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { C4Provider } from "./c4-provider.js";
|
|
7
7
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
8
8
|
function Select({ ...props }) {
|
|
9
9
|
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
6
6
|
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", className), ...props }));
|
|
7
7
|
}
|
|
@@ -4,9 +4,9 @@ import * as React from "react";
|
|
|
4
4
|
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { XIcon } from "lucide-react";
|
|
7
|
-
import { cn } from "../../lib/utils";
|
|
8
|
-
import { C4Provider } from "./c4-provider";
|
|
9
|
-
import { Button } from "../ui/button";
|
|
7
|
+
import { cn } from "../../lib/utils.js";
|
|
8
|
+
import { C4Provider } from "./c4-provider.js";
|
|
9
|
+
import { Button } from "../ui/button.js";
|
|
10
10
|
function Sheet({ ...props }) {
|
|
11
11
|
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
12
12
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Menu } from "lucide-react";
|
|
5
|
-
import { useIsMobile } from "../../hooks/use-is-mobile";
|
|
6
|
-
import { Button } from "../ui/button";
|
|
5
|
+
import { useIsMobile } from "../../hooks/use-is-mobile.js";
|
|
6
|
+
import { Button } from "../ui/button.js";
|
|
7
7
|
const EXPANDED_STORAGE_KEY = "c4-sidebar-expanded";
|
|
8
8
|
const WIDTH_STORAGE_KEY = "c4-sidebar-width";
|
|
9
9
|
const SidebarContext = React.createContext(null);
|