@k3-tech/react-kit 0.0.73 → 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.d.ts +11 -0
  2. package/dist/index.js +6131 -3994
  3. package/dist/kit/builder/data-table/components/DataTable.d.ts +21 -2
  4. package/dist/kit/builder/upload-wizard/UploadWizard.d.ts +54 -0
  5. package/dist/kit/builder/upload-wizard/UploadWizardMappingStep.d.ts +61 -0
  6. package/dist/kit/builder/upload-wizard/UploadWizardPreviewStep.d.ts +27 -0
  7. package/dist/kit/builder/upload-wizard/UploadWizardResultStep.d.ts +15 -0
  8. package/dist/kit/builder/upload-wizard/UploadWizardStepper.d.ts +6 -0
  9. package/dist/kit/builder/upload-wizard/UploadWizardUploadStep.d.ts +43 -0
  10. package/dist/kit/builder/upload-wizard/index.d.ts +8 -0
  11. package/dist/kit/builder/upload-wizard/types.d.ts +91 -0
  12. package/dist/kit/builder/upload-wizard/useFilePreview.d.ts +50 -0
  13. package/dist/kit/components/data-display/DescriptionList.d.ts +17 -0
  14. package/dist/kit/components/data-display/EmptyState.d.ts +13 -0
  15. package/dist/kit/components/data-display/StatCard.d.ts +49 -0
  16. package/dist/kit/components/data-display/index.d.ts +4 -0
  17. package/dist/kit/components/file-action/FileAction.d.ts +38 -0
  18. package/dist/kit/components/file-action/index.d.ts +2 -0
  19. package/dist/kit/components/fileuploader/FileUploader.d.ts +1 -1
  20. package/dist/kit/components/fileuploader/types.d.ts +2 -0
  21. package/dist/kit/components/import-progress/ImportProgress.d.ts +16 -0
  22. package/dist/kit/components/import-progress/index.d.ts +2 -0
  23. package/dist/kit/components/info-tip/InfoTip.d.ts +7 -0
  24. package/dist/kit/components/info-tip/index.d.ts +2 -0
  25. package/dist/kit/components/loading-overlay/LoadingOverlay.d.ts +9 -0
  26. package/dist/kit/components/loading-overlay/index.d.ts +2 -0
  27. package/dist/kit/components/product-cell/ProductCell.d.ts +13 -0
  28. package/dist/kit/components/product-cell/index.d.ts +2 -0
  29. package/dist/kit/components/row-actions/RowActions.d.ts +53 -0
  30. package/dist/kit/components/row-actions/index.d.ts +2 -0
  31. package/dist/kit/components/setting-row/SettingRow.d.ts +12 -0
  32. package/dist/kit/components/setting-row/index.d.ts +2 -0
  33. package/dist/kit/components/status-text/StatusText.d.ts +20 -0
  34. package/dist/kit/components/status-text/index.d.ts +2 -0
  35. package/dist/kit/components/tree/Tree.d.ts +42 -0
  36. package/dist/kit/components/tree/index.d.ts +2 -0
  37. package/dist/kit/themes/base.css +3 -3
  38. package/dist/kit/themes/clean-slate.css +871 -397
  39. package/dist/kit/themes/default.css +1327 -412
  40. package/dist/kit/themes/minimal-modern.css +871 -397
  41. package/dist/kit/themes/spotify.css +871 -397
  42. package/dist/shadcn/ui/alert.d.ts +1 -1
  43. package/dist/shadcn/ui/badge.d.ts +1 -1
  44. package/dist/shadcn/ui/button.d.ts +3 -1
  45. package/dist/shadcn/ui/progress.d.ts +10 -1
  46. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { Button } from '../../../shadcn/ui/button';
