@crewlethq/ui 0.18.0 → 0.19.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 (124) hide show
  1. package/README.md +19 -2
  2. package/dist/AccessDeniedCard/index.js +2 -2
  3. package/dist/AppShell/index.js +2 -2
  4. package/dist/ArrangeBoard/ArrangeBoard.d.ts +32 -0
  5. package/dist/ArrangeBoard/index.d.ts +3 -0
  6. package/dist/ArrangeBoard/index.js +2 -0
  7. package/dist/ArrangeBoard-MQE35P6Z.css +80 -0
  8. package/dist/ArrangeFrame/ArrangeFrame.d.ts +82 -0
  9. package/dist/ArrangeFrame/index.d.ts +5 -0
  10. package/dist/ArrangeFrame/index.js +5 -0
  11. package/dist/ArrangeFrame/useGridResize.d.ts +66 -0
  12. package/dist/ArrangeFrame-3PLZAG22.css +329 -0
  13. package/dist/ArrangeGroup/ArrangeGroup.d.ts +42 -0
  14. package/dist/ArrangeGroup/index.d.ts +3 -0
  15. package/dist/ArrangeGroup/index.js +4 -0
  16. package/dist/ArrangeGroup-SHFHA7BE.css +170 -0
  17. package/dist/ArrangeList/ArrangeList.d.ts +64 -0
  18. package/dist/ArrangeList/index.d.ts +3 -0
  19. package/dist/ArrangeList/index.js +10 -0
  20. package/dist/ArrangeList-NNRTDFI5.css +94 -0
  21. package/dist/ArtifactCard/index.js +2 -2
  22. package/dist/AuthLayout/index.js +2 -2
  23. package/dist/AvatarPicker/index.js +4 -4
  24. package/dist/Canvas/index.js +2 -2
  25. package/dist/Card/index.js +1 -1
  26. package/dist/Checkbox/index.js +3 -3
  27. package/dist/Combobox/index.js +4 -4
  28. package/dist/CommandPalette/index.js +6 -6
  29. package/dist/Composer/index.js +3 -3
  30. package/dist/ConfirmField/index.js +3 -3
  31. package/dist/DataTable/index.js +8 -8
  32. package/dist/DataView/index.js +13 -13
  33. package/dist/DateTimePicker/index.js +3 -3
  34. package/dist/Divider/Divider.d.ts +15 -0
  35. package/dist/Divider/index.d.ts +3 -0
  36. package/dist/Divider/index.js +2 -0
  37. package/dist/Divider-3Z77ZAJH.css +37 -0
  38. package/dist/HuePicker/HuePicker.d.ts +16 -4
  39. package/dist/HuePicker/index.js +2 -2
  40. package/dist/{HuePicker-5QIUR6L7.css → HuePicker-PAIGH6LR.css} +6 -0
  41. package/dist/IconTile/IconTile.d.ts +23 -0
  42. package/dist/IconTile/index.d.ts +3 -0
  43. package/dist/IconTile/index.js +2 -0
  44. package/dist/IconTile-4GNWTLAW.css +30 -0
  45. package/dist/Input/index.js +2 -2
  46. package/dist/LinkInterstitial/index.js +4 -4
  47. package/dist/ListInput/index.js +5 -5
  48. package/dist/MarkdownEditor/index.js +2 -2
  49. package/dist/Menu/index.js +2 -2
  50. package/dist/Modal/Modal.d.ts +20 -0
  51. package/dist/Modal/index.js +3 -3
  52. package/dist/{Modal-RQAYGG4L.css → Modal-XOSV6FAH.css} +14 -0
  53. package/dist/Note/Note.d.ts +23 -0
  54. package/dist/Note/index.d.ts +3 -0
  55. package/dist/Note/index.js +2 -0
  56. package/dist/Note-RT4L6VUT.css +58 -0
  57. package/dist/OrgTable/index.js +5 -5
  58. package/dist/PinTile/PinTile.d.ts +37 -0
  59. package/dist/PinTile/index.d.ts +3 -0
  60. package/dist/PinTile/index.js +4 -0
  61. package/dist/PinTile-IIA25MNZ.css +141 -0
  62. package/dist/PresenceStack/index.js +1 -1
  63. package/dist/PrincipalPicker/index.js +5 -5
  64. package/dist/Reorder/index.d.ts +2 -0
  65. package/dist/Reorder/index.js +4 -0
  66. package/dist/Reorder/useReorder.d.ts +138 -0
  67. package/dist/ShareDialog/index.js +7 -7
  68. package/dist/SheetGrid/index.js +4 -4
  69. package/dist/StatGroup/StatGroup.d.ts +7 -1
  70. package/dist/StatGroup/index.js +1 -1
  71. package/dist/{StatGroup-HVG6O62W.css → StatGroup-PADTJCUQ.css} +7 -0
  72. package/dist/Switcher/index.js +8 -8
  73. package/dist/TagsInput/index.js +3 -3
  74. package/dist/TimeWindowPicker/index.js +5 -5
  75. package/dist/TreeCanvas/index.js +3 -3
  76. package/dist/TreeGrid/index.js +2 -2
  77. package/dist/chunk-35XVR5JQ.js +81 -0
  78. package/dist/chunk-63WJLRB2.js +24 -0
  79. package/dist/{chunk-L4ZLXYPO.js → chunk-6A7P6II6.js} +1 -1
  80. package/dist/chunk-6KWNXIDE.js +18 -0
  81. package/dist/chunk-6MIXD6IW.js +49 -0
  82. package/dist/{chunk-NZY77ZDU.js → chunk-7FQEUNHX.js} +4 -4
  83. package/dist/{chunk-2TZATTIU.js → chunk-7IJARUIF.js} +18 -5
  84. package/dist/chunk-AIVZVKYZ.js +126 -0
  85. package/dist/{chunk-76FXDZAZ.js → chunk-AJESMWJS.js} +4 -4
  86. package/dist/chunk-DEJHAOC5.js +279 -0
  87. package/dist/{chunk-ERV5BUS3.js → chunk-EIGEIT4O.js} +3 -3
  88. package/dist/chunk-FFMCMSJB.js +1 -0
  89. package/dist/{chunk-LFZ45HV2.js → chunk-G3EEUNZQ.js} +1 -1
  90. package/dist/{chunk-2YR5ZPQ3.js → chunk-HTCJSUIZ.js} +3 -3
  91. package/dist/{chunk-75CLJNDQ.js → chunk-I6NZKJGK.js} +1 -1
  92. package/dist/chunk-IXJHTFXG.js +17 -0
  93. package/dist/{chunk-3UAA4IWJ.js → chunk-JEDWC3GI.js} +1 -1
  94. package/dist/{chunk-QVAFL2LE.js → chunk-JXRI5YD2.js} +3 -3
  95. package/dist/{chunk-ZFH7H7GS.js → chunk-LOLELDBW.js} +1 -1
  96. package/dist/{chunk-KVT3TJVG.js → chunk-OIMAK5AE.js} +6 -6
  97. package/dist/chunk-QO7QEQKV.js +24 -0
  98. package/dist/{chunk-A7EBCHEG.js → chunk-RT323I4I.js} +1 -1
  99. package/dist/{chunk-BOW2VUCH.js → chunk-T7ICFXEC.js} +1 -1
  100. package/dist/{chunk-2OLCUNG7.js → chunk-TBIZSQHB.js} +1 -1
  101. package/dist/{chunk-4U3GQ7D2.js → chunk-TODND5AD.js} +1 -1
  102. package/dist/{chunk-IFKBDRNJ.js → chunk-UXELEORU.js} +3 -3
  103. package/dist/{chunk-6NIMZ5XC.js → chunk-VJLYGPPE.js} +1 -1
  104. package/dist/{chunk-7QFAORCY.js → chunk-WHZFDS62.js} +1 -1
  105. package/dist/chunk-XJ2QEBMM.js +277 -0
  106. package/dist/{chunk-PA4CYTBY.js → chunk-XU4ZUGLE.js} +19 -4
  107. package/dist/{chunk-T3ZWBZ65.js → chunk-YSJYWQSP.js} +2 -2
  108. package/dist/{chunk-CXBAIVYZ.js → chunk-YSY6UJ4F.js} +1 -1
  109. package/dist/{chunk-EG6NYWVK.js → chunk-YZCJ63JF.js} +1 -1
  110. package/dist/generated/index.d.ts +9 -0
  111. package/dist/generated/index.js +80 -71
  112. package/dist/index.js +80 -71
  113. package/dist/styles.css +993 -3
  114. package/package.json +3 -3
  115. package/dist/chunk-EXHQ2QVW.js +0 -1
  116. package/dist/{chunk-ESKP3TXM.js → chunk-4Z7PW3L6.js} +0 -0
  117. package/dist/{chunk-AQCV62K6.js → chunk-7ZNKEPLN.js} +1 -1
  118. package/dist/{chunk-OYOQU7O5.js → chunk-EDGCPVVD.js} +1 -1
  119. package/dist/{chunk-NS7BVLL3.js → chunk-JULMZNGT.js} +1 -1
  120. package/dist/{chunk-5NVKTB6E.js → chunk-L4H7SSWF.js} +1 -1
  121. package/dist/{chunk-FYXRWBJJ.js → chunk-PUQY4WXR.js} +2 -2
  122. package/dist/{chunk-4GB57WIT.js → chunk-Q55TXPA3.js} +1 -1
  123. package/dist/{chunk-B2Z2CDM5.js → chunk-T5TFZ2JB.js} +1 -1
  124. package/dist/{chunk-AMH67MLM.js → chunk-TXAFKH2A.js} +1 -1
