@godxjp/ui 20.0.0 → 20.2.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 +8 -2
- package/dist/app/app-provider.js +37 -21
- package/dist/app/index.d.ts +2 -0
- package/dist/app/index.js +2 -0
- package/dist/app/storage.d.ts +17 -0
- package/dist/app/storage.js +28 -0
- package/dist/app/theme-axes.d.ts +2 -0
- package/dist/app/theme-axes.js +45 -0
- package/dist/components/charts/chart-cartesian.d.ts +2 -1
- package/dist/components/charts/chart-cartesian.js +52 -3
- package/dist/components/charts/chart-category-axis.d.ts +55 -0
- package/dist/components/charts/chart-category-axis.js +93 -0
- package/dist/components/charts/chart-frame.d.ts +10 -1
- package/dist/components/charts/chart-frame.js +19 -3
- package/dist/components/charts/compact-bar-trend.d.ts +1 -1
- package/dist/components/charts/compact-bar-trend.js +2 -0
- package/dist/components/charts/pie-chart.d.ts +1 -1
- package/dist/components/charts/pie-chart.js +12 -1
- package/dist/components/charts/recharts-peer.d.ts +49 -0
- package/dist/components/charts/recharts-peer.js +45 -0
- package/dist/components/data-display/card.d.ts +12 -1
- package/dist/components/data-display/card.js +22 -4
- package/dist/components/data-display/code-block.js +6 -2
- package/dist/components/data-display/data-table.d.ts +39 -4
- package/dist/components/data-display/data-table.js +802 -270
- package/dist/components/data-display/descriptions.d.ts +27 -6
- package/dist/components/data-display/descriptions.js +58 -17
- package/dist/components/data-display/index.d.ts +2 -0
- package/dist/components/data-display/index.js +2 -0
- package/dist/components/data-display/list-row.d.ts +10 -1
- package/dist/components/data-display/list-row.js +7 -1
- package/dist/components/data-display/popover.d.ts +9 -3
- package/dist/components/data-display/popover.js +65 -11
- package/dist/components/data-display/range-timeline.d.ts +38 -0
- package/dist/components/data-display/range-timeline.js +161 -0
- package/dist/components/data-display/scroll-area.js +13 -2
- package/dist/components/data-display/service-launcher-card.js +14 -12
- package/dist/components/data-display/table.d.ts +71 -3
- package/dist/components/data-display/table.js +56 -18
- package/dist/components/data-display/tree-list.js +4 -9
- package/dist/components/data-entry/calendar.d.ts +2 -2
- package/dist/components/data-entry/calendar.js +23 -3
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +188 -24
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +17 -5
- package/dist/components/data-entry/control-appearance.d.ts +64 -0
- package/dist/components/data-entry/control-appearance.js +39 -0
- package/dist/components/data-entry/control-surface.d.ts +61 -0
- package/dist/components/data-entry/control-surface.js +39 -0
- package/dist/components/data-entry/date-picker.d.ts +1 -1
- package/dist/components/data-entry/date-picker.js +344 -113
- package/dist/components/data-entry/date-range-picker.d.ts +1 -1
- package/dist/components/data-entry/date-range-picker.js +278 -140
- package/dist/components/data-entry/form-field.d.ts +1 -1
- package/dist/components/data-entry/form-field.js +39 -4
- package/dist/components/data-entry/form.d.ts +4 -0
- package/dist/components/data-entry/form.js +4 -2
- package/dist/components/data-entry/index.d.ts +7 -3
- package/dist/components/data-entry/index.js +10 -1
- package/dist/components/data-entry/input-otp.d.ts +1 -1
- package/dist/components/data-entry/input.d.ts +12 -34
- package/dist/components/data-entry/input.js +92 -24
- package/dist/components/data-entry/month-picker.d.ts +1 -1
- package/dist/components/data-entry/month-picker.js +47 -10
- package/dist/components/data-entry/month-range-picker.d.ts +1 -1
- package/dist/components/data-entry/month-range-picker.js +51 -11
- package/dist/components/data-entry/number-input.d.ts +7 -0
- package/dist/components/data-entry/number-input.js +147 -98
- package/dist/components/data-entry/password-input.d.ts +1 -1
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +61 -13
- package/dist/components/data-entry/search-input.d.ts +1 -1
- package/dist/components/data-entry/search-input.js +16 -2
- package/dist/components/data-entry/search-select.d.ts +2 -2
- package/dist/components/data-entry/search-select.js +209 -78
- package/dist/components/data-entry/select.d.ts +22 -4
- package/dist/components/data-entry/select.js +215 -163
- package/dist/components/data-entry/slider.d.ts +9 -1
- package/dist/components/data-entry/slider.js +87 -9
- package/dist/components/data-entry/switch.d.ts +3 -0
- package/dist/components/data-entry/switch.js +29 -3
- package/dist/components/data-entry/textarea.d.ts +14 -56
- package/dist/components/data-entry/textarea.js +80 -33
- package/dist/components/data-entry/time-picker.d.ts +2 -2
- package/dist/components/data-entry/time-picker.js +333 -109
- package/dist/components/data-entry/time-range-picker.d.ts +5 -0
- package/dist/components/data-entry/time-range-picker.js +89 -0
- package/dist/components/data-entry/transfer.d.ts +1 -1
- package/dist/components/data-entry/transfer.js +86 -28
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +201 -113
- package/dist/components/data-entry/tree-utils.js +7 -14
- package/dist/components/data-entry/upload-files.d.ts +2 -0
- package/dist/components/data-entry/upload-files.js +31 -0
- package/dist/components/data-entry/upload-request.d.ts +4 -0
- package/dist/components/data-entry/upload-request.js +53 -0
- package/dist/components/data-entry/upload-types.d.ts +28 -0
- package/dist/components/data-entry/upload-types.js +2 -0
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +475 -115
- package/dist/components/feedback/dialog.js +19 -19
- package/dist/components/feedback/sheet.js +3 -0
- package/dist/components/feedback/tooltip.js +3 -0
- package/dist/components/general/button.d.ts +2 -1
- package/dist/components/general/button.js +7 -1
- package/dist/components/general/index.d.ts +1 -0
- package/dist/components/general/index.js +2 -0
- package/dist/components/general/typography.d.ts +3 -0
- package/dist/components/general/typography.js +15 -1
- package/dist/components/general/visually-hidden.d.ts +3 -0
- package/dist/components/general/visually-hidden.js +9 -0
- package/dist/components/layout/app-launcher.d.ts +34 -0
- package/dist/components/layout/app-launcher.js +261 -0
- package/dist/components/layout/app-shell.d.ts +3 -1
- package/dist/components/layout/app-shell.js +34 -14
- package/dist/components/layout/auth-shell.d.ts +1 -1
- package/dist/components/layout/auth-shell.js +2 -0
- package/dist/components/layout/breadcrumb.d.ts +14 -2
- package/dist/components/layout/breadcrumb.js +46 -4
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/flex.js +23 -2
- package/dist/components/layout/index.d.ts +3 -0
- package/dist/components/layout/index.js +5 -1
- package/dist/components/layout/org-switcher.js +20 -1
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +5 -3
- package/dist/components/layout/responsive-grid.d.ts +16 -2
- package/dist/components/layout/responsive-grid.js +29 -2
- package/dist/components/layout/sidebar.js +2 -1
- package/dist/components/layout/topbar-item.d.ts +3 -0
- package/dist/components/layout/topbar-item.js +18 -3
- package/dist/components/layout/topbar.d.ts +1 -1
- package/dist/components/layout/topbar.js +27 -6
- package/dist/components/navigation/dropdown-menu.d.ts +30 -2
- package/dist/components/navigation/dropdown-menu.js +73 -11
- package/dist/components/navigation/pagination.d.ts +2 -2
- package/dist/components/navigation/pagination.js +155 -83
- package/dist/components/navigation/steps.d.ts +2 -2
- package/dist/components/navigation/steps.js +29 -4
- package/dist/components/navigation/tabs.d.ts +5 -33
- package/dist/components/navigation/tabs.js +232 -64
- package/dist/components/ui/hover-card.js +3 -0
- package/dist/components/ui/input-otp.d.ts +26 -28
- package/dist/components/ui/input-otp.js +50 -7
- package/dist/components/ui/password-input.d.ts +36 -2
- package/dist/components/ui/password-input.js +27 -7
- package/dist/components/ui/rating.d.ts +25 -0
- package/dist/components/ui/rating.js +67 -27
- package/dist/components/ui/segmented.d.ts +9 -0
- package/dist/components/ui/segmented.js +17 -2
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/tag-input.d.ts +45 -0
- package/dist/components/ui/tag-input.js +109 -27
- package/dist/form/form-context.d.ts +29 -0
- package/dist/form/form-context.js +44 -4
- package/dist/form/form-field-array.d.ts +22 -0
- package/dist/form/form-field-array.js +50 -0
- package/dist/form/form-field-control.d.ts +2 -1
- package/dist/form/form-field-control.js +116 -40
- package/dist/form/form-root.d.ts +2 -1
- package/dist/form/form-root.js +142 -23
- package/dist/form/index.d.ts +3 -1
- package/dist/form/index.js +12 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +3 -1
- package/dist/i18n/messages/en.json +59 -6
- package/dist/i18n/messages/ja.json +59 -6
- package/dist/i18n/messages/vi.json +59 -6
- package/dist/i18n/translate.d.ts +19 -0
- package/dist/i18n/translate.js +24 -0
- package/dist/inertia/index.d.ts +20 -0
- package/dist/inertia/index.js +60 -1
- package/dist/lib/control-styles.d.ts +25 -3
- package/dist/lib/control-styles.js +9 -3
- package/dist/lib/datetime/picker-format.d.ts +8 -0
- package/dist/lib/datetime/picker-format.js +54 -0
- package/dist/lib/overlay-portal.d.ts +18 -0
- package/dist/lib/overlay-portal.js +17 -0
- package/dist/props/components/app.prop.d.ts +13 -2
- package/dist/props/components/charts.prop.d.ts +21 -0
- package/dist/props/components/data-display.prop.d.ts +55 -4
- package/dist/props/components/data-entry.prop.d.ts +687 -43
- package/dist/props/components/form.prop.d.ts +142 -4
- package/dist/props/components/general.prop.d.ts +30 -1
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +255 -8
- package/dist/props/components/navigation.prop.d.ts +113 -3
- package/dist/props/registry.d.ts +376 -10
- package/dist/props/registry.js +493 -9
- package/dist/props/vocabulary/data.prop.d.ts +179 -1
- package/dist/props/vocabulary/index.d.ts +4 -4
- package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
- package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
- package/dist/props/vocabulary/shared.prop.d.ts +33 -0
- package/dist/styles/badge-layout.css +2 -1
- package/dist/styles/card-layout.css +36 -5
- package/dist/styles/chart-layout.css +17 -1
- package/dist/styles/control.css +520 -14
- package/dist/styles/data-display-layout.css +248 -7
- package/dist/styles/data-entry-layout.css +13 -0
- package/dist/styles/layout.css +221 -4
- package/dist/styles/navigation-layout.css +230 -1
- package/dist/styles/shell-layout.css +690 -21
- package/dist/styles/table-layout.css +95 -6
- package/dist/styles/text-layout.css +5 -0
- package/dist/tokens/base.css +1 -0
- package/dist/tokens/components/badge.css +1 -0
- package/dist/tokens/components/chart.css +6 -0
- package/dist/tokens/components/control.css +81 -3
- package/dist/tokens/components/data-display.css +9 -0
- package/dist/tokens/components/descriptions.css +11 -0
- package/dist/tokens/components/flex.css +8 -0
- package/dist/tokens/components/navigation.css +55 -0
- package/dist/tokens/components/shell.css +100 -5
- package/dist/tokens/components/table.css +14 -0
- package/dist/tokens/foundation.css +2 -0
- package/dist/tokens/semantic/layout.css +9 -0
- package/docs/CONSUMER-RULES.md +13 -0
- package/docs/DESIGN-AUTHORITY.md +43 -6
- package/docs/DEVELOPMENT.md +4 -3
- package/docs/FORMS.md +151 -6
- package/docs/FRAME-COVERAGE-REPORT.md +29 -16
- package/docs/README.md +1 -1
- package/docs/STANDARDS-vocabulary-tokens.md +1 -1
- package/docs/TESTING.md +15 -6
- package/docs/charts/cjk-category-axis.tsx +81 -0
- package/docs/data-display/card/index.tsx +22 -0
- package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
- package/docs/data-display/data-table/index.tsx +23 -0
- package/docs/data-display/descriptions.tsx +41 -0
- package/docs/data-display/list-row.tsx +6 -6
- package/docs/data-display/scroll-area.tsx +31 -25
- package/docs/data-display/table.tsx +104 -45
- package/docs/data-display/timeline.tsx +41 -0
- package/docs/data-entry/date-picker.tsx +85 -0
- package/docs/data-entry/date-range-picker.tsx +26 -0
- package/docs/data-entry/form-dynamic-fields.tsx +199 -0
- package/docs/data-entry/form.tsx +74 -4
- package/docs/data-entry/input-otp.tsx +24 -0
- package/docs/data-entry/input.tsx +46 -1
- package/docs/data-entry/month-range-picker.tsx +1 -1
- package/docs/data-entry/select.tsx +27 -0
- package/docs/data-entry/switch.tsx +41 -0
- package/docs/data-entry/textarea.tsx +38 -0
- package/docs/data-entry/time-picker.tsx +85 -1
- package/docs/data-entry/time-range-picker.tsx +55 -0
- package/docs/data-entry/transfer.tsx +17 -0
- package/docs/data-entry/upload.tsx +56 -12
- package/docs/feedback/tooltip.tsx +1 -1
- package/docs/general/activity.tsx +2 -2
- package/docs/general/button/index.tsx +14 -1
- package/docs/general/typography.tsx +14 -1
- package/docs/layout/app-launcher.tsx +195 -0
- package/docs/layout/app-shell-arrangements.tsx +5 -5
- package/docs/layout/app-shell.tsx +11 -0
- package/docs/layout/flex.tsx +50 -0
- package/docs/layout/responsive-grid.tsx +21 -1
- package/docs/layout/topbar.tsx +5 -9
- package/docs/navigation/app-setting-picker.tsx +11 -0
- package/docs/navigation/breadcrumb.tsx +48 -0
- package/docs/navigation/dropdown-menu.tsx +21 -0
- package/docs/navigation/pagination.tsx +52 -0
- package/docs/navigation/steps.tsx +37 -0
- package/docs/navigation/tabs.tsx +97 -1
- package/docs/query/button-refetch.tsx +1 -0
- package/docs/showcase/settings-security-mfa.tsx +3 -3
- package/package.json +24 -4
- package/scripts/_agent-setup.mjs +76 -9
- package/scripts/init-guinea-pig.mjs +26 -4
- package/scripts/ui-audit.mjs +243 -30
- package/scripts/visual-audit.mjs +45 -7
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"dataEntry": {
|
|
20
20
|
"calendar": {
|
|
21
21
|
"today": "Today",
|
|
22
|
-
"close": "Close"
|
|
22
|
+
"close": "Close",
|
|
23
|
+
"nav": "{label} navigation",
|
|
24
|
+
"name": "Calendar"
|
|
23
25
|
},
|
|
24
26
|
"datePicker": {
|
|
25
27
|
"placeholder": "Select date",
|
|
26
|
-
"openCalendar": "Open calendar"
|
|
28
|
+
"openCalendar": "Open calendar",
|
|
29
|
+
"quarter": "Q{quarter}"
|
|
27
30
|
},
|
|
28
31
|
"dateRangePicker": {
|
|
29
32
|
"placeholder": "Select date range",
|
|
@@ -39,7 +42,10 @@
|
|
|
39
42
|
"openPicker": "Open time picker",
|
|
40
43
|
"meridiem": "AM/PM",
|
|
41
44
|
"am": "AM",
|
|
42
|
-
"pm": "PM"
|
|
45
|
+
"pm": "PM",
|
|
46
|
+
"now": "Now",
|
|
47
|
+
"confirm": "OK",
|
|
48
|
+
"second": "Second"
|
|
43
49
|
},
|
|
44
50
|
"searchInput": {
|
|
45
51
|
"placeholder": "Search…"
|
|
@@ -55,7 +61,7 @@
|
|
|
55
61
|
"upload": {
|
|
56
62
|
"dropzoneLabel": "Upload files",
|
|
57
63
|
"dropzoneHint": "Drag and drop files here, or click to browse",
|
|
58
|
-
"dropzoneMeta": "
|
|
64
|
+
"dropzoneMeta": "Selected files appear here.",
|
|
59
65
|
"buttonLabel": "Choose file",
|
|
60
66
|
"addImage": "Add image",
|
|
61
67
|
"uploading": "Uploading…",
|
|
@@ -75,7 +81,17 @@
|
|
|
75
81
|
"statusFailed": "{count} upload(s) failed",
|
|
76
82
|
"removeImage": "Remove image",
|
|
77
83
|
"removeFile": "Remove {name}",
|
|
78
|
-
"cropDescription": "Drag the zoom slider, then save to crop your photo to a square."
|
|
84
|
+
"cropDescription": "Drag the zoom slider, then save to crop your photo to a square.",
|
|
85
|
+
"preview": "Preview",
|
|
86
|
+
"download": "Download",
|
|
87
|
+
"retry": "Retry",
|
|
88
|
+
"start": "Upload",
|
|
89
|
+
"cancel": "Cancel",
|
|
90
|
+
"rejectAccept": "{name}: file type is not allowed.",
|
|
91
|
+
"rejectSize": "{name}: file is too large.",
|
|
92
|
+
"rejectCount": "{name}: file limit reached.",
|
|
93
|
+
"rejectBeforeUpload": "{name}: file validation failed.",
|
|
94
|
+
"readFailed": "Could not read the selected folder."
|
|
79
95
|
},
|
|
80
96
|
"cascader": {
|
|
81
97
|
"placeholder": "Select…",
|
|
@@ -109,6 +125,9 @@
|
|
|
109
125
|
"empty": "No results",
|
|
110
126
|
"error": "Couldn’t load options"
|
|
111
127
|
},
|
|
128
|
+
"selection": {
|
|
129
|
+
"overflow": "+{count}"
|
|
130
|
+
},
|
|
112
131
|
"monthPicker": {
|
|
113
132
|
"openGrid": "Open month grid",
|
|
114
133
|
"previousYear": "Previous year",
|
|
@@ -135,6 +154,14 @@
|
|
|
135
154
|
},
|
|
136
155
|
"formErrors": {
|
|
137
156
|
"title": "Please review the following errors"
|
|
157
|
+
},
|
|
158
|
+
"form": {
|
|
159
|
+
"optional": "(optional)",
|
|
160
|
+
"success": "Valid",
|
|
161
|
+
"warning": "Please review",
|
|
162
|
+
"error": "Invalid",
|
|
163
|
+
"validating": "Validating",
|
|
164
|
+
"submitFailed": "Could not submit the form. Please try again."
|
|
138
165
|
}
|
|
139
166
|
},
|
|
140
167
|
"feedback": {
|
|
@@ -290,8 +317,13 @@
|
|
|
290
317
|
}
|
|
291
318
|
},
|
|
292
319
|
"navigation": {
|
|
320
|
+
"tabs": {
|
|
321
|
+
"addTab": "Add tab",
|
|
322
|
+
"removeTab": "Close tab"
|
|
323
|
+
},
|
|
293
324
|
"steps": {
|
|
294
325
|
"ariaLabel": "Progress",
|
|
326
|
+
"percentLabel": "Current step progress",
|
|
295
327
|
"status": {
|
|
296
328
|
"wait": "Waiting",
|
|
297
329
|
"process": "Current step",
|
|
@@ -332,6 +364,7 @@
|
|
|
332
364
|
"page": "Page {page}",
|
|
333
365
|
"pageSize": "Page size",
|
|
334
366
|
"pageSizeTrigger": "{size} / page",
|
|
367
|
+
"jumpTo": "Go to page",
|
|
335
368
|
"pageSizeOption": "{size} / page",
|
|
336
369
|
"total": {
|
|
337
370
|
"one": "Total {total} item",
|
|
@@ -410,7 +443,19 @@
|
|
|
410
443
|
"error": "Couldn't load this list",
|
|
411
444
|
"errorDescription": "The data could not be retrieved. Try again in a moment.",
|
|
412
445
|
"denied": "You don't have access to this list",
|
|
413
|
-
"deniedDescription": "Ask an administrator to grant you permission to view these records."
|
|
446
|
+
"deniedDescription": "Ask an administrator to grant you permission to view these records.",
|
|
447
|
+
"selectInvert": "Invert selection",
|
|
448
|
+
"selectNone": "Clear selection",
|
|
449
|
+
"selectionMenu": "Selection options",
|
|
450
|
+
"filterColumn": "Filter",
|
|
451
|
+
"filterReset": "Reset filter",
|
|
452
|
+
"expandColumn": "Expand",
|
|
453
|
+
"expandRow": "Expand row",
|
|
454
|
+
"collapseRow": "Collapse row",
|
|
455
|
+
"sortAscending": "Sort ascending",
|
|
456
|
+
"sortDescending": "Sort descending",
|
|
457
|
+
"sortCancel": "Cancel sort",
|
|
458
|
+
"selectColumn": "Select"
|
|
414
459
|
},
|
|
415
460
|
"dataGrid": {
|
|
416
461
|
"search": "Search",
|
|
@@ -478,5 +523,13 @@
|
|
|
478
523
|
"summaryPie": "Pie chart with {slices} slices",
|
|
479
524
|
"summaryTrend": "Bar trend with {points} data points",
|
|
480
525
|
"trendCurrent": "current"
|
|
526
|
+
},
|
|
527
|
+
"rangeTimeline": {
|
|
528
|
+
"outsideRange": "Outside the visible range",
|
|
529
|
+
"schedule": "Schedule"
|
|
530
|
+
},
|
|
531
|
+
"textExamples": {
|
|
532
|
+
"preservedText": "Plain text",
|
|
533
|
+
"sampleText": "First line\n Indented line\n\nLast line"
|
|
481
534
|
}
|
|
482
535
|
}
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"dataEntry": {
|
|
20
20
|
"calendar": {
|
|
21
21
|
"today": "今日",
|
|
22
|
-
"close": "閉じる"
|
|
22
|
+
"close": "閉じる",
|
|
23
|
+
"nav": "{label}のナビゲーション",
|
|
24
|
+
"name": "カレンダー"
|
|
23
25
|
},
|
|
24
26
|
"datePicker": {
|
|
25
27
|
"placeholder": "日付を選択",
|
|
26
|
-
"openCalendar": "カレンダーを開く"
|
|
28
|
+
"openCalendar": "カレンダーを開く",
|
|
29
|
+
"quarter": "第{quarter}四半期"
|
|
27
30
|
},
|
|
28
31
|
"dateRangePicker": {
|
|
29
32
|
"placeholder": "期間を選択",
|
|
@@ -39,7 +42,10 @@
|
|
|
39
42
|
"openPicker": "時刻を選択",
|
|
40
43
|
"meridiem": "午前/午後",
|
|
41
44
|
"am": "午前",
|
|
42
|
-
"pm": "午後"
|
|
45
|
+
"pm": "午後",
|
|
46
|
+
"now": "現在時刻",
|
|
47
|
+
"confirm": "確定",
|
|
48
|
+
"second": "秒"
|
|
43
49
|
},
|
|
44
50
|
"searchInput": {
|
|
45
51
|
"placeholder": "検索…"
|
|
@@ -55,7 +61,7 @@
|
|
|
55
61
|
"upload": {
|
|
56
62
|
"dropzoneLabel": "ファイルをアップロード",
|
|
57
63
|
"dropzoneHint": "ここにドラッグ&ドロップ、またはクリックして選択",
|
|
58
|
-
"dropzoneMeta": "
|
|
64
|
+
"dropzoneMeta": "選択したファイルはここに表示されます。",
|
|
59
65
|
"buttonLabel": "ファイルを選択",
|
|
60
66
|
"addImage": "画像を追加",
|
|
61
67
|
"uploading": "アップロード中…",
|
|
@@ -75,7 +81,17 @@
|
|
|
75
81
|
"statusFailed": "{count} 件のアップロードに失敗",
|
|
76
82
|
"removeImage": "画像を削除",
|
|
77
83
|
"removeFile": "{name} を削除",
|
|
78
|
-
"cropDescription": "ズームスライダーを調整し、保存すると写真を正方形に切り抜きます。"
|
|
84
|
+
"cropDescription": "ズームスライダーを調整し、保存すると写真を正方形に切り抜きます。",
|
|
85
|
+
"preview": "プレビュー",
|
|
86
|
+
"download": "ダウンロード",
|
|
87
|
+
"retry": "再試行",
|
|
88
|
+
"start": "アップロード",
|
|
89
|
+
"cancel": "キャンセル",
|
|
90
|
+
"rejectAccept": "{name}: 許可されていない形式です。",
|
|
91
|
+
"rejectSize": "{name}: ファイルが大きすぎます。",
|
|
92
|
+
"rejectCount": "{name}: ファイル数の上限です。",
|
|
93
|
+
"rejectBeforeUpload": "{name}: ファイルの検証に失敗しました。",
|
|
94
|
+
"readFailed": "選択したフォルダーを読み取れませんでした。"
|
|
79
95
|
},
|
|
80
96
|
"cascader": {
|
|
81
97
|
"placeholder": "選択…",
|
|
@@ -109,6 +125,9 @@
|
|
|
109
125
|
"empty": "該当なし",
|
|
110
126
|
"error": "選択肢を読み込めませんでした"
|
|
111
127
|
},
|
|
128
|
+
"selection": {
|
|
129
|
+
"overflow": "他{count}件"
|
|
130
|
+
},
|
|
112
131
|
"monthPicker": {
|
|
113
132
|
"openGrid": "月選択を開く",
|
|
114
133
|
"previousYear": "前年へ",
|
|
@@ -132,6 +151,14 @@
|
|
|
132
151
|
},
|
|
133
152
|
"formErrors": {
|
|
134
153
|
"title": "入力内容にエラーがあります"
|
|
154
|
+
},
|
|
155
|
+
"form": {
|
|
156
|
+
"optional": "(任意)",
|
|
157
|
+
"success": "確認済み",
|
|
158
|
+
"warning": "確認してください",
|
|
159
|
+
"error": "入力エラー",
|
|
160
|
+
"validating": "確認中",
|
|
161
|
+
"submitFailed": "フォームを送信できませんでした。再試行してください。"
|
|
135
162
|
}
|
|
136
163
|
},
|
|
137
164
|
"feedback": {
|
|
@@ -284,8 +311,13 @@
|
|
|
284
311
|
}
|
|
285
312
|
},
|
|
286
313
|
"navigation": {
|
|
314
|
+
"tabs": {
|
|
315
|
+
"addTab": "タブを追加",
|
|
316
|
+
"removeTab": "タブを閉じる"
|
|
317
|
+
},
|
|
287
318
|
"steps": {
|
|
288
319
|
"ariaLabel": "進行状況",
|
|
320
|
+
"percentLabel": "現在のステップの進捗",
|
|
289
321
|
"status": {
|
|
290
322
|
"wait": "未完了",
|
|
291
323
|
"process": "現在のステップ",
|
|
@@ -323,6 +355,7 @@
|
|
|
323
355
|
"page": "ページ {page}",
|
|
324
356
|
"pageSize": "ページサイズ",
|
|
325
357
|
"pageSizeTrigger": "{size}件",
|
|
358
|
+
"jumpTo": "ページへ移動",
|
|
326
359
|
"pageSizeOption": "{size} 件/ページ",
|
|
327
360
|
"total": "全 {total} 件"
|
|
328
361
|
},
|
|
@@ -398,7 +431,19 @@
|
|
|
398
431
|
"error": "一覧を取得できませんでした",
|
|
399
432
|
"errorDescription": "データを取得できませんでした。時間をおいて再試行してください。",
|
|
400
433
|
"denied": "この一覧を表示する権限がありません",
|
|
401
|
-
"deniedDescription": "閲覧するには管理者に権限の付与を依頼してください。"
|
|
434
|
+
"deniedDescription": "閲覧するには管理者に権限の付与を依頼してください。",
|
|
435
|
+
"selectInvert": "選択を反転",
|
|
436
|
+
"selectNone": "選択を解除",
|
|
437
|
+
"selectionMenu": "選択オプション",
|
|
438
|
+
"filterColumn": "絞り込み",
|
|
439
|
+
"filterReset": "絞り込みを解除",
|
|
440
|
+
"expandColumn": "展開",
|
|
441
|
+
"expandRow": "行を展開",
|
|
442
|
+
"collapseRow": "行を折りたたむ",
|
|
443
|
+
"sortAscending": "昇順に並べ替え",
|
|
444
|
+
"sortDescending": "降順に並べ替え",
|
|
445
|
+
"sortCancel": "並べ替えを解除",
|
|
446
|
+
"selectColumn": "選択"
|
|
402
447
|
},
|
|
403
448
|
"dataGrid": {
|
|
404
449
|
"search": "検索",
|
|
@@ -466,5 +511,13 @@
|
|
|
466
511
|
"summaryPie": "{slices}区分の円グラフ",
|
|
467
512
|
"summaryTrend": "{points}データ点の推移棒グラフ",
|
|
468
513
|
"trendCurrent": "現在"
|
|
514
|
+
},
|
|
515
|
+
"rangeTimeline": {
|
|
516
|
+
"outsideRange": "表示範囲外",
|
|
517
|
+
"schedule": "スケジュール"
|
|
518
|
+
},
|
|
519
|
+
"textExamples": {
|
|
520
|
+
"preservedText": "プレーンテキスト",
|
|
521
|
+
"sampleText": "最初の行\n 字下げした行\n\n最後の行"
|
|
469
522
|
}
|
|
470
523
|
}
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"dataEntry": {
|
|
20
20
|
"calendar": {
|
|
21
21
|
"today": "Hôm nay",
|
|
22
|
-
"close": "Đóng"
|
|
22
|
+
"close": "Đóng",
|
|
23
|
+
"nav": "Điều hướng {label}",
|
|
24
|
+
"name": "Lịch"
|
|
23
25
|
},
|
|
24
26
|
"datePicker": {
|
|
25
27
|
"placeholder": "Chọn ngày",
|
|
26
|
-
"openCalendar": "Mở lịch"
|
|
28
|
+
"openCalendar": "Mở lịch",
|
|
29
|
+
"quarter": "Quý {quarter}"
|
|
27
30
|
},
|
|
28
31
|
"dateRangePicker": {
|
|
29
32
|
"placeholder": "Chọn khoảng ngày",
|
|
@@ -39,7 +42,10 @@
|
|
|
39
42
|
"openPicker": "Mở chọn giờ",
|
|
40
43
|
"meridiem": "Buổi",
|
|
41
44
|
"am": "SA",
|
|
42
|
-
"pm": "CH"
|
|
45
|
+
"pm": "CH",
|
|
46
|
+
"now": "Bây giờ",
|
|
47
|
+
"confirm": "Chọn",
|
|
48
|
+
"second": "Giây"
|
|
43
49
|
},
|
|
44
50
|
"searchInput": {
|
|
45
51
|
"placeholder": "Tìm kiếm…"
|
|
@@ -55,7 +61,7 @@
|
|
|
55
61
|
"upload": {
|
|
56
62
|
"dropzoneLabel": "Tải file lên",
|
|
57
63
|
"dropzoneHint": "Kéo thả file vào đây, hoặc bấm để chọn",
|
|
58
|
-
"dropzoneMeta": "
|
|
64
|
+
"dropzoneMeta": "Tệp đã chọn sẽ hiển thị tại đây.",
|
|
59
65
|
"buttonLabel": "Chọn file",
|
|
60
66
|
"addImage": "Thêm ảnh",
|
|
61
67
|
"uploading": "Đang tải lên…",
|
|
@@ -75,7 +81,17 @@
|
|
|
75
81
|
"statusFailed": "{count} tệp tải lên thất bại",
|
|
76
82
|
"removeImage": "Xóa ảnh",
|
|
77
83
|
"removeFile": "Xóa {name}",
|
|
78
|
-
"cropDescription": "Kéo thanh thu phóng rồi lưu để cắt ảnh thành hình vuông."
|
|
84
|
+
"cropDescription": "Kéo thanh thu phóng rồi lưu để cắt ảnh thành hình vuông.",
|
|
85
|
+
"preview": "Xem trước",
|
|
86
|
+
"download": "Tải xuống",
|
|
87
|
+
"retry": "Thử lại",
|
|
88
|
+
"start": "Tải lên",
|
|
89
|
+
"cancel": "Huỷ",
|
|
90
|
+
"rejectAccept": "{name}: loại tệp không được phép.",
|
|
91
|
+
"rejectSize": "{name}: tệp quá lớn.",
|
|
92
|
+
"rejectCount": "{name}: đã đủ số lượng tệp.",
|
|
93
|
+
"rejectBeforeUpload": "{name}: kiểm tra tệp thất bại.",
|
|
94
|
+
"readFailed": "Không thể đọc thư mục đã chọn."
|
|
79
95
|
},
|
|
80
96
|
"cascader": {
|
|
81
97
|
"placeholder": "Chọn…",
|
|
@@ -109,6 +125,9 @@
|
|
|
109
125
|
"empty": "Không có kết quả",
|
|
110
126
|
"error": "Không tải được lựa chọn"
|
|
111
127
|
},
|
|
128
|
+
"selection": {
|
|
129
|
+
"overflow": "+{count}"
|
|
130
|
+
},
|
|
112
131
|
"monthPicker": {
|
|
113
132
|
"openGrid": "Mở chọn tháng",
|
|
114
133
|
"previousYear": "Năm trước",
|
|
@@ -132,6 +151,14 @@
|
|
|
132
151
|
},
|
|
133
152
|
"formErrors": {
|
|
134
153
|
"title": "Dữ liệu nhập có lỗi, vui lòng kiểm tra"
|
|
154
|
+
},
|
|
155
|
+
"form": {
|
|
156
|
+
"optional": "(không bắt buộc)",
|
|
157
|
+
"success": "Hợp lệ",
|
|
158
|
+
"warning": "Cần kiểm tra",
|
|
159
|
+
"error": "Không hợp lệ",
|
|
160
|
+
"validating": "Đang kiểm tra",
|
|
161
|
+
"submitFailed": "Không thể gửi biểu mẫu. Vui lòng thử lại."
|
|
135
162
|
}
|
|
136
163
|
},
|
|
137
164
|
"feedback": {
|
|
@@ -284,8 +311,13 @@
|
|
|
284
311
|
}
|
|
285
312
|
},
|
|
286
313
|
"navigation": {
|
|
314
|
+
"tabs": {
|
|
315
|
+
"addTab": "Thêm tab",
|
|
316
|
+
"removeTab": "Đóng tab"
|
|
317
|
+
},
|
|
287
318
|
"steps": {
|
|
288
319
|
"ariaLabel": "Tiến trình",
|
|
320
|
+
"percentLabel": "Tiến độ bước hiện tại",
|
|
289
321
|
"status": {
|
|
290
322
|
"wait": "Đang chờ",
|
|
291
323
|
"process": "Bước hiện tại",
|
|
@@ -323,6 +355,7 @@
|
|
|
323
355
|
"page": "Trang {page}",
|
|
324
356
|
"pageSize": "Số dòng mỗi trang",
|
|
325
357
|
"pageSizeTrigger": "{size} / trang",
|
|
358
|
+
"jumpTo": "Tới trang",
|
|
326
359
|
"pageSizeOption": "{size} / trang",
|
|
327
360
|
"total": "Tổng {total} mục"
|
|
328
361
|
},
|
|
@@ -398,7 +431,19 @@
|
|
|
398
431
|
"error": "Không tải được danh sách này",
|
|
399
432
|
"errorDescription": "Không lấy được dữ liệu. Vui lòng thử lại sau giây lát.",
|
|
400
433
|
"denied": "Bạn không có quyền xem danh sách này",
|
|
401
|
-
"deniedDescription": "Hãy đề nghị quản trị viên cấp quyền xem các bản ghi này."
|
|
434
|
+
"deniedDescription": "Hãy đề nghị quản trị viên cấp quyền xem các bản ghi này.",
|
|
435
|
+
"selectInvert": "Đảo lựa chọn",
|
|
436
|
+
"selectNone": "Bỏ chọn tất cả",
|
|
437
|
+
"selectionMenu": "Tuỳ chọn lựa chọn",
|
|
438
|
+
"filterColumn": "Lọc",
|
|
439
|
+
"filterReset": "Bỏ lọc",
|
|
440
|
+
"expandColumn": "Mở rộng",
|
|
441
|
+
"expandRow": "Mở rộng hàng",
|
|
442
|
+
"collapseRow": "Thu gọn hàng",
|
|
443
|
+
"sortAscending": "Sắp xếp tăng dần",
|
|
444
|
+
"sortDescending": "Sắp xếp giảm dần",
|
|
445
|
+
"sortCancel": "Bỏ sắp xếp",
|
|
446
|
+
"selectColumn": "Chọn"
|
|
402
447
|
},
|
|
403
448
|
"dataGrid": {
|
|
404
449
|
"search": "Tìm kiếm",
|
|
@@ -466,5 +511,13 @@
|
|
|
466
511
|
"summaryPie": "Biểu đồ tròn gồm {slices} phần",
|
|
467
512
|
"summaryTrend": "Biểu đồ cột xu hướng gồm {points} điểm dữ liệu",
|
|
468
513
|
"trendCurrent": "hiện tại"
|
|
514
|
+
},
|
|
515
|
+
"rangeTimeline": {
|
|
516
|
+
"outsideRange": "Ngoài khoảng đang xem",
|
|
517
|
+
"schedule": "Lịch công việc"
|
|
518
|
+
},
|
|
519
|
+
"textExamples": {
|
|
520
|
+
"preservedText": "Văn bản thuần",
|
|
521
|
+
"sampleText": "Dòng đầu\n Dòng thụt vào\n\nDòng cuối"
|
|
469
522
|
}
|
|
470
523
|
}
|
package/dist/i18n/translate.d.ts
CHANGED
|
@@ -3,6 +3,25 @@ import vi from "./messages/vi.json" with { type: "json" };
|
|
|
3
3
|
export type Messages = typeof vi;
|
|
4
4
|
export declare const MESSAGE_CATALOG: Record<AppLocale, Record<string, unknown>>;
|
|
5
5
|
export type MessageKey = string;
|
|
6
|
+
/**
|
|
7
|
+
* ADD AN APPLICATION'S OWN STRINGS TO THE LIBRARY'S CATALOG.
|
|
8
|
+
*
|
|
9
|
+
* The catalog used to be closed: `MESSAGE_CATALOG` was exported but there was no way to extend it,
|
|
10
|
+
* so an application had to run a SECOND translation system beside this one — two lookups, two
|
|
11
|
+
* fallback chains, and two places a missing key can hide. That is a real cost for a product whose
|
|
12
|
+
* pages mix library chrome and application copy in the same sentence.
|
|
13
|
+
*
|
|
14
|
+
* MERGES, never replaces: a partial tree is layered onto what is already there, so registering
|
|
15
|
+
* `{ myApp: { title: "…" } }` cannot delete `dataEntry.calendar.today`. Registering the same key
|
|
16
|
+
* twice is last-write-wins, which is what a hot reload needs and what a second call with corrected
|
|
17
|
+
* copy expects.
|
|
18
|
+
*
|
|
19
|
+
* A LIBRARY KEY CANNOT BE SILENTLY REPLACED. Overwriting `dataEntry.*` or any other namespace this
|
|
20
|
+
* package ships would let one application change what a shared component says — invisibly, from a
|
|
21
|
+
* distance, and only in the build where that call ran. Reach for the component's own labels prop
|
|
22
|
+
* instead; every string this library renders has one.
|
|
23
|
+
*/
|
|
24
|
+
export declare function registerMessages(locale: AppLocale, messages: Record<string, unknown>): void;
|
|
6
25
|
export type TranslateParams = Record<string, string | number>;
|
|
7
26
|
/** Resolve a dot-path message with fallback locale chain, CLDR plurals, and locale number formatting. */
|
|
8
27
|
export declare function translate(locale: AppLocale, fallbackLocale: AppLocale, key: MessageKey, params?: TranslateParams): string;
|
package/dist/i18n/translate.js
CHANGED
|
@@ -6,6 +6,29 @@ const MESSAGE_CATALOG = {
|
|
|
6
6
|
en,
|
|
7
7
|
ja
|
|
8
8
|
};
|
|
9
|
+
const LIBRARY_NAMESPACES = new Set(
|
|
10
|
+
Object.values(MESSAGE_CATALOG).flatMap((messages) => Object.keys(messages))
|
|
11
|
+
);
|
|
12
|
+
function registerMessages(locale, messages) {
|
|
13
|
+
const reserved = [...LIBRARY_NAMESPACES].filter((key) => Object.hasOwn(messages, key));
|
|
14
|
+
if (reserved.length > 0) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`@godxjp/ui i18n: [${reserved.join(", ")}] ${reserved.length === 1 ? "is a" : "are"} reserved top-level namespace(s) owned by the library. Register your strings under a namespace of your own, and change what a component says through its \`labels\` prop.`
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
MESSAGE_CATALOG[locale] = mergeDeep(MESSAGE_CATALOG[locale] ?? {}, messages);
|
|
20
|
+
}
|
|
21
|
+
function mergeDeep(target, source) {
|
|
22
|
+
const merged = { ...target };
|
|
23
|
+
for (const [key, value] of Object.entries(source)) {
|
|
24
|
+
const existing = merged[key];
|
|
25
|
+
merged[key] = isPlainObject(existing) && isPlainObject(value) ? mergeDeep(existing, value) : value;
|
|
26
|
+
}
|
|
27
|
+
return merged;
|
|
28
|
+
}
|
|
29
|
+
function isPlainObject(value) {
|
|
30
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
31
|
+
}
|
|
9
32
|
function getNested(obj, path) {
|
|
10
33
|
const parts = path.split(".");
|
|
11
34
|
let current = obj;
|
|
@@ -75,6 +98,7 @@ export {
|
|
|
75
98
|
MESSAGE_CATALOG,
|
|
76
99
|
getSyncedFallbackLocale,
|
|
77
100
|
getSyncedLocale,
|
|
101
|
+
registerMessages,
|
|
78
102
|
resetI18nLocale,
|
|
79
103
|
syncI18nLocale,
|
|
80
104
|
translate,
|
package/dist/inertia/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface InertiaFormLike<TData extends Record<string, unknown> = Record<
|
|
|
11
11
|
errors: Partial<Record<string, string>>;
|
|
12
12
|
/** True while a submit request is in flight. */
|
|
13
13
|
processing: boolean;
|
|
14
|
+
reset?(): void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Wrap an Inertia `useForm()` object as a framework-agnostic {@link FormStateAdapter} so it drives
|
|
@@ -105,3 +106,22 @@ export interface InertiaLinkLike {
|
|
|
105
106
|
* ```
|
|
106
107
|
*/
|
|
107
108
|
export declare function inertiaSidebarLink<P extends InertiaLinkLike>(Link: ComponentType<P>): SidebarLinkComponentProp;
|
|
109
|
+
/** Visit callbacks needed to connect Upload to an Inertia multipart endpoint. */
|
|
110
|
+
export interface InertiaUploadCallbacks {
|
|
111
|
+
forceFormData: true;
|
|
112
|
+
async: true;
|
|
113
|
+
onProgress: (progress: {
|
|
114
|
+
percentage?: number;
|
|
115
|
+
} | undefined) => void;
|
|
116
|
+
onSuccess: () => void;
|
|
117
|
+
onError: (errors: Record<string, string>) => void;
|
|
118
|
+
onCancelToken: (token: {
|
|
119
|
+
cancel: () => void;
|
|
120
|
+
}) => void;
|
|
121
|
+
onCancel: () => void;
|
|
122
|
+
onNetworkError: (error: Error) => boolean;
|
|
123
|
+
onHttpException: () => boolean;
|
|
124
|
+
onFinish: () => void;
|
|
125
|
+
}
|
|
126
|
+
/** Bridge redirect-based Inertia uploads to Upload's progress/abort/retry lifecycle. */
|
|
127
|
+
export declare function inertiaUpload(send: (file: File, callbacks: InertiaUploadCallbacks) => void, errorMessage: string): NonNullable<import("../props/components/data-entry.prop.js").UploadProp["onUpload"]>;
|
package/dist/inertia/index.js
CHANGED
|
@@ -6,7 +6,8 @@ function inertiaAdapter(form) {
|
|
|
6
6
|
setValue: (name, value) => form.setData(name, value),
|
|
7
7
|
getError: (name) => form.errors[name],
|
|
8
8
|
isSubmitting: form.processing,
|
|
9
|
-
getValues: () => form.data
|
|
9
|
+
getValues: () => form.data,
|
|
10
|
+
reset: form.reset ? () => form.reset?.() : void 0
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
function useInertiaField(form, name) {
|
|
@@ -20,8 +21,66 @@ function useInertiaField(form, name) {
|
|
|
20
21
|
function inertiaSidebarLink(Link) {
|
|
21
22
|
return createSidebarLink(Link, "href");
|
|
22
23
|
}
|
|
24
|
+
function inertiaUpload(send, errorMessage) {
|
|
25
|
+
return (file, _item, context) => new Promise((resolve, reject) => {
|
|
26
|
+
let cancel;
|
|
27
|
+
let settled = false;
|
|
28
|
+
const abort = () => {
|
|
29
|
+
cancel?.();
|
|
30
|
+
fail(new DOMException("Upload aborted", "AbortError"));
|
|
31
|
+
};
|
|
32
|
+
const cleanup = () => context.signal.removeEventListener("abort", abort);
|
|
33
|
+
const fail = (error) => {
|
|
34
|
+
if (settled) return;
|
|
35
|
+
settled = true;
|
|
36
|
+
cleanup();
|
|
37
|
+
reject(error);
|
|
38
|
+
};
|
|
39
|
+
if (context.signal.aborted) {
|
|
40
|
+
abort();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
context.signal.addEventListener("abort", abort, { once: true });
|
|
44
|
+
try {
|
|
45
|
+
send(file, {
|
|
46
|
+
forceFormData: true,
|
|
47
|
+
async: true,
|
|
48
|
+
onProgress: (progress) => {
|
|
49
|
+
if (!settled) context.onProgress(progress?.percentage ?? 0);
|
|
50
|
+
},
|
|
51
|
+
onSuccess: () => {
|
|
52
|
+
if (!settled) {
|
|
53
|
+
settled = true;
|
|
54
|
+
cleanup();
|
|
55
|
+
resolve({});
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
onError: (errors) => fail(new Error(Object.values(errors)[0] ?? errorMessage)),
|
|
59
|
+
onCancelToken: (token) => {
|
|
60
|
+
cancel = token.cancel;
|
|
61
|
+
if (context.signal.aborted) token.cancel();
|
|
62
|
+
},
|
|
63
|
+
onCancel: () => fail(new DOMException("Upload aborted", "AbortError")),
|
|
64
|
+
onNetworkError: () => {
|
|
65
|
+
fail(new Error(errorMessage));
|
|
66
|
+
return false;
|
|
67
|
+
},
|
|
68
|
+
onHttpException: () => {
|
|
69
|
+
fail(new Error(errorMessage));
|
|
70
|
+
return false;
|
|
71
|
+
},
|
|
72
|
+
onFinish: () => {
|
|
73
|
+
if (!settled) fail(new Error(errorMessage));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
} catch (error) {
|
|
77
|
+
fail(error);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
23
81
|
export {
|
|
24
82
|
inertiaAdapter,
|
|
25
83
|
inertiaSidebarLink,
|
|
84
|
+
inertiaUpload,
|
|
26
85
|
useInertiaField
|
|
27
86
|
};
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
/** Shared control sizing — reads `--control-height`, `--font-size-*` from density / theme. */
|
|
2
|
-
export declare const controlMultilineClass = "ui-control-multiline aria-invalid:border-destructive w-full rounded-[var(--control-radius)] border-input bg-background ring-offset-background placeholder:text-muted-foreground
|
|
2
|
+
export declare const controlMultilineClass = "ui-control-multiline aria-invalid:border-destructive data-[status=error]:border-destructive data-[status=warning]:border-warning w-full rounded-[var(--control-radius)] border-input bg-background ring-offset-background placeholder:text-muted-foreground";
|
|
3
3
|
/**
|
|
4
4
|
* Multiline control with its own chrome removed, for a textarea EMBEDDED in a surface that already
|
|
5
5
|
* draws the box — a chat composer inside a Card, an inline edit cell, a comment box in a panel.
|
|
6
6
|
* Two nested rounded borders is the tell that this was missing.
|
|
7
7
|
*/
|
|
8
|
-
export declare const controlMultilineGhostClass = "ui-control-multiline w-full min-h-0 border-0 bg-transparent shadow-none placeholder:text-muted-foreground focus-visible:
|
|
8
|
+
export declare const controlMultilineGhostClass = "ui-control-multiline data-[status=error]:border-destructive data-[status=warning]:border-warning w-full min-h-0 border-0 bg-transparent shadow-none placeholder:text-muted-foreground focus-visible:ring-0";
|
|
9
|
+
/**
|
|
10
|
+
* Multiline control drawn as antd's `filled` variant — a tinted surface instead of a boundary.
|
|
11
|
+
*
|
|
12
|
+
* It is a SEPARATE string rather than `controlMultilineClass` plus a modifier because
|
|
13
|
+
* `bg-background` lives in `@layer utilities`, which outranks every component-layer rule: a
|
|
14
|
+
* `.ui-control--filled` appended to the outlined list would be silently overpainted and no gate
|
|
15
|
+
* would catch it. The two lists differ only in which chrome utilities they carry.
|
|
16
|
+
*/
|
|
17
|
+
export declare const controlMultilineFilledClass = "ui-control-multiline ui-control--filled aria-invalid:border-destructive data-[status=error]:border-destructive data-[status=warning]:border-warning w-full rounded-[var(--control-radius)] ring-offset-background placeholder:text-muted-foreground";
|
|
9
18
|
/**
|
|
10
19
|
* Open-state ring for popup-style triggers (Select / Cascader / TreeSelect / SearchSelect). Radix
|
|
11
20
|
* moves focus INTO the popup on open, so the trigger loses `:focus-visible` and — without this —
|
|
12
21
|
* an open popover shows only a border change (no ring), inconsistent with a focused Input.
|
|
13
22
|
*/
|
|
14
23
|
export declare const controlOpenRingClass = "ui-control-trigger";
|
|
15
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The trigger WITHOUT a surface — no `border-input`, no `bg-background`.
|
|
26
|
+
*
|
|
27
|
+
* Those two are Tailwind utilities, and `@layer utilities` beats `@layer components`, so a
|
|
28
|
+
* `[data-variant]` / `[data-status]` rule in control.css can never recolour a trigger that carries
|
|
29
|
+
* them (the same trap that killed `.ui-app-setting-picker-icon` in gh#366 and
|
|
30
|
+
* `--control-bounded-width` in gh#375). A control that wants the antd `variant` × `status` matrix
|
|
31
|
+
* therefore composes THIS class plus `ui-control-surface`, which supplies the identical resting
|
|
32
|
+
* border and fill from `--control-surface-*`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const controlTriggerBaseClass = "ui-control ui-control-trigger flex items-center justify-between gap-2 whitespace-nowrap rounded-[var(--control-radius)] transition-[color,box-shadow] [&>[data-slot=select-value]]:line-clamp-1";
|
|
35
|
+
export declare const controlTriggerClass = "ui-control ui-control-trigger flex items-center justify-between gap-2 whitespace-nowrap rounded-[var(--control-radius)] transition-[color,box-shadow] [&>[data-slot=select-value]]:line-clamp-1 border-input bg-background";
|
|
36
|
+
/** `controlTriggerBaseClass` + the token-driven surface — the select-family trigger. */
|
|
37
|
+
export declare const controlSurfaceTriggerClass = "ui-control ui-control-trigger flex items-center justify-between gap-2 whitespace-nowrap rounded-[var(--control-radius)] transition-[color,box-shadow] [&>[data-slot=select-value]]:line-clamp-1 ui-control-surface";
|
|
16
38
|
export declare const controlIconClass = "size-[length:var(--control-height)] shrink-0";
|
|
17
39
|
export declare const controlIconSmClass = "size-[calc(var(--control-height)-0.5rem)] shrink-0";
|
|
18
40
|
/** Leading/affix icon inside an input row (search, command) — sized to `--control-icon-size`. */
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
const controlMultilineClass = "ui-control-multiline aria-invalid:border-destructive w-full rounded-[var(--control-radius)] border-input bg-background ring-offset-background placeholder:text-muted-foreground
|
|
2
|
-
const controlMultilineGhostClass = "ui-control-multiline w-full min-h-0 border-0 bg-transparent shadow-none placeholder:text-muted-foreground focus-visible:
|
|
1
|
+
const controlMultilineClass = "ui-control-multiline aria-invalid:border-destructive data-[status=error]:border-destructive data-[status=warning]:border-warning w-full rounded-[var(--control-radius)] border-input bg-background ring-offset-background placeholder:text-muted-foreground";
|
|
2
|
+
const controlMultilineGhostClass = "ui-control-multiline data-[status=error]:border-destructive data-[status=warning]:border-warning w-full min-h-0 border-0 bg-transparent shadow-none placeholder:text-muted-foreground focus-visible:ring-0";
|
|
3
|
+
const controlMultilineFilledClass = "ui-control-multiline ui-control--filled aria-invalid:border-destructive data-[status=error]:border-destructive data-[status=warning]:border-warning w-full rounded-[var(--control-radius)] ring-offset-background placeholder:text-muted-foreground";
|
|
3
4
|
const controlOpenRingClass = "ui-control-trigger";
|
|
4
|
-
const
|
|
5
|
+
const controlTriggerBaseClass = "ui-control ui-control-trigger flex items-center justify-between gap-2 whitespace-nowrap rounded-[var(--control-radius)] transition-[color,box-shadow] [&>[data-slot=select-value]]:line-clamp-1";
|
|
6
|
+
const controlTriggerClass = `${controlTriggerBaseClass} border-input bg-background`;
|
|
7
|
+
const controlSurfaceTriggerClass = `${controlTriggerBaseClass} ui-control-surface`;
|
|
5
8
|
const controlIconClass = "size-[length:var(--control-height)] shrink-0";
|
|
6
9
|
const controlIconSmClass = "size-[calc(var(--control-height)-0.5rem)] shrink-0";
|
|
7
10
|
const controlIconLeadingClass = "size-[length:var(--control-icon-size)] shrink-0";
|
|
@@ -20,8 +23,11 @@ export {
|
|
|
20
23
|
controlIconLeadingClass,
|
|
21
24
|
controlIconSmClass,
|
|
22
25
|
controlMultilineClass,
|
|
26
|
+
controlMultilineFilledClass,
|
|
23
27
|
controlMultilineGhostClass,
|
|
24
28
|
controlOpenRingClass,
|
|
29
|
+
controlSurfaceTriggerClass,
|
|
30
|
+
controlTriggerBaseClass,
|
|
25
31
|
controlTriggerClass,
|
|
26
32
|
tableCellPaddingClass,
|
|
27
33
|
tableHeadHeightClass,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Locale } from "date-fns";
|
|
2
|
+
import type { DatePickerBaseProp, PickerDateFormatProp } from "../../props/components/data-entry.prop.js";
|
|
3
|
+
/** Display is independent from the canonical value submitted by the field. */
|
|
4
|
+
export declare function formatPickerDate(date: Date | undefined, format: PickerDateFormatProp | undefined, locale: string, withTime?: boolean): string;
|
|
5
|
+
export declare function parsePickerDate(text: string, format: PickerDateFormatProp | undefined, parser?: (text: string) => Date | undefined, withTime?: boolean): Date | undefined;
|
|
6
|
+
export declare function pickerDateAllowed(date: Date, min: Date | undefined, max: Date | undefined, disabled?: (date: Date) => boolean): boolean;
|
|
7
|
+
/** Normalize a reporting period with the active calendar's week convention. */
|
|
8
|
+
export declare function pickerPeriodStart(date: Date, picker: DatePickerBaseProp["picker"], locale: Pick<Locale, "options">): Date;
|