@gridui/steps 1.0.6 → 2.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  shared theme. The package has no dependency on Layout, Landing, or Dashboard families.
6
6
 
7
7
  ```tsx
8
- <Steps orientation={{ base: "vertical", md: "horizontal" }} connector="line">
8
+ <Steps orientation={{ base: "vertical", sm: "horizontal" }} connector="line">
9
9
  <li>Observe the work.</li>
10
10
  <li>Agree on the scope.</li>
11
11
  <li>Deliver the result.</li>
@@ -13,7 +13,7 @@ shared theme. The package has no dependency on Layout, Landing, or Dashboard fam
13
13
  ```
14
14
 
15
15
  `orientation` accepts `vertical` or `horizontal`, including the existing
16
- `Responsive<T>` shape at GridUI's 40rem and 64rem breakpoints. The default is
16
+ `Responsive<T>` shape at GridUI's 40rem, 48rem, and 64rem breakpoints. The default is
17
17
  vertical. Horizontal lists use equal-width columns; callers choose a responsive
18
18
  vertical layout when content needs more space.
19
19
 
@@ -32,3 +32,5 @@ step, completion state, click handler, or navigation model added by Steps.
32
32
  ## Release history
33
33
 
34
34
  Package-owned records live in [.changeset/history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/steps/.changeset/history).
35
+
36
+ [Component reference](docs/reference/README.md) contains focused API pages for each public component.
package/dist/index.js CHANGED
@@ -19,8 +19,9 @@ var Steps = (props) => {
19
19
  ...restProps,
20
20
  role,
21
21
  type,
22
- className: cn("gridui-steps gridui-u-grid gridui-u-gap-gridui-16 gridui-u-m-0 gridui-u-p-0 gridui-u-text-muted", className),
22
+ className: cn("gridui-steps gridui-u-steps--grid gridui-u-steps--gap-gridui-16 gridui-u-steps--m-0 gridui-u-steps--p-0 gridui-u-steps--text-muted", className),
23
23
  "data-orientation": directions.base,
24
+ "data-orientation-sm": directions.sm,
24
25
  "data-orientation-md": directions.md,
25
26
  "data-orientation-lg": directions.lg,
26
27
  "data-marker": marker ?? (type ? "native" : "decimal-leading-zero"),
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-grid gridui-u-gap-gridui-16 gridui-u-m-0 gridui-u-p-0 gridui-u-text-muted\", className)}\n data-orientation={directions.base}\n data-orientation-md={directions.md}\n data-orientation-lg={directions.lg}\n data-marker={marker ?? (type ? \"native\" : \"decimal-leading-zero\")}\n data-connector={connector}\n />);\n};\n"],
5
- "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,yBAA0C;AAavC;AAJL,IAAM,QAAwB,CAAC,UAAsB;AACxD,QAAM;AAAA,IAAE,cAAc;AAAA,IAAY;AAAA,IAAQ,YAAY;AAAA,IAAQ;AAAA,IAC1D;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,mGAAmG,SAAS;AAAA,MAC1H,oBAAkB,WAAW;AAAA,MAC7B,uBAAqB,WAAW;AAAA,MAChC,uBAAqB,WAAW;AAAA,MAChC,eAAa,WAAW,OAAO,WAAW;AAAA,MAC1C,kBAAgB;AAAA;AAAA,EACpB;AACJ;",
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-16 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-connector={connector}\n />);\n};\n"],
5
+ "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,yBAA0C;AAavC;AAJL,IAAM,QAAwB,CAAC,UAAsB;AACxD,QAAM;AAAA,IAAE,cAAc;AAAA,IAAY;AAAA,IAAQ,YAAY;AAAA,IAAQ;AAAA,IAC1D;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,sIAAsI,SAAS;AAAA,MAC7J,oBAAkB,WAAW;AAAA,MAC7B,uBAAqB,WAAW;AAAA,MAChC,uBAAqB,WAAW;AAAA,MAChC,uBAAqB,WAAW;AAAA,MAChC,eAAa,WAAW,OAAO,WAAW;AAAA,MAC1C,kBAAgB;AAAA;AAAA,EACpB;AACJ;",
6
6
  "names": []
7
7
  }
