@crewlethq/ui 0.15.1 → 0.17.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 (111) hide show
  1. package/README.md +36 -6
  2. package/dist/AppShell/AccountRow.d.ts +40 -0
  3. package/dist/AppShell/AppShell.d.ts +1 -0
  4. package/dist/AppShell/index.d.ts +2 -0
  5. package/dist/AppShell/index.js +1 -1
  6. package/dist/{AppShell-6QUD7NWM.css → AppShell-RUNVM4WH.css} +93 -0
  7. package/dist/AuthLayout/AuthLayout.d.ts +35 -0
  8. package/dist/AuthLayout/index.d.ts +3 -0
  9. package/dist/AuthLayout/index.js +8 -0
  10. package/dist/AuthLayout-ODHBUPHQ.css +54 -0
  11. package/dist/Avatar/Avatar.d.ts +37 -2
  12. package/dist/Avatar/index.d.ts +1 -1
  13. package/dist/Avatar/index.js +2 -2
  14. package/dist/{Avatar-I4NFP3WQ.css → Avatar-3C2H2WA4.css} +34 -0
  15. package/dist/AvatarPicker/index.js +4 -4
  16. package/dist/Callout/Callout.d.ts +7 -1
  17. package/dist/Callout/index.js +1 -1
  18. package/dist/{Callout-S7QDWHDL.css → Callout-SXXK4B5R.css} +3 -1
  19. package/dist/CharacterPicker/index.js +2 -2
  20. package/dist/Checkbox/CheckboxGroup.d.ts +30 -0
  21. package/dist/Checkbox/index.d.ts +2 -0
  22. package/dist/Checkbox/index.js +5 -1
  23. package/dist/{Checkbox-UE7TEPAM.css → Checkbox-KT7RS6QQ.css} +16 -0
  24. package/dist/CodeBlock/index.js +4 -3
  25. package/dist/Combobox/index.js +3 -3
  26. package/dist/CommandPalette/index.js +5 -5
  27. package/dist/Composer/index.js +3 -3
  28. package/dist/ConfirmField/ConfirmField.d.ts +43 -0
  29. package/dist/ConfirmField/index.d.ts +2 -0
  30. package/dist/ConfirmField/index.js +7 -0
  31. package/dist/Copyable/CopyButton.d.ts +13 -6
  32. package/dist/Copyable/index.js +3 -2
  33. package/dist/DataTable/index.js +7 -5
  34. package/dist/DataView/index.js +12 -11
  35. package/dist/DateTimePicker/index.js +2 -2
  36. package/dist/DownloadButton/DownloadButton.d.ts +52 -0
  37. package/dist/DownloadButton/index.d.ts +2 -0
  38. package/dist/DownloadButton/index.js +6 -0
  39. package/dist/EntityChip/index.js +3 -3
  40. package/dist/ImageUpload/index.js +3 -3
  41. package/dist/InlineCode/InlineCode.d.ts +8 -1
  42. package/dist/InlineCode/index.js +1 -1
  43. package/dist/{InlineCode-6WSR5COL.css → InlineCode-ASYHLN3E.css} +9 -0
  44. package/dist/Input/index.js +2 -2
  45. package/dist/{Input-RAKNQJCV.css → Input-3KVSNUO5.css} +11 -0
  46. package/dist/ListInput/index.js +3 -3
  47. package/dist/MarkdownEditor/index.js +1 -1
  48. package/dist/Modal/index.js +2 -2
  49. package/dist/ObjectHeader/ObjectHeader.d.ts +138 -0
  50. package/dist/ObjectHeader/index.d.ts +3 -0
  51. package/dist/ObjectHeader/index.js +4 -0
  52. package/dist/ObjectHeader-UNVYM2KD.css +174 -0
  53. package/dist/OrgLabel/index.js +3 -3
  54. package/dist/OrgNode/index.js +4 -4
  55. package/dist/OrgTable/index.js +4 -4
  56. package/dist/QrCode/QrCode.d.ts +58 -0
  57. package/dist/QrCode/index.d.ts +3 -0
  58. package/dist/QrCode/index.js +2 -0
  59. package/dist/QrCode-JWJTWMU5.css +19 -0
  60. package/dist/Switcher/index.js +4 -4
  61. package/dist/Text/Text.d.ts +7 -1
  62. package/dist/Text/index.js +1 -1
  63. package/dist/{Text-XIPYYZX2.css → Text-S3Q4O3IG.css} +11 -0
  64. package/dist/TimeWindowPicker/index.js +4 -4
  65. package/dist/{chunk-FTEJPHBI.js → chunk-4GB57WIT.js} +2 -2
  66. package/dist/{chunk-DDTDN5L2.js → chunk-4KWOKX2B.js} +1 -1
  67. package/dist/{chunk-NN62JQLR.js → chunk-5CLW2CXT.js} +3 -1
  68. package/dist/{chunk-HI6Q2UXQ.js → chunk-5OM447RW.js} +19 -7
  69. package/dist/{chunk-YXMCUKFI.js → chunk-5PSXBL73.js} +1 -1
  70. package/dist/{chunk-QSLIN64M.js → chunk-6NIMZ5XC.js} +1 -1
  71. package/dist/{chunk-YCTMKKRA.js → chunk-75CLJNDQ.js} +12 -2
  72. package/dist/chunk-7QFAORCY.js +37 -0
  73. package/dist/{chunk-22M7OXKW.js → chunk-AKEZ3G5V.js} +1 -1
  74. package/dist/chunk-BJCFNRGH.js +53 -0
  75. package/dist/chunk-CXBAIVYZ.js +39 -0
  76. package/dist/chunk-DTIW4CHZ.js +37 -0
  77. package/dist/chunk-F6NZOVWL.js +68 -0
  78. package/dist/{chunk-LCF4WPYS.js → chunk-FA2V2VT6.js} +2 -2
  79. package/dist/{chunk-KGTQ5CVD.js → chunk-GDDE4UM7.js} +1 -1
  80. package/dist/{chunk-EFNHOVC2.js → chunk-HENOTGUV.js} +2 -2
  81. package/dist/chunk-I7WXZOWA.js +90 -0
  82. package/dist/{chunk-23DHIMJA.js → chunk-IKBK4A5O.js} +1 -1
  83. package/dist/{chunk-DY77H372.js → chunk-JF7X673Z.js} +2 -2
  84. package/dist/{chunk-YYBD73OI.js → chunk-L4ZLXYPO.js} +1 -1
  85. package/dist/{chunk-H3XOMT7W.js → chunk-OYOQU7O5.js} +44 -3
  86. package/dist/{chunk-IYZZL3MZ.js → chunk-PQ63NLFC.js} +3 -3
  87. package/dist/{chunk-TK6YC5QT.js → chunk-RF5O4FYL.js} +4 -4
  88. package/dist/{chunk-5VNUYO76.js → chunk-STJ7QBC3.js} +8 -25
  89. package/dist/{chunk-R6FBDTP3.js → chunk-SVSCLHHI.js} +1 -1
  90. package/dist/{chunk-GARACZAH.js → chunk-T3ZWBZ65.js} +1 -1
  91. package/dist/{chunk-FY2R4U4Q.js → chunk-TBMDMXEX.js} +1 -1
  92. package/dist/{chunk-ZPWUVVIB.js → chunk-UAN5NE7M.js} +2 -2
  93. package/dist/{chunk-YACKC3K2.js → chunk-W46LPU4R.js} +8 -8
  94. package/dist/{chunk-4EOJR52M.js → chunk-XU4H6JQB.js} +4 -4
  95. package/dist/chunk-Y56FM3K4.js +57 -0
  96. package/dist/{chunk-DJMLHCLD.js → chunk-YDBC4DNW.js} +1 -1
  97. package/dist/{chunk-4Y7WKXAW.js → chunk-ZFH7H7GS.js} +1 -1
  98. package/dist/generated/index.d.ts +5 -0
  99. package/dist/generated/index.js +67 -60
  100. package/dist/index.js +67 -60
  101. package/dist/styles.css +440 -8
  102. package/dist/utils/index.d.ts +4 -0
  103. package/dist/utils/index.js +4 -2
  104. package/dist/utils/useClipboard.d.ts +6 -3
  105. package/dist/utils/useDownload.d.ts +63 -0
  106. package/dist/utils/useOutcome.d.ts +44 -0
  107. package/package.json +4 -3
  108. package/dist/{chunk-GUHP5JHC.js → chunk-2UU5IGZI.js} +1 -1
  109. package/dist/{chunk-6AR2T5Y4.js → chunk-CRVETI5L.js} +0 -0
  110. package/dist/{chunk-K4VORB64.js → chunk-DEEVA6TV.js} +1 -1
  111. /package/dist/{chunk-AER7UDD4.js → chunk-U5LQ2AS5.js} +0 -0
