@gridui/rail-profile 0.0.0-stage → 0.0.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 +20 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +7 -0
- package/dist/rail-profile/rail-profile.d.ts +14 -0
- package/dist/rail-profile/style.d.ts +10 -0
- package/dist/styles.css +46 -0
- package/package.json +48 -3
package/README.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @gridui/rail-profile
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Core family. Public API: `RailProfile`, `RailProfileProps`.
|
|
4
|
+
|
|
5
|
+
Import components from `@gridui/rail-profile` and load `@gridui/rail-profile/styles.css` after Theme.
|
|
6
|
+
Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
|
|
7
|
+
|
|
8
|
+
See [component ownership](../../docs/component-ownership.md) and [release history](.changeset/history/).
|
|
9
|
+
|
|
10
|
+
## RailProfile
|
|
11
|
+
|
|
12
|
+
Import `RailProfile` and `RailProfileProps` from `@gridui/rail-profile`.
|
|
13
|
+
Ordered process lists belong to [`@gridui/steps`](../steps/README.md), which
|
|
14
|
+
owns the Steps component and stylesheet. Task state and timeline coordination
|
|
15
|
+
remain with Layout's TaskTimeline.
|
|
16
|
+
|
|
17
|
+
RailProfile presents supplied `name`, optional `avatar`, and `caption` vertically.
|
|
18
|
+
When `name` is absent, it renders the supplied `action`. The application owns
|
|
19
|
+
account state and the action; RailProfile does not fetch a profile, authenticate,
|
|
20
|
+
or provide Grid rail geometry. Put it inside a Grid FrameRail when a page rail
|
|
21
|
+
is needed.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// src/rail-profile/style.ts
|
|
2
|
+
import { cn } from "@gridui/style-utils";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
var railProfileStyles = cva(cn(
|
|
5
|
+
"gridui-rail-profile",
|
|
6
|
+
"flex flex-col items-center gap-gridui-8"
|
|
7
|
+
));
|
|
8
|
+
var railTextStyles = cva(cn(
|
|
9
|
+
"gridui-rail-text",
|
|
10
|
+
"[writing-mode:vertical-rl] whitespace-nowrap"
|
|
11
|
+
));
|
|
12
|
+
var railCaptionStyles = cva(cn(
|
|
13
|
+
"gridui-rail-caption",
|
|
14
|
+
"text-muted"
|
|
15
|
+
));
|
|
16
|
+
var railAvatarStyles = cva(cn(
|
|
17
|
+
"gridui-rail-avatar",
|
|
18
|
+
"grid w-gridui-24 h-gridui-24 place-items-center rounded-[50%] text-accent-foreground bg-accent-background"
|
|
19
|
+
));
|
|
20
|
+
|
|
21
|
+
// src/rail-profile/rail-profile.tsx
|
|
22
|
+
import { cn as cn2 } from "@gridui/style-utils";
|
|
23
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
var RailProfile = (props) => {
|
|
25
|
+
const { avatar, name, caption, action } = props;
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: cn2(railProfileStyles()),
|
|
30
|
+
children: name ? /* @__PURE__ */ jsxs(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: cn2(railProfileStyles()),
|
|
34
|
+
role: "status",
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
"span",
|
|
38
|
+
{
|
|
39
|
+
className: cn2(railAvatarStyles()),
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: avatar
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: cn2(railTextStyles()),
|
|
48
|
+
children: name
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: cn2(railTextStyles(), railCaptionStyles()),
|
|
55
|
+
children: caption
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
) : action
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
RailProfile
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/rail-profile/style.ts", "../src/rail-profile/rail-profile.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Rail Profile\n * @namespace RailProfile\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const railProfileStyles = cva(cn(\n \"gridui-rail-profile\",\n \"flex flex-col items-center gap-gridui-8\",\n));\n\nexport const railTextStyles = cva(cn(\n \"gridui-rail-text\",\n \"[writing-mode:vertical-rl] whitespace-nowrap\",\n));\n\nexport const railCaptionStyles = cva(cn(\n \"gridui-rail-caption\",\n \"text-muted\",\n));\n\nexport const railAvatarStyles = cva(cn(\n \"gridui-rail-avatar\",\n \"grid w-gridui-24 h-gridui-24 place-items-center rounded-[50%] text-accent-foreground bg-accent-background\",\n));\n", "/**\n * @author WMXPY\n * @package Rail Profile\n * @namespace RailProfile\n * @description Rail Profile\n */\n\nimport { railAvatarStyles, railCaptionStyles, railProfileStyles, railTextStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC, ReactNode } from \"react\";\n\nexport type RailProfileProps = {\n readonly avatar?: ReactNode;\n readonly name?: ReactNode;\n readonly caption?: ReactNode;\n readonly action: ReactNode;\n};\n\nexport const RailProfile: FC<RailProfileProps> = (props: RailProfileProps) => {\n const { avatar, name, caption, action } = props;\n return (<div\n className={cn(railProfileStyles())}\n >\n {name ? (<div\n className={cn(railProfileStyles())}\n role=\"status\"\n >\n <span\n className={cn(railAvatarStyles())}\n aria-hidden=\"true\"\n >\n {avatar}\n </span>\n <span\n className={cn(railTextStyles())}\n >\n {name}\n </span>\n <span\n className={cn(railTextStyles(), railCaptionStyles())}\n >\n {caption}\n </span>\n </div>) : action}\n </div>);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,oBAAoB,IAAI;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,iBAAiB,IAAI;AAAA,EAC9B;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,oBAAoB,IAAI;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,mBAAmB,IAAI;AAAA,EAChC;AAAA,EACA;AACJ,CAAC;;;ACpBD,SAAS,MAAAA,WAAU;AAeF,SAIL,KAJK;AALV,IAAM,cAAoC,CAAC,UAA4B;AAC1E,QAAM,EAAE,QAAQ,MAAM,SAAS,OAAO,IAAI;AAC1C,SAAQ;AAAA,IAAC;AAAA;AAAA,MACL,WAAWA,IAAG,kBAAkB,CAAC;AAAA,MAEhC,iBAAQ;AAAA,QAAC;AAAA;AAAA,UACN,WAAWA,IAAG,kBAAkB,CAAC;AAAA,UACjC,MAAK;AAAA,UAEL;AAAA;AAAA,cAAC;AAAA;AAAA,gBACG,WAAWA,IAAG,iBAAiB,CAAC;AAAA,gBAChC,eAAY;AAAA,gBAEX;AAAA;AAAA,YACL;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACG,WAAWA,IAAG,eAAe,CAAC;AAAA,gBAE7B;AAAA;AAAA,YACL;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACG,WAAWA,IAAG,eAAe,GAAG,kBAAkB,CAAC;AAAA,gBAElD;AAAA;AAAA,YACL;AAAA;AAAA;AAAA,MACJ,IAAU;AAAA;AAAA,EACd;AACJ;",
|
|
6
|
+
"names": ["cn"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Rail Profile
|
|
4
|
+
* @namespace RailProfile
|
|
5
|
+
* @description Rail Profile
|
|
6
|
+
*/
|
|
7
|
+
import type { FC, ReactNode } from "react";
|
|
8
|
+
export type RailProfileProps = {
|
|
9
|
+
readonly avatar?: ReactNode;
|
|
10
|
+
readonly name?: ReactNode;
|
|
11
|
+
readonly caption?: ReactNode;
|
|
12
|
+
readonly action: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare const RailProfile: FC<RailProfileProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author WMXPY
|
|
3
|
+
* @package Rail Profile
|
|
4
|
+
* @namespace RailProfile
|
|
5
|
+
* @description Style
|
|
6
|
+
*/
|
|
7
|
+
export declare const railProfileStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
|
+
export declare const railTextStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
|
+
export declare const railCaptionStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
export declare const railAvatarStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
@layer utilities {
|
|
4
|
+
.flex {
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
.grid {
|
|
8
|
+
display: grid;
|
|
9
|
+
}
|
|
10
|
+
.h-gridui-24 {
|
|
11
|
+
height: var(--gridui-space-24);
|
|
12
|
+
}
|
|
13
|
+
.w-gridui-24 {
|
|
14
|
+
width: var(--gridui-space-24);
|
|
15
|
+
}
|
|
16
|
+
.flex-col {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
.place-items-center {
|
|
20
|
+
place-items: center;
|
|
21
|
+
}
|
|
22
|
+
.items-center {
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
.gap-gridui-8 {
|
|
26
|
+
gap: var(--gridui-space-8);
|
|
27
|
+
}
|
|
28
|
+
.rounded-\[50\%\] {
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
}
|
|
31
|
+
.bg-accent-background {
|
|
32
|
+
background-color: var(--gridui-accent-background);
|
|
33
|
+
}
|
|
34
|
+
.whitespace-nowrap {
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
}
|
|
37
|
+
.text-accent-foreground {
|
|
38
|
+
color: var(--gridui-accent-foreground);
|
|
39
|
+
}
|
|
40
|
+
.text-muted {
|
|
41
|
+
color: var(--gridui-muted);
|
|
42
|
+
}
|
|
43
|
+
.\[writing-mode\:vertical-rl\] {
|
|
44
|
+
writing-mode: vertical-rl;
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/rail-profile",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "GridUI React rail profile",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": [
|
|
12
|
+
"**/*.css"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./styles.css": "./dist/styles.css"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"react": "^19.2.0",
|
|
26
|
+
"react-dom": "^19.2.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@gridui/style-utils": "^2.1.2",
|
|
30
|
+
"@gridui/theme": "^2.1.2",
|
|
31
|
+
"class-variance-authority": "0.7.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@gridui-internal/configuration": "0.0.0",
|
|
35
|
+
"@jest/globals": "30.5.2",
|
|
36
|
+
"@types/jest": "30.0.0",
|
|
37
|
+
"@types/node": "26.6.5",
|
|
38
|
+
"@types/react": "19.3.0",
|
|
39
|
+
"@types/react-dom": "19.3.0",
|
|
40
|
+
"jest": "30.5.2",
|
|
41
|
+
"react": "19.3.1",
|
|
42
|
+
"react-dom": "19.3.1",
|
|
43
|
+
"typescript": "6.0.3"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "node ../../scripts/compilation/package.ts",
|
|
47
|
+
"compile": "tsc --project tsconfig.json",
|
|
48
|
+
"test": "jest --passWithNoTests",
|
|
49
|
+
"coverage": "jest --coverage --passWithNoTests"
|
|
50
|
+
}
|
|
6
51
|
}
|