@stll/workspace-ui 0.4.4 → 0.5.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/README.md
CHANGED
|
@@ -26,10 +26,16 @@ import { ConditionBuilder } from "@stll/workspace-ui/conditions";
|
|
|
26
26
|
import { FieldValue } from "@stll/workspace-ui/field-value";
|
|
27
27
|
import { SortChips } from "@stll/workspace-ui/sorts";
|
|
28
28
|
import { WorkspaceViewSwitcher } from "@stll/workspace-ui/view-switcher";
|
|
29
|
+
import {
|
|
30
|
+
ResponsiveActionToolbar,
|
|
31
|
+
ResponsiveActionToolbarItem,
|
|
32
|
+
} from "@stll/workspace-ui/responsive-action-toolbar";
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
The package also exposes a root entry for code that uses several workspace
|
|
32
|
-
surfaces together.
|
|
36
|
+
surfaces together. Focused modules, including the responsive action toolbar,
|
|
37
|
+
are intentionally available through explicit subpaths; use those subpaths to
|
|
38
|
+
declare a module's
|
|
33
39
|
boundary.
|
|
34
40
|
|
|
35
41
|
## Development
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
//#region src/responsive-action-toolbar.d.ts
|
|
3
|
+
type ResponsiveActionToolbarSlot = "primary" | "secondary" | "action";
|
|
4
|
+
declare const ResponsiveActionToolbar: ({ className, ...props }: React.ComponentProps<"div">) => React.JSX.Element;
|
|
5
|
+
type ResponsiveActionToolbarItemProps = React.PropsWithChildren<{
|
|
6
|
+
slot: ResponsiveActionToolbarSlot;
|
|
7
|
+
className?: string | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
declare const ResponsiveActionToolbarItem: ({ slot, className, children }: ResponsiveActionToolbarItemProps) => React.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ResponsiveActionToolbar, ResponsiveActionToolbarItem, ResponsiveActionToolbarSlot };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@stll/ui/utils";
|
|
3
|
+
//#region src/responsive-action-toolbar.tsx
|
|
4
|
+
const RESPONSIVE_ACTION_TOOLBAR_SLOT_CLASS = {
|
|
5
|
+
primary: "min-w-56 flex-1 shrink-0",
|
|
6
|
+
secondary: "min-w-0 shrink-0",
|
|
7
|
+
action: "shrink-0"
|
|
8
|
+
};
|
|
9
|
+
const ResponsiveActionToolbar = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: cn("flex min-w-0 flex-nowrap items-center gap-2 overflow-x-auto", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
const ResponsiveActionToolbarItem = ({ slot, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: cn(RESPONSIVE_ACTION_TOOLBAR_SLOT_CLASS[slot], className),
|
|
15
|
+
children
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
export { ResponsiveActionToolbar, ResponsiveActionToolbarItem };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/workspace-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Reusable workspace presentation components and view helpers for Stella.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"calculations",
|
|
@@ -71,6 +71,10 @@
|
|
|
71
71
|
"types": "./dist/property-icon.d.ts",
|
|
72
72
|
"import": "./dist/property-icon.js"
|
|
73
73
|
},
|
|
74
|
+
"./responsive-action-toolbar": {
|
|
75
|
+
"types": "./dist/responsive-action-toolbar.d.ts",
|
|
76
|
+
"import": "./dist/responsive-action-toolbar.js"
|
|
77
|
+
},
|
|
74
78
|
"./sorts": {
|
|
75
79
|
"types": "./dist/sorts.d.ts",
|
|
76
80
|
"import": "./dist/sorts.js"
|
|
@@ -111,7 +115,7 @@
|
|
|
111
115
|
"@stll/calculations": "^0.1.0",
|
|
112
116
|
"@stll/conditions": "^0.2.0",
|
|
113
117
|
"@stll/money": "^0.1.0",
|
|
114
|
-
"@stll/ui": "^0.12.
|
|
118
|
+
"@stll/ui": "^0.12.1",
|
|
115
119
|
"better-result": "3.0.0",
|
|
116
120
|
"lucide-react": "1.30.0",
|
|
117
121
|
"use-intl": "4.13.5"
|