@eifi1/ui-kit 0.14.0 → 0.14.2
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 +4 -3
- package/dist/components/amount-input.d.ts +8 -0
- package/dist/components/amount-input.js +10 -4
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/error-boundary.js +2 -1
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/money-field.d.ts +92 -0
- package/dist/components/money-field.js +40 -0
- package/dist/components/money-field.js.map +1 -0
- package/dist/components/number-field.d.ts +12 -1
- package/dist/components/number-field.js +4 -0
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/page-header.d.ts +3 -1
- package/dist/components/page-header.js +68 -31
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/text-link.js +2 -1
- package/dist/components/text-link.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +10 -1
- package/dist/feedback/feedback-dialog.js +13 -3
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +1 -0
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/document-navigation.d.ts +15 -0
- package/dist/lib/document-navigation.js +13 -0
- package/dist/lib/document-navigation.js.map +1 -0
- package/package.json +7 -4
- package/src/components/amount-input.tsx +18 -4
- package/src/components/error-boundary.tsx +2 -1
- package/src/components/money-field.tsx +75 -0
- package/src/components/number-field.tsx +14 -0
- package/src/components/page-header.tsx +65 -12
- package/src/components/text-link.tsx +2 -1
- package/src/feedback/feedback-dialog.tsx +20 -2
- package/src/i18n/locales/de.ts +1 -0
- package/src/i18n/locales/es.ts +1 -0
- package/src/i18n/locales/fr.ts +1 -0
- package/src/i18n/locales/hu.ts +1 -0
- package/src/i18n/locales/it.ts +1 -0
- package/src/i18n/locales/zh.ts +1 -0
- package/src/index.ts +1 -0
- package/src/lib/document-navigation.ts +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/i18n/locales/zh.ts"],"sourcesContent":["import { formatFileSize } from \"../kit-labels\";\nimport type { UiKitLabels } from \"../kit-labels\";\n\n/**\n * The kit's words in Chinese (Simplified): every namespace of {@link UiKitLabels}, for\n * `<UiKitProvider labels={UI_KIT_LABELS_ZH}>`.\n *\n * Self-contained on purpose — nothing but the kit's own `formatFileSize` — so it works\n * as a starting point to copy and adjust. Counts and sizes are formatted with\n * `zh-CN` digits; {@link uiKitLabelsZh} takes another number locale\n * (e.g. `\"de-CH\"` for 1’234) without touching the words.\n */\nexport function uiKitLabelsZh(numberLocale = \"zh-CN\"): UiKitLabels {\n const num = new Intl.NumberFormat(numberLocale);\n const n = (value: number) => num.format(value);\n\n return {\n feedbackAttachment: {\n attachmentAdd: \"附加图片\",\n attachmentCapture: \"截取屏幕\",\n attachmentPaste: \"……或从剪贴板粘贴截图。\",\n attachmentRemove: \"移除附件\",\n },\n feedbackDialog: {\n title: \"发送反馈\",\n category: \"类别\",\n subject: \"主题\",\n body: \"发生了什么?\",\n attachment: \"截图\",\n submitHint: \"Ctrl/⌘ + Enter 发送\",\n cancel: \"取消\",\n save: \"发送\",\n },\n feedbackThread: {\n thread: \"评论\",\n empty: \"暂无评论\",\n loading: \"正在加载评论…\",\n you: \"我\",\n staff: \"工作人员\",\n attachments: \"附件\",\n },\n feedbackComposer: {\n field: \"撰写评论\",\n placeholder: \"撰写评论…\",\n send: \"发送\",\n sendHint: (modifier) => `${modifier} + Enter 发送`,\n sendHintEnter: \"Enter 发送,Shift + Enter 换行\",\n },\n accountSettings: {\n profile: {\n title: \"个人资料\",\n email: \"电子邮箱\",\n role: \"角色\",\n memberSince: \"注册时间\",\n displayName: \"显示名称\",\n save: \"保存\",\n },\n password: {\n title: \"修改密码\",\n current: \"当前密码\",\n next: \"新密码\",\n confirm: \"确认新密码\",\n submit: \"修改密码\",\n tooShort: \"新密码太短。\",\n mismatch: \"两次输入的密码不一致。\",\n },\n twoFactor: {\n status: \"双重验证\",\n enabledText: \"已开启\",\n disabledText: \"未开启\",\n enable: \"设置双重验证\",\n scanHint: \"请用身份验证器应用扫描此二维码,然后输入应用显示的验证码。\",\n codeLabel: \"验证码\",\n verify: \"验证并开启\",\n disableSection: \"关闭双重验证\",\n password: \"当前密码\",\n disable: \"关闭\",\n qrAlt: \"身份验证器应用的二维码\",\n secretHint: \"无法扫描?请改为在应用中输入此密钥:\",\n copySecret: \"复制密钥\",\n },\n passkeys: {\n title: \"通行密钥\",\n description: \"使用指纹、面容或设备 PIN 登录,无需密码。\",\n empty: \"暂无通行密钥\",\n loading: \"正在加载通行密钥…\",\n list: \"已注册的通行密钥\",\n nameLabel: \"名称(可选)\",\n namePlaceholder: \"例如:笔记本电脑、手机\",\n add: \"添加通行密钥\",\n adding: \"正在等待设备…\",\n rename: \"重命名\",\n renameItem: (name) => `重命名 ${name}`,\n renameField: (name) => `${name} 的新名称`,\n save: \"保存\",\n cancel: \"取消\",\n delete: \"删除\",\n deleteItem: (name) => `删除 ${name}`,\n deleteConfirm: (name) => `删除“${name}”?删除后将无法再用它登录。`,\n confirmDelete: \"删除通行密钥\",\n created: (date) => `添加于 ${date}`,\n lastUsed: (date) => `上次使用:${date}`,\n neverUsed: \"从未使用\",\n },\n },\n measuredGrid: {\n view: \"表格视图\",\n cellsView: \"单元格\",\n textView: \"文本\",\n addRow: \"添加行\",\n removeRow: (row) => `删除第 ${row} 行`,\n clear: \"清空表格\",\n pasteHint: \"可将电子表格中的一块数据粘贴到任意单元格\",\n cell: (column, row) => `${column},第 ${row} 行`,\n rowNumber: \"行\",\n rowActions: \"行操作\",\n keyboardHint:\n \"方向键在单元格之间移动。直接输入替换单元格内容,F2 编辑,Esc 撤销编辑。回车向下移动,并在末尾添加一行。\",\n lineError: (line) => `无法读取第 ${line} 行`,\n points: (count) => `${count} 个点`,\n problems: (count) => `${count} 个单元格不是数字`,\n },\n pageContents: { title: \"本页目录\" },\n common: {\n dismiss: \"关闭\",\n close: \"关闭\",\n clear: \"清除\",\n search: \"搜索\",\n done: \"完成\",\n cancel: \"取消\",\n save: \"保存\",\n back: \"上一步\",\n next: \"下一步\",\n remove: \"移除\",\n loading: \"加载中…\",\n noResults: \"无结果\",\n // Full-width colon, no space after it.\n fieldValue: (field, value) => `${field}:${value}`,\n opensInNewTab: \"在新标签页中打开\",\n },\n dataTable: {\n columns: \"列\",\n selectAllRows: \"全选所有行\",\n sortHint: \"点击排序 · 按住 Shift 点击可添加排序\",\n filter: \"筛选\",\n close: \"关闭\",\n selectRow: \"选择行\",\n autoSize: \"自动调整列宽\",\n loading: \"加载中…\",\n filters: \"筛选条件\",\n clearAll: \"全部清除\",\n done: \"完成\",\n pageSize: \"每页行数\",\n pageSizeAll: \"全部\",\n prevPage: \"上一页\",\n nextPage: \"下一页\",\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n selectFilter: \"选择\",\n selectAll: \"全部\",\n selectNone: \"无\",\n dateFrom: \"从\",\n dateTo: \"至\",\n numberMin: \"最小值\",\n numberMax: \"最大值\",\n numberAbs: \"绝对值\",\n presets: {\n today: \"今天\",\n yesterday: \"昨天\",\n this_week: \"本周\",\n last_week: \"上周\",\n last_7_days: \"最近 7 天\",\n last_30_days: \"最近 30 天\",\n this_month: \"本月\",\n last_month: \"上月\",\n last_3_months: \"最近 3 个月\",\n ytd: \"今年至今\",\n last_year: \"去年\",\n },\n table: \"数据表格\",\n filterResults: (shown, total) => `显示 ${n(shown)} 行,共 ${n(total)} 行`,\n sortedAscending: (column) => `已按“${column}”升序排序`,\n sortedDescending: (column) => `已按“${column}”降序排序`,\n sortCleared: (column) => `已取消“${column}”的排序`,\n pageChanged: (page, totalPages) => `第 ${n(page)} 页,共 ${n(totalPages)} 页`,\n pageRange: (from, to, total) => `${n(from)}–${n(to)} / ${n(total)}`,\n rowCount: (total) => n(total),\n columnsCount: (visible, total) => `列(${n(visible)}/${n(total)})`,\n empty: \"暂无条目\",\n actions: \"操作\",\n edit: \"编辑\",\n delete: \"删除\",\n booleanTrue: \"是\",\n booleanFalse: \"否\",\n booleanUnset: \"未设置\",\n },\n miniCalendar: {\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n // Already formatted in the provider's locale (\"2026年9月14日星期一\").\n day: (date) => date,\n chooseStart: \"请选择开始日期\",\n chooseEnd: \"请选择结束日期\",\n startSelected: (date) => `已选择 ${date} 为开始日期。请选择结束日期。`,\n rangeSelected: (from, to) => `已选择 ${from} 至 ${to}。如需重新选择,请先选择开始日期。`,\n },\n monthPicker: {\n previousYear: \"上一年\",\n nextYear: \"下一年\",\n panel: \"选择月份\",\n month: (monthYear) => monthYear,\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n today: \"今天\",\n },\n calendarHeatmap: {\n grid: \"每日数值\",\n day: (date, value) => `${date}:${value}`,\n less: \"较少\",\n more: \"较多\",\n truncated: (count) =>\n `仅显示最近的日期;另有 ${n(count)} 天未显示。`,\n },\n datePicker: {\n apply: \"应用\",\n cancel: \"取消\",\n presets: \"快捷范围\",\n panel: \"选择日期\",\n rangePanel: \"选择日期范围\",\n clear: \"清除\",\n previousDay: \"前一天\",\n nextDay: \"后一天\",\n today: \"今天\",\n },\n popover: {\n panel: \"弹出框\",\n },\n combobox: {\n search: \"搜索\",\n noResults: \"无结果\",\n clear: \"清除\",\n loading: \"加载中…\",\n create: (query) => `创建“${query}”`,\n selectedCount: (count) => `已选 ${n(count)} 项`,\n loadError: \"无法加载结果\",\n resultCount: (count) => `${n(count)} 个结果`,\n minChars: (count) => `请至少输入 ${n(count)} 个字符`,\n },\n multiSelect: {\n search: \"搜索\",\n selectAll: \"全选\",\n clear: \"清除\",\n all: \"全部\",\n // The bare count, as in English: the trigger has always shown just the number.\n selectedCount: (count) => n(count),\n },\n calculator: {\n open: \"打开计算器\",\n panel: \"计算器\",\n calculation: \"算式\",\n backspace: \"退格\",\n clear: \"清除\",\n equals: \"等于\",\n done: \"完成\",\n plus: \"加\",\n minus: \"减\",\n times: \"乘\",\n divide: \"除以\",\n decimal: \"小数点\",\n },\n currency: {\n currency: \"货币\",\n search: \"搜索货币\",\n },\n chipInput: {\n added: (value) => `已添加“${value}”`,\n removed: (value) => `已移除“${value}”`,\n remove: \"移除\",\n atLimit: (max) => `已达上限(${n(max)} 项)`,\n duplicate: (value) => `“${value}”已在列表中`,\n },\n swatchPicker: {\n none: \"无颜色\",\n mixed: \"混合:所选项目的颜色各不相同\",\n },\n iconPicker: {\n none: \"无图标\",\n mixed: \"混合:所选项目的图标各不相同\",\n search: \"搜索图标\",\n noResults: \"没有匹配的图标\",\n resultCount: (count) => `${n(count)} 个图标`,\n },\n fieldSync: {\n synced: \"已保存\",\n edited: \"有未保存的更改\",\n pending: \"正在保存…\",\n error: \"保存失败\",\n retry: \"重试\",\n },\n passwordReveal: {\n show: \"显示密码\",\n hide: \"隐藏密码\",\n },\n dangerConfirm: {\n arm: \"删除…\",\n confirm: \"删除\",\n cancel: \"取消\",\n prompt: \"此操作无法撤销。\",\n password: \"密码\",\n phrase: (phrase) => `输入“${phrase}”以确认`,\n },\n tabs: {\n add: \"添加标签页\",\n // Quoted, so the spacing rule holds whether the tab's name is Han or Latin.\n remove: (tab) => `移除“${tab}”`,\n },\n appShell: {\n collapse: \"收起侧边栏\",\n expand: \"展开侧边栏\",\n toggleGroup: (groupLabel) => `${groupLabel}:页面`,\n },\n topBar: {\n theme: \"切换主题\",\n palette: \"外观预设\",\n language: \"语言\",\n switchRole: \"切换角色\",\n role: (value) => `角色:${value}`,\n },\n pickerSheet: {\n close: \"关闭\",\n },\n dialogFrame: {\n close: \"关闭\",\n },\n bulkActionBar: {\n selected: (count) => `已选择 ${n(count)} 项`,\n clear: \"清除选择\",\n cleared: \"已清除选择\",\n },\n swipeableRow: {\n actions: \"行操作\",\n },\n file: {\n // The kit's own `Intl` unit formatting, pinned to this locale.\n size: (bytes) => formatFileSize(bytes, numberLocale),\n },\n filePicker: {\n dropzone: \"文件上传\",\n browse: \"浏览\",\n empty: \"将文件拖放到此处\",\n emptyMultiple: \"将文件拖放到此处\",\n hint: (accept) => (accept ? `支持:${accept}` : \"任意文件类型\"),\n busy: \"正在上传…\",\n rejectedPick: (count) => (count === 1 ? \"未添加该文件\" : `${count} 个文件均未添加`),\n rejectedType: (name) => `“${name}”的文件类型不受支持`,\n rejectedTypeOnly: (accept) => `仅限 ${accept} 文件`,\n rejectedSize: (name, maxSize) => `“${name}”超过 ${maxSize}`,\n rejectedCount: (name, maxFiles) => `未添加“${name}”:最多 ${n(maxFiles)} 个文件`,\n rejectedInvalid: (name) => `“${name}”无法在此使用`,\n rejectedMany: (count) => `${n(count)} 个文件未添加`,\n selected: (count, firstName) =>\n count === 1 ? `已选择“${firstName}”` : `已选择 ${n(count)} 个文件`,\n remove: (name) => `移除“${name}”`,\n clearAll: \"移除所有文件\",\n removed: (name) => `已移除“${name}”`,\n cleared: \"已移除所有文件\",\n },\n wizard: {\n done: \"完成\",\n cancel: \"取消\",\n back: \"上一步\",\n next: \"下一步\",\n skip: \"跳过\",\n finish: \"完成\",\n submitting: \"正在创建…\",\n steps: \"步骤\",\n step: (current, total) => `第 ${n(current)} 步,共 ${n(total)} 步`,\n cancelTitle: \"放弃此表单?\",\n confirmCancel: \"已填写的内容将会丢失。\",\n cancelConfirmLabel: \"放弃\",\n cancelDismissLabel: \"继续编辑\",\n reviewTitle: \"确认信息\",\n edit: \"编辑\",\n missingRequired: \"请填写所有必填字段。\",\n genericError: \"发生错误\",\n },\n tour: {\n next: \"下一步\",\n back: \"上一步\",\n skip: \"跳过\",\n done: \"完成\",\n awaitClickHint: \"点击高亮的元素以继续\",\n step: (current, total) => `${n(current)} / ${n(total)}`,\n },\n commandPalette: {\n clear: \"清除搜索\",\n submit: \"搜索\",\n close: \"关闭\",\n placeholder: \"搜索…\",\n empty: \"无结果\",\n loading: \"搜索中…\",\n dialog: \"搜索\",\n error: \"搜索失败,请重试。\",\n },\n globalSearch: {\n trigger: \"搜索\",\n placeholder: \"搜索或跳转到…\",\n shortcut: (keys) => `搜索(${keys})`,\n suggestions: \"试试\",\n results: \"结果\",\n },\n sparkline: {\n rising: (first, last) => `从 ${first} 上升到 ${last}`,\n falling: (first, last) => `从 ${first} 下降到 ${last}`,\n flat: (value) => `保持在 ${value} 不变`,\n single: (value) => `仅一个值:${value}`,\n noData: \"无数据\",\n named: (name, summary) => `${name}:${summary}`,\n },\n statTile: {\n increase: (amount) => `上升 ${amount}`,\n decrease: (amount) => `下降 ${amount}`,\n unchanged: \"无变化\",\n better: (change) => `${change}(向好)`,\n worse: (change) => `${change}(变差)`,\n noValue: \"无数据\",\n loading: \"加载中…\",\n },\n signaturePad: {\n label: \"签名\",\n instructions: \"请使用鼠标、手指或触控笔在框内签名。\",\n typedFallbackHint: \"如果无法手写,可以改为输入姓名。\",\n empty: \"尚未签名\",\n signed: \"已签名\",\n undo: \"撤销上一笔\",\n clear: \"清除\",\n save: \"保存签名\",\n useTyped: \"改为输入姓名\",\n useDrawn: \"改为手写\",\n typedName: \"姓名\",\n cleared: \"签名已清除\",\n undone: \"已撤销上一笔\",\n viewEmpty: \"未签名\",\n viewDrawn: \"手写签名\",\n // Quoted, so the spacing rule holds whether the name is Han or Latin.\n viewTyped: (name) => `以输入的姓名“${name}”签名`,\n },\n passwordStrength: {\n tooShort: \"太短\",\n weak: \"弱\",\n fair: \"一般\",\n good: \"良好\",\n strong: \"强\",\n announcement: (level) => `密码强度:${level}`,\n // Unformatted, as in the English default.\n ruleLength: (minLength) => `至少 ${minLength} 个字符`,\n ruleCase: \"包含大写和小写字母\",\n ruleDigit: \"包含数字\",\n ruleSymbol: \"包含符号\",\n optional: (rule) => `${rule}(可选)`,\n met: \"已满足:\",\n notMet: \"未满足:\",\n tooLong: (maxBytes) => `最多 ${maxBytes} 个字符(带重音的字母和表情符号按多个字符计算)。`,\n },\n seriesChart: {\n resetZoom: \"重置缩放\",\n zoomHint:\n \"拖动以缩放:近似正方形的选区同时缩放两条坐标轴,细长的选区只缩放其所沿的那条轴。双击可重置。\",\n empty: \"无数据\",\n legend: \"数据系列\",\n points: \"图表数值\",\n },\n pieChart: {\n slices: \"图表扇区\",\n slice: (label, value, percent) => `${label}:${value}(${percent})`,\n total: \"合计\",\n empty: \"无数据\",\n legend: \"类别\",\n },\n confirmDialog: {\n confirm: \"确认\",\n cancel: \"取消\",\n },\n floatingPanel: {\n close: \"关闭\",\n badge: (count) => `${n(count)} 条新内容`,\n },\n copyButton: {\n copy: \"复制\",\n copied: \"已复制\",\n failed: \"复制失败\",\n copiedAnnouncement: \"已复制到剪贴板\",\n failedAnnouncement: \"无法复制到剪贴板\",\n },\n list: {\n unread: \"未读\",\n opensInNewTab: \"在新标签页中打开\",\n },\n breadcrumbs: {\n label: \"面包屑导航\",\n showAll: \"显示完整路径\",\n },\n toast: {\n close: \"关闭通知\",\n notifications: \"通知\",\n undo: \"撤销\",\n redo: \"重做\",\n },\n form: {\n save: \"保存\",\n cancel: \"取消\",\n },\n descriptionList: {\n empty: \"—\",\n },\n lineItems: {\n add: \"添加行\",\n remove: (row) => `删除第 ${row} 行`,\n confirmRemove: (row) => `删除第 ${row} 行?再次按下以确认`,\n row: (row) => `第 ${row} 行`,\n cell: (column, row) => `${column},第 ${row} 行`,\n totals: \"合计\",\n },\n progressBar: {\n unlimited: \"无限制\",\n overLimit: (amount) => `超出限额 ${amount}`,\n },\n signedAmount: {\n positive: (amount) => `正 ${amount}`,\n negative: (amount) => `负 ${amount}`,\n },\n errorBoundary: {\n title: \"出错了\",\n message: \"无法显示页面的这一部分。请重试或重新加载页面。\",\n retry: \"重试\",\n details: \"错误详情\",\n reload: \"重新加载\",\n updateTitle: \"有新版本可用\",\n updateMessage: \"自此页面加载以来,应用的部分内容已更新。请重新加载以获取新版本。\",\n offlineTitle: \"当前处于离线状态\",\n offlineMessage: \"没有网络连接,无法加载此页面。请恢复连接后重新加载页面。\",\n copyReport: \"复制错误报告\",\n reported: \"此错误已自动报告。\",\n reportedAs: (reference) => `报告编号:${reference}`,\n },\n authedImage: {\n loading: \"正在加载图片…\",\n loadError: \"无法加载图片\",\n failedImage: (alt) => `${alt}:无法加载图片`,\n },\n imageGrid: {\n list: \"图片\",\n item: (index, count) => `第 ${n(index)} 张,共 ${n(count)} 张`,\n actions: (name) => `${name}的操作`,\n },\n lightbox: {\n dialog: \"图片查看器\",\n close: \"关闭\",\n previous: \"上一张\",\n next: \"下一张\",\n counter: (index, count) => `${n(index)} / ${n(count)}`,\n position: (index, count) => `第 ${n(index)} 张,共 ${n(count)} 张`,\n download: \"下载\",\n zoom: \"缩放\",\n noPreview: \"此文件无法预览\",\n openInNewTab: \"在新标签页中打开\",\n },\n };\n}\n\nexport const UI_KIT_LABELS_ZH: UiKitLabels = uiKitLabelsZh();\n"],"mappings":";AAAA,SAAS,sBAAsB;AAYxB,SAAS,cAAc,eAAe,SAAsB;AACjE,QAAM,MAAM,IAAI,KAAK,aAAa,YAAY;AAC9C,QAAM,IAAI,CAAC,UAAkB,IAAI,OAAO,KAAK;AAE7C,SAAO;AAAA,IACL,oBAAoB;AAAA,MAClB,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,iBAAiB;AAAA,MACjB,kBAAkB;AAAA,IACpB;AAAA,IACA,gBAAgB;AAAA,MACd,OAAO;AAAA,MACP,UAAU;AAAA,MACV,SAAS;AAAA,MACT,MAAM;AAAA,MACN,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,MAAM;AAAA,IACR;AAAA,IACA,gBAAgB;AAAA,MACd,QAAQ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YAAY;AAAA,MACZ,UAAU;AAAA,MACV,YAAY,CAAC,cAAc,iCAAQ,SAAS;AAAA,IAC9C;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,aAAa,CAAC,QAAQ,GAAG,GAAG;AAAA,IAC9B;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,MAAM,CAAC,OAAO,UAAU,UAAK,EAAE,KAAK,CAAC,uBAAQ,EAAE,KAAK,CAAC;AAAA,MACrD,SAAS,CAAC,SAAS,GAAG,IAAI;AAAA,IAC5B;AAAA,IACA,UAAU;AAAA,MACR,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,UAAU;AAAA,MACV,MAAM;AAAA,MACN,SAAS,CAAC,OAAO,UAAU,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC;AAAA,MACpD,UAAU,CAAC,OAAO,UAAU,UAAK,EAAE,KAAK,CAAC,uBAAQ,EAAE,KAAK,CAAC;AAAA,MACzD,UAAU;AAAA,MACV,MAAM;AAAA,MACN,WAAW;AAAA,MACX,cAAc;AAAA,IAChB;AAAA,EACF;AACF;AAEO,MAAM,mBAAgC,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/i18n/locales/zh.ts"],"sourcesContent":["import { formatFileSize } from \"../kit-labels\";\nimport type { UiKitLabels } from \"../kit-labels\";\n\n/**\n * The kit's words in Chinese (Simplified): every namespace of {@link UiKitLabels}, for\n * `<UiKitProvider labels={UI_KIT_LABELS_ZH}>`.\n *\n * Self-contained on purpose — nothing but the kit's own `formatFileSize` — so it works\n * as a starting point to copy and adjust. Counts and sizes are formatted with\n * `zh-CN` digits; {@link uiKitLabelsZh} takes another number locale\n * (e.g. `\"de-CH\"` for 1’234) without touching the words.\n */\nexport function uiKitLabelsZh(numberLocale = \"zh-CN\"): UiKitLabels {\n const num = new Intl.NumberFormat(numberLocale);\n const n = (value: number) => num.format(value);\n\n return {\n feedbackAttachment: {\n attachmentAdd: \"附加图片\",\n attachmentCapture: \"截取屏幕\",\n attachmentPaste: \"……或从剪贴板粘贴截图。\",\n attachmentRemove: \"移除附件\",\n },\n feedbackDialog: {\n title: \"发送反馈\",\n category: \"类别\",\n subject: \"主题\",\n body: \"发生了什么?\",\n bodyOptional: \"发生了什么?(可选)\",\n attachment: \"截图\",\n submitHint: \"Ctrl/⌘ + Enter 发送\",\n cancel: \"取消\",\n save: \"发送\",\n },\n feedbackThread: {\n thread: \"评论\",\n empty: \"暂无评论\",\n loading: \"正在加载评论…\",\n you: \"我\",\n staff: \"工作人员\",\n attachments: \"附件\",\n },\n feedbackComposer: {\n field: \"撰写评论\",\n placeholder: \"撰写评论…\",\n send: \"发送\",\n sendHint: (modifier) => `${modifier} + Enter 发送`,\n sendHintEnter: \"Enter 发送,Shift + Enter 换行\",\n },\n accountSettings: {\n profile: {\n title: \"个人资料\",\n email: \"电子邮箱\",\n role: \"角色\",\n memberSince: \"注册时间\",\n displayName: \"显示名称\",\n save: \"保存\",\n },\n password: {\n title: \"修改密码\",\n current: \"当前密码\",\n next: \"新密码\",\n confirm: \"确认新密码\",\n submit: \"修改密码\",\n tooShort: \"新密码太短。\",\n mismatch: \"两次输入的密码不一致。\",\n },\n twoFactor: {\n status: \"双重验证\",\n enabledText: \"已开启\",\n disabledText: \"未开启\",\n enable: \"设置双重验证\",\n scanHint: \"请用身份验证器应用扫描此二维码,然后输入应用显示的验证码。\",\n codeLabel: \"验证码\",\n verify: \"验证并开启\",\n disableSection: \"关闭双重验证\",\n password: \"当前密码\",\n disable: \"关闭\",\n qrAlt: \"身份验证器应用的二维码\",\n secretHint: \"无法扫描?请改为在应用中输入此密钥:\",\n copySecret: \"复制密钥\",\n },\n passkeys: {\n title: \"通行密钥\",\n description: \"使用指纹、面容或设备 PIN 登录,无需密码。\",\n empty: \"暂无通行密钥\",\n loading: \"正在加载通行密钥…\",\n list: \"已注册的通行密钥\",\n nameLabel: \"名称(可选)\",\n namePlaceholder: \"例如:笔记本电脑、手机\",\n add: \"添加通行密钥\",\n adding: \"正在等待设备…\",\n rename: \"重命名\",\n renameItem: (name) => `重命名 ${name}`,\n renameField: (name) => `${name} 的新名称`,\n save: \"保存\",\n cancel: \"取消\",\n delete: \"删除\",\n deleteItem: (name) => `删除 ${name}`,\n deleteConfirm: (name) => `删除“${name}”?删除后将无法再用它登录。`,\n confirmDelete: \"删除通行密钥\",\n created: (date) => `添加于 ${date}`,\n lastUsed: (date) => `上次使用:${date}`,\n neverUsed: \"从未使用\",\n },\n },\n measuredGrid: {\n view: \"表格视图\",\n cellsView: \"单元格\",\n textView: \"文本\",\n addRow: \"添加行\",\n removeRow: (row) => `删除第 ${row} 行`,\n clear: \"清空表格\",\n pasteHint: \"可将电子表格中的一块数据粘贴到任意单元格\",\n cell: (column, row) => `${column},第 ${row} 行`,\n rowNumber: \"行\",\n rowActions: \"行操作\",\n keyboardHint:\n \"方向键在单元格之间移动。直接输入替换单元格内容,F2 编辑,Esc 撤销编辑。回车向下移动,并在末尾添加一行。\",\n lineError: (line) => `无法读取第 ${line} 行`,\n points: (count) => `${count} 个点`,\n problems: (count) => `${count} 个单元格不是数字`,\n },\n pageContents: { title: \"本页目录\" },\n common: {\n dismiss: \"关闭\",\n close: \"关闭\",\n clear: \"清除\",\n search: \"搜索\",\n done: \"完成\",\n cancel: \"取消\",\n save: \"保存\",\n back: \"上一步\",\n next: \"下一步\",\n remove: \"移除\",\n loading: \"加载中…\",\n noResults: \"无结果\",\n // Full-width colon, no space after it.\n fieldValue: (field, value) => `${field}:${value}`,\n opensInNewTab: \"在新标签页中打开\",\n },\n dataTable: {\n columns: \"列\",\n selectAllRows: \"全选所有行\",\n sortHint: \"点击排序 · 按住 Shift 点击可添加排序\",\n filter: \"筛选\",\n close: \"关闭\",\n selectRow: \"选择行\",\n autoSize: \"自动调整列宽\",\n loading: \"加载中…\",\n filters: \"筛选条件\",\n clearAll: \"全部清除\",\n done: \"完成\",\n pageSize: \"每页行数\",\n pageSizeAll: \"全部\",\n prevPage: \"上一页\",\n nextPage: \"下一页\",\n clearFilter: \"清除筛选\",\n filterPlaceholder: \"筛选…\",\n selectFilter: \"选择\",\n selectAll: \"全部\",\n selectNone: \"无\",\n dateFrom: \"从\",\n dateTo: \"至\",\n numberMin: \"最小值\",\n numberMax: \"最大值\",\n numberAbs: \"绝对值\",\n presets: {\n today: \"今天\",\n yesterday: \"昨天\",\n this_week: \"本周\",\n last_week: \"上周\",\n last_7_days: \"最近 7 天\",\n last_30_days: \"最近 30 天\",\n this_month: \"本月\",\n last_month: \"上月\",\n last_3_months: \"最近 3 个月\",\n ytd: \"今年至今\",\n last_year: \"去年\",\n },\n table: \"数据表格\",\n filterResults: (shown, total) => `显示 ${n(shown)} 行,共 ${n(total)} 行`,\n sortedAscending: (column) => `已按“${column}”升序排序`,\n sortedDescending: (column) => `已按“${column}”降序排序`,\n sortCleared: (column) => `已取消“${column}”的排序`,\n pageChanged: (page, totalPages) => `第 ${n(page)} 页,共 ${n(totalPages)} 页`,\n pageRange: (from, to, total) => `${n(from)}–${n(to)} / ${n(total)}`,\n rowCount: (total) => n(total),\n columnsCount: (visible, total) => `列(${n(visible)}/${n(total)})`,\n empty: \"暂无条目\",\n actions: \"操作\",\n edit: \"编辑\",\n delete: \"删除\",\n booleanTrue: \"是\",\n booleanFalse: \"否\",\n booleanUnset: \"未设置\",\n },\n miniCalendar: {\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n // Already formatted in the provider's locale (\"2026年9月14日星期一\").\n day: (date) => date,\n chooseStart: \"请选择开始日期\",\n chooseEnd: \"请选择结束日期\",\n startSelected: (date) => `已选择 ${date} 为开始日期。请选择结束日期。`,\n rangeSelected: (from, to) => `已选择 ${from} 至 ${to}。如需重新选择,请先选择开始日期。`,\n },\n monthPicker: {\n previousYear: \"上一年\",\n nextYear: \"下一年\",\n panel: \"选择月份\",\n month: (monthYear) => monthYear,\n previousMonth: \"上个月\",\n nextMonth: \"下个月\",\n today: \"今天\",\n },\n calendarHeatmap: {\n grid: \"每日数值\",\n day: (date, value) => `${date}:${value}`,\n less: \"较少\",\n more: \"较多\",\n truncated: (count) =>\n `仅显示最近的日期;另有 ${n(count)} 天未显示。`,\n },\n datePicker: {\n apply: \"应用\",\n cancel: \"取消\",\n presets: \"快捷范围\",\n panel: \"选择日期\",\n rangePanel: \"选择日期范围\",\n clear: \"清除\",\n previousDay: \"前一天\",\n nextDay: \"后一天\",\n today: \"今天\",\n },\n popover: {\n panel: \"弹出框\",\n },\n combobox: {\n search: \"搜索\",\n noResults: \"无结果\",\n clear: \"清除\",\n loading: \"加载中…\",\n create: (query) => `创建“${query}”`,\n selectedCount: (count) => `已选 ${n(count)} 项`,\n loadError: \"无法加载结果\",\n resultCount: (count) => `${n(count)} 个结果`,\n minChars: (count) => `请至少输入 ${n(count)} 个字符`,\n },\n multiSelect: {\n search: \"搜索\",\n selectAll: \"全选\",\n clear: \"清除\",\n all: \"全部\",\n // The bare count, as in English: the trigger has always shown just the number.\n selectedCount: (count) => n(count),\n },\n calculator: {\n open: \"打开计算器\",\n panel: \"计算器\",\n calculation: \"算式\",\n backspace: \"退格\",\n clear: \"清除\",\n equals: \"等于\",\n done: \"完成\",\n plus: \"加\",\n minus: \"减\",\n times: \"乘\",\n divide: \"除以\",\n decimal: \"小数点\",\n },\n currency: {\n currency: \"货币\",\n search: \"搜索货币\",\n },\n chipInput: {\n added: (value) => `已添加“${value}”`,\n removed: (value) => `已移除“${value}”`,\n remove: \"移除\",\n atLimit: (max) => `已达上限(${n(max)} 项)`,\n duplicate: (value) => `“${value}”已在列表中`,\n },\n swatchPicker: {\n none: \"无颜色\",\n mixed: \"混合:所选项目的颜色各不相同\",\n },\n iconPicker: {\n none: \"无图标\",\n mixed: \"混合:所选项目的图标各不相同\",\n search: \"搜索图标\",\n noResults: \"没有匹配的图标\",\n resultCount: (count) => `${n(count)} 个图标`,\n },\n fieldSync: {\n synced: \"已保存\",\n edited: \"有未保存的更改\",\n pending: \"正在保存…\",\n error: \"保存失败\",\n retry: \"重试\",\n },\n passwordReveal: {\n show: \"显示密码\",\n hide: \"隐藏密码\",\n },\n dangerConfirm: {\n arm: \"删除…\",\n confirm: \"删除\",\n cancel: \"取消\",\n prompt: \"此操作无法撤销。\",\n password: \"密码\",\n phrase: (phrase) => `输入“${phrase}”以确认`,\n },\n tabs: {\n add: \"添加标签页\",\n // Quoted, so the spacing rule holds whether the tab's name is Han or Latin.\n remove: (tab) => `移除“${tab}”`,\n },\n appShell: {\n collapse: \"收起侧边栏\",\n expand: \"展开侧边栏\",\n toggleGroup: (groupLabel) => `${groupLabel}:页面`,\n },\n topBar: {\n theme: \"切换主题\",\n palette: \"外观预设\",\n language: \"语言\",\n switchRole: \"切换角色\",\n role: (value) => `角色:${value}`,\n },\n pickerSheet: {\n close: \"关闭\",\n },\n dialogFrame: {\n close: \"关闭\",\n },\n bulkActionBar: {\n selected: (count) => `已选择 ${n(count)} 项`,\n clear: \"清除选择\",\n cleared: \"已清除选择\",\n },\n swipeableRow: {\n actions: \"行操作\",\n },\n file: {\n // The kit's own `Intl` unit formatting, pinned to this locale.\n size: (bytes) => formatFileSize(bytes, numberLocale),\n },\n filePicker: {\n dropzone: \"文件上传\",\n browse: \"浏览\",\n empty: \"将文件拖放到此处\",\n emptyMultiple: \"将文件拖放到此处\",\n hint: (accept) => (accept ? `支持:${accept}` : \"任意文件类型\"),\n busy: \"正在上传…\",\n rejectedPick: (count) => (count === 1 ? \"未添加该文件\" : `${count} 个文件均未添加`),\n rejectedType: (name) => `“${name}”的文件类型不受支持`,\n rejectedTypeOnly: (accept) => `仅限 ${accept} 文件`,\n rejectedSize: (name, maxSize) => `“${name}”超过 ${maxSize}`,\n rejectedCount: (name, maxFiles) => `未添加“${name}”:最多 ${n(maxFiles)} 个文件`,\n rejectedInvalid: (name) => `“${name}”无法在此使用`,\n rejectedMany: (count) => `${n(count)} 个文件未添加`,\n selected: (count, firstName) =>\n count === 1 ? `已选择“${firstName}”` : `已选择 ${n(count)} 个文件`,\n remove: (name) => `移除“${name}”`,\n clearAll: \"移除所有文件\",\n removed: (name) => `已移除“${name}”`,\n cleared: \"已移除所有文件\",\n },\n wizard: {\n done: \"完成\",\n cancel: \"取消\",\n back: \"上一步\",\n next: \"下一步\",\n skip: \"跳过\",\n finish: \"完成\",\n submitting: \"正在创建…\",\n steps: \"步骤\",\n step: (current, total) => `第 ${n(current)} 步,共 ${n(total)} 步`,\n cancelTitle: \"放弃此表单?\",\n confirmCancel: \"已填写的内容将会丢失。\",\n cancelConfirmLabel: \"放弃\",\n cancelDismissLabel: \"继续编辑\",\n reviewTitle: \"确认信息\",\n edit: \"编辑\",\n missingRequired: \"请填写所有必填字段。\",\n genericError: \"发生错误\",\n },\n tour: {\n next: \"下一步\",\n back: \"上一步\",\n skip: \"跳过\",\n done: \"完成\",\n awaitClickHint: \"点击高亮的元素以继续\",\n step: (current, total) => `${n(current)} / ${n(total)}`,\n },\n commandPalette: {\n clear: \"清除搜索\",\n submit: \"搜索\",\n close: \"关闭\",\n placeholder: \"搜索…\",\n empty: \"无结果\",\n loading: \"搜索中…\",\n dialog: \"搜索\",\n error: \"搜索失败,请重试。\",\n },\n globalSearch: {\n trigger: \"搜索\",\n placeholder: \"搜索或跳转到…\",\n shortcut: (keys) => `搜索(${keys})`,\n suggestions: \"试试\",\n results: \"结果\",\n },\n sparkline: {\n rising: (first, last) => `从 ${first} 上升到 ${last}`,\n falling: (first, last) => `从 ${first} 下降到 ${last}`,\n flat: (value) => `保持在 ${value} 不变`,\n single: (value) => `仅一个值:${value}`,\n noData: \"无数据\",\n named: (name, summary) => `${name}:${summary}`,\n },\n statTile: {\n increase: (amount) => `上升 ${amount}`,\n decrease: (amount) => `下降 ${amount}`,\n unchanged: \"无变化\",\n better: (change) => `${change}(向好)`,\n worse: (change) => `${change}(变差)`,\n noValue: \"无数据\",\n loading: \"加载中…\",\n },\n signaturePad: {\n label: \"签名\",\n instructions: \"请使用鼠标、手指或触控笔在框内签名。\",\n typedFallbackHint: \"如果无法手写,可以改为输入姓名。\",\n empty: \"尚未签名\",\n signed: \"已签名\",\n undo: \"撤销上一笔\",\n clear: \"清除\",\n save: \"保存签名\",\n useTyped: \"改为输入姓名\",\n useDrawn: \"改为手写\",\n typedName: \"姓名\",\n cleared: \"签名已清除\",\n undone: \"已撤销上一笔\",\n viewEmpty: \"未签名\",\n viewDrawn: \"手写签名\",\n // Quoted, so the spacing rule holds whether the name is Han or Latin.\n viewTyped: (name) => `以输入的姓名“${name}”签名`,\n },\n passwordStrength: {\n tooShort: \"太短\",\n weak: \"弱\",\n fair: \"一般\",\n good: \"良好\",\n strong: \"强\",\n announcement: (level) => `密码强度:${level}`,\n // Unformatted, as in the English default.\n ruleLength: (minLength) => `至少 ${minLength} 个字符`,\n ruleCase: \"包含大写和小写字母\",\n ruleDigit: \"包含数字\",\n ruleSymbol: \"包含符号\",\n optional: (rule) => `${rule}(可选)`,\n met: \"已满足:\",\n notMet: \"未满足:\",\n tooLong: (maxBytes) => `最多 ${maxBytes} 个字符(带重音的字母和表情符号按多个字符计算)。`,\n },\n seriesChart: {\n resetZoom: \"重置缩放\",\n zoomHint:\n \"拖动以缩放:近似正方形的选区同时缩放两条坐标轴,细长的选区只缩放其所沿的那条轴。双击可重置。\",\n empty: \"无数据\",\n legend: \"数据系列\",\n points: \"图表数值\",\n },\n pieChart: {\n slices: \"图表扇区\",\n slice: (label, value, percent) => `${label}:${value}(${percent})`,\n total: \"合计\",\n empty: \"无数据\",\n legend: \"类别\",\n },\n confirmDialog: {\n confirm: \"确认\",\n cancel: \"取消\",\n },\n floatingPanel: {\n close: \"关闭\",\n badge: (count) => `${n(count)} 条新内容`,\n },\n copyButton: {\n copy: \"复制\",\n copied: \"已复制\",\n failed: \"复制失败\",\n copiedAnnouncement: \"已复制到剪贴板\",\n failedAnnouncement: \"无法复制到剪贴板\",\n },\n list: {\n unread: \"未读\",\n opensInNewTab: \"在新标签页中打开\",\n },\n breadcrumbs: {\n label: \"面包屑导航\",\n showAll: \"显示完整路径\",\n },\n toast: {\n close: \"关闭通知\",\n notifications: \"通知\",\n undo: \"撤销\",\n redo: \"重做\",\n },\n form: {\n save: \"保存\",\n cancel: \"取消\",\n },\n descriptionList: {\n empty: \"—\",\n },\n lineItems: {\n add: \"添加行\",\n remove: (row) => `删除第 ${row} 行`,\n confirmRemove: (row) => `删除第 ${row} 行?再次按下以确认`,\n row: (row) => `第 ${row} 行`,\n cell: (column, row) => `${column},第 ${row} 行`,\n totals: \"合计\",\n },\n progressBar: {\n unlimited: \"无限制\",\n overLimit: (amount) => `超出限额 ${amount}`,\n },\n signedAmount: {\n positive: (amount) => `正 ${amount}`,\n negative: (amount) => `负 ${amount}`,\n },\n errorBoundary: {\n title: \"出错了\",\n message: \"无法显示页面的这一部分。请重试或重新加载页面。\",\n retry: \"重试\",\n details: \"错误详情\",\n reload: \"重新加载\",\n updateTitle: \"有新版本可用\",\n updateMessage: \"自此页面加载以来,应用的部分内容已更新。请重新加载以获取新版本。\",\n offlineTitle: \"当前处于离线状态\",\n offlineMessage: \"没有网络连接,无法加载此页面。请恢复连接后重新加载页面。\",\n copyReport: \"复制错误报告\",\n reported: \"此错误已自动报告。\",\n reportedAs: (reference) => `报告编号:${reference}`,\n },\n authedImage: {\n loading: \"正在加载图片…\",\n loadError: \"无法加载图片\",\n failedImage: (alt) => `${alt}:无法加载图片`,\n },\n imageGrid: {\n list: \"图片\",\n item: (index, count) => `第 ${n(index)} 张,共 ${n(count)} 张`,\n actions: (name) => `${name}的操作`,\n },\n lightbox: {\n dialog: \"图片查看器\",\n close: \"关闭\",\n previous: \"上一张\",\n next: \"下一张\",\n counter: (index, count) => `${n(index)} / ${n(count)}`,\n position: (index, count) => `第 ${n(index)} 张,共 ${n(count)} 张`,\n download: \"下载\",\n zoom: \"缩放\",\n noPreview: \"此文件无法预览\",\n openInNewTab: \"在新标签页中打开\",\n },\n };\n}\n\nexport const UI_KIT_LABELS_ZH: UiKitLabels = uiKitLabelsZh();\n"],"mappings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":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export { NumberPadSheet, NumberPadSheetLabels } from './components/numpad-sheet.
|
|
|
36
36
|
export { NumberInput, stepNumber } from './components/number-input.js';
|
|
37
37
|
export { CURRENCIES, CurrencyFlag, CurrencyFlagProps, CurrencyOption, CurrencySelect, CurrencySelectProps, currencyName, getCurrency } from './components/currency-select.js';
|
|
38
38
|
export { AmountInput } from './components/amount-input.js';
|
|
39
|
+
export { MoneyField, MoneyFieldProps } from './components/money-field.js';
|
|
39
40
|
export { Combobox, ComboboxProps, InlineEntityCombobox, InlineEntityComboboxProps } from './components/combobox.js';
|
|
40
41
|
export { PickerSheet, PickerSheetProps, SHEET_ROW_CLASS } from './components/picker-sheet.js';
|
|
41
42
|
export { EntityCombobox, EntityComboboxProps } from './components/entity-combobox.js';
|
|
@@ -50,7 +51,7 @@ export { Checkbox, CheckboxProps } from './components/checkbox.js';
|
|
|
50
51
|
export { Switch, SwitchProps, SwitchSize } from './components/switch.js';
|
|
51
52
|
export { Slider, SliderMark, SliderProps, fromLogPosition, toLogPosition } from './components/slider.js';
|
|
52
53
|
export { TimeInput, TimeInputProps, isTimeInRange, normalizeTime } from './components/time-input.js';
|
|
53
|
-
export { NumberField, NumberFieldProps } from './components/number-field.js';
|
|
54
|
+
export { IntegerField, NumberField, NumberFieldProps } from './components/number-field.js';
|
|
54
55
|
export { DEFAULT_SPARKLINE_LABELS, Sparkline, SparklineLabels, SparklineProps, SparklineTone, sparklineSummary } from './components/sparkline.js';
|
|
55
56
|
export { DEFAULT_STAT_TILE_LABELS, StatTile, StatTileDelta, StatTileGrid, StatTileGridProps, StatTileLabels, StatTileLinkProps, StatTileProps, StatTileSubValue, StatTileTone } from './components/stat-tile.js';
|
|
56
57
|
export { DEFAULT_SIGNATURE_PAD_LABELS, SignatureDetail, SignaturePad, SignaturePadHandle, SignaturePadLabels, SignaturePadProps, SignatureView, SignatureViewProps } from './components/signature-pad.js';
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./components/numpad-sheet.js";
|
|
|
37
37
|
export * from "./components/number-input.js";
|
|
38
38
|
export * from "./components/currency-select.js";
|
|
39
39
|
export * from "./components/amount-input.js";
|
|
40
|
+
export * from "./components/money-field.js";
|
|
40
41
|
export * from "./components/combobox.js";
|
|
41
42
|
export * from "./components/picker-sheet.js";
|
|
42
43
|
export * from "./components/entity-combobox.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @eifi1/ui-kit — shared design-system barrel.\n//\n// Domain-free UI + theme surface shared across apps (lead app: Keksdose). Consumers import\n// components/theme from \"@eifi1/ui-kit\" and the token stylesheet from \"@eifi1/ui-kit/tokens.css\".\n\n// ── lib ────────────────────────────────────────────────────────────────────\nexport * from \"./lib/calc\";\nexport { cn } from \"./lib/cn\";\nexport { logger, setStoreLog } from \"./lib/logger\";\n// Intl number / money / percent / date / relative-time formatting, and `useKitFormat()`\n// for the same bound to the provider's locale (kastlan's formatters.ts, English \"5m ago\").\nexport * from \"./lib/format\";\n// localStorage that never throws (Safari private mode, blocked site data).\nexport { readStored, writeStored } from \"./lib/safe-storage\";\n// Date helpers are also available via the \"@eifi1/ui-kit/dates\" subpath.\n\n// ── hooks ────────────────────────────────────────────────────────────────────\nexport { useMediaQuery } from \"./hooks/use-media-query\";\nexport { useBodyScrollLock } from \"./hooks/use-body-scroll-lock\";\nexport { useAnchoredRect } from \"./hooks/use-anchored-rect\";\nexport type { AnchorRect } from \"./hooks/use-anchored-rect\";\nexport { useAnchoredPanel, anchoredPanelPlacement, useVisualViewport } from \"./hooks/use-anchored-panel\";\nexport type {\n AnchoredPanel,\n AnchoredPanelOptions,\n ViewportBox,\n} from \"./hooks/use-anchored-panel\";\nexport { useEscapeKey, useOutsideClick } from \"./hooks/use-dismiss\";\n// Focus containment for an overlay, and a live region for a change that moves no focus.\n// Both were extracted from the two components that already did them correctly (Modal and\n// CommandPalette) so the rest of the kit stops being the exception.\nexport { useFocusTrap } from \"./hooks/use-focus-trap\";\nexport type { FocusTrapOptions } from \"./hooks/use-focus-trap\";\nexport { useAnnounce } from \"./hooks/use-announce\";\nexport type { UseAnnounceReturn, UseAnnounceOptions, AnnounceRegionProps } from \"./hooks/use-announce\";\nexport { useOverlayHistory } from \"./hooks/use-overlay-history\";\nexport { useCloseTransition, OVERLAY_EXIT_MS } from \"./hooks/use-close-transition\";\nexport { useRowSwipe } from \"./hooks/use-row-swipe\";\nexport type { SwipeStage, RowSwipeOptions, RowSwipeReturn } from \"./hooks/use-row-swipe\";\n// Any element as a file drop target, screened like FileButton (kastlan).\nexport { useFileDrop, dragHasFiles } from \"./hooks/use-file-drop\";\nexport type { UseFileDropOptions, UseFileDropReturn, FileDropProps } from \"./hooks/use-file-drop\";\n// kastlan's search boxes each carried a hand-rolled copy, two without the cleanup.\nexport { useDebounce, useDebouncedCallback } from \"./hooks/use-debounce\";\nexport type { DebouncedCallbackOptions, DebouncedFunction } from \"./hooks/use-debounce\";\n// One search param as state, the active tab in `?tab=`, and a dialog's open state in the\n// URL (Modal's `urlParam`) — kastlan's and keksdose's use-search-param-state, in the kit.\nexport { useSearchParamState, useTabParam, useDialogParam } from \"./hooks/use-search-param-state\";\nexport type { SearchParamStateOptions, DialogParam } from \"./hooks/use-search-param-state\";\n// Copy that reports whether it worked — keksdose's copy buttons said \"Copied\" when it had not.\nexport { useCopyToClipboard, copyToClipboard } from \"./hooks/use-copy-to-clipboard\";\nexport type { CopyState, UseCopyToClipboardOptions, UseCopyToClipboardReturn } from \"./hooks/use-copy-to-clipboard\";\n// Keyboard shortcuts (\"Mod+K\", \"Ctrl+Shift+F\") that leave typing in fields alone.\nexport { useHotkey, parseHotkey, matchesHotkey } from \"./hooks/use-hotkey\";\nexport type { Hotkey, ParsedHotkey, UseHotkeyOptions } from \"./hooks/use-hotkey\";\n// A protected file as an object URL, fetched with the app's own auth (kastlan's AuthedImage).\nexport { useAuthedSrc } from \"./hooks/use-authed-src\";\nexport type { AuthedFetcher, AuthedSrcStatus, UseAuthedSrcOptions, UseAuthedSrcResult } from \"./hooks/use-authed-src\";\n\n// ── theme / palettes ─────────────────────────────────────────────────────────\nexport * from \"./theme/chart-palette\";\n// Colour maths (sRGB ↔ OKLCH, WCAG contrast, CVD simulation) and the palette deriver\n// that builds a whole, contrast-solved palette from one brand colour plus any colours\n// pinned by hand. `auditPalette` / `auditChartRamp` measure a palette rather than\n// trusting a comment about it.\nexport * from \"./theme/color\";\nexport * from \"./theme/palette-derive\";\nexport * from \"./theme/palette-presets\";\nexport * from \"./theme/theme-store\";\nexport * from \"./theme/palette-store\";\n\n// ── components ───────────────────────────────────────────────────────────────\nexport * from \"./components/ui\";\n// The label-ABOVE field group (label, hint, error, required), inside wizards or out.\nexport * from \"./components/field\";\nexport * from \"./components/search-field\";\nexport * from \"./components/dropdown\";\nexport * from \"./components/popover\";\nexport { SwipeableRow } from \"./components/swipeable-row\";\nexport type { SwipeAction, SwipeableRowProps } from \"./components/swipeable-row\";\nexport * from \"./components/calculator\";\nexport * from \"./components/numpad-sheet\";\nexport * from \"./components/number-input\";\nexport * from \"./components/currency-select\";\nexport * from \"./components/amount-input\";\nexport * from \"./components/combobox\";\nexport * from \"./components/picker-sheet\";\nexport * from \"./components/entity-combobox\";\nexport * from \"./components/multi-entity-combobox\";\nexport * from \"./components/multi-select\";\nexport * from \"./components/tooltip\";\nexport * from \"./components/user-avatar\";\nexport * from \"./components/settings-fields\";\n// Sync state for a database-backed field: the engine (`useFieldSync`) and the\n// affordance (`FieldSyncIndicator`), kept separate because the state is useful\n// without the dot — a form can gate its submit on any field being `pending`.\nexport * from \"./components/field-sync\";\nexport * from \"./components/month-picker\";\nexport * from \"./components/checkbox\";\nexport * from \"./components/switch\";\nexport * from \"./components/slider\";\nexport * from \"./components/time-input\";\nexport * from \"./components/number-field\";\nexport * from \"./components/sparkline\";\nexport * from \"./components/stat-tile\";\nexport * from \"./components/signature-pad\";\nexport * from \"./components/password-strength\";\nexport * from \"./components/page-contents\";\nexport * from \"./components/disclosure\";\nexport * from \"./components/dialog-frame\";\nexport * from \"./components/danger-confirm\";\n// `useConfirm()` — the promise-based replacement for `window.confirm`, one host per app.\nexport * from \"./components/confirm-dialog\";\n// A non-modal corner panel and its round trigger (keksdose's assistant launcher).\nexport * from \"./components/floating-panel\";\n// The count / clear / actions bar a selection brings up (keksdose's three copies).\nexport * from \"./components/bulk-action-bar\";\nexport * from \"./components/swatch-picker\";\nexport * from \"./components/icon-picker\";\nexport * from \"./components/choice-card\";\nexport * from \"./components/autocomplete\";\nexport * from \"./components/measured-grid\";\nexport { useWindowedRows } from \"./hooks/use-windowed-rows\";\nexport type { WindowedRows } from \"./hooks/use-windowed-rows\";\n// Named, not `export *`: file-button.tsx also holds the screening helpers the\n// dropzone shares, which are internal.\nexport { FileButton, useFilePicker, matchesAccept, DEFAULT_FILE_PICKER_LABELS } from \"./components/file-button\";\nexport type {\n FileButtonProps,\n UseFilePickerOptions,\n UseFilePickerReturn,\n FilePickerLabels,\n FileRejection,\n FileRejectionReason,\n FileScreenOptions,\n} from \"./components/file-button\";\nexport * from \"./components/treemap\";\nexport * from \"./components/series-chart\";\nexport * from \"./components/chart-zoom\";\nexport * from \"./components/toggle-legend\";\nexport * from \"./components/facing-pair\";\nexport * from \"./components/series-chart-labels\";\nexport * from \"./components/pie-chart\";\nexport * from \"./components/pie-chart-labels\";\nexport * from \"./components/account-settings\";\n// 0.12.0: the fourth account section, and the QR code TwoFactorSetting draws its\n// otpauth URI with (encoder in lib/qr-encode.ts — no dependency, see there).\nexport * from \"./components/passkeys-setting\";\nexport * from \"./components/qr-code\";\nexport { encodeQr } from \"./lib/qr-encode\";\nexport type { QrEncodeOptions, QrErrorCorrection, QrMatrix } from \"./lib/qr-encode\";\nexport * from \"./components/alert-banner\";\nexport * from \"./components/toggle-group\";\n// A wrapping set of links/buttons marked `aria-current` — Tabs-like looks, not tabs.\nexport * from \"./components/nav-pills\";\n// A pill carrying one VALUE — inert, a link, or a toggle, depending on which prop it is\n// given — and the list field built from it. Distinct from Button on purpose: a row of\n// buttons reads as \"choose an action\", a row of chips as \"here are the things\".\nexport * from \"./components/chip\";\nexport * from \"./components/wizard-stepper\";\nexport * from \"./components/hover-menu\";\nexport * from \"./components/modal\";\nexport * from \"./components/full-bleed-dialog\";\nexport * from \"./components/grouped-picker\";\nexport * from \"./components/file-dropzone\";\nexport * from \"./components/mini-calendar\";\nexport * from \"./components/calendar-heatmap\";\nexport * from \"./components/date-picker\";\nexport * from \"./components/tree-view\";\nexport * from \"./components/chart\";\n// 0.8.0 layout and feedback primitives the apps hand-rolled or took from shadcn/Radix.\nexport * from \"./components/description-list\";\n// The Save / Cancel row forms and dialogs end in, and the editable line-item repeater\n// (journal lines, lease components, invoice positions). 0.12.0.\nexport * from \"./components/form-actions\";\nexport * from \"./components/line-items\";\nexport * from \"./components/progress-bar\";\n// Named: skeleton.tsx also holds SKELETON_CLASS, the look StatTile shares — internal.\nexport { Skeleton } from \"./components/skeleton\";\nexport type { SkeletonProps, SkeletonShape } from \"./components/skeleton\";\n// 0.12.0: a centred spinner with words, signed figures and deltas, a render-error fallback.\nexport * from \"./components/loading-state\";\nexport * from \"./components/signed-amount\";\nexport * from \"./components/error-boundary\";\nexport * from \"./components/copy-button\";\nexport { AuthedImage, DEFAULT_AUTHED_IMAGE_LABELS } from \"./components/authed-image\";\nexport type { AuthedImageProps, AuthedImageLabels } from \"./components/authed-image\";\nexport * from \"./components/image-grid\";\nexport * from \"./components/lightbox\";\nexport * from \"./components/button-group\";\nexport * from \"./components/table\";\nexport * from \"./components/separator\";\n// Named: scroll-area.tsx also holds the overflow hook and scrollbar class Table shares.\nexport { ScrollArea } from \"./components/scroll-area\";\nexport type { ScrollAreaProps } from \"./components/scroll-area\";\n// 0.10.0 rows, menu rows, text primitives and page chrome the apps drew by hand.\nexport * from \"./components/list\";\nexport * from \"./components/menu-item\";\nexport * from \"./components/text\";\nexport * from \"./components/status-dot\";\nexport * from \"./components/page-header\";\nexport * from \"./components/breadcrumbs\";\n// The one inline link (kastlan's EntityLink / CellLink / legal and source links), through\n// `<UiKitProvider linkComponent>`. Named: the file also holds the kit's internal link picker.\nexport { TextLink } from \"./components/text-link\";\nexport type {\n TextLinkProps,\n TextLinkRenderProps,\n TextLinkTone,\n TextLinkUnderline,\n TextLinkCurrent,\n} from \"./components/text-link\";\n// The toast layer over sonner (an OPTIONAL peer, loaded lazily): `toast` mirrors sonner's\n// API so apps migrate by swapping the import; `<Toaster>` carries the placement, theme,\n// tones and z-index both apps had wired by hand.\nexport { toast, Toaster, DEFAULT_TOAST_LABELS, TOAST_ACTION_DURATION } from \"./components/toast\";\nexport type {\n ToastId,\n ToastAction,\n ToastOptions,\n ToastPromiseOptions,\n ToastUndoOptions,\n ToastRedoOptions,\n ToastLabels,\n ToastPosition,\n ToastSwipeDirection,\n ToasterOffset,\n ToasterProps,\n} from \"./components/toast\";\n\n// ── data-table suite ─────────────────────────────────────────────────────────\nexport * from \"./components/data-table-labels\";\nexport * from \"./components/data-table-sort\";\nexport * from \"./components/data-table-filters\";\nexport * from \"./components/data-table-pagination\";\nexport { FilterPopover } from \"./components/data-table-filter-popover\";\n// data-table re-exports SortState internally; export the rest explicitly to\n// avoid a duplicate SortState star-export (it comes from data-table-sort).\nexport { DataTable } from \"./components/data-table\";\nexport type {\n DataTableColumn,\n DataTableCellProps,\n DataTableHeadProps,\n DataTableProps,\n ServerPagination,\n FilterState,\n MobileSwipeActions,\n DataTableDensity,\n DataTableChrome,\n DataTableRowAction,\n} from \"./components/data-table\";\n// 0.12.0: the yes/no cell, and a server table's state held by its owner, URL-synced.\nexport * from \"./components/data-table-cells\";\nexport { useTableUrlState, readTableUrlState } from \"./components/use-table-state\";\nexport type {\n TableUrlState,\n TableUrlSync,\n TableUrlStateProps,\n UseTableUrlStateOptions,\n UseTableUrlStateReturn,\n} from \"./components/use-table-state\";\n\n// ── shell (composable app chrome) ────────────────────────────────────────────\nexport * from \"./shell/topbar-controls\";\nexport * from \"./shell/top-bar\";\nexport * from \"./shell/app-shell\";\nexport * from \"./shell/option-switcher-menu\";\nexport * from \"./shell/role-switcher\";\nexport * from \"./shell/topbar-action-menu\";\nexport * from \"./shell/top-bar-brand\";\nexport * from \"./shell/auth-layout\";\n\n// ── feedback ─────────────────────────────────────────────────────────────────\n// The form somebody files a report with, and the parts an inbox is built from:\n// the status vocabulary both apps share value for value, the policy about what a\n// row may move to from where it stands, and the look of a status control, a\n// category badge and an opened report. The app still wires its own API, columns\n// and strings — see the note at the top of `feedback-inbox.tsx` for what is\n// deliberately left to it.\nexport * from \"./feedback/feedback-attachment\";\nexport * from \"./feedback/feedback-dialog\";\nexport * from \"./feedback/feedback-inbox\";\nexport * from \"./feedback/feedback-thread\";\n\n// ── multi-step wizard ────────────────────────────────────────────────────────\n// The engine (step machine, validators, collected data), the chrome around it\n// (indicator + nav bar + cancel confirm) and the review step it ends on.\n// `components/wizard-stepper` next door is a different, much smaller thing: a bare\n// step indicator for a two-step import flow, with no engine.\n//\n// Two modules were removed here rather than kept as stock. `wizard-field` held a\n// `WizardField`/`WizardSelectField` pair that had never been rendered in any app —\n// a field group nothing was built from, which this comment used to advertise. And\n// `use-rhf-wizard-step` was the only thing in the package that touched\n// react-hook-form, for a hook neither consumer called: keeping it meant an optional\n// peer, a dev dependency and a type import in every consumer's typecheck, bought\n// for nobody. A design system may carry stock; untested stock nothing has ever\n// rendered is not stock, it is a liability with an export.\nexport * from \"./wizard/types\";\nexport * from \"./wizard/use-wizard\";\nexport * from \"./wizard/wizard-context\";\nexport * from \"./wizard/validation\";\nexport * from \"./wizard/wizard-step\";\nexport * from \"./wizard/wizard-summary\";\nexport * from \"./wizard/stepper-nav\";\n\n// ── guided tours ─────────────────────────────────────────────────────────────\nexport * from \"./tour/tour\";\n\n// ── command palette / global search ──────────────────────────────────────────\nexport * from \"./search/command-palette\";\nexport * from \"./search/search-index\";\nexport * from \"./search/global-search\";\n\n// ── i18n: one label tree, one optional provider ──────────────────────────────\n// `UiKitLabels` names every string the kit renders; `<UiKitProvider labels locale>`\n// hands a translation to every component below it. Precedence: a component's own\n// prop > the provider > the English default. See src/i18n/kit-labels.tsx.\nexport * from \"./i18n/kit-labels\";\nexport * from \"./i18n/defaults\";\n"],"mappings":";AAMA,cAAc;AACd,SAAS,UAAU;AACnB,SAAS,QAAQ,mBAAmB;AAGpC,cAAc;AAEd,SAAS,YAAY,mBAAmB;AAIxC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAEhC,SAAS,kBAAkB,wBAAwB,yBAAyB;AAM5E,SAAS,cAAc,uBAAuB;AAI9C,SAAS,oBAAoB;AAE7B,SAAS,mBAAmB;AAE5B,SAAS,yBAAyB;AAClC,SAAS,oBAAoB,uBAAuB;AACpD,SAAS,mBAAmB;AAG5B,SAAS,aAAa,oBAAoB;AAG1C,SAAS,aAAa,4BAA4B;AAIlD,SAAS,qBAAqB,aAAa,sBAAsB;AAGjE,SAAS,oBAAoB,uBAAuB;AAGpD,SAAS,WAAW,aAAa,qBAAqB;AAGtD,SAAS,oBAAoB;AAI7B,cAAc;AAKd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,oBAAoB;AAE7B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,uBAAuB;AAIhC,SAAS,YAAY,eAAe,eAAe,kCAAkC;AAUrF,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB;AAEzB,cAAc;AACd,cAAc;AAEd,cAAc;AAId,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,gBAAgB;AAGzB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,aAAa,mCAAmC;AAEzD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,kBAAkB;AAG3B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,SAAS,gBAAgB;AAWzB,SAAS,OAAO,SAAS,sBAAsB,6BAA6B;AAgB5E,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAc1B,cAAc;AACd,SAAS,kBAAkB,yBAAyB;AAUpD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AASd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAgBd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AAMd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// @eifi1/ui-kit — shared design-system barrel.\n//\n// Domain-free UI + theme surface shared across apps (lead app: Keksdose). Consumers import\n// components/theme from \"@eifi1/ui-kit\" and the token stylesheet from \"@eifi1/ui-kit/tokens.css\".\n\n// ── lib ────────────────────────────────────────────────────────────────────\nexport * from \"./lib/calc\";\nexport { cn } from \"./lib/cn\";\nexport { logger, setStoreLog } from \"./lib/logger\";\n// Intl number / money / percent / date / relative-time formatting, and `useKitFormat()`\n// for the same bound to the provider's locale (kastlan's formatters.ts, English \"5m ago\").\nexport * from \"./lib/format\";\n// localStorage that never throws (Safari private mode, blocked site data).\nexport { readStored, writeStored } from \"./lib/safe-storage\";\n// Date helpers are also available via the \"@eifi1/ui-kit/dates\" subpath.\n\n// ── hooks ────────────────────────────────────────────────────────────────────\nexport { useMediaQuery } from \"./hooks/use-media-query\";\nexport { useBodyScrollLock } from \"./hooks/use-body-scroll-lock\";\nexport { useAnchoredRect } from \"./hooks/use-anchored-rect\";\nexport type { AnchorRect } from \"./hooks/use-anchored-rect\";\nexport { useAnchoredPanel, anchoredPanelPlacement, useVisualViewport } from \"./hooks/use-anchored-panel\";\nexport type {\n AnchoredPanel,\n AnchoredPanelOptions,\n ViewportBox,\n} from \"./hooks/use-anchored-panel\";\nexport { useEscapeKey, useOutsideClick } from \"./hooks/use-dismiss\";\n// Focus containment for an overlay, and a live region for a change that moves no focus.\n// Both were extracted from the two components that already did them correctly (Modal and\n// CommandPalette) so the rest of the kit stops being the exception.\nexport { useFocusTrap } from \"./hooks/use-focus-trap\";\nexport type { FocusTrapOptions } from \"./hooks/use-focus-trap\";\nexport { useAnnounce } from \"./hooks/use-announce\";\nexport type { UseAnnounceReturn, UseAnnounceOptions, AnnounceRegionProps } from \"./hooks/use-announce\";\nexport { useOverlayHistory } from \"./hooks/use-overlay-history\";\nexport { useCloseTransition, OVERLAY_EXIT_MS } from \"./hooks/use-close-transition\";\nexport { useRowSwipe } from \"./hooks/use-row-swipe\";\nexport type { SwipeStage, RowSwipeOptions, RowSwipeReturn } from \"./hooks/use-row-swipe\";\n// Any element as a file drop target, screened like FileButton (kastlan).\nexport { useFileDrop, dragHasFiles } from \"./hooks/use-file-drop\";\nexport type { UseFileDropOptions, UseFileDropReturn, FileDropProps } from \"./hooks/use-file-drop\";\n// kastlan's search boxes each carried a hand-rolled copy, two without the cleanup.\nexport { useDebounce, useDebouncedCallback } from \"./hooks/use-debounce\";\nexport type { DebouncedCallbackOptions, DebouncedFunction } from \"./hooks/use-debounce\";\n// One search param as state, the active tab in `?tab=`, and a dialog's open state in the\n// URL (Modal's `urlParam`) — kastlan's and keksdose's use-search-param-state, in the kit.\nexport { useSearchParamState, useTabParam, useDialogParam } from \"./hooks/use-search-param-state\";\nexport type { SearchParamStateOptions, DialogParam } from \"./hooks/use-search-param-state\";\n// Copy that reports whether it worked — keksdose's copy buttons said \"Copied\" when it had not.\nexport { useCopyToClipboard, copyToClipboard } from \"./hooks/use-copy-to-clipboard\";\nexport type { CopyState, UseCopyToClipboardOptions, UseCopyToClipboardReturn } from \"./hooks/use-copy-to-clipboard\";\n// Keyboard shortcuts (\"Mod+K\", \"Ctrl+Shift+F\") that leave typing in fields alone.\nexport { useHotkey, parseHotkey, matchesHotkey } from \"./hooks/use-hotkey\";\nexport type { Hotkey, ParsedHotkey, UseHotkeyOptions } from \"./hooks/use-hotkey\";\n// A protected file as an object URL, fetched with the app's own auth (kastlan's AuthedImage).\nexport { useAuthedSrc } from \"./hooks/use-authed-src\";\nexport type { AuthedFetcher, AuthedSrcStatus, UseAuthedSrcOptions, UseAuthedSrcResult } from \"./hooks/use-authed-src\";\n\n// ── theme / palettes ─────────────────────────────────────────────────────────\nexport * from \"./theme/chart-palette\";\n// Colour maths (sRGB ↔ OKLCH, WCAG contrast, CVD simulation) and the palette deriver\n// that builds a whole, contrast-solved palette from one brand colour plus any colours\n// pinned by hand. `auditPalette` / `auditChartRamp` measure a palette rather than\n// trusting a comment about it.\nexport * from \"./theme/color\";\nexport * from \"./theme/palette-derive\";\nexport * from \"./theme/palette-presets\";\nexport * from \"./theme/theme-store\";\nexport * from \"./theme/palette-store\";\n\n// ── components ───────────────────────────────────────────────────────────────\nexport * from \"./components/ui\";\n// The label-ABOVE field group (label, hint, error, required), inside wizards or out.\nexport * from \"./components/field\";\nexport * from \"./components/search-field\";\nexport * from \"./components/dropdown\";\nexport * from \"./components/popover\";\nexport { SwipeableRow } from \"./components/swipeable-row\";\nexport type { SwipeAction, SwipeableRowProps } from \"./components/swipeable-row\";\nexport * from \"./components/calculator\";\nexport * from \"./components/numpad-sheet\";\nexport * from \"./components/number-input\";\nexport * from \"./components/currency-select\";\nexport * from \"./components/amount-input\";\nexport * from \"./components/money-field\";\nexport * from \"./components/combobox\";\nexport * from \"./components/picker-sheet\";\nexport * from \"./components/entity-combobox\";\nexport * from \"./components/multi-entity-combobox\";\nexport * from \"./components/multi-select\";\nexport * from \"./components/tooltip\";\nexport * from \"./components/user-avatar\";\nexport * from \"./components/settings-fields\";\n// Sync state for a database-backed field: the engine (`useFieldSync`) and the\n// affordance (`FieldSyncIndicator`), kept separate because the state is useful\n// without the dot — a form can gate its submit on any field being `pending`.\nexport * from \"./components/field-sync\";\nexport * from \"./components/month-picker\";\nexport * from \"./components/checkbox\";\nexport * from \"./components/switch\";\nexport * from \"./components/slider\";\nexport * from \"./components/time-input\";\nexport * from \"./components/number-field\";\nexport * from \"./components/sparkline\";\nexport * from \"./components/stat-tile\";\nexport * from \"./components/signature-pad\";\nexport * from \"./components/password-strength\";\nexport * from \"./components/page-contents\";\nexport * from \"./components/disclosure\";\nexport * from \"./components/dialog-frame\";\nexport * from \"./components/danger-confirm\";\n// `useConfirm()` — the promise-based replacement for `window.confirm`, one host per app.\nexport * from \"./components/confirm-dialog\";\n// A non-modal corner panel and its round trigger (keksdose's assistant launcher).\nexport * from \"./components/floating-panel\";\n// The count / clear / actions bar a selection brings up (keksdose's three copies).\nexport * from \"./components/bulk-action-bar\";\nexport * from \"./components/swatch-picker\";\nexport * from \"./components/icon-picker\";\nexport * from \"./components/choice-card\";\nexport * from \"./components/autocomplete\";\nexport * from \"./components/measured-grid\";\nexport { useWindowedRows } from \"./hooks/use-windowed-rows\";\nexport type { WindowedRows } from \"./hooks/use-windowed-rows\";\n// Named, not `export *`: file-button.tsx also holds the screening helpers the\n// dropzone shares, which are internal.\nexport { FileButton, useFilePicker, matchesAccept, DEFAULT_FILE_PICKER_LABELS } from \"./components/file-button\";\nexport type {\n FileButtonProps,\n UseFilePickerOptions,\n UseFilePickerReturn,\n FilePickerLabels,\n FileRejection,\n FileRejectionReason,\n FileScreenOptions,\n} from \"./components/file-button\";\nexport * from \"./components/treemap\";\nexport * from \"./components/series-chart\";\nexport * from \"./components/chart-zoom\";\nexport * from \"./components/toggle-legend\";\nexport * from \"./components/facing-pair\";\nexport * from \"./components/series-chart-labels\";\nexport * from \"./components/pie-chart\";\nexport * from \"./components/pie-chart-labels\";\nexport * from \"./components/account-settings\";\n// 0.12.0: the fourth account section, and the QR code TwoFactorSetting draws its\n// otpauth URI with (encoder in lib/qr-encode.ts — no dependency, see there).\nexport * from \"./components/passkeys-setting\";\nexport * from \"./components/qr-code\";\nexport { encodeQr } from \"./lib/qr-encode\";\nexport type { QrEncodeOptions, QrErrorCorrection, QrMatrix } from \"./lib/qr-encode\";\nexport * from \"./components/alert-banner\";\nexport * from \"./components/toggle-group\";\n// A wrapping set of links/buttons marked `aria-current` — Tabs-like looks, not tabs.\nexport * from \"./components/nav-pills\";\n// A pill carrying one VALUE — inert, a link, or a toggle, depending on which prop it is\n// given — and the list field built from it. Distinct from Button on purpose: a row of\n// buttons reads as \"choose an action\", a row of chips as \"here are the things\".\nexport * from \"./components/chip\";\nexport * from \"./components/wizard-stepper\";\nexport * from \"./components/hover-menu\";\nexport * from \"./components/modal\";\nexport * from \"./components/full-bleed-dialog\";\nexport * from \"./components/grouped-picker\";\nexport * from \"./components/file-dropzone\";\nexport * from \"./components/mini-calendar\";\nexport * from \"./components/calendar-heatmap\";\nexport * from \"./components/date-picker\";\nexport * from \"./components/tree-view\";\nexport * from \"./components/chart\";\n// 0.8.0 layout and feedback primitives the apps hand-rolled or took from shadcn/Radix.\nexport * from \"./components/description-list\";\n// The Save / Cancel row forms and dialogs end in, and the editable line-item repeater\n// (journal lines, lease components, invoice positions). 0.12.0.\nexport * from \"./components/form-actions\";\nexport * from \"./components/line-items\";\nexport * from \"./components/progress-bar\";\n// Named: skeleton.tsx also holds SKELETON_CLASS, the look StatTile shares — internal.\nexport { Skeleton } from \"./components/skeleton\";\nexport type { SkeletonProps, SkeletonShape } from \"./components/skeleton\";\n// 0.12.0: a centred spinner with words, signed figures and deltas, a render-error fallback.\nexport * from \"./components/loading-state\";\nexport * from \"./components/signed-amount\";\nexport * from \"./components/error-boundary\";\nexport * from \"./components/copy-button\";\nexport { AuthedImage, DEFAULT_AUTHED_IMAGE_LABELS } from \"./components/authed-image\";\nexport type { AuthedImageProps, AuthedImageLabels } from \"./components/authed-image\";\nexport * from \"./components/image-grid\";\nexport * from \"./components/lightbox\";\nexport * from \"./components/button-group\";\nexport * from \"./components/table\";\nexport * from \"./components/separator\";\n// Named: scroll-area.tsx also holds the overflow hook and scrollbar class Table shares.\nexport { ScrollArea } from \"./components/scroll-area\";\nexport type { ScrollAreaProps } from \"./components/scroll-area\";\n// 0.10.0 rows, menu rows, text primitives and page chrome the apps drew by hand.\nexport * from \"./components/list\";\nexport * from \"./components/menu-item\";\nexport * from \"./components/text\";\nexport * from \"./components/status-dot\";\nexport * from \"./components/page-header\";\nexport * from \"./components/breadcrumbs\";\n// The one inline link (kastlan's EntityLink / CellLink / legal and source links), through\n// `<UiKitProvider linkComponent>`. Named: the file also holds the kit's internal link picker.\nexport { TextLink } from \"./components/text-link\";\nexport type {\n TextLinkProps,\n TextLinkRenderProps,\n TextLinkTone,\n TextLinkUnderline,\n TextLinkCurrent,\n} from \"./components/text-link\";\n// The toast layer over sonner (an OPTIONAL peer, loaded lazily): `toast` mirrors sonner's\n// API so apps migrate by swapping the import; `<Toaster>` carries the placement, theme,\n// tones and z-index both apps had wired by hand.\nexport { toast, Toaster, DEFAULT_TOAST_LABELS, TOAST_ACTION_DURATION } from \"./components/toast\";\nexport type {\n ToastId,\n ToastAction,\n ToastOptions,\n ToastPromiseOptions,\n ToastUndoOptions,\n ToastRedoOptions,\n ToastLabels,\n ToastPosition,\n ToastSwipeDirection,\n ToasterOffset,\n ToasterProps,\n} from \"./components/toast\";\n\n// ── data-table suite ─────────────────────────────────────────────────────────\nexport * from \"./components/data-table-labels\";\nexport * from \"./components/data-table-sort\";\nexport * from \"./components/data-table-filters\";\nexport * from \"./components/data-table-pagination\";\nexport { FilterPopover } from \"./components/data-table-filter-popover\";\n// data-table re-exports SortState internally; export the rest explicitly to\n// avoid a duplicate SortState star-export (it comes from data-table-sort).\nexport { DataTable } from \"./components/data-table\";\nexport type {\n DataTableColumn,\n DataTableCellProps,\n DataTableHeadProps,\n DataTableProps,\n ServerPagination,\n FilterState,\n MobileSwipeActions,\n DataTableDensity,\n DataTableChrome,\n DataTableRowAction,\n} from \"./components/data-table\";\n// 0.12.0: the yes/no cell, and a server table's state held by its owner, URL-synced.\nexport * from \"./components/data-table-cells\";\nexport { useTableUrlState, readTableUrlState } from \"./components/use-table-state\";\nexport type {\n TableUrlState,\n TableUrlSync,\n TableUrlStateProps,\n UseTableUrlStateOptions,\n UseTableUrlStateReturn,\n} from \"./components/use-table-state\";\n\n// ── shell (composable app chrome) ────────────────────────────────────────────\nexport * from \"./shell/topbar-controls\";\nexport * from \"./shell/top-bar\";\nexport * from \"./shell/app-shell\";\nexport * from \"./shell/option-switcher-menu\";\nexport * from \"./shell/role-switcher\";\nexport * from \"./shell/topbar-action-menu\";\nexport * from \"./shell/top-bar-brand\";\nexport * from \"./shell/auth-layout\";\n\n// ── feedback ─────────────────────────────────────────────────────────────────\n// The form somebody files a report with, and the parts an inbox is built from:\n// the status vocabulary both apps share value for value, the policy about what a\n// row may move to from where it stands, and the look of a status control, a\n// category badge and an opened report. The app still wires its own API, columns\n// and strings — see the note at the top of `feedback-inbox.tsx` for what is\n// deliberately left to it.\nexport * from \"./feedback/feedback-attachment\";\nexport * from \"./feedback/feedback-dialog\";\nexport * from \"./feedback/feedback-inbox\";\nexport * from \"./feedback/feedback-thread\";\n\n// ── multi-step wizard ────────────────────────────────────────────────────────\n// The engine (step machine, validators, collected data), the chrome around it\n// (indicator + nav bar + cancel confirm) and the review step it ends on.\n// `components/wizard-stepper` next door is a different, much smaller thing: a bare\n// step indicator for a two-step import flow, with no engine.\n//\n// Two modules were removed here rather than kept as stock. `wizard-field` held a\n// `WizardField`/`WizardSelectField` pair that had never been rendered in any app —\n// a field group nothing was built from, which this comment used to advertise. And\n// `use-rhf-wizard-step` was the only thing in the package that touched\n// react-hook-form, for a hook neither consumer called: keeping it meant an optional\n// peer, a dev dependency and a type import in every consumer's typecheck, bought\n// for nobody. A design system may carry stock; untested stock nothing has ever\n// rendered is not stock, it is a liability with an export.\nexport * from \"./wizard/types\";\nexport * from \"./wizard/use-wizard\";\nexport * from \"./wizard/wizard-context\";\nexport * from \"./wizard/validation\";\nexport * from \"./wizard/wizard-step\";\nexport * from \"./wizard/wizard-summary\";\nexport * from \"./wizard/stepper-nav\";\n\n// ── guided tours ─────────────────────────────────────────────────────────────\nexport * from \"./tour/tour\";\n\n// ── command palette / global search ──────────────────────────────────────────\nexport * from \"./search/command-palette\";\nexport * from \"./search/search-index\";\nexport * from \"./search/global-search\";\n\n// ── i18n: one label tree, one optional provider ──────────────────────────────\n// `UiKitLabels` names every string the kit renders; `<UiKitProvider labels locale>`\n// hands a translation to every component below it. Precedence: a component's own\n// prop > the provider > the English default. See src/i18n/kit-labels.tsx.\nexport * from \"./i18n/kit-labels\";\nexport * from \"./i18n/defaults\";\n"],"mappings":";AAMA,cAAc;AACd,SAAS,UAAU;AACnB,SAAS,QAAQ,mBAAmB;AAGpC,cAAc;AAEd,SAAS,YAAY,mBAAmB;AAIxC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;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AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,gBAAgB;AAGzB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,aAAa,mCAAmC;AAEzD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,kBAAkB;AAG3B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,SAAS,gBAAgB;AAWzB,SAAS,OAAO,SAAS,sBAAsB,6BAA6B;AAgB5E,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAc1B,cAAc;AACd,SAAS,kBAAkB,yBAAyB;AAUpD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AASd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAgBd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AAMd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The full-document navigations the kit makes, behind one object the tests can spy on.
|
|
3
|
+
*
|
|
4
|
+
* jsdom implements neither `location.reload` nor `location.replace`, and its
|
|
5
|
+
* `window.location` is unforgeable: a test cannot stub it by redefining the property
|
|
6
|
+
* once the suite runs each file in its own VM context (`pool: "vmThreads"`, which took
|
|
7
|
+
* the suite from ~3 minutes to ~1). `vi.spyOn(documentNavigation, "reload")` works in
|
|
8
|
+
* every pool. Internal, not part of the package's surface.
|
|
9
|
+
*/
|
|
10
|
+
declare const documentNavigation: {
|
|
11
|
+
reload(): void;
|
|
12
|
+
replace(href: string): void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { documentNavigation };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/document-navigation.ts"],"sourcesContent":["/**\n * The full-document navigations the kit makes, behind one object the tests can spy on.\n *\n * jsdom implements neither `location.reload` nor `location.replace`, and its\n * `window.location` is unforgeable: a test cannot stub it by redefining the property\n * once the suite runs each file in its own VM context (`pool: \"vmThreads\"`, which took\n * the suite from ~3 minutes to ~1). `vi.spyOn(documentNavigation, \"reload\")` works in\n * every pool. Internal, not part of the package's surface.\n */\nexport const documentNavigation = {\n reload(): void {\n window.location.reload();\n },\n replace(href: string): void {\n window.location.replace(href);\n },\n};\n"],"mappings":";AASO,MAAM,qBAAqB;AAAA,EAChC,SAAe;AACb,WAAO,SAAS,OAAO;AAAA,EACzB;AAAA,EACA,QAAQ,MAAoB;AAC1B,WAAO,SAAS,QAAQ,IAAI;AAAA,EAC9B;AACF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eifi1/ui-kit",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "App-agnostic shared design system: domain-free React components, theme and tokens.",
|
|
6
6
|
"_sideEffects": "The barrel (src/index.ts) re-exports EVERY component, including components/chart, which statically imports recharts. Without this field a bundler must assume each of those modules has side effects, so it cannot drop the unused ones: importing a Button from '@eifi1/ui-kit' dragged all 433KB of recharts into the consumer's ENTRY chunk, and Keksdose was preloading it on every page load, login included. Nothing in src/ imports for side effects (no bare imports, no CSS imports from JS, no module-level global writes) — the token stylesheet is its own './tokens.css' export — so this is safe. CSS is still listed so any future stylesheet survives. Re-checked when `flag-icons` left `dependencies` and tsup started emitting a `\"use client\"` banner: neither touches this. The flag stylesheet was never imported from JS in the first place (that was the finding), and a directive prologue is a string literal every bundler lifts out before it decides whether a module is inert.",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"LICENSE"
|
|
69
69
|
],
|
|
70
70
|
"scripts": {
|
|
71
|
-
"typecheck": "tsc --noEmit && tsc -p tsconfig.node.json",
|
|
72
|
-
"lint": "eslint . --max-warnings 0",
|
|
71
|
+
"typecheck": "tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/app.tsbuildinfo && tsc -p tsconfig.node.json --incremental --tsBuildInfoFile node_modules/.cache/tsc/node.tsbuildinfo",
|
|
72
|
+
"lint": "eslint . --max-warnings 0 --cache --cache-location node_modules/.cache/eslint/",
|
|
73
73
|
"check:tokens": "node scripts/check-token-discipline.mjs",
|
|
74
74
|
"test:coverage": "vitest run --coverage",
|
|
75
75
|
"check:graph": "node scripts/check-module-graph.mjs",
|
|
@@ -77,7 +77,10 @@
|
|
|
77
77
|
"check:tailwind": "node scripts/check-tailwind-scan.mjs",
|
|
78
78
|
"check:security": "npm audit --audit-level=high",
|
|
79
79
|
"check:commits": "node scripts/check-commit-range.cjs",
|
|
80
|
-
"check": "npm run typecheck && npm run lint && npm run check:tokens && npm run
|
|
80
|
+
"check:static": "npm run typecheck && npm run lint && npm run check:tokens && npm run check:security && npm run check:commits",
|
|
81
|
+
"check:test": "npm run test:coverage",
|
|
82
|
+
"check:build": "npm run build && npm run check:graph && npm run check:package && npm run build:showcase && npm run check:tailwind",
|
|
83
|
+
"check": "node scripts/check.mjs",
|
|
81
84
|
"test": "vitest run",
|
|
82
85
|
"test:watch": "vitest",
|
|
83
86
|
"build": "node scripts/tsup-quiet.mjs && node scripts/fix-esm-extensions.mjs",
|
|
@@ -172,6 +172,14 @@ interface AmountInputProps {
|
|
|
172
172
|
/** The largest amount the field settles on (a deposit release capped at the
|
|
173
173
|
* balance). A higher figure is lowered to it when it settles. */
|
|
174
174
|
max?: number;
|
|
175
|
+
/**
|
|
176
|
+
* The SETTLED figure, dot-decimal, sign included — fired on blur, on Enter, on the
|
|
177
|
+
* numpad's "=" and on every result the calculator writes back, never on a keystroke
|
|
178
|
+
* ("1200+" is not a figure yet). `onChange` still reports every keystroke; this is
|
|
179
|
+
* for a host that stores a number and must not see drafts (kastlan 52; see
|
|
180
|
+
* {@link MoneyField}, which is built on it).
|
|
181
|
+
*/
|
|
182
|
+
onCommit?: (value: string) => void;
|
|
175
183
|
}
|
|
176
184
|
|
|
177
185
|
/** The currency's minor unit (CHF 2, JPY 0), or `undefined` for no currency or a code
|
|
@@ -295,7 +303,7 @@ function isResultOf(previous: string, text: string, settle: (text: string) => st
|
|
|
295
303
|
}
|
|
296
304
|
|
|
297
305
|
export const AmountInput = forwardRef<HTMLInputElement, AmountInputProps>(
|
|
298
|
-
({ value, onChange, currency, onCurrencyChange, placeholder, label, disabled, invalid: invalidProp, className, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, autoFocus, tone = "neutral", negative = false, onNegativeChange, variant = "field", align = "start", labels, currencyNames, digits: digitsProp, min, max }, ref) => {
|
|
306
|
+
({ value, onChange, currency, onCurrencyChange, placeholder, label, disabled, invalid: invalidProp, className, id, ariaLabel, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, autoFocus, tone = "neutral", negative = false, onNegativeChange, variant = "field", align = "start", labels, currencyNames, digits: digitsProp, min, max, onCommit }, ref) => {
|
|
299
307
|
const generatedId = useId();
|
|
300
308
|
const fieldId = id ?? generatedId;
|
|
301
309
|
const invalid = Boolean(invalidProp) || ariaInvalid === true || ariaInvalid === "true";
|
|
@@ -399,7 +407,9 @@ export const AmountInput = forwardRef<HTMLInputElement, AmountInputProps>(
|
|
|
399
407
|
};
|
|
400
408
|
const commit = () => {
|
|
401
409
|
setDraft(null);
|
|
402
|
-
|
|
410
|
+
const settled = settle(commitExpression(shown));
|
|
411
|
+
handleText(settled);
|
|
412
|
+
onCommit?.(settled);
|
|
403
413
|
};
|
|
404
414
|
const typed = (raw: string) => {
|
|
405
415
|
setDraft(raw);
|
|
@@ -533,7 +543,9 @@ export const AmountInput = forwardRef<HTMLInputElement, AmountInputProps>(
|
|
|
533
543
|
value={display}
|
|
534
544
|
onChange={(result, expression) => {
|
|
535
545
|
setDraft(null);
|
|
536
|
-
|
|
546
|
+
const settled = settle(result);
|
|
547
|
+
handleText(settled, expression);
|
|
548
|
+
onCommit?.(settled);
|
|
537
549
|
}}
|
|
538
550
|
className="px-1.5"
|
|
539
551
|
ariaLabel={labels?.calculatorTrigger}
|
|
@@ -622,7 +634,9 @@ export const AmountInput = forwardRef<HTMLInputElement, AmountInputProps>(
|
|
|
622
634
|
onChange={typed}
|
|
623
635
|
onResult={(result) => {
|
|
624
636
|
setDraft(null);
|
|
625
|
-
|
|
637
|
+
const settled = settle(result);
|
|
638
|
+
handleText(settled);
|
|
639
|
+
onCommit?.(settled);
|
|
626
640
|
}}
|
|
627
641
|
onDone={() => innerRef.current?.blur()}
|
|
628
642
|
label={label}
|
|
@@ -5,6 +5,7 @@ import { useKitLabels } from "../i18n/kit-labels";
|
|
|
5
5
|
import { Button, EmptyState } from "./ui";
|
|
6
6
|
import { CopyButton } from "./copy-button";
|
|
7
7
|
import { Disclosure } from "./disclosure";
|
|
8
|
+
import { documentNavigation } from "../lib/document-navigation";
|
|
8
9
|
|
|
9
10
|
/** The words of the default fallback. */
|
|
10
11
|
export interface ErrorBoundaryLabels {
|
|
@@ -277,7 +278,7 @@ function isOffline(): boolean {
|
|
|
277
278
|
|
|
278
279
|
function reloadPage(): void {
|
|
279
280
|
try {
|
|
280
|
-
|
|
281
|
+
documentNavigation.reload();
|
|
281
282
|
} catch {
|
|
282
283
|
/* nothing left to do from here */
|
|
283
284
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useState, type ComponentProps, type Ref } from "react";
|
|
2
|
+
import { AmountInput } from "./amount-input";
|
|
3
|
+
|
|
4
|
+
type AmountInputProps = ComponentProps<typeof AmountInput>;
|
|
5
|
+
|
|
6
|
+
export interface MoneyFieldProps
|
|
7
|
+
extends Omit<AmountInputProps, "value" | "onChange" | "onCommit" | "negative" | "onNegativeChange" | "ref"> {
|
|
8
|
+
/** The amount, or `null` for an empty field. */
|
|
9
|
+
value: number | null;
|
|
10
|
+
/**
|
|
11
|
+
* The settled amount — on blur, on Enter, on the numpad's "=" and on a calculator
|
|
12
|
+
* result; never a half-typed "1200+". Rounded to the currency's minor unit (or
|
|
13
|
+
* `digits`) and clamped to `min` / `max`, like {@link AmountInput}. `null` when the
|
|
14
|
+
* field was emptied. Not fired when the settled amount equals `value`, so an
|
|
15
|
+
* Enter-then-blur saves once.
|
|
16
|
+
*/
|
|
17
|
+
onCommit: (value: number | null) => void;
|
|
18
|
+
ref?: Ref<HTMLInputElement>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The number a settled text reads as: `null` for empty, `undefined` for no number
|
|
22
|
+
* (a lone "-" or "."). */
|
|
23
|
+
function parseSettled(text: string): number | null | undefined {
|
|
24
|
+
const t = text.trim();
|
|
25
|
+
if (t === "") return null;
|
|
26
|
+
const n = Number(t);
|
|
27
|
+
return Number.isFinite(n) ? n : undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* {@link AmountInput} with a NUMBER in and a number out, for money edited outside a
|
|
32
|
+
* form — a budget row, a table cell (kastlan 52: new-budget-page edited a CHF amount per
|
|
33
|
+
* row with `NumberField` because AmountInput is string-valued and reports every
|
|
34
|
+
* keystroke, "1200+" included, so a number-state row needed its own parse-and-settle
|
|
35
|
+
* glue). This is that glue, the same one `RhfMoneyField` has: the text being typed
|
|
36
|
+
* lives here, and only a settled figure reaches `onCommit`.
|
|
37
|
+
*
|
|
38
|
+
* The currency chip, the calculator, the numpad, the locale's decimal mark, the
|
|
39
|
+
* rounding to the currency's minor unit and `min` / `max` are AmountInput's. A caller-
|
|
40
|
+
* owned sign (`negative`) is not offered: the figure here carries its own minus.
|
|
41
|
+
*
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <MoneyField ariaLabel="Amount" currency="CHF" value={row.amount}
|
|
44
|
+
* onCommit={(amount) => updateRow(row.id, { amount })} />
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export function MoneyField({ value, onCommit, ref, ...props }: MoneyFieldProps) {
|
|
48
|
+
const external = value === null ? "" : String(value);
|
|
49
|
+
// The draft is re-read from `value` only when `value` moves away from what the draft
|
|
50
|
+
// already says (a reset, another row's save), so a commit's own echo keeps the
|
|
51
|
+
// typist's spelling ("12.50" stays "12.50" when 12.5 comes back).
|
|
52
|
+
const [draft, setDraft] = useState(external);
|
|
53
|
+
const [seen, setSeen] = useState(value);
|
|
54
|
+
if (seen !== value) {
|
|
55
|
+
setSeen(value);
|
|
56
|
+
if (parseSettled(draft) !== value) setDraft(external);
|
|
57
|
+
}
|
|
58
|
+
return (
|
|
59
|
+
<AmountInput
|
|
60
|
+
{...props}
|
|
61
|
+
ref={ref}
|
|
62
|
+
value={draft}
|
|
63
|
+
onChange={setDraft}
|
|
64
|
+
onCommit={(text) => {
|
|
65
|
+
const next = parseSettled(text);
|
|
66
|
+
// No number ("-" alone): back to the stored amount rather than a guess.
|
|
67
|
+
if (next === undefined) {
|
|
68
|
+
setDraft(external);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (next !== value) onCommit(next);
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -304,3 +304,17 @@ export function NumberField({
|
|
|
304
304
|
</div>
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* A {@link NumberField} for whole numbers: `digits={0}` and `calculator={false}` as
|
|
310
|
+
* defaults, each overridable — the preset `RhfIntegerField` (`@eifi1/ui-kit/rhf`) applies to a
|
|
311
|
+
* form-bound field, for the plain one (kastlan 51: a building's construction year in a
|
|
312
|
+
* wizard's local state, an entity id in the document upload spelled the two props out
|
|
313
|
+
* by hand).
|
|
314
|
+
*
|
|
315
|
+
* `??` rather than a spread over the defaults, so a wrapper forwarding its own optional
|
|
316
|
+
* `digits={props.digits}` still gets the preset.
|
|
317
|
+
*/
|
|
318
|
+
export function IntegerField(props: NumberFieldProps) {
|
|
319
|
+
return <NumberField {...props} digits={props.digits ?? 0} calculator={props.calculator ?? false} />;
|
|
320
|
+
}
|