@dxos/plugin-status-bar 0.13.0 → 0.14.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/lib/StatusBar.mjs +11 -6
- package/dist/lib/StatusBar.mjs.map +1 -1
- package/dist/lib/chunk-StatusBarActions.mjs +1 -1
- package/dist/lib/chunk-VersionNumber.mjs +1 -1
- package/dist/types/src/components/StatusBar/StatusBar.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/components/StatusBar/StatusBar.tsx +7 -6
package/dist/lib/StatusBar.mjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ark } from "@ark-ui/react/factory";
|
|
2
2
|
import { forwardRef } from "react";
|
|
3
|
+
import * as Layout from "@dxos/react-ui/Layout";
|
|
3
4
|
import { mx } from "@dxos/ui-theme";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
var StatusBar = {
|
|
6
7
|
Item: forwardRef(({ classNames, children, ...props }, forwardedRef) => {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
+
return /* @__PURE__ */ jsx(Layout.Grid, {
|
|
8
9
|
...props,
|
|
9
10
|
role: "status",
|
|
10
|
-
|
|
11
|
+
center: true,
|
|
12
|
+
classNames,
|
|
11
13
|
ref: forwardedRef,
|
|
12
14
|
children
|
|
13
15
|
});
|
|
@@ -28,13 +30,16 @@ var StatusBar = {
|
|
|
28
30
|
children
|
|
29
31
|
});
|
|
30
32
|
}),
|
|
31
|
-
StartContent: forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ jsx(
|
|
32
|
-
|
|
33
|
+
StartContent: forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ jsx(Layout.Flex, {
|
|
34
|
+
align: "center",
|
|
35
|
+
classNames: ["flex-grow space-x-2", classNames],
|
|
33
36
|
ref: forwardedRef,
|
|
34
37
|
children
|
|
35
38
|
})),
|
|
36
|
-
EndContent: forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ jsx(
|
|
37
|
-
|
|
39
|
+
EndContent: forwardRef(({ classNames, children }, forwardedRef) => /* @__PURE__ */ jsx(Layout.Flex, {
|
|
40
|
+
align: "center",
|
|
41
|
+
justify: "end",
|
|
42
|
+
classNames: ["flex-grow", classNames],
|
|
38
43
|
ref: forwardedRef,
|
|
39
44
|
children
|
|
40
45
|
}))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.mjs","names":[],"sources":["../../src/components/StatusBar/StatusBar.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ark } from '@ark-ui/react/factory';\nimport React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode, forwardRef } from 'react';\n\nimport type * as Util from '@dxos/react-ui/Util';\nimport { mx } from '@dxos/ui-theme';\n\n//\n// Item\n//\n\ntype StatusBarItemProps = Util.ThemedClassName<PropsWithChildren>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n return (\n <
|
|
1
|
+
{"version":3,"file":"StatusBar.mjs","names":[],"sources":["../../src/components/StatusBar/StatusBar.tsx"],"sourcesContent":["//\n// Copyright 2024 DXOS.org\n//\n\nimport { ark } from '@ark-ui/react/factory';\nimport React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode, forwardRef } from 'react';\n\nimport * as Layout from '@dxos/react-ui/Layout';\nimport type * as Util from '@dxos/react-ui/Util';\nimport { mx } from '@dxos/ui-theme';\n\n//\n// Item\n//\n\ntype StatusBarItemProps = Util.ThemedClassName<PropsWithChildren>;\n\nconst StatusBarItem = forwardRef<HTMLDivElement, StatusBarItemProps>(\n ({ classNames, children, ...props }, forwardedRef) => {\n return (\n <Layout.Grid {...props} role='status' center classNames={classNames} ref={forwardedRef}>\n {children}\n </Layout.Grid>\n );\n },\n);\n\n//\n// Text\n//\n\ntype StatusBarTextProps = Util.ThemedClassName<{ children: ReactNode }>;\n\nconst StatusBarText = forwardRef<HTMLSpanElement, StatusBarTextProps>(({ classNames, children }, forwardedRef) => (\n <span className={mx(classNames)} ref={forwardedRef}>\n {children}\n </span>\n));\n\n//\n// Button\n//\n\ntype StatusBarButtonProps = Util.ThemedClassName<ComponentPropsWithRef<'button'> & { asChild?: boolean }>;\n\n/**\n * @deprecated\n */\nconst StatusBarButton = forwardRef<HTMLButtonElement, StatusBarButtonProps>(\n ({ classNames, children, asChild, ...props }, forwardedRef) => {\n const classes = mx(\n 'flex items-center justify-center gap-2 p-1 px-2 rounded-xs',\n 'select-none cursor-pointer dx-focus-ring text-fg-muted text-xs',\n 'hover:bg-neutral-100 active:bg-neutral-200 dark:hover:bg-neutral-700 dark:active:bg-neutral-600',\n classNames,\n );\n\n return (\n <ark.button\n asChild={asChild}\n {...(asChild && { role: 'button' })}\n className={classes}\n ref={forwardedRef}\n {...props}\n >\n {children}\n </ark.button>\n );\n },\n);\n\n//\n// Content\n//\n\ntype StartContentProps = Util.ThemedClassName<PropsWithChildren<{}>>;\n\nconst StartContent = forwardRef<HTMLDivElement, StartContentProps>(({ classNames, children }, forwardedRef) => (\n <Layout.Flex align='center' classNames={['flex-grow space-x-2', classNames]} ref={forwardedRef}>\n {children}\n </Layout.Flex>\n));\n\n//\n// EndContent\n//\n\ntype EndContentProps = Util.ThemedClassName<PropsWithChildren<{}>>;\n\nconst EndContent = forwardRef<HTMLDivElement, EndContentProps>(({ classNames, children }, forwardedRef) => (\n <Layout.Flex align='center' justify='end' classNames={['flex-grow', classNames]} ref={forwardedRef}>\n {children}\n </Layout.Flex>\n));\n\n//\n// StatusBar\n//\n\nexport const StatusBar = {\n Item: StatusBarItem,\n Text: StatusBarText,\n Button: StatusBarButton,\n StartContent,\n EndContent,\n};\n"],"mappings":";;;;;AAmGA,IAAa,YAAY;CACvB,MAnFoB,YACnB,EAAE,YAAY,UAAU,GAAG,SAAS,iBAAiB;EACpD,OACE,oBAAC,OAAO,MAAR;GAAa,GAAI;GAAO,MAAK;GAAS,QAAA;GAAmB;GAAY,KAAK;GACvE;EACU,CAAA;CAEjB,CA4EM;CACN,MApEoB,YAAiD,EAAE,YAAY,YAAY,iBAC/F,oBAAC,QAAD;EAAM,WAAW,GAAG,UAAU;EAAG,KAAK;EACnC;CACG,CAAA,CAiEA;CACN,QAtDsB,YACrB,EAAE,YAAY,UAAU,SAAS,GAAG,SAAS,iBAAiB;EAC7D,MAAM,UAAU,GACd,8DACA,kEACA,mGACA,UACF;EAEA,OACE,oBAAC,IAAI,QAAL;GACW;GACT,GAAK,WAAW,EAAE,MAAM,SAAS;GACjC,WAAW;GACX,KAAK;GACL,GAAI;GAEH;EACS,CAAA;CAEhB,CAkCQ;CACR,cA1BmB,YAA+C,EAAE,YAAY,YAAY,iBAC5F,oBAAC,OAAO,MAAR;EAAa,OAAM;EAAS,YAAY,CAAC,uBAAuB,UAAU;EAAG,KAAK;EAC/E;CACU,CAAA,CAuBb;CACA,YAfiB,YAA6C,EAAE,YAAY,YAAY,iBACxF,oBAAC,OAAO,MAAR;EAAa,OAAM;EAAS,SAAQ;EAAM,YAAY,CAAC,aAAa,UAAU;EAAG,KAAK;EACnF;CACU,CAAA,CAYb;AACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
2
|
import { n as VersionNumber } from "./chunk-VersionNumber.mjs";
|
|
3
3
|
import "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import * as Layout from "@dxos/react-ui/Layout";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/containers/StatusBarActions/StatusBarActions.tsx
|
|
7
7
|
var StatusBarActions = (_props) => {
|
|
8
8
|
return /* @__PURE__ */ jsxs(Layout.Flex, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
2
|
import "react";
|
|
3
|
+
import * as Layout from "@dxos/react-ui/Layout";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import { meta } from "#meta";
|
|
5
|
-
import * as Layout from "@dxos/react-ui/Layout";
|
|
6
6
|
import { formatDistance, isValid } from "date-fns";
|
|
7
7
|
import { useConfig } from "@dxos/react-client";
|
|
8
8
|
import * as Hooks from "@dxos/react-ui/Hooks";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/StatusBar/StatusBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAA0B,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/StatusBar/StatusBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAA0B,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAG9G,OAAO,KAAK,KAAK,IAAI,MAAM,qBAAqB,CAAC;AAmCjD,KAAK,oBAAoB,GAAG,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAwD1G,eAAO,MAAM,SAAS;;;;;;;kBApEqC,SAAS;;;;;;;;;;;;;;;CA0EnE,CAAC"}
|