@@ -0,0 +1,43 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Whether what was typed confirms the phrase: the phrase exactly, with the
4
+ * whitespace a paste carries at either end ignored.
5
+ *
6
+ * EXACT, CASE INCLUDED. The phrase is a login or a name the gesture removes,
7
+ * and a confirmation that accepted a near miss would confirm a different
8
+ * value than the one shown.
9
+ */
10
+ export declare function confirmMatches(typed: string, phrase: string): boolean;
11
+ export interface ConfirmFieldProps {
12
+ /** What the reader types back: a login, a name, a key. */
13
+ phrase: string;
14
+ /** What has been typed so far. */
15
+ value: string;
16
+ onValueChange: (next: string) => void;
17
+ /**
18
+ * The label, built around the phrase. The phrase arrives already drawn as
19
+ * inline code, which keeps its own case inside the label's capitals.
20
+ * Defaults to "Type {phrase} to confirm".
21
+ */
22
+ label?: ((phrase: ReactNode) => ReactNode) | undefined;
23
+ /** A sentence under the field, such as what happens once it matches. */
24
+ helper?: ReactNode;
25
+ /** Takes focus when it appears, which is right inside a dialog opened for it. */
26
+ autoFocus?: boolean | undefined;
27
+ className?: string | undefined;
28
+ }
29
+ /**
30
+ * Type a value back to confirm a gesture that cannot be undone.
31
+ *
32
+ * A FORM FIELD LIKE EVERY OTHER, with the spacing and the label register of
33
+ * the fields around it. The phrase inside the label is inline code, and inline
34
+ * code in a label keeps its case: set in the label's capitals, a login such as
35
+ * `jane.founder` read as JANE.FOUNDER, and typing that kept the confirm button
36
+ * disabled with no word why.
37
+ *
38
+ * Spelling checks and autocorrection are off, because the value is a literal
39
+ * the reader copies character by character, and a corrected one is a
40
+ * different value. Pair it with [confirmMatches], which is what decides
41
+ * whether the gesture may go ahead.
42
+ */
43
+ export declare function ConfirmField({ phrase, value, onValueChange, label, helper, autoFocus, className, }: ConfirmFieldProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ConfirmField, confirmMatches } from './ConfirmField.js';
2
+ export type { ConfirmFieldProps } from './ConfirmField.js';
@@ -0,0 +1,7 @@
1
+ export { ConfirmField, confirmMatches } from '../chunk-CXBAIVYZ.js';
2
+ import '../chunk-5CLW2CXT.js';
3
+ import '../chunk-4GB57WIT.js';
4
+ import '../chunk-4FQT6ZAY.js';
5
+ import '../chunk-PQADV6P6.js';
6
+ import '../chunk-BZFWDIV6.js';
7
+ import '../chunk-ODEQTPFM.js';
@@ -7,6 +7,12 @@ export interface CopyStatusProps {
7
7
  state: ClipboardState;
8
8
  copiedMessage: string;
9
9
  failedMessage: string;
10
+ /**
11
+ * How many attempts have settled ([Clipboard.attempt]). The message is
12
+ * keyed on it, so it is REPLACED on every attempt and an identical outcome
13
+ * twice running is still a change the region announces.
14
+ */
15
+ attempt?: number | undefined;
10
16
  }