package/dist/styles.css CHANGED
@@ -1,19 +1,19 @@
1
- /*! tailwindcss v4.3.4 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
2
  @layer theme, base, components, utilities;
3
3
  @layer utilities {
4
- .gridui-u-m-0 {
4
+ .gridui-u-steps--m-0 {
5
5
  margin: 0px;
6
6
  }
7
- .gridui-u-grid {
7
+ .gridui-u-steps--grid {
8
8
  display: grid;
9
9
  }
10
- .gridui-u-gap-gridui-16 {
10
+ .gridui-u-steps--gap-gridui-16 {
11
11
  gap: var(--gridui-space-16);
12
12
  }
13
- .gridui-u-p-0 {
13
+ .gridui-u-steps--p-0 {
14
14
  padding: 0px;
15
15
  }
16
- .gridui-u-text-muted {
16
+ .gridui-u-steps--text-muted {
17
17
  color: var(--gridui-muted);
18
18
  }
19
19
  }
@@ -100,6 +100,32 @@
100
100
  --gridui-steps-line-height: 1px;
101
101
  }
102
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-space-8));
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-space-16));
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) {
103
129
  .gridui-steps[data-orientation-md="vertical"] {
104
130
  --gridui-steps-flow: row;
105
131
  --gridui-steps-columns: auto;
package/docs/catalog.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/steps",
4
- "version": "1.0.6",
4
+ "version": "2.0.0",
5
5
  "category": "core",
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": [
9
- "README.md"
9
+ "README.md",
10
+ "docs/reference/README.md",
11
+ "docs/reference/steps.md"
10
12
  ],
11
13
  "exports": [
12
14
  {
@@ -25,6 +27,7 @@
25
27
  "@gridui/steps/styles.css"
26
28
  ],
27
29
  "examples": [
30
+ "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/steps/stories/process.mdx",
28
31
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/steps/stories/steps.stories.tsx"
29
32
  ]
30
33
  }
@@ -0,0 +1,4 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [Steps](steps.md)
@@ -0,0 +1,79 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # Steps
3
+
4
+ Shows the stages of a process and their current status. Use it to communicate progress through a multi-step workflow.
5
+
6
+ Import from ``@gridui/steps`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { Steps } from "@gridui/steps";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/steps/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/steps/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/steps/stories/steps.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
+
18
+ ## API
19
+
20
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
+
22
+ ### role
23
+
24
+ ``AriaRole | undefined`` · Optional
25
+
26
+ Default: ``"list"``
27
+
28
+ ### children
29
+
30
+ ``ReactNode`` · Optional
31
+
32
+ Content rendered inside the component.
33
+
34
+ ### onFocus
35
+
36
+ ``(event: FocusEvent<HTMLOListElement, Element>): void`` · Optional
37
+
38
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
39
+
40
+ ### onBlur
41
+
42
+ ``(event: FocusEvent<HTMLOListElement, Element>): void`` · Optional
43
+
44
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
45
+
46
+ ### onChange
47
+
48
+ ``(event: ChangeEvent<HTMLOListElement, Element>): void`` · Optional
49
+
50
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
51
+
52
+ ### onSubmit
53
+
54
+ ``(event: SubmitEvent<HTMLOListElement>): void`` · Optional
55
+
56
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
57
+
58
+ ### onClick
59
+
60
+ ``(event: MouseEvent<HTMLOListElement, MouseEvent>): void`` · Optional
61
+
62
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
63
+
64
+ ### orientation
65
+
66
+ ``Responsive<"vertical" | "horizontal"> | undefined`` · Optional
67
+
68
+ Default: ``"vertical"``
69
+
70
+ ### marker
71
+
72
+ ``"none" | "decimal" | "decimal-leading-zero" | undefined`` · Optional
73
+
74
+ ### connector
75
+
76
+ ``"line" | "none" | undefined`` · Optional
77
+
78
+ Default: ``"none"``
79
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/steps",
3
- "version": "1.0.6",
3
+ "version": "2.0.0",
4
4
  "description": "Semantic ordered process lists",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "access": "public"
24
24
  },
25
25
  "dependencies": {
26
- "@gridui/style-utils": "^2.2.2",
26
+ "@gridui/style-utils": "^4.0.0",
27
27
  "@gridui/theme": "^2.5.3"
28
28
  },
29
29
  "devDependencies": {