@crewlethq/ui 0.51.0 → 0.52.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 +14 -0
- package/dist/AgentHandoffPanel/index.js +3 -3
- package/dist/ArrangeList/index.js +3 -3
- package/dist/ArtifactCard/index.js +3 -3
- package/dist/Checkbox/index.js +2 -2
- package/dist/ChoiceButtons/ChoiceButtons.d.ts +21 -1
- package/dist/ChoiceButtons/index.d.ts +1 -1
- package/dist/ChoiceButtons/index.js +1 -1
- package/dist/{ChoiceButtons-FLIFXFFS.css → ChoiceButtons-HWXEF2H3.css} +60 -0
- package/dist/ColorField/index.js +2 -2
- package/dist/Combobox/index.js +2 -2
- package/dist/CommandPalette/index.js +2 -2
- package/dist/CommentThread/index.js +3 -3
- package/dist/Composer/index.js +2 -2
- package/dist/ConfirmField/index.js +2 -2
- package/dist/DataGrid/index.js +3 -3
- package/dist/DataTable/index.js +3 -3
- package/dist/DataView/index.js +4 -4
- package/dist/DocTabsEditor/index.js +2 -2
- package/dist/{Editor-MLGK3KOG.js → Editor-SZFWVDAU.js} +2 -2
- package/dist/Input/FormField.d.ts +7 -1
- package/dist/Input/index.js +1 -1
- package/dist/{Input-VDSV7VWJ.css → Input-GMOWHZRG.css} +9 -0
- package/dist/ListInput/ListInput.d.ts +2 -0
- package/dist/ListInput/index.js +2 -2
- package/dist/{ListInput-P2ECUQJ2.css → ListInput-RLQND5QK.css} +30 -6
- package/dist/LogoSlot/LogoSlot.d.ts +9 -1
- package/dist/LogoSlot/LogoSlotGroup.d.ts +38 -0
- package/dist/LogoSlot/index.d.ts +3 -1
- package/dist/LogoSlot/index.js +1 -1
- package/dist/{LogoSlot-T2UFOJXU.css → LogoSlot-ETD74ELF.css} +98 -0
- package/dist/PrincipalPicker/index.js +3 -3
- package/dist/RichEditor/index.js +1 -1
- package/dist/SheetColumnEditor/index.js +3 -3
- package/dist/Switcher/index.js +2 -2
- package/dist/TimeWindowPicker/index.js +2 -2
- package/dist/{chunk-ZCIL5IHU.js → chunk-2GIWL7IS.js} +1 -1
- package/dist/{chunk-V7GOOXPK.js → chunk-3NXWH5NC.js} +1 -1
- package/dist/{chunk-WQ7S7CKZ.js → chunk-5O72FSOK.js} +1 -1
- package/dist/{chunk-73WHPLWQ.js → chunk-5WYPSVRX.js} +1 -1
- package/dist/{chunk-R6R2UHVG.js → chunk-6VQA2LZC.js} +1 -1
- package/dist/{chunk-FB5CFQTG.js → chunk-7PE56HHD.js} +1 -1
- package/dist/{chunk-P5JBDHWC.js → chunk-C6Z3MLSA.js} +1 -1
- package/dist/{chunk-UUTEWGO6.js → chunk-CQEYF3UW.js} +6 -4
- package/dist/{chunk-S63QOMXC.js → chunk-CUL5XV6O.js} +1 -1
- package/dist/{chunk-H7NMJ5AI.js → chunk-EZ43L6T7.js} +1 -1
- package/dist/{chunk-627KFRON.js → chunk-FNPZ3LLQ.js} +1 -1
- package/dist/{chunk-KHZYAEGZ.js → chunk-G5SUSCWL.js} +1 -1
- package/dist/{chunk-VBIM6HFC.js → chunk-GPZXBJFU.js} +1 -1
- package/dist/{chunk-WX6IJJ4U.js → chunk-GRKGLZFM.js} +2 -2
- package/dist/{chunk-VTSJMDGP.js → chunk-J53T2QAH.js} +2 -2
- package/dist/{chunk-KHP7TJF7.js → chunk-KFR75JOK.js} +1 -1
- package/dist/{chunk-EXRRTKWT.js → chunk-LJHH4WWB.js} +8 -4
- package/dist/{chunk-MIEBOO7Y.js → chunk-NMR7AJSB.js} +1 -1
- package/dist/{chunk-NCHKKYPQ.js → chunk-RQI43UJ7.js} +1 -1
- package/dist/{chunk-H55D66IK.js → chunk-SSHDQBHR.js} +1 -1
- package/dist/{chunk-GHY63X4C.js → chunk-UJ4VVK7R.js} +1 -1
- package/dist/{chunk-2UFUP2ZH.js → chunk-UKE7LTFZ.js} +27 -10
- package/dist/chunk-WXRH7NZW.js +80 -0
- package/dist/generated/index.js +46 -46
- package/dist/index.js +46 -46
- package/dist/styles.css +201 -10
- package/package.json +3 -3
- package/dist/chunk-BWOIUOO3.js +0 -62
package/dist/styles.css
CHANGED
|
@@ -9037,7 +9037,7 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
|
|
|
9037
9037
|
}
|
|
9038
9038
|
|
|
9039
9039
|
|
|
9040
|
-
/* ChoiceButtons-
|
|
9040
|
+
/* ChoiceButtons-HWXEF2H3.css */
|
|
9041
9041
|
/*
|
|
9042
9042
|
* One answer, sent with one press: a column of buttons as tall as a touch
|
|
9043
9043
|
* target, the recommended one first and filled with the accent.
|
|
@@ -9095,6 +9095,17 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
|
|
|
9095
9095
|
background: var(--color-surface-pressed);
|
|
9096
9096
|
}
|
|
9097
9097
|
|
|
9098
|
+
/*
|
|
9099
|
+
* THE OPTION APPLIED is drawn as every chosen option in the package is: the
|
|
9100
|
+
* selected edge over the soft selected fill, calm beside the focus ring, and
|
|
9101
|
+
* held under the pointer so a hover never makes it look unchosen.
|
|
9102
|
+
*/
|
|
9103
|
+
.crewlet-choice-buttons__option.is-chosen,
|
|
9104
|
+
.crewlet-choice-buttons__option.is-chosen:hover {
|
|
9105
|
+
border-color: var(--color-border-selected);
|
|
9106
|
+
background: var(--color-surface-selected);
|
|
9107
|
+
}
|
|
9108
|
+
|
|
9098
9109
|
/*
|
|
9099
9110
|
* The plain option draws the strong hairline, so its ring is drawn over that
|
|
9100
9111
|
* edge rather than a gap away from it, which would read as a second outline.
|
|
@@ -9170,6 +9181,55 @@ button.crewlet-histogram__bar[data-empty]:focus-visible > .crewlet-histogram__fi
|
|
|
9170
9181
|
text-transform: uppercase;
|
|
9171
9182
|
}
|
|
9172
9183
|
|
|
9184
|
+
/* The picture before the words, centred on the label's line. */
|
|
9185
|
+
.crewlet-choice-buttons__media {
|
|
9186
|
+
display: inline-flex;
|
|
9187
|
+
flex: none;
|
|
9188
|
+
align-items: center;
|
|
9189
|
+
align-self: center;
|
|
9190
|
+
}
|
|
9191
|
+
|
|
9192
|
+
/* Before the words, not at the far end with the recommended mark. */
|
|
9193
|
+
.crewlet-choice-buttons__option:has(.crewlet-choice-buttons__media) {
|
|
9194
|
+
justify-content: flex-start;
|
|
9195
|
+
}
|
|
9196
|
+
|
|
9197
|
+
.crewlet-choice-buttons__option:has(.crewlet-choice-buttons__media) .crewlet-choice-buttons__note {
|
|
9198
|
+
margin-inline-start: auto;
|
|
9199
|
+
}
|
|
9200
|
+
|
|
9201
|
+
/*
|
|
9202
|
+
* SMALL: the same option, compact, in a row that wraps. A step and a half
|
|
9203
|
+
* inside, the field's small height, the label at the compact step and its
|
|
9204
|
+
* detail at the micro step, so three suggestions sit under a field without
|
|
9205
|
+
* outweighing it. Every state (hover, press, focus, chosen) is the Inbox's.
|
|
9206
|
+
*/
|
|
9207
|
+
.crewlet-choice-buttons--sm {
|
|
9208
|
+
display: flex;
|
|
9209
|
+
flex-wrap: wrap;
|
|
9210
|
+
gap: var(--spacing-2);
|
|
9211
|
+
}
|
|
9212
|
+
|
|
9213
|
+
.crewlet-choice-buttons--sm .crewlet-choice-buttons__option {
|
|
9214
|
+
gap: var(--spacing-2);
|
|
9215
|
+
min-height: var(--size-control-sm);
|
|
9216
|
+
padding: var(--spacing-1) calc(var(--spacing-2) + var(--spacing-1) / 2);
|
|
9217
|
+
font-size: var(--font-size-xs);
|
|
9218
|
+
line-height: var(--font-line-height-tight);
|
|
9219
|
+
}
|
|
9220
|
+
|
|
9221
|
+
.crewlet-choice-buttons--sm .crewlet-choice-buttons__option:has(.crewlet-choice-buttons__detail) {
|
|
9222
|
+
align-items: center;
|
|
9223
|
+
}
|
|
9224
|
+
|
|
9225
|
+
.crewlet-choice-buttons--sm .crewlet-choice-buttons__text {
|
|
9226
|
+
gap: 1px;
|
|
9227
|
+
}
|
|
9228
|
+
|
|
9229
|
+
.crewlet-choice-buttons--sm .crewlet-choice-buttons__detail {
|
|
9230
|
+
font-size: var(--font-size-2xs);
|
|
9231
|
+
}
|
|
9232
|
+
|
|
9173
9233
|
@media (prefers-reduced-motion: reduce) {
|
|
9174
9234
|
.crewlet-choice-buttons__option {
|
|
9175
9235
|
transition: none;
|
|
@@ -17719,7 +17779,7 @@ a.crewlet-icon-btn {
|
|
|
17719
17779
|
}
|
|
17720
17780
|
|
|
17721
17781
|
|
|
17722
|
-
/* Input-
|
|
17782
|
+
/* Input-GMOWHZRG.css */
|
|
17723
17783
|
/*
|
|
17724
17784
|
* The form row: Input, Textarea, Label, FormField, FormRow, FormSection and
|
|
17725
17785
|
* ReadOnlyField.
|
|
@@ -18302,6 +18362,15 @@ a.crewlet-icon-btn {
|
|
|
18302
18362
|
min-width: 0;
|
|
18303
18363
|
}
|
|
18304
18364
|
|
|
18365
|
+
/* A count that is not a length ("3 of 5"), in the help line's own quiet ink. */
|
|
18366
|
+
.crewlet-form-field__tally {
|
|
18367
|
+
flex: none;
|
|
18368
|
+
color: var(--color-text-tertiary);
|
|
18369
|
+
font-size: var(--font-size-xs);
|
|
18370
|
+
font-variant-numeric: tabular-nums;
|
|
18371
|
+
line-height: var(--font-line-height-normal);
|
|
18372
|
+
}
|
|
18373
|
+
|
|
18305
18374
|
/* SHOWN ONLY WHILE THE FIELD HAS FOCUS (`helperOnFocus`): a dense form reads as
|
|
18306
18375
|
labels and values at rest, and the sentence appears under the field the
|
|
18307
18376
|
reader is in. Still described, so a screen reader hears it on entry. */
|
|
@@ -19359,7 +19428,7 @@ a.crewlet-icon-btn {
|
|
|
19359
19428
|
}
|
|
19360
19429
|
|
|
19361
19430
|
|
|
19362
|
-
/* ListInput-
|
|
19431
|
+
/* ListInput-RLQND5QK.css */
|
|
19363
19432
|
/*
|
|
19364
19433
|
* ListInput: an ordered list of sentences, written in the box at the top and
|
|
19365
19434
|
* listed under it.
|
|
@@ -19423,7 +19492,9 @@ a.crewlet-icon-btn {
|
|
|
19423
19492
|
.crewlet-list-input__item {
|
|
19424
19493
|
display: flex;
|
|
19425
19494
|
align-items: center;
|
|
19426
|
-
|
|
19495
|
+
/* A step and the control's own inset: the ring an edited item draws stands
|
|
19496
|
+
a step clear of its number. */
|
|
19497
|
+
gap: var(--spacing-3);
|
|
19427
19498
|
padding: var(--spacing-1) var(--spacing-3);
|
|
19428
19499
|
border-block-end-width: 1px;
|
|
19429
19500
|
border-block-end-style: solid;
|
|
@@ -19531,11 +19602,28 @@ a.crewlet-icon-btn {
|
|
|
19531
19602
|
.crewlet-list-input__item .crewlet-input__control,
|
|
19532
19603
|
.crewlet-list-input__item .crewlet-textarea {
|
|
19533
19604
|
padding-block: var(--spacing-1);
|
|
19534
|
-
|
|
19605
|
+
/*
|
|
19606
|
+
* EDITING NEVER MOVES THE WORDS. The control keeps an inset of its own, so
|
|
19607
|
+
* the boundary that hover and focus draw stands clear of the text rather
|
|
19608
|
+
* than touching its first letter, and a negative margin of the same step
|
|
19609
|
+
* takes it back, so the words sit exactly where they sat at rest and the
|
|
19610
|
+
* caret lands on them without a jump.
|
|
19611
|
+
*/
|
|
19612
|
+
padding-inline: var(--spacing-2);
|
|
19613
|
+
margin-inline: calc(var(--spacing-2) * -1);
|
|
19535
19614
|
}
|
|
19536
19615
|
|
|
19537
19616
|
.crewlet-list-input__index {
|
|
19538
19617
|
flex: none;
|
|
19618
|
+
/*
|
|
19619
|
+
* ON THE TEXT'S FIRST LINE, never centred on a wrapped item: it starts where
|
|
19620
|
+
* the words start (the control's edge and its block inset below the row's
|
|
19621
|
+
* own padding) and takes their line's height, so the number and the words
|
|
19622
|
+
* share a baseline however many lines the item runs to.
|
|
19623
|
+
*/
|
|
19624
|
+
align-self: flex-start;
|
|
19625
|
+
padding-block-start: calc(1px + var(--spacing-1));
|
|
19626
|
+
line-height: calc(var(--font-size-compact) * var(--font-line-height-normal));
|
|
19539
19627
|
min-width: var(--spacing-4);
|
|
19540
19628
|
text-align: center;
|
|
19541
19629
|
font-size: var(--font-size-xs);
|
|
@@ -19619,11 +19707,16 @@ a.crewlet-icon-btn {
|
|
|
19619
19707
|
}
|
|
19620
19708
|
}
|
|
19621
19709
|
|
|
19622
|
-
/*
|
|
19710
|
+
/*
|
|
19711
|
+
* The Add button ends the box's row: the field and its Add read as one
|
|
19712
|
+
* control. It is the field's height (the medium control step a one-line box
|
|
19713
|
+
* stands at) and sits on the box's first line, so the two share one line and
|
|
19714
|
+
* the button stays put as a long item grows the box under it.
|
|
19715
|
+
*/
|
|
19623
19716
|
.crewlet-list-input__add-control {
|
|
19624
19717
|
display: inline-flex;
|
|
19625
19718
|
flex: none;
|
|
19626
|
-
align-self:
|
|
19719
|
+
align-self: flex-start;
|
|
19627
19720
|
}
|
|
19628
19721
|
|
|
19629
19722
|
/*
|
|
@@ -19641,11 +19734,11 @@ a.crewlet-icon-btn {
|
|
|
19641
19734
|
}
|
|
19642
19735
|
|
|
19643
19736
|
.crewlet-list-input__item > .crewlet-list-input__field {
|
|
19644
|
-
flex-basis: calc(100% - var(--spacing-4) - var(--spacing-
|
|
19737
|
+
flex-basis: calc(100% - var(--spacing-4) - var(--spacing-3));
|
|
19645
19738
|
}
|
|
19646
19739
|
|
|
19647
19740
|
.crewlet-list-input__item--draggable > .crewlet-list-input__field {
|
|
19648
|
-
flex-basis: calc(100% - var(--spacing-4) * 2 - var(--spacing-
|
|
19741
|
+
flex-basis: calc(100% - var(--spacing-4) * 2 - var(--spacing-3) * 2);
|
|
19649
19742
|
}
|
|
19650
19743
|
|
|
19651
19744
|
.crewlet-list-input__item > .crewlet-list-input__actions {
|
|
@@ -20021,7 +20114,7 @@ a.crewlet-icon-btn {
|
|
|
20021
20114
|
}
|
|
20022
20115
|
|
|
20023
20116
|
|
|
20024
|
-
/* LogoSlot-
|
|
20117
|
+
/* LogoSlot-ETD74ELF.css */
|
|
20025
20118
|
/*
|
|
20026
20119
|
* One of a brand's logos on the ground it is made for. The ground and the ink
|
|
20027
20120
|
* of its guide are the only values here that are not tokens: they arrive
|
|
@@ -20148,6 +20241,13 @@ a.crewlet-icon-btn {
|
|
|
20148
20241
|
opacity: 0.5;
|
|
20149
20242
|
}
|
|
20150
20243
|
|
|
20244
|
+
.crewlet-logo-slot__notes {
|
|
20245
|
+
display: flex;
|
|
20246
|
+
flex-direction: column;
|
|
20247
|
+
gap: var(--spacing-1);
|
|
20248
|
+
min-width: 0;
|
|
20249
|
+
}
|
|
20250
|
+
|
|
20151
20251
|
.crewlet-logo-slot__empty {
|
|
20152
20252
|
margin: 0;
|
|
20153
20253
|
color: var(--color-text-tertiary);
|
|
@@ -20182,6 +20282,97 @@ a.crewlet-icon-btn {
|
|
|
20182
20282
|
font-size: var(--font-size-xs);
|
|
20183
20283
|
}
|
|
20184
20284
|
|
|
20285
|
+
/*
|
|
20286
|
+
* A GROUP OF SLOTS, aligned row by row (LogoSlotGroup.tsx). Each slot is a
|
|
20287
|
+
* subgrid spanning the group's four rows: its name and description, its
|
|
20288
|
+
* stage, what is said under it, and its actions. A row holds the tallest of
|
|
20289
|
+
* its parts across the slots, so every stage, note and action row starts on
|
|
20290
|
+
* one line. The steps between the parts are margins rather than the grid's
|
|
20291
|
+
* gap, so a row no slot uses (no notes anywhere) takes no room at all.
|
|
20292
|
+
*/
|
|
20293
|
+
.crewlet-logo-slot-group {
|
|
20294
|
+
display: flex;
|
|
20295
|
+
flex-direction: column;
|
|
20296
|
+
gap: var(--spacing-3);
|
|
20297
|
+
min-width: 0;
|
|
20298
|
+
}
|
|
20299
|
+
|
|
20300
|
+
.crewlet-logo-slot-group__slots {
|
|
20301
|
+
display: grid;
|
|
20302
|
+
grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr));
|
|
20303
|
+
column-gap: var(--spacing-5);
|
|
20304
|
+
row-gap: var(--spacing-6);
|
|
20305
|
+
}
|
|
20306
|
+
|
|
20307
|
+
.crewlet-logo-slot-group__slots > .crewlet-logo-slot {
|
|
20308
|
+
display: grid;
|
|
20309
|
+
grid-row: span 4;
|
|
20310
|
+
grid-template-rows: subgrid;
|
|
20311
|
+
row-gap: 0;
|
|
20312
|
+
align-content: start;
|
|
20313
|
+
}
|
|
20314
|
+
|
|
20315
|
+
.crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__head {
|
|
20316
|
+
grid-row: 1;
|
|
20317
|
+
margin-block-end: var(--spacing-2);
|
|
20318
|
+
}
|
|
20319
|
+
|
|
20320
|
+
.crewlet-logo-slot-group__slots > .crewlet-logo-slot > :is(.crewlet-logo-slot__stage, .crewlet-file-drop) {
|
|
20321
|
+
grid-row: 2;
|
|
20322
|
+
}
|
|
20323
|
+
|
|
20324
|
+
.crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__notes {
|
|
20325
|
+
grid-row: 3;
|
|
20326
|
+
margin-block-start: var(--spacing-2);
|
|
20327
|
+
}
|
|
20328
|
+
|
|
20329
|
+
.crewlet-logo-slot-group__slots > .crewlet-logo-slot > .crewlet-logo-slot__foot {
|
|
20330
|
+
grid-row: 4;
|
|
20331
|
+
margin-block-start: var(--spacing-2);
|
|
20332
|
+
}
|
|
20333
|
+
|
|
20334
|
+
.crewlet-logo-slot-group__hint {
|
|
20335
|
+
margin: 0;
|
|
20336
|
+
color: var(--color-text-tertiary);
|
|
20337
|
+
font-size: var(--font-size-xs);
|
|
20338
|
+
line-height: var(--font-line-height-normal);
|
|
20339
|
+
}
|
|
20340
|
+
|
|
20341
|
+
/*
|
|
20342
|
+
* SMALL: a thumbnail of the slot for a summary of what is set. The stage
|
|
20343
|
+
* keeps its ground, its edge and the space the logo keeps, at half the height
|
|
20344
|
+
* with a tighter inset, and the words step down to the summary's sizes.
|
|
20345
|
+
*/
|
|
20346
|
+
.crewlet-logo-slot--sm {
|
|
20347
|
+
--crewlet-logo-slot-height: calc(var(--size-row-lg) * 1.5);
|
|
20348
|
+
--crewlet-logo-slot-padding: var(--spacing-2);
|
|
20349
|
+
--crewlet-logo-slot-clear: var(--spacing-1);
|
|
20350
|
+
|
|
20351
|
+
gap: var(--spacing-1);
|
|
20352
|
+
}
|
|
20353
|
+
|
|
20354
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__label {
|
|
20355
|
+
font-size: var(--font-size-xs);
|
|
20356
|
+
}
|
|
20357
|
+
|
|
20358
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__description,
|
|
20359
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__empty {
|
|
20360
|
+
font-size: var(--font-size-2xs);
|
|
20361
|
+
}
|
|
20362
|
+
|
|
20363
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__stage {
|
|
20364
|
+
border-radius: var(--radius-md);
|
|
20365
|
+
}
|
|
20366
|
+
|
|
20367
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__placeholder {
|
|
20368
|
+
width: calc(var(--size-row-lg) * 1.5);
|
|
20369
|
+
height: var(--size-row-sm);
|
|
20370
|
+
}
|
|
20371
|
+
|
|
20372
|
+
.crewlet-logo-slot--sm .crewlet-logo-slot__stage--square .crewlet-logo-slot__placeholder {
|
|
20373
|
+
width: var(--size-row-sm);
|
|
20374
|
+
}
|
|
20375
|
+
|
|
20185
20376
|
|
|
20186
20377
|
/* MarkdownEditor-WOKV7CLK.css */
|
|
20187
20378
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewlethq/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.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.52.0",
|
|
46
|
+
"@crewlethq/tokens": "0.52.0",
|
|
47
47
|
"prosemirror-commands": "1.7.2",
|
|
48
48
|
"prosemirror-gapcursor": "1.4.1",
|
|
49
49
|
"prosemirror-history": "1.5.1",
|
package/dist/chunk-BWOIUOO3.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { VisuallyHidden } from './chunk-BZFWDIV6.js';
|
|
2
|
-
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './ChoiceButtons-FLIFXFFS.css';
|
|
4
|
-
import { useId } from 'react';
|
|
5
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
function ChoiceButtons({
|
|
8
|
-
label,
|
|
9
|
-
options,
|
|
10
|
-
recommended,
|
|
11
|
-
recommendedLabel = "Recommended",
|
|
12
|
-
onChoose,
|
|
13
|
-
pending,
|
|
14
|
-
disabledReason,
|
|
15
|
-
className,
|
|
16
|
-
...rest
|
|
17
|
-
}) {
|
|
18
|
-
const reasonId = useId();
|
|
19
|
-
const first = options.find((o) => o.value === recommended);
|
|
20
|
-
const ordered = first ? [first, ...options.filter((o) => o !== first)] : options;
|
|
21
|
-
const busy = pending !== void 0 && pending !== null;
|
|
22
|
-
const inert = busy || disabledReason !== void 0;
|
|
23
|
-
return /* @__PURE__ */ jsxs("div", { ...rest, role: "group", "aria-label": label, className: cx("crewlet-choice-buttons", className), children: [
|
|
24
|
-
ordered.map((option) => {
|
|
25
|
-
const isRecommended = option === first;
|
|
26
|
-
return /* @__PURE__ */ jsxs(
|
|
27
|
-
"button",
|
|
28
|
-
{
|
|
29
|
-
type: "button",
|
|
30
|
-
className: cx("crewlet-choice-buttons__option", isRecommended && "crewlet-choice-buttons__option--recommended"),
|
|
31
|
-
"aria-disabled": inert || void 0,
|
|
32
|
-
"aria-busy": pending === option.value || void 0,
|
|
33
|
-
"aria-describedby": disabledReason === void 0 ? void 0 : reasonId,
|
|
34
|
-
onClick: (event) => {
|
|
35
|
-
if (inert) {
|
|
36
|
-
event.preventDefault();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
onChoose(option.value);
|
|
40
|
-
},
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ jsxs("span", { className: "crewlet-choice-buttons__text", children: [
|
|
43
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__label", children: option.label }),
|
|
44
|
-
option.detail === void 0 ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
-
" ",
|
|
46
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__detail", children: option.detail })
|
|
47
|
-
] })
|
|
48
|
-
] }),
|
|
49
|
-
isRecommended ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
50
|
-
" ",
|
|
51
|
-
/* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__note", children: recommendedLabel })
|
|
52
|
-
] }) : null
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
option.value
|
|
56
|
-
);
|
|
57
|
-
}),
|
|
58
|
-
disabledReason === void 0 ? null : /* @__PURE__ */ jsx(VisuallyHidden, { id: reasonId, children: disabledReason })
|
|
59
|
-
] });
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export { ChoiceButtons };
|