@eifi1/ui-kit 0.21.0 → 0.23.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 +42 -25
- package/dist/chart.d.ts +19 -14
- package/dist/components/account-chips.d.ts +10 -3
- package/dist/components/account-chips.js +5 -2
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/account-settings.d.ts +33 -2
- package/dist/components/account-settings.js +43 -21
- package/dist/components/account-settings.js.map +1 -1
- package/dist/components/amount-input.d.ts +53 -14
- package/dist/components/amount-input.js +17 -28
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.d.ts +29 -0
- package/dist/components/autocomplete.js +134 -104
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/button-group.d.ts +19 -14
- package/dist/components/calculator.d.ts +19 -14
- package/dist/components/checkbox-group.d.ts +104 -0
- package/dist/components/checkbox-group.js +111 -0
- package/dist/components/checkbox-group.js.map +1 -0
- package/dist/components/checkbox.d.ts +19 -0
- package/dist/components/checkbox.js +30 -7
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/chip.d.ts +18 -0
- package/dist/components/chip.js +47 -10
- package/dist/components/chip.js.map +1 -1
- package/dist/components/column-mapper.d.ts +182 -0
- package/dist/components/column-mapper.js +375 -0
- package/dist/components/column-mapper.js.map +1 -0
- package/dist/components/combobox-core.d.ts +39 -2
- package/dist/components/combobox-core.js +29 -6
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.d.ts +91 -2
- package/dist/components/combobox.js +454 -308
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +69 -161
- package/dist/components/confirm-dialog.js +7 -8
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button.d.ts +16 -11
- package/dist/components/country-select.d.ts +167 -0
- package/dist/components/country-select.js +293 -0
- package/dist/components/country-select.js.map +1 -0
- package/dist/components/currency-select.d.ts +17 -1
- package/dist/components/currency-select.js +56 -23
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.d.ts +69 -166
- package/dist/components/danger-confirm.js +144 -50
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-cells.d.ts +1 -2
- package/dist/components/data-table-filter-popover.d.ts +1 -2
- package/dist/components/data-table-filters.d.ts +1 -2
- package/dist/components/data-table-labels.d.ts +4 -97
- package/dist/components/data-table-labels.js +9 -1
- package/dist/components/data-table-labels.js.map +1 -1
- package/dist/components/data-table-pagination.d.ts +3 -1
- package/dist/components/data-table.d.ts +1 -2
- package/dist/components/data-table.js +98 -3
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.d.ts +66 -5
- package/dist/components/date-picker.js +378 -66
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/entity-combobox.d.ts +42 -1
- package/dist/components/entity-combobox.js +154 -113
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/facing-pair.d.ts +19 -14
- package/dist/components/field-parts.d.ts +224 -0
- package/dist/components/field-parts.js +156 -0
- package/dist/components/field-parts.js.map +1 -0
- package/dist/components/field-strip.d.ts +105 -0
- package/dist/components/field-strip.js +46 -0
- package/dist/components/field-strip.js.map +1 -0
- package/dist/components/file-button.d.ts +19 -14
- package/dist/components/file-button.js +13 -3
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.d.ts +41 -15
- package/dist/components/file-dropzone.js +57 -34
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/form-actions.d.ts +18 -13
- package/dist/components/form-actions.js +69 -5
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/iban-input.d.ts +69 -0
- package/dist/components/iban-input.js +125 -0
- package/dist/components/iban-input.js.map +1 -0
- package/dist/components/icon-picker.d.ts +21 -2
- package/dist/components/icon-picker.js +19 -4
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/inline-edit-field.d.ts +167 -0
- package/dist/components/inline-edit-field.js +293 -0
- package/dist/components/inline-edit-field.js.map +1 -0
- package/dist/components/language-select.d.ts +130 -0
- package/dist/components/language-select.js +18 -0
- package/dist/components/language-select.js.map +1 -0
- package/dist/components/line-items.d.ts +25 -3
- package/dist/components/line-items.js +55 -46
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list.d.ts +25 -0
- package/dist/components/list.js +16 -5
- package/dist/components/list.js.map +1 -1
- package/dist/components/money-field.d.ts +32 -14
- package/dist/components/money-field.js.map +1 -1
- package/dist/components/month-picker.d.ts +52 -4
- package/dist/components/month-picker.js +291 -86
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.d.ts +26 -1
- package/dist/components/multi-entity-combobox.js +143 -102
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.d.ts +8 -1
- package/dist/components/multi-select.js +9 -4
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/number-field.d.ts +34 -19
- package/dist/components/number-field.js +6 -20
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/number-input.d.ts +79 -19
- package/dist/components/number-input.js +90 -38
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numpad-sheet.d.ts +19 -14
- package/dist/components/one-time-code-input.d.ts +100 -0
- package/dist/components/one-time-code-input.js +137 -0
- package/dist/components/one-time-code-input.js.map +1 -0
- package/dist/components/phone-input.d.ts +69 -0
- package/dist/components/phone-input.js +171 -0
- package/dist/components/phone-input.js.map +1 -0
- package/dist/components/reauth-dialog.d.ts +2 -2
- package/dist/components/reauth-dialog.js +6 -8
- package/dist/components/reauth-dialog.js.map +1 -1
- package/dist/components/series-chart.d.ts +19 -14
- package/dist/components/settings-fields.d.ts +19 -14
- package/dist/components/share-card.d.ts +16 -11
- package/dist/components/sign-chip.d.ts +66 -0
- package/dist/components/sign-chip.js +39 -0
- package/dist/components/sign-chip.js.map +1 -0
- package/dist/components/swatch-picker.d.ts +43 -2
- package/dist/components/swatch-picker.js +80 -32
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/switch.d.ts +19 -0
- package/dist/components/switch.js +24 -6
- package/dist/components/switch.js.map +1 -1
- package/dist/components/text-link.d.ts +18 -13
- package/dist/components/tile-radio.d.ts +88 -13
- package/dist/components/tile-radio.js +28 -11
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.d.ts +24 -15
- package/dist/components/time-input.js.map +1 -1
- package/dist/components/toggle-group.d.ts +47 -1
- package/dist/components/toggle-group.js +110 -69
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/trigger-aria.d.ts +3 -0
- package/dist/components/trigger-aria.js +3 -1
- package/dist/components/trigger-aria.js.map +1 -1
- package/dist/components/ui.d.ts +16 -11
- package/dist/components/ui.js +284 -88
- package/dist/components/ui.js.map +1 -1
- package/dist/components/use-table-state.d.ts +1 -2
- package/dist/{data-table-3mi2R3so.d.ts → data-table-labels-B7OdnM0S.d.ts} +140 -3
- package/dist/data-table.d.ts +1 -2
- package/dist/data-table.js +2 -1
- package/dist/data-table.js.map +1 -1
- package/dist/feedback/feedback-attachment.d.ts +1 -1
- package/dist/feedback/feedback-attachment.js +348 -41
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +1 -1
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +3 -2
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-thread.d.ts +68 -253
- package/dist/feedback/feedback-thread.js +46 -10
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/{kit-labels-D1J2_jyD.d.ts → feedback-BxeQVzwq.d.ts} +1206 -20
- package/dist/{feedback-attachment-WFiXJ8We.d.ts → feedback-attachment-fGAzZPf0.d.ts} +178 -11
- package/dist/feedback.d.ts +66 -2
- package/dist/hooks/use-file-drop.d.ts +19 -14
- package/dist/i18n/defaults.d.ts +19 -14
- package/dist/i18n/defaults.js +19 -2
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +19 -14
- package/dist/i18n/german.js +84 -5
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +15 -10
- package/dist/i18n/kit-labels.js +8 -2
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +19 -14
- package/dist/i18n/locales/de-CH.d.ts +19 -14
- package/dist/i18n/locales/en.d.ts +19 -14
- package/dist/i18n/locales/en.js +16 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +19 -14
- package/dist/i18n/locales/es.js +83 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +19 -14
- package/dist/i18n/locales/fr.js +82 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +19 -14
- package/dist/i18n/locales/hu.js +85 -5
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +19 -14
- package/dist/i18n/locales/it.js +84 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +19 -14
- package/dist/i18n/locales/zh.js +80 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +19 -14
- package/dist/i18n/review.js +27 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.js +73 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/column-mapping.d.ts +81 -0
- package/dist/lib/column-mapping.js +108 -0
- package/dist/lib/column-mapping.js.map +1 -0
- package/dist/lib/countries.d.ts +43 -0
- package/dist/lib/countries.js +39 -0
- package/dist/lib/countries.js.map +1 -0
- package/dist/lib/decimal-marks.d.ts +46 -0
- package/dist/lib/decimal-marks.js +40 -0
- package/dist/lib/decimal-marks.js.map +1 -0
- package/dist/lib/iban.d.ts +98 -0
- package/dist/lib/iban.js +154 -0
- package/dist/lib/iban.js.map +1 -0
- package/dist/lib/isin.d.ts +30 -0
- package/dist/lib/isin.js +36 -0
- package/dist/lib/isin.js.map +1 -0
- package/dist/lib/phone.d.ts +69 -0
- package/dist/lib/phone.js +121 -0
- package/dist/lib/phone.js.map +1 -0
- package/dist/lib/table-text.d.ts +109 -1
- package/dist/lib/table-text.js +122 -1
- package/dist/lib/table-text.js.map +1 -1
- package/dist/rhf/fields.d.ts +233 -18
- package/dist/rhf/fields.js +456 -3
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form.d.ts +19 -14
- package/dist/rhf.d.ts +22 -15
- package/dist/rhf.js.map +1 -1
- package/dist/shell/app-shell.d.ts +18 -13
- package/dist/shell/top-bar-brand.d.ts +19 -14
- package/dist/shell/topbar-action-menu.d.ts +36 -3
- package/dist/shell/topbar-action-menu.js +74 -33
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell.d.ts +18 -13
- package/dist/table-text.d.ts +1 -1
- package/dist/tour/tour.js +20 -24
- package/dist/tour/tour.js.map +1 -1
- package/dist/wizard/stepper-nav.d.ts +49 -16
- package/dist/wizard/stepper-nav.js +4 -0
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard.d.ts +19 -14
- package/package.json +1 -1
- package/src/components/account-chips.tsx +17 -3
- package/src/components/account-settings.tsx +92 -26
- package/src/components/amount-input.tsx +68 -56
- package/src/components/autocomplete.tsx +198 -114
- package/src/components/checkbox-group.tsx +229 -0
- package/src/components/checkbox.tsx +72 -8
- package/src/components/chip.tsx +80 -10
- package/src/components/column-mapper.tsx +666 -0
- package/src/components/combobox-core.tsx +82 -9
- package/src/components/combobox.tsx +661 -340
- package/src/components/confirm-dialog.tsx +12 -8
- package/src/components/country-select.tsx +556 -0
- package/src/components/currency-select.tsx +109 -33
- package/src/components/danger-confirm.tsx +429 -82
- package/src/components/data-table-labels.ts +16 -1
- package/src/components/data-table.tsx +175 -6
- package/src/components/date-picker.tsx +595 -71
- package/src/components/entity-combobox.tsx +235 -124
- package/src/components/field-parts.tsx +403 -0
- package/src/components/field-strip.tsx +149 -0
- package/src/components/file-button.tsx +36 -3
- package/src/components/file-dropzone.tsx +106 -38
- package/src/components/form-actions.tsx +147 -6
- package/src/components/iban-input.tsx +231 -0
- package/src/components/icon-picker.tsx +47 -6
- package/src/components/inline-edit-field.tsx +533 -0
- package/src/components/language-select.tsx +78 -0
- package/src/components/line-items.tsx +35 -2
- package/src/components/list.tsx +55 -6
- package/src/components/money-field.tsx +13 -0
- package/src/components/month-picker.tsx +400 -63
- package/src/components/multi-entity-combobox.tsx +207 -120
- package/src/components/multi-select.tsx +80 -58
- package/src/components/number-field.tsx +28 -46
- package/src/components/number-input.tsx +210 -43
- package/src/components/one-time-code-input.tsx +288 -0
- package/src/components/phone-input.tsx +299 -0
- package/src/components/reauth-dialog.tsx +17 -18
- package/src/components/sign-chip.tsx +103 -0
- package/src/components/swatch-picker.tsx +143 -31
- package/src/components/switch.tsx +58 -7
- package/src/components/tile-radio.tsx +145 -29
- package/src/components/time-input.tsx +8 -1
- package/src/components/toggle-group.tsx +206 -73
- package/src/components/trigger-aria.ts +5 -0
- package/src/components/ui.tsx +479 -138
- package/src/data-table.ts +2 -1
- package/src/feedback/feedback-attachment.tsx +597 -46
- package/src/feedback/feedback-dialog.tsx +9 -3
- package/src/feedback/feedback-inbox.tsx +3 -2
- package/src/feedback/feedback-thread.tsx +113 -9
- package/src/i18n/defaults.ts +18 -1
- package/src/i18n/german.ts +89 -0
- package/src/i18n/kit-labels.tsx +82 -2
- package/src/i18n/locales/en.ts +36 -4
- package/src/i18n/locales/es.ts +87 -0
- package/src/i18n/locales/fr.ts +87 -0
- package/src/i18n/locales/hu.ts +83 -0
- package/src/i18n/locales/it.ts +88 -0
- package/src/i18n/locales/zh.ts +76 -0
- package/src/i18n/review.ts +26 -0
- package/src/index.ts +71 -3
- package/src/lib/column-mapping.ts +234 -0
- package/src/lib/countries.ts +91 -0
- package/src/lib/decimal-marks.ts +99 -0
- package/src/lib/iban.ts +171 -0
- package/src/lib/isin.ts +62 -0
- package/src/lib/phone.ts +211 -0
- package/src/lib/table-text.ts +271 -0
- package/src/rhf/fields.tsx +860 -9
- package/src/rhf.ts +3 -1
- package/src/shell/topbar-action-menu.tsx +134 -38
- package/src/tour/tour.tsx +66 -28
- package/src/wizard/stepper-nav.tsx +35 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useMemo } from \"react\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { PasswordRevealLabels, TabsLabels } from \"../components/ui\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type { AccountSettingsLabels } from \"../components/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit ships no catalogue and resolves no strings, and that stays\n * true: the app supplies every word. What was wrong was HOW it had to supply them —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer writes its translation ONCE, as a `UiKitLabels` (or a partial of it),\n * mounts `<UiKitProvider labels={…} locale={…}>` at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name — the legal pages' shell, for every app. */\n legal: LegalLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\nexport const DEFAULT_COMMON_LABELS: CommonLabels = {\n close: \"Close\",\n clear: \"Clear\",\n search: \"Search\",\n done: \"Done\",\n cancel: \"Cancel\",\n save: \"Save\",\n back: \"Back\",\n next: \"Next\",\n remove: \"Remove\",\n loading: \"Loading…\",\n noResults: \"No results\",\n fieldValue: (field, value) => `${field}: ${value}`,\n dismiss: \"Dismiss\",\n opensInNewTab: \"opens in a new tab\",\n};\n\nexport const DEFAULT_DATE_PICKER_LABELS: DatePickerLabels = {\n panel: \"Choose a date\",\n rangePanel: \"Choose a date range\",\n clear: \"Clear\",\n previousDay: \"Previous day\",\n nextDay: \"Next day\",\n today: \"Today\",\n apply: \"Apply\",\n cancel: \"Cancel\",\n presets: \"Quick ranges\",\n};\n\nexport const DEFAULT_COMBOBOX_LABELS: ComboboxLabels = {\n search: \"Search\",\n noResults: \"No results\",\n clear: \"Clear\",\n loading: \"Loading…\",\n create: (query) => `Create “${query}”`,\n selectedCount: (count) => `${count} selected`,\n loadError: \"Couldn’t load results\",\n resultCount: (count) => (count === 1 ? \"1 result\" : `${count} results`),\n minChars: (count) =>\n count === 1 ? \"Type at least 1 character\" : `Type at least ${count} characters`,\n};\n\nexport const DEFAULT_MULTI_SELECT_LABELS: MultiSelectLabels = {\n search: \"Search\",\n selectAll: \"Select all\",\n clear: \"Clear\",\n all: \"All\",\n selectedCount: (count) => String(count),\n};\n\nexport const DEFAULT_CALCULATOR_LABELS: CalculatorLabels = {\n open: \"Open calculator\",\n panel: \"Calculator\",\n calculation: \"Calculation\",\n backspace: \"Backspace\",\n clear: \"Clear\",\n equals: \"Equals\",\n done: \"Done\",\n plus: \"Plus\",\n minus: \"Minus\",\n times: \"Times\",\n divide: \"Divide\",\n decimal: \"Decimal point\",\n};\n\nexport const DEFAULT_CURRENCY_LABELS: CurrencyLabels = {\n currency: \"Currency\",\n search: \"Search currency\",\n};\n\nexport const DEFAULT_APP_SHELL_LABELS: AppShellLabels = {\n collapse: \"Collapse sidebar\",\n expand: \"Expand sidebar\",\n toggleGroup: (groupLabel) => `${groupLabel}: pages`,\n};\n\nexport const DEFAULT_TOP_BAR_LABELS: TopBarLabels = {\n theme: \"Toggle theme\",\n palette: \"Appearance preset\",\n language: \"Language\",\n switchRole: \"Switch role\",\n role: (value) => `Role: ${value}`,\n};\n\nexport const DEFAULT_PICKER_SHEET_LABELS: PickerSheetLabels = { close: \"Close\" };\n\nexport const DEFAULT_SWIPEABLE_ROW_LABELS: SwipeableRowLabels = { actions: \"Row actions\" };\n\n/** Formats with the locale the provider was given (see {@link useKitFileLabels}).\n * This static default has no locale to hand and falls back to the runtime's. */\nexport const DEFAULT_FILE_LABELS: FileLabels = {\n size: (bytes) => formatFileSize(bytes),\n};\n\n/** \"12 kB\", \"3.4 MB\" — `Intl`'s unit formatting, so the digits, the decimal mark and\n * the unit's spelling all follow `locale`. */\nexport function formatFileSize(bytes: number, locale?: string): string {\n const units = [\"byte\", \"kilobyte\", \"megabyte\", \"gigabyte\"] as const;\n let value = bytes;\n let i = 0;\n while (value >= 1000 && i < units.length - 1) {\n value /= 1000;\n i += 1;\n }\n return new Intl.NumberFormat(locale, {\n style: \"unit\",\n unit: units[i],\n unitDisplay: i === 0 ? \"long\" : \"short\",\n maximumFractionDigits: value < 10 && i > 0 ? 1 : 0,\n }).format(value);\n}\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n}\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement],\n );\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/** What the nearest provider says about one namespace — `undefined` outside one.\n * For a component whose own resolver does more than a merge (the data table\n * derives `columnsCount` from `columns`): feed `{ ...overrides, ...props }` to it. */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): Partial<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns] as Partial<UiKitLabels[K]> | undefined;\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step.\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: Partial<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":";AA0hBS;AA1hBT,SAAS,eAAe,YAAY,eAAe;AAgU5C,MAAM,wBAAsC;AAAA,EACjD,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,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AAW,cAAc,EAAE;AACpC;AAGO,SAAS,8BAAiE;AAC/E,SAAO,WAAW,cAAc,EAAE;AACpC;AAGO,SAAS,iBAAiB,MAAwC;AACvE,QAAM,SAAS,aAAa;AAC5B,QAAM,WAAW;AAAA,IACf,OAAO,EAAE,MAAM,CAAC,UAAU,eAAe,OAAO,MAAM,EAAE;AAAA,IACxD,CAAC,MAAM;AAAA,EACT;AACA,SAAO,aAAa,QAAQ,UAAU,IAAI;AAC5C;AAcO,SAAS,iBACd,QACA,WACU;AACV,MAAI,CAAC,SAAS,SAAS,GAAG;AACxB,UAAM,IAAI;AAAA,MACR;AAAA,IAEF;AAAA,EACF;AACA,QAAM,UAAoB,CAAC;AAC3B,aAAW,CAAC,IAAI,IAAI,KAAK,OAAO,QAAQ,SAAS,GAAG;AAClD,UAAM,QAAS,SAA6E,EAAE;AAC9F,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAA+B,GAAG;AAC1E,YAAM,MAAM,QAAQ,GAAG;AACvB,UAAI,QAAQ,QAAW;AACrB,gBAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,EAAE;AAAA,MAC7B,WAAW,SAAS,KAAK,KAAK,SAAS,GAAG,GAAG;AAC3C,mBAAW,OAAO,OAAO,KAAK,KAAK,GAAG;AACpC,cAAI,IAAI,GAAG,MAAM,OAAW,SAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;AAAA,QAChE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/i18n/kit-labels.tsx"],"sourcesContent":["import { createContext, useContext, useMemo } from \"react\";\nimport type { AnchorHTMLAttributes, ReactElement, Ref } from \"react\";\nimport type { ReactNode } from \"react\";\nimport type { DataTableLabels } from \"../components/data-table-labels\";\nimport type { MiniCalendarLabels, WeekDay } from \"../components/mini-calendar\";\nimport type { CalendarHeatmapLabels } from \"../components/calendar-heatmap\";\nimport type { PopoverLabels } from \"../components/popover\";\nimport type { ChipInputLabels } from \"../components/chip\";\nimport type { FieldSyncLabels } from \"../components/field-sync\";\nimport type { CharacterCountLabels, PasswordRevealLabels, TabsLabels } from \"../components/ui\";\nimport type { WizardLabels } from \"../wizard/types\";\nimport type { TourLabels } from \"../tour/tour\";\nimport type { CommandPaletteLabels } from \"../search/command-palette\";\nimport type { GlobalSearchLabels } from \"../search/global-search\";\nimport type { MonthPickerLabels } from \"../components/month-picker\";\nimport type { PageContentsLabels } from \"../components/page-contents\";\nimport type { SeriesChartLabels } from \"../components/series-chart-labels\";\nimport type { PieChartLabels } from \"../components/pie-chart-labels\";\nimport type { SparklineLabels } from \"../components/sparkline\";\nimport type { StatTileLabels } from \"../components/stat-tile\";\nimport type { SignaturePadLabels } from \"../components/signature-pad\";\nimport type { PasswordStrengthLabels } from \"../components/password-strength\";\nimport type { DangerConfirmLabels } from \"../components/danger-confirm\";\nimport type { SwatchPickerLabels } from \"../components/swatch-picker\";\nimport type { IconPickerLabels } from \"../components/icon-picker\";\nimport type { DialogFrameLabels } from \"../components/dialog-frame\";\nimport type { FilePickerLabels } from \"../components/file-button\";\nimport type { MeasuredGridLabels } from \"../components/measured-grid\";\nimport type { FeedbackAttachmentFieldLabels } from \"../feedback/feedback-attachment\";\nimport type { FeedbackDialogTextLabels } from \"../feedback/feedback-dialog\";\nimport type { FeedbackComposerLabels, FeedbackThreadLabels } from \"../feedback/feedback-thread\";\nimport type { AccountSettingsLabels } from \"../components/account-settings-labels\";\nimport type { ConfirmDialogLabels } from \"../components/confirm-dialog\";\nimport type { FloatingPanelLabels } from \"../components/floating-panel\";\nimport type { CopyButtonLabels } from \"../components/copy-button\";\nimport type { BulkActionBarLabels } from \"../components/bulk-action-bar\";\nimport type { ListLabels } from \"../components/list\";\nimport type { BreadcrumbsLabels } from \"../components/breadcrumbs\";\nimport type { ToastLabels } from \"../components/toast\";\nimport type { FormActionsLabels } from \"../components/form-actions\";\nimport type { DescriptionListLabels } from \"../components/description-list\";\nimport type { LineItemsLabels } from \"../components/line-items\";\nimport type { ProgressBarLabels } from \"../components/progress-bar\";\nimport type { SignedAmountLabels } from \"../components/signed-amount\";\nimport type { ErrorBoundaryLabels } from \"../components/error-boundary\";\nimport type { AuthedImageLabels } from \"../components/authed-image\";\nimport type { ImageGridLabels } from \"../components/image-grid\";\nimport type { LightboxLabels } from \"../components/lightbox\";\nimport type { WriteLockLabels } from \"../components/write-lock\";\nimport type { LegalLabels } from \"../components/legal\";\nimport type { AccountStateLabels } from \"../components/account-chips\";\nimport type { ShareCardLabels } from \"../components/share-card\";\nimport type { ReauthDialogLabels } from \"../components/reauth-dialog\";\nimport type { ServerWakeLabels } from \"../components/server-wake\";\nimport type { TranslationReviewLabels } from \"../components/translation-review-labels\";\nimport type { CountrySelectLabels } from \"../components/country-select\";\nimport type { InlineEditLabels } from \"../components/inline-edit-field\";\nimport type { IbanInputLabels } from \"../components/iban-input\";\nimport type { PhoneInputLabels } from \"../components/phone-input\";\nimport type { SignChipLabels } from \"../components/sign-chip\";\nimport type { ColumnMapperLabels } from \"../components/column-mapper\";\n\n/**\n * EVERY string the kit renders, as one typed tree — and an optional provider that\n * hands it to every component at once.\n *\n * WHY THIS EXISTS. The kit ships no catalogue and resolves no strings, and that stays\n * true: the app supplies every word. What was wrong was HOW it had to supply them —\n * one `labels` prop per component instance, under a different prop name per\n * component (`labels`, `calendarLabels`, `passwordLabels`, `clearLabel`,\n * `searchPlaceholder`, `ariaLabel` …). A translated app therefore rendered English\n * wherever one call site forgot one prop, and nothing told it so: a German showcase\n * still said \"Rows per page\", \"Collapse sidebar\" and \"Popover\" in seven languages.\n *\n * Now there is one key per string, addressed by a dot path (`dataTable.pageSize`,\n * `datePicker.today`), and three sources in a fixed order of precedence:\n *\n * the component's own prop > <UiKitProvider labels> > English default\n *\n * A consumer writes its translation ONCE, as a `UiKitLabels` (or a partial of it),\n * mounts `<UiKitProvider labels={…} locale={…}>` at the root, and every kit component\n * below speaks that language — including the ones nested inside other kit components\n * (the calendar inside the data table's date filter, the popover inside the date\n * picker), which no prop at the outer call site could reach before.\n *\n * Messages that carry a value are FUNCTIONS of that value, never a template to fill:\n * a number glued into an English sentence is untranslatable, because the grammar\n * around it moves with it in most languages.\n */\n\n/* ── Namespaces that had no labels type of their own ─────────────────────── */\n\n/** The words several components share. A component's own namespace wins over these\n * where both exist; these are what a new component reaches for first. */\nexport interface CommonLabels {\n close: string;\n clear: string;\n search: string;\n done: string;\n cancel: string;\n save: string;\n back: string;\n next: string;\n remove: string;\n loading: string;\n noResults: string;\n /** \"Name: value\" — how a field's accessible name is composed with its value.\n * A colon-and-space is not universal punctuation (French puts a space before\n * the colon, Chinese uses a full-width one). */\n fieldValue: (field: string, value: string) => string;\n /** The × that puts away a banner or a notice (`AlertBanner onDismiss`). Not `close`:\n * nothing opened, and \"Close\" on a banner reads as closing the page it sits on. */\n dismiss: string;\n /** Read after a link that opens a new tab (`<Button href external>`, TextLink):\n * nothing else tells a screen reader the page is about to change tabs. */\n opensInNewTab: string;\n}\n\n/** `DatePicker` / `DateRangePicker` chrome. The calendar inside has its own\n * namespace, `miniCalendar`. */\nexport interface DatePickerLabels {\n /** Accessible name of the popover panel the calendar opens in. */\n panel: string;\n /** The same, for `DateRangePicker`'s panel. */\n rangePanel: string;\n clear: string;\n previousDay: string;\n nextDay: string;\n today: string;\n /** `DateRangePicker commit=\"apply\"`: the button that commits the drafted range. */\n apply: string;\n /** …and the one that discards it. */\n cancel: string;\n /** Accessible name of `DateRangePicker`'s preset column. */\n presets: string;\n}\n\n/** The whole combobox family: `Combobox`, `EntityCombobox`,\n * `MultiEntityCombobox`, `InlineEntityCombobox`, `Autocomplete`. */\nexport interface ComboboxLabels {\n search: string;\n noResults: string;\n clear: string;\n loading: string;\n /** The \"add this\" row when free entry is allowed. */\n create: (query: string) => string;\n /** Trigger summary once more than one value is picked. */\n selectedCount: (count: number) => string;\n /** An async lookup (`loadOptions`) failed. */\n loadError: string;\n /** Announced (live region) when the list settles on `count` > 0 rows. */\n resultCount: (count: number) => string;\n /** The query is shorter than the `minChars` a lookup needs. */\n minChars: (count: number) => string;\n}\n\nexport interface MultiSelectLabels {\n search: string;\n selectAll: string;\n clear: string;\n /** Trigger text when nothing is picked, which a multi-select reads as \"all\". */\n all: string;\n /** Trigger summary once some (but not all) values are picked. The English\n * default is the bare count, which is what the trigger has always shown. */\n selectedCount: (count: number) => string;\n}\n\n/** `CalculatorButton` (desktop popover keypad) and `NumberPadSheet` (phone sheet). */\nexport interface CalculatorLabels {\n /** The button that opens the calculator. */\n open: string;\n /** The popover / sheet itself. */\n panel: string;\n calculation: string;\n backspace: string;\n clear: string;\n equals: string;\n /** The primary key of the phone pad — visible text, not an aria-label. */\n done: string;\n /** Names of the operator keys and the decimal key. Their glyphs are not names a\n * screen reader agrees on — \"÷\" is read as \"division sign\", \"divided by\" or\n * nothing at all depending on the reader — so each says what it does. */\n plus: string;\n minus: string;\n times: string;\n divide: string;\n decimal: string;\n}\n\n/** `CurrencySelect` and the currency half of `AmountInput`. */\nexport interface CurrencyLabels {\n currency: string;\n search: string;\n}\n\nexport interface AppShellLabels {\n collapse: string;\n expand: string;\n /** Accessible name of an inline group's disclosure button (`subNav=\"inline\"`). */\n toggleGroup: (groupLabel: string) => string;\n}\n\nexport interface TopBarLabels {\n theme: string;\n palette: string;\n language: string;\n switchRole: string;\n /** The role switcher's tooltip, given the active role's name. */\n role: (value: string) => string;\n}\n\nexport interface PickerSheetLabels {\n close: string;\n}\n\nexport interface SwipeableRowLabels {\n actions: string;\n}\n\nexport interface FileLabels {\n /** A file size for display, given its size in BYTES. The default uses\n * `Intl.NumberFormat`'s unit formatting in the provider's locale. */\n size: (bytes: number) => string;\n}\n\n/** The complete tree. `UiKitProvider` takes any partial of it. */\nexport interface UiKitLabels {\n common: CommonLabels;\n dataTable: DataTableLabels;\n miniCalendar: MiniCalendarLabels;\n calendarHeatmap: CalendarHeatmapLabels;\n datePicker: DatePickerLabels;\n monthPicker: MonthPickerLabels;\n popover: PopoverLabels;\n combobox: ComboboxLabels;\n multiSelect: MultiSelectLabels;\n calculator: CalculatorLabels;\n currency: CurrencyLabels;\n chipInput: ChipInputLabels;\n fieldSync: FieldSyncLabels;\n passwordReveal: PasswordRevealLabels;\n tabs: TabsLabels;\n appShell: AppShellLabels;\n pageContents: PageContentsLabels;\n topBar: TopBarLabels;\n pickerSheet: PickerSheetLabels;\n swipeableRow: SwipeableRowLabels;\n file: FileLabels;\n wizard: WizardLabels;\n tour: TourLabels;\n commandPalette: CommandPaletteLabels;\n globalSearch: GlobalSearchLabels;\n seriesChart: SeriesChartLabels;\n pieChart: PieChartLabels;\n sparkline: SparklineLabels;\n statTile: StatTileLabels;\n signaturePad: SignaturePadLabels;\n passwordStrength: PasswordStrengthLabels;\n dangerConfirm: DangerConfirmLabels;\n swatchPicker: SwatchPickerLabels;\n iconPicker: IconPickerLabels;\n dialogFrame: DialogFrameLabels;\n filePicker: FilePickerLabels;\n measuredGrid: MeasuredGridLabels;\n feedbackAttachment: FeedbackAttachmentFieldLabels;\n /** 0.12.0: `FeedbackDialog`'s own strings; `FeedbackThread` / `FeedbackComposer`. */\n feedbackDialog: FeedbackDialogTextLabels;\n feedbackThread: FeedbackThreadLabels;\n feedbackComposer: FeedbackComposerLabels;\n /** 0.12.0: `ProfileSetting`, `PasswordSetting`, `TwoFactorSetting`, `PasskeysSetting`\n * — one record per section. The provider takes a whole section record; the\n * components merge it key by key, as a prop. */\n accountSettings: AccountSettingsLabels;\n confirmDialog: ConfirmDialogLabels;\n floatingPanel: FloatingPanelLabels;\n copyButton: CopyButtonLabels;\n bulkActionBar: BulkActionBarLabels;\n list: ListLabels;\n breadcrumbs: BreadcrumbsLabels;\n toast: ToastLabels;\n form: FormActionsLabels;\n descriptionList: DescriptionListLabels;\n lineItems: LineItemsLabels;\n progressBar: ProgressBarLabels;\n signedAmount: SignedAmountLabels;\n errorBoundary: ErrorBoundaryLabels;\n authedImage: AuthedImageLabels;\n imageGrid: ImageGridLabels;\n lightbox: LightboxLabels;\n /** 0.18.0: `WriteLockProvider`'s fallback reason, `AccountStateChip`, `SharePanel` /\n * `ShareCard` / `ShareDialog`, `ReauthDialog`. */\n writeLock: WriteLockLabels;\n accountState: AccountStateLabels;\n shareCard: ShareCardLabels;\n reauthDialog: ReauthDialogLabels;\n /** 0.18.0: `ServerWakeNotice` — keksdose's cold-start notice, for every app. */\n serverWake: ServerWakeLabels;\n /** 0.19.0: the translation-review parts (`TranslationReviewPanel`, its editor, chip,\n * progress, locale tabs and export) — keksdose's /translations, for every app. */\n translationReview: TranslationReviewLabels;\n /** 0.19.0: `LegalLinks`' navigation name — the legal pages' shell, for every app. */\n legal: LegalLabels;\n /** 0.22.0: the screen-reader words of `Input` / `Textarea`'s `showCount` counter. */\n characterCount: CharacterCountLabels;\n /** 0.22.0: `CountrySelect`. Its list's \"no results\" and counts are `combobox`'s. */\n countrySelect: CountrySelectLabels;\n /** 0.22.0: `InlineEditField` — keksdose K9. */\n inlineEdit: InlineEditLabels;\n /** 0.22.0: `IbanInput`'s messages, one per problem. */\n ibanInput: IbanInputLabels;\n /** 0.22.0: `PhoneInput`'s country-code select. */\n phoneInput: PhoneInputLabels;\n /** 0.22.0: `SignChip` — the outflow / inflow toggle beside an amount. */\n signChip: SignChipLabels;\n /** 0.23.0: `ColumnMapper` / `ColumnRoleTable` — a pasted or dropped table, a role per\n * column. */\n columnMapper: ColumnMapperLabels;\n}\n\n/**\n * A label override, as deep as the labels go: an object of labels (a namespace, or a\n * record inside one such as `accountSettings.passkeys` or `dataTable.presets`) may be\n * partial at every level, because the provider merges it key by key at every level.\n * A leaf stays as it is: a string, a function-valued label (`(n) => …`), and anything\n * that is not purely an object (a `ReactNode` union) is given whole.\n */\nexport type LabelOverride<T> = [T] extends [(...args: never[]) => unknown]\n ? T\n : [T] extends [readonly unknown[]]\n ? T\n : [T] extends [object]\n ? { [K in keyof T]?: LabelOverride<T[K]> }\n : T;\n\n/** Any subset of the tree — each namespace may be partial, and so may any record\n * inside one (`accountSettings.passkeys`, `dataTable.presets`): they are merged key\n * by key, at every depth. */\nexport type UiKitLabelOverrides = { [K in keyof UiKitLabels]?: LabelOverride<UiKitLabels[K]> };\n\n/* ── English defaults for the namespaces defined here ────────────────────── */\n\nexport const DEFAULT_COMMON_LABELS: CommonLabels = {\n close: \"Close\",\n clear: \"Clear\",\n search: \"Search\",\n done: \"Done\",\n cancel: \"Cancel\",\n save: \"Save\",\n back: \"Back\",\n next: \"Next\",\n remove: \"Remove\",\n loading: \"Loading…\",\n noResults: \"No results\",\n fieldValue: (field, value) => `${field}: ${value}`,\n dismiss: \"Dismiss\",\n opensInNewTab: \"opens in a new tab\",\n};\n\nexport const DEFAULT_DATE_PICKER_LABELS: DatePickerLabels = {\n panel: \"Choose a date\",\n rangePanel: \"Choose a date range\",\n clear: \"Clear\",\n previousDay: \"Previous day\",\n nextDay: \"Next day\",\n today: \"Today\",\n apply: \"Apply\",\n cancel: \"Cancel\",\n presets: \"Quick ranges\",\n};\n\nexport const DEFAULT_COMBOBOX_LABELS: ComboboxLabels = {\n search: \"Search\",\n noResults: \"No results\",\n clear: \"Clear\",\n loading: \"Loading…\",\n create: (query) => `Create “${query}”`,\n selectedCount: (count) => `${count} selected`,\n loadError: \"Couldn’t load results\",\n resultCount: (count) => (count === 1 ? \"1 result\" : `${count} results`),\n minChars: (count) =>\n count === 1 ? \"Type at least 1 character\" : `Type at least ${count} characters`,\n};\n\nexport const DEFAULT_MULTI_SELECT_LABELS: MultiSelectLabels = {\n search: \"Search\",\n selectAll: \"Select all\",\n clear: \"Clear\",\n all: \"All\",\n selectedCount: (count) => String(count),\n};\n\nexport const DEFAULT_CALCULATOR_LABELS: CalculatorLabels = {\n open: \"Open calculator\",\n panel: \"Calculator\",\n calculation: \"Calculation\",\n backspace: \"Backspace\",\n clear: \"Clear\",\n equals: \"Equals\",\n done: \"Done\",\n plus: \"Plus\",\n minus: \"Minus\",\n times: \"Times\",\n divide: \"Divide\",\n decimal: \"Decimal point\",\n};\n\nexport const DEFAULT_CURRENCY_LABELS: CurrencyLabels = {\n currency: \"Currency\",\n search: \"Search currency\",\n};\n\nexport const DEFAULT_APP_SHELL_LABELS: AppShellLabels = {\n collapse: \"Collapse sidebar\",\n expand: \"Expand sidebar\",\n toggleGroup: (groupLabel) => `${groupLabel}: pages`,\n};\n\nexport const DEFAULT_TOP_BAR_LABELS: TopBarLabels = {\n theme: \"Toggle theme\",\n palette: \"Appearance preset\",\n language: \"Language\",\n switchRole: \"Switch role\",\n role: (value) => `Role: ${value}`,\n};\n\nexport const DEFAULT_PICKER_SHEET_LABELS: PickerSheetLabels = { close: \"Close\" };\n\nexport const DEFAULT_SWIPEABLE_ROW_LABELS: SwipeableRowLabels = { actions: \"Row actions\" };\n\n/** Formats with the locale the provider was given (see {@link useKitFileLabels}).\n * This static default has no locale to hand and falls back to the runtime's. */\nexport const DEFAULT_FILE_LABELS: FileLabels = {\n size: (bytes) => formatFileSize(bytes),\n};\n\n/** \"12 kB\", \"3.4 MB\" — `Intl`'s unit formatting, so the digits, the decimal mark and\n * the unit's spelling all follow `locale`. */\nexport function formatFileSize(bytes: number, locale?: string): string {\n const units = [\"byte\", \"kilobyte\", \"megabyte\", \"gigabyte\"] as const;\n let value = bytes;\n let i = 0;\n while (value >= 1000 && i < units.length - 1) {\n value /= 1000;\n i += 1;\n }\n return new Intl.NumberFormat(locale, {\n style: \"unit\",\n unit: units[i],\n unitDisplay: i === 0 ? \"long\" : \"short\",\n maximumFractionDigits: value < 10 && i > 0 ? 1 : 0,\n }).format(value);\n}\n\n/* ── The provider ────────────────────────────────────────────────────────── */\n\ninterface KitI18n {\n labels?: UiKitLabelOverrides;\n locale?: string;\n weekStartsOn?: WeekDay;\n linkComponent?: KitLinkComponent;\n chartTooltipPlacement?: ChartTooltipPlacement;\n formatDate?: KitDateFormatter;\n}\n\n/** What a {@link KitDateFormatter} is told about the date it is formatting. */\nexport interface KitDateFormatContext {\n /**\n * How much of a date the string is: `\"day\"` — the `iso` is `\"YYYY-MM-DD\"`; `\"month\"` —\n * `\"YYYY-MM\"` (a `MonthPicker`); `\"year\"` — `\"YYYY\"` (`MonthPicker mode=\"year\"`).\n */\n unit: \"day\" | \"month\" | \"year\";\n /** Which kit surface asks: the trigger of a `DatePicker`, of a `DateRangePicker`\n * (called once per end), of a `MonthPicker`, or a `DateMark`. */\n source: \"datePicker\" | \"dateRangePicker\" | \"monthPicker\" | \"dateMark\";\n /** The locale the kit would have formatted in — the component's `locale` prop, else\n * the provider's — or `undefined` for the runtime's. */\n locale: string | undefined;\n /**\n * The kit's suggestion: whether this date stands alone where the day of the week\n * helps — `true` for a `DatePicker`'s trigger and a `DateMark`, `false` for the two\n * ends of a range (twice the width, in a sentence-like \"from – to\") and for a month\n * or a year. keksdose's rule, which this follows: *\"A date in a COLUMN carries the\n * weekday. A date in a SENTENCE does not.\"* (date-cell.tsx, dev#546). A formatter\n * is free to ignore it.\n */\n weekday: boolean;\n}\n\n/**\n * The app's ONE answer to \"what does a date look like here\" — keksdose K12. Returns the\n * text for an ISO date (see {@link KitDateFormatContext.unit} for the three shapes).\n * Return `\"\"` to fall back to the kit's own formatting for that date.\n */\nexport type KitDateFormatter = (iso: string, context: KitDateFormatContext) => string;\n\n/** Where a chart shows the values under the pointer — see `SeriesChartTooltip.placement`. */\nexport type ChartTooltipPlacement = \"cursor\" | \"above\" | \"below\" | \"auto\";\n\n/**\n * What every kit link receives: the anchor attributes the kit decided (href, class,\n * aria-current, handlers, children, ref). An app's router link maps them —\n * `({ href, ...p }) => <Link to={href} {...p} />` — ONCE, on the provider.\n *\n * `replace` is the one prop that is not an anchor attribute: see there. Map it\n * explicitly if your router link is not react-router's —\n * `({ href, replace, ...p }) => <Link to={href} replace={replace} {...p} />` — and never\n * spread it onto a DOM `<a>`, where React warns about an unknown attribute.\n */\nexport type KitLinkProps = AnchorHTMLAttributes<HTMLAnchorElement> & {\n href: string;\n ref?: Ref<HTMLAnchorElement>;\n /**\n * Navigate by REPLACING the current history entry, so Back skips it — keksdose F1:\n * a one-shot URL (a magic-link landing, `?checkout=done`, a wizard's \"finish\" hop)\n * that must not come back when the user presses Back. Present ONLY when the kit link\n * was given `replace` (`true`), so a provider link that spreads its props onto a\n * plain `<a>` keeps working for every link that never asks for it. react-router's\n * `<Link>` takes the same prop, so `({ href, ...p }) => <Link to={href} {...p} />`\n * honours it with no change; any other router maps it to its own replace option.\n * The kit never puts it on a DOM element itself.\n */\n replace?: boolean;\n};\nexport type KitLinkComponent = (props: KitLinkProps) => ReactElement;\n\nconst KitI18nContext = createContext<KitI18n>({});\n\nexport interface UiKitProviderProps {\n /** Any part of {@link UiKitLabels}. Missing keys fall back to English. */\n labels?: UiKitLabelOverrides;\n /**\n * BCP 47 tag used by every kit component that formats something — dates, numbers,\n * month and weekday names, file sizes — when it is not handed a `locale` prop of\n * its own. Without a provider, and without a prop, those use the runtime default.\n */\n locale?: string;\n /**\n * The first day of the week (0 = Sunday, 1 = Monday …) for every calendar below —\n * `MiniCalendar` and the pickers built on it — that is not handed a `weekStartsOn`\n * of its own. Without it the week start follows `locale`'s week info.\n *\n * Separate from `locale` because the two are separate decisions: a German-built\n * app running in English (`locale=\"en\"`) would otherwise start its weeks on Sunday,\n * and switching it to `en-GB` to get Monday changes every date and number format.\n */\n weekStartsOn?: WeekDay;\n /**\n * The app's router link, used by every kit component that renders an in-app link\n * and was not handed its own `renderLink` — so `renderLink` stops being repeated on\n * each ListItem, Breadcrumbs, StatTile, Chip… (kastlan). A component's own\n * `renderLink` wins; external links and in-page `#anchor`s stay plain `<a>`, and a\n * hash-router `#/path` is handed to it like `/path` (see `pickLinkRenderer`).\n */\n linkComponent?: KitLinkComponent;\n /**\n * Where every `SeriesChart` below shows its tooltip when it does not say so itself\n * (`tooltip.placement`) — set once so an app's phone charts stop putting the box under\n * the reader's finger (keksdose #359). Default: `\"cursor\"`, the box that follows the\n * pointer, as before.\n */\n chartTooltipPlacement?: ChartTooltipPlacement;\n /**\n * How every kit date below is written, when the component is not told otherwise —\n * keksdose K12. keksdose has a date-format preference (Settings ▸ date format, feedback\n * #180) that is not the UI language, and a weekday in the UI language beside digits\n * in the preference's order (live #246, dev#546): two locales in one string, which\n * no `locale` + `Intl` options can say. Its `DateField` wraps every `DatePicker` to\n * pass `formatValue`, and its report range field formats both ends by hand; with this\n * set once on the provider, those wrappers thin to nothing.\n *\n * Used for the trigger text of `DatePicker`, `DateRangePicker` and `MonthPicker`\n * (month and year mode), and for `DateMark display=\"date\"`. A component's own\n * `formatValue` or `formatOptions` (`dateStyle` on a DateMark) wins: prop >\n * provider > the kit's `Intl` default, the order every kit setting resolves in. Left\n * out (or returning `\"\"`), everything formats exactly as before.\n *\n * Keep it stable (`useCallback`, or a module function): it is in the provider's\n * context value, so a new function every render re-renders every consumer.\n */\n formatDate?: KitDateFormatter;\n children: ReactNode;\n}\n\n/**\n * Hand every kit component below this point its strings and its locale.\n *\n * Optional: a component outside any provider behaves exactly as it did before the\n * provider existed. Nesting works as a merge — an inner provider overrides only what\n * it names, so a page can re-label one table's `dataTable.table` without restating\n * the language.\n */\nexport function UiKitProvider({\n labels,\n locale,\n weekStartsOn,\n linkComponent,\n chartTooltipPlacement,\n formatDate,\n children,\n}: UiKitProviderProps) {\n const outer = useContext(KitI18nContext);\n const value = useMemo<KitI18n>(\n () => ({\n locale: locale ?? outer.locale,\n weekStartsOn: weekStartsOn ?? outer.weekStartsOn,\n labels: mergeOverrides(outer.labels, labels),\n linkComponent: linkComponent ?? outer.linkComponent,\n chartTooltipPlacement: chartTooltipPlacement ?? outer.chartTooltipPlacement,\n formatDate: formatDate ?? outer.formatDate,\n }),\n [outer, labels, locale, weekStartsOn, linkComponent, chartTooltipPlacement, formatDate],\n );\n return <KitI18nContext.Provider value={value}>{children}</KitI18nContext.Provider>;\n}\n\nfunction isRecord(v: unknown): v is Record<string, unknown> {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\n\n/** A record of labels to merge into — not a React element, which is an object too but\n * is a label given whole. */\nfunction isLabelRecord(v: unknown): v is Record<string, unknown> {\n return isRecord(v) && !(\"$$typeof\" in v);\n}\n\n/** Merged key by key at EVERY depth — a namespace, a record inside it\n * (`accountSettings.passkeys`, `dataTable.presets`), and so on down — to match\n * {@link LabelOverride}. An `undefined` is skipped at every depth, so it never blanks\n * out what is under it. */\nfunction mergeNamespace<T extends object>(base: T, over: LabelOverride<T> | Partial<T> | undefined): T {\n if (!over) return base;\n const out = { ...base } as Record<string, unknown>;\n for (const [k, v] of Object.entries(over)) {\n if (v === undefined) continue;\n const prev = out[k];\n out[k] = isLabelRecord(prev) && isLabelRecord(v) ? mergeNamespace(prev, v) : v;\n }\n return out as T;\n}\n\nfunction mergeOverrides(\n a: UiKitLabelOverrides | undefined,\n b: UiKitLabelOverrides | undefined,\n): UiKitLabelOverrides | undefined {\n if (!a) return b;\n if (!b) return a;\n const out: Record<string, unknown> = { ...a };\n for (const [ns, v] of Object.entries(b)) {\n out[ns] = mergeNamespace((out[ns] as object | undefined) ?? {}, v as object);\n }\n return out as UiKitLabelOverrides;\n}\n\n/** What the nearest provider says about one namespace — `undefined` outside one.\n * For a component whose own resolver does more than a merge (the data table\n * derives `columnsCount` from `columns`): feed `{ ...overrides, ...props }` to it. */\nexport function useKitLabelOverrides<K extends keyof UiKitLabels>(\n ns: K,\n): Partial<UiKitLabels[K]> | undefined {\n return useContext(KitI18nContext).labels?.[ns] as Partial<UiKitLabels[K]> | undefined;\n}\n\n/**\n * One namespace, resolved: `defaults`, then the provider, then the component's own\n * `prop`. Record-valued keys are merged key by key at each step.\n */\nexport function useKitLabels<K extends keyof UiKitLabels>(\n ns: K,\n defaults: UiKitLabels[K],\n prop?: Partial<UiKitLabels[K]>,\n): UiKitLabels[K] {\n const fromProvider = useKitLabelOverrides(ns);\n return useMemo(\n () => mergeNamespace(mergeNamespace(defaults, fromProvider), prop),\n [defaults, fromProvider, prop],\n );\n}\n\n/** The component's own `locale` prop, else the provider's, else `undefined` (which\n * every `Intl` API reads as \"the runtime's default\"). */\nexport function useKitLocale(prop?: string): string | undefined {\n const fromProvider = useContext(KitI18nContext).locale;\n return prop ?? fromProvider;\n}\n\n/** The week start the nearest `<UiKitProvider weekStartsOn>` pins, else `undefined`\n * (the caller then asks the locale). A component's own prop goes first:\n * `prop ?? useKitWeekStart()`. */\n/** The provider's router link, or `undefined` — a component's own `renderLink` should\n * win over it: `const Link = renderLink ?? useKitLink()`. */\nexport function useKitLink(): KitLinkComponent | undefined {\n return useContext(KitI18nContext).linkComponent;\n}\n\nexport function useKitWeekStart(): WeekDay | undefined {\n return useContext(KitI18nContext).weekStartsOn;\n}\n\n/** The provider's `chartTooltipPlacement`, or `undefined` — a chart's own prop wins. */\nexport function useKitChartTooltipPlacement(): ChartTooltipPlacement | undefined {\n return useContext(KitI18nContext).chartTooltipPlacement;\n}\n\n/** The nearest provider's `formatDate`, or `undefined` — a component's own\n * `formatValue` / `formatOptions` wins over it. See {@link KitDateFormatter}. */\nexport function useKitDateFormatter(): KitDateFormatter | undefined {\n return useContext(KitI18nContext).formatDate;\n}\n\n/** {@link DEFAULT_FILE_LABELS}, but formatting in the provider's locale. */\nexport function useKitFileLabels(prop?: Partial<FileLabels>): FileLabels {\n const locale = useKitLocale();\n const defaults = useMemo<FileLabels>(\n () => ({ size: (bytes) => formatFileSize(bytes, locale) }),\n [locale],\n );\n return useKitLabels(\"file\", defaults, prop);\n}\n\n/**\n * The dot paths of every key `labels` does NOT supply — the ones a translated app is\n * still showing in English. Assert on it in the app's own test:\n *\n * expect(missingKitLabels(labels, DEFAULT_UI_KIT_LABELS)).toEqual([]);\n *\n * `reference` is the complete tree to check against — pass\n * {@link DEFAULT_UI_KIT_LABELS} (src/i18n/defaults.ts). It is a parameter rather than an import\n * because the defaults live beside their components, and this module is imported BY\n * those components. Left out (a test file is not type-checked), it throws saying so\n * rather than \"Cannot convert undefined or null to object\" (keksdose, 0.18).\n */\nexport function missingKitLabels(\n labels: UiKitLabelOverrides | undefined,\n reference: UiKitLabels,\n): string[] {\n if (!isRecord(reference)) {\n throw new TypeError(\n \"missingKitLabels(labels, reference): pass DEFAULT_UI_KIT_LABELS as the reference — \" +\n \"it is the tree the labels are checked against.\",\n );\n }\n const missing: string[] = [];\n for (const [ns, keys] of Object.entries(reference)) {\n const given = (labels as Record<string, Record<string, unknown> | undefined> | undefined)?.[ns];\n for (const [key, value] of Object.entries(keys as Record<string, unknown>)) {\n const got = given?.[key];\n if (got === undefined) {\n missing.push(`${ns}.${key}`);\n } else if (isRecord(value) && isRecord(got)) {\n for (const sub of Object.keys(value)) {\n if (got[sub] === undefined) missing.push(`${ns}.${key}.${sub}`);\n }\n }\n }\n }\n return missing;\n}\n"],"mappings":";AAomBS;AApmBT,SAAS,eAAe,YAAY,eAAe;AAqV5C,MAAM,wBAAsC;AAAA,EACjD,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY,CAAC,OAAO,UAAU,GAAG,KAAK,KAAK,KAAK;AAAA,EAChD,SAAS;AAAA,EACT,eAAe;AACjB;AAEO,MAAM,6BAA+C;AAAA,EAC1D,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AACX;AAEO,MAAM,0BAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ,CAAC,UAAU,gBAAW,KAAK;AAAA,EACnC,eAAe,CAAC,UAAU,GAAG,KAAK;AAAA,EAClC,WAAW;AAAA,EACX,aAAa,CAAC,UAAW,UAAU,IAAI,aAAa,GAAG,KAAK;AAAA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KAAK,KAAK,KAAK,OAAO,QAAQ,IAA+B,GAAG;AAC1E,YAAM,MAAM,QAAQ,GAAG;AACvB,UAAI,QAAQ,QAAW;AACrB,gBAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,EAAE;AAAA,MAC7B,WAAW,SAAS,KAAK,KAAK,SAAS,GAAG,GAAG;AAC3C,mBAAW,OAAO,OAAO,KAAK,KAAK,GAAG;AACpC,cAAI,IAAI,GAAG,MAAM,OAAW,SAAQ,KAAK,GAAG,EAAE,IAAI,GAAG,IAAI,GAAG,EAAE;AAAA,QAChE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
|
package/dist/i18n/languages.d.ts
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bY as UiKitLabels } from '../feedback-BxeQVzwq.js';
|
|
2
2
|
import { LanguageOption } from '../shell/topbar-controls.js';
|
|
3
|
+
import '../feedback-attachment-fGAzZPf0.js';
|
|
3
4
|
import 'react';
|
|
4
|
-
import '../
|
|
5
|
+
import '../feedback/feedback-inbox.js';
|
|
6
|
+
import 'lucide-react';
|
|
7
|
+
import '../components/tooltip.js';
|
|
8
|
+
import '../hooks/use-anchored-rect.js';
|
|
9
|
+
import '../lib/clipping.js';
|
|
10
|
+
import '../data-table-labels-B7OdnM0S.js';
|
|
11
|
+
import '../components/data-table-sort.js';
|
|
12
|
+
import '../components/swipeable-row.js';
|
|
5
13
|
import '../components/mini-calendar.js';
|
|
6
14
|
import '../components/calendar-heatmap.js';
|
|
7
15
|
import '../components/popover.js';
|
|
8
16
|
import '../components/chip.js';
|
|
9
|
-
import 'lucide-react';
|
|
10
17
|
import '../components/field-sync.js';
|
|
11
|
-
import '../components/tooltip.js';
|
|
12
|
-
import '../hooks/use-anchored-rect.js';
|
|
13
|
-
import '../lib/clipping.js';
|
|
14
18
|
import '../wizard/types.js';
|
|
15
19
|
import '../tour/tour.js';
|
|
16
20
|
import '../search/command-palette.js';
|
|
@@ -24,7 +28,6 @@ import '../components/sparkline.js';
|
|
|
24
28
|
import '../components/stat-tile.js';
|
|
25
29
|
import '../components/signature-pad.js';
|
|
26
30
|
import '../components/password-strength.js';
|
|
27
|
-
import '../components/danger-confirm.js';
|
|
28
31
|
import '../components/swatch-picker.js';
|
|
29
32
|
import '../components/tile-radio.js';
|
|
30
33
|
import '../components/icon-picker.js';
|
|
@@ -32,11 +35,7 @@ import '../components/dialog-frame.js';
|
|
|
32
35
|
import '../components/modal.js';
|
|
33
36
|
import '../hooks/use-search-param-state.js';
|
|
34
37
|
import '../components/measured-grid.js';
|
|
35
|
-
import '../feedback-attachment-WFiXJ8We.js';
|
|
36
|
-
import '../feedback/feedback-thread.js';
|
|
37
|
-
import '../feedback/feedback-inbox.js';
|
|
38
38
|
import '../components/account-settings-labels.js';
|
|
39
|
-
import '../components/confirm-dialog.js';
|
|
40
39
|
import '../components/floating-panel.js';
|
|
41
40
|
import '../components/bulk-action-bar.js';
|
|
42
41
|
import '../components/list.js';
|
|
@@ -55,14 +54,20 @@ import '../components/write-lock.js';
|
|
|
55
54
|
import '../components/legal.js';
|
|
56
55
|
import '../components/account-chips.js';
|
|
57
56
|
import '../lib/format.js';
|
|
58
|
-
import '../data-table-3mi2R3so.js';
|
|
59
|
-
import '../components/data-table-sort.js';
|
|
60
|
-
import '../components/swipeable-row.js';
|
|
61
57
|
import '../components/reauth-dialog.js';
|
|
62
58
|
import '../components/server-wake.js';
|
|
63
59
|
import '../lib/server-wake.js';
|
|
64
60
|
import '../components/translation-review-labels.js';
|
|
65
61
|
import '../lib/translation-review.js';
|
|
62
|
+
import '../components/country-select.js';
|
|
63
|
+
import '../components/inline-edit-field.js';
|
|
64
|
+
import '../lib/iban.js';
|
|
65
|
+
import '../lib/phone.js';
|
|
66
|
+
import '../components/sign-chip.js';
|
|
67
|
+
import '../components/column-mapper.js';
|
|
68
|
+
import '../lib/column-mapping.js';
|
|
69
|
+
import '../lib/table-text.js';
|
|
70
|
+
import '../components/field-parts.js';
|
|
66
71
|
import '../theme/palette-presets.js';
|
|
67
72
|
import '../theme/chart-palette.js';
|
|
68
73
|
import '../theme/theme-store.js';
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bY as UiKitLabels } from '../../feedback-BxeQVzwq.js';
|
|
2
|
+
import '../../feedback-attachment-fGAzZPf0.js';
|
|
2
3
|
import 'react';
|
|
3
|
-
import '../../
|
|
4
|
+
import '../../feedback/feedback-inbox.js';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
import '../../components/tooltip.js';
|
|
7
|
+
import '../../hooks/use-anchored-rect.js';
|
|
8
|
+
import '../../lib/clipping.js';
|
|
9
|
+
import '../../data-table-labels-B7OdnM0S.js';
|
|
10
|
+
import '../../components/data-table-sort.js';
|
|
11
|
+
import '../../components/swipeable-row.js';
|
|
4
12
|
import '../../components/mini-calendar.js';
|
|
5
13
|
import '../../components/calendar-heatmap.js';
|
|
6
14
|
import '../../components/popover.js';
|
|
7
15
|
import '../../components/chip.js';
|
|
8
|
-
import 'lucide-react';
|
|
9
16
|
import '../../components/field-sync.js';
|
|
10
|
-
import '../../components/tooltip.js';
|
|
11
|
-
import '../../hooks/use-anchored-rect.js';
|
|
12
|
-
import '../../lib/clipping.js';
|
|
13
17
|
import '../../wizard/types.js';
|
|
14
18
|
import '../../tour/tour.js';
|
|
15
19
|
import '../../search/command-palette.js';
|
|
@@ -23,7 +27,6 @@ import '../../components/sparkline.js';
|
|
|
23
27
|
import '../../components/stat-tile.js';
|
|
24
28
|
import '../../components/signature-pad.js';
|
|
25
29
|
import '../../components/password-strength.js';
|
|
26
|
-
import '../../components/danger-confirm.js';
|
|
27
30
|
import '../../components/swatch-picker.js';
|
|
28
31
|
import '../../components/tile-radio.js';
|
|
29
32
|
import '../../components/icon-picker.js';
|
|
@@ -31,11 +34,7 @@ import '../../components/dialog-frame.js';
|
|
|
31
34
|
import '../../components/modal.js';
|
|
32
35
|
import '../../hooks/use-search-param-state.js';
|
|
33
36
|
import '../../components/measured-grid.js';
|
|
34
|
-
import '../../feedback-attachment-WFiXJ8We.js';
|
|
35
|
-
import '../../feedback/feedback-thread.js';
|
|
36
|
-
import '../../feedback/feedback-inbox.js';
|
|
37
37
|
import '../../components/account-settings-labels.js';
|
|
38
|
-
import '../../components/confirm-dialog.js';
|
|
39
38
|
import '../../components/floating-panel.js';
|
|
40
39
|
import '../../components/bulk-action-bar.js';
|
|
41
40
|
import '../../components/list.js';
|
|
@@ -54,14 +53,20 @@ import '../../components/write-lock.js';
|
|
|
54
53
|
import '../../components/legal.js';
|
|
55
54
|
import '../../components/account-chips.js';
|
|
56
55
|
import '../../lib/format.js';
|
|
57
|
-
import '../../data-table-3mi2R3so.js';
|
|
58
|
-
import '../../components/data-table-sort.js';
|
|
59
|
-
import '../../components/swipeable-row.js';
|
|
60
56
|
import '../../components/reauth-dialog.js';
|
|
61
57
|
import '../../components/server-wake.js';
|
|
62
58
|
import '../../lib/server-wake.js';
|
|
63
59
|
import '../../components/translation-review-labels.js';
|
|
64
60
|
import '../../lib/translation-review.js';
|
|
61
|
+
import '../../components/country-select.js';
|
|
62
|
+
import '../../components/inline-edit-field.js';
|
|
63
|
+
import '../../lib/iban.js';
|
|
64
|
+
import '../../lib/phone.js';
|
|
65
|
+
import '../../components/sign-chip.js';
|
|
66
|
+
import '../../components/column-mapper.js';
|
|
67
|
+
import '../../lib/column-mapping.js';
|
|
68
|
+
import '../../lib/table-text.js';
|
|
69
|
+
import '../../components/field-parts.js';
|
|
65
70
|
|
|
66
71
|
/**
|
|
67
72
|
* The kit's words in German — Swiss Standard German, formal ("Sie"), the kit's ONE German
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bY as UiKitLabels } from '../../feedback-BxeQVzwq.js';
|
|
2
|
+
import '../../feedback-attachment-fGAzZPf0.js';
|
|
2
3
|
import 'react';
|
|
3
|
-
import '../../
|
|
4
|
+
import '../../feedback/feedback-inbox.js';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
import '../../components/tooltip.js';
|
|
7
|
+
import '../../hooks/use-anchored-rect.js';
|
|
8
|
+
import '../../lib/clipping.js';
|
|
9
|
+
import '../../data-table-labels-B7OdnM0S.js';
|
|
10
|
+
import '../../components/data-table-sort.js';
|
|
11
|
+
import '../../components/swipeable-row.js';
|
|
4
12
|
import '../../components/mini-calendar.js';
|
|
5
13
|
import '../../components/calendar-heatmap.js';
|
|
6
14
|
import '../../components/popover.js';
|
|
7
15
|
import '../../components/chip.js';
|
|
8
|
-
import 'lucide-react';
|
|
9
16
|
import '../../components/field-sync.js';
|
|
10
|
-
import '../../components/tooltip.js';
|
|
11
|
-
import '../../hooks/use-anchored-rect.js';
|
|
12
|
-
import '../../lib/clipping.js';
|
|
13
17
|
import '../../wizard/types.js';
|
|
14
18
|
import '../../tour/tour.js';
|
|
15
19
|
import '../../search/command-palette.js';
|
|
@@ -23,7 +27,6 @@ import '../../components/sparkline.js';
|
|
|
23
27
|
import '../../components/stat-tile.js';
|
|
24
28
|
import '../../components/signature-pad.js';
|
|
25
29
|
import '../../components/password-strength.js';
|
|
26
|
-
import '../../components/danger-confirm.js';
|
|
27
30
|
import '../../components/swatch-picker.js';
|
|
28
31
|
import '../../components/tile-radio.js';
|
|
29
32
|
import '../../components/icon-picker.js';
|
|
@@ -31,11 +34,7 @@ import '../../components/dialog-frame.js';
|
|
|
31
34
|
import '../../components/modal.js';
|
|
32
35
|
import '../../hooks/use-search-param-state.js';
|
|
33
36
|
import '../../components/measured-grid.js';
|
|
34
|
-
import '../../feedback-attachment-WFiXJ8We.js';
|
|
35
|
-
import '../../feedback/feedback-thread.js';
|
|
36
|
-
import '../../feedback/feedback-inbox.js';
|
|
37
37
|
import '../../components/account-settings-labels.js';
|
|
38
|
-
import '../../components/confirm-dialog.js';
|
|
39
38
|
import '../../components/floating-panel.js';
|
|
40
39
|
import '../../components/bulk-action-bar.js';
|
|
41
40
|
import '../../components/list.js';
|
|
@@ -54,14 +53,20 @@ import '../../components/write-lock.js';
|
|
|
54
53
|
import '../../components/legal.js';
|
|
55
54
|
import '../../components/account-chips.js';
|
|
56
55
|
import '../../lib/format.js';
|
|
57
|
-
import '../../data-table-3mi2R3so.js';
|
|
58
|
-
import '../../components/data-table-sort.js';
|
|
59
|
-
import '../../components/swipeable-row.js';
|
|
60
56
|
import '../../components/reauth-dialog.js';
|
|
61
57
|
import '../../components/server-wake.js';
|
|
62
58
|
import '../../lib/server-wake.js';
|
|
63
59
|
import '../../components/translation-review-labels.js';
|
|
64
60
|
import '../../lib/translation-review.js';
|
|
61
|
+
import '../../components/country-select.js';
|
|
62
|
+
import '../../components/inline-edit-field.js';
|
|
63
|
+
import '../../lib/iban.js';
|
|
64
|
+
import '../../lib/phone.js';
|
|
65
|
+
import '../../components/sign-chip.js';
|
|
66
|
+
import '../../components/column-mapper.js';
|
|
67
|
+
import '../../lib/column-mapping.js';
|
|
68
|
+
import '../../lib/table-text.js';
|
|
69
|
+
import '../../components/field-parts.js';
|
|
65
70
|
|
|
66
71
|
/**
|
|
67
72
|
* The kit's English words with every count and file size formatted for
|
package/dist/i18n/locales/en.js
CHANGED
|
@@ -94,6 +94,22 @@ function uiKitLabelsEn(numberLocale = "en-US") {
|
|
|
94
94
|
progress: (approved, total) => `${n(approved)} of ${n(total)} approved`,
|
|
95
95
|
localeProgress: (approved, total) => `${n(approved)}/${n(total)}`,
|
|
96
96
|
exportCorrections: (count) => `Export corrections (${n(count)})`
|
|
97
|
+
},
|
|
98
|
+
characterCount: {
|
|
99
|
+
...d.characterCount,
|
|
100
|
+
count: (used, max) => `${n(used)} of ${n(max)} characters`,
|
|
101
|
+
remaining: (left) => left === 1 ? "1 character left" : `${n(left)} characters left`
|
|
102
|
+
},
|
|
103
|
+
ibanInput: {
|
|
104
|
+
...d.ibanInput,
|
|
105
|
+
length: (actual, expected) => `An IBAN from this country has ${n(expected)} characters \u2014 this one has ${n(actual)}.`
|
|
106
|
+
},
|
|
107
|
+
columnMapper: {
|
|
108
|
+
...d.columnMapper,
|
|
109
|
+
summary: (columns, rows) => `${n(columns)} ${columns === 1 ? "column" : "columns"}, ${n(rows)} ${rows === 1 ? "row" : "rows"}`,
|
|
110
|
+
unreadCount: (count) => count === 1 ? "1 line could not be read" : `${n(count)} lines could not be read`,
|
|
111
|
+
unreadMore: (count) => `\u2026and ${n(count)} more`,
|
|
112
|
+
previewOf: (shown, total) => shown === 1 ? `The first of ${n(total)} rows` : `The first ${n(shown)} of ${n(total)} rows`
|
|
97
113
|
}
|
|
98
114
|
};
|
|
99
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["import { DEFAULT_UI_KIT_LABELS } from \"../defaults\";\nimport { formatFileSize } from \"../kit-labels\";\nimport type { UiKitLabels } from \"../kit-labels\";\n\n/**\n * The kit's English words with every count and file size formatted for\n * `numberLocale` — `uiKitLabelsEn(\"en-CH\")` reads \"12’345 rows\", where the defaults\n * print \"12345\". For `<UiKitProvider labels={uiKitLabelsEn(\"en-CH\")}>`.\n *\n * A factory and not a constant on purpose: {@link DEFAULT_UI_KIT_LABELS} prints counts\n * raw and has since 0.1, so an app that passes nothing must keep seeing exactly that.\n * Formatting is something an app asks for, by calling this.\n *\n * Derived rather than copied: every word is the default's own, spread in, and only the\n * labels that print a number are restated — with the same wording and the same\n * singular/plural split — so a key added to the defaults is here the moment it lands.\n * Row and line numbers (`lineItems.row`, `measuredGrid.cell`) are positions, not\n * counts, and stay as the defaults print them, as in the other catalogues.\n */\nexport function uiKitLabelsEn(numberLocale = \"en-US\"): UiKitLabels {\n const num = new Intl.NumberFormat(numberLocale);\n const n = (value: number) => num.format(value);\n const d = DEFAULT_UI_KIT_LABELS;\n\n return {\n ...d,\n feedbackAttachment: {\n ...d.feedbackAttachment,\n attachmentLimit: (max) =>\n `Up to ${n(max)} ${max === 1 ? \"attachment\" : \"attachments\"} — remove one to add another.`,\n },\n measuredGrid: {\n ...d.measuredGrid,\n points: (count) => (count === 1 ? \"1 point\" : `${n(count)} points`),\n problems: (count) =>\n count === 1 ? \"1 cell is not a number\" : `${n(count)} cells are not numbers`,\n },\n dataTable: {\n ...d.dataTable,\n filterResults: (shown, total) => `${n(shown)} of ${n(total)} rows`,\n pageChanged: (page, totalPages) => `Page ${n(page)} of ${n(totalPages)}`,\n pageRange: (from, to, total) => `${n(from)}–${n(to)} / ${n(total)}`,\n rowCount: (total) => n(total),\n columnsCount: (visible, total) => `Columns (${n(visible)}/${n(total)})`,\n },\n calendarHeatmap: {\n ...d.calendarHeatmap,\n truncated: (count) =>\n `Showing the most recent days; ${n(count)} earlier ${count === 1 ? \"day is\" : \"days are\"} not shown.`,\n },\n combobox: {\n ...d.combobox,\n selectedCount: (count) => `${n(count)} selected`,\n resultCount: (count) => (count === 1 ? \"1 result\" : `${n(count)} results`),\n minChars: (count) =>\n count === 1 ? \"Type at least 1 character\" : `Type at least ${n(count)} characters`,\n },\n multiSelect: {\n ...d.multiSelect,\n selectedCount: (count) => n(count),\n },\n chipInput: {\n ...d.chipInput,\n atLimit: (max) => `Limit of ${n(max)} reached`,\n },\n iconPicker: {\n ...d.iconPicker,\n resultCount: (count) => (count === 1 ? \"1 icon\" : `${n(count)} icons`),\n },\n bulkActionBar: {\n ...d.bulkActionBar,\n selected: (count) => `${n(count)} selected`,\n },\n file: {\n // The kit's own `Intl` unit formatting, pinned to this locale (\"3.4 MB\").\n size: (bytes) => formatFileSize(bytes, numberLocale),\n },\n filePicker: {\n ...d.filePicker,\n rejectedCount: (name, maxFiles) =>\n `“${name}” was not added: at most ${n(maxFiles)} ${maxFiles === 1 ? \"file\" : \"files\"}`,\n rejectedMany: (count) => `${n(count)} files were not added`,\n rejectedPick: (count) =>\n count === 1 ? \"The file was not added\" : `None of the ${n(count)} files were added`,\n selected: (count, firstName) =>\n count === 1 ? `“${firstName}” selected` : `${n(count)} files selected`,\n },\n wizard: {\n ...d.wizard,\n step: (current, total) => `Step ${n(current)} of ${n(total)}`,\n },\n tour: {\n ...d.tour,\n step: (current, total) => `${n(current)} / ${n(total)}`,\n },\n passwordStrength: {\n ...d.passwordStrength,\n ruleLength: (minLength) => `At least ${n(minLength)} characters`,\n tooLong: (maxBytes) =>\n `At most ${n(maxBytes)} characters (accents and emoji count for more than one).`,\n },\n floatingPanel: {\n ...d.floatingPanel,\n badge: (count) => `${n(count)} new`,\n },\n imageGrid: {\n ...d.imageGrid,\n item: (index, count) => `Image ${n(index)} of ${n(count)}`,\n },\n lightbox: {\n ...d.lightbox,\n counter: (index, count) => `${n(index)} / ${n(count)}`,\n position: (index, count) => `Image ${n(index)} of ${n(count)}`,\n },\n translationReview: {\n ...d.translationReview,\n filterCount: (label, count) => `${label} · ${n(count)}`,\n placeholdersOnly: (count) => `Only placeholder problems (${n(count)})`,\n progress: (approved, total) => `${n(approved)} of ${n(total)} approved`,\n localeProgress: (approved, total) => `${n(approved)}/${n(total)}`,\n exportCorrections: (count) => `Export corrections (${n(count)})`,\n },\n };\n}\n"],"mappings":";AAAA,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAkBxB,SAAS,cAAc,eAAe,SAAsB;AACjE,QAAM,MAAM,IAAI,KAAK,aAAa,YAAY;AAC9C,QAAM,IAAI,CAAC,UAAkB,IAAI,OAAO,KAAK;AAC7C,QAAM,IAAI;AAEV,SAAO;AAAA,IACL,GAAG;AAAA,IACH,oBAAoB;AAAA,MAClB,GAAG,EAAE;AAAA,MACL,iBAAiB,CAAC,QAChB,SAAS,EAAE,GAAG,CAAC,IAAI,QAAQ,IAAI,eAAe,aAAa;AAAA,IAC/D;AAAA,IACA,cAAc;AAAA,MACZ,GAAG,EAAE;AAAA,MACL,QAAQ,CAAC,UAAW,UAAU,IAAI,YAAY,GAAG,EAAE,KAAK,CAAC;AAAA,MACzD,UAAU,CAAC,UACT,UAAU,IAAI,2BAA2B,GAAG,EAAE,KAAK,CAAC;AAAA,IACxD;AAAA,IACA,WAAW;AA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C,OAAO,UAAU,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;AAAA,MACpD,UAAU,CAAC,OAAO,UAAU,SAAS,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAAA,IAC9D;AAAA,IACA,mBAAmB;AAAA,MACjB,GAAG,EAAE;AAAA,MACL,aAAa,CAAC,OAAO,UAAU,GAAG,KAAK,SAAM,EAAE,KAAK,CAAC;AAAA,MACrD,kBAAkB,CAAC,UAAU,8BAA8B,EAAE,KAAK,CAAC;AAAA,MACnE,UAAU,CAAC,UAAU,UAAU,GAAG,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;AAAA,MAC5D,gBAAgB,CAAC,UAAU,UAAU,GAAG,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;AAAA,MAC/D,mBAAmB,CAAC,UAAU,uBAAuB,EAAE,KAAK,CAAC;AAAA,IAC/D;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["import { DEFAULT_UI_KIT_LABELS } from \"../defaults\";\nimport { formatFileSize } from \"../kit-labels\";\nimport type { UiKitLabels } from \"../kit-labels\";\n\n/**\n * The kit's English words with every count and file size formatted for\n * `numberLocale` — `uiKitLabelsEn(\"en-CH\")` reads \"12’345 rows\", where the defaults\n * print \"12345\". For `<UiKitProvider labels={uiKitLabelsEn(\"en-CH\")}>`.\n *\n * A factory and not a constant on purpose: {@link DEFAULT_UI_KIT_LABELS} prints counts\n * raw and has since 0.1, so an app that passes nothing must keep seeing exactly that.\n * Formatting is something an app asks for, by calling this.\n *\n * Derived rather than copied: every word is the default's own, spread in, and only the\n * labels that print a number are restated — with the same wording and the same\n * singular/plural split — so a key added to the defaults is here the moment it lands.\n * Row and line numbers (`lineItems.row`, `measuredGrid.cell`) are positions, not\n * counts, and stay as the defaults print them, as in the other catalogues.\n */\nexport function uiKitLabelsEn(numberLocale = \"en-US\"): UiKitLabels {\n const num = new Intl.NumberFormat(numberLocale);\n const n = (value: number) => num.format(value);\n const d = DEFAULT_UI_KIT_LABELS;\n\n return {\n ...d,\n feedbackAttachment: {\n ...d.feedbackAttachment,\n attachmentLimit: (max) =>\n `Up to ${n(max)} ${max === 1 ? \"attachment\" : \"attachments\"} — remove one to add another.`,\n },\n measuredGrid: {\n ...d.measuredGrid,\n points: (count) => (count === 1 ? \"1 point\" : `${n(count)} points`),\n problems: (count) =>\n count === 1\n ? \"1 cell is not a number\"\n : `${n(count)} cells are not numbers`,\n },\n dataTable: {\n ...d.dataTable,\n filterResults: (shown, total) => `${n(shown)} of ${n(total)} rows`,\n pageChanged: (page, totalPages) => `Page ${n(page)} of ${n(totalPages)}`,\n pageRange: (from, to, total) => `${n(from)}–${n(to)} / ${n(total)}`,\n rowCount: (total) => n(total),\n columnsCount: (visible, total) => `Columns (${n(visible)}/${n(total)})`,\n },\n calendarHeatmap: {\n ...d.calendarHeatmap,\n truncated: (count) =>\n `Showing the most recent days; ${n(count)} earlier ${count === 1 ? \"day is\" : \"days are\"} not shown.`,\n },\n combobox: {\n ...d.combobox,\n selectedCount: (count) => `${n(count)} selected`,\n resultCount: (count) =>\n count === 1 ? \"1 result\" : `${n(count)} results`,\n minChars: (count) =>\n count === 1\n ? \"Type at least 1 character\"\n : `Type at least ${n(count)} characters`,\n },\n multiSelect: {\n ...d.multiSelect,\n selectedCount: (count) => n(count),\n },\n chipInput: {\n ...d.chipInput,\n atLimit: (max) => `Limit of ${n(max)} reached`,\n },\n iconPicker: {\n ...d.iconPicker,\n resultCount: (count) => (count === 1 ? \"1 icon\" : `${n(count)} icons`),\n },\n bulkActionBar: {\n ...d.bulkActionBar,\n selected: (count) => `${n(count)} selected`,\n },\n file: {\n // The kit's own `Intl` unit formatting, pinned to this locale (\"3.4 MB\").\n size: (bytes) => formatFileSize(bytes, numberLocale),\n },\n filePicker: {\n ...d.filePicker,\n rejectedCount: (name, maxFiles) =>\n `“${name}” was not added: at most ${n(maxFiles)} ${maxFiles === 1 ? \"file\" : \"files\"}`,\n rejectedMany: (count) => `${n(count)} files were not added`,\n rejectedPick: (count) =>\n count === 1\n ? \"The file was not added\"\n : `None of the ${n(count)} files were added`,\n selected: (count, firstName) =>\n count === 1 ? `“${firstName}” selected` : `${n(count)} files selected`,\n },\n wizard: {\n ...d.wizard,\n step: (current, total) => `Step ${n(current)} of ${n(total)}`,\n },\n tour: {\n ...d.tour,\n step: (current, total) => `${n(current)} / ${n(total)}`,\n },\n passwordStrength: {\n ...d.passwordStrength,\n ruleLength: (minLength) => `At least ${n(minLength)} characters`,\n tooLong: (maxBytes) =>\n `At most ${n(maxBytes)} characters (accents and emoji count for more than one).`,\n },\n floatingPanel: {\n ...d.floatingPanel,\n badge: (count) => `${n(count)} new`,\n },\n imageGrid: {\n ...d.imageGrid,\n item: (index, count) => `Image ${n(index)} of ${n(count)}`,\n },\n lightbox: {\n ...d.lightbox,\n counter: (index, count) => `${n(index)} / ${n(count)}`,\n position: (index, count) => `Image ${n(index)} of ${n(count)}`,\n },\n translationReview: {\n ...d.translationReview,\n filterCount: (label, count) => `${label} · ${n(count)}`,\n placeholdersOnly: (count) => `Only placeholder problems (${n(count)})`,\n progress: (approved, total) => `${n(approved)} of ${n(total)} approved`,\n localeProgress: (approved, total) => `${n(approved)}/${n(total)}`,\n exportCorrections: (count) => `Export corrections (${n(count)})`,\n },\n characterCount: {\n ...d.characterCount,\n count: (used, max) => `${n(used)} of ${n(max)} characters`,\n remaining: (left) =>\n left === 1 ? \"1 character left\" : `${n(left)} characters left`,\n },\n ibanInput: {\n ...d.ibanInput,\n length: (actual, expected) =>\n `An IBAN from this country has ${n(expected)} characters — this one has ${n(actual)}.`,\n },\n columnMapper: {\n ...d.columnMapper,\n summary: (columns, rows) =>\n `${n(columns)} ${columns === 1 ? \"column\" : \"columns\"}, ${n(rows)} ${rows === 1 ? \"row\" : \"rows\"}`,\n unreadCount: (count) =>\n count === 1\n ? \"1 line could not be read\"\n : `${n(count)} lines could not be read`,\n unreadMore: (count) => `…and ${n(count)} more`,\n previewOf: (shown, total) =>\n shown === 1\n ? `The first of ${n(total)} rows`\n : `The first ${n(shown)} of ${n(total)} rows`,\n },\n };\n}\n"],"mappings":";AAAA,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAkBxB,SAAS,cAAc,eAAe,SAAsB;AACjE,QAAM,MAAM,IAAI,KAAK,aAAa,YAAY;AAC9C,QAAM,IAAI,CAAC,UAAkB,IAAI,OAAO,KAAK;AAC7C,QAAM,IAAI;AAEV,SAAO;AAAA,IACL,GAAG;AAAA,IACH,oBAAoB;AAAA,MAClB,GAAG,EAAE;AAAA,MACL,iBAAiB,CAAC,QAChB,SAAS,EAAE,GAAG,CAAC,IAAI,QAAQ,IAAI,eAAe,aAAa;AAAA,IAC/D;AAAA,IACA,cAAc;AAAA,MACZ,GAAG,EAAE;AAAA,MACL,QAAQ,CAAC,UAAW,UAAU,IAAI,YAAY,GAAG,EAAE,KAAK,CAAC;AAAA,MACzD,UAAU,CAAC,UACT,UAAU,IACN,2BACA,GAAG,EAAE,KAAK,CAAC;AAAA,IACnB;AAAA,IACA,WAAW;AAAA,MACT,GAAG,EAAE;AAAA,MACL,eAAe,CAAC,OAAO,UAAU,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAAA,MAC3D,aAAa,CAAC,MAAM,eAAe,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC;AAAA,MACtE,WAAW,CAAC,MAAM,IAAI,UAAU,GAAG,EAAE,IAAI,CAAC,SAAI,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;AAAA,MACjE,UAAU,CAAC,UAAU,EAAE,KAAK;AAAA,MAC5B,cAAc,CAAC,SAAS,UAAU,YAAY,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;AAAA,IACtE;AAAA,IACA,iBAAiB;AAAA,MACf,GAAG,EAAE;AAAA,MACL,WAAW,CAAC,U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/D,mBAAmB,CAAC,UAAU,uBAAuB,EAAE,KAAK,CAAC;AAAA,IAC/D;AAAA,IACA,gBAAgB;AAAA,MACd,GAAG,EAAE;AAAA,MACL,OAAO,CAAC,MAAM,QAAQ,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;AAAA,MAC7C,WAAW,CAAC,SACV,SAAS,IAAI,qBAAqB,GAAG,EAAE,IAAI,CAAC;AAAA,IAChD;AAAA,IACA,WAAW;AAAA,MACT,GAAG,EAAE;AAAA,MACL,QAAQ,CAAC,QAAQ,aACf,iCAAiC,EAAE,QAAQ,CAAC,mCAA8B,EAAE,MAAM,CAAC;AAAA,IACvF;AAAA,IACA,cAAc;AAAA,MACZ,GAAG,EAAE;AAAA,MACL,SAAS,CAAC,SAAS,SACjB,GAAG,EAAE,OAAO,CAAC,IAAI,YAAY,IAAI,WAAW,SAAS,KAAK,EAAE,IAAI,CAAC,IAAI,SAAS,IAAI,QAAQ,MAAM;AAAA,MAClG,aAAa,CAAC,UACZ,UAAU,IACN,6BACA,GAAG,EAAE,KAAK,CAAC;AAAA,MACjB,YAAY,CAAC,UAAU,aAAQ,EAAE,KAAK,CAAC;AAAA,MACvC,WAAW,CAAC,OAAO,UACjB,UAAU,IACN,gBAAgB,EAAE,KAAK,CAAC,UACxB,aAAa,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC;AAAA,IAC5C;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bY as UiKitLabels } from '../../feedback-BxeQVzwq.js';
|
|
2
|
+
import '../../feedback-attachment-fGAzZPf0.js';
|
|
2
3
|
import 'react';
|
|
3
|
-
import '../../
|
|
4
|
+
import '../../feedback/feedback-inbox.js';
|
|
5
|
+
import 'lucide-react';
|
|
6
|
+
import '../../components/tooltip.js';
|
|
7
|
+
import '../../hooks/use-anchored-rect.js';
|
|
8
|
+
import '../../lib/clipping.js';
|
|
9
|
+
import '../../data-table-labels-B7OdnM0S.js';
|
|
10
|
+
import '../../components/data-table-sort.js';
|
|
11
|
+
import '../../components/swipeable-row.js';
|
|
4
12
|
import '../../components/mini-calendar.js';
|
|
5
13
|
import '../../components/calendar-heatmap.js';
|
|
6
14
|
import '../../components/popover.js';
|
|
7
15
|
import '../../components/chip.js';
|
|
8
|
-
import 'lucide-react';
|
|
9
16
|
import '../../components/field-sync.js';
|
|
10
|
-
import '../../components/tooltip.js';
|
|
11
|
-
import '../../hooks/use-anchored-rect.js';
|
|
12
|
-
import '../../lib/clipping.js';
|
|
13
17
|
import '../../wizard/types.js';
|
|
14
18
|
import '../../tour/tour.js';
|
|
15
19
|
import '../../search/command-palette.js';
|
|
@@ -23,7 +27,6 @@ import '../../components/sparkline.js';
|
|
|
23
27
|
import '../../components/stat-tile.js';
|
|
24
28
|
import '../../components/signature-pad.js';
|
|
25
29
|
import '../../components/password-strength.js';
|
|
26
|
-
import '../../components/danger-confirm.js';
|
|
27
30
|
import '../../components/swatch-picker.js';
|
|
28
31
|
import '../../components/tile-radio.js';
|
|
29
32
|
import '../../components/icon-picker.js';
|
|
@@ -31,11 +34,7 @@ import '../../components/dialog-frame.js';
|
|
|
31
34
|
import '../../components/modal.js';
|
|
32
35
|
import '../../hooks/use-search-param-state.js';
|
|
33
36
|
import '../../components/measured-grid.js';
|
|
34
|
-
import '../../feedback-attachment-WFiXJ8We.js';
|
|
35
|
-
import '../../feedback/feedback-thread.js';
|
|
36
|
-
import '../../feedback/feedback-inbox.js';
|
|
37
37
|
import '../../components/account-settings-labels.js';
|
|
38
|
-
import '../../components/confirm-dialog.js';
|
|
39
38
|
import '../../components/floating-panel.js';
|
|
40
39
|
import '../../components/bulk-action-bar.js';
|
|
41
40
|
import '../../components/list.js';
|
|
@@ -54,14 +53,20 @@ import '../../components/write-lock.js';
|
|
|
54
53
|
import '../../components/legal.js';
|
|
55
54
|
import '../../components/account-chips.js';
|
|
56
55
|
import '../../lib/format.js';
|
|
57
|
-
import '../../data-table-3mi2R3so.js';
|
|
58
|
-
import '../../components/data-table-sort.js';
|
|
59
|
-
import '../../components/swipeable-row.js';
|
|
60
56
|
import '../../components/reauth-dialog.js';
|
|
61
57
|
import '../../components/server-wake.js';
|
|
62
58
|
import '../../lib/server-wake.js';
|
|
63
59
|
import '../../components/translation-review-labels.js';
|
|
64
60
|
import '../../lib/translation-review.js';
|
|
61
|
+
import '../../components/country-select.js';
|
|
62
|
+
import '../../components/inline-edit-field.js';
|
|
63
|
+
import '../../lib/iban.js';
|
|
64
|
+
import '../../lib/phone.js';
|
|
65
|
+
import '../../components/sign-chip.js';
|
|
66
|
+
import '../../components/column-mapper.js';
|
|
67
|
+
import '../../lib/column-mapping.js';
|
|
68
|
+
import '../../lib/table-text.js';
|
|
69
|
+
import '../../components/field-parts.js';
|
|
65
70
|
|
|
66
71
|
/**
|
|
67
72
|
* The kit's words in Spanish: every namespace of {@link UiKitLabels}, for
|