@crewlethq/ui 0.8.1 → 0.10.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 +27 -2
- package/dist/Avatar/Avatar.d.ts +67 -15
- package/dist/Avatar/AvatarStack.d.ts +7 -3
- package/dist/Avatar/index.d.ts +2 -2
- package/dist/Avatar/index.js +2 -1
- package/dist/Avatar-QHYOFID3.css +322 -0
- package/dist/CharacterPicker/CharacterPicker.d.ts +38 -0
- package/dist/CharacterPicker/index.d.ts +3 -0
- package/dist/CharacterPicker/index.js +4 -0
- package/dist/CharacterPicker-ZEYIKUNQ.css +42 -0
- package/dist/CommandPalette/index.js +2 -2
- package/dist/DataTable/index.js +2 -2
- package/dist/DataView/index.js +6 -6
- package/dist/EntityChip/index.js +3 -2
- package/dist/HuePicker/HuePicker.d.ts +26 -0
- package/dist/HuePicker/index.d.ts +3 -0
- package/dist/HuePicker/index.js +8 -0
- package/dist/HuePicker-5QIUR6L7.css +18 -0
- package/dist/ImageUpload/index.js +3 -2
- package/dist/ListInput/index.js +2 -2
- package/dist/OrgLabel/index.js +3 -2
- package/dist/OrgNode/index.js +4 -3
- package/dist/OrgTable/index.js +4 -3
- package/dist/SegmentedControl/index.js +4 -2
- package/dist/Tabs/index.js +2 -1
- package/dist/Tabs/roving.d.ts +9 -1
- package/dist/TagsInput/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +5 -3
- package/dist/TimeWindowPicker/index.js +3 -3
- package/dist/TreeCanvas/TreeCanvas.d.ts +5 -13
- package/dist/chunk-26TXVHN2.js +31 -0
- package/dist/chunk-3UK4VFSK.js +67 -0
- package/dist/{chunk-B47YUQGM.js → chunk-6OF2DBKY.js} +1 -1
- package/dist/{chunk-6SIG5I72.js → chunk-7FFDJQ23.js} +1 -1
- package/dist/chunk-AYKXMIOR.js +13 -0
- package/dist/chunk-CBOICT64.js +74 -0
- package/dist/{chunk-WSOFKOLP.js → chunk-DDTDN5L2.js} +1 -1
- package/dist/{chunk-A3K56LY6.js → chunk-EUT7VBQG.js} +4 -4
- package/dist/{chunk-DRHXRGB6.js → chunk-HEOVQZL7.js} +3 -62
- package/dist/chunk-HI6Q2UXQ.js +169 -0
- package/dist/{chunk-VCOELPCT.js → chunk-IHGKPEEV.js} +1 -1
- package/dist/{chunk-W4GQWFRX.js → chunk-LAQK4V3Z.js} +1 -1
- package/dist/{chunk-N5KCGFWI.js → chunk-LPHHDCN3.js} +2 -3
- package/dist/chunk-UI6HWAWE.js +2 -0
- package/dist/chunk-UO5UK7V2.js +73 -0
- package/dist/{chunk-RHHGLTXJ.js → chunk-X6K6OZ47.js} +1 -1
- package/dist/generated/index.d.ts +2 -0
- package/dist/generated/index.js +38 -32
- package/dist/index.js +38 -32
- package/dist/styles.css +223 -35
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -1
- package/dist/utils/nodeHue.d.ts +25 -0
- package/dist/utils/tone.d.ts +4 -1
- package/package.json +3 -3
- package/dist/Avatar-XID7Z74C.css +0 -200
- package/dist/chunk-IA232OTU.js +0 -156
- package/dist/{chunk-4JHWMJZI.js → chunk-6HXH57BL.js} +1 -1
- package/dist/{chunk-IJ7QXNIJ.js → chunk-AER7UDD4.js} +0 -0
- package/dist/{chunk-KTIEJ5Q5.js → chunk-CVB7O3SZ.js} +1 -1
- package/dist/{chunk-BXPLX7YU.js → chunk-IGWPZZIB.js} +1 -1
- package/dist/{chunk-HVPC2GHY.js → chunk-IZHN5I3H.js} +1 -1
- package/dist/{chunk-DBUGBINU.js → chunk-MPXI6FM6.js} +1 -1
- /package/dist/{chunk-PKIN4IMB.js → chunk-YPTC4TX5.js} +0 -0
package/dist/styles.css
CHANGED
|
@@ -1088,25 +1088,34 @@
|
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
1090
|
|
|
1091
|
-
/* Avatar-
|
|
1091
|
+
/* Avatar-QHYOFID3.css */
|
|
1092
1092
|
/*
|
|
1093
1093
|
* The identity badge.
|
|
1094
1094
|
*
|
|
1095
|
-
* IT IS NEUTRAL, and
|
|
1096
|
-
* a seat by `PALETTE[hash(name) % 8]`, over the
|
|
1097
|
-
* spent on phases and event categories, so one
|
|
1098
|
-
* phase", "the decision category" and "the Analyst"
|
|
1099
|
-
* carries no information: rename the seat and its
|
|
1100
|
-
* proof it never meant anything. Identity is the
|
|
1101
|
-
* agent, a circle for a person), the monogram and
|
|
1095
|
+
* IT IS NEUTRAL UNLESS SOMEBODY CHOSE OTHERWISE, and a hash never chooses. The
|
|
1096
|
+
* system this replaces coloured a seat by `PALETTE[hash(name) % 8]`, over the
|
|
1097
|
+
* same eight families it also spent on phases and event categories, so one
|
|
1098
|
+
* amber meant "the execute phase", "the decision category" and "the Analyst"
|
|
1099
|
+
* at once. A hash of a name carries no information: rename the seat and its
|
|
1100
|
+
* colour changes, which is the proof it never meant anything. Identity is the
|
|
1101
|
+
* OUTLINE (a squircle for an agent, a circle for a person), the monogram and
|
|
1102
|
+
* the name, and for an agent an operator gave one, its character and its hue.
|
|
1102
1103
|
*
|
|
1103
|
-
*
|
|
1104
|
-
* the
|
|
1104
|
+
* A STATE IS A CORNER BADGE, NEVER A LINE ROUND THE PLATE. A ring in a state's
|
|
1105
|
+
* hue round a plate in the agent's own hue put two colours on a 32px mark and
|
|
1106
|
+
* framed what the agent was doing louder than who it is. The one ring left is
|
|
1107
|
+
* SELECTED, in the accent.
|
|
1105
1108
|
*
|
|
1106
1109
|
* The seeded tints stay for the one case that earns them, a roster somebody
|
|
1107
1110
|
* scans, and their grounds are TOKENS: measured under white initials and held
|
|
1108
1111
|
* at 4.5:1 by the palette suite. Spelled as literals, five of the ten sat
|
|
1109
1112
|
* under that floor while the suite measured ten values nothing painted with.
|
|
1113
|
+
*
|
|
1114
|
+
* AN AGENT'S OWN HUE IS NOT A HASH. An agent an operator gave a Crewlet
|
|
1115
|
+
* character and a hue is drawn as that character, in that hue, on a plate of
|
|
1116
|
+
* it: the hue was chosen for the seat and survives a rename, which a hash of
|
|
1117
|
+
* the name never did. It is one of the six node hues (`NodeHue`), each a
|
|
1118
|
+
* measured set of steps rather than a colour with alphas applied here.
|
|
1110
1119
|
*/
|
|
1111
1120
|
|
|
1112
1121
|
.crewlet-avatar {
|
|
@@ -1238,11 +1247,69 @@
|
|
|
1238
1247
|
.crewlet-avatar--tint-8 { background: var(--color-avatar-tint-8); }
|
|
1239
1248
|
.crewlet-avatar--tint-9 { background: var(--color-avatar-tint-9); }
|
|
1240
1249
|
|
|
1241
|
-
/* ──
|
|
1250
|
+
/* ── an agent's character ─────────────────────────────────────────────── */
|
|
1251
|
+
|
|
1252
|
+
/*
|
|
1253
|
+
* THE CHARACTER FILLS MOST OF THE PLATE, centred by its own frame (it frames
|
|
1254
|
+
* every silhouette square on what it draws), with the plate's corner clear of
|
|
1255
|
+
* it: a wide character such as the original Crewlet reaches the plate's
|
|
1256
|
+
* sides, a tall one its top and its foot, and none touches the curve.
|
|
1257
|
+
*/
|
|
1258
|
+
.crewlet-avatar--character {
|
|
1259
|
+
border: 1px solid transparent;
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.crewlet-avatar__character {
|
|
1263
|
+
display: block;
|
|
1264
|
+
flex: none;
|
|
1265
|
+
width: 74%;
|
|
1266
|
+
height: 74%;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
/* The plate an agent's hue is drawn on: the hue's fill, its line round the
|
|
1270
|
+
badge and the hue itself as the character's ink. */
|
|
1271
|
+
.crewlet-avatar--hue-purple {
|
|
1272
|
+
background: var(--color-node-purple-fill);
|
|
1273
|
+
border-color: var(--color-node-purple-line);
|
|
1274
|
+
color: var(--color-node-purple);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
.crewlet-avatar--hue-cyan {
|
|
1278
|
+
background: var(--color-node-cyan-fill);
|
|
1279
|
+
border-color: var(--color-node-cyan-line);
|
|
1280
|
+
color: var(--color-node-cyan);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.crewlet-avatar--hue-green {
|
|
1284
|
+
background: var(--color-node-green-fill);
|
|
1285
|
+
border-color: var(--color-node-green-line);
|
|
1286
|
+
color: var(--color-node-green);
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
.crewlet-avatar--hue-amber {
|
|
1290
|
+
background: var(--color-node-amber-fill);
|
|
1291
|
+
border-color: var(--color-node-amber-line);
|
|
1292
|
+
color: var(--color-node-amber);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
.crewlet-avatar--hue-rose {
|
|
1296
|
+
background: var(--color-node-rose-fill);
|
|
1297
|
+
border-color: var(--color-node-rose-line);
|
|
1298
|
+
color: var(--color-node-rose);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.crewlet-avatar--hue-blue {
|
|
1302
|
+
background: var(--color-node-blue-fill);
|
|
1303
|
+
border-color: var(--color-node-blue-line);
|
|
1304
|
+
color: var(--color-node-blue);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
/* ── the selected ring ────────────────────────────────────────────────── */
|
|
1242
1308
|
|
|
1243
1309
|
/*
|
|
1244
1310
|
* A 1.5px LINE 2px OUTSIDE THE BADGE, which is the design's ring: it draws a
|
|
1245
1311
|
* 3.5px shadow over a 2px one in the card's colour, and 3.5 less 2 is 1.5.
|
|
1312
|
+
* Longhands, so nothing else that sets an outline resets the ring's geometry.
|
|
1246
1313
|
*
|
|
1247
1314
|
* AN OUTLINE RATHER THAN THAT SHADOW PAIR, for three reasons. The gap is
|
|
1248
1315
|
* TRANSPARENT, so the ring reads on whatever the badge stands on, where the
|
|
@@ -1250,44 +1317,99 @@
|
|
|
1250
1317
|
* other ground. An outline follows the corner, the squircle's included, in
|
|
1251
1318
|
* every engine this package supports. And forced-colors mode keeps an outline
|
|
1252
1319
|
* and drops every shadow, so the ring is still drawn for the readers who most
|
|
1253
|
-
* need a boundary
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
|
|
1259
|
-
* boundary a reader has to see is held to.
|
|
1260
|
-
*/
|
|
1261
|
-
.crewlet-avatar--ring-info,
|
|
1262
|
-
.crewlet-avatar--ring-warning,
|
|
1263
|
-
.crewlet-avatar--ring-danger,
|
|
1264
|
-
.crewlet-avatar--ring-success,
|
|
1320
|
+
* need a boundary.
|
|
1321
|
+
*
|
|
1322
|
+
* SELECTED, in the accent, which is what the accent means: where the reader
|
|
1323
|
+
* is. It is the only place a badge spends the accent, and the accent is
|
|
1324
|
+
* measured at 3:1 as a mark on every opaque surface by @crewlethq/tokens.
|
|
1325
|
+
*/
|
|
1265
1326
|
.crewlet-avatar--ring-brand {
|
|
1266
1327
|
outline-style: solid;
|
|
1267
1328
|
outline-width: 1.5px;
|
|
1268
1329
|
outline-offset: 2px;
|
|
1330
|
+
outline-color: var(--color-brand-accent);
|
|
1269
1331
|
}
|
|
1270
1332
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1333
|
+
/* ── the status badge ─────────────────────────────────────────────────── */
|
|
1334
|
+
|
|
1335
|
+
/*
|
|
1336
|
+
* THE FRAME is the face's own box, so a badge with a status takes exactly the
|
|
1337
|
+
* room one without takes: the corner badge hangs past it rather than growing
|
|
1338
|
+
* it, and a row lays out the same either way. The badge is 0.42 of the box,
|
|
1339
|
+
* never under 10px, which is the size its glyph stays a shape at.
|
|
1340
|
+
*/
|
|
1341
|
+
.crewlet-avatar-frame {
|
|
1342
|
+
--crewlet-avatar-status-size: max(10px, calc(var(--crewlet-avatar-size) * 0.42));
|
|
1343
|
+
--crewlet-avatar-status-overhang: 2px;
|
|
1344
|
+
--crewlet-avatar-status-gap: 1.5px;
|
|
1345
|
+
position: relative;
|
|
1346
|
+
display: inline-flex;
|
|
1347
|
+
flex: none;
|
|
1348
|
+
width: var(--crewlet-avatar-size);
|
|
1349
|
+
height: var(--crewlet-avatar-size);
|
|
1350
|
+
vertical-align: middle;
|
|
1273
1351
|
}
|
|
1274
1352
|
|
|
1275
|
-
|
|
1276
|
-
|
|
1353
|
+
/*
|
|
1354
|
+
* THE NOTCH: the face is masked by a circle a gap wider than the badge, centred
|
|
1355
|
+
* where the badge sits, so the gap shows whatever the badge stands on. A ring
|
|
1356
|
+
* of the ground's colour would need to know that ground, and a badge on a card,
|
|
1357
|
+
* a hovered row and the page would each need a different one. A mask reads only
|
|
1358
|
+
* alpha, so its black is opacity rather than a colour.
|
|
1359
|
+
*/
|
|
1360
|
+
.crewlet-avatar--notched {
|
|
1361
|
+
--crewlet-avatar-status-centre: calc(
|
|
1362
|
+
100% + var(--crewlet-avatar-status-overhang) - var(--crewlet-avatar-status-size) / 2
|
|
1363
|
+
);
|
|
1364
|
+
--crewlet-avatar-status-cut: calc(var(--crewlet-avatar-status-size) / 2 + var(--crewlet-avatar-status-gap));
|
|
1365
|
+
-webkit-mask-image: radial-gradient(
|
|
1366
|
+
circle at var(--crewlet-avatar-status-centre) var(--crewlet-avatar-status-centre),
|
|
1367
|
+
transparent var(--crewlet-avatar-status-cut),
|
|
1368
|
+
#000 calc(var(--crewlet-avatar-status-cut) + 0.5px)
|
|
1369
|
+
);
|
|
1370
|
+
mask-image: radial-gradient(
|
|
1371
|
+
circle at var(--crewlet-avatar-status-centre) var(--crewlet-avatar-status-centre),
|
|
1372
|
+
transparent var(--crewlet-avatar-status-cut),
|
|
1373
|
+
#000 calc(var(--crewlet-avatar-status-cut) + 0.5px)
|
|
1374
|
+
);
|
|
1277
1375
|
}
|
|
1278
1376
|
|
|
1279
|
-
|
|
1280
|
-
|
|
1377
|
+
/*
|
|
1378
|
+
* THE BADGE: a state's fill step carrying its glyph in the inverse ink, which
|
|
1379
|
+
* the tokens' palette suite holds at 3:1 on each fill (`MARK_ON_FILL`). The
|
|
1380
|
+
* transparent outline is drawn only in forced-colors mode, where the fill
|
|
1381
|
+
* becomes the page's own colour and the outline is what keeps a boundary.
|
|
1382
|
+
*/
|
|
1383
|
+
.crewlet-avatar__status {
|
|
1384
|
+
position: absolute;
|
|
1385
|
+
right: calc(var(--crewlet-avatar-status-overhang) * -1);
|
|
1386
|
+
bottom: calc(var(--crewlet-avatar-status-overhang) * -1);
|
|
1387
|
+
display: grid;
|
|
1388
|
+
place-items: center;
|
|
1389
|
+
width: var(--crewlet-avatar-status-size);
|
|
1390
|
+
height: var(--crewlet-avatar-status-size);
|
|
1391
|
+
border-radius: var(--radius-circle);
|
|
1392
|
+
outline: 1px solid transparent;
|
|
1393
|
+
color: var(--color-text-inverse);
|
|
1394
|
+
pointer-events: none;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
.crewlet-avatar__status > svg {
|
|
1398
|
+
display: block;
|
|
1399
|
+
width: 100%;
|
|
1400
|
+
height: 100%;
|
|
1281
1401
|
}
|
|
1282
1402
|
|
|
1283
|
-
.crewlet-
|
|
1284
|
-
|
|
1403
|
+
.crewlet-avatar__status--working {
|
|
1404
|
+
background: var(--color-feedback-info);
|
|
1285
1405
|
}
|
|
1286
1406
|
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1407
|
+
.crewlet-avatar__status--needs {
|
|
1408
|
+
background: var(--color-feedback-warning);
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.crewlet-avatar__status--stopped {
|
|
1412
|
+
background: var(--color-feedback-danger);
|
|
1291
1413
|
}
|
|
1292
1414
|
|
|
1293
1415
|
|
|
@@ -2877,6 +2999,51 @@
|
|
|
2877
2999
|
}
|
|
2878
3000
|
|
|
2879
3001
|
|
|
3002
|
+
/* CharacterPicker-ZEYIKUNQ.css */
|
|
3003
|
+
/*
|
|
3004
|
+
* The grid of characters.
|
|
3005
|
+
*
|
|
3006
|
+
* SIX COLUMNS, ALWAYS, and the tiles share the width: the arrow keys move a
|
|
3007
|
+
* whole row on Up and Down, so a row has to hold the same options at every
|
|
3008
|
+
* width (`CHARACTER_PICKER_COLUMNS`). A tile is a target the size of the
|
|
3009
|
+
* badge it holds and the gap round it, never smaller than the kit's control
|
|
3010
|
+
* floor.
|
|
3011
|
+
*/
|
|
3012
|
+
|
|
3013
|
+
.crewlet-character-picker {
|
|
3014
|
+
display: grid;
|
|
3015
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
3016
|
+
gap: var(--spacing-1);
|
|
3017
|
+
justify-items: center;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
.crewlet-character-picker__option {
|
|
3021
|
+
display: grid;
|
|
3022
|
+
place-items: center;
|
|
3023
|
+
min-width: var(--size-control-lg);
|
|
3024
|
+
min-height: var(--size-control-lg);
|
|
3025
|
+
padding: var(--spacing-1);
|
|
3026
|
+
border: 0;
|
|
3027
|
+
border-radius: var(--radius-md);
|
|
3028
|
+
background: transparent;
|
|
3029
|
+
cursor: pointer;
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
.crewlet-character-picker__option:hover:not(:disabled) {
|
|
3033
|
+
background: var(--color-surface-hover);
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
.crewlet-character-picker__option:focus-visible {
|
|
3037
|
+
outline: 2px solid var(--color-focus);
|
|
3038
|
+
outline-offset: 2px;
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
.crewlet-character-picker__option:disabled {
|
|
3042
|
+
cursor: not-allowed;
|
|
3043
|
+
opacity: 0.5;
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
|
|
2880
3047
|
/* Charts-JUERFLAR.css */
|
|
2881
3048
|
/* The chart kit: a legend, a ranked bar list, a stacked bar, stacked
|
|
2882
3049
|
columns, an activity strip, a time series and the reading layer they share. Hand-drawn rather than a charting library, for one reason that
|
|
@@ -7978,6 +8145,27 @@ svg.crewlet-datetime__chevron {
|
|
|
7978
8145
|
}
|
|
7979
8146
|
|
|
7980
8147
|
|
|
8148
|
+
/* HuePicker-5QIUR6L7.css */
|
|
8149
|
+
/*
|
|
8150
|
+
* A hue's swatch: the hue itself, as a dot beside its name. The name carries
|
|
8151
|
+
* the choice; the dot is there so the row can be scanned for a colour.
|
|
8152
|
+
*/
|
|
8153
|
+
|
|
8154
|
+
.crewlet-hue-picker__swatch {
|
|
8155
|
+
display: block;
|
|
8156
|
+
width: var(--spacing-3);
|
|
8157
|
+
height: var(--spacing-3);
|
|
8158
|
+
border-radius: var(--radius-circle);
|
|
8159
|
+
}
|
|
8160
|
+
|
|
8161
|
+
.crewlet-hue-picker__swatch--purple { background: var(--color-node-purple); }
|
|
8162
|
+
.crewlet-hue-picker__swatch--cyan { background: var(--color-node-cyan); }
|
|
8163
|
+
.crewlet-hue-picker__swatch--green { background: var(--color-node-green); }
|
|
8164
|
+
.crewlet-hue-picker__swatch--amber { background: var(--color-node-amber); }
|
|
8165
|
+
.crewlet-hue-picker__swatch--rose { background: var(--color-node-rose); }
|
|
8166
|
+
.crewlet-hue-picker__swatch--blue { background: var(--color-node-blue); }
|
|
8167
|
+
|
|
8168
|
+
|
|
7981
8169
|
/* IconButton-VYWP6SGW.css */
|
|
7982
8170
|
/*
|
|
7983
8171
|
* IconButton: a square icon-only control.
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ export { cx } from './cx.js';
|
|
|
2
2
|
export { useClipboard, writeClipboard } from './useClipboard.js';
|
|
3
3
|
export type { Clipboard, ClipboardOptions, ClipboardState } from './useClipboard.js';
|
|
4
4
|
export type { Tone } from './tone.js';
|
|
5
|
+
export { NODE_HUES, NODE_HUE_NAMES, isNodeHue } from './nodeHue.js';
|
|
6
|
+
export type { NodeHue } from './nodeHue.js';
|
|
5
7
|
export { HeadingLevelProvider, headingTag, nextHeadingLevel, useHeadingLevel } from './headingLevel.js';
|
|
6
8
|
export type { HeadingLevel, HeadingLevelProviderProps } from './headingLevel.js';
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import '../chunk-
|
|
1
|
+
import '../chunk-AER7UDD4.js';
|
|
2
|
+
export { NODE_HUES, NODE_HUE_NAMES, isNodeHue } from '../chunk-AYKXMIOR.js';
|
|
2
3
|
export { useClipboard, writeClipboard } from '../chunk-5VNUYO76.js';
|
|
3
4
|
export { HeadingLevelProvider, headingTag, nextHeadingLevel, useHeadingLevel } from '../chunk-PQADV6P6.js';
|
|
4
5
|
export { cx } from '../chunk-ODEQTPFM.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The six hues an entity is told apart by, where an operator has chosen one.
|
|
3
|
+
*
|
|
4
|
+
* DECORATIVE AND PER ENTITY, never a series and never a state: two things
|
|
5
|
+
* sharing a hue say nothing, so the palette is not measured for separability
|
|
6
|
+
* and nothing owes a legend (`--color-node-*` in the tokens package says the
|
|
7
|
+
* same). It is what an operator picks for one agent so they can find it
|
|
8
|
+
* again: on its avatar, on its card in a chart and on its row in a table.
|
|
9
|
+
*
|
|
10
|
+
* CHOSEN, NEVER DERIVED. A hue hashed from a name carries no information:
|
|
11
|
+
* rename the seat and its colour changes, which is the proof it never meant
|
|
12
|
+
* anything. A hue a person picked survives a rename because it was never
|
|
13
|
+
* made from one.
|
|
14
|
+
*
|
|
15
|
+
* A NAMED SET RATHER THAN A COLOUR. A caller that could hand in any colour
|
|
16
|
+
* would hand in a literal, and the fill, the border and the ink of a tinted
|
|
17
|
+
* surface are measured steps of one hue rather than one value with alphas
|
|
18
|
+
* applied by whoever drew it last.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NODE_HUES: readonly ["purple", "cyan", "green", "amber", "rose", "blue"];
|
|
21
|
+
export type NodeHue = (typeof NODE_HUES)[number];
|
|
22
|
+
/** Each hue's name, for a label: `Cyan`. */
|
|
23
|
+
export declare const NODE_HUE_NAMES: Readonly<Record<NodeHue, string>>;
|
|
24
|
+
/** Whether a value read off the wire names one of the six hues. */
|
|
25
|
+
export declare const isNodeHue: (value: unknown) => value is NodeHue;
|
package/dist/utils/tone.d.ts
CHANGED
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
* A tone says what a thing IS, never who it is: success, warning, danger and
|
|
10
10
|
* info are states, `brand` is where the reader is, and everything else is
|
|
11
11
|
* neutral. Identity (a seat, a node, a vendor, a tool) takes neutral colour and
|
|
12
|
-
* is carried by its name, its glyph and its position
|
|
12
|
+
* is carried by its name, its glyph and its position, with ONE exception that
|
|
13
|
+
* is not a tone: an agent an operator has given a hue of its own wears it
|
|
14
|
+
* ([NodeHue] in `nodeHue.ts`), because a hue somebody chose names that agent
|
|
15
|
+
* the way its name does, where a hue hashed from the name named nothing.
|
|
13
16
|
*
|
|
14
17
|
* So does a CATEGORY. A phase, a unit or a model is neutral with its word, and
|
|
15
18
|
* inside a figure it is a series its legend names, from the data ramp the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewlethq/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Crewlet shared React components built on @crewlethq/tokens and @crewlethq/icons.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"clean": "rm -rf dist src/generated"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@crewlethq/icons": "0.
|
|
46
|
-
"@crewlethq/tokens": "0.
|
|
45
|
+
"@crewlethq/icons": "0.10.0",
|
|
46
|
+
"@crewlethq/tokens": "0.10.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=18",
|
package/dist/Avatar-XID7Z74C.css
DELETED
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* The identity badge.
|
|
3
|
-
*
|
|
4
|
-
* IT IS NEUTRAL, and that is the whole rule. The system this replaces coloured
|
|
5
|
-
* a seat by `PALETTE[hash(name) % 8]`, over the same eight families it also
|
|
6
|
-
* spent on phases and event categories, so one amber meant "the execute
|
|
7
|
-
* phase", "the decision category" and "the Analyst" at once. A hash of a name
|
|
8
|
-
* carries no information: rename the seat and its colour changes, which is the
|
|
9
|
-
* proof it never meant anything. Identity is the OUTLINE (a squircle for an
|
|
10
|
-
* agent, a circle for a person), the monogram and the name.
|
|
11
|
-
*
|
|
12
|
-
* THE ONE HUE A BADGE CARRIES IS A STATE, as a ring round it, and the ring is
|
|
13
|
-
* the component's only coloured line.
|
|
14
|
-
*
|
|
15
|
-
* The seeded tints stay for the one case that earns them, a roster somebody
|
|
16
|
-
* scans, and their grounds are TOKENS: measured under white initials and held
|
|
17
|
-
* at 4.5:1 by the palette suite. Spelled as literals, five of the ten sat
|
|
18
|
-
* under that floor while the suite measured ten values nothing painted with.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
.crewlet-avatar {
|
|
22
|
-
--crewlet-avatar-size: 32px;
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
flex: none;
|
|
27
|
-
width: var(--crewlet-avatar-size);
|
|
28
|
-
height: var(--crewlet-avatar-size);
|
|
29
|
-
overflow: hidden;
|
|
30
|
-
object-fit: cover;
|
|
31
|
-
font-family: var(--font-family-sans);
|
|
32
|
-
font-size: var(--font-size-xs);
|
|
33
|
-
font-weight: var(--font-weight-semibold);
|
|
34
|
-
letter-spacing: var(--font-letter-spacing-wide);
|
|
35
|
-
/* The document's own leading rather than a tight step of the badge's own.
|
|
36
|
-
The box is a fixed square that centres whatever line it holds, so the ink
|
|
37
|
-
lands in the same place either way; what the tight step bought was one
|
|
38
|
-
more number in a component that already sets four. */
|
|
39
|
-
line-height: var(--font-line-height-body);
|
|
40
|
-
text-transform: uppercase;
|
|
41
|
-
user-select: none;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/*
|
|
46
|
-
* The four steps. Each pairs its box with a type step, so two initials sit
|
|
47
|
-
* inside the outline at every one of them. A numeric size sets the same
|
|
48
|
-
* `--crewlet-avatar-size` inline and computes its own type, because nothing in
|
|
49
|
-
* the scale can answer for an arbitrary box; everything else it takes from the
|
|
50
|
-
* rules below exactly as a step does.
|
|
51
|
-
*/
|
|
52
|
-
.crewlet-avatar--xs {
|
|
53
|
-
--crewlet-avatar-size: 20px;
|
|
54
|
-
font-size: var(--font-size-2xs);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.crewlet-avatar--sm {
|
|
58
|
-
--crewlet-avatar-size: 26px;
|
|
59
|
-
font-size: var(--font-size-2xs);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.crewlet-avatar--md {
|
|
63
|
-
--crewlet-avatar-size: 32px;
|
|
64
|
-
font-size: var(--font-size-xs);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.crewlet-avatar--lg {
|
|
68
|
-
--crewlet-avatar-size: 40px;
|
|
69
|
-
font-size: var(--font-size-sm);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/* ── kinds ─────────────────────────────────────────────────────────────── */
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
* AN AGENT IS A SQUIRCLE, set in the mono face: what the engine runs, named
|
|
76
|
-
* the way a handle is written.
|
|
77
|
-
*
|
|
78
|
-
* THE CORNER MOVES WITH THE BOX, at 0.29 of it (`AVATAR_CORNER_RATIO` in the
|
|
79
|
-
* component, which the suite holds equal to this number): the approved
|
|
80
|
-
* design's 7px at 24 and 9px at 30, as one proportion. It is computed here from
|
|
81
|
-
* the size property every step and every numeric size sets, so there is ONE
|
|
82
|
-
* ladder. There used to be two, a step table here and a numeric table in the
|
|
83
|
-
* component, and they disagreed: `size={80}` drew a squarer badge than
|
|
84
|
-
* `size="lg"` at half its width.
|
|
85
|
-
*
|
|
86
|
-
* WHERE THE BROWSER DRAWS A SQUIRCLE, IT IS A WHOLE ONE. `corner-shape:
|
|
87
|
-
* squircle` is a superellipse of exponent 4, which at a given radius reaches
|
|
88
|
-
* much closer to the box's corner than a circular arc does: at the 45 degree
|
|
89
|
-
* point it stands 0.159 of the radius in from each edge, against 0.293 for an
|
|
90
|
-
* arc. Kept at 0.29 of the box, that corner would stand 0.046 of the box in,
|
|
91
|
-
* half the design's depth and a nearly square badge. At half the box it stands
|
|
92
|
-
* 0.0795 of the box in, against the design's 0.0849 (0.13px at 24px), with the
|
|
93
|
-
* continuous curvature a squircle is for. So the corner is the circle token
|
|
94
|
-
* there, and the fallback above is what every other browser draws.
|
|
95
|
-
*/
|
|
96
|
-
.crewlet-avatar--agent {
|
|
97
|
-
border-radius: calc(var(--crewlet-avatar-size) * 0.29);
|
|
98
|
-
font-family: var(--font-family-mono);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
@supports (corner-shape: squircle) {
|
|
102
|
-
.crewlet-avatar--agent {
|
|
103
|
-
corner-shape: squircle;
|
|
104
|
-
border-radius: var(--radius-circle);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* A PERSON IS A CIRCLE, set in the sans face, the round badge every member list
|
|
109
|
-
a reader has used already speaks. */
|
|
110
|
-
.crewlet-avatar--human {
|
|
111
|
-
border-radius: var(--radius-circle);
|
|
112
|
-
font-family: var(--font-family-sans);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.crewlet-avatar--image {
|
|
116
|
-
display: block;
|
|
117
|
-
object-fit: cover;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/* ── tones ─────────────────────────────────────────────────────────────── */
|
|
121
|
-
|
|
122
|
-
.crewlet-avatar--fallback {
|
|
123
|
-
border: 1px solid transparent;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/* The design's badge: the raised rung with the strong hairline round it and
|
|
127
|
-
the secondary ink, so a badge on a card reads as a mark standing on it
|
|
128
|
-
rather than as a hole in it. */
|
|
129
|
-
.crewlet-avatar--neutral {
|
|
130
|
-
background: var(--color-surface-elevated);
|
|
131
|
-
border-color: var(--color-border-strong);
|
|
132
|
-
color: var(--color-text-secondary);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.crewlet-avatar--seeded {
|
|
136
|
-
color: var(--color-text-on-accent);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.crewlet-avatar--tint-0 { background: var(--color-avatar-tint-0); }
|
|
140
|
-
.crewlet-avatar--tint-1 { background: var(--color-avatar-tint-1); }
|
|
141
|
-
.crewlet-avatar--tint-2 { background: var(--color-avatar-tint-2); }
|
|
142
|
-
.crewlet-avatar--tint-3 { background: var(--color-avatar-tint-3); }
|
|
143
|
-
.crewlet-avatar--tint-4 { background: var(--color-avatar-tint-4); }
|
|
144
|
-
.crewlet-avatar--tint-5 { background: var(--color-avatar-tint-5); }
|
|
145
|
-
.crewlet-avatar--tint-6 { background: var(--color-avatar-tint-6); }
|
|
146
|
-
.crewlet-avatar--tint-7 { background: var(--color-avatar-tint-7); }
|
|
147
|
-
.crewlet-avatar--tint-8 { background: var(--color-avatar-tint-8); }
|
|
148
|
-
.crewlet-avatar--tint-9 { background: var(--color-avatar-tint-9); }
|
|
149
|
-
|
|
150
|
-
/* ── the state ring ────────────────────────────────────────────────────── */
|
|
151
|
-
|
|
152
|
-
/*
|
|
153
|
-
* A 1.5px LINE 2px OUTSIDE THE BADGE, which is the design's ring: it draws a
|
|
154
|
-
* 3.5px shadow over a 2px one in the card's colour, and 3.5 less 2 is 1.5.
|
|
155
|
-
*
|
|
156
|
-
* AN OUTLINE RATHER THAN THAT SHADOW PAIR, for three reasons. The gap is
|
|
157
|
-
* TRANSPARENT, so the ring reads on whatever the badge stands on, where the
|
|
158
|
-
* design's gap is the card's own fill and cuts a card-coloured band into any
|
|
159
|
-
* other ground. An outline follows the corner, the squircle's included, in
|
|
160
|
-
* every engine this package supports. And forced-colors mode keeps an outline
|
|
161
|
-
* and drops every shadow, so the ring is still drawn for the readers who most
|
|
162
|
-
* need a boundary; it is drawn in the system colour there, which is why the
|
|
163
|
-
* state is always said in words beside the badge as well.
|
|
164
|
-
*
|
|
165
|
-
* LONGHANDS, so the tone rules below set the colour alone and cannot reset the
|
|
166
|
-
* geometry, whichever order they are read in. Each fill is measured at 3:1 as
|
|
167
|
-
* a mark on every opaque surface by @crewlethq/tokens, which is the floor a
|
|
168
|
-
* boundary a reader has to see is held to.
|
|
169
|
-
*/
|
|
170
|
-
.crewlet-avatar--ring-info,
|
|
171
|
-
.crewlet-avatar--ring-warning,
|
|
172
|
-
.crewlet-avatar--ring-danger,
|
|
173
|
-
.crewlet-avatar--ring-success,
|
|
174
|
-
.crewlet-avatar--ring-brand {
|
|
175
|
-
outline-style: solid;
|
|
176
|
-
outline-width: 1.5px;
|
|
177
|
-
outline-offset: 2px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.crewlet-avatar--ring-info {
|
|
181
|
-
outline-color: var(--color-feedback-info);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.crewlet-avatar--ring-warning {
|
|
185
|
-
outline-color: var(--color-feedback-warning);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.crewlet-avatar--ring-danger {
|
|
189
|
-
outline-color: var(--color-feedback-danger);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.crewlet-avatar--ring-success {
|
|
193
|
-
outline-color: var(--color-feedback-success);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/* SELECTED, in the accent, which is what the accent means: where the reader
|
|
197
|
-
is. It is the only place a badge spends the accent. */
|
|
198
|
-
.crewlet-avatar--ring-brand {
|
|
199
|
-
outline-color: var(--color-brand-accent);
|
|
200
|
-
}
|