11
17
  /**
12
18
  * What the copy did, said out loud.
@@ -16,7 +22,7 @@ export interface CopyStatusProps {
16
22
  * "Copied copied to the clipboard", the status text becoming part of what the
17
23
  * button claimed to be.
18
24
  */
19
- export declare function CopyStatus({ state, copiedMessage, failedMessage }: CopyStatusProps): import("react").JSX.Element;
25
+ export declare function CopyStatus({ state, copiedMessage, failedMessage, attempt }: CopyStatusProps): import("react").JSX.Element;
20
26
  export interface CopyButtonProps {
21
27
  /**
22
28
  * The text, or a THUNK that produces it.
@@ -44,11 +50,12 @@ export interface CopyButtonProps {
44
50
  /** How long `copiedLabel` stands before the control offers its action again. */
45
51
  resetMs?: number | undefined;
46
52
  /**
47
- * How long `failedLabel` stands. Unset it is `resetMs`; `null` holds it
48
- * until the next press. See [ClipboardOptions.failedResetMs] for why a
49
- * refusal wants a clock of its own — and note the cost of `null`, which is
50
- * that the control's accessible name stays "Copy failed" and so names a
51
- * status rather than the action it still performs.
53
+ * How long `failedLabel` stands. `null`, the default, holds it until the
54
+ * next press; a number gives it a clock of its own. See
55
+ * [ClipboardOptions.failedResetMs] for why a refusal wants one: a control
56
+ * that has gone back to offering its action is indistinguishable from one
57
+ * nobody pressed. The cost of holding is that the control's accessible name
58
+ * stays "Copy failed", so the reason is also its `title`.
52
59
  */
53
60
  failedResetMs?: number | null | undefined;
54
61
  className?: string | undefined;
@@ -1,5 +1,6 @@
1
- export { CopyButton, Copyable } from '../chunk-YACKC3K2.js';
2
- import '../chunk-5VNUYO76.js';
1
+ export { CopyButton, Copyable } from '../chunk-W46LPU4R.js';
2
+ import '../chunk-STJ7QBC3.js';
3
+ import '../chunk-DTIW4CHZ.js';
3
4
  import '../chunk-OG6CL3EB.js';
4
5
  import '../chunk-4FQT6ZAY.js';
5
6
  import '../chunk-BZFWDIV6.js';
@@ -1,13 +1,15 @@
1
- export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-TK6YC5QT.js';
1
+ export { ALL_ITEMS, CopyableCell, DATA_TABLE_LABELS, DataTable, RowActionsMenu } from '../chunk-RF5O4FYL.js';
2
2
  import '../chunk-NS7BVLL3.js';
3
3
  import '../chunk-EUCC37WY.js';
4
- import '../chunk-YCTMKKRA.js';
5
- import '../chunk-5VNUYO76.js';
6
- import '../chunk-K4VORB64.js';
4
+ import '../chunk-75CLJNDQ.js';
5
+ import '../chunk-STJ7QBC3.js';
6
+ import '../chunk-DTIW4CHZ.js';
7
+ import '../chunk-DEEVA6TV.js';
8
+ import '../chunk-4GB57WIT.js';
7
9
  import '../chunk-OG6CL3EB.js';
10
+ import '../chunk-4FQT6ZAY.js';
8
11
  import '../chunk-AV2DXAEL.js';
9
12
  import '../chunk-PQADV6P6.js';
10
- import '../chunk-4FQT6ZAY.js';
11
13
  import '../chunk-HMPFGIWM.js';
12
14
  import '../chunk-R25RGPUB.js';
13
15
  import '../chunk-BZFWDIV6.js';
@@ -1,25 +1,26 @@
1
- export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-4EOJR52M.js';
2
- import '../chunk-HOXGBLEY.js';
1
+ export { DATA_VIEW_TOOLBAR_LABELS, DataView, DataViewToolbar, FILTER_AXIS_LABELS, FilterAxisBar, FilterAxisChip, applyColumnFilters, applyFilters, blankFilterValue, defaultOperator, filterDefsFromColumns, filterHasValue, filterPredicate, formatFilterValue, operatorOf, tableColumns } from '../chunk-XU4H6JQB.js';
3
2
  import '../chunk-3CZ7XAVY.js';
3
+ import '../chunk-HOXGBLEY.js';
4
4
  import '../chunk-PGRPNDWM.js';
5
- import '../chunk-TK6YC5QT.js';
5
+ import '../chunk-RF5O4FYL.js';
6
6
  import '../chunk-NS7BVLL3.js';
7
7
  import '../chunk-EUCC37WY.js';
8
- import '../chunk-GUHP5JHC.js';
9
- import '../chunk-YCTMKKRA.js';
10
- import '../chunk-5VNUYO76.js';
11
- import '../chunk-K4VORB64.js';
8
+ import '../chunk-2UU5IGZI.js';
9
+ import '../chunk-75CLJNDQ.js';
10
+ import '../chunk-STJ7QBC3.js';
11
+ import '../chunk-DTIW4CHZ.js';
12
+ import '../chunk-DEEVA6TV.js';
12
13
  import '../chunk-F73MC7EZ.js';
13
14
  import '../chunk-SMBKXWML.js';
14
- import '../chunk-FTEJPHBI.js';
15
- import '../chunk-OG6CL3EB.js';
15
+ import '../chunk-4GB57WIT.js';
16
16
  import '../chunk-GXQ3B46I.js';
17
+ import '../chunk-OG6CL3EB.js';
18
+ import '../chunk-4FQT6ZAY.js';
17
19
  import '../chunk-AV2DXAEL.js';
18
20
  import '../chunk-PQADV6P6.js';
19
- import '../chunk-4FQT6ZAY.js';
20
21
  import '../chunk-BWRGFKJP.js';
21
- import '../chunk-BHHIIK3M.js';
22
22
  import '../chunk-HMPFGIWM.js';
23
23
  import '../chunk-R25RGPUB.js';
24
+ import '../chunk-BHHIIK3M.js';
24
25
  import '../chunk-BZFWDIV6.js';
25
26
  import '../chunk-ODEQTPFM.js';
@@ -1,6 +1,6 @@
1
- export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-GUHP5JHC.js';
2
- import '../chunk-OG6CL3EB.js';
1
+ export { DEFAULT_DATE_TIME_PICKER_LABELS, DateTimePicker } from '../chunk-2UU5IGZI.js';
3
2
  import '../chunk-GXQ3B46I.js';
3
+ import '../chunk-OG6CL3EB.js';
4
4
  import '../chunk-4FQT6ZAY.js';
5
5
  import '../chunk-BWRGFKJP.js';
6
6
  import '../chunk-HMPFGIWM.js';
@@ -0,0 +1,52 @@
1
+ import { type ButtonSize, type ButtonVariant } from '../Button/index.js';
2
+ export interface DownloadButtonProps {
3
+ /** The text, or a thunk that produces it, resolved on the press. See [CopyButtonProps.text]. */
4
+ text: string | (() => string);
5
+ /** The name to offer it under. Sanitised by [safeFilename]. */
6
+ filename: string;
7
+ /** The type the file is offered as. Defaults to plain text in UTF-8. */
8
+ mime?: string | undefined;
9
+ /** The label at rest. */
10
+ label?: string | undefined;
11
+ /**
12
+ * The label once the browser took the download. It says STARTED, not saved:
13
+ * an `<a download>` has no completion event, so a saved file is a claim
14
+ * nothing here can check.
15
+ */
16
+ startedLabel?: string | undefined;
17
+ /** The label when the browser refused. */
18
+ failedLabel?: string | undefined;
19
+ /** Read out once the download starts. Defaults to "download started: {name}". */
20
+ startedMessage?: string | undefined;
21
+ /** Read out on failure, and the control's `title` while it stands. */
22
+ failedMessage?: string | undefined;
23
+ size?: ButtonSize | undefined;
24
+ variant?: ButtonVariant | undefined;
25
+ title?: string | undefined;
26
+ /**
27
+ * Nothing to offer yet, such as an export of an empty table. Give a `title`
28
+ * that says why, so the control is never a dead button with no reason.
29
+ */
30
+ disabled?: boolean | undefined;
31
+ /** How long `startedLabel` stands before the control offers its action again. */
32
+ resetMs?: number | undefined;
33
+ /** How long `failedLabel` stands. `null`, the default, holds it until the next press. */
34
+ failedResetMs?: number | null | undefined;
35
+ className?: string | undefined;
36
+ }
37
+ /**
38
+ * Hand text to the reader as a file, and SAY WHETHER IT LANDED.
39
+ *
40
+ * The sibling of [CopyButton], over the same text and on the same state
41
+ * machine, because the two sit side by side ("Copy all", "Download") and any
42
+ * difference in how long a confirmation holds is a visible inconsistency. A
43
+ * clipboard also holds exactly one thing, so a reader keeping two exports
44
+ * side by side needs a file.
45
+ *
46
+ * WHAT IT SAYS IS WHAT WAS OBSERVED. The name the file was offered under is
47
+ * the half that is true and worth saying, because a reader who cannot see the
48
+ * browser's download shelf has nothing else to tell them what to open. A
49
+ * refusal holds until the next press, and every attempt replaces the status
50
+ * message, so a second identical refusal is still announced.
51
+ */
52
+ export declare function DownloadButton({ text, filename, mime, label, startedLabel, failedLabel, startedMessage, failedMessage, size, variant, title, disabled, resetMs, failedResetMs, className, }: DownloadButtonProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DownloadButton } from './DownloadButton.js';
2
+ export type { DownloadButtonProps } from './DownloadButton.js';
@@ -0,0 +1,6 @@
1
+ export { DownloadButton } from '../chunk-BJCFNRGH.js';
2
+ import '../chunk-F6NZOVWL.js';
3
+ import '../chunk-DTIW4CHZ.js';
4
+ import '../chunk-OG6CL3EB.js';
5
+ import '../chunk-BZFWDIV6.js';
6
+ import '../chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- export { EntityChip } from '../chunk-DDTDN5L2.js';
2
- import '../chunk-ZPWUVVIB.js';
3
- import '../chunk-HI6Q2UXQ.js';
1
+ export { EntityChip } from '../chunk-4KWOKX2B.js';
2
+ import '../chunk-UAN5NE7M.js';
3
+ import '../chunk-5OM447RW.js';
4
4
  import '../chunk-ODEQTPFM.js';
@@ -1,4 +1,4 @@
1
- export { ImageUpload } from '../chunk-DJMLHCLD.js';
2
- import '../chunk-ZPWUVVIB.js';
3
- import '../chunk-HI6Q2UXQ.js';
1
+ export { ImageUpload } from '../chunk-YDBC4DNW.js';
2
+ import '../chunk-UAN5NE7M.js';
3
+ import '../chunk-5OM447RW.js';
4
4
  import '../chunk-ODEQTPFM.js';
@@ -22,6 +22,13 @@ export interface InlineCodeProps extends HTMLAttributes<HTMLElement> {
22
22
  tone?: InlineCodeTone | undefined;
23
23
  /** One line, cut with an ellipsis, for a chip inside a dense row. */
24
24
  truncate?: boolean | undefined;
25
+ /**
26
+ * Never broken across lines: a short token a reader reads as one (a cron
27
+ * expression, an event type, a version). The chip moves to the next line
28
+ * whole rather than splitting. Leave it off for a URL or a path, which has
29
+ * to wrap or it tears the sentence around it apart.
30
+ */
31
+ whole?: boolean | undefined;
25
32
  }
26
33
  /**
27
34
  * One identifier inside a sentence.
@@ -34,4 +41,4 @@ export interface InlineCodeProps extends HTMLAttributes<HTMLElement> {
34
41
  *
35
42
  * For a block of code, several lines of it, use `CodeBlock`.
36
43
  */
37
- export declare function InlineCode({ variant, tone, truncate, className, children, ...rest }: InlineCodeProps): import("react").JSX.Element;
44
+ export declare function InlineCode({ variant, tone, truncate, whole, className, children, ...rest }: InlineCodeProps): import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- export { InlineCode } from '../chunk-NN62JQLR.js';
1
+ export { InlineCode } from '../chunk-5CLW2CXT.js';
2
2
  import '../chunk-ODEQTPFM.js';
@@ -55,6 +55,15 @@
55
55
  color: inherit;
56
56
  }
57
57
 
58
+ /*
59
+ * A short token read as one: it moves to the next line whole rather than
60
+ * splitting, which `overflow-wrap: anywhere` would otherwise allow.
61
+ */
62
+ .crewlet-inline-code--whole {
63
+ overflow-wrap: normal;
64
+ white-space: nowrap;
65
+ }
66
+
58
67
  .crewlet-inline-code--truncate {
59
68
  display: inline-block;
60
69
  max-width: 100%;
@@ -1,5 +1,5 @@
1
- export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea } from '../chunk-FTEJPHBI.js';
2
- import '../chunk-PQADV6P6.js';
1
+ export { FormField, FormRow, FormSection, Input, InputAffix, Label, ReadOnlyField, Textarea } from '../chunk-4GB57WIT.js';
3
2
  import '../chunk-4FQT6ZAY.js';
3
+ import '../chunk-PQADV6P6.js';
4
4
  import '../chunk-BZFWDIV6.js';
5
5
  import '../chunk-ODEQTPFM.js';
@@ -435,6 +435,17 @@
435
435
  color: var(--color-text-tertiary);
436
436
  }
437
437
 
438
+ /*
439
+ * A LITERAL INSIDE A LABEL KEEPS ITS CASE. The label is set in capitals, and
440
+ * a value a reader has to type back exactly ("Type jane.founder to confirm")
441
+ * read as JANE.FOUNDER, which is not what the field accepts.
442
+ */
443
+ .crewlet-label code,
444
+ .crewlet-label__text code {
445
+ text-transform: none;
446
+ letter-spacing: normal;
447
+ }
448
+
438
449
  .crewlet-label--with-action {
439
450
  display: flex;
440
451
  justify-content: space-between;
@@ -1,9 +1,9 @@
1
- export { ListInput } from '../chunk-GARACZAH.js';
1
+ export { ListInput } from '../chunk-T3ZWBZ65.js';
2
2
  import '../chunk-SMBKXWML.js';
3
- import '../chunk-FTEJPHBI.js';
4
- import '../chunk-PQADV6P6.js';
3
+ import '../chunk-4GB57WIT.js';
5
4
  import '../chunk-RSAQOKH3.js';
6
5
  import '../chunk-4FQT6ZAY.js';
6
+ import '../chunk-PQADV6P6.js';
7
7
  import '../chunk-HMPFGIWM.js';
8
8
  import '../chunk-R25RGPUB.js';
9
9
  import '../chunk-BZFWDIV6.js';
@@ -5,8 +5,8 @@ import '../chunk-4FQT6ZAY.js';
5
5
  import '../chunk-26PEPONN.js';
6
6
  import '../chunk-4LDTQWS7.js';
7
7
  import '../chunk-CBOICT64.js';
8
- import '../chunk-BHHIIK3M.js';
9
8
  import '../chunk-HMPFGIWM.js';
10
9
  import '../chunk-R25RGPUB.js';
10
+ import '../chunk-BHHIIK3M.js';
11
11
  import '../chunk-BZFWDIV6.js';
12
12
  import '../chunk-ODEQTPFM.js';
@@ -1,7 +1,7 @@
1
- export { ConfirmModal, Modal } from '../chunk-K4VORB64.js';
1
+ export { ConfirmModal, Modal } from '../chunk-DEEVA6TV.js';
2
2
  import '../chunk-OG6CL3EB.js';
3
- import '../chunk-PQADV6P6.js';
4
3
  import '../chunk-4FQT6ZAY.js';
4
+ import '../chunk-PQADV6P6.js';
5
5
  import '../chunk-HMPFGIWM.js';
6
6
  import '../chunk-R25RGPUB.js';
7
7
  import '../chunk-BZFWDIV6.js';
@@ -0,0 +1,138 @@
1
+ import type { ReactNode } from 'react';
2
+ /** Who last changed a value, and where. */
3
+ export interface SetBy {
4
+ /** Who changed it: a seat, a person, the operator. */
5
+ actor: string;
6
+ /** When, already said as a relative time ("2h ago"); the caller formats it. */
7
+ ago?: string | undefined;
8
+ /** The page of the turn that changed it. Drawn as "turn" with an outward arrow. */
9
+ turnHref?: string | undefined;
10
+ /**
11
+ * The change EMPTIED the field rather than filling it. "Nobody set a due
12
+ * date" and "ada took the due date off" are different facts about the same
13
+ * blank cell, and only the second is something a change log witnessed.
14
+ */
15
+ cleared?: boolean | undefined;
16
+ }
17
+ export interface SetByLineProps {
18
+ setBy: SetBy;
19
+ /**
20
+ * The properties this one line covers, when it covers more than its own: a
21
+ * create sets several fields at once, and identical by-lines under each of
22
+ * them are one sentence copied out several times.
23
+ */
24
+ fields?: readonly string[] | undefined;
25
+ /** The word the turn link is drawn with. */
26
+ turnLabel?: string | undefined;
27
+ className?: string | undefined;
28
+ }
29
+ /**
30
+ * Who set a value, in the one wording the whole product uses: "set by ada ·
31
+ * 2h ago · turn", the last word a link to the turn that did it.
32
+ *
33
+ * ONE WORDING. A header's fact line and a properties rail beside it state the
34
+ * same provenance, and phrased two ways on one screen a bare handle under a
35
+ * value reads as who wrote the row rather than who set the field.
36
+ *
37
+ * THE TURN LINK IS ONE TOKEN: the word and its arrow are one atomic box, so
38
+ * the arrow never lands on a line of its own.
39
+ */
40
+ export declare function SetByLine({ setBy, fields, turnLabel, className }: SetByLineProps): import("react").JSX.Element;
41
+ /** One fact about an object, in its header's fact line. */
42
+ export interface ObjectFact {
43
+ label: string;
44
+ /** The value. A fact with no value (null, undefined or "") is not drawn at all. */
45
+ value: ReactNode;
46
+ /** A page the value links to. */
47
+ href?: string | undefined;
48
+ /** Who last changed it. */
49
+ setBy?: SetBy | undefined;
50
+ /**
51
+ * Where the value came from, for a fact a reader can reasonably doubt:
52
+ * whether it was measured or derived, and what it covers. Only for facts
53
+ * where the answer is not obvious; a note on every value is a line nobody
54
+ * reads.
55
+ */
56
+ note?: ReactNode;
57
+ /**
58
+ * A STACKED READING rather than a phrase (an expression on one line, what
59
+ * it means on the next), drawn whole and never clamped. For a value whose
60
+ * length the caller bounds.
61
+ */
62
+ whole?: boolean | undefined;
63
+ /**
64
+ * ONE TOKEN (a wire type, a trace id), which no reader can use broken in
65
+ * two: two tracks and one line, cut with an ellipsis only where two tracks
66
+ * are still too narrow. Put the whole value in a `title`.
67
+ */
68
+ token?: boolean | undefined;
69
+ /**
70
+ * A SET OF CHIPS (a node's roles): two tracks, wrapped between chips and
71
+ * never inside one, and never clamped.
72
+ */
73
+ set?: boolean | undefined;
74
+ }
75
+ export interface FactLineProps {
76
+ facts: readonly ObjectFact[];
77
+ className?: string | undefined;
78
+ }
79
+ /**
80
+ * An object's facts as one line of label-over-value cells.
81
+ *
82
+ * TWO BANDS: the labels share a row across the line and the values' first
83
+ * lines share the next. A fact's note and its by-line follow its own value in
84
+ * one cell, rather than a band of notes a neighbour's two-line value pushes
85
+ * away from it. A value gets two lines before it is cut, because a short
86
+ * phrase cut at one ("not running on this no…") loses the part that said
87
+ * where.
88
+ *
89
+ * NEVER "SET BY" UNDER NOTHING. A fact with no value is dropped, its
90
+ * attribution with it.
91
+ */
92
+ export declare function FactLine({ facts, className }: FactLineProps): import("react").JSX.Element | null;
93
+ export type ObjectHeaderSize = 'page' | 'peek';
94
+ export interface ObjectHeaderProps {
95
+ /** The eyebrow: what kind of thing this is ("Person", "Turn"). */
96
+ kind: ReactNode;
97
+ /** A glyph beside the kind. A component, not a name. */
98
+ icon?: ReactNode;
99
+ /** The key, handle or id, in the mono face. */
100
+ identifier?: ReactNode;
101
+ /**
102
+ * Whose the object is, where that is part of its identity and is a NAME
103
+ * rather than a key (the seat a schedule is declared on). In the eyebrow, in
104
+ * the reader's words and the eyebrow's ink.
105
+ */
106
+ within?: ReactNode;
107
+ /** The object's name. */
108
+ title: ReactNode;
109
+ /** The object's state: glyphs or pills, never identity. Several is the ordinary case. */
110
+ status?: ReactNode;
111
+ /**
112
+ * The facts a reader scans. Pass none where a properties rail stacked under
113
+ * the header states the same properties: one column saying them twice is not
114
+ * a second reading. The header draws exactly what it is handed.
115
+ */
116
+ facts?: readonly ObjectFact[] | undefined;
117
+ /** What the reader can do with the object. */
118
+ actions?: ReactNode;
119
+ /** A page's header, or the tighter one a peek or a hover card draws. */
120
+ size?: ObjectHeaderSize | undefined;
121
+ className?: string | undefined;
122
+ }
123
+ /**
124
+ * The header of an object, on its page, in a peek and in a hover card.
125
+ *
126
+ * ONE COMPONENT, because a reader scans the same facts in the same order
127
+ * wherever the object appears; a page that put the state first and a peek
128
+ * that put the owner first would make the reader learn the object again every
129
+ * time it changed frame.
130
+ *
131
+ * THE TITLE IS A LEVEL-TWO HEADING in every frame: on a page the last crumb is
132
+ * the `h1` and names the same object, and in a peek the page already has one.
133
+ * It gets two lines and no more, because it is the one part of the head row
134
+ * that can be shortened without saying something else; the state marks and
135
+ * the actions wrap onto a line of their own instead of each giving up a few
136
+ * characters.
137
+ */
138
+ export declare function ObjectHeader({ kind, icon, identifier, within, title, status, facts, actions, size, className, }: ObjectHeaderProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import './ObjectHeader.css';
2
+ export { FactLine, ObjectHeader, SetByLine } from './ObjectHeader.js';
3
+ export type { FactLineProps, ObjectFact, ObjectHeaderProps, ObjectHeaderSize, SetBy, SetByLineProps, } from './ObjectHeader.js';
@@ -0,0 +1,4 @@
1
+ export { FactLine, ObjectHeader, SetByLine } from '../chunk-I7WXZOWA.js';
2
+ import '../chunk-FBSEJO2C.js';
3
+ import '../chunk-BZFWDIV6.js';
4
+ import '../chunk-ODEQTPFM.js';