@crewlethq/ui 0.164.0 → 0.165.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 -2
- package/dist/Money/Money.d.ts +23 -0
- package/dist/Money/amounts.d.ts +102 -0
- package/dist/Money/index.d.ts +5 -0
- package/dist/Money/index.js +3 -0
- package/dist/Money-SAHKH4UT.css +8 -0
- package/dist/MoneyField/MoneyField.d.ts +54 -0
- package/dist/MoneyField/index.d.ts +3 -0
- package/dist/MoneyField/index.js +19 -0
- package/dist/MoneyField-4PHZWHJL.css +9 -0
- package/dist/OrgTable/index.js +2 -2
- package/dist/ProposalCard/ProposalCard.d.ts +20 -1
- package/dist/ProposalCard/index.d.ts +1 -1
- package/dist/ProposalCard/index.js +6 -1
- package/dist/Rating/Rating.d.ts +35 -0
- package/dist/Rating/index.d.ts +3 -0
- package/dist/Rating/index.js +2 -0
- package/dist/Rating-HVNMNXPK.css +38 -0
- package/dist/chunk-3XACYHTW.js +18 -0
- package/dist/chunk-G6DKKJN6.js +111 -0
- package/dist/{chunk-WBS7ZTIY.js → chunk-GCUJCO3W.js} +17 -1
- package/dist/chunk-OMMPRYHF.js +53 -0
- package/dist/chunk-P5QLLUKM.js +28 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.js +55 -51
- package/dist/index.js +55 -51
- package/dist/styles.css +64 -0
- package/package.json +3 -3
- package/dist/{chunk-DU2MI637.js → chunk-3O4F5HPW.js} +1 -1
- /package/dist/{chunk-XB6SMI7T.js → chunk-BPR6WAZV.js} +0 -0
package/README.md
CHANGED
|
@@ -42,8 +42,8 @@ import { Button } from '@crewlethq/ui/Button'; // 8 KB of CSS, not 182 KB
|
|
|
42
42
|
| ---- | ---------- |
|
|
43
43
|
| Actions | `Button` and `ButtonLink` (variants `primary`, `secondary`, `outline`, `ghost`, `accent`, `danger`; sizes `small`, `medium`, `large`; shapes `square`, `pill`), `IconButton`, `Menu`, `Link`, `Copyable`, `CopyButton`, `DownloadButton`, `Kbd` |
|
|
44
44
|
| Content and text | `Text` (the eight registers and `inherit`; a line cut by `truncate` or `clamp` shows its whole words on hover), `Prose`, `Statement`, `Document`, `DocumentTitle` and `DocumentTitleField`, the Markdown grammar (`parseMarkdown`, `parseMarkdownSpans`, `markdownInline`, `safeHref` and the line readers, with no React in it), `Highlight`, `InlineCode`, `List` and `ListItem`, `DescriptionList`, `Timeline`, `RelativeTime`, `Note`, `Divider` |
|
|
45
|
-
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `TimeRangePicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `ChoiceCards`, `MemberPicker` (groups granted whole, with members left out or chosen on their own, and `chosenMembers`), `KeyValueRows` (keys and their values as rows under one column head, with `keyValueRowsLabels`), `ChipField` (chosen items as chips inside the field), `PersonRow` (a person or an agent as one row of a list), `Composer`, `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`) |
|
|
46
|
-
| Data display | `DataGrid` (with `useDataGridDriving`, `useAnyDataGridDriving` and `countDataGridRows`), `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`, `TableTwoLineCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper`, `PricingCard`, `Avatar`, `AvatarStack`, `EntityChip`, `CodeBlock`, `QrCode`, `ObjectHeader`, `FactLine`, `SetByLine` (set, seen, observed or confirmed by, with `SET_BY_VERBS`), `GraphCanvas` (a layered map of clusters, groups and three families of line, with its legend, the card beside an entry, the selection dock and fullscreen, its pure layout `layoutGraph`, the trunks `graphTrunks`, the reach `graphReach` and the keyboard walk `graphStep`), `Skeleton`, `Eyebrow`, `StatGroup`, `PinTile`, `IconTile`, `SettingsTable` (with `SettingsTable.Row`), `CatalogTile` |
|
|
45
|
+
| Forms | `Input`, `Textarea`, `Label`, `FormField`, `FormRow`, `Checkbox`, `CheckboxGroup`, `ConfirmField`, `Select`, `Tag`, `TagsInput`, `DateTimePicker`, `TimeWindowPicker`, `TimeRangePicker`, `ImageUpload`, `CharacterPicker`, `HuePicker`, `AvatarPicker`, `FactList`, `ChoiceList`, `ChoiceCards`, `MemberPicker` (groups granted whole, with members left out or chosen on their own, and `chosenMembers`), `KeyValueRows` (keys and their values as rows under one column head, with `keyValueRowsLabels`), `ChipField` (chosen items as chips inside the field), `PersonRow` (a person or an agent as one row of a list), `Composer`, `MarkdownEditor`, `RichEditor` (with `preloadRichEditor`, and the round trip `roundTripMarkdown` and `canonicalMarkdown` from `@crewlethq/ui/RichEditorMarkdown`), `MoneyField` (an amount typed as text, never a number, with `moneyFieldProblem`) |
|
|
46
|
+
| Data display | `DataGrid` (with `useDataGridDriving`, `useAnyDataGridDriving` and `countDataGridRows`), `DataTable`, `CopyableCell`, `Table`, the read-only table cells (`TableKeyCell`, `TableNumberCell`, `TableDateCell`, `TableEntityCell`, `TableStatusCell`, `TableTagsCell`, `TableTextCell`, `TableTwoLineCell`), `StatCard`, `Meter`, `SegmentedMeter`, `Stepper`, `PricingCard`, `Avatar`, `AvatarStack`, `EntityChip`, `CodeBlock`, `QrCode`, `ObjectHeader`, `FactLine`, `SetByLine` (set, seen, observed or confirmed by, with `SET_BY_VERBS`), `GraphCanvas` (a layered map of clusters, groups and three families of line, with its legend, the card beside an entry, the selection dock and fullscreen, its pure layout `layoutGraph`, the trunks `graphTrunks`, the reach `graphReach` and the keyboard walk `graphStep`), `Skeleton`, `Eyebrow`, `StatGroup`, `PinTile`, `IconTile`, `SettingsTable` (with `SettingsTable.Row`), `CatalogTile`, `Money` (an amount drawn from integer micros, with `formatMoney`, `parseMoney`, `moneyDecimal`, `minorUnits`, `sumByCurrency`, `toMicros` and `decimalOf`), `Rating` (stars, read only) |
|
|
47
47
|
| List screens | `DataView`, and its parts on their own: `DataViewToolbar`, `FilterAxisBar`, `FilterAxisChip`, `FilterPill`, plus the filter model (`filterDefsFromColumns`, `applyColumnFilters`, `filterPredicate`, `blankFilterValue`) |
|
|
48
48
|
| Feedback and overlays | `Callout`, `NoticeList` and `groupNotices` (several notices from one source, each said once), `AttentionList` (what needs a person, as rows in one card), `ConflictNote`, `EditingStatus`, `Toaster`, `Modal` (with `variant="sheet"`), `ConfirmModal`, `CommandPalette`, `Tooltip`, `Popover`, `Announcer` |
|
|
49
49
|
| Documents and review | `DiffView` and `DiffSummary` with the line diff they draw (`compareLines`, `compareSequences`, `changedRuns`, `diffStat`, `collapseDiff`, `firstChangedLines`, `splitLines`, with no React in it), `DiffList`, `VersionCompare`, `CommentThread` |
|
|
@@ -208,6 +208,18 @@ places:
|
|
|
208
208
|
- A surface that pans or zooms dispatches `LAYER_REPOSITION_EVENT` on its host
|
|
209
209
|
when the content beneath it moves, and every panel anchored inside follows.
|
|
210
210
|
|
|
211
|
+
## Changes in 0.165.0
|
|
212
|
+
|
|
213
|
+
### Money, star ratings and a note sent back with a decision
|
|
214
|
+
|
|
215
|
+
- **`Money` and `formatMoney(micros, currency, locale)` draw an amount from integer micros**, one unit being 1,000,000 micros, and never through a float: every step is BigInt arithmetic, and the formatter is handed a decimal string already rounded, which `Intl.NumberFormat` reads exactly. Each currency takes its own ISO 4217 digits (none for JPY, three for KWD, four for CLF) from the kit's own table rather than the locale's data, which differs for some; a code ISO does not list is drawn with every digit it has. Rounding is half away from zero. `signDisplay: 'exceptZero'` draws a change ("+€20.00"), and `notation: 'compact'` rounds on purpose for a small tile. `sumByCurrency` adds amounts within a currency and never across two, and `parseMoney` and `moneyDecimal` read what a person typed into micros and write micros back as the decimal a document stores; a comma before exactly three digits is refused, since it groups thousands for some readers and marks decimals for others. A currency code is read as ISO writes it, so `usd` is USD. For display only: a vendor's own amounts follow the vendor's table. Stories: `Money` Currencies, Signs And Notation, Totals Per Currency.
|
|
216
|
+
- **`MoneyField` is an amount a person types**, such as a spending cap: the text as typed and never a number, the currency inside the field after the amount and read as its description, and a placeholder in the currency's own digits. `moneyFieldProblem` says why an amount is refused in the currency's own terms ("EUR takes at most 2 decimal places."). Stories: `MoneyField` Euros, Yen, Kuwaiti Dinar, Too Many Digits.
|
|
217
|
+
- **`Rating` draws stars, read only**: a review's stars or an app's average to the nearest half star, named by the figure it draws, to a tenth in the reader's locale ("Rated 4.6 out of 5"), in the text's ink and the control edge rather than the warning hue, as the sheet's rating cells are. Stories: `Rating` One Review, Average, Scale.
|
|
218
|
+
- **`ProposalCard` takes `reply`** (`ProposalReply`: `label`, `value`, `onValueChange`, `help`): an optional note the person writes to send back with the decision, under the change while the card can be decided, held while it is carried out and gone once it is settled. Stories: `ProposalCard` Ad Spend Pending, Ad Spend Step Up, Ad Spend Applying, Ad Spend Stale, Public Post Batch.
|
|
219
|
+
- **`@crewlethq/icons` draws nine marketing, growth and app store tiles** with generic glyphs of their own (`google-ads`, `google-adsense`, `google-admob`, `google-analytics`, `google-search-console`, `google-play`, `app-store-connect`, `apple-ads`, `meta-ads`), because their owners allow a third party none of their product icons without leave. Story: `VendorMark` Growth Glyphs.
|
|
220
|
+
|
|
221
|
+
What to change: nothing is required.
|
|
222
|
+
|
|
211
223
|
## Changes in 0.164.0
|
|
212
224
|
|
|
213
225
|
### A map stays fitted when its cards are measured anew
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { type FormatMoneyOptions, type Micros } from './amounts.js';
|
|
3
|
+
export interface MoneyProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'>, FormatMoneyOptions {
|
|
4
|
+
/** The amount in micros of `currency` (one unit is 1,000,000): a bigint, a safe integer or a decimal integer string. */
|
|
5
|
+
micros: Micros;
|
|
6
|
+
/** The ISO 4217 code the amount is in: `EUR`, `JPY`, `KWD`. */
|
|
7
|
+
currency: string;
|
|
8
|
+
/** The locale it is read in. Defaults to the reader's own. */
|
|
9
|
+
locale?: string | readonly string[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An amount of money, drawn from integer micros and never through a float
|
|
13
|
+
* (`formatMoney`): "€1,250.00", "¥3,400", "KWD 1.250".
|
|
14
|
+
*
|
|
15
|
+
* ONE CURRENCY PER FIGURE. It draws one amount in the currency it was given
|
|
16
|
+
* and adds nothing to it: a total over several currencies is one figure per
|
|
17
|
+
* currency (`sumByCurrency`), never a sum that adds euros to yen.
|
|
18
|
+
*
|
|
19
|
+
* TABULAR AND WHOLE. Its digits take one width each, so a column of amounts
|
|
20
|
+
* lines up, and it never breaks across lines, where "€1,250." over ".00"
|
|
21
|
+
* reads as two figures.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Money({ micros, currency, locale, signDisplay, currencyDisplay, notation, className, ...rest }: MoneyProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Money as integer micros: one unit of a currency is 1,000,000 micros.
|
|
3
|
+
*
|
|
4
|
+
* NEVER A FLOAT. A float holds 0.1 as 0.1000000000000000055 and loses whole
|
|
5
|
+
* units past 2^53, so every step here is BigInt arithmetic on integer micros,
|
|
6
|
+
* and the one hand-off to `Intl.NumberFormat` is a decimal STRING already
|
|
7
|
+
* rounded to the currency's digits, which the formatter reads exactly.
|
|
8
|
+
*
|
|
9
|
+
* ISO 4217 DECIDES THE DIGITS, not the locale's data. CLDR draws some
|
|
10
|
+
* currencies with fewer digits than ISO lists (the Iraqi dinar with none,
|
|
11
|
+
* where ISO says three), so the table below is ISO's own List One, and the
|
|
12
|
+
* formatter is told the digits rather than asked for them.
|
|
13
|
+
*
|
|
14
|
+
* FOR DISPLAY ONLY. A vendor's own amounts follow the vendor's table (some
|
|
15
|
+
* differ from ISO), so nothing here may feed a spending cap or a comparison
|
|
16
|
+
* the engine makes. `parseMoney` reads what a person typed into micros, and
|
|
17
|
+
* the engine parses the decimal string again at its own edge.
|
|
18
|
+
*/
|
|
19
|
+
/** An amount in micros: a bigint, a safe integer, or a decimal integer string (`"-1250000"`). */
|
|
20
|
+
export type Micros = bigint | number | string;
|
|
21
|
+
/**
|
|
22
|
+
* The digits after the decimal point ISO 4217 gives `currency` (2 for EUR,
|
|
23
|
+
* 0 for JPY, 3 for KWD, 4 for CLF), or `undefined` for a code it does not
|
|
24
|
+
* list, in either case. Throws a `RangeError` for anything that is not a
|
|
25
|
+
* three-letter code.
|
|
26
|
+
*/
|
|
27
|
+
export declare function minorUnits(currency: string): number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Reads an amount in micros, exactly. A number must be a safe integer, since
|
|
30
|
+
* past 2^53 the value it holds is already not the one that was sent; a string
|
|
31
|
+
* must be a decimal integer. Anything else is a `RangeError`, never a guess.
|
|
32
|
+
*/
|
|
33
|
+
export declare function toMicros(value: Micros): bigint;
|
|
34
|
+
/**
|
|
35
|
+
* `micros` as a plain decimal string with exactly `digits` after the point,
|
|
36
|
+
* rounded half away from zero: `decimalOf(1_235_000n, 2)` is `"1.24"`, and
|
|
37
|
+
* `decimalOf(-1_235_000n, 2)` is `"-1.24"`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function decimalOf(micros: bigint, digits: number): string;
|
|
40
|
+
export interface FormatMoneyOptions {
|
|
41
|
+
/** Whether a sign is drawn: `exceptZero` for a change ("+€20.00", "−€5.00"). Intl's own values. */
|
|
42
|
+
signDisplay?: 'auto' | 'always' | 'exceptZero' | 'never' | undefined;
|
|
43
|
+
/** How the currency is named: a symbol (the default), the ISO code, or its name. */
|
|
44
|
+
currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name' | undefined;
|
|
45
|
+
/** `compact` for a figure on a small tile ("€1.2K"). Rounds, so never where the exact amount matters. */
|
|
46
|
+
notation?: 'standard' | 'compact' | undefined;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* `micros` of `currency` in the reader's words: `formatMoney(1_250_000n,
|
|
50
|
+
* 'EUR', 'en-US')` is "€1.25", and `formatMoney(1_250_000n, 'JPY', 'ja-JP')`
|
|
51
|
+
* is "¥1". Rounded half away from zero to the currency's ISO digits; a code
|
|
52
|
+
* ISO does not list is drawn with every digit it has, never rounded to a
|
|
53
|
+
* guess. `locale` defaults to the reader's own.
|
|
54
|
+
*/
|
|
55
|
+
export declare function formatMoney(micros: Micros, currency: string, locale?: string | readonly string[], options?: FormatMoneyOptions): string;
|
|
56
|
+
/**
|
|
57
|
+
* What a person typed as an amount of `currency`, in micros, or the reason it
|
|
58
|
+
* is not one. Digits with at most one decimal point, no more digits after it
|
|
59
|
+
* than the currency has, and no sign, grouping or exponent: an amount typed
|
|
60
|
+
* into a cap or a budget is never negative. A full stop is the decimal point;
|
|
61
|
+
* a comma is read as one too, as many keyboards type it, except before
|
|
62
|
+
* exactly three digits, where "1,500" groups thousands for some readers and
|
|
63
|
+
* marks decimals for others, and is refused rather than guessed.
|
|
64
|
+
*/
|
|
65
|
+
export declare function parseMoney(text: string, currency: string): {
|
|
66
|
+
micros: bigint;
|
|
67
|
+
} | {
|
|
68
|
+
problem: MoneyProblem;
|
|
69
|
+
};
|
|
70
|
+
/** Why a typed amount was refused. */
|
|
71
|
+
export type MoneyProblem = {
|
|
72
|
+
kind: 'empty';
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'not_an_amount';
|
|
75
|
+
}
|
|
76
|
+
/** A comma before exactly three digits, which reads as grouping to some and as decimals to others. */
|
|
77
|
+
| {
|
|
78
|
+
kind: 'ambiguous_comma';
|
|
79
|
+
}
|
|
80
|
+
/** More digits after the point than the currency has: `digits` is how many it takes. */
|
|
81
|
+
| {
|
|
82
|
+
kind: 'too_many_digits';
|
|
83
|
+
digits: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* `micros` as the decimal string a document stores ("50.00", "1500", "1.250"),
|
|
87
|
+
* at the currency's ISO digits: what a caps editor writes back.
|
|
88
|
+
*/
|
|
89
|
+
export declare function moneyDecimal(micros: Micros, currency: string): string;
|
|
90
|
+
/** One amount in one currency. */
|
|
91
|
+
export interface MoneyAmount {
|
|
92
|
+
micros: Micros;
|
|
93
|
+
currency: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* One total per currency, never one across them: euros and yen do not add.
|
|
97
|
+
* Exact (BigInt), in the order each currency first appears.
|
|
98
|
+
*/
|
|
99
|
+
export declare function sumByCurrency(amounts: Iterable<MoneyAmount>): {
|
|
100
|
+
currency: string;
|
|
101
|
+
micros: bigint;
|
|
102
|
+
}[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './Money.css';
|
|
2
|
+
export { Money } from './Money.js';
|
|
3
|
+
export type { MoneyProps } from './Money.js';
|
|
4
|
+
export { decimalOf, formatMoney, minorUnits, moneyDecimal, parseMoney, sumByCurrency, toMicros } from './amounts.js';
|
|
5
|
+
export type { FormatMoneyOptions, Micros, MoneyAmount, MoneyProblem } from './amounts.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type FocusEventHandler } from 'react';
|
|
2
|
+
import { type InputWidth } from '../Input/index.js';
|
|
3
|
+
/** Every sentence the field says about an amount it cannot take. */
|
|
4
|
+
export interface MoneyFieldLabels {
|
|
5
|
+
/** Why an empty field is not an amount, where one is required. */
|
|
6
|
+
empty: string;
|
|
7
|
+
/** Why what was typed is not an amount at all. */
|
|
8
|
+
notAnAmount: string;
|
|
9
|
+
/** Why a comma before three digits is refused: it groups thousands for some readers and marks decimals for others. */
|
|
10
|
+
ambiguousComma: string;
|
|
11
|
+
/** Why an amount has more digits after the point than its currency: "EUR takes at most 2 decimal places." */
|
|
12
|
+
tooManyDigits: (currency: string, digits: number) => string;
|
|
13
|
+
}
|
|
14
|
+
export declare const MONEY_FIELD_LABELS: MoneyFieldLabels;
|
|
15
|
+
/**
|
|
16
|
+
* Why `value` is not an amount of `currency`, in a sentence, or `null` where
|
|
17
|
+
* it is one. An empty value says `labels.empty`: whether an amount is
|
|
18
|
+
* required is the form's to decide, so it may ignore that one.
|
|
19
|
+
*/
|
|
20
|
+
export declare function moneyFieldProblem(value: string, currency: string, labels?: Partial<MoneyFieldLabels>): string | null;
|
|
21
|
+
export interface MoneyFieldProps {
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
name?: string | undefined;
|
|
24
|
+
/** What is typed, as typed: a plain decimal ("50.00"). Never a number, so nothing passes through a float. */
|
|
25
|
+
value: string;
|
|
26
|
+
onValueChange: (value: string) => void;
|
|
27
|
+
/** The ISO 4217 code the amount is in, drawn inside the field after the amount and read as its description. */
|
|
28
|
+
currency: string;
|
|
29
|
+
placeholder?: string | undefined;
|
|
30
|
+
/** Draws the field as refused. The sentence is the form's (`moneyFieldProblem`). */
|
|
31
|
+
error?: boolean | undefined;
|
|
32
|
+
disabled?: boolean | undefined;
|
|
33
|
+
readOnly?: boolean | undefined;
|
|
34
|
+
required?: boolean | undefined;
|
|
35
|
+
autoFocus?: boolean | undefined;
|
|
36
|
+
onBlur?: FocusEventHandler<HTMLInputElement> | undefined;
|
|
37
|
+
width?: InputWidth | undefined;
|
|
38
|
+
'aria-label'?: string | undefined;
|
|
39
|
+
'aria-describedby'?: string | undefined;
|
|
40
|
+
className?: string | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An amount of money a person types: a spending cap, a budget.
|
|
44
|
+
*
|
|
45
|
+
* A STRING IN, A STRING OUT. The field never turns what is typed into a
|
|
46
|
+
* number, which would pass it through a float; `parseMoney` reads it into
|
|
47
|
+
* micros and `moneyDecimal` writes micros back as the decimal a document
|
|
48
|
+
* stores.
|
|
49
|
+
*
|
|
50
|
+
* THE CURRENCY IS INSIDE THE FIELD, after the amount, and is read as the
|
|
51
|
+
* field's description, so "50" is never read without saying fifty of what.
|
|
52
|
+
* The placeholder shows the currency's own digits ("0.00", "0", "0.000").
|
|
53
|
+
*/
|
|
54
|
+
export declare const MoneyField: import("react").ForwardRefExoticComponent<MoneyFieldProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { MONEY_FIELD_LABELS, MoneyField, moneyFieldProblem } from '../chunk-OMMPRYHF.js';
|
|
2
|
+
import '../chunk-G6DKKJN6.js';
|
|
3
|
+
import '../chunk-XB3ITOJB.js';
|
|
4
|
+
import '../chunk-NICEDVZM.js';
|
|
5
|
+
import '../chunk-JLKO7PSK.js';
|
|
6
|
+
import '../chunk-PJV5HVZY.js';
|
|
7
|
+
import '../chunk-TEXK4RK6.js';
|
|
8
|
+
import '../chunk-XHTQ4X4P.js';
|
|
9
|
+
import '../chunk-TDFLCUBE.js';
|
|
10
|
+
import '../chunk-KIPOJKHG.js';
|
|
11
|
+
import '../chunk-L72URIHR.js';
|
|
12
|
+
import '../chunk-HTS5RJ7S.js';
|
|
13
|
+
import '../chunk-AVJKMQXK.js';
|
|
14
|
+
import '../chunk-EDPMHSLZ.js';
|
|
15
|
+
import '../chunk-4ITETIGZ.js';
|
|
16
|
+
import '../chunk-PQADV6P6.js';
|
|
17
|
+
import '../chunk-WGMKERCR.js';
|
|
18
|
+
import '../chunk-RRRK2KB6.js';
|
|
19
|
+
import '../chunk-ODEQTPFM.js';
|
package/dist/OrgTable/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-
|
|
1
|
+
export { OrgTable, OrgTableActions, OrgTableAdd, OrgTableName } from '../chunk-3O4F5HPW.js';
|
|
2
2
|
import '../chunk-TI5YZW4L.js';
|
|
3
3
|
import '../chunk-PFP5HHZF.js';
|
|
4
4
|
import '../chunk-MY374UUD.js';
|
|
@@ -12,6 +12,7 @@ import '../chunk-TGENJXOJ.js';
|
|
|
12
12
|
import '../chunk-PPUR46MK.js';
|
|
13
13
|
import '../chunk-JWHXDVN5.js';
|
|
14
14
|
import '../chunk-YMFFGPFE.js';
|
|
15
|
+
import '../chunk-5W3EYO5Q.js';
|
|
15
16
|
import '../chunk-XB3ITOJB.js';
|
|
16
17
|
import '../chunk-NICEDVZM.js';
|
|
17
18
|
import '../chunk-JLKO7PSK.js';
|
|
@@ -31,6 +32,5 @@ import '../chunk-EDPMHSLZ.js';
|
|
|
31
32
|
import '../chunk-4ITETIGZ.js';
|
|
32
33
|
import '../chunk-PQADV6P6.js';
|
|
33
34
|
import '../chunk-WGMKERCR.js';
|
|
34
|
-
import '../chunk-5W3EYO5Q.js';
|
|
35
35
|
import '../chunk-RRRK2KB6.js';
|
|
36
36
|
import '../chunk-ODEQTPFM.js';
|
|
@@ -47,6 +47,19 @@ export interface ProposalConfirmation {
|
|
|
47
47
|
*/
|
|
48
48
|
label: ReactNode;
|
|
49
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* A note the person may send back with the decision, to whoever asked for it:
|
|
52
|
+
* why it was denied, or what to do next. Optional to write, and the host
|
|
53
|
+
* sends it with whichever answer is pressed.
|
|
54
|
+
*/
|
|
55
|
+
export interface ProposalReply {
|
|
56
|
+
/** The field's name: "Note to the agent". */
|
|
57
|
+
label: string;
|
|
58
|
+
value: string;
|
|
59
|
+
onValueChange: (value: string) => void;
|
|
60
|
+
/** A line under the field: "Sent with your answer.". */
|
|
61
|
+
help?: ReactNode;
|
|
62
|
+
}
|
|
50
63
|
/**
|
|
51
64
|
* Why the person's own decision was refused while the card stays open to
|
|
52
65
|
* another one: the approval was turned down (a fresh sign-in, a change that
|
|
@@ -230,6 +243,12 @@ export interface ProposalCardProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
|
|
|
230
243
|
*/
|
|
231
244
|
notice?: ReactNode;
|
|
232
245
|
labels?: Partial<ProposalCardLabels> | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* A note the person may write to send back with the decision (see
|
|
248
|
+
* `ProposalReply`): a field under the change while the card can be decided,
|
|
249
|
+
* held while the decision is carried out, and gone once it is settled.
|
|
250
|
+
*/
|
|
251
|
+
reply?: ProposalReply | undefined;
|
|
233
252
|
/** Words for the change list. */
|
|
234
253
|
changeLabels?: Partial<ChangeListLabels> | undefined;
|
|
235
254
|
/** Words for the `DiffList` behind "Show the whole change". */
|
|
@@ -297,4 +316,4 @@ export interface ProposalCardProps extends Omit<HTMLAttributes<HTMLElement>, 'ti
|
|
|
297
316
|
* stays open (`expiresAt`), each with its glyph, so neither the sign-in check
|
|
298
317
|
* nor a refusal for lateness comes as a surprise.
|
|
299
318
|
*/
|
|
300
|
-
export declare function ProposalCard({ title, subtitle, state: given, scope, kind, summary, changes, changesHeading, note, details, tone, confirmation, approveLabel, onApprove, onDecline, onPrepareAgain, onRetry, receipt, failure, failureOutcome, failureHint, approveBlocked, decisionRefusal, caution, stepUp, expiresAt, notice: givenNotice, labels: overrides, changeLabels, diffLabels, className, ...rest }: ProposalCardProps): import("react").JSX.Element;
|
|
319
|
+
export declare function ProposalCard({ title, subtitle, state: given, scope, kind, summary, changes, changesHeading, note, details, tone, confirmation, approveLabel, onApprove, onDecline, onPrepareAgain, onRetry, receipt, failure, failureOutcome, failureHint, approveBlocked, decisionRefusal, caution, stepUp, expiresAt, notice: givenNotice, reply, labels: overrides, changeLabels, diffLabels, className, ...rest }: ProposalCardProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../VisuallyHidden/VisuallyHidden.css';
|
|
2
2
|
import './ProposalCard.css';
|
|
3
3
|
export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from './ProposalCard.js';
|
|
4
|
-
export type { ProposalCardLabels, ProposalCardProps, ProposalConfirmation, ProposalDecisionRefusal, ProposalFailureOutcome, ProposalKind, ProposalScope, ProposalState, ProposalTone, } from './ProposalCard.js';
|
|
4
|
+
export type { ProposalCardLabels, ProposalCardProps, ProposalConfirmation, ProposalDecisionRefusal, ProposalFailureOutcome, ProposalKind, ProposalReply, ProposalScope, ProposalState, ProposalTone, } from './ProposalCard.js';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-
|
|
1
|
+
export { PROPOSAL_CARD_LABELS, PROPOSAL_FAILURE_OUTCOMES, PROPOSAL_STATES, PROPOSAL_TONES, ProposalCard } from '../chunk-GCUJCO3W.js';
|
|
2
|
+
import '../chunk-DXC4K33F.js';
|
|
3
|
+
import '../chunk-657WR3MX.js';
|
|
2
4
|
import '../chunk-3XXFU4XP.js';
|
|
5
|
+
import '../chunk-ZJGGXYFS.js';
|
|
6
|
+
import '../chunk-KW7T23RT.js';
|
|
3
7
|
import '../chunk-5D7RMXM2.js';
|
|
4
8
|
import '../chunk-7XUP32RY.js';
|
|
5
9
|
import '../chunk-3GIGAGEG.js';
|
|
@@ -21,6 +25,7 @@ import '../chunk-PJV5HVZY.js';
|
|
|
21
25
|
import '../chunk-TEXK4RK6.js';
|
|
22
26
|
import '../chunk-34K3XN47.js';
|
|
23
27
|
import '../chunk-XSPCITPN.js';
|
|
28
|
+
import '../chunk-2YTOOH3A.js';
|
|
24
29
|
import '../chunk-XHTQ4X4P.js';
|
|
25
30
|
import '../chunk-TDFLCUBE.js';
|
|
26
31
|
import '../chunk-KIPOJKHG.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import { type GlyphSizeStep } from '@crewlethq/icons/glyphs';
|
|
3
|
+
/** Every sentence the rating says. */
|
|
4
|
+
export interface RatingLabels {
|
|
5
|
+
/** Its name, read in place of the stars, given the figure as written: "Rated 4.6 out of 5". */
|
|
6
|
+
name: (value: string, max: string) => string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RATING_LABELS: RatingLabels;
|
|
9
|
+
export interface RatingProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
10
|
+
/** The stars given: a whole number for one review, or an average ("4.6"), from 0 to `max`. */
|
|
11
|
+
value: number;
|
|
12
|
+
/** How many stars the scale has. Five by default. */
|
|
13
|
+
max?: number | undefined;
|
|
14
|
+
/** The locale the figure is written in. Defaults to the reader's own. */
|
|
15
|
+
locale?: string | undefined;
|
|
16
|
+
/** The stars' step. `sm` by default, a line of text's. */
|
|
17
|
+
size?: GlyphSizeStep | undefined;
|
|
18
|
+
/** Draws the figure after the stars, for an average whose half stars cannot say 4.6 from 4.4. */
|
|
19
|
+
showValue?: boolean | undefined;
|
|
20
|
+
labels?: Partial<RatingLabels> | undefined;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A star rating, read only: a review's stars, or an app's average.
|
|
24
|
+
*
|
|
25
|
+
* TO THE NEAREST HALF STAR, READ EXACTLY. An average fills the stars it rounds
|
|
26
|
+
* to by halves, and its name says the figure itself ("Rated 4.6 out of 5"),
|
|
27
|
+
* so the picture and the words never disagree about anything but the
|
|
28
|
+
* rounding a picture needs. `showValue` draws the figure too.
|
|
29
|
+
*
|
|
30
|
+
* A QUANTITY, NOT A STATE: the stars take the text's ink and the control
|
|
31
|
+
* edge, never the warning hue, which read as an alert (as the sheet's rating
|
|
32
|
+
* cells do). A half star is a filled star cut at its middle, by a class
|
|
33
|
+
* rather than a style attribute a strict Content-Security-Policy would refuse.
|
|
34
|
+
*/
|
|
35
|
+
export declare function Rating({ value, max, locale, size, showValue, labels: overrides, className, ...rest }: RatingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.crewlet-rating {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: var(--spacing-1);
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.crewlet-rating__star {
|
|
9
|
+
position: relative;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* A RATING IS A QUANTITY, not a state: the ink and the control edge, never
|
|
14
|
+
the warning hue, which read as an alert. */
|
|
15
|
+
.crewlet-rating__off {
|
|
16
|
+
color: var(--color-border-strong);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.crewlet-rating__on {
|
|
20
|
+
position: absolute;
|
|
21
|
+
inset: 0;
|
|
22
|
+
color: var(--color-text-primary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Half a star is the filled star cut at its middle, from the reading side. */
|
|
26
|
+
.crewlet-rating__on--half {
|
|
27
|
+
clip-path: inset(0 50% 0 0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.crewlet-rating__on--half:dir(rtl) {
|
|
31
|
+
clip-path: inset(0 0 0 50%);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.crewlet-rating__value {
|
|
35
|
+
margin-inline-start: var(--spacing-1);
|
|
36
|
+
color: var(--color-text-secondary);
|
|
37
|
+
font-variant-numeric: tabular-nums;
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { formatMoney } from './chunk-G6DKKJN6.js';
|
|
2
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
+
import './Money-SAHKH4UT.css';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Money({ micros, currency, locale, signDisplay, currencyDisplay, notation, className, ...rest }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"span",
|
|
9
|
+
{
|
|
10
|
+
...rest,
|
|
11
|
+
className: cx("crewlet-money", className),
|
|
12
|
+
"data-currency": currency,
|
|
13
|
+
children: formatMoney(micros, currency, locale, { signDisplay, currencyDisplay, notation })
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { Money };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// src/Money/amounts.ts
|
|
2
|
+
var MICROS_DIGITS = 6;
|
|
3
|
+
var MICROS = 1000000n;
|
|
4
|
+
var MINOR_UNITS_NOT_TWO = {
|
|
5
|
+
BIF: 0,
|
|
6
|
+
CLP: 0,
|
|
7
|
+
DJF: 0,
|
|
8
|
+
GNF: 0,
|
|
9
|
+
ISK: 0,
|
|
10
|
+
JPY: 0,
|
|
11
|
+
KMF: 0,
|
|
12
|
+
KRW: 0,
|
|
13
|
+
PYG: 0,
|
|
14
|
+
RWF: 0,
|
|
15
|
+
UGX: 0,
|
|
16
|
+
UYI: 0,
|
|
17
|
+
VND: 0,
|
|
18
|
+
VUV: 0,
|
|
19
|
+
XAF: 0,
|
|
20
|
+
XOF: 0,
|
|
21
|
+
XPF: 0,
|
|
22
|
+
BHD: 3,
|
|
23
|
+
IQD: 3,
|
|
24
|
+
JOD: 3,
|
|
25
|
+
KWD: 3,
|
|
26
|
+
LYD: 3,
|
|
27
|
+
OMR: 3,
|
|
28
|
+
TND: 3,
|
|
29
|
+
CLF: 4,
|
|
30
|
+
UYW: 4
|
|
31
|
+
};
|
|
32
|
+
var ISO_4217 = new Set(
|
|
33
|
+
"AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD BIF BMD BND BOB BOV BRL BSD BTN BWP BYN BZD CAD CDF CHE CHF CHW CLF CLP CNY COP COU CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW KRW KWD KYD KZT LAK LBP LKR LRD LSL LYD MAD MDL MGA MKD MMK MNT MOP MRU MUR MVR MWK MXN MXV MYR MZN NAD NGN NIO NOK NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF SAR SBD SCR SDG SEK SGD SHP SLE SLL SOS SRD SSP STN SVC SYP SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD USN UYI UYU UYW UZS VED VES VND VUV WST XAF XCD XCG XOF XPF YER ZAR ZMW ZWG ZWL".split(" ")
|
|
34
|
+
);
|
|
35
|
+
var CODE = /^[A-Z]{3}$/;
|
|
36
|
+
function codeOf(currency) {
|
|
37
|
+
const code = currency.trim().toUpperCase();
|
|
38
|
+
if (!CODE.test(code)) throw new RangeError(`"${currency}" is not an ISO 4217 currency code`);
|
|
39
|
+
return code;
|
|
40
|
+
}
|
|
41
|
+
function minorUnits(currency) {
|
|
42
|
+
const code = codeOf(currency);
|
|
43
|
+
if (!ISO_4217.has(code)) return void 0;
|
|
44
|
+
return MINOR_UNITS_NOT_TWO[code] ?? 2;
|
|
45
|
+
}
|
|
46
|
+
function toMicros(value) {
|
|
47
|
+
if (typeof value === "bigint") return value;
|
|
48
|
+
if (typeof value === "number") {
|
|
49
|
+
if (!Number.isSafeInteger(value)) throw new RangeError(`${value} is not a whole number of micros held exactly`);
|
|
50
|
+
return BigInt(value);
|
|
51
|
+
}
|
|
52
|
+
const text = value.trim();
|
|
53
|
+
if (!/^-?\d+$/.test(text)) throw new RangeError(`"${value}" is not a whole number of micros`);
|
|
54
|
+
return BigInt(text);
|
|
55
|
+
}
|
|
56
|
+
function decimalOf(micros, digits) {
|
|
57
|
+
if (!Number.isInteger(digits) || digits < 0 || digits > MICROS_DIGITS) {
|
|
58
|
+
throw new RangeError(`${digits} is not a number of digits between 0 and ${MICROS_DIGITS}`);
|
|
59
|
+
}
|
|
60
|
+
const negative = micros < 0n;
|
|
61
|
+
let magnitude = negative ? -micros : micros;
|
|
62
|
+
const drop = 10n ** BigInt(MICROS_DIGITS - digits);
|
|
63
|
+
magnitude = (magnitude + drop / 2n) / drop;
|
|
64
|
+
const scale = 10n ** BigInt(digits);
|
|
65
|
+
const whole = (magnitude / scale).toString();
|
|
66
|
+
const fraction = digits === 0 ? "" : `.${(magnitude % scale).toString().padStart(digits, "0")}`;
|
|
67
|
+
return `${negative && magnitude !== 0n ? "-" : ""}${whole}${fraction}`;
|
|
68
|
+
}
|
|
69
|
+
function exactDecimal(micros) {
|
|
70
|
+
return decimalOf(micros, MICROS_DIGITS).replace(/\.?0+$/, "");
|
|
71
|
+
}
|
|
72
|
+
function formatMoney(micros, currency, locale, options = {}) {
|
|
73
|
+
const amount = toMicros(micros);
|
|
74
|
+
const code = codeOf(currency);
|
|
75
|
+
const digits = minorUnits(code);
|
|
76
|
+
const compact = options.notation === "compact";
|
|
77
|
+
const format = new Intl.NumberFormat(locale, {
|
|
78
|
+
style: "currency",
|
|
79
|
+
currency: code,
|
|
80
|
+
currencyDisplay: options.currencyDisplay ?? "symbol",
|
|
81
|
+
signDisplay: options.signDisplay ?? "auto",
|
|
82
|
+
...compact ? { notation: "compact" } : digits === void 0 ? { minimumFractionDigits: 0, maximumFractionDigits: MICROS_DIGITS } : { minimumFractionDigits: digits, maximumFractionDigits: digits }
|
|
83
|
+
});
|
|
84
|
+
const text = digits === void 0 ? exactDecimal(amount) : decimalOf(amount, digits);
|
|
85
|
+
return format.format(text);
|
|
86
|
+
}
|
|
87
|
+
function parseMoney(text, currency) {
|
|
88
|
+
const digits = minorUnits(currency) ?? MICROS_DIGITS;
|
|
89
|
+
const trimmed = text.trim();
|
|
90
|
+
if (trimmed === "") return { problem: { kind: "empty" } };
|
|
91
|
+
const match = /^(\d+)(?:([.,])(\d*))?$/.exec(trimmed);
|
|
92
|
+
if (!match) return { problem: { kind: "not_an_amount" } };
|
|
93
|
+
const fraction = match[3] ?? "";
|
|
94
|
+
if (match[2] === "," && fraction.length === 3) return { problem: { kind: "ambiguous_comma" } };
|
|
95
|
+
if (fraction.length > digits) return { problem: { kind: "too_many_digits", digits } };
|
|
96
|
+
const micros = BigInt(match[1]) * MICROS + BigInt(fraction.padEnd(MICROS_DIGITS, "0") || "0");
|
|
97
|
+
return { micros };
|
|
98
|
+
}
|
|
99
|
+
function moneyDecimal(micros, currency) {
|
|
100
|
+
return decimalOf(toMicros(micros), minorUnits(currency) ?? MICROS_DIGITS);
|
|
101
|
+
}
|
|
102
|
+
function sumByCurrency(amounts) {
|
|
103
|
+
const totals = /* @__PURE__ */ new Map();
|
|
104
|
+
for (const { micros, currency } of amounts) {
|
|
105
|
+
const code = codeOf(currency);
|
|
106
|
+
totals.set(code, (totals.get(code) ?? 0n) + toMicros(micros));
|
|
107
|
+
}
|
|
108
|
+
return [...totals].map(([currency, micros]) => ({ currency, micros }));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { decimalOf, formatMoney, minorUnits, moneyDecimal, parseMoney, sumByCurrency, toMicros };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ValueField } from './chunk-DXC4K33F.js';
|
|
1
2
|
import { RefusalStrip, ReceiptStrip } from './chunk-3XXFU4XP.js';
|
|
2
3
|
import { ChangeList } from './chunk-5D7RMXM2.js';
|
|
3
4
|
import { StatusCard } from './chunk-3GIGAGEG.js';
|
|
@@ -138,6 +139,7 @@ function ProposalCard({
|
|
|
138
139
|
stepUp = false,
|
|
139
140
|
expiresAt,
|
|
140
141
|
notice: givenNotice,
|
|
142
|
+
reply,
|
|
141
143
|
labels: overrides,
|
|
142
144
|
changeLabels,
|
|
143
145
|
diffLabels,
|
|
@@ -300,7 +302,21 @@ function ProposalCard({
|
|
|
300
302
|
}
|
|
301
303
|
),
|
|
302
304
|
details === void 0 || details === null ? null : /* @__PURE__ */ jsx(Disclosure, { className: "crewlet-proposal-card__details", title: labels.details, size: "compact", lazy: true, children: details }),
|
|
303
|
-
note === void 0 || note === null ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__note", children: note })
|
|
305
|
+
note === void 0 || note === null ? null : /* @__PURE__ */ jsx("p", { className: "crewlet-proposal-card__note", children: note }),
|
|
306
|
+
reply === void 0 || settled ? null : /* @__PURE__ */ jsx(
|
|
307
|
+
ValueField,
|
|
308
|
+
{
|
|
309
|
+
className: "crewlet-proposal-card__reply",
|
|
310
|
+
kind: "multiline",
|
|
311
|
+
rows: 2,
|
|
312
|
+
required: false,
|
|
313
|
+
label: reply.label,
|
|
314
|
+
value: reply.value,
|
|
315
|
+
onChange: reply.onValueChange,
|
|
316
|
+
help: reply.help,
|
|
317
|
+
disabled: state === "applying"
|
|
318
|
+
}
|
|
319
|
+
)
|
|
304
320
|
]
|
|
305
321
|
}
|
|
306
322
|
);
|