@daltonr/pathwrite-react 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/dist/index.css +281 -0
  2. package/package.json +2 -2
package/dist/index.css ADDED
@@ -0,0 +1,281 @@
1
+ /*
2
+ * Pathwrite — Default Shell Stylesheet
3
+ *
4
+ * Optional CSS for the <PathShell> / <pw-shell> default UI components.
5
+ * Import this file if you want sensible out-of-the-box styling.
6
+ * Every visual value is a CSS custom property (--pw-*) so you can
7
+ * theme the shell without overriding selectors.
8
+ *
9
+ * Usage (React / Vue):
10
+ * import "adapter-package/styles.css";
11
+ *
12
+ * Usage (Angular) — add to the styles array in angular.json:
13
+ * "node_modules/@daltonr/pathwrite-angular/dist/index.css"
14
+ */
15
+
16
+ /* ------------------------------------------------------------------ */
17
+ /* Custom property defaults */
18
+ /* ------------------------------------------------------------------ */
19
+ :root {
20
+ /* Layout */
21
+ --pw-shell-max-width: 720px;
22
+ --pw-shell-padding: 24px;
23
+ --pw-shell-gap: 20px;
24
+ --pw-shell-radius: 10px;
25
+
26
+ /* Colours */
27
+ --pw-color-bg: #ffffff;
28
+ --pw-color-border: #dbe4f0;
29
+ --pw-color-text: #1f2937;
30
+ --pw-color-muted: #5b677a;
31
+ --pw-color-primary: #2563eb;
32
+ --pw-color-primary-light: rgba(37, 99, 235, 0.12);
33
+ --pw-color-btn-bg: #f8fbff;
34
+ --pw-color-btn-border: #c2d0e5;
35
+
36
+ /* Progress */
37
+ --pw-dot-size: 32px;
38
+ --pw-dot-font-size: 13px;
39
+ --pw-track-height: 4px;
40
+
41
+ /* Buttons */
42
+ --pw-btn-padding: 8px 16px;
43
+ --pw-btn-radius: 6px;
44
+ }
45
+
46
+ /* ------------------------------------------------------------------ */
47
+ /* Shell root */
48
+ /* ------------------------------------------------------------------ */
49
+ .pw-shell {
50
+ max-width: var(--pw-shell-max-width);
51
+ margin: 0 auto;
52
+ display: flex;
53
+ flex-direction: column;
54
+ gap: var(--pw-shell-gap);
55
+ padding: var(--pw-shell-padding);
56
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
57
+ color: var(--pw-color-text);
58
+ }
59
+
60
+ /* ------------------------------------------------------------------ */
61
+ /* Empty state */
62
+ /* ------------------------------------------------------------------ */
63
+ .pw-shell__empty {
64
+ text-align: center;
65
+ padding: 32px 16px;
66
+ color: var(--pw-color-muted);
67
+ }
68
+
69
+ .pw-shell__start-btn {
70
+ margin-top: 12px;
71
+ border: 1px solid var(--pw-color-btn-border);
72
+ background: var(--pw-color-btn-bg);
73
+ color: var(--pw-color-text);
74
+ padding: var(--pw-btn-padding);
75
+ border-radius: var(--pw-btn-radius);
76
+ cursor: pointer;
77
+ font-size: 14px;
78
+ }
79
+
80
+ /* ------------------------------------------------------------------ */
81
+ /* Header — progress indicator */
82
+ /* ------------------------------------------------------------------ */
83
+ .pw-shell__header {
84
+ background: var(--pw-color-bg);
85
+ border: 1px solid var(--pw-color-border);
86
+ border-radius: var(--pw-shell-radius);
87
+ padding: 20px 24px 16px;
88
+ }
89
+
90
+ .pw-shell__steps {
91
+ display: flex;
92
+ justify-content: space-between;
93
+ margin-bottom: 12px;
94
+ }
95
+
96
+ .pw-shell__step {
97
+ display: flex;
98
+ flex-direction: column;
99
+ align-items: center;
100
+ gap: 6px;
101
+ flex: 1;
102
+ }
103
+
104
+ .pw-shell__step-dot {
105
+ width: var(--pw-dot-size);
106
+ height: var(--pw-dot-size);
107
+ border-radius: 50%;
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: center;
111
+ font-size: var(--pw-dot-font-size);
112
+ font-weight: 600;
113
+ border: 2px solid var(--pw-color-border);
114
+ background: var(--pw-color-bg);
115
+ color: var(--pw-color-muted);
116
+ transition: all 0.25s ease;
117
+ }
118
+
119
+ .pw-shell__step--completed .pw-shell__step-dot {
120
+ background: var(--pw-color-primary);
121
+ border-color: var(--pw-color-primary);
122
+ color: #fff;
123
+ }
124
+
125
+ .pw-shell__step--current .pw-shell__step-dot {
126
+ border-color: var(--pw-color-primary);
127
+ color: var(--pw-color-primary);
128
+ box-shadow: 0 0 0 3px var(--pw-color-primary-light);
129
+ }
130
+
131
+ .pw-shell__step-label {
132
+ font-size: 12px;
133
+ color: var(--pw-color-muted);
134
+ text-align: center;
135
+ white-space: nowrap;
136
+ }
137
+
138
+ .pw-shell__step--current .pw-shell__step-label {
139
+ color: var(--pw-color-primary);
140
+ font-weight: 600;
141
+ }
142
+
143
+ .pw-shell__step--completed .pw-shell__step-label {
144
+ color: var(--pw-color-text);
145
+ }
146
+
147
+ /* Track / fill */
148
+ .pw-shell__track {
149
+ height: var(--pw-track-height);
150
+ background: var(--pw-color-border);
151
+ border-radius: calc(var(--pw-track-height) / 2);
152
+ overflow: hidden;
153
+ }
154
+
155
+ .pw-shell__track-fill {
156
+ height: 100%;
157
+ background: var(--pw-color-primary);
158
+ border-radius: calc(var(--pw-track-height) / 2);
159
+ transition: width 0.3s ease;
160
+ }
161
+
162
+ /* ------------------------------------------------------------------ */
163
+ /* Body — step content */
164
+ /* ------------------------------------------------------------------ */
165
+ .pw-shell__body {
166
+ background: var(--pw-color-bg);
167
+ border: 1px solid var(--pw-color-border);
168
+ border-radius: var(--pw-shell-radius);
169
+ padding: var(--pw-shell-padding);
170
+ min-height: 120px;
171
+ }
172
+
173
+ /* ------------------------------------------------------------------ */
174
+ /* Validation messages */
175
+ /* ------------------------------------------------------------------ */
176
+ :root {
177
+ --pw-color-error: #dc2626;
178
+ --pw-color-error-bg: #fef2f2;
179
+ --pw-color-error-border: #fecaca;
180
+ }
181
+
182
+ .pw-shell__validation {
183
+ list-style: none;
184
+ margin: 0;
185
+ padding: 12px 16px;
186
+ background: var(--pw-color-error-bg);
187
+ border: 1px solid var(--pw-color-error-border);
188
+ border-radius: var(--pw-shell-radius);
189
+ display: flex;
190
+ flex-direction: column;
191
+ gap: 4px;
192
+ }
193
+
194
+ .pw-shell__validation-item {
195
+ font-size: 13px;
196
+ color: var(--pw-color-error);
197
+ padding-left: 16px;
198
+ position: relative;
199
+ }
200
+
201
+ .pw-shell__validation-item::before {
202
+ content: "•";
203
+ position: absolute;
204
+ left: 4px;
205
+ }
206
+
207
+ .pw-shell__validation-label {
208
+ font-weight: 600;
209
+ margin-right: 3px;
210
+ }
211
+
212
+ .pw-shell__validation-label::after {
213
+ content: ":";
214
+ }
215
+
216
+ /* ------------------------------------------------------------------ */
217
+ /* Footer — navigation buttons */
218
+ /* ------------------------------------------------------------------ */
219
+ .pw-shell__footer {
220
+ display: flex;
221
+ justify-content: space-between;
222
+ align-items: center;
223
+ }
224
+
225
+ .pw-shell__footer-left,
226
+ .pw-shell__footer-right {
227
+ display: flex;
228
+ gap: 8px;
229
+ }
230
+
231
+ .pw-shell__btn {
232
+ border: 1px solid var(--pw-color-btn-border);
233
+ background: var(--pw-color-btn-bg);
234
+ color: var(--pw-color-text);
235
+ padding: var(--pw-btn-padding);
236
+ border-radius: var(--pw-btn-radius);
237
+ cursor: pointer;
238
+ font-size: 14px;
239
+ transition: background 0.15s ease, border-color 0.15s ease;
240
+ }
241
+
242
+ .pw-shell__btn:hover:not(:disabled) {
243
+ background: var(--pw-color-border);
244
+ }
245
+
246
+ .pw-shell__btn:disabled {
247
+ opacity: 0.5;
248
+ cursor: not-allowed;
249
+ }
250
+
251
+ .pw-shell__btn--next {
252
+ background: var(--pw-color-primary);
253
+ border-color: var(--pw-color-primary);
254
+ color: #fff;
255
+ }
256
+
257
+ .pw-shell__btn--next:hover:not(:disabled) {
258
+ background: #1d4ed8;
259
+ border-color: #1d4ed8;
260
+ }
261
+
262
+ .pw-shell__btn--back {
263
+ background: transparent;
264
+ border-color: var(--pw-color-primary);
265
+ color: var(--pw-color-primary);
266
+ }
267
+
268
+ .pw-shell__btn--back:hover:not(:disabled) {
269
+ background: var(--pw-color-primary-light);
270
+ }
271
+
272
+ .pw-shell__btn--cancel {
273
+ color: var(--pw-color-muted);
274
+ border-color: transparent;
275
+ background: transparent;
276
+ }
277
+
278
+ .pw-shell__btn--cancel:hover:not(:disabled) {
279
+ background: var(--pw-color-primary-light);
280
+ }
281
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daltonr/pathwrite-react",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "React adapter for @daltonr/pathwrite-core — hooks, context provider, and optional <PathShell> default UI.",
@@ -46,7 +46,7 @@
46
46
  "react": ">=18.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@daltonr/pathwrite-core": "^0.6.0"
49
+ "@daltonr/pathwrite-core": "^0.6.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "react": "^18.3.1",