2
+ import * as React from 'react';
3
+ declare const ROW_ACTION: {
4
+ readonly view: {
5
+ readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
6
+ readonly label: "View";
7
+ };
8
+ readonly edit: {
9
+ readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
10
+ readonly label: "Edit";
11
+ };
12
+ readonly delete: {
13
+ readonly icon: React.ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
14
+ readonly label: "Delete";
15
+ };
16
+ };
17
+ export type RowActionKind = keyof typeof ROW_ACTION;
18
+ /** Row of icon actions in a table's Action column. */
19
+ export declare function RowActions({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
20
+ export interface RowActionButtonProps extends Omit<React.ComponentProps<typeof Button>, 'children'> {
21
+ kind: RowActionKind;
22
+ /** Tooltip and aria-label; defaults to the kind's label. */
23
+ label?: string;
24
+ /** A link element (e.g. router <Link/>) to render instead of a button; the icon goes inside it. */
25
+ children?: React.ReactElement<{
26
+ children?: React.ReactNode;
27
+ }>;
28
+ }
29
+ /** Icon-only View / Edit / Delete button with the standard icon and label. */
30
+ export declare function RowActionButton({ kind, label, children, className, ...props }: RowActionButtonProps): import("react/jsx-runtime").JSX.Element;
31
+ export interface RowActionItem {
32
+ label: React.ReactNode;
33
+ icon?: React.ReactNode;
34
+ onClick?: () => void;
35
+ /** Render in destructive red. */
36
+ danger?: boolean;
37
+ disabled?: boolean;
38
+ /** Shown on hover when disabled (why the action is unavailable). */
39
+ reason?: string;
40
+ hidden?: boolean;
41
+ }
42
+ export interface RowActionMenuProps {
43
+ /** DS items; use children instead for DropdownMenuItem elements. */
44
+ items?: RowActionItem[];
45
+ children?: React.ReactNode;
46
+ /** Trigger title. Default "More actions". */
47
+ title?: string;
48
+ disabled?: boolean;
49
+ }
50
+ /** Bordered kebab with the remaining row actions (DS RowActionMenu). Hidden when it has no items. */
51
+ export declare function RowActionMenu({ items, children, title, disabled, }: RowActionMenuProps): import("react/jsx-runtime").JSX.Element | null;
52
+ export {};
53
+ //# sourceMappingURL=RowActions.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './RowActions';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SettingRowProps {
3
+ label: string;
4
+ description?: ReactNode;
5
+ /** Ties the label to the control so clicking it toggles the control. */
6
+ controlId?: string;
7
+ /** Separator above the row, for rows after the first. */
8
+ divider?: boolean;
9
+ children: ReactNode;
10
+ }
11
+ export declare function SettingRow({ label, description, controlId, divider, children }: SettingRowProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=SettingRow.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './SettingRow';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,20 @@
1
+ import type * as React from 'react';
2
+ export type StatusTone = 'open' | 'shipped' | 'done' | 'cancelled' | 'warning' | 'muted' | 'other';
3
+ export declare const statusTone: (status?: string | null) => StatusTone;
4
+ /** "partially_received" → "Partially received". */
5
+ export declare const humanizeStatus: (status: string) => string;
6
+ export interface StatusTextProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children'> {
7
+ /** Raw status value; drives the color and, without children, the text. */
8
+ status?: string | null;
9
+ /** Override the tone picked from the status. */
10
+ tone?: StatusTone;
11
+ children?: React.ReactNode;
12
+ }
13
+ /** Transaction status as italic colored text (DS StatusText) — never a pill. */
14
+ export declare function StatusText({ status, tone, children, className, ...props }: StatusTextProps): import("react/jsx-runtime").JSX.Element;
15
+ /** Active / Inactive state: Active reads as done, Inactive as muted. */
16
+ export declare function ActiveStatus({ active, className, }: {
17
+ active?: boolean | null;
18
+ className?: string;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=StatusText.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './StatusText';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ /** Bordered list that holds tree nodes (K3Core DS: soft dividers, row hover). */
3
+ export declare function Tree({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
4
+ export interface TreeNodeProps extends Omit<React.ComponentProps<'div'>, 'title'> {
5
+ /** Node label (e.g. category name). */
6
+ label: React.ReactNode;
7
+ /** Icon before the label. */
8
+ icon?: React.ReactNode;
9
+ /** Status / tag next to the label (StatusText, Badge). */
10
+ meta?: React.ReactNode;
11
+ /** Right side, always visible (counts). */
12
+ trailing?: React.ReactNode;
13
+ /** Right side, shown on row hover or keyboard focus (add / edit / delete). */
14
+ actions?: React.ReactNode;
15
+ /** Whether the node can open; without children there is no chevron. */
16
+ expandable?: boolean;
17
+ open?: boolean;
18
+ onOpenChange?: (open: boolean) => void;
19
+ /** Dim the label when the node is empty or hidden. */
20
+ muted?: boolean;
21
+ /** Child rows, shown under a guide line when open. */
22
+ children?: React.ReactNode;
23
+ }
24
+ /** One expandable tree row with its children (TreeLeaf or nested TreeNode). */
25
+ export declare function TreeNode({ label, icon, meta, trailing, actions, expandable, open, onOpenChange, muted, children, className, ...props }: TreeNodeProps): import("react/jsx-runtime").JSX.Element;
26
+ declare const LEAF_TONE: {
27
+ readonly none: "border-l-transparent";
28
+ readonly success: "border-l-status-done";
29
+ readonly warning: "border-l-status-warning bg-warning-bg";
30
+ readonly danger: "border-l-status-cancelled bg-danger-bg";
31
+ readonly pink: "border-l-pink-fg bg-pink-bg";
32
+ readonly muted: "border-l-border bg-muted/50";
33
+ };
34
+ export type TreeLeafTone = keyof typeof LEAF_TONE;
35
+ export interface TreeLeafProps extends React.ComponentProps<'div'> {
36
+ /** Left stripe + tint that says the leaf's state at a glance. */
37
+ tone?: TreeLeafTone;
38
+ }
39
+ /** A leaf row under a TreeNode (e.g. a product). Forwards ref so it can be a drag-sortable item. */
40
+ export declare const TreeLeaf: React.ForwardRefExoticComponent<Omit<TreeLeafProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
41
+ export {};
42
+ //# sourceMappingURL=Tree.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './Tree';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,12 +1,12 @@
1
1
  /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
2
2
  @layer base {
3
3
  * {
4
- border-color: oklch(var(--border));
4
+ border-color: var(--border);
5
5
  }
6
6
 
7
7
  body {
8
- background-color: oklch(var(--background));
9
- color: oklch(var(--foreground));
8
+ background-color: var(--background);
9
+ color: var(--foreground);
10
10
  letter-spacing: var(--tracking-normal);
11
11
  }
12
12
  }