@crewlethq/ui 0.49.1 → 0.50.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.
Files changed (33) hide show
  1. package/README.md +14 -0
  2. package/dist/ContrastBadge/ContrastBadge.d.ts +25 -3
  3. package/dist/ContrastBadge/index.d.ts +1 -1
  4. package/dist/ContrastBadge/index.js +1 -1
  5. package/dist/EditingStatus/EditingStatus.d.ts +15 -1
  6. package/dist/EditingStatus/index.js +3 -1
  7. package/dist/InlineEditor/index.js +4 -2
  8. package/dist/LogoSlot/index.js +2 -2
  9. package/dist/RichEditor/index.js +1 -1
  10. package/dist/SetupWizard/SetupWizard.d.ts +77 -0
  11. package/dist/SetupWizard/index.d.ts +3 -0
  12. package/dist/SetupWizard/index.js +11 -0
  13. package/dist/SetupWizard-Y5BTXZX5.css +197 -0
  14. package/dist/Stepper/Stepper.d.ts +60 -11
  15. package/dist/Stepper/index.d.ts +1 -1
  16. package/dist/Stepper/index.js +1 -1
  17. package/dist/Stepper-QEJI5RGX.css +355 -0
  18. package/dist/{chunk-ITI2Z44C.js → chunk-BEAXJARF.js} +1 -1
  19. package/dist/{chunk-7PCDKRNB.js → chunk-JWNYI7UD.js} +1 -1
  20. package/dist/chunk-KKHCUHWS.js +107 -0
  21. package/dist/chunk-LDGQIDIZ.js +129 -0
  22. package/dist/{chunk-MULOZYHL.js → chunk-MMOXWAUG.js} +16 -4
  23. package/dist/{chunk-B235ANDO.js → chunk-NSSOWQCJ.js} +20 -5
  24. package/dist/{chunk-7P336RA5.js → chunk-QGRA2RHC.js} +1 -1
  25. package/dist/generated/index.d.ts +1 -0
  26. package/dist/generated/index.js +24 -23
  27. package/dist/index.js +24 -23
  28. package/dist/styles.css +391 -12
  29. package/package.json +3 -3
  30. package/dist/Stepper-HW4JM3YH.css +0 -176
  31. package/dist/chunk-5QWIJSQM.js +0 -73
  32. package/dist/{Editor-ZYDXHGJE.js → Editor-MLGK3KOG.js} +1 -1
  33. /package/dist/{chunk-3WMOEGEL.js → chunk-HNQ2EIMR.js} +0 -0
@@ -1,73 +0,0 @@
1
- import { StatusDot } from './chunk-WIATRXEJ.js';
2
- import { VisuallyHidden } from './chunk-BZFWDIV6.js';
3
- import { cx } from './chunk-ODEQTPFM.js';
4
- import './Stepper-HW4JM3YH.css';
5
- import { CheckGlyph } from '@crewlethq/icons/glyphs';
6
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
-
8
- function Stepper({
9
- steps,
10
- current,
11
- label,
12
- tone = "info",
13
- pulse = false,
14
- doneLabel = "Done",
15
- className,
16
- ...rest
17
- }) {
18
- const seen = /* @__PURE__ */ new Set();
19
- for (const step of steps) {
20
- if (seen.has(step.id)) throw new RangeError(`Stepper step ids must be unique; "${step.id}" is used twice`);
21
- seen.add(step.id);
22
- }
23
- const at = current === null ? steps.length : steps.findIndex((step) => step.id === current);
24
- if (at < 0) {
25
- throw new RangeError(
26
- `Stepper current must be the id of one of its steps, or null once every step is done; "${current}" is not one of ${steps.map((step) => `"${step.id}"`).join(", ")}`
27
- );
28
- }
29
- if (steps.length === 0) return null;
30
- const stateOf = (index) => index < at ? "done" : index === at ? "current" : "later";
31
- return (
32
- /*
33
- * `role="list"` although an `ol` already has one, which is why the lint
34
- * rule that calls it redundant is silenced here rather than obeyed, as
35
- * `Legend` and `DiffList` silence it: the stylesheet takes the markers off,
36
- * and WebKit answers a marker-less list as a group of paragraphs, so a
37
- * reader would no longer be told how many steps there are before hearing
38
- * them. The role puts that back.
39
- */
40
- // eslint-disable-next-line jsx-a11y/no-redundant-roles
41
- /* @__PURE__ */ jsx(
42
- "ol",
43
- {
44
- ...rest,
45
- role: "list",
46
- className: cx("crewlet-stepper", `crewlet-stepper--${tone}`, className),
47
- "aria-label": label,
48
- children: steps.map((step, index) => {
49
- const state = stateOf(index);
50
- return /* @__PURE__ */ jsx(
51
- "li",
52
- {
53
- className: cx("crewlet-stepper__step", `crewlet-stepper__step--${state}`),
54
- "aria-current": state === "current" ? "step" : void 0,
55
- children: /* @__PURE__ */ jsxs("span", { className: "crewlet-stepper__chip", children: [
56
- state === "done" ? /* @__PURE__ */ jsxs(Fragment, { children: [
57
- /* @__PURE__ */ jsx(CheckGlyph, { size: "xs", className: "crewlet-stepper__check" }),
58
- /* @__PURE__ */ jsx(VisuallyHidden, { children: doneLabel }),
59
- " "
60
- ] }) : null,
61
- state === "current" ? /* @__PURE__ */ jsx(StatusDot, { tone, pulse, className: "crewlet-stepper__dot" }) : null,
62
- /* @__PURE__ */ jsx("span", { className: "crewlet-stepper__label", children: step.label })
63
- ] })
64
- },
65
- step.id
66
- );
67
- })
68
- }
69
- )
70
- );
71
- }
72
-
73
- export { Stepper };
@@ -1,5 +1,5 @@
1
- import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
2
1
  import { richEditorLabels } from './chunk-CSQTDGTS.js';
2
+ import { schema, readMarkdown, writeMarkdown } from './chunk-QH6VYJ3X.js';
3
3
  import { safeHref, MARKDOWN_CALLOUT_TONES } from './chunk-BAKPMH3S.js';
4
4
  import { Toolbar } from './chunk-NR4CPM4T.js';
5
5
  import { FormField, Input } from './chunk-EXRRTKWT.js';
File without changes