@gridui/steps 2.0.1 → 2.2.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 +18 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +2 -2
- package/dist/steps/steps.d.ts +2 -0
- package/dist/styled.js +2 -0
- package/dist/styles.css +16 -10
- package/dist/styles.local.css +186 -0
- package/docs/catalog.json +6 -5
- package/docs/reference/steps.md +8 -2
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -29,8 +29,25 @@ applications own its content, typography, and business meaning. Native ol props,
|
|
|
29
29
|
ARIA attributes, className, style, and ref are forwarded. There is no active
|
|
30
30
|
step, completion state, click handler, or navigation model added by Steps.
|
|
31
31
|
|
|
32
|
+
## Styles
|
|
33
|
+
|
|
34
|
+
Load Theme once. Use `@gridui/steps/styled` for automatic component CSS in
|
|
35
|
+
CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/steps/styles.css`.
|
|
36
|
+
Both entries expose the same root API. The standalone stylesheet includes component
|
|
37
|
+
dependency styles; Theme/reset remain separate. See the
|
|
38
|
+
[integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
|
|
39
|
+
for static HTML loading, SSR limits, and avoiding duplicate CSS.
|
|
40
|
+
|
|
41
|
+
|
|
32
42
|
## Release history
|
|
33
43
|
|
|
34
|
-
Package-owned records live in [.changeset/history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-
|
|
44
|
+
Package-owned records live in [.changeset/history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-data/steps/.changeset/history).
|
|
35
45
|
|
|
36
46
|
[Component reference](docs/reference/README.md) contains focused API pages for each public component.
|
|
47
|
+
|
|
48
|
+
## Sizing and density
|
|
49
|
+
|
|
50
|
+
density compact/comfortable selects 8px/16px between-item gaps at a 16px root, with comfortable as default. Connector offsets derive from that gap in either orientation. Native counters, markers, responsive direction and content typography stay independent. Override --gridui-steps-gap for coordinated custom gap/connector geometry.
|
|
51
|
+
|
|
52
|
+
See the [shared sizing contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/sizing.md)
|
|
53
|
+
for native attributes, scope precedence, tokens and target behavior.
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { resolveResponsive } from "@gridui/style-utils/responsive";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var Steps = (props) => {
|
|
6
6
|
const {
|
|
7
|
+
density = "comfortable",
|
|
7
8
|
orientation = "vertical",
|
|
8
9
|
marker,
|
|
9
10
|
connector = "none",
|
|
@@ -19,12 +20,13 @@ var Steps = (props) => {
|
|
|
19
20
|
...restProps,
|
|
20
21
|
role,
|
|
21
22
|
type,
|
|
22
|
-
className: cn("gridui-steps gridui-u-steps--grid gridui-u-steps--gap-gridui-
|
|
23
|
+
className: cn("gridui-steps gridui-u-steps--grid gridui-u-steps--gap-(--gridui-steps-gap) gridui-u-steps--m-0 gridui-u-steps--p-0 gridui-u-steps--text-muted", className),
|
|
23
24
|
"data-orientation": directions.base,
|
|
24
25
|
"data-orientation-sm": directions.sm,
|
|
25
26
|
"data-orientation-md": directions.md,
|
|
26
27
|
"data-orientation-lg": directions.lg,
|
|
27
28
|
"data-marker": marker ?? (type ? "native" : "decimal-leading-zero"),
|
|
29
|
+
"data-density": density,
|
|
28
30
|
"data-connector": connector
|
|
29
31
|
}
|
|
30
32
|
);
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/steps/steps.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Steps\n * @namespace Steps\n * @description Steps\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive, type Responsive } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type StepsProps = ComponentPropsWithRef<\"ol\"> & {\n readonly orientation?: Responsive<\"vertical\" | \"horizontal\">;\n readonly marker?: \"decimal-leading-zero\" | \"decimal\" | \"none\";\n readonly connector?: \"none\" | \"line\";\n};\n\nexport const Steps: FC<StepsProps> = (props: StepsProps) => {\n const { orientation = \"vertical\", marker, connector = \"none\", type,\n className, role = \"list\", ...restProps } = props;\n const directions = resolveResponsive(orientation);\n return (<ol\n {...restProps}\n role={role}\n type={type}\n className={cn(\"gridui-steps gridui-u-steps--grid gridui-u-steps--gap-gridui-
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Steps\n * @namespace Steps\n * @description Steps\n */\n\nimport type { Density } from \"@gridui/theme\";\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive, type Responsive } from \"@gridui/style-utils/responsive\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type StepsProps = ComponentPropsWithRef<\"ol\"> & {\n readonly density?: Density;\n readonly orientation?: Responsive<\"vertical\" | \"horizontal\">;\n readonly marker?: \"decimal-leading-zero\" | \"decimal\" | \"none\";\n readonly connector?: \"none\" | \"line\";\n};\n\nexport const Steps: FC<StepsProps> = (props: StepsProps) => {\n const { density = \"comfortable\", orientation = \"vertical\", marker, connector = \"none\", type,\n className, role = \"list\", ...restProps } = props;\n const directions = resolveResponsive(orientation);\n return (<ol\n {...restProps}\n role={role}\n type={type}\n className={cn(\"gridui-steps gridui-u-steps--grid gridui-u-steps--gap-(--gridui-steps-gap) gridui-u-steps--m-0 gridui-u-steps--p-0 gridui-u-steps--text-muted\", className)}\n data-orientation={directions.base}\n data-orientation-sm={directions.sm}\n data-orientation-md={directions.md}\n data-orientation-lg={directions.lg}\n data-marker={marker ?? (type ? \"native\" : \"decimal-leading-zero\")}\n data-density={density}\n data-connector={connector}\n />);\n};\n"],
|
|
5
|
+
"mappings": ";AAQA,SAAS,UAAU;AACnB,SAAS,yBAA0C;AAcvC;AAJL,IAAM,QAAwB,CAAC,UAAsB;AACxD,QAAM;AAAA,IAAE,UAAU;AAAA,IAAe,cAAc;AAAA,IAAY;AAAA,IAAQ,YAAY;AAAA,IAAQ;AAAA,IACnF;AAAA,IAAW,OAAO;AAAA,IAAQ,GAAG;AAAA,EAAU,IAAI;AAC/C,QAAM,aAAa,kBAAkB,WAAW;AAChD,SAAQ;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ;AAAA,MACA;AAAA,MACA,WAAW,GAAG,iJAAiJ,SAAS;AAAA,MACxK,oBAAkB,WAAW;AAAA,MAC7B,uBAAqB,WAAW;AAAA,MAChC,uBAAqB,WAAW;AAAA,MAChC,uBAAqB,WAAW;AAAA,MAChC,eAAa,WAAW,OAAO,WAAW;AAAA,MAC1C,gBAAc;AAAA,MACd,kBAAgB;AAAA;AAAA,EACpB;AACJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/steps/steps.d.ts
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
* @namespace Steps
|
|
5
5
|
* @description Steps
|
|
6
6
|
*/
|
|
7
|
+
import type { Density } from "@gridui/theme";
|
|
7
8
|
import { type Responsive } from "@gridui/style-utils/responsive";
|
|
8
9
|
import type { ComponentPropsWithRef, FC } from "react";
|
|
9
10
|
export type StepsProps = ComponentPropsWithRef<"ol"> & {
|
|
11
|
+
readonly density?: Density;
|
|
10
12
|
readonly orientation?: Responsive<"vertical" | "horizontal">;
|
|
11
13
|
readonly marker?: "decimal-leading-zero" | "decimal" | "none";
|
|
12
14
|
readonly connector?: "none" | "line";
|
package/dist/styled.js
ADDED
package/dist/styles.css
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
.gridui-u-steps--grid {
|
|
8
8
|
display: grid;
|
|
9
9
|
}
|
|
10
|
-
.gridui-u-steps--gap
|
|
11
|
-
gap: var(--gridui-
|
|
10
|
+
.gridui-u-steps--gap-\(--gridui-steps-gap\) {
|
|
11
|
+
gap: var(--gridui-steps-gap);
|
|
12
12
|
}
|
|
13
13
|
.gridui-u-steps--p-0 {
|
|
14
14
|
padding: 0px;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
--gridui-steps-line-start: 1ch;
|
|
84
84
|
--gridui-steps-line-end: auto;
|
|
85
85
|
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
86
|
-
--gridui-steps-line-bottom: calc(-1 * var(--gridui-
|
|
86
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
87
87
|
--gridui-steps-line-width: 1px;
|
|
88
88
|
--gridui-steps-line-height: auto;
|
|
89
89
|
}
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
--gridui-steps-flow: column;
|
|
92
92
|
--gridui-steps-columns: minmax(0, 1fr);
|
|
93
93
|
--gridui-steps-padding-inline: 0;
|
|
94
|
-
--gridui-steps-padding-block: calc(1lh + var(--gridui-
|
|
94
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
95
95
|
--gridui-steps-line-start: 3ch;
|
|
96
96
|
--gridui-steps-line-end: 0;
|
|
97
97
|
--gridui-steps-line-top: 0.5lh;
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
--gridui-steps-line-start: 1ch;
|
|
109
109
|
--gridui-steps-line-end: auto;
|
|
110
110
|
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
111
|
-
--gridui-steps-line-bottom: calc(-1 * var(--gridui-
|
|
111
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
112
112
|
--gridui-steps-line-width: 1px;
|
|
113
113
|
--gridui-steps-line-height: auto;
|
|
114
114
|
}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
--gridui-steps-flow: column;
|
|
117
117
|
--gridui-steps-columns: minmax(0, 1fr);
|
|
118
118
|
--gridui-steps-padding-inline: 0;
|
|
119
|
-
--gridui-steps-padding-block: calc(1lh + var(--gridui-
|
|
119
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
120
120
|
--gridui-steps-line-start: 3ch;
|
|
121
121
|
--gridui-steps-line-end: 0;
|
|
122
122
|
--gridui-steps-line-top: 0.5lh;
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
--gridui-steps-line-start: 1ch;
|
|
135
135
|
--gridui-steps-line-end: auto;
|
|
136
136
|
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
137
|
-
--gridui-steps-line-bottom: calc(-1 * var(--gridui-
|
|
137
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
138
138
|
--gridui-steps-line-width: 1px;
|
|
139
139
|
--gridui-steps-line-height: auto;
|
|
140
140
|
}
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
--gridui-steps-flow: column;
|
|
143
143
|
--gridui-steps-columns: minmax(0, 1fr);
|
|
144
144
|
--gridui-steps-padding-inline: 0;
|
|
145
|
-
--gridui-steps-padding-block: calc(1lh + var(--gridui-
|
|
145
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
146
146
|
--gridui-steps-line-start: 3ch;
|
|
147
147
|
--gridui-steps-line-end: 0;
|
|
148
148
|
--gridui-steps-line-top: 0.5lh;
|
|
@@ -160,7 +160,7 @@
|
|
|
160
160
|
--gridui-steps-line-start: 1ch;
|
|
161
161
|
--gridui-steps-line-end: auto;
|
|
162
162
|
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
163
|
-
--gridui-steps-line-bottom: calc(-1 * var(--gridui-
|
|
163
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
164
164
|
--gridui-steps-line-width: 1px;
|
|
165
165
|
--gridui-steps-line-height: auto;
|
|
166
166
|
}
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
--gridui-steps-flow: column;
|
|
169
169
|
--gridui-steps-columns: minmax(0, 1fr);
|
|
170
170
|
--gridui-steps-padding-inline: 0;
|
|
171
|
-
--gridui-steps-padding-block: calc(1lh + var(--gridui-
|
|
171
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
172
172
|
--gridui-steps-line-start: 3ch;
|
|
173
173
|
--gridui-steps-line-end: 0;
|
|
174
174
|
--gridui-steps-line-top: 0.5lh;
|
|
@@ -177,4 +177,10 @@
|
|
|
177
177
|
--gridui-steps-line-height: 1px;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
+
.gridui-steps {
|
|
181
|
+
--gridui-steps-gap: var(--gridui-space-16);
|
|
182
|
+
}
|
|
183
|
+
.gridui-steps[data-density="compact"] {
|
|
184
|
+
--gridui-steps-gap: var(--gridui-space-8);
|
|
185
|
+
}
|
|
180
186
|
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
@layer utilities {
|
|
4
|
+
.gridui-u-steps--m-0 {
|
|
5
|
+
margin: 0px;
|
|
6
|
+
}
|
|
7
|
+
.gridui-u-steps--grid {
|
|
8
|
+
display: grid;
|
|
9
|
+
}
|
|
10
|
+
.gridui-u-steps--gap-\(--gridui-steps-gap\) {
|
|
11
|
+
gap: var(--gridui-steps-gap);
|
|
12
|
+
}
|
|
13
|
+
.gridui-u-steps--p-0 {
|
|
14
|
+
padding: 0px;
|
|
15
|
+
}
|
|
16
|
+
.gridui-u-steps--text-muted {
|
|
17
|
+
color: var(--gridui-muted);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
@layer components {
|
|
21
|
+
.gridui-steps {
|
|
22
|
+
list-style-type: decimal-leading-zero;
|
|
23
|
+
grid-auto-flow: var(--gridui-steps-flow);
|
|
24
|
+
grid-auto-columns: var(--gridui-steps-columns);
|
|
25
|
+
}
|
|
26
|
+
.gridui-steps > li {
|
|
27
|
+
position: relative;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
padding-inline-start: var(--gridui-steps-padding-inline);
|
|
30
|
+
padding-block-start: var(--gridui-steps-padding-block);
|
|
31
|
+
overflow-wrap: anywhere;
|
|
32
|
+
}
|
|
33
|
+
.gridui-steps > li::marker {
|
|
34
|
+
content: "";
|
|
35
|
+
}
|
|
36
|
+
.gridui-steps > li::before {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset-inline-start: 0;
|
|
39
|
+
inset-block-start: 0;
|
|
40
|
+
color: var(--gridui-foreground);
|
|
41
|
+
font-family: var(--gridui-font-mono);
|
|
42
|
+
font-variant-numeric: tabular-nums;
|
|
43
|
+
content: counter(list-item, decimal-leading-zero);
|
|
44
|
+
}
|
|
45
|
+
.gridui-steps[data-marker="none"] > li::before {
|
|
46
|
+
content: none;
|
|
47
|
+
}
|
|
48
|
+
.gridui-steps[data-marker="decimal"] > li::before, .gridui-steps[data-marker="native"][type="1"] > li::before {
|
|
49
|
+
content: counter(list-item, decimal);
|
|
50
|
+
}
|
|
51
|
+
.gridui-steps[data-marker="native"][type="a"] > li::before {
|
|
52
|
+
content: counter(list-item, lower-alpha);
|
|
53
|
+
}
|
|
54
|
+
.gridui-steps[data-marker="native"][type="A"] > li::before {
|
|
55
|
+
content: counter(list-item, upper-alpha);
|
|
56
|
+
}
|
|
57
|
+
.gridui-steps[data-marker="native"][type="i"] > li::before {
|
|
58
|
+
content: counter(list-item, lower-roman);
|
|
59
|
+
}
|
|
60
|
+
.gridui-steps[data-marker="native"][type="I"] > li::before {
|
|
61
|
+
content: counter(list-item, upper-roman);
|
|
62
|
+
}
|
|
63
|
+
.gridui-steps[data-marker="none"][data-connector="none"] > li {
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
.gridui-steps[data-connector="line"] > li:not(:last-child)::after {
|
|
67
|
+
position: absolute;
|
|
68
|
+
inset-inline-start: var(--gridui-steps-line-start);
|
|
69
|
+
inset-inline-end: var(--gridui-steps-line-end);
|
|
70
|
+
inset-block-start: var(--gridui-steps-line-top);
|
|
71
|
+
inset-block-end: var(--gridui-steps-line-bottom);
|
|
72
|
+
width: var(--gridui-steps-line-width);
|
|
73
|
+
height: var(--gridui-steps-line-height);
|
|
74
|
+
background: var(--gridui-border);
|
|
75
|
+
content: "";
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
78
|
+
.gridui-steps[data-orientation="vertical"] {
|
|
79
|
+
--gridui-steps-flow: row;
|
|
80
|
+
--gridui-steps-columns: auto;
|
|
81
|
+
--gridui-steps-padding-inline: var(--gridui-space-48);
|
|
82
|
+
--gridui-steps-padding-block: 0;
|
|
83
|
+
--gridui-steps-line-start: 1ch;
|
|
84
|
+
--gridui-steps-line-end: auto;
|
|
85
|
+
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
86
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
87
|
+
--gridui-steps-line-width: 1px;
|
|
88
|
+
--gridui-steps-line-height: auto;
|
|
89
|
+
}
|
|
90
|
+
.gridui-steps[data-orientation="horizontal"] {
|
|
91
|
+
--gridui-steps-flow: column;
|
|
92
|
+
--gridui-steps-columns: minmax(0, 1fr);
|
|
93
|
+
--gridui-steps-padding-inline: 0;
|
|
94
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
95
|
+
--gridui-steps-line-start: 3ch;
|
|
96
|
+
--gridui-steps-line-end: 0;
|
|
97
|
+
--gridui-steps-line-top: 0.5lh;
|
|
98
|
+
--gridui-steps-line-bottom: auto;
|
|
99
|
+
--gridui-steps-line-width: auto;
|
|
100
|
+
--gridui-steps-line-height: 1px;
|
|
101
|
+
}
|
|
102
|
+
@media (min-width: 40rem) {
|
|
103
|
+
.gridui-steps[data-orientation-sm="vertical"] {
|
|
104
|
+
--gridui-steps-flow: row;
|
|
105
|
+
--gridui-steps-columns: auto;
|
|
106
|
+
--gridui-steps-padding-inline: var(--gridui-space-48);
|
|
107
|
+
--gridui-steps-padding-block: 0;
|
|
108
|
+
--gridui-steps-line-start: 1ch;
|
|
109
|
+
--gridui-steps-line-end: auto;
|
|
110
|
+
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
111
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
112
|
+
--gridui-steps-line-width: 1px;
|
|
113
|
+
--gridui-steps-line-height: auto;
|
|
114
|
+
}
|
|
115
|
+
.gridui-steps[data-orientation-sm="horizontal"] {
|
|
116
|
+
--gridui-steps-flow: column;
|
|
117
|
+
--gridui-steps-columns: minmax(0, 1fr);
|
|
118
|
+
--gridui-steps-padding-inline: 0;
|
|
119
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
120
|
+
--gridui-steps-line-start: 3ch;
|
|
121
|
+
--gridui-steps-line-end: 0;
|
|
122
|
+
--gridui-steps-line-top: 0.5lh;
|
|
123
|
+
--gridui-steps-line-bottom: auto;
|
|
124
|
+
--gridui-steps-line-width: auto;
|
|
125
|
+
--gridui-steps-line-height: 1px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@media (min-width: 48rem) {
|
|
129
|
+
.gridui-steps[data-orientation-md="vertical"] {
|
|
130
|
+
--gridui-steps-flow: row;
|
|
131
|
+
--gridui-steps-columns: auto;
|
|
132
|
+
--gridui-steps-padding-inline: var(--gridui-space-48);
|
|
133
|
+
--gridui-steps-padding-block: 0;
|
|
134
|
+
--gridui-steps-line-start: 1ch;
|
|
135
|
+
--gridui-steps-line-end: auto;
|
|
136
|
+
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
137
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
138
|
+
--gridui-steps-line-width: 1px;
|
|
139
|
+
--gridui-steps-line-height: auto;
|
|
140
|
+
}
|
|
141
|
+
.gridui-steps[data-orientation-md="horizontal"] {
|
|
142
|
+
--gridui-steps-flow: column;
|
|
143
|
+
--gridui-steps-columns: minmax(0, 1fr);
|
|
144
|
+
--gridui-steps-padding-inline: 0;
|
|
145
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
146
|
+
--gridui-steps-line-start: 3ch;
|
|
147
|
+
--gridui-steps-line-end: 0;
|
|
148
|
+
--gridui-steps-line-top: 0.5lh;
|
|
149
|
+
--gridui-steps-line-bottom: auto;
|
|
150
|
+
--gridui-steps-line-width: auto;
|
|
151
|
+
--gridui-steps-line-height: 1px;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
@media (min-width: 64rem) {
|
|
155
|
+
.gridui-steps[data-orientation-lg="vertical"] {
|
|
156
|
+
--gridui-steps-flow: row;
|
|
157
|
+
--gridui-steps-columns: auto;
|
|
158
|
+
--gridui-steps-padding-inline: var(--gridui-space-48);
|
|
159
|
+
--gridui-steps-padding-block: 0;
|
|
160
|
+
--gridui-steps-line-start: 1ch;
|
|
161
|
+
--gridui-steps-line-end: auto;
|
|
162
|
+
--gridui-steps-line-top: calc(1lh + var(--gridui-space-4));
|
|
163
|
+
--gridui-steps-line-bottom: calc(-1 * var(--gridui-steps-gap) / 2);
|
|
164
|
+
--gridui-steps-line-width: 1px;
|
|
165
|
+
--gridui-steps-line-height: auto;
|
|
166
|
+
}
|
|
167
|
+
.gridui-steps[data-orientation-lg="horizontal"] {
|
|
168
|
+
--gridui-steps-flow: column;
|
|
169
|
+
--gridui-steps-columns: minmax(0, 1fr);
|
|
170
|
+
--gridui-steps-padding-inline: 0;
|
|
171
|
+
--gridui-steps-padding-block: calc(1lh + var(--gridui-steps-gap));
|
|
172
|
+
--gridui-steps-line-start: 3ch;
|
|
173
|
+
--gridui-steps-line-end: 0;
|
|
174
|
+
--gridui-steps-line-top: 0.5lh;
|
|
175
|
+
--gridui-steps-line-bottom: auto;
|
|
176
|
+
--gridui-steps-line-width: auto;
|
|
177
|
+
--gridui-steps-line-height: 1px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
.gridui-steps {
|
|
181
|
+
--gridui-steps-gap: var(--gridui-space-16);
|
|
182
|
+
}
|
|
183
|
+
.gridui-steps[data-density="compact"] {
|
|
184
|
+
--gridui-steps-gap: var(--gridui-space-8);
|
|
185
|
+
}
|
|
186
|
+
}
|
package/docs/catalog.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/steps",
|
|
4
|
-
"version": "2.0
|
|
5
|
-
"category": "
|
|
4
|
+
"version": "2.2.0",
|
|
5
|
+
"category": "data",
|
|
6
6
|
"description": "Semantic ordered process lists",
|
|
7
7
|
"usage": "`@gridui/steps` renders a passive semantic ordered list. Import `Steps` and `StepsProps` from the package root and load `@gridui/steps/styles.css` after the shared theme. The package has no dependency on Layout, Landing, or Dashboard families.",
|
|
8
8
|
"documentation": [
|
|
@@ -26,9 +26,10 @@
|
|
|
26
26
|
"@gridui/theme/styles.css",
|
|
27
27
|
"@gridui/steps/styles.css"
|
|
28
28
|
],
|
|
29
|
+
"styledImport": "@gridui/steps/styled",
|
|
29
30
|
"examples": [
|
|
30
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
31
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
32
|
-
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
31
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/steps/stories/getting-started.mdx",
|
|
32
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/steps/stories/process.mdx",
|
|
33
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/steps/stories/steps.stories.tsx"
|
|
33
34
|
]
|
|
34
35
|
}
|
package/docs/reference/steps.md
CHANGED
|
@@ -11,9 +11,9 @@ import "@gridui/theme/styles.css";
|
|
|
11
11
|
import "@gridui/steps/styles.css";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
14
|
+
Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/steps/README.md) for shared behavior and stylesheet dependencies.
|
|
15
15
|
|
|
16
|
-
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-
|
|
16
|
+
The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/steps/stories/steps.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
|
|
17
17
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
@@ -61,6 +61,12 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
|
|
|
61
61
|
|
|
62
62
|
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
63
63
|
|
|
64
|
+
### density
|
|
65
|
+
|
|
66
|
+
``Density | undefined`` · Optional
|
|
67
|
+
|
|
68
|
+
Default: ``"comfortable"``
|
|
69
|
+
|
|
64
70
|
### orientation
|
|
65
71
|
|
|
66
72
|
``Responsive<"vertical" | "horizontal"> | undefined`` · Optional
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/steps",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Semantic ordered process lists",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -10,21 +10,26 @@
|
|
|
10
10
|
"docs"
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": [
|
|
13
|
-
"**/*.css"
|
|
13
|
+
"**/*.css",
|
|
14
|
+
"./dist/styled.js"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"import": "./dist/index.js"
|
|
19
20
|
},
|
|
20
|
-
"./styles.css": "./dist/styles.css"
|
|
21
|
+
"./styles.css": "./dist/styles.css",
|
|
22
|
+
"./styled": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/styled.js"
|
|
25
|
+
}
|
|
21
26
|
},
|
|
22
27
|
"publishConfig": {
|
|
23
28
|
"access": "public"
|
|
24
29
|
},
|
|
25
30
|
"dependencies": {
|
|
26
|
-
"@gridui/style-utils": "^4.
|
|
27
|
-
"@gridui/theme": "^
|
|
31
|
+
"@gridui/style-utils": "^4.1.0",
|
|
32
|
+
"@gridui/theme": "^5.0.0"
|
|
28
33
|
},
|
|
29
34
|
"devDependencies": {
|
|
30
35
|
"@gridui-internal/configuration": "0.0.0-internal",
|