@stll/workspace-ui 0.12.7 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +139 -0
- package/dist/feature-previews/billing-preview.d.ts +38 -0
- package/dist/feature-previews/billing-preview.js +160 -0
- package/dist/feature-previews/contacts-preview.d.ts +35 -0
- package/dist/feature-previews/contacts-preview.js +109 -0
- package/dist/feature-previews/documents-preview.d.ts +44 -0
- package/dist/feature-previews/documents-preview.js +105 -0
- package/dist/feature-previews/format.d.ts +16 -0
- package/dist/feature-previews/format.js +20 -0
- package/dist/feature-previews/index.d.ts +9 -0
- package/dist/feature-previews/index.js +7 -0
- package/dist/feature-previews/matters-preview.d.ts +30 -0
- package/dist/feature-previews/matters-preview.js +153 -0
- package/dist/feature-previews/mock-data.d.ts +41 -0
- package/dist/feature-previews/mock-data.js +25 -0
- package/dist/feature-previews/research-preview.d.ts +33 -0
- package/dist/feature-previews/research-preview.js +115 -0
- package/dist/feature-previews/surface.d.ts +34 -0
- package/dist/feature-previews/surface.js +42 -0
- package/dist/feature-previews/time-tracking-preview.d.ts +35 -0
- package/dist/feature-previews/time-tracking-preview.js +135 -0
- package/dist/field-value.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/responsive-action-toolbar.js +4 -4
- package/dist/task-status.d.ts +21 -0
- package/dist/task-status.js +27 -0
- package/dist/types.d.ts +3 -1
- package/package.json +11 -3
package/dist/field-value.d.ts
CHANGED
|
@@ -68,5 +68,5 @@ type PendingSkeletonProps = {
|
|
|
68
68
|
};
|
|
69
69
|
export declare const PendingSkeleton: ({ contentType }: PendingSkeletonProps) => import("react").JSX.Element;
|
|
70
70
|
export declare const getSelectPropertyColor: (property: GenericProperty, option: string | null) => import("@stll/ui/option-color").ColorVariants | undefined;
|
|
71
|
-
export declare const getIntClassName: (variant: FieldValueVariant) => "
|
|
71
|
+
export declare const getIntClassName: (variant: FieldValueVariant) => "text-muted-foreground bg-muted/60 rounded px-1.5 py-0.5 text-xs leading-none tabular-nums" | "block max-w-full min-w-0 truncate text-start tabular-nums" | "block min-w-0 max-w-full truncate text-start text-sm tabular-nums";
|
|
72
72
|
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WorkspaceViewSwitcher, WorkspaceViewSwitcherEditing, WorkspaceViewSwitcherItem, WorkspaceViewSwitcherProps, WorkspaceViewSwitcherReorder } from "./view-switcher.js";
|
|
2
1
|
import { CalculationFormatters, CalculationLabels, FormatCalculationParams, FormattedCalculation, formatCalculationResult } from "./calculation-format.js";
|
|
3
2
|
import { ApplyCalculationSelectionParams, CalculationSelection, applyCalculationSelection } from "./calculation-selection.js";
|
|
4
3
|
import { CalculationKindPicker, CalculationKindPickerProps, CalculationPicker, CalculationPickerProps, CalculationProperty, CalculationResult, CalculationSummary, CalculationSummaryProps, ColumnCalculation, UseCalculationParams, WorkspaceCalculationLabels, useCalculation } from "./calculations.js";
|
|
@@ -13,5 +12,6 @@ import { SortChips, SortChipsLabels, SortChipsProps, SortDescriptor, SortablePro
|
|
|
13
12
|
import { TableSkeletonRows } from "./table-skeleton-rows.js";
|
|
14
13
|
import { CreateWorkspaceKanbanSchemaParams, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, KanbanBoardPresentation, KanbanEmptyGroupVisibility, KanbanPresentedBand, KanbanPresentedLane, KanbanSavedAxisState, KanbanSavedGroupAxisState, KanbanSavedGroupReference, KanbanSavedSubgroupState, KanbanSavedViewState, KanbanSavedViewStateV1, ResolveWorkspaceKanbanViewParams, ResolvedWorkspaceKanbanView, WorkspaceKanbanBuiltInGroupLabel, WorkspaceKanbanGroupingChoice, WorkspaceKanbanGroupingPickerLabels, WorkspaceKanbanGroupingPickerProps, WorkspaceKanbanProperty, createWorkspaceKanbanSchema, getWorkspaceKanbanGroupingChoices, normalizeKanbanSavedViewState, presentKanbanBoard, resolveWorkspaceKanbanView } from "./kanban-view.js";
|
|
15
14
|
import { WorkspaceKanbanGroupingPicker } from "./kanban-grouping-picker.js";
|
|
15
|
+
import { WorkspaceViewSwitcher, WorkspaceViewSwitcherEditing, WorkspaceViewSwitcherItem, WorkspaceViewSwitcherProps, WorkspaceViewSwitcherReorder } from "./view-switcher.js";
|
|
16
16
|
import { WorkspaceFrame, WorkspaceFrameEndRail, WorkspaceFrameInspector, WorkspaceFrameNavigation, WorkspaceFrameNavigationItem, WorkspaceFrameProps, WorkspaceFrameTopBar } from "./workspace-frame.js";
|
|
17
17
|
export { type ApplyCalculationSelectionParams, CONDITION_OPERATORS, type CalculationFormatters, CalculationKindPicker, type CalculationKindPickerProps, type CalculationLabels, CalculationPicker, type CalculationPickerProps, type CalculationProperty, type CalculationResult, type CalculationSelection, CalculationSummary, type CalculationSummaryProps, type ColorVariants, ColumnCalculation, ConditionBuilder, type ConditionBuilderLabels, type ConditionCapabilities, type ConditionOperator, type CreateWorkspaceKanbanSchemaParams, FIELD_CONTENT_TYPES, type FieldContent, type FieldOption, type FieldOptionChoice, FieldValue, type FieldValueType, type FormatCalculationParams, type FormattedCalculation, type FormulaCellRenderCtx, type GenericProperty, IntFieldValue, KANBAN_EMPTY_GROUP_VISIBILITIES, KANBAN_SAVED_VIEW_STATE_VERSION, type KanbanBoardPresentation, type KanbanEmptyGroupVisibility, type KanbanPresentedBand, type KanbanPresentedLane, type KanbanSavedAxisState, type KanbanSavedGroupAxisState, type KanbanSavedGroupReference, type KanbanSavedSubgroupState, type KanbanSavedViewState, type KanbanSavedViewStateV1, MoneyFieldValue, type OptionColor, PersonFieldValue, PropertyIcon, type PropertyIconType, type ResolveWorkspaceKanbanViewParams, type ResolvedWorkspaceKanbanView, SortChips, type SortChipsLabels, type SortChipsProps, type SortDescriptor, type SortableProperty, TableSkeletonRows, type UseCalculationParams, type ValueEditorKind, type ValueEditorRenderCtx, type WorkspaceCalculationLabels, type WorkspaceFieldContent, WorkspaceFrame, type WorkspaceFrameEndRail, type WorkspaceFrameInspector, type WorkspaceFrameNavigation, type WorkspaceFrameNavigationItem, type WorkspaceFrameProps, type WorkspaceFrameTopBar, type WorkspaceKanbanBuiltInGroupLabel, type WorkspaceKanbanGroupingChoice, WorkspaceKanbanGroupingPicker, type WorkspaceKanbanGroupingPickerLabels, type WorkspaceKanbanGroupingPickerProps, type WorkspaceKanbanProperty, WorkspaceViewSwitcher, type WorkspaceViewSwitcherEditing, type WorkspaceViewSwitcherItem, type WorkspaceViewSwitcherProps, type WorkspaceViewSwitcherReorder, appendChild, applyCalculationSelection, asGroup, buildLeaf, createWorkspaceKanbanSchema, emptyColor, fieldForNode, formatCalculationResult, getClipFieldValueLabel, getWorkspaceKanbanGroupingChoices, isConditionOperator, isMultiValue, leafFromField, leafOperand, leafOperator, leafValueList, leafValueString, normalizeKanbanSavedViewState, operandsEqual, operatorsFor, optionColors, presentKanbanBoard, removeChild, replaceChild, resolveOptionColor, resolveWorkspaceKanbanView, sortDirectionHint, useCalculation, valueEditorFor };
|
|
@@ -2,12 +2,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "@stll/ui/utils";
|
|
3
3
|
//#region src/responsive-action-toolbar.tsx
|
|
4
4
|
const RESPONSIVE_ACTION_TOOLBAR_SLOT_CLASS = {
|
|
5
|
-
primary: "min-w-56 flex-1
|
|
6
|
-
secondary: "min-w-0
|
|
7
|
-
action: "shrink-0"
|
|
5
|
+
primary: "min-w-56 flex-1",
|
|
6
|
+
secondary: "min-w-0 max-w-full",
|
|
7
|
+
action: "ms-auto shrink-0"
|
|
8
8
|
};
|
|
9
9
|
const ResponsiveActionToolbar = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
10
|
-
className: cn("flex min-w-0
|
|
10
|
+
className: cn("flex min-w-0 flex-wrap items-center gap-2", className),
|
|
11
11
|
...props
|
|
12
12
|
});
|
|
13
13
|
const ResponsiveActionToolbarItem = ({ slot, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LucideIcon } from "@stll/ui/icons";
|
|
2
|
+
//#region src/task-status.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* How a task's status is drawn: one glyph and one colour per status.
|
|
5
|
+
*
|
|
6
|
+
* Owned here so every surface that draws a task (the app's boards and tables,
|
|
7
|
+
* the published feature previews) reads the same mapping. The status union
|
|
8
|
+
* itself belongs to the API contract; its consumer binds these maps to it with
|
|
9
|
+
* `satisfies Record<TaskStatus, …>`, so a status added there fails typecheck
|
|
10
|
+
* until it has a glyph here.
|
|
11
|
+
*/
|
|
12
|
+
export declare const TASK_STATUS_ICONS: Readonly<Record<"open" | "in_progress" | "in_review" | "done" | "cancelled", LucideIcon>>;
|
|
13
|
+
export declare const TASK_STATUS_COLORS: {
|
|
14
|
+
readonly open: "text-muted-foreground";
|
|
15
|
+
readonly in_progress: "text-foreground dark:text-foreground-muted";
|
|
16
|
+
readonly in_review: "text-warning";
|
|
17
|
+
readonly done: "text-success dark:text-success";
|
|
18
|
+
readonly cancelled: "text-destructive dark:text-destructive";
|
|
19
|
+
};
|
|
20
|
+
export type TaskStatusGlyph = keyof typeof TASK_STATUS_ICONS;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CheckCircle2Icon, CircleDotIcon, CircleIcon, XCircleIcon } from "@stll/ui/icons";
|
|
2
|
+
//#region src/task-status.ts
|
|
3
|
+
/**
|
|
4
|
+
* How a task's status is drawn: one glyph and one colour per status.
|
|
5
|
+
*
|
|
6
|
+
* Owned here so every surface that draws a task (the app's boards and tables,
|
|
7
|
+
* the published feature previews) reads the same mapping. The status union
|
|
8
|
+
* itself belongs to the API contract; its consumer binds these maps to it with
|
|
9
|
+
* `satisfies Record<TaskStatus, …>`, so a status added there fails typecheck
|
|
10
|
+
* until it has a glyph here.
|
|
11
|
+
*/
|
|
12
|
+
const TASK_STATUS_ICONS = {
|
|
13
|
+
open: CircleIcon,
|
|
14
|
+
in_progress: CircleDotIcon,
|
|
15
|
+
in_review: CircleDotIcon,
|
|
16
|
+
done: CheckCircle2Icon,
|
|
17
|
+
cancelled: XCircleIcon
|
|
18
|
+
};
|
|
19
|
+
const TASK_STATUS_COLORS = {
|
|
20
|
+
open: "text-muted-foreground",
|
|
21
|
+
in_progress: "text-foreground dark:text-foreground-muted",
|
|
22
|
+
in_review: "text-warning",
|
|
23
|
+
done: "text-success dark:text-success",
|
|
24
|
+
cancelled: "text-destructive dark:text-destructive"
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { TASK_STATUS_COLORS, TASK_STATUS_ICONS };
|
package/dist/types.d.ts
CHANGED
|
@@ -95,7 +95,9 @@ export type FieldContent = {
|
|
|
95
95
|
};
|
|
96
96
|
/** Runtime names for every content arm the field renderer understands. */
|
|
97
97
|
export declare const FIELD_CONTENT_TYPES: readonly ["error", "pending", "unsupported", "text", "single-select", "multi-select", "file", "date", "int", "money", "person", "clip"];
|
|
98
|
-
export type WorkspaceFieldContent = FieldContent
|
|
98
|
+
export type WorkspaceFieldContent = FieldContent & {
|
|
99
|
+
truncated?: true;
|
|
100
|
+
};
|
|
99
101
|
/**
|
|
100
102
|
* Minimal structural bound the display layer needs from a property: the cell
|
|
101
103
|
* renderers only read `content.type` and, for selects, the `options` colors.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/workspace-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Reusable workspace presentation components and view helpers for Stella.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"calculations",
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
"types": "./dist/conditions/index.d.ts",
|
|
52
52
|
"import": "./dist/conditions/index.js"
|
|
53
53
|
},
|
|
54
|
+
"./feature-previews": {
|
|
55
|
+
"types": "./dist/feature-previews/index.d.ts",
|
|
56
|
+
"import": "./dist/feature-previews/index.js"
|
|
57
|
+
},
|
|
54
58
|
"./field-value": {
|
|
55
59
|
"types": "./dist/field-value.d.ts",
|
|
56
60
|
"import": "./dist/field-value.js"
|
|
@@ -83,6 +87,10 @@
|
|
|
83
87
|
"types": "./dist/table-skeleton-rows.d.ts",
|
|
84
88
|
"import": "./dist/table-skeleton-rows.js"
|
|
85
89
|
},
|
|
90
|
+
"./task-status": {
|
|
91
|
+
"types": "./dist/task-status.d.ts",
|
|
92
|
+
"import": "./dist/task-status.js"
|
|
93
|
+
},
|
|
86
94
|
"./types": {
|
|
87
95
|
"types": "./dist/types.d.ts",
|
|
88
96
|
"import": "./dist/types.js"
|
|
@@ -114,7 +122,7 @@
|
|
|
114
122
|
"@stll/calculations": "^0.1.3",
|
|
115
123
|
"@stll/conditions": "^0.4.0",
|
|
116
124
|
"@stll/money": "^0.3.1",
|
|
117
|
-
"@stll/ui": "^0.
|
|
125
|
+
"@stll/ui": "^0.52.0",
|
|
118
126
|
"better-result": "3.0.1",
|
|
119
127
|
"temporal-polyfill": "1.0.5",
|
|
120
128
|
"use-intl": "4.14.9"
|
|
@@ -125,7 +133,7 @@
|
|
|
125
133
|
"@base-ui/react": "1.8.0",
|
|
126
134
|
"@stll/property-testing": "0.0.0",
|
|
127
135
|
"@stll/typescript-config": "0.0.0",
|
|
128
|
-
"@tanstack/react-table": "9.
|
|
136
|
+
"@tanstack/react-table": "9.3.1",
|
|
129
137
|
"@types/react": "^19.3.0",
|
|
130
138
|
"@types/react-dom": "^19.3.0",
|
|
131
139
|
"bun-types": "1.4.4",
|