@@ -0,0 +1,23 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { SurfaceTone } from '../ArrangeGroup/index.js';
3
+ export interface NoteProps extends HTMLAttributes<HTMLDivElement> {
4
+ /** The paper it is written on: one of the six hues, or the page's own. */
5
+ tone?: SurfaceTone | undefined;
6
+ align?: 'start' | 'center' | undefined;
7
+ /** `lg` for a line meant to be read across the room: a goal, a rule. */
8
+ size?: 'md' | 'lg' | undefined;
9
+ children: ReactNode;
10
+ }
11
+ /**
12
+ * Words a reader leaves on their own page: a team's goal this week, how to
13
+ * read the cards below it, a link to the runbook. A dashboard's note.
14
+ *
15
+ * THE TONE IS THE PAPER, and the ink keeps its contrast on every one: each
16
+ * hue's fill with that hue's ink, which the palette gate measures as a pair.
17
+ * A note is never coloured to mean a state; the hues here are the reader's
18
+ * labels, the same six a group's band takes.
19
+ *
20
+ * IT SCROLLS rather than clipping when the reader makes it shorter than its
21
+ * words.
22
+ */
23
+ export declare const Note: import("react").ForwardRefExoticComponent<NoteProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import './Note.css';
2
+ export { Note } from './Note.js';
3
+ export type { NoteProps } from './Note.js';
@@ -0,0 +1,2 @@
1
+ export { Note } from '../chunk-63WJLRB2.js';
2
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,58 @@
1
+ /*
2
+ * Note: words on a coloured paper. Each hue pairs its fill with its own ink.
3
+ */
4
+
5
+ .crewlet-note {
6
+ --crewlet-note-paper: var(--color-surface-subtle);
7
+ --crewlet-note-edge: var(--color-border-default);
8
+ --crewlet-note-ink: var(--color-text-primary);
9
+
10
+ box-sizing: border-box;
11
+ min-width: 0;
12
+ min-height: 0;
13
+ padding: var(--spacing-4);
14
+ overflow: auto;
15
+ border: 1px solid var(--crewlet-note-edge);
16
+ border-radius: var(--radius-lg);
17
+ background: var(--crewlet-note-paper);
18
+ color: var(--crewlet-note-ink);
19
+ font-size: var(--font-size-sm);
20
+ line-height: var(--font-line-height-normal);
21
+ overflow-wrap: anywhere;
22
+ }
23
+
24
+ .crewlet-note--purple { --crewlet-note-paper: var(--color-node-purple-fill); --crewlet-note-edge: var(--color-node-purple-line); --crewlet-note-ink: var(--color-node-purple-ink); }
25
+ .crewlet-note--cyan { --crewlet-note-paper: var(--color-node-cyan-fill); --crewlet-note-edge: var(--color-node-cyan-line); --crewlet-note-ink: var(--color-node-cyan-ink); }
26
+ .crewlet-note--green { --crewlet-note-paper: var(--color-node-green-fill); --crewlet-note-edge: var(--color-node-green-line); --crewlet-note-ink: var(--color-node-green-ink); }
27
+ .crewlet-note--amber { --crewlet-note-paper: var(--color-node-amber-fill); --crewlet-note-edge: var(--color-node-amber-line); --crewlet-note-ink: var(--color-node-amber-ink); }
28
+ .crewlet-note--rose { --crewlet-note-paper: var(--color-node-rose-fill); --crewlet-note-edge: var(--color-node-rose-line); --crewlet-note-ink: var(--color-node-rose-ink); }
29
+ .crewlet-note--blue { --crewlet-note-paper: var(--color-node-blue-fill); --crewlet-note-edge: var(--color-node-blue-line); --crewlet-note-ink: var(--color-node-blue-ink); }
30
+
31
+ .crewlet-note--center {
32
+ display: flex;
33
+ flex-direction: column;
34
+ justify-content: center;
35
+ text-align: center;
36
+ }
37
+
38
+ .crewlet-note--lg {
39
+ font-size: var(--font-size-lg);
40
+ font-weight: var(--font-weight-medium);
41
+ letter-spacing: var(--font-letter-spacing-tight);
42
+ }
43
+
44
+ /* Prose inside takes the note's ink, links included. */
45
+ .crewlet-note :is(p, li, h2, h3, h4, strong, em) {
46
+ color: inherit;
47
+ }
48
+ .crewlet-note a {
49
+ color: inherit;
50
+ text-decoration: underline;
51
+ text-underline-offset: 2px;
52
+ }
53
+ .crewlet-note > :first-child {
54
+ margin-top: 0;
55
+ }
56
+ .crewlet-note > :last-child {
57
+ margin-bottom: 0;
58
+ }
@@ -1,13 +1,13 @@
1
- export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-L4ZLXYPO.js';
2
- import '../chunk-B2Z2CDM5.js';
1
+ export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-6A7P6II6.js';
2
+ import '../chunk-T5TFZ2JB.js';
3
3
  import '../chunk-MY374UUD.js';
4
4
  import '../chunk-AKEZ3G5V.js';
5
5
  import '../chunk-VYOKRN2I.js';
6
+ import '../chunk-UAN5NE7M.js';
7
+ import '../chunk-5OM447RW.js';
6
8
  import '../chunk-TROLVEZY.js';
7
- import '../chunk-4FQT6ZAY.js';
8
9
  import '../chunk-HMPFGIWM.js';
9
10
  import '../chunk-R25RGPUB.js';
10
- import '../chunk-UAN5NE7M.js';
11
- import '../chunk-5OM447RW.js';
11
+ import '../chunk-4FQT6ZAY.js';
12
12
  import '../chunk-BZFWDIV6.js';
13
13
  import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,37 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { ReorderHandleProps } from '../Reorder/index.js';
3
+ export interface PinTileProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
4
+ /** What was pinned, and the link's name. */
5
+ title: string;
6
+ /** Where it opens. */
7
+ href: string;
8
+ /** What kind of thing it is, before the facts: "Agent", "Project". */
9
+ kind?: string | undefined;
10
+ /** One line of what is true of it now: "Working on FAIR-1". */
11
+ meta?: ReactNode;
12
+ /** An avatar or glyph before the title. */
13
+ leading?: ReactNode;
14
+ /** A state mark (a dot, a tag) beside the title. */
15
+ status?: ReactNode;
16
+ /** One figure at the end: "14%", "3 open". */
17
+ figure?: ReactNode;
18
+ /** Unpin it; left out, the tile cannot be unpinned from here. */
19
+ onUnpin?: (() => void) | undefined;
20
+ /** The handle's props from `useReorder`; left out, the tile does not move. */
21
+ handle?: ReorderHandleProps | undefined;
22
+ }
23
+ /**
24
+ * Something a reader pinned, kept where they land: an agent, a project, a
25
+ * board, a page. A link with the one or two facts that make opening it
26
+ * unnecessary on most mornings.
27
+ *
28
+ * THE WHOLE TILE IS THE LINK'S TARGET, and the link is the title only. The
29
+ * tile's area is one stretched pseudo-element over the title's anchor, so a
30
+ * press anywhere opens it, a screen reader hears one link named by the title,
31
+ * and the unpin button and the handle are siblings of the anchor rather than
32
+ * buttons nested inside a link, which no browser can make operable.
33
+ *
34
+ * UNPIN IS ALWAYS THERE, quiet until the tile is hovered or focused. A
35
+ * control that appears only on hover is one a touch screen never shows.
36
+ */
37
+ export declare const PinTile: import("react").ForwardRefExoticComponent<PinTileProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,3 @@
1
+ import './PinTile.css';
2
+ export { PinTile } from './PinTile.js';
3
+ export type { PinTileProps } from './PinTile.js';
@@ -0,0 +1,4 @@
1
+ export { PinTile } from '../chunk-6MIXD6IW.js';
2
+ import '../chunk-4FQT6ZAY.js';
3
+ import '../chunk-BZFWDIV6.js';
4
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,141 @@
1
+ /*
2
+ * PinTile: one pinned thing, a link with its facts.
3
+ *
4
+ * A raised row rather than a card with a header: a shelf holds six of them,
5
+ * and six headed cards are six sections where the reader wanted six links.
6
+ */
7
+
8
+ .crewlet-pin-tile {
9
+ position: relative;
10
+ display: flex;
11
+ align-items: center;
12
+ gap: var(--spacing-3);
13
+ min-width: 0;
14
+ min-height: 56px;
15
+ padding: var(--spacing-2) var(--spacing-2) var(--spacing-2) var(--spacing-3);
16
+ border: 1px solid var(--color-border-default);
17
+ border-radius: var(--radius-lg);
18
+ background: var(--color-surface-elevated);
19
+ transition: border-color var(--motion-duration-fast) var(--motion-easing-default),
20
+ background-color var(--motion-duration-fast) var(--motion-easing-default);
21
+ }
22
+ .crewlet-pin-tile:hover {
23
+ border-color: var(--color-border-hover);
24
+ background: var(--color-surface-hover);
25
+ }
26
+ .crewlet-pin-tile:has(.crewlet-pin-tile__handle) {
27
+ padding-inline-start: var(--spacing-1);
28
+ }
29
+
30
+ .crewlet-pin-tile[data-reorder='dragging'] {
31
+ border-style: dashed;
32
+ border-color: var(--color-brand-accent);
33
+ background: var(--color-brand-accent-soft);
34
+ }
35
+ .crewlet-pin-tile[data-reorder='dragging'] > * {
36
+ opacity: 0.35;
37
+ }
38
+
39
+ .crewlet-pin-tile__handle {
40
+ position: relative;
41
+ z-index: var(--z-index-raised);
42
+ flex-shrink: 0;
43
+ cursor: grab;
44
+ color: var(--color-text-tertiary);
45
+ }
46
+
47
+ .crewlet-pin-tile__leading {
48
+ display: inline-flex;
49
+ flex-shrink: 0;
50
+ color: var(--color-text-secondary);
51
+ }
52
+
53
+ .crewlet-pin-tile__body {
54
+ display: flex;
55
+ flex: 1 1 auto;
56
+ flex-direction: column;
57
+ gap: 2px;
58
+ min-width: 0;
59
+ }
60
+
61
+ .crewlet-pin-tile__head {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: var(--spacing-2);
65
+ min-width: 0;
66
+ }
67
+
68
+ .crewlet-pin-tile__link {
69
+ overflow: hidden;
70
+ font-size: var(--font-size-sm);
71
+ font-weight: var(--font-weight-medium);
72
+ color: var(--color-text-primary);
73
+ text-decoration: none;
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
76
+ }
77
+ /* The tile's whole area, as the link's. */
78
+ .crewlet-pin-tile__link::after {
79
+ content: '';
80
+ position: absolute;
81
+ inset: 0;
82
+ border-radius: inherit;
83
+ }
84
+ .crewlet-pin-tile__link:focus-visible {
85
+ outline: 2px solid transparent;
86
+ }
87
+ /* The tile's ring, over its own edge, for the link that is its target. */
88
+ .crewlet-pin-tile:has(.crewlet-pin-tile__link:focus-visible) {
89
+ outline: 2px solid var(--color-focus);
90
+ outline-offset: -1px;
91
+ }
92
+
93
+ .crewlet-pin-tile__status {
94
+ display: inline-flex;
95
+ flex-shrink: 0;
96
+ }
97
+
98
+ .crewlet-pin-tile__meta {
99
+ overflow: hidden;
100
+ font-size: var(--font-size-xs);
101
+ color: var(--color-text-secondary);
102
+ text-overflow: ellipsis;
103
+ white-space: nowrap;
104
+ }
105
+ .crewlet-pin-tile__kind {
106
+ color: var(--color-text-tertiary);
107
+ }
108
+
109
+ .crewlet-pin-tile__figure {
110
+ flex-shrink: 0;
111
+ font-size: var(--font-size-sm);
112
+ font-weight: var(--font-weight-semibold);
113
+ font-variant-numeric: tabular-nums;
114
+ color: var(--color-text-primary);
115
+ }
116
+
117
+ /* Above the stretched link, so it takes its own press. */
118
+ .crewlet-pin-tile__unpin {
119
+ position: relative;
120
+ z-index: var(--z-index-raised);
121
+ flex-shrink: 0;
122
+ color: var(--color-brand-accent-ink);
123
+ opacity: 0.55;
124
+ transition: opacity var(--motion-duration-fast) var(--motion-easing-default);
125
+ }
126
+ .crewlet-pin-tile:hover .crewlet-pin-tile__unpin,
127
+ .crewlet-pin-tile:focus-within .crewlet-pin-tile__unpin {
128
+ opacity: 1;
129
+ }
130
+ @media (hover: none) {
131
+ .crewlet-pin-tile__unpin {
132
+ opacity: 1;
133
+ }
134
+ }
135
+
136
+ @media (prefers-reduced-motion: reduce) {
137
+ .crewlet-pin-tile,
138
+ .crewlet-pin-tile__unpin {
139
+ transition: none;
140
+ }
141
+ }
@@ -2,8 +2,8 @@ export { PresenceStack } from '../chunk-YM3GJHGW.js';
2
2
  import '../chunk-CENOOTAV.js';
3
3
  import '../chunk-I6POAB4V.js';
4
4
  import '../chunk-S35G6PNC.js';
5
- import '../chunk-AYKXMIOR.js';
6
5
  import '../chunk-UAN5NE7M.js';
6
+ import '../chunk-AYKXMIOR.js';
7
7
  import '../chunk-5OM447RW.js';
8
8
  import '../chunk-BZFWDIV6.js';
9
9
  import '../chunk-ODEQTPFM.js';
@@ -1,12 +1,12 @@
1
- export { PrincipalPicker } from '../chunk-3UAA4IWJ.js';
2
- import '../chunk-ZFH7H7GS.js';
1
+ export { PrincipalPicker } from '../chunk-JEDWC3GI.js';
2
+ import '../chunk-LOLELDBW.js';
3
3
  import '../chunk-F73MC7EZ.js';
4
- import '../chunk-4GB57WIT.js';
5
- import '../chunk-4FQT6ZAY.js';
6
- import '../chunk-R25RGPUB.js';
4
+ import '../chunk-Q55TXPA3.js';
7
5
  import '../chunk-4KP4RC3O.js';
8
6
  import '../chunk-UAN5NE7M.js';
9
7
  import '../chunk-5OM447RW.js';
10
8
  import '../chunk-PQADV6P6.js';
9
+ import '../chunk-R25RGPUB.js';
10
+ import '../chunk-4FQT6ZAY.js';
11
11
  import '../chunk-BZFWDIV6.js';
12
12
  import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,2 @@
1
+ export { useReorder, useReorderLists, moveKey, DEFAULT_REORDER_LABELS } from './useReorder.js';
2
+ export type { Reorder, ReorderAxis, ReorderContainerProps, ReorderHandleProps, ReorderItemProps, ReorderLabels, ReorderLists, ReorderListsState, UseReorderListsOptions, UseReorderOptions, } from './useReorder.js';
@@ -0,0 +1,4 @@
1
+ export { DEFAULT_REORDER_LABELS, moveKey, useReorder, useReorderLists } from '../chunk-XJ2QEBMM.js';
2
+ import '../chunk-RSAQOKH3.js';
3
+ import '../chunk-BZFWDIV6.js';
4
+ import '../chunk-ODEQTPFM.js';
@@ -0,0 +1,138 @@
1
+ import { type DragEvent, type KeyboardEvent } from 'react';
2
+ /**
3
+ * How the arrow keys map to a move.
4
+ *
5
+ * - `vertical`: Up moves an item one place earlier, Down one place later. A
6
+ * list.
7
+ * - `grid`: Left and Up move it one place earlier, Right and Down one place
8
+ * later. A wrapping row of cards, where the reading order is the order and
9
+ * "the card above" is not a position the list holds.
10
+ */
11
+ export type ReorderAxis = 'vertical' | 'grid';
12
+ export interface ReorderLabels {
13
+ /** What the handle does, and its NAME: "Move Projects". */
14
+ handle: (name: string) => string;
15
+ /** The instruction a handle is described by, for a reader who cannot drag. */
16
+ hint: string;
17
+ /** Said after every move, by any means: "Projects moved to position 2 of 6." */
18
+ moved: (name: string, position: number, total: number) => string;
19
+ }
20
+ export declare const DEFAULT_REORDER_LABELS: ReorderLabels;
21
+ /** Several ordered lists, by the id of the container each one is drawn in. */
22
+ export type ReorderLists<K extends string> = Readonly<Record<string, readonly K[]>>;
23
+ export interface UseReorderListsOptions<K extends string> {
24
+ /** Every list as it stands. The hook never owns them. */
25
+ lists: ReorderLists<K>;
26
+ /** A finished move: a drop, an arrow key or a call to `move`. */
27
+ onReorder: (next: Record<string, K[]>) => void;
28
+ /** What a reader calls an item, for the handle's name and the announcement. */
29
+ nameOf: (key: K) => string;
30
+ /**
31
+ * Whether an item may be dropped into a list. Left out, every item goes
32
+ * anywhere. A page refuses a group inside a group here.
33
+ */
34
+ accepts?: ((key: K, list: string) => boolean) | undefined;
35
+ axis?: ReorderAxis | undefined;
36
+ labels?: Partial<ReorderLabels> | undefined;
37
+ }
38
+ export interface ReorderHandleProps {
39
+ draggable: true;
40
+ 'aria-label': string;
41
+ 'aria-describedby': string;
42
+ onDragStart: (event: DragEvent<HTMLElement>) => void;
43
+ onDragEnd: () => void;
44
+ onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
45
+ }
46
+ export interface ReorderItemProps {
47
+ ref: (node: HTMLElement | null) => void;
48
+ 'data-reorder': 'dragging' | 'idle';
49
+ /** Set on the item another list's drag would land before, or after when it is the last. */
50
+ 'data-reorder-target'?: 'before' | 'after' | undefined;
51
+ /**
52
+ * Which way the target's marker runs: `vertical` beside an item that shares
53
+ * its row, `horizontal` above or below one that spans the row.
54
+ */
55
+ 'data-reorder-line'?: 'vertical' | 'horizontal' | undefined;
56
+ onDragOver: (event: DragEvent<HTMLElement>) => void;
57
+ onDrop: (event: DragEvent<HTMLElement>) => void;
58
+ }
59
+ export interface ReorderContainerProps {
60
+ 'data-reorder-over'?: 'true' | undefined;
61
+ onDragOver: (event: DragEvent<HTMLElement>) => void;
62
+ onDrop: (event: DragEvent<HTMLElement>) => void;
63
+ }
64
+ export interface ReorderListsState<K extends string> {
65
+ /** The lists to DRAW: the caller's, or the preview while a drag is held. */
66
+ lists: Readonly<Record<string, readonly K[]>>;
67
+ /** The item being dragged, if any. */
68
+ dragging: K | null;
69
+ /** Spread on the control an item is moved BY. */
70
+ handleProps: (key: K) => ReorderHandleProps;
71
+ /** Spread on the element that holds the item, the one a drag passes over. */
72
+ itemProps: (key: K) => ReorderItemProps;
73
+ /**
74
+ * Spread on the element a list is drawn in. A drop in the gap between two
75
+ * items keeps the preview, and a drag over an EMPTY stretch of another list
76
+ * (an empty group, the space after its last item) moves the item to its end.
77
+ */
78
+ listProps: (list: string) => ReorderContainerProps;
79
+ /** Move an item by a number of places within its own list, clamped to the ends. */
80
+ move: (key: K, by: number) => void;
81
+ /** Move an item to the end of another list, by command (a menu's "Move to"). */
82
+ moveTo: (key: K, list: string) => void;
83
+ /** The id of the hidden instruction every handle is described by. */
84
+ hintId: string;
85
+ /** The instruction itself, for the caller to render once (`VisuallyHidden`). */
86
+ hint: string;
87
+ }
88
+ export interface UseReorderOptions<K extends string> {
89
+ keys: readonly K[];
90
+ onReorder: (next: K[]) => void;
91
+ nameOf: (key: K) => string;
92
+ axis?: ReorderAxis | undefined;
93
+ labels?: Partial<ReorderLabels> | undefined;
94
+ }
95
+ export interface Reorder<K extends string> {
96
+ order: readonly K[];
97
+ dragging: K | null;
98
+ handleProps: (key: K) => ReorderHandleProps;
99
+ itemProps: (key: K) => ReorderItemProps;
100
+ containerProps: ReorderContainerProps;
101
+ move: (key: K, by: number) => void;
102
+ hintId: string;
103
+ hint: string;
104
+ }
105
+ /** `keys` with `key` taken out and put back at `to`. */
106
+ export declare function moveKey<K>(keys: readonly K[], key: K, to: number): K[];
107
+ /**
108
+ * Reordering items within and between lists, by drag, by keyboard and by
109
+ * command, as one operation: the cards of a page and the cards inside each
110
+ * of its groups.
111
+ *
112
+ * ONE IMPLEMENTATION, because there were three. DataTable's column settings,
113
+ * the dashboard's priority list and its board each carried their own drag
114
+ * handlers, and only one of them could be reached from a keyboard. This hook
115
+ * is that one's rules, given to every list that can be put in order.
116
+ *
117
+ * THE HANDLE IS A CONTROL. It is what an item is dragged BY, it has a name
118
+ * ("Move Projects"), it takes focus, and the arrow keys move the item from
119
+ * there. Moving into another list by keyboard is `moveTo`, which a caller
120
+ * offers as a command ("Move to group"), because "the next list" is not a
121
+ * direction an arrow key names.
122
+ *
123
+ * THE CALLER OWNS THE LISTS. While a drag is held the hook draws a PREVIEW
124
+ * within the item's own list and MARKS where it would land in another one
125
+ * (`data-reorder-target` on the item it would precede, `data-reorder-over`
126
+ * on the list); a drop reports the new lists once, and a drag that ends
127
+ * anywhere else (Escape, outside every list) leaves them as they were.
128
+ *
129
+ * EVERY MOVE IS SAID, through the page's `Announcer`, and ITEMS GLIDE to
130
+ * their new place (a FLIP transform) unless the reader asked for reduced
131
+ * motion.
132
+ */
133
+ export declare function useReorderLists<K extends string>({ lists, onReorder, nameOf, accepts, axis, labels: labelOverrides, }: UseReorderListsOptions<K>): ReorderListsState<K>;
134
+ /**
135
+ * One list's reordering: `useReorderLists` over a single list, for the
136
+ * common case of a settings panel or a shelf.
137
+ */
138
+ export declare function useReorder<K extends string>({ keys, onReorder, nameOf, axis, labels, }: UseReorderOptions<K>): Reorder<K>;
@@ -1,19 +1,19 @@
1
- export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-2YR5ZPQ3.js';
1
+ export { ARTIFACT_ROLES, SHAREABLE_ROLES, ShareDialog, roleAtLeast } from '../chunk-HTCJSUIZ.js';
2
2
  import '../chunk-FC4YTTFJ.js';
3
- import '../chunk-2TZATTIU.js';
4
- import '../chunk-F73MC7EZ.js';
5
3
  import '../chunk-W46LPU4R.js';
6
4
  import '../chunk-STJ7QBC3.js';
7
5
  import '../chunk-DTIW4CHZ.js';
6
+ import '../chunk-7IJARUIF.js';
7
+ import '../chunk-F73MC7EZ.js';
8
8
  import '../chunk-SVSCLHHI.js';
9
9
  import '../chunk-OG6CL3EB.js';
10
- import '../chunk-IG75YMUN.js';
11
- import '../chunk-4FQT6ZAY.js';
12
- import '../chunk-HMPFGIWM.js';
13
- import '../chunk-R25RGPUB.js';
14
10
  import '../chunk-4KP4RC3O.js';
15
11
  import '../chunk-UAN5NE7M.js';
16
12
  import '../chunk-5OM447RW.js';
17
13
  import '../chunk-PQADV6P6.js';
14
+ import '../chunk-IG75YMUN.js';
15
+ import '../chunk-HMPFGIWM.js';
16
+ import '../chunk-R25RGPUB.js';
17
+ import '../chunk-4FQT6ZAY.js';
18
18
  import '../chunk-BZFWDIV6.js';
19
19
  import '../chunk-ODEQTPFM.js';
@@ -1,18 +1,18 @@
1
- export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-FYXRWBJJ.js';
1
+ export { CellDisplay, CellEditor, CheckboxCell, DateCell, LongTextCell, MultiSelectCell, NumberCell, PersonCell, RatingCell, SelectCell, SheetCell, SheetGrid, StatusCell, TextCell, UrlCell } from '../chunk-PUQY4WXR.js';
2
2
  import '../chunk-GFV4LJHH.js';
3
3
  import '../chunk-WIATRXEJ.js';
4
4
  import '../chunk-CENOOTAV.js';
5
5
  import '../chunk-3BYIWOTV.js';
6
6
  import '../chunk-I6POAB4V.js';
7
+ import '../chunk-OG6CL3EB.js';
7
8
  import '../chunk-PPAQFGS2.js';
8
9
  import '../chunk-YYZRLLLY.js';
9
10
  import '../chunk-S35G6PNC.js';
10
11
  import '../chunk-QWOPX2MN.js';
12
+ import '../chunk-UAN5NE7M.js';
11
13
  import '../chunk-AYKXMIOR.js';
12
- import '../chunk-OG6CL3EB.js';
14
+ import '../chunk-5OM447RW.js';
13
15
  import '../chunk-HMPFGIWM.js';
14
16
  import '../chunk-R25RGPUB.js';
15
- import '../chunk-UAN5NE7M.js';
16
- import '../chunk-5OM447RW.js';
17
17
  import '../chunk-BZFWDIV6.js';
18
18
  import '../chunk-ODEQTPFM.js';
@@ -7,6 +7,12 @@ export interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {
7
7
  * nothing to do with the numbers.
8
8
  */
9
9
  columns?: 2 | 3 | 4;
10
+ /**
11
+ * Inside another card: the row gives up its own surface, hairline and
12
+ * corner and keeps only the hairlines between its tiles, so a card holding
13
+ * it does not draw a box inside a box.
14
+ */
15
+ flush?: boolean | undefined;
10
16
  children?: ReactNode;
11
17
  }
12
18
  /**
@@ -17,4 +23,4 @@ export interface StatGroupProps extends HTMLAttributes<HTMLDivElement> {
17
23
  * md breakpoint it drops to two columns, which is the last count at which a
18
24
  * six-character number still fits on one line of a phone.
19
25
  */
20
- export declare function StatGroup({ columns, className, children, ...rest }: StatGroupProps): import("react").JSX.Element;
26
+ export declare function StatGroup({ columns, flush, className, children, ...rest }: StatGroupProps): import("react").JSX.Element;
@@ -1,2 +1,2 @@
1
- export { StatGroup } from '../chunk-QVAFL2LE.js';
1
+ export { StatGroup } from '../chunk-JXRI5YD2.js';
2
2
  import '../chunk-ODEQTPFM.js';
@@ -20,6 +20,13 @@
20
20
  overflow: hidden;
21
21
  }
22
22
 
23
+ /* Inside another card: the card's surface and edge are the row's. */
24
+ .crewlet-stat-group--flush {
25
+ background: transparent;
26
+ border: 0;
27
+ border-radius: var(--radius-none);
28
+ }
29
+
23
30
  /*
24
31
  * A tile inside the row brings no surface of its own, whether or not its
25
32
  * caller remembered `flush`. The group draws one card and the hairlines
@@ -1,16 +1,16 @@
1
- export { Switcher } from '../chunk-NZY77ZDU.js';
1
+ export { Switcher } from '../chunk-7FQEUNHX.js';
2
2
  import '../chunk-W5J7R5EB.js';
3
- import '../chunk-2TZATTIU.js';
3
+ import '../chunk-7IJARUIF.js';
4
4
  import '../chunk-F73MC7EZ.js';
5
- import '../chunk-FYTIJM2T.js';
6
- import '../chunk-4GB57WIT.js';
7
- import '../chunk-BWRGFKJP.js';
8
5
  import '../chunk-OG6CL3EB.js';
9
- import '../chunk-RSAQOKH3.js';
6
+ import '../chunk-Q55TXPA3.js';
7
+ import '../chunk-BWRGFKJP.js';
8
+ import '../chunk-FYTIJM2T.js';
9
+ import '../chunk-PQADV6P6.js';
10
10
  import '../chunk-IG75YMUN.js';
11
- import '../chunk-4FQT6ZAY.js';
12
11
  import '../chunk-HMPFGIWM.js';
13
12
  import '../chunk-R25RGPUB.js';
14
- import '../chunk-PQADV6P6.js';
13
+ import '../chunk-RSAQOKH3.js';
14
+ import '../chunk-4FQT6ZAY.js';
15
15
  import '../chunk-BZFWDIV6.js';
16
16
  import '../chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
- export { TagsInput } from '../chunk-AQCV62K6.js';
1
+ export { TagsInput } from '../chunk-7ZNKEPLN.js';
2
2
  import '../chunk-GFV4LJHH.js';
3
3
  import '../chunk-WIATRXEJ.js';
4
4
  import '../chunk-F73MC7EZ.js';
5
- import '../chunk-RSAQOKH3.js';
6
- import '../chunk-4FQT6ZAY.js';
7
5
  import '../chunk-HMPFGIWM.js';
8
6
  import '../chunk-R25RGPUB.js';
7
+ import '../chunk-RSAQOKH3.js';
8
+ import '../chunk-4FQT6ZAY.js';
9
9
  import '../chunk-BZFWDIV6.js';
10
10
  import '../chunk-ODEQTPFM.js';
@@ -1,13 +1,13 @@
1
- export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-ERV5BUS3.js';
1
+ export { DEFAULT_TIME_WINDOW_LABELS, TIME_WINDOW_SPANS, TimeWindowPicker, describeTimeWindow, isTimeWindowSet, parseTimeWindowDuration, resolveTimeWindow, timeWindowMatchesPreset } from '../chunk-EIGEIT4O.js';
2
2
  import '../chunk-FC4YTTFJ.js';
3
3
  import '../chunk-F73MC7EZ.js';
4
- import '../chunk-4GB57WIT.js';
5
- import '../chunk-BWRGFKJP.js';
6
4
  import '../chunk-GXQ3B46I.js';
7
5
  import '../chunk-OG6CL3EB.js';
8
- import '../chunk-4FQT6ZAY.js';
6
+ import '../chunk-Q55TXPA3.js';
7
+ import '../chunk-BWRGFKJP.js';
8
+ import '../chunk-PQADV6P6.js';
9
9
  import '../chunk-HMPFGIWM.js';
10
10
  import '../chunk-R25RGPUB.js';
11
- import '../chunk-PQADV6P6.js';
11
+ import '../chunk-4FQT6ZAY.js';
12
12
  import '../chunk-BZFWDIV6.js';
13
13
  import '../chunk-ODEQTPFM.js';
@@ -1,10 +1,10 @@
1
- export { TreeCanvas } from '../chunk-2OLCUNG7.js';
1
+ export { TreeCanvas } from '../chunk-TBIZSQHB.js';
2
2
  import '../chunk-MY374UUD.js';
3
- import '../chunk-AMH67MLM.js';
3
+ import '../chunk-TXAFKH2A.js';
4
4
  import '../chunk-VYOKRN2I.js';
5
5
  import '../chunk-OG6CL3EB.js';
6
- import '../chunk-4FQT6ZAY.js';
7
6
  import '../chunk-HMPFGIWM.js';
8
7
  import '../chunk-R25RGPUB.js';
8
+ import '../chunk-4FQT6ZAY.js';
9
9
  import '../chunk-BZFWDIV6.js';
10
10
  import '../chunk-ODEQTPFM.js';
@@ -1,8 +1,8 @@
1
- export { TreeGrid } from '../chunk-B2Z2CDM5.js';
1
+ export { TreeGrid } from '../chunk-T5TFZ2JB.js';
2
2
  import '../chunk-MY374UUD.js';
3
3
  import '../chunk-VYOKRN2I.js';
4
- import '../chunk-4FQT6ZAY.js';
5
4
  import '../chunk-HMPFGIWM.js';
6
5
  import '../chunk-R25RGPUB.js';
6
+ import '../chunk-4FQT6ZAY.js';
7
7
  import '../chunk-BZFWDIV6.js';
8
8
  import '../chunk-ODEQTPFM.js';