@eifi1/ui-kit 0.9.0 → 0.11.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 +37 -23
- package/dist/components/alert-banner.d.ts +57 -5
- package/dist/components/alert-banner.js +63 -17
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +6 -0
- package/dist/components/breadcrumbs.d.ts +60 -0
- package/dist/components/breadcrumbs.js +88 -0
- package/dist/components/breadcrumbs.js.map +1 -0
- package/dist/components/bulk-action-bar.d.ts +112 -0
- package/dist/components/bulk-action-bar.js +196 -0
- package/dist/components/bulk-action-bar.js.map +1 -0
- package/dist/components/button-group.d.ts +58 -3
- package/dist/components/button-group.js +56 -5
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/calculator.d.ts +6 -0
- package/dist/components/calendar-heatmap.d.ts +124 -0
- package/dist/components/calendar-heatmap.js +295 -0
- package/dist/components/calendar-heatmap.js.map +1 -0
- package/dist/components/chip.d.ts +31 -5
- package/dist/components/chip.js +85 -5
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.d.ts +34 -2
- package/dist/components/choice-card.js +49 -0
- package/dist/components/choice-card.js.map +1 -1
- package/dist/components/copy-button.d.ts +14 -4
- package/dist/components/copy-button.js +17 -4
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/data-table.js +2 -0
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.d.ts +22 -2
- package/dist/components/date-picker.js +11 -3
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/description-list.d.ts +43 -6
- package/dist/components/description-list.js +91 -11
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog-frame.d.ts +7 -0
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/disclosure.d.ts +57 -2
- package/dist/components/disclosure.js +24 -12
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/field.d.ts +43 -0
- package/dist/components/field.js +52 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/file-button.d.ts +1 -0
- package/dist/components/file-dropzone.d.ts +4 -4
- package/dist/components/file-dropzone.js +2 -1
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/floating-panel.d.ts +147 -4
- package/dist/components/floating-panel.js +188 -28
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/full-bleed-dialog.d.ts +23 -4
- package/dist/components/full-bleed-dialog.js +11 -2
- package/dist/components/full-bleed-dialog.js.map +1 -1
- package/dist/components/list.d.ts +187 -0
- package/dist/components/list.js +221 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/menu-item.d.ts +109 -0
- package/dist/components/menu-item.js +88 -0
- package/dist/components/menu-item.js.map +1 -0
- package/dist/components/mini-calendar.d.ts +70 -5
- package/dist/components/mini-calendar.js +166 -62
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.d.ts +23 -1
- package/dist/components/modal.js +36 -10
- package/dist/components/modal.js.map +1 -1
- package/dist/components/nav-pills.d.ts +66 -0
- package/dist/components/nav-pills.js +65 -0
- package/dist/components/nav-pills.js.map +1 -0
- package/dist/components/number-field.d.ts +6 -0
- package/dist/components/number-input.d.ts +6 -0
- package/dist/components/numpad-sheet.d.ts +6 -0
- package/dist/components/page-contents.js +1 -2
- package/dist/components/page-contents.js.map +1 -1
- package/dist/components/page-header.d.ts +37 -0
- package/dist/components/page-header.js +36 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/progress-bar.d.ts +31 -2
- package/dist/components/progress-bar.js +73 -7
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/series-chart-labels.d.ts +3 -0
- package/dist/components/series-chart-labels.js +2 -1
- package/dist/components/series-chart-labels.js.map +1 -1
- package/dist/components/series-chart.d.ts +32 -0
- package/dist/components/series-chart.js +141 -4
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/settings-fields.d.ts +1 -0
- package/dist/components/status-dot.d.ts +53 -0
- package/dist/components/status-dot.js +57 -0
- package/dist/components/status-dot.js.map +1 -0
- package/dist/components/table.d.ts +78 -13
- package/dist/components/table.js +84 -11
- package/dist/components/table.js.map +1 -1
- package/dist/components/text.d.ts +70 -0
- package/dist/components/text.js +24 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/time-input.d.ts +1 -0
- package/dist/components/toast.d.ts +167 -0
- package/dist/components/toast.js +226 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/toggle-group.d.ts +44 -1
- package/dist/components/toggle-group.js +73 -4
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/tooltip.d.ts +46 -15
- package/dist/components/tooltip.js +87 -47
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/ui.d.ts +158 -7
- package/dist/components/ui.js +191 -10
- package/dist/components/ui.js.map +1 -1
- package/dist/components/user-avatar.d.ts +25 -3
- package/dist/components/user-avatar.js +32 -3
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/hooks/use-close-transition.d.ts +7 -1
- package/dist/hooks/use-close-transition.js +5 -2
- package/dist/hooks/use-close-transition.js.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.js +1 -1
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -1
- package/dist/hooks/use-file-drop.d.ts +1 -0
- package/dist/i18n/defaults.d.ts +6 -0
- package/dist/i18n/defaults.js +11 -1
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +11 -0
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/de-CH-informal.d.ts +6 -0
- package/dist/i18n/locales/de-CH.d.ts +6 -0
- package/dist/i18n/locales/de-informal.d.ts +6 -0
- package/dist/i18n/locales/de.d.ts +6 -0
- package/dist/i18n/locales/de.js +30 -2
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +6 -0
- package/dist/i18n/locales/es.js +30 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +6 -0
- package/dist/i18n/locales/fr.js +30 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +6 -0
- package/dist/i18n/locales/hu.js +30 -2
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +6 -0
- package/dist/i18n/locales/it.js +30 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +6 -0
- package/dist/i18n/locales/zh.js +30 -2
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.d.ts +27 -15
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/clipping.d.ts +25 -0
- package/dist/lib/clipping.js +17 -0
- package/dist/lib/clipping.js.map +1 -0
- package/dist/lib/dates.d.ts +17 -1
- package/dist/lib/dates.js +19 -0
- package/dist/lib/dates.js.map +1 -1
- package/dist/rhf/form.d.ts +1 -0
- package/dist/rhf/use-rhf-wizard-step.d.ts +22 -0
- package/dist/rhf/use-rhf-wizard-step.js +38 -0
- package/dist/rhf/use-rhf-wizard-step.js.map +1 -0
- package/dist/rhf.d.ts +2 -0
- package/dist/rhf.js +1 -0
- package/dist/rhf.js.map +1 -1
- package/dist/search/command-palette.d.ts +19 -2
- package/dist/search/command-palette.js +16 -5
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search.d.ts +26 -1
- package/dist/search/global-search.js +29 -13
- package/dist/search/global-search.js.map +1 -1
- package/dist/search.d.ts +1 -1
- package/dist/shell/topbar-action-menu.d.ts +73 -3
- package/dist/shell/topbar-action-menu.js +100 -27
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell.d.ts +2 -1
- package/dist/wizard/stepper-nav.d.ts +1 -0
- package/dist/wizard/stepper-nav.js +1 -1
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.d.ts +2 -2
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.js +1 -1
- package/dist/wizard/use-wizard.js.map +1 -1
- package/dist/wizard/wizard-context.d.ts +7 -1
- package/dist/wizard/wizard-context.js +4 -0
- package/dist/wizard/wizard-context.js.map +1 -1
- package/dist/wizard/wizard-summary.js +3 -3
- package/dist/wizard/wizard-summary.js.map +1 -1
- package/dist/wizard.d.ts +2 -1
- package/package.json +16 -12
- package/src/components/alert-banner.tsx +149 -21
- package/src/components/breadcrumbs.tsx +168 -0
- package/src/components/bulk-action-bar.tsx +362 -0
- package/src/components/button-group.tsx +124 -4
- package/src/components/calendar-heatmap.tsx +504 -0
- package/src/components/chip.tsx +128 -7
- package/src/components/choice-card.tsx +97 -1
- package/src/components/copy-button.tsx +29 -7
- package/src/components/data-table.tsx +7 -0
- package/src/components/date-picker.tsx +49 -1
- package/src/components/description-list.tsx +168 -15
- package/src/components/dialog-frame.tsx +7 -0
- package/src/components/disclosure.tsx +93 -21
- package/src/components/field.tsx +137 -0
- package/src/components/file-dropzone.tsx +9 -10
- package/src/components/floating-panel.tsx +366 -15
- package/src/components/full-bleed-dialog.tsx +42 -5
- package/src/components/list.tsx +443 -0
- package/src/components/menu-item.tsx +235 -0
- package/src/components/mini-calendar.tsx +245 -54
- package/src/components/modal.tsx +80 -17
- package/src/components/nav-pills.tsx +145 -0
- package/src/components/page-contents.tsx +4 -4
- package/src/components/page-header.tsx +68 -0
- package/src/components/progress-bar.tsx +129 -11
- package/src/components/series-chart-labels.ts +4 -0
- package/src/components/series-chart.tsx +274 -3
- package/src/components/status-dot.tsx +107 -0
- package/src/components/table.tsx +176 -17
- package/src/components/text.tsx +97 -0
- package/src/components/toast.tsx +441 -0
- package/src/components/toggle-group.tsx +128 -4
- package/src/components/tooltip.tsx +200 -100
- package/src/components/ui.tsx +381 -14
- package/src/components/user-avatar.tsx +57 -3
- package/src/hooks/use-close-transition.ts +14 -5
- package/src/hooks/use-copy-to-clipboard.ts +1 -1
- package/src/i18n/defaults.ts +10 -0
- package/src/i18n/kit-labels.tsx +10 -0
- package/src/i18n/locales/de.ts +29 -0
- package/src/i18n/locales/es.ts +29 -0
- package/src/i18n/locales/fr.ts +29 -0
- package/src/i18n/locales/hu.ts +29 -0
- package/src/i18n/locales/it.ts +29 -0
- package/src/i18n/locales/zh.ts +29 -0
- package/src/index.ts +31 -0
- package/src/lib/clipping.ts +34 -0
- package/src/lib/dates.ts +37 -0
- package/src/rhf/use-rhf-wizard-step.ts +113 -0
- package/src/rhf.ts +2 -0
- package/src/search/command-palette.tsx +42 -5
- package/src/search/global-search.tsx +59 -18
- package/src/shell/topbar-action-menu.tsx +239 -49
- package/src/wizard/stepper-nav.tsx +2 -1
- package/src/wizard/types.ts +2 -2
- package/src/wizard/use-wizard.ts +3 -3
- package/src/wizard/wizard-context.tsx +9 -0
- package/src/wizard/wizard-summary.tsx +14 -10
- package/tokens.css +97 -0
package/dist/i18n/locales/zh.js
CHANGED
|
@@ -108,6 +108,13 @@ function uiKitLabelsZh(numberLocale = "zh-CN") {
|
|
|
108
108
|
panel: "\u9009\u62E9\u6708\u4EFD",
|
|
109
109
|
month: (monthYear) => monthYear
|
|
110
110
|
},
|
|
111
|
+
calendarHeatmap: {
|
|
112
|
+
grid: "\u6BCF\u65E5\u6570\u503C",
|
|
113
|
+
day: (date, value) => `${date}\uFF1A${value}`,
|
|
114
|
+
less: "\u8F83\u5C11",
|
|
115
|
+
more: "\u8F83\u591A",
|
|
116
|
+
truncated: (count) => `\u4EC5\u663E\u793A\u6700\u8FD1\u7684\u65E5\u671F\uFF1B\u53E6\u6709 ${n(count)} \u5929\u672A\u663E\u793A\u3002`
|
|
117
|
+
},
|
|
111
118
|
datePicker: {
|
|
112
119
|
apply: "\u5E94\u7528",
|
|
113
120
|
cancel: "\u53D6\u6D88",
|
|
@@ -219,6 +226,11 @@ function uiKitLabelsZh(numberLocale = "zh-CN") {
|
|
|
219
226
|
dialogFrame: {
|
|
220
227
|
close: "\u5173\u95ED"
|
|
221
228
|
},
|
|
229
|
+
bulkActionBar: {
|
|
230
|
+
selected: (count) => `\u5DF2\u9009\u62E9 ${n(count)} \u9879`,
|
|
231
|
+
clear: "\u6E05\u9664\u9009\u62E9",
|
|
232
|
+
cleared: "\u5DF2\u6E05\u9664\u9009\u62E9"
|
|
233
|
+
},
|
|
222
234
|
swipeableRow: {
|
|
223
235
|
actions: "\u884C\u64CD\u4F5C"
|
|
224
236
|
},
|
|
@@ -347,14 +359,16 @@ function uiKitLabelsZh(numberLocale = "zh-CN") {
|
|
|
347
359
|
resetZoom: "\u91CD\u7F6E\u7F29\u653E",
|
|
348
360
|
zoomHint: "\u62D6\u52A8\u4EE5\u7F29\u653E\uFF1A\u8FD1\u4F3C\u6B63\u65B9\u5F62\u7684\u9009\u533A\u540C\u65F6\u7F29\u653E\u4E24\u6761\u5750\u6807\u8F74\uFF0C\u7EC6\u957F\u7684\u9009\u533A\u53EA\u7F29\u653E\u5176\u6240\u6CBF\u7684\u90A3\u6761\u8F74\u3002\u53CC\u51FB\u53EF\u91CD\u7F6E\u3002",
|
|
349
361
|
empty: "\u65E0\u6570\u636E",
|
|
350
|
-
legend: "\u6570\u636E\u7CFB\u5217"
|
|
362
|
+
legend: "\u6570\u636E\u7CFB\u5217",
|
|
363
|
+
points: "\u56FE\u8868\u6570\u503C"
|
|
351
364
|
},
|
|
352
365
|
confirmDialog: {
|
|
353
366
|
confirm: "\u786E\u8BA4",
|
|
354
367
|
cancel: "\u53D6\u6D88"
|
|
355
368
|
},
|
|
356
369
|
floatingPanel: {
|
|
357
|
-
close: "\u5173\u95ED"
|
|
370
|
+
close: "\u5173\u95ED",
|
|
371
|
+
badge: (count) => `${n(count)} \u6761\u65B0\u5185\u5BB9`
|
|
358
372
|
},
|
|
359
373
|
copyButton: {
|
|
360
374
|
copy: "\u590D\u5236",
|
|
@@ -362,6 +376,20 @@ function uiKitLabelsZh(numberLocale = "zh-CN") {
|
|
|
362
376
|
failed: "\u590D\u5236\u5931\u8D25",
|
|
363
377
|
copiedAnnouncement: "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",
|
|
364
378
|
failedAnnouncement: "\u65E0\u6CD5\u590D\u5236\u5230\u526A\u8D34\u677F"
|
|
379
|
+
},
|
|
380
|
+
list: {
|
|
381
|
+
unread: "\u672A\u8BFB",
|
|
382
|
+
opensInNewTab: "\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00"
|
|
383
|
+
},
|
|
384
|
+
breadcrumbs: {
|
|
385
|
+
label: "\u9762\u5305\u5C51\u5BFC\u822A",
|
|
386
|
+
showAll: "\u663E\u793A\u5B8C\u6574\u8DEF\u5F84"
|
|
387
|
+
},
|
|
388
|
+
toast: {
|
|
389
|
+
close: "\u5173\u95ED\u901A\u77E5",
|
|
390
|
+
notifications: "\u901A\u77E5",
|
|
391
|
+
undo: "\u64A4\u9500",
|
|
392
|
+
redo: "\u91CD\u505A"
|
|
365
393
|
}
|
|
366
394
|
};
|
|
367
395
|
}
|
|
@@ -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 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 },\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 },\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 },\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 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 },\n confirmDialog: {\n confirm: \"确认\",\n cancel: \"取消\",\n },\n floatingPanel: {\n close: \"关闭\",\n },\n copyButton: {\n copy: \"复制\",\n copied: \"已复制\",\n failed: \"复制失败\",\n copiedAnnouncement: \"已复制到剪贴板\",\n failedAnnouncement: \"无法复制到剪贴板\",\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,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,WAAW,CAAC,QAAQ,sBAAO,GAAG;AAAA,MAC9B,OAAO;AAAA,MACP,WAAW;AAAA,MACX,MAAM,CAAC,QAAQ,QAAQ,GAAG,MAAM,gBAAM,GAAG;AAAA,MACzC,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,cACE;AAAA,MACF,WAAW,CAAC,SAAS,kCAAS,IAAI;AAAA,MAClC,QAAQ,CAAC,UAAU,GAAG,KAAK;AAAA,MAC3B,UAAU,CAAC,UAAU,GAAG,KAAK;AAAA,IAC/B;AAAA,IACA,cAAc,EAAE,OAAO,2BAAO;AAAA,IAC9B,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,OAAO;AAAA,MACP,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,WAAW;AAAA;AAAA,MAEX,YAAY,CAAC,OAAO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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 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 },\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 },\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 },\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 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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,MACV,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,oBAAoB;AAAA,MACpB,oBAAoB;AAAA,IACtB;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,MACR,eAAe;AAAA,IACjB;AAAA,IACA,aAAa;AAAA,MACX,OAAO;AAAA,MACP,SAAS;AAAA,IACX;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,MACP,eAAe;AAAA,MACf,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,MAAM,mBAAgC,cAAc;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export { AnchorRole, ChartRampReport, ContrastCheck, ContrastReport, DeriveOptio
|
|
|
20
20
|
export { ALTERNATIVE_PRESETS, DEFAULT_PRESET, DERIVED_PRESETS, IMPRINT_PRESET, PALETTES, PalettePreset, TokenSet, applyTokenSet, presetById } from './theme/palette-presets.js';
|
|
21
21
|
export { ThemeMode, ThemePreference, ThemeState, ThemeStore, applyPersistedTheme, createThemeStore } from './theme/theme-store.js';
|
|
22
22
|
export { PaletteStore, applyPersistedPalette, createPaletteStore } from './theme/palette-store.js';
|
|
23
|
-
export { Button, ButtonClassesOptions, ButtonProps, ButtonSize, ButtonVariant, Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, DEFAULT_PASSWORD_REVEAL_LABELS, DEFAULT_TABS_LABELS, EmptyState, EmptyStateProps, FIELD_BASE, FIELD_DISPLAY, FIELD_FLOATING_PAD, FIELD_INVALID, FIELD_TRIGGER, FIELD_WRITABLE_LOOK, FLOATING_INPUT_CLASS, FLOATING_LABEL_CLASS, FLOATING_LABEL_STATIC, FieldChevron, FieldChevronProps, FieldHint, FieldHintProps, FieldLabel, FieldLabelProps, FloatingField, FloatingFieldProps, IconButton, IconButtonProps, IconButtonSize, IconButtonTone, Input, InputProps, Label, LabelProps, PHONE_QUERY, PasswordRevealLabels, Select, SelectProps, Spinner, SpinnerProps, TabItem, Tabs, TabsLabels, TabsProps, Textarea, TextareaProps, buttonClasses, resolvePasswordRevealLabels } from './components/ui.js';
|
|
23
|
+
export { Button, ButtonClassesOptions, ButtonProps, ButtonSize, ButtonTone, ButtonVariant, Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, DEFAULT_PASSWORD_REVEAL_LABELS, DEFAULT_TABS_LABELS, EmptyState, EmptyStateProps, FIELD_BASE, FIELD_DISPLAY, FIELD_FLOATING_PAD, FIELD_INVALID, FIELD_TRIGGER, FIELD_WRITABLE_LOOK, FLOATING_INPUT_CLASS, FLOATING_LABEL_CLASS, FLOATING_LABEL_STATIC, FieldChevron, FieldChevronProps, FieldHint, FieldHintProps, FieldLabel, FieldLabelProps, FloatingField, FloatingFieldProps, IconButton, IconButtonProps, IconButtonSize, IconButtonTone, Input, InputProps, Label, LabelProps, PHONE_QUERY, PasswordRevealLabels, Select, SelectProps, Spinner, SpinnerProps, TabItem, Tabs, TabsLabels, TabsProps, Textarea, TextareaProps, buttonClasses, resolvePasswordRevealLabels } from './components/ui.js';
|
|
24
|
+
export { Field, FieldControlProps, FieldProps } from './components/field.js';
|
|
24
25
|
export { SearchField, SearchFieldProps } from './components/search-field.js';
|
|
25
26
|
export { DropdownPanel, DropdownPanelProps, DropdownSearchHeader, DropdownSearchHeaderProps, useDropdown, useDropdownSearch } from './components/dropdown.js';
|
|
26
27
|
export { DEFAULT_POPOVER_LABELS, Popover, PopoverLabels, PopoverProps } from './components/popover.js';
|
|
@@ -36,7 +37,7 @@ export { EntityCombobox, EntityComboboxProps } from './components/entity-combobo
|
|
|
36
37
|
export { MultiEntityCombobox, MultiEntityComboboxProps } from './components/multi-entity-combobox.js';
|
|
37
38
|
export { MultiSelect, MultiSelectOption, MultiSelectProps } from './components/multi-select.js';
|
|
38
39
|
export { Tooltip, TooltipPlacement, TooltipProps, TooltipSide, TooltipSize, TooltipViewport, placeTooltip } from './components/tooltip.js';
|
|
39
|
-
export { UserAvatar, UserAvatarProps, avatarInitials } from './components/user-avatar.js';
|
|
40
|
+
export { UserAvatar, UserAvatarBadge, UserAvatarProps, avatarInitials } from './components/user-avatar.js';
|
|
40
41
|
export { LanguageSetting, LanguageSettingProps, ThemeSetting, ThemeSettingProps } from './components/settings-fields.js';
|
|
41
42
|
export { DEFAULT_FIELD_SYNC_LABELS, FIELD_SYNC_FRAME, FIELD_SYNC_SAVED_MS, FieldSyncIndicator, FieldSyncIndicatorProps, FieldSyncLabels, FieldSyncRow, FieldSyncRowProps, FieldSyncState, UseFieldSyncOptions, UseFieldSyncReturn, resolveFieldSyncLabels, useFieldSync } from './components/field-sync.js';
|
|
42
43
|
export { DEFAULT_MONTH_PICKER_LABELS, MonthPicker, MonthPickerLabels, MonthPickerProps } from './components/month-picker.js';
|
|
@@ -54,10 +55,11 @@ export { Collapse, CollapseProps, Disclosure, DisclosureProps, DisclosureTrigger
|
|
|
54
55
|
export { DEFAULT_DIALOG_FRAME_LABELS, DialogFrame, DialogFrameLabels, DialogFrameProps } from './components/dialog-frame.js';
|
|
55
56
|
export { DEFAULT_DANGER_CONFIRM_LABELS, DangerConfirm, DangerConfirmLabels, DangerConfirmProps } from './components/danger-confirm.js';
|
|
56
57
|
export { ConfirmDialogLabels, ConfirmFn, ConfirmOptions, ConfirmProvider, ConfirmProviderProps, ConfirmTone, DEFAULT_CONFIRM_DIALOG_LABELS, useConfirm } from './components/confirm-dialog.js';
|
|
57
|
-
export { DEFAULT_FLOATING_PANEL_LABELS, FloatingActionButton, FloatingActionButtonProps, FloatingCorner, FloatingPanel, FloatingPanelLabels, FloatingPanelProps } from './components/floating-panel.js';
|
|
58
|
+
export { DEFAULT_FLOATING_PANEL_LABELS, FloatingAction, FloatingActionButton, FloatingActionButtonProps, FloatingActionGroup, FloatingActionGroupProps, FloatingActionLinkProps, FloatingActionProps, FloatingCorner, FloatingPanel, FloatingPanelLabels, FloatingPanelProps } from './components/floating-panel.js';
|
|
59
|
+
export { BulkActionBar, BulkActionBarLabels, BulkActionBarProps, BulkActionBarVariant, DEFAULT_BULK_ACTION_BAR_LABELS, ResponsiveBulkActionBarVariant } from './components/bulk-action-bar.js';
|
|
58
60
|
export { DEFAULT_SWATCH_PICKER_LABELS, SwatchOption, SwatchPicker, SwatchPickerLabels, SwatchPickerProps } from './components/swatch-picker.js';
|
|
59
61
|
export { DEFAULT_ICON_PICKER_LABELS, IconOption, IconPicker, IconPickerLabels, IconPickerProps } from './components/icon-picker.js';
|
|
60
|
-
export { ChoiceCard, ChoiceCardGroup, ChoiceCardGroupProps, ChoiceCardMultipleProps, ChoiceCardOption, ChoiceCardProps, ChoiceCardSingleProps, ChoiceCardType } from './components/choice-card.js';
|
|
62
|
+
export { ActionCard, ActionCardMetaTone, ActionCardProps, ChoiceCard, ChoiceCardGroup, ChoiceCardGroupProps, ChoiceCardMultipleProps, ChoiceCardOption, ChoiceCardProps, ChoiceCardSingleProps, ChoiceCardType } from './components/choice-card.js';
|
|
61
63
|
export { Autocomplete, AutocompleteProps } from './components/autocomplete.js';
|
|
62
64
|
export { DEFAULT_MEASURED_GRID_LABELS, MeasuredGrid, MeasuredGridColumn, MeasuredGridLabels, MeasuredGridProps, MeasuredGridView, MeasuredRows, UseMeasuredRowsOptions, useMeasuredRows } from './components/measured-grid.js';
|
|
63
65
|
export { WindowedRows, useWindowedRows } from './hooks/use-windowed-rows.js';
|
|
@@ -69,27 +71,36 @@ export { LegendColumn, LegendEntry, LegendGroup, STEP_DASH, STROKE_PATTERNS, Tog
|
|
|
69
71
|
export { FACING_SIDES, FacingSide, facingAxes, facingBand, facingHeadingPad } from './components/facing-pair.js';
|
|
70
72
|
export { DEFAULT_SERIES_CHART_LABELS, SeriesChartLabels } from './components/series-chart-labels.js';
|
|
71
73
|
export { PasswordSetting, PasswordSettingLabels, ProfileSetting, ProfileSettingLabels, TwoFactorSetting, TwoFactorSettingLabels } from './components/account-settings.js';
|
|
72
|
-
export { AlertBanner, AlertBannerProps, AlertTone, alertFrameClass, toneFrameClass } from './components/alert-banner.js';
|
|
74
|
+
export { AlertBanner, AlertBannerProps, AlertSize, AlertTone, alertFrameClass, toneFrameClass } from './components/alert-banner.js';
|
|
73
75
|
export { ToggleGroup, ToggleGroupBaseProps, ToggleGroupClearableProps, ToggleGroupProps, ToggleGroupRequiredProps, ToggleOption } from './components/toggle-group.js';
|
|
74
|
-
export {
|
|
76
|
+
export { NavPillItem, NavPillLinkProps, NavPills, NavPillsCurrent, NavPillsProps } from './components/nav-pills.js';
|
|
77
|
+
export { Chip, ChipHue, ChipInput, ChipInputLabels, ChipInputProps, ChipLinkProps, ChipProps, ChipShape, ChipSize, ChipTone, ChipVariant, DEFAULT_CHIP_INPUT_LABELS, resolveChipInputLabels } from './components/chip.js';
|
|
75
78
|
export { WizardStepper } from './components/wizard-stepper.js';
|
|
76
79
|
export { HoverMenu, HoverMenuProps } from './components/hover-menu.js';
|
|
77
80
|
export { Modal, ModalCloseContext, ModalProps, useBackdropClose } from './components/modal.js';
|
|
78
81
|
export { FullBleedDialog, FullBleedDialogProps } from './components/full-bleed-dialog.js';
|
|
79
82
|
export { GroupedPicker, GroupedPickerProps, PickerGroup } from './components/grouped-picker.js';
|
|
80
83
|
export { FileDropzone, FileDropzoneProps, FileDropzoneRejectionFeedback, FileDropzoneState } from './components/file-dropzone.js';
|
|
81
|
-
export { DEFAULT_MINI_CALENDAR_LABELS, MiniCalendar, MiniCalendarLabels, MiniCalendarProps, WeekDay } from './components/mini-calendar.js';
|
|
82
|
-
export {
|
|
84
|
+
export { DEFAULT_MINI_CALENDAR_LABELS, MiniCalendar, MiniCalendarDayState, MiniCalendarLabels, MiniCalendarProps, WeekDay } from './components/mini-calendar.js';
|
|
85
|
+
export { CalendarHeatmap, CalendarHeatmapDatum, CalendarHeatmapDay, CalendarHeatmapLabels, CalendarHeatmapProps, DEFAULT_CALENDAR_HEATMAP_LABELS, heatmapLevel } from './components/calendar-heatmap.js';
|
|
86
|
+
export { DatePicker, DatePickerProps, DateRangeCommit, DateRangeDraftSummary, DateRangePicker, DateRangePickerPreset, DateRangePickerProps, DateRangeTriggerRenderProps, DateTriggerAttributes } from './components/date-picker.js';
|
|
83
87
|
export { TreeItemState, TreeNode, TreeRow, TreeRowProps, TreeView, TreeViewProps } from './components/tree-view.js';
|
|
84
88
|
export { ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartSeriesConfig, ChartTooltip, ChartTooltipContent, useChart } from './components/chart.js';
|
|
85
|
-
export { DescriptionItem, DescriptionItemProps, DescriptionList, DescriptionListDensity, DescriptionListLayout, DescriptionListProps } from './components/description-list.js';
|
|
86
|
-
export { ProgressBar, ProgressBarProps, ProgressBarSize, ProgressBarTone } from './components/progress-bar.js';
|
|
89
|
+
export { DescriptionItem, DescriptionItemProps, DescriptionList, DescriptionListColumns, DescriptionListDensity, DescriptionListLayout, DescriptionListProps } from './components/description-list.js';
|
|
90
|
+
export { ProgressBar, ProgressBarProps, ProgressBarSegment, ProgressBarSize, ProgressBarTone } from './components/progress-bar.js';
|
|
87
91
|
export { Skeleton, SkeletonProps, SkeletonShape } from './components/skeleton.js';
|
|
88
92
|
export { CopyButton, CopyButtonLabels, CopyButtonProps, DEFAULT_COPY_BUTTON_LABELS } from './components/copy-button.js';
|
|
89
|
-
export { ButtonGroup, ButtonGroupProps } from './components/button-group.js';
|
|
90
|
-
export { NUMERIC_CELL_CLASS, Table, TableAlign, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableDensity, TableFoot, TableFootProps, TableHead, TableHeadProps, TableHeaderCell, TableHeaderCellProps, TableProps, TableRow, TableRowProps } from './components/table.js';
|
|
93
|
+
export { ButtonGroup, ButtonGroupLink, ButtonGroupLinkProps, ButtonGroupLinkRenderProps, ButtonGroupProps } from './components/button-group.js';
|
|
94
|
+
export { NUMERIC_CELL_CLASS, Table, TableAlign, TableBody, TableBodyProps, TableCaption, TableCaptionProps, TableCell, TableCellProps, TableDensity, TableEmpty, TableEmptyProps, TableFoot, TableFootProps, TableHead, TableHeadProps, TableHeaderCell, TableHeaderCellProps, TableHeaderCellSize, TableHeaderCellWeight, TableLayout, TableProps, TableRow, TableRowProps, TableVAlign } from './components/table.js';
|
|
91
95
|
export { Separator, SeparatorProps } from './components/separator.js';
|
|
92
96
|
export { ScrollArea, ScrollAreaProps } from './components/scroll-area.js';
|
|
97
|
+
export { DEFAULT_LIST_LABELS, List, ListDensity, ListItem, ListItemLinkProps, ListItemProps, ListLabels, ListProps, ListSeparator } from './components/list.js';
|
|
98
|
+
export { MenuItem, MenuItemLinkProps, MenuItemProps, MenuItemTone } from './components/menu-item.js';
|
|
99
|
+
export { CAPTION_CLASS, Caption, CaptionProps, SECTION_LABEL_CLASS, SectionLabel, SectionLabelProps, SectionLabelSize } from './components/text.js';
|
|
100
|
+
export { StatusDot, StatusDotProps, StatusDotSize, StatusDotTone } from './components/status-dot.js';
|
|
101
|
+
export { PageHeader, PageHeaderProps, PageHeaderSize } from './components/page-header.js';
|
|
102
|
+
export { BreadcrumbItem, BreadcrumbLinkProps, Breadcrumbs, BreadcrumbsLabels, BreadcrumbsProps, DEFAULT_BREADCRUMBS_LABELS } from './components/breadcrumbs.js';
|
|
103
|
+
export { DEFAULT_TOAST_LABELS, TOAST_ACTION_DURATION, ToastAction, ToastId, ToastLabels, ToastOptions, ToastPosition, ToastPromiseOptions, ToastRedoOptions, ToastSwipeDirection, ToastUndoOptions, Toaster, ToasterOffset, ToasterProps, toast } from './components/toast.js';
|
|
93
104
|
export { DEFAULT_DATA_TABLE_LABELS, DataTableLabels, missingDataTableLabels, resolveDataTableLabels } from './components/data-table-labels.js';
|
|
94
105
|
export { SortCycle, SortDir, SortState, SortStepOptions, decodeSorts, encodeSorts, nextSorts, normalizeSorts } from './components/data-table-sort.js';
|
|
95
106
|
export { C as ColumnFilter, D as DataTable, l as DataTableCellProps, a as DataTableChrome, b as DataTableColumn, c as DataTableDensity, m as DataTableHeadProps, d as DataTableProps, F as FilterState, e as FilterValue, M as MobileSwipeActions, S as ServerPagination, f as decodeFilterValue, g as decodeFilterValueOfType, h as defaultFilterState, i as encodeFilterValue, j as isFilterActive, r as resolveFilter, k as rowMatches } from './data-table-filters-Dh9uF_S-.js';
|
|
@@ -100,23 +111,24 @@ export { TopBar, TopBarProps } from './shell/top-bar.js';
|
|
|
100
111
|
export { AppShell, AppShellNavItem, AppShellProps, AppShellSubItem } from './shell/app-shell.js';
|
|
101
112
|
export { OptionSwitcherMenu, OptionSwitcherOption } from './shell/option-switcher-menu.js';
|
|
102
113
|
export { RoleSwitcher, RoleSwitcherProps } from './shell/role-switcher.js';
|
|
103
|
-
export { TopBarActionMenu, TopBarMenuEntry } from './shell/topbar-action-menu.js';
|
|
114
|
+
export { TopBarActionMenu, TopBarMenuEntry, TopBarMenuHeader } from './shell/topbar-action-menu.js';
|
|
104
115
|
export { DEFAULT_ATTACHMENT_ACCEPT, DEFAULT_FEEDBACK_ATTACHMENT_LABELS, DEFAULT_MAX_ATTACHMENT_BYTES, FeedbackAttachmentField, FeedbackAttachmentFieldLabels, pastedName } from './feedback/feedback-attachment.js';
|
|
105
116
|
export { FeedbackAttachmentLabels, FeedbackCategoryOption, FeedbackDialog, FeedbackDialogLabels, FeedbackSubmission } from './feedback/feedback-dialog.js';
|
|
106
117
|
export { FEEDBACK_CATEGORY_META, FEEDBACK_CATEGORY_ORDER, FEEDBACK_STATUS_META, FEEDBACK_STATUS_ORDER, FeedbackCategory, FeedbackCategoryBadge, FeedbackDetail, FeedbackDetailSection, FeedbackNoteAttachment, FeedbackNoteEditor, FeedbackProse, FeedbackStatus, FeedbackStatusBadge, FeedbackStatusTransitions, feedbackCategoryRank, nextFeedbackStatus, selectableFeedbackStatuses, visibleFeedbackStatuses } from './feedback/feedback-inbox.js';
|
|
107
118
|
export { DEFAULT_WIZARD_LABELS, FieldErrors, StepStatus, SummaryItem, SummarySection, UseWizardOptions, UseWizardReturn, ValidateResult, WizardLabels, WizardStepConfig, WizardUrlSync, resolveWizardLabels } from './wizard/types.js';
|
|
108
119
|
export { useWizard } from './wizard/use-wizard.js';
|
|
109
|
-
export { WizardContextProvider, WizardContextValue, useWizardContext } from './wizard/wizard-context.js';
|
|
120
|
+
export { WizardContextProvider, WizardContextValue, useOptionalWizardContext, useWizardContext } from './wizard/wizard-context.js';
|
|
110
121
|
export { RequiredFieldSpec, requiredFieldsValidator } from './wizard/validation.js';
|
|
111
122
|
export { WizardStep } from './wizard/wizard-step.js';
|
|
112
123
|
export { WizardSummary } from './wizard/wizard-summary.js';
|
|
113
124
|
export { StepperNav } from './wizard/stepper-nav.js';
|
|
114
125
|
export { DEFAULT_TOUR_LABELS, TourLabels, TourPlacement, TourProvider, TourStep, useTour, useTourOptional } from './tour/tour.js';
|
|
115
|
-
export { CommandItem, CommandPalette, CommandPaletteLabels, DEFAULT_COMMAND_PALETTE_LABELS, useCommandKey } from './search/command-palette.js';
|
|
126
|
+
export { CommandItem, CommandPalette, CommandPaletteDensity, CommandPaletteLabels, DEFAULT_COMMAND_PALETTE_LABELS, useCommandKey } from './search/command-palette.js';
|
|
116
127
|
export { SEARCH_TIER_POINTS, SearchEntry, SearchHit, SearchIndex, SearchIndexOptions, SearchMatchField, createSearchIndex, matchEntries, normalizeSearchText } from './search/search-index.js';
|
|
117
128
|
export { DEFAULT_GLOBAL_SEARCH_LABELS, GlobalSearch, GlobalSearchLabels, GlobalSearchProps, GlobalSearchSource, GlobalSearchSuggestion, GlobalSearchTriggerProps } from './search/global-search.js';
|
|
118
129
|
export { AppShellLabels, CalculatorLabels, ComboboxLabels, CommonLabels, CurrencyLabels, DEFAULT_APP_SHELL_LABELS, DEFAULT_CALCULATOR_LABELS, DEFAULT_COMBOBOX_LABELS, DEFAULT_COMMON_LABELS, DEFAULT_CURRENCY_LABELS, DEFAULT_DATE_PICKER_LABELS, DEFAULT_FILE_LABELS, DEFAULT_MULTI_SELECT_LABELS, DEFAULT_PICKER_SHEET_LABELS, DEFAULT_SWIPEABLE_ROW_LABELS, DEFAULT_TOP_BAR_LABELS, DatePickerLabels, FileLabels, MultiSelectLabels, PickerSheetLabels, SwipeableRowLabels, TopBarLabels, UiKitLabelOverrides, UiKitLabels, UiKitProvider, UiKitProviderProps, formatFileSize, missingKitLabels, useKitFileLabels, useKitLabelOverrides, useKitLabels, useKitLocale, useKitWeekStart } from './i18n/kit-labels.js';
|
|
119
130
|
export { DEFAULT_UI_KIT_LABELS } from './i18n/defaults.js';
|
|
131
|
+
export { CLIPS_ATTRIBUTE } from './lib/clipping.js';
|
|
120
132
|
export { ComboClearValue, ComboOption } from './components/combobox-core.js';
|
|
121
133
|
export { TimeTickUnit } from './components/series-chart-ticks.js';
|
|
122
134
|
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./theme/palette-presets.js";
|
|
|
22
22
|
export * from "./theme/theme-store.js";
|
|
23
23
|
export * from "./theme/palette-store.js";
|
|
24
24
|
export * from "./components/ui.js";
|
|
25
|
+
export * from "./components/field.js";
|
|
25
26
|
export * from "./components/search-field.js";
|
|
26
27
|
export * from "./components/dropdown.js";
|
|
27
28
|
export * from "./components/popover.js";
|
|
@@ -56,6 +57,7 @@ export * from "./components/dialog-frame.js";
|
|
|
56
57
|
export * from "./components/danger-confirm.js";
|
|
57
58
|
export * from "./components/confirm-dialog.js";
|
|
58
59
|
export * from "./components/floating-panel.js";
|
|
60
|
+
export * from "./components/bulk-action-bar.js";
|
|
59
61
|
export * from "./components/swatch-picker.js";
|
|
60
62
|
export * from "./components/icon-picker.js";
|
|
61
63
|
export * from "./components/choice-card.js";
|
|
@@ -72,6 +74,7 @@ export * from "./components/series-chart-labels.js";
|
|
|
72
74
|
export * from "./components/account-settings.js";
|
|
73
75
|
export * from "./components/alert-banner.js";
|
|
74
76
|
export * from "./components/toggle-group.js";
|
|
77
|
+
export * from "./components/nav-pills.js";
|
|
75
78
|
export * from "./components/chip.js";
|
|
76
79
|
export * from "./components/wizard-stepper.js";
|
|
77
80
|
export * from "./components/hover-menu.js";
|
|
@@ -80,6 +83,7 @@ export * from "./components/full-bleed-dialog.js";
|
|
|
80
83
|
export * from "./components/grouped-picker.js";
|
|
81
84
|
export * from "./components/file-dropzone.js";
|
|
82
85
|
export * from "./components/mini-calendar.js";
|
|
86
|
+
export * from "./components/calendar-heatmap.js";
|
|
83
87
|
export * from "./components/date-picker.js";
|
|
84
88
|
export * from "./components/tree-view.js";
|
|
85
89
|
export * from "./components/chart.js";
|
|
@@ -91,6 +95,13 @@ export * from "./components/button-group.js";
|
|
|
91
95
|
export * from "./components/table.js";
|
|
92
96
|
export * from "./components/separator.js";
|
|
93
97
|
import { ScrollArea } from "./components/scroll-area.js";
|
|
98
|
+
export * from "./components/list.js";
|
|
99
|
+
export * from "./components/menu-item.js";
|
|
100
|
+
export * from "./components/text.js";
|
|
101
|
+
export * from "./components/status-dot.js";
|
|
102
|
+
export * from "./components/page-header.js";
|
|
103
|
+
export * from "./components/breadcrumbs.js";
|
|
104
|
+
import { toast, Toaster, DEFAULT_TOAST_LABELS, TOAST_ACTION_DURATION } from "./components/toast.js";
|
|
94
105
|
export * from "./components/data-table-labels.js";
|
|
95
106
|
export * from "./components/data-table-sort.js";
|
|
96
107
|
export * from "./components/data-table-filters.js";
|
|
@@ -121,6 +132,7 @@ export * from "./i18n/kit-labels.js";
|
|
|
121
132
|
export * from "./i18n/defaults.js";
|
|
122
133
|
export {
|
|
123
134
|
DEFAULT_FILE_PICKER_LABELS,
|
|
135
|
+
DEFAULT_TOAST_LABELS,
|
|
124
136
|
DataTable,
|
|
125
137
|
FileButton,
|
|
126
138
|
FilterPopover,
|
|
@@ -128,6 +140,8 @@ export {
|
|
|
128
140
|
ScrollArea,
|
|
129
141
|
Skeleton,
|
|
130
142
|
SwipeableRow,
|
|
143
|
+
TOAST_ACTION_DURATION,
|
|
144
|
+
Toaster,
|
|
131
145
|
anchoredPanelPlacement,
|
|
132
146
|
cn,
|
|
133
147
|
copyToClipboard,
|
|
@@ -135,6 +149,7 @@ export {
|
|
|
135
149
|
logger,
|
|
136
150
|
matchesAccept,
|
|
137
151
|
setStoreLog,
|
|
152
|
+
toast,
|
|
138
153
|
useAnchoredPanel,
|
|
139
154
|
useAnchoredRect,
|
|
140
155
|
useAnnounce,
|
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// 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// 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\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\";\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\";\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/account-settings\";\nexport * from \"./components/alert-banner\";\nexport * from \"./components/toggle-group\";\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/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\";\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\";\nexport * from \"./components/copy-button\";\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\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} from \"./components/data-table\";\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\";\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\";\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;AAIpC,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;AAGlD,SAAS,oBAAoB,uBAAuB;AAIpD,cAAc;AAKd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,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;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;AAId,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AAEd,SAAS,gBAAgB;AAEzB,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,SAAS,kBAAkB;AAI3B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAc1B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AASd,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// 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// 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\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/account-settings\";\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\";\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\";\nexport * from \"./components/copy-button\";\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 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} from \"./components/data-table\";\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\";\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\";\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;AAIpC,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,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AG3B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,SAAS,OAAO,SAAS,sBAAsB,6BAA6B;AAgB5E,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,qBAAqB;AAG9B,SAAS,iBAAiB;AAc1B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AASd,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,25 @@
|
|
|
1
|
+
/** Internal (not exported from the package): the Tooltip's auto-portal check. The
|
|
2
|
+
* attribute name itself IS exported, as `CLIPS_ATTRIBUTE` from the tooltip module. */
|
|
3
|
+
/**
|
|
4
|
+
* The explicit "this element clips or scrolls" marker. A container carrying it counts
|
|
5
|
+
* as clipping whatever its computed `overflow` says.
|
|
6
|
+
*
|
|
7
|
+
* Why a marker as well as the computed style: the kit's containers get their
|
|
8
|
+
* `overflow` from Tailwind classes, and jsdom computes no stylesheet — so under test
|
|
9
|
+
* every scroller reads `overflow: visible`, the Tooltip stays in place, and its always-
|
|
10
|
+
* mounted bubble shows up in the cell's text (keksdose 0.10: "CheckingChecking"). The
|
|
11
|
+
* browser and the test then disagreed about where the bubble lives, and apps pinned
|
|
12
|
+
* `portal` on every tooltip in a table to make them agree. The kit's own scrollers
|
|
13
|
+
* (DataTable's body, Table's wrapper) carry the marker, so the answer is the same in
|
|
14
|
+
* both; an app marks its own with `{ [CLIPS_ATTRIBUTE]: "" }` or a literal `data-clips`.
|
|
15
|
+
*/
|
|
16
|
+
declare const CLIPS_ATTRIBUTE = "data-clips";
|
|
17
|
+
/** Whether anything between `el` and `<body>` clips or scrolls its content — the
|
|
18
|
+
* containers an absolutely positioned bubble would be cut off by, or would widen.
|
|
19
|
+
* Either the computed `overflow` says so or the element carries
|
|
20
|
+
* {@link CLIPS_ATTRIBUTE}. `<body>` and `<html>` are not counted: their `overflow`
|
|
21
|
+
* belongs to the viewport (a dialog's scroll lock sets it), and the viewport clips a
|
|
22
|
+
* portalled bubble just the same. */
|
|
23
|
+
declare function hasClippingAncestor(el: Element | null): boolean;
|
|
24
|
+
|
|
25
|
+
export { CLIPS_ATTRIBUTE, hasClippingAncestor };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const CLIPS_ATTRIBUTE = "data-clips";
|
|
3
|
+
function hasClippingAncestor(el) {
|
|
4
|
+
if (typeof window === "undefined" || !el) return false;
|
|
5
|
+
for (let node = el.parentElement; node; node = node.parentElement) {
|
|
6
|
+
if (node === document.body || node === document.documentElement) return false;
|
|
7
|
+
if (node.hasAttribute(CLIPS_ATTRIBUTE)) return true;
|
|
8
|
+
const style = window.getComputedStyle(node);
|
|
9
|
+
if (style.overflowX !== "visible" || style.overflowY !== "visible") return true;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
CLIPS_ATTRIBUTE,
|
|
15
|
+
hasClippingAncestor
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=clipping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/clipping.ts"],"sourcesContent":["/** Internal (not exported from the package): the Tooltip's auto-portal check. The\n * attribute name itself IS exported, as `CLIPS_ATTRIBUTE` from the tooltip module. */\n\n/**\n * The explicit \"this element clips or scrolls\" marker. A container carrying it counts\n * as clipping whatever its computed `overflow` says.\n *\n * Why a marker as well as the computed style: the kit's containers get their\n * `overflow` from Tailwind classes, and jsdom computes no stylesheet — so under test\n * every scroller reads `overflow: visible`, the Tooltip stays in place, and its always-\n * mounted bubble shows up in the cell's text (keksdose 0.10: \"CheckingChecking\"). The\n * browser and the test then disagreed about where the bubble lives, and apps pinned\n * `portal` on every tooltip in a table to make them agree. The kit's own scrollers\n * (DataTable's body, Table's wrapper) carry the marker, so the answer is the same in\n * both; an app marks its own with `{ [CLIPS_ATTRIBUTE]: \"\" }` or a literal `data-clips`.\n */\nexport const CLIPS_ATTRIBUTE = \"data-clips\";\n\n/** Whether anything between `el` and `<body>` clips or scrolls its content — the\n * containers an absolutely positioned bubble would be cut off by, or would widen.\n * Either the computed `overflow` says so or the element carries\n * {@link CLIPS_ATTRIBUTE}. `<body>` and `<html>` are not counted: their `overflow`\n * belongs to the viewport (a dialog's scroll lock sets it), and the viewport clips a\n * portalled bubble just the same. */\nexport function hasClippingAncestor(el: Element | null): boolean {\n if (typeof window === \"undefined\" || !el) return false;\n for (let node = el.parentElement; node; node = node.parentElement) {\n if (node === document.body || node === document.documentElement) return false;\n if (node.hasAttribute(CLIPS_ATTRIBUTE)) return true;\n const style = window.getComputedStyle(node);\n if (style.overflowX !== \"visible\" || style.overflowY !== \"visible\") return true;\n }\n return false;\n}\n"],"mappings":";AAgBO,MAAM,kBAAkB;AAQxB,SAAS,oBAAoB,IAA6B;AAC/D,MAAI,OAAO,WAAW,eAAe,CAAC,GAAI,QAAO;AACjD,WAAS,OAAO,GAAG,eAAe,MAAM,OAAO,KAAK,eAAe;AACjE,QAAI,SAAS,SAAS,QAAQ,SAAS,SAAS,gBAAiB,QAAO;AACxE,QAAI,KAAK,aAAa,eAAe,EAAG,QAAO;AAC/C,UAAM,QAAQ,OAAO,iBAAiB,IAAI;AAC1C,QAAI,MAAM,cAAc,aAAa,MAAM,cAAc,UAAW,QAAO;AAAA,EAC7E;AACA,SAAO;AACT;","names":[]}
|
package/dist/lib/dates.d.ts
CHANGED
|
@@ -67,6 +67,22 @@ declare function formatIsoDate(iso: string, locale: string, options?: Intl.DateT
|
|
|
67
67
|
* {@link toLocalIso} reads local components back, so this never slides a day the way
|
|
68
68
|
* a `toISOString()` round-trip does west of UTC. */
|
|
69
69
|
declare function addDaysIso(iso: string, days: number): string;
|
|
70
|
+
/**
|
|
71
|
+
* `d` moved by whole months, keeping the day of the month where the target has one.
|
|
72
|
+
* `setMonth` alone ROLLS OVER — 31 January + 1 month is 3 March — which would skip
|
|
73
|
+
* February entirely for anyone paging through the year with PageDown. Returns a new
|
|
74
|
+
* Date; `d` is not touched.
|
|
75
|
+
*/
|
|
76
|
+
declare function addMonthsClamped(d: Date, months: number): Date;
|
|
77
|
+
/**
|
|
78
|
+
* The first day of the week in `locale`, as a `Date#getDay` index (0 = Sunday).
|
|
79
|
+
*
|
|
80
|
+
* `Intl.Locale#getWeekInfo()` is the standard spelling; V8 shipped it first as the
|
|
81
|
+
* `weekInfo` accessor, and Firefox has neither yet — hence both reads and a Monday
|
|
82
|
+
* fallback, which is ISO 8601. Its `firstDay` counts 1 = Monday … 7 = Sunday, so `% 7`
|
|
83
|
+
* maps it onto `getDay`. `undefined` asks for the runtime's default locale.
|
|
84
|
+
*/
|
|
85
|
+
declare function localeWeekStart(locale: string | undefined): 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
70
86
|
/** Whether two Dates fall on the same local calendar day. */
|
|
71
87
|
declare function sameYmd(a: Date, b: Date): boolean;
|
|
72
88
|
interface DateRangePreset {
|
|
@@ -117,4 +133,4 @@ interface CalendarMonthPresetOptions {
|
|
|
117
133
|
*/
|
|
118
134
|
declare function calendarMonthPresets(options?: CalendarMonthPresetOptions): DateRangePreset[];
|
|
119
135
|
|
|
120
|
-
export { type CalendarMonthPresetOptions, type DateRangePreset, addDaysIso, calendarMonthPresets, dateRangePresets, endOfMonthIso, endOfYearIso, formatIsoDate, lastFullMonthsRange, lastFullYearsRange, monthKey, pad, parseIsoDate, sameYmd, shiftIso, startOfMonthIso, startOfWeekIso, startOfYearIso, toLocalIso, todayIso };
|
|
136
|
+
export { type CalendarMonthPresetOptions, type DateRangePreset, addDaysIso, addMonthsClamped, calendarMonthPresets, dateRangePresets, endOfMonthIso, endOfYearIso, formatIsoDate, lastFullMonthsRange, lastFullYearsRange, localeWeekStart, monthKey, pad, parseIsoDate, sameYmd, shiftIso, startOfMonthIso, startOfWeekIso, startOfYearIso, toLocalIso, todayIso };
|
package/dist/lib/dates.js
CHANGED
|
@@ -70,6 +70,23 @@ function addDaysIso(iso, days) {
|
|
|
70
70
|
d.setDate(d.getDate() + days);
|
|
71
71
|
return toLocalIso(d);
|
|
72
72
|
}
|
|
73
|
+
function addMonthsClamped(d, months) {
|
|
74
|
+
const day = d.getDate();
|
|
75
|
+
const out = new Date(d.getFullYear(), d.getMonth() + months, 1);
|
|
76
|
+
const lastOfTarget = new Date(out.getFullYear(), out.getMonth() + 1, 0).getDate();
|
|
77
|
+
out.setDate(Math.min(day, lastOfTarget));
|
|
78
|
+
return out;
|
|
79
|
+
}
|
|
80
|
+
function localeWeekStart(locale) {
|
|
81
|
+
try {
|
|
82
|
+
const tag = locale ?? new Intl.DateTimeFormat().resolvedOptions().locale;
|
|
83
|
+
const loc = new Intl.Locale(tag);
|
|
84
|
+
const firstDay = (loc.getWeekInfo?.() ?? loc.weekInfo)?.firstDay;
|
|
85
|
+
if (typeof firstDay === "number") return firstDay % 7;
|
|
86
|
+
} catch {
|
|
87
|
+
}
|
|
88
|
+
return 1;
|
|
89
|
+
}
|
|
73
90
|
function sameYmd(a, b) {
|
|
74
91
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
75
92
|
}
|
|
@@ -107,6 +124,7 @@ function calendarMonthPresets(options = {}) {
|
|
|
107
124
|
}
|
|
108
125
|
export {
|
|
109
126
|
addDaysIso,
|
|
127
|
+
addMonthsClamped,
|
|
110
128
|
calendarMonthPresets,
|
|
111
129
|
dateRangePresets,
|
|
112
130
|
endOfMonthIso,
|
|
@@ -114,6 +132,7 @@ export {
|
|
|
114
132
|
formatIsoDate,
|
|
115
133
|
lastFullMonthsRange,
|
|
116
134
|
lastFullYearsRange,
|
|
135
|
+
localeWeekStart,
|
|
117
136
|
monthKey,
|
|
118
137
|
pad,
|
|
119
138
|
parseIsoDate,
|