@eifi1/ui-kit 0.15.5 → 0.16.1
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 +17 -12
- package/dist/chart.d.ts +3 -3
- package/dist/components/amount-input.d.ts +10 -3
- package/dist/components/amount-input.js +165 -156
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/authed-image.d.ts +14 -3
- package/dist/components/authed-image.js +32 -23
- package/dist/components/authed-image.js.map +1 -1
- package/dist/components/button-group.d.ts +3 -3
- package/dist/components/calculator.d.ts +3 -3
- package/dist/components/copy-button.d.ts +3 -3
- package/dist/components/facing-pair.d.ts +3 -3
- package/dist/components/file-button.d.ts +3 -3
- package/dist/components/file-button.js +67 -31
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.d.ts +3 -3
- package/dist/components/form-actions.d.ts +4 -4
- package/dist/components/form-actions.js +18 -6
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/line-items.d.ts +53 -2
- package/dist/components/line-items.js +73 -7
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list.d.ts +99 -5
- package/dist/components/list.js +103 -38
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-state.d.ts +19 -3
- package/dist/components/loading-state.js +14 -3
- package/dist/components/loading-state.js.map +1 -1
- package/dist/components/money-field.d.ts +3 -3
- package/dist/components/number-field.d.ts +3 -3
- package/dist/components/number-input.d.ts +3 -3
- package/dist/components/number-input.js +4 -2
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numpad-sheet.d.ts +3 -3
- package/dist/components/passkeys-setting.d.ts +30 -10
- package/dist/components/passkeys-setting.js +19 -11
- package/dist/components/passkeys-setting.js.map +1 -1
- package/dist/components/progress-bar.d.ts +12 -3
- package/dist/components/progress-bar.js +21 -11
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/series-chart.d.ts +3 -3
- package/dist/components/settings-fields.d.ts +3 -3
- package/dist/components/signed-amount.d.ts +28 -4
- package/dist/components/signed-amount.js +17 -8
- package/dist/components/signed-amount.js.map +1 -1
- package/dist/components/stat-tile.d.ts +31 -2
- package/dist/components/stat-tile.js +37 -6
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/status-dot.d.ts +4 -1
- package/dist/components/status-dot.js +20 -1
- package/dist/components/status-dot.js.map +1 -1
- package/dist/components/swatch-picker.d.ts +3 -1
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/table.d.ts +18 -13
- package/dist/components/table.js +20 -5
- package/dist/components/table.js.map +1 -1
- package/dist/components/text-link.d.ts +3 -3
- package/dist/components/time-input.d.ts +3 -3
- package/dist/components/toggle-legend.d.ts +12 -1
- package/dist/components/toggle-legend.js +6 -2
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/ui.d.ts +3 -3
- package/dist/components/ui.js +149 -45
- package/dist/components/ui.js.map +1 -1
- package/dist/feedback/feedback-attachment.d.ts +1 -1
- package/dist/feedback/feedback-attachment.js +24 -11
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +1 -1
- package/dist/feedback/feedback-dialog.js +6 -5
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +1 -1
- package/dist/feedback/feedback-thread.d.ts +1 -1
- package/dist/{feedback-attachment-BYAHJMOr.d.ts → feedback-attachment-WFiXJ8We.d.ts} +21 -8
- package/dist/feedback.d.ts +1 -1
- package/dist/hooks/use-file-drop.d.ts +3 -3
- package/dist/i18n/defaults.d.ts +3 -3
- package/dist/i18n/kit-labels.d.ts +2 -2
- package/dist/i18n/locales/de-CH-informal.d.ts +3 -3
- package/dist/i18n/locales/de-CH.d.ts +3 -3
- package/dist/i18n/locales/de-informal.d.ts +3 -3
- package/dist/i18n/locales/de.d.ts +3 -3
- package/dist/i18n/locales/de.js +1 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +3 -3
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -3
- package/dist/i18n/locales/fr.js +1 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +3 -3
- package/dist/i18n/locales/hu.js +1 -1
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -3
- package/dist/i18n/locales/it.js +1 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -3
- package/dist/i18n/locales/zh.js +1 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/{kit-labels-BD2F7sOz.d.ts → kit-labels-DE--LmCk.d.ts} +153 -12
- package/dist/lib/format.d.ts +18 -3
- package/dist/lib/format.js +2 -1
- package/dist/lib/format.js.map +1 -1
- package/dist/rhf/fields.d.ts +3 -3
- package/dist/rhf/form.d.ts +3 -3
- package/dist/rhf/line-items.js.map +1 -1
- package/dist/rhf.d.ts +3 -3
- package/dist/shell/app-shell.d.ts +3 -3
- package/dist/shell/top-bar-brand.d.ts +3 -3
- package/dist/shell.d.ts +3 -3
- package/dist/wizard/stepper-nav.d.ts +3 -3
- package/dist/wizard.d.ts +3 -3
- package/package.json +1 -1
- package/src/components/amount-input.tsx +39 -15
- package/src/components/authed-image.tsx +20 -2
- package/src/components/file-button.tsx +85 -27
- package/src/components/form-actions.tsx +86 -8
- package/src/components/line-items.tsx +131 -14
- package/src/components/list.tsx +240 -50
- package/src/components/loading-state.tsx +35 -4
- package/src/components/number-input.tsx +18 -2
- package/src/components/passkeys-setting.tsx +45 -18
- package/src/components/progress-bar.tsx +46 -21
- package/src/components/signed-amount.tsx +47 -8
- package/src/components/stat-tile.tsx +76 -6
- package/src/components/status-dot.tsx +31 -0
- package/src/components/swatch-picker.tsx +3 -1
- package/src/components/table.tsx +42 -15
- package/src/components/toggle-legend.tsx +21 -4
- package/src/components/ui.tsx +273 -63
- package/src/feedback/feedback-attachment.tsx +45 -14
- package/src/feedback/feedback-dialog.tsx +31 -16
- package/src/i18n/locales/de.ts +1 -1
- package/src/i18n/locales/es.ts +1 -1
- package/src/i18n/locales/fr.ts +1 -1
- package/src/i18n/locales/hu.ts +1 -1
- package/src/i18n/locales/it.ts +1 -1
- package/src/i18n/locales/zh.ts +1 -1
- package/src/lib/format.ts +24 -3
- package/src/rhf/line-items.tsx +6 -0
package/README.md
CHANGED
|
@@ -306,9 +306,14 @@ showcase can run next to whatever you are testing it against:
|
|
|
306
306
|
| **4170** | **this showcase** (`dev:showcase`) |
|
|
307
307
|
| **4171** | this showcase, built (`preview:showcase`) |
|
|
308
308
|
| 4173 | keksdose frontend (backend 8000) |
|
|
309
|
-
| 4175 |
|
|
309
|
+
| 4175 | Kurvenschmiede frontend (backend 8001) |
|
|
310
310
|
| 5173 | kastlan frontend (Vite's default) |
|
|
311
311
|
|
|
312
|
+
Kurvenschmiede was called **lenkbank** until 2026-10-01 (repository `Eifi1/kurvenschmiede`,
|
|
313
|
+
formerly `Eifi1/lenkbank`). The changelog, older adoption notes and code comments that
|
|
314
|
+
cite its feedback ("lenkbank L2", "Lenkbank feedback #93") keep the name they were
|
|
315
|
+
written with.
|
|
316
|
+
|
|
312
317
|
`strictPort` is on: a collision fails loudly instead of silently moving to another port
|
|
313
318
|
and printing a URL that is not the one documented here. For a throwaway instance that
|
|
314
319
|
must not take the port your editor's build task wants:
|
|
@@ -377,14 +382,14 @@ columns, strings and permissions (see the note at the top of `src/feedback/feedb
|
|
|
377
382
|
|
|
378
383
|
<!-- BEGIN GENERATED: exports — node scripts/gen-export-inventory.mjs -->
|
|
379
384
|
|
|
380
|
-
**
|
|
385
|
+
**1039 names from 161 modules** — 483 values and 556 types. _Italic_ is a type-only export.
|
|
381
386
|
|
|
382
387
|
Generated from `dist/index.d.ts` by `node scripts/gen-export-inventory.mjs`; the count
|
|
383
388
|
is pinned by `src/__tests__/public-surface.test.ts`. Do not edit between the markers.
|
|
384
389
|
|
|
385
390
|
| Entry point | Names |
|
|
386
391
|
|---|---|
|
|
387
|
-
| `@eifi1/ui-kit` |
|
|
392
|
+
| `@eifi1/ui-kit` | 1039 |
|
|
388
393
|
| `@eifi1/ui-kit/chart` | 104 |
|
|
389
394
|
| `@eifi1/ui-kit/shell` | 24 |
|
|
390
395
|
| `@eifi1/ui-kit/data-table` | 49 |
|
|
@@ -406,7 +411,7 @@ re-slicing of it, never a second API.
|
|
|
406
411
|
| `lib/calc` | `commitExpression`, `evaluateExpression`, `formatResult`, `isBareAmount`, `looksLikeExpression`, `sanitizeLive`, `splitLeadingSign` |
|
|
407
412
|
| `lib/cn` | `cn` |
|
|
408
413
|
| `lib/logger` | `logger`, `setStoreLog` |
|
|
409
|
-
| `lib/format` | `currencyMinorDigits`, `EMPTY_FORMATTED_VALUE`, `formatDate`, `formatMoney`, `formatNumber`, `formatPercent`, `formatRelativeTime`, `roundToCurrency`, `toDate`, `useKitFormat`, _`DateInput`_, _`FormatDateOptions`_, _`FormatDateStyle`_, _`FormatDigits`_, _`FormatMoneyOptions`_, _`FormatNumberBaseOptions`_, _`FormatNumberOptions`_, _`FormatPercentOptions`_, _`FormatRelativeTimeOptions`_, _`KitFormat`_ |
|
|
414
|
+
| `lib/format` | `currencyMinorDigits`, `EMPTY_FORMATTED_VALUE`, `formatDate`, `formatMoney`, `formatNumber`, `formatPercent`, `formatRelativeTime`, `roundToCurrency`, `toDate`, `useKitFormat`, _`DateInput`_, _`FormatDateOptions`_, _`FormatDateStyle`_, _`FormatDigits`_, _`FormatMoneyOptions`_, _`FormatNumberBaseOptions`_, _`FormatNumberOptions`_, _`FormatPercentOptions`_, _`FormatRelativeTimeOptions`_, _`KitFormat`_, _`RoundToCurrencyOptions`_ |
|
|
410
415
|
| `lib/safe-storage` | `readStored`, `writeStored` |
|
|
411
416
|
| `lib/qr-encode` | `encodeQr`, _`QrEncodeOptions`_, _`QrErrorCorrection`_, _`QrMatrix`_ |
|
|
412
417
|
| `lib/clipping` | `CLIPS_ATTRIBUTE` |
|
|
@@ -455,10 +460,10 @@ re-slicing of it, never a second API.
|
|
|
455
460
|
|
|
456
461
|
| Module | Exports |
|
|
457
462
|
|---|---|
|
|
458
|
-
| `components/ui` | `Button`, `buttonClasses`, `Card`, `CardAction`, `CardContent`, `CardDescription`, `CardFooter`, `CardHeader`, `CardTitle`, `DEFAULT_PASSWORD_REVEAL_LABELS`, `DEFAULT_TABS_LABELS`, `EmptyState`, `FIELD_BASE`, `FIELD_DISPLAY`, `FIELD_FLOATING_PAD`, `FIELD_INVALID`, `FIELD_TRIGGER`, `FIELD_WRITABLE_LOOK`, `FieldChevron`, `FieldHint`, `FieldLabel`, `FLOATING_INPUT_CLASS`, `FLOATING_LABEL_CLASS`, `FLOATING_LABEL_STATIC`, `FloatingField`, `IconButton`, `Input`, `Label`, `PHONE_QUERY`, `resolvePasswordRevealLabels`, `Select`, `Spinner`, `Tabs`, `Textarea`, _`ButtonClassesOptions`_, _`ButtonLinkProps`_, _`ButtonProps`_, _`ButtonSize`_, _`ButtonTone`_, _`ButtonVariant`_, _`CardActionProps`_, _`CardContentProps`_, _`CardDescriptionProps`_, _`CardFooterProps`_, _`CardHeaderProps`_, _`CardProps`_, _`CardTitleProps`_, _`CardTone`_, _`EmptyStateProps`_, _`FieldChevronProps`_, _`FieldHintProps`_, _`FieldLabelProps`_, _`FloatingFieldProps`_, _`IconButtonGlyphSize`_, _`IconButtonLinkProps`_, _`IconButtonProps`_, _`IconButtonSize`_, _`IconButtonTone`_, _`IconButtonToneColor`_, _`IconButtonVariant`_, _`InputProps`_, _`LabelProps`_, _`PasswordRevealLabels`_, _`SelectProps`_, _`SpinnerProps`_, _`TabItem`_, _`TabsLabels`_, _`TabsProps`_, _`TextareaProps`_ |
|
|
463
|
+
| `components/ui` | `Button`, `buttonClasses`, `Card`, `CardAction`, `CardContent`, `CardDescription`, `CardFooter`, `CardHeader`, `CardTitle`, `DEFAULT_PASSWORD_REVEAL_LABELS`, `DEFAULT_TABS_LABELS`, `EmptyState`, `FIELD_BASE`, `FIELD_DISPLAY`, `FIELD_FLOATING_PAD`, `FIELD_INVALID`, `FIELD_TRIGGER`, `FIELD_WRITABLE_LOOK`, `FieldChevron`, `FieldHint`, `FieldLabel`, `FLOATING_INPUT_CLASS`, `FLOATING_LABEL_CLASS`, `FLOATING_LABEL_STATIC`, `FloatingField`, `IconButton`, `Input`, `Label`, `PHONE_QUERY`, `resolvePasswordRevealLabels`, `Select`, `Spinner`, `Tabs`, `Textarea`, _`ButtonClassesOptions`_, _`ButtonLinkProps`_, _`ButtonProps`_, _`ButtonSize`_, _`ButtonTone`_, _`ButtonVariant`_, _`CardActionProps`_, _`CardContentProps`_, _`CardDescriptionProps`_, _`CardFooterProps`_, _`CardHeaderProps`_, _`CardProps`_, _`CardTitleLevel`_, _`CardTitleProps`_, _`CardTone`_, _`EmptyStateProps`_, _`FieldChevronProps`_, _`FieldHintProps`_, _`FieldLabelProps`_, _`FloatingFieldProps`_, _`IconButtonGlyphSize`_, _`IconButtonLinkProps`_, _`IconButtonProps`_, _`IconButtonSize`_, _`IconButtonTone`_, _`IconButtonToneColor`_, _`IconButtonVariant`_, _`InputProps`_, _`LabelProps`_, _`PasswordRevealLabels`_, _`SelectProps`_, _`SpinnerProps`_, _`TabItem`_, _`TabsLabels`_, _`TabsProps`_, _`TextareaProps`_ |
|
|
459
464
|
| `components/copy-button` | `CopyButton`, `DEFAULT_COPY_BUTTON_LABELS`, _`CopyButtonLabels`_, _`CopyButtonProps`_ |
|
|
460
465
|
| `components/file-button` | `DEFAULT_FILE_PICKER_LABELS`, `FileButton`, `matchesAccept`, `useFilePicker`, _`FileButtonProps`_, _`FilePickerLabels`_, _`FileRejection`_, _`FileRejectionReason`_, _`FileScreenOptions`_, _`UseFilePickerOptions`_, _`UseFilePickerReturn`_ |
|
|
461
|
-
| `components/form-actions` | `DEFAULT_FORM_ACTIONS_LABELS`, `FormActions`, _`FormActionsAlign`_, _`FormActionsDestructive`_, _`FormActionsLabels`_, _`FormActionsPlacement`_, _`FormActionsProps`_ |
|
|
466
|
+
| `components/form-actions` | `DEFAULT_FORM_ACTIONS_LABELS`, `FormActions`, _`FormActionsAlign`_, _`FormActionsDestructive`_, _`FormActionsLabels`_, _`FormActionsPlacement`_, _`FormActionsProps`_, _`FormActionsStickyWithin`_, _`FormActionsSubmitProps`_ |
|
|
462
467
|
| `components/field` | `Field`, _`FieldControlProps`_, _`FieldLabelVisibility`_, _`FieldProps`_, _`FieldRenderMeta`_ |
|
|
463
468
|
| `components/search-field` | `SearchField`, _`SearchFieldProps`_ |
|
|
464
469
|
| `components/dropdown` | `DropdownPanel`, `DropdownSearchHeader`, `useDropdown`, `useDropdownSearch`, _`DropdownPanelProps`_, _`DropdownSearchHeaderProps`_ |
|
|
@@ -510,7 +515,7 @@ re-slicing of it, never a second API.
|
|
|
510
515
|
| `components/pie-chart` | `PieChart`, _`PieChartProps`_, _`PieChartSlice`_ |
|
|
511
516
|
| `components/pie-chart-labels` | `DEFAULT_PIE_CHART_LABELS`, _`PieChartLabels`_ |
|
|
512
517
|
| `components/account-settings` | `PasswordSetting`, `ProfileSetting`, `TwoFactorSetting`, _`TwoFactorSetupData`_ |
|
|
513
|
-
| `components/passkeys-setting` | `PasskeysSetting`, _`PasskeyItem`_, _`PasskeysSettingProps`_ |
|
|
518
|
+
| `components/passkeys-setting` | `PasskeysSetting`, _`PasskeyDataAttributes`_, _`PasskeyId`_, _`PasskeyItem`_, _`PasskeysSettingProps`_ |
|
|
514
519
|
| `components/qr-code` | `QrCode`, _`QrCodeProps`_ |
|
|
515
520
|
| `components/alert-banner` | `AlertBanner`, `alertFrameClass`, `toneFrameClass`, _`AlertBannerProps`_, _`AlertSize`_, _`AlertTone`_ |
|
|
516
521
|
| `components/toggle-group` | `ToggleGroup`, _`ToggleGroupBaseProps`_, _`ToggleGroupClearableProps`_, _`ToggleGroupProps`_, _`ToggleGroupRequiredProps`_, _`ToggleOption`_ |
|
|
@@ -528,11 +533,11 @@ re-slicing of it, never a second API.
|
|
|
528
533
|
| `components/tree-view` | `TreeRow`, `TreeView`, _`TreeItemState`_, _`TreeNode`_, _`TreeRowProps`_, _`TreeViewProps`_ |
|
|
529
534
|
| `components/chart` | `ChartContainer`, `ChartLegend`, `ChartLegendContent`, `ChartTooltip`, `ChartTooltipContent`, `useChart`, _`ChartConfig`_, _`ChartSeriesConfig`_ |
|
|
530
535
|
| `components/description-list` | `DEFAULT_DESCRIPTION_LIST_LABELS`, `DescriptionItem`, `DescriptionList`, _`DescriptionItemProps`_, _`DescriptionListColumns`_, _`DescriptionListDensity`_, _`DescriptionListLabels`_, _`DescriptionListLayout`_, _`DescriptionListProps`_ |
|
|
531
|
-
| `components/line-items` | `DEFAULT_LINE_ITEMS_LABELS`, `LineItems`, _`LineItemCellContext`_, _`LineItemsColumn`_, _`LineItemsLabels`_, _`LineItemsProps`_ |
|
|
536
|
+
| `components/line-items` | `DEFAULT_LINE_ITEMS_LABELS`, `LineItems`, _`LineItemCellContext`_, _`LineItemsColumn`_, _`LineItemsFieldLabels`_, _`LineItemsLabels`_, _`LineItemsProps`_, _`LineItemsSummary`_, _`LineItemsSummaryTone`_ |
|
|
532
537
|
| `components/progress-bar` | `DEFAULT_PROGRESS_BAR_LABELS`, `ProgressBar`, _`ProgressBarLabels`_, _`ProgressBarProps`_, _`ProgressBarSegment`_, _`ProgressBarSize`_, _`ProgressBarTone`_ |
|
|
533
538
|
| `components/skeleton` | `Skeleton`, _`SkeletonProps`_, _`SkeletonShape`_ |
|
|
534
|
-
| `components/loading-state` | `LoadingState`, _`LoadingStateProps`_, _`LoadingStateSize`_ |
|
|
535
|
-
| `components/signed-amount` | `DEFAULT_SIGNED_AMOUNT_LABELS`, `Delta`, `SignedAmount`, `Tone`, `toneTextClass`, _`DeltaProps`_, _`GoodDirection`_, _`SignedAmountLabels`_, _`SignedAmountProps`_, _`SignedAmountTone`_, _`TextTone`_, _`ToneProps`_ |
|
|
539
|
+
| `components/loading-state` | `LoadingState`, _`LoadingStateLabelVisibility`_, _`LoadingStateProps`_, _`LoadingStateSize`_ |
|
|
540
|
+
| `components/signed-amount` | `DEFAULT_SIGNED_AMOUNT_LABELS`, `Delta`, `SignedAmount`, `Tone`, `toneTextClass`, _`DeltaProps`_, _`GoodDirection`_, _`SignedAmountLabels`_, _`SignedAmountProps`_, _`SignedAmountTone`_, _`TextTone`_, _`ToneProps`_, _`VerdictPalette`_ |
|
|
536
541
|
| `components/error-boundary` | `crashFingerprint`, `DEFAULT_ERROR_BOUNDARY_LABELS`, `describeThrown`, `ErrorBoundary`, `formatCrashReport`, `isChunkLoadError`, _`CrashReport`_, _`CrashReportResult`_, _`ErrorBoundaryDetails`_, _`ErrorBoundaryFallbackProps`_, _`ErrorBoundaryLabels`_, _`ErrorBoundaryProps`_ |
|
|
537
542
|
| `components/authed-image` | `AuthedImage`, `DEFAULT_AUTHED_IMAGE_LABELS`, _`AuthedImageLabels`_, _`AuthedImageProps`_ |
|
|
538
543
|
| `components/image-grid` | `DEFAULT_IMAGE_GRID_LABELS`, `ImageGrid`, `splitFileName`, _`ImageGridLabels`_, _`ImageGridProps`_ |
|
|
@@ -541,10 +546,10 @@ re-slicing of it, never a second API.
|
|
|
541
546
|
| `components/table` | `NUMERIC_CELL_CLASS`, `Table`, `TableBody`, `TableCaption`, `TableCell`, `TableEmpty`, `TableFoot`, `TableHead`, `TableHeaderCell`, `TableRow`, _`TableAlign`_, _`TableBodyProps`_, _`TableCaptionProps`_, _`TableCellProps`_, _`TableDensity`_, _`TableEmptyProps`_, _`TableFootProps`_, _`TableHeaderCellProps`_, _`TableHeaderCellSize`_, _`TableHeaderCellWeight`_, _`TableHeadProps`_, _`TableLayout`_, _`TableProps`_, _`TableRowProps`_, _`TableRowVariant`_, _`TableVAlign`_ |
|
|
542
547
|
| `components/separator` | `Separator`, _`SeparatorProps`_ |
|
|
543
548
|
| `components/scroll-area` | `ScrollArea`, _`ScrollAreaProps`_ |
|
|
544
|
-
| `components/list` | `DEFAULT_LIST_LABELS`, `List`, `ListItem`, _`ListDensity`_, _`ListItemLinkProps`_, _`ListItemProps`_, _`ListLabels`_, _`ListProps`_, _`ListSeparator`_ |
|
|
549
|
+
| `components/list` | `DEFAULT_LIST_LABELS`, `List`, `ListItem`, _`ListDensity`_, _`ListItemLinkProps`_, _`ListItemProps`_, _`ListItemTrailingTone`_, _`ListLabels`_, _`ListProps`_, _`ListSeparator`_ |
|
|
545
550
|
| `components/menu-item` | `MenuItem`, _`MenuItemLinkProps`_, _`MenuItemProps`_, _`MenuItemTone`_ |
|
|
546
551
|
| `components/text` | `Caption`, `CAPTION_CLASS`, `SECTION_LABEL_CLASS`, `SectionLabel`, _`CaptionProps`_, _`SectionLabelProps`_, _`SectionLabelSize`_, _`SectionLabelVariant`_ |
|
|
547
|
-
| `components/status-dot` | `StatusDot`, _`StatusDotProps`_, _`StatusDotSize`_, _`StatusDotTone`_ |
|
|
552
|
+
| `components/status-dot` | `StatusDot`, `statusDotColor`, _`StatusDotProps`_, _`StatusDotSize`_, _`StatusDotTone`_ |
|
|
548
553
|
| `components/page-header` | `PageHeader`, _`PageHeaderActionsAlign`_, _`PageHeaderMobileLayout`_, _`PageHeaderProps`_, _`PageHeaderSize`_ |
|
|
549
554
|
| `components/breadcrumbs` | `Breadcrumbs`, `DEFAULT_BREADCRUMBS_LABELS`, _`BreadcrumbItem`_, _`BreadcrumbLinkProps`_, _`BreadcrumbsLabels`_, _`BreadcrumbsProps`_ |
|
|
550
555
|
| `components/text-link` | `TextLink`, _`TextLinkCurrent`_, _`TextLinkProps`_, _`TextLinkRenderProps`_, _`TextLinkTone`_, _`TextLinkUnderline`_ |
|
package/dist/chart.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { TimeTickUnit } from './components/series-chart-ticks.js';
|
|
|
13
13
|
import 'recharts';
|
|
14
14
|
import 'react';
|
|
15
15
|
import './lib/direction.js';
|
|
16
|
-
import './kit-labels-
|
|
16
|
+
import './kit-labels-DE--LmCk.js';
|
|
17
17
|
import './components/data-table-labels.js';
|
|
18
18
|
import './components/mini-calendar.js';
|
|
19
19
|
import './components/calendar-heatmap.js';
|
|
@@ -43,7 +43,7 @@ import './components/dialog-frame.js';
|
|
|
43
43
|
import './components/modal.js';
|
|
44
44
|
import './hooks/use-search-param-state.js';
|
|
45
45
|
import './components/measured-grid.js';
|
|
46
|
-
import './feedback-attachment-
|
|
46
|
+
import './feedback-attachment-WFiXJ8We.js';
|
|
47
47
|
import './feedback/feedback-thread.js';
|
|
48
48
|
import './feedback/feedback-inbox.js';
|
|
49
49
|
import './components/account-settings-labels.js';
|
|
@@ -51,12 +51,12 @@ import './components/confirm-dialog.js';
|
|
|
51
51
|
import './components/floating-panel.js';
|
|
52
52
|
import './components/bulk-action-bar.js';
|
|
53
53
|
import './components/list.js';
|
|
54
|
+
import './components/signed-amount.js';
|
|
54
55
|
import './components/breadcrumbs.js';
|
|
55
56
|
import './components/toast.js';
|
|
56
57
|
import './components/description-list.js';
|
|
57
58
|
import './components/line-items.js';
|
|
58
59
|
import './components/progress-bar.js';
|
|
59
|
-
import './components/signed-amount.js';
|
|
60
60
|
import './components/error-boundary.js';
|
|
61
61
|
import './components/authed-image.js';
|
|
62
62
|
import './hooks/use-authed-src.js';
|
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { CalculatorButtonLabels } from './calculator.js';
|
|
4
4
|
import { NumberPadSheetLabels } from './numpad-sheet.js';
|
|
5
|
-
import '../kit-labels-
|
|
5
|
+
import '../kit-labels-DE--LmCk.js';
|
|
6
6
|
import './data-table-labels.js';
|
|
7
7
|
import './mini-calendar.js';
|
|
8
8
|
import './calendar-heatmap.js';
|
|
@@ -34,7 +34,7 @@ import './dialog-frame.js';
|
|
|
34
34
|
import './modal.js';
|
|
35
35
|
import '../hooks/use-search-param-state.js';
|
|
36
36
|
import './measured-grid.js';
|
|
37
|
-
import '../feedback-attachment-
|
|
37
|
+
import '../feedback-attachment-WFiXJ8We.js';
|
|
38
38
|
import '../feedback/feedback-thread.js';
|
|
39
39
|
import '../feedback/feedback-inbox.js';
|
|
40
40
|
import './account-settings-labels.js';
|
|
@@ -42,12 +42,12 @@ import './confirm-dialog.js';
|
|
|
42
42
|
import './floating-panel.js';
|
|
43
43
|
import './bulk-action-bar.js';
|
|
44
44
|
import './list.js';
|
|
45
|
+
import './signed-amount.js';
|
|
45
46
|
import './breadcrumbs.js';
|
|
46
47
|
import './toast.js';
|
|
47
48
|
import './description-list.js';
|
|
48
49
|
import './line-items.js';
|
|
49
50
|
import './progress-bar.js';
|
|
50
|
-
import './signed-amount.js';
|
|
51
51
|
import './error-boundary.js';
|
|
52
52
|
import './authed-image.js';
|
|
53
53
|
import '../hooks/use-authed-src.js';
|
|
@@ -76,6 +76,13 @@ interface AmountInputProps {
|
|
|
76
76
|
"aria-describedby"?: string;
|
|
77
77
|
"aria-invalid"?: boolean | "true" | "false";
|
|
78
78
|
"aria-required"?: boolean | "true" | "false";
|
|
79
|
+
/** {@link NumberInput}'s `hint`, the same rule: a {@link FieldHint} "?" rides the
|
|
80
|
+
* label's own line, beside the label (not at the far end, where the calculator and
|
|
81
|
+
* the currency chip live); plain TEXT (a string or a number) is a caption UNDER
|
|
82
|
+
* the field, attached through `aria-describedby` after the caller's own. A phone's
|
|
83
|
+
* `variant="display"` has no visible label, so a FieldHint is dropped there; a
|
|
84
|
+
* caption still shows. */
|
|
85
|
+
hint?: ReactNode;
|
|
79
86
|
/** Every user-facing string this component and the two it composes own, so a
|
|
80
87
|
* translating host can supply its own. Each key optional, and each a per-field
|
|
81
88
|
* override of the kit-wide translation in `<UiKitProvider labels>`: `currency`
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef, useCallback, useId, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { ChevronDown } from "lucide-react";
|
|
5
5
|
import { CURRENCIES, CurrencyFlag, currencyName, getCurrency } from "./currency-select.js";
|
|
6
|
-
import { FIELD_BASE, FIELD_DISPLAY, FIELD_INVALID, FLOATING_INPUT_CLASS,
|
|
6
|
+
import { FIELD_BASE, FIELD_DISPLAY, FIELD_INVALID, FLOATING_INPUT_CLASS, FloatingField, PHONE_QUERY } from "./ui.js";
|
|
7
7
|
import { cn } from "../lib/cn.js";
|
|
8
8
|
import { currencyMinorDigits } from "../lib/format.js";
|
|
9
9
|
import { useMediaQuery } from "../hooks/use-media-query.js";
|
|
@@ -71,9 +71,12 @@ function isResultOf(previous, text, settle) {
|
|
|
71
71
|
return n !== null && settle(formatResult(n)) === text.trim();
|
|
72
72
|
}
|
|
73
73
|
const AmountInput = forwardRef(
|
|
74
|
-
({ value, onChange, currency, onCurrencyChange, placeholder, label, disabled, invalid: invalidProp, className, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, autoFocus, tone = "neutral", negative = false, onNegativeChange, variant = "field", align = "start", labels, currencyNames, digits: digitsProp, min, max, onCommit }, ref) => {
|
|
74
|
+
({ value, onChange, currency, onCurrencyChange, placeholder, label, disabled, invalid: invalidProp, className, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, hint, autoFocus, tone = "neutral", negative = false, onNegativeChange, variant = "field", align = "start", labels, currencyNames, digits: digitsProp, min, max, onCommit }, ref) => {
|
|
75
75
|
const generatedId = useId();
|
|
76
76
|
const fieldId = id ?? generatedId;
|
|
77
|
+
const hintId = useId();
|
|
78
|
+
const textHint = typeof hint === "string" && hint !== "" || typeof hint === "number";
|
|
79
|
+
const describedBy = textHint ? ariaDescribedBy ? `${ariaDescribedBy} ${hintId}` : hintId : ariaDescribedBy;
|
|
77
80
|
const invalid = Boolean(invalidProp) || ariaInvalid === true || ariaInvalid === "true";
|
|
78
81
|
const editable = !!onCurrencyChange;
|
|
79
82
|
const isMobile = useMediaQuery(PHONE_QUERY, false);
|
|
@@ -150,165 +153,171 @@ const AmountInput = forwardRef(
|
|
|
150
153
|
);
|
|
151
154
|
}, [query, currencyNames, locale]);
|
|
152
155
|
return /* @__PURE__ */ jsxs("div", { ref: wrapperRef, className: cn("w-full", className), children: [
|
|
153
|
-
/* @__PURE__ */ jsxs(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
{
|
|
213
|
-
className: cn(
|
|
214
|
-
"absolute flex items-center gap-0.5",
|
|
215
|
-
// Logical `end-*`: the chip and the calculator are the figure's trailing
|
|
216
|
-
// controls, so a right-to-left form carries them on the left.
|
|
217
|
-
asDisplay ? "bottom-1 end-0" : "inset-y-1 end-1"
|
|
156
|
+
/* @__PURE__ */ jsxs(
|
|
157
|
+
FloatingField,
|
|
158
|
+
{
|
|
159
|
+
className: "w-full",
|
|
160
|
+
htmlFor: fieldId,
|
|
161
|
+
label,
|
|
162
|
+
srOnlyLabel: asDisplay,
|
|
163
|
+
hint: textHint ? void 0 : hint,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsx(
|
|
166
|
+
"input",
|
|
167
|
+
{
|
|
168
|
+
ref: setRefs,
|
|
169
|
+
id: fieldId,
|
|
170
|
+
"aria-label": ariaLabel,
|
|
171
|
+
type: "text",
|
|
172
|
+
autoFocus,
|
|
173
|
+
inputMode: isMobile ? "none" : "decimal",
|
|
174
|
+
autoComplete: "off",
|
|
175
|
+
disabled,
|
|
176
|
+
placeholder: asDisplay ? placeholder ?? "0" : label !== void 0 ? " " : placeholder,
|
|
177
|
+
value: display,
|
|
178
|
+
onChange: (e) => typed(e.target.value),
|
|
179
|
+
onFocus: () => setFocused(true),
|
|
180
|
+
onBlur: () => {
|
|
181
|
+
commit();
|
|
182
|
+
setFocused(false);
|
|
183
|
+
},
|
|
184
|
+
onKeyDown: (e) => {
|
|
185
|
+
if (e.key === "Enter") commit();
|
|
186
|
+
},
|
|
187
|
+
className: cn(
|
|
188
|
+
// With a label, use the floating-input padding (pt-4 pb-1) like every
|
|
189
|
+
// other labelled field so the value sits BELOW the floated label rather
|
|
190
|
+
// than vertically centred where it overlaps the resting label
|
|
191
|
+
// (feedback #314). FLOATING_INPUT_CLASS already bundles the peer +
|
|
192
|
+
// transparent-placeholder bits.
|
|
193
|
+
asDisplay ? DISPLAY_INPUT_CLASS : label !== void 0 ? FLOATING_INPUT_CLASS : FIELD_BASE,
|
|
194
|
+
// Room for the trailing controls. showCalc is always false on a phone,
|
|
195
|
+
// so the display shape only ever has to clear the currency chip — and
|
|
196
|
+
// it clears it by the chip's actual width (a text-sm code plus a
|
|
197
|
+
// chevron, ~58px) rather than the 5rem the boxed shape reserves. On a
|
|
198
|
+
// 375px screen those 16px are the difference between a readable figure
|
|
199
|
+
// and a clipped one (feedback #430 rework).
|
|
200
|
+
asDisplay ? currency ? editable ? "pe-16" : "pe-12" : "pe-0" : showCalc ? currency ? editable ? "pe-24" : "pe-16" : "pe-10" : currency ? editable ? "pe-20" : "pe-14" : "pe-3",
|
|
201
|
+
// Centred display shape: centre in what is LEFT of the currency chip.
|
|
202
|
+
// `text-center` alone would centre the figure in the whole box, i.e.
|
|
203
|
+
// partly underneath the chip; the padding above is what takes the chip
|
|
204
|
+
// out of the centring, and nothing is added at the start because a
|
|
205
|
+
// mirrored reservation would spend the width twice (see `align`).
|
|
206
|
+
asDisplay && align === "center" && "text-center",
|
|
207
|
+
// Last, so it wins over the base class's own text colour.
|
|
208
|
+
TONE_CLASS[tone],
|
|
209
|
+
invalid && FIELD_INVALID
|
|
210
|
+
),
|
|
211
|
+
"aria-invalid": invalid || void 0,
|
|
212
|
+
"aria-describedby": describedBy,
|
|
213
|
+
"aria-required": ariaRequired
|
|
214
|
+
}
|
|
218
215
|
),
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
),
|
|
244
|
-
children: currency
|
|
245
|
-
}
|
|
246
|
-
),
|
|
247
|
-
currency && editable && /* @__PURE__ */ jsxs(
|
|
248
|
-
"button",
|
|
249
|
-
{
|
|
250
|
-
ref: chipRef,
|
|
251
|
-
type: "button",
|
|
252
|
-
onClick: () => setOpen((v) => !v),
|
|
253
|
-
"aria-label": (
|
|
254
|
-
// "Currency: EUR" through `common.fieldValue`, not a template literal:
|
|
255
|
-
// the colon-and-space is punctuation a translation has to own.
|
|
256
|
-
selected ? common.fieldValue(currencyText.currency, selected.code) : currencyText.currency
|
|
216
|
+
/* @__PURE__ */ jsxs(
|
|
217
|
+
"div",
|
|
218
|
+
{
|
|
219
|
+
className: cn(
|
|
220
|
+
"absolute flex items-center gap-0.5",
|
|
221
|
+
// Logical `end-*`: the chip and the calculator are the figure's trailing
|
|
222
|
+
// controls, so a right-to-left form carries them on the left.
|
|
223
|
+
asDisplay ? "bottom-1 end-0" : "inset-y-1 end-1"
|
|
224
|
+
),
|
|
225
|
+
children: [
|
|
226
|
+
showCalc && /* @__PURE__ */ jsx(
|
|
227
|
+
CalculatorButton,
|
|
228
|
+
{
|
|
229
|
+
value: display,
|
|
230
|
+
onChange: (result, expression) => {
|
|
231
|
+
setDraft(null);
|
|
232
|
+
const settled = settle(result);
|
|
233
|
+
handleText(settled, expression);
|
|
234
|
+
onCommit?.(settled);
|
|
235
|
+
},
|
|
236
|
+
className: "px-1.5",
|
|
237
|
+
ariaLabel: labels?.calculatorTrigger,
|
|
238
|
+
labels: labels?.calculator
|
|
239
|
+
}
|
|
257
240
|
),
|
|
258
|
-
|
|
259
|
-
"
|
|
260
|
-
|
|
241
|
+
currency && !editable && /* @__PURE__ */ jsx(
|
|
242
|
+
"span",
|
|
243
|
+
{
|
|
244
|
+
"aria-hidden": true,
|
|
245
|
+
className: cn(
|
|
246
|
+
"pointer-events-none px-1 font-medium text-[var(--text-muted)]",
|
|
247
|
+
// A text-xs chip next to a 36px figure reads as a stray footnote.
|
|
248
|
+
asDisplay ? "text-sm" : "text-xs"
|
|
249
|
+
),
|
|
250
|
+
children: currency
|
|
251
|
+
}
|
|
261
252
|
),
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
253
|
+
currency && editable && /* @__PURE__ */ jsxs(
|
|
254
|
+
"button",
|
|
255
|
+
{
|
|
256
|
+
ref: chipRef,
|
|
257
|
+
type: "button",
|
|
258
|
+
onClick: () => setOpen((v) => !v),
|
|
259
|
+
"aria-label": (
|
|
260
|
+
// "Currency: EUR" through `common.fieldValue`, not a template literal:
|
|
261
|
+
// the colon-and-space is punctuation a translation has to own.
|
|
262
|
+
selected ? common.fieldValue(currencyText.currency, selected.code) : currencyText.currency
|
|
263
|
+
),
|
|
264
|
+
className: cn(
|
|
265
|
+
"flex items-center gap-1 rounded px-2 py-1 font-medium text-[var(--text-secondary)] hover:bg-[var(--bg-hover)]",
|
|
266
|
+
asDisplay ? "text-sm" : "text-xs"
|
|
267
|
+
),
|
|
268
|
+
children: [
|
|
269
|
+
currency,
|
|
270
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-3" })
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
)
|
|
274
|
+
]
|
|
284
275
|
}
|
|
285
276
|
),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
277
|
+
editable && open && /* @__PURE__ */ jsx(
|
|
278
|
+
DropdownPanel,
|
|
279
|
+
{
|
|
280
|
+
anchorRef: chipRef,
|
|
281
|
+
panelRef,
|
|
282
|
+
empty: filtered.length === 0,
|
|
283
|
+
header: /* @__PURE__ */ jsx(
|
|
284
|
+
DropdownSearchHeader,
|
|
285
|
+
{
|
|
286
|
+
query,
|
|
287
|
+
onQueryChange: setQuery,
|
|
288
|
+
inputRef,
|
|
289
|
+
placeholder: currencyText.search
|
|
290
|
+
}
|
|
291
|
+
),
|
|
292
|
+
children: filtered.map((c) => {
|
|
293
|
+
const active = c.code === selected?.code;
|
|
294
|
+
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
295
|
+
"button",
|
|
296
|
+
{
|
|
297
|
+
type: "button",
|
|
298
|
+
onClick: () => {
|
|
299
|
+
onCurrencyChange?.(c.code);
|
|
300
|
+
setOpen(false);
|
|
301
|
+
},
|
|
302
|
+
className: cn(
|
|
303
|
+
"flex w-full items-center gap-2 px-3 py-1.5 text-sm text-start hover:bg-[var(--bg-hover)]",
|
|
304
|
+
active && "bg-[var(--bg-active)]"
|
|
305
|
+
),
|
|
306
|
+
children: [
|
|
307
|
+
/* @__PURE__ */ jsx(CurrencyFlag, { country: c.country }),
|
|
308
|
+
/* @__PURE__ */ jsx("span", { className: "font-mono text-[var(--text-muted)] w-8 shrink-0 text-xs", children: c.symbol }),
|
|
309
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-[var(--text-primary)]", children: c.code }),
|
|
310
|
+
/* @__PURE__ */ jsx("span", { className: "text-[var(--text-muted)] truncate text-xs", children: currencyName(c, currencyNames, locale) })
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
) }, c.code);
|
|
314
|
+
})
|
|
315
|
+
}
|
|
316
|
+
)
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
textHint && /* @__PURE__ */ jsx("p", { id: hintId, className: "mt-1 text-[11px] leading-tight text-[var(--text-muted)]", children: hint }),
|
|
312
321
|
showNumpad && /* @__PURE__ */ jsx(
|
|
313
322
|
NumberPadSheet,
|
|
314
323
|
{
|