@qijenchen/design-system 0.1.0-beta.80 → 0.1.0-beta.81
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/CLAUDE.md +1 -0
- package/dist/components/Alert/alert.d.ts +5 -0
- package/dist/components/Alert/alert.d.ts.map +1 -1
- package/dist/components/Alert/alert.js +4 -1
- package/dist/components/Alert/alert.js.map +1 -1
- package/dist/components/AppShell/app-shell.d.ts +1 -1
- package/dist/components/AppShell/app-shell.js.map +1 -1
- package/dist/components/AspectRatio/aspect-ratio.d.ts +2 -1
- package/dist/components/AspectRatio/aspect-ratio.d.ts.map +1 -1
- package/dist/components/AspectRatio/aspect-ratio.js +1 -1
- package/dist/components/AspectRatio/aspect-ratio.js.map +1 -1
- package/dist/components/Avatar/avatar.d.ts +3 -2
- package/dist/components/Avatar/avatar.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.js +7 -1
- package/dist/components/Avatar/avatar.js.map +1 -1
- package/dist/components/Badge/badge.d.ts.map +1 -1
- package/dist/components/Badge/badge.js +2 -1
- package/dist/components/Badge/badge.js.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.d.ts +14 -1
- package/dist/components/Breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.js +9 -3
- package/dist/components/Breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts.map +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.js.map +1 -1
- package/dist/components/Button/button.d.ts +3 -3
- package/dist/components/Button/button.d.ts.map +1 -1
- package/dist/components/Button/button.js +68 -42
- package/dist/components/Button/button.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +3 -0
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Carousel/carousel.d.ts.map +1 -1
- package/dist/components/Carousel/carousel.js.map +1 -1
- package/dist/components/Chart/chart.d.ts.map +1 -1
- package/dist/components/Chart/chart.js +1 -1
- package/dist/components/Chart/chart.js.map +1 -1
- package/dist/components/Checkbox/checkbox.d.ts +5 -2
- package/dist/components/Checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/checkbox.js +24 -3
- package/dist/components/Checkbox/checkbox.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index.js +3 -0
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Chip/chip.d.ts +7 -1
- package/dist/components/Chip/chip.d.ts.map +1 -1
- package/dist/components/Chip/chip.js +5 -1
- package/dist/components/Chip/chip.js.map +1 -1
- package/dist/components/Coachmark/coachmark.d.ts +5 -3
- package/dist/components/Coachmark/coachmark.d.ts.map +1 -1
- package/dist/components/Coachmark/coachmark.js +4 -1
- package/dist/components/Coachmark/coachmark.js.map +1 -1
- package/dist/components/Combobox/combobox.d.ts +2 -0
- package/dist/components/Combobox/combobox.d.ts.map +1 -1
- package/dist/components/Combobox/combobox.js +7 -6
- package/dist/components/Combobox/combobox.js.map +1 -1
- package/dist/components/Command/command.d.ts +1 -1
- package/dist/components/Command/command.js +2 -1
- package/dist/components/Command/command.js.map +1 -1
- package/dist/components/DataTable/active-editor-controller.d.ts +4 -3
- package/dist/components/DataTable/active-editor-controller.d.ts.map +1 -1
- package/dist/components/DataTable/cell-registry.d.ts.map +1 -1
- package/dist/components/DataTable/cell-registry.js +3 -0
- package/dist/components/DataTable/cell-registry.js.map +1 -1
- package/dist/components/DataTable/data-table-filter-panel.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-interaction-layer.d.ts +4 -3
- package/dist/components/DataTable/data-table-interaction-layer.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-interaction-layer.js.map +1 -1
- package/dist/components/DataTable/data-table.d.ts +9 -6
- package/dist/components/DataTable/data-table.d.ts.map +1 -1
- package/dist/components/DataTable/data-table.js +142 -50
- package/dist/components/DataTable/data-table.js.map +1 -1
- package/dist/components/DataTable/filter-tree.d.ts +5 -0
- package/dist/components/DataTable/filter-tree.d.ts.map +1 -1
- package/dist/components/DateGrid/date-grid.d.ts +1 -1
- package/dist/components/DateGrid/date-grid.d.ts.map +1 -1
- package/dist/components/DateGrid/date-grid.js +6 -4
- package/dist/components/DateGrid/date-grid.js.map +1 -1
- package/dist/components/DatePicker/date-picker.d.ts.map +1 -1
- package/dist/components/DatePicker/date-picker.js +124 -106
- package/dist/components/DatePicker/date-picker.js.map +1 -1
- package/dist/components/Dialog/dialog.d.ts +1 -1
- package/dist/components/Dialog/dialog.d.ts.map +1 -1
- package/dist/components/Dialog/dialog.js +2 -1
- package/dist/components/Dialog/dialog.js.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.d.ts +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.js +11 -4
- package/dist/components/DropdownMenu/dropdown-menu.js.map +1 -1
- package/dist/components/Field/field-wrapper.d.ts +1 -0
- package/dist/components/Field/field-wrapper.d.ts.map +1 -1
- package/dist/components/Field/field-wrapper.js +27 -7
- package/dist/components/Field/field-wrapper.js.map +1 -1
- package/dist/components/Field/use-form-validation.d.ts +5 -1
- package/dist/components/Field/use-form-validation.d.ts.map +1 -1
- package/dist/components/Field/use-form-validation.js +26 -14
- package/dist/components/Field/use-form-validation.js.map +1 -1
- package/dist/components/FieldControlGroup/field-control-group.d.ts +3 -3
- package/dist/components/FieldControlGroup/field-control-group.js.map +1 -1
- package/dist/components/FileItem/file-item.d.ts.map +1 -1
- package/dist/components/FileItem/file-item.js +3 -2
- package/dist/components/FileItem/file-item.js.map +1 -1
- package/dist/components/FileUpload/file-upload.d.ts.map +1 -1
- package/dist/components/FileUpload/file-upload.js +12 -6
- package/dist/components/FileUpload/file-upload.js.map +1 -1
- package/dist/components/FileViewer/file-viewer.d.ts.map +1 -1
- package/dist/components/FileViewer/file-viewer.js +4 -3
- package/dist/components/FileViewer/file-viewer.js.map +1 -1
- package/dist/components/Input/input.d.ts.map +1 -1
- package/dist/components/Input/input.js +1 -5
- package/dist/components/Input/input.js.map +1 -1
- package/dist/components/LinkInput/link-input.d.ts +2 -2
- package/dist/components/LinkInput/link-input.d.ts.map +1 -1
- package/dist/components/LinkInput/link-input.js +29 -28
- package/dist/components/LinkInput/link-input.js.map +1 -1
- package/dist/components/Menu/menu-item.d.ts.map +1 -1
- package/dist/components/Menu/menu-item.js +1 -1
- package/dist/components/Menu/menu-item.js.map +1 -1
- package/dist/components/Notice/notice.d.ts +5 -0
- package/dist/components/Notice/notice.d.ts.map +1 -1
- package/dist/components/Notice/notice.js +11 -5
- package/dist/components/Notice/notice.js.map +1 -1
- package/dist/components/NumberInput/number-input.d.ts.map +1 -1
- package/dist/components/NumberInput/number-input.js +15 -7
- package/dist/components/NumberInput/number-input.js.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.js +2 -1
- package/dist/components/OverflowIndicator/overflow-indicator.js.map +1 -1
- package/dist/components/PeoplePicker/people-picker.d.ts +2 -2
- package/dist/components/PeoplePicker/people-picker.d.ts.map +1 -1
- package/dist/components/PeoplePicker/people-picker.js +36 -35
- package/dist/components/PeoplePicker/people-picker.js.map +1 -1
- package/dist/components/PeoplePicker/person-display.d.ts.map +1 -1
- package/dist/components/PeoplePicker/person-display.js +2 -2
- package/dist/components/PeoplePicker/person-display.js.map +1 -1
- package/dist/components/Popover/popover.js.map +1 -1
- package/dist/components/ProfileCard/profile-card.d.ts +5 -2
- package/dist/components/ProfileCard/profile-card.d.ts.map +1 -1
- package/dist/components/ProfileCard/profile-card.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.d.ts +1 -1
- package/dist/components/RadioGroup/radio-group.d.ts.map +1 -1
- package/dist/components/RadioGroup/radio-group.js +27 -3
- package/dist/components/RadioGroup/radio-group.js.map +1 -1
- package/dist/components/Rating/rating.js +3 -3
- package/dist/components/Rating/rating.js.map +1 -1
- package/dist/components/ScrollArea/scroll-area.d.ts +1 -1
- package/dist/components/ScrollArea/scroll-area.js +2 -2
- package/dist/components/ScrollArea/scroll-area.js.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.d.ts +2 -2
- package/dist/components/SegmentedControl/segmented-control.d.ts.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.js +10 -5
- package/dist/components/SegmentedControl/segmented-control.js.map +1 -1
- package/dist/components/Select/select.d.ts +9 -3
- package/dist/components/Select/select.d.ts.map +1 -1
- package/dist/components/Select/select.js +45 -13
- package/dist/components/Select/select.js.map +1 -1
- package/dist/components/SelectMenu/index.js +2 -1
- package/dist/components/SelectMenu/select-menu.d.ts +17 -4
- package/dist/components/SelectMenu/select-menu.d.ts.map +1 -1
- package/dist/components/SelectMenu/select-menu.js +39 -6
- package/dist/components/SelectMenu/select-menu.js.map +1 -1
- package/dist/components/Separator/separator.js +1 -1
- package/dist/components/Separator/separator.js.map +1 -1
- package/dist/components/Sheet/sheet.d.ts +1 -1
- package/dist/components/Sheet/sheet.d.ts.map +1 -1
- package/dist/components/Sheet/sheet.js +2 -1
- package/dist/components/Sheet/sheet.js.map +1 -1
- package/dist/components/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/sidebar.js +23 -8
- package/dist/components/Sidebar/sidebar.js.map +1 -1
- package/dist/components/Skeleton/skeleton.d.ts +1 -1
- package/dist/components/Skeleton/skeleton.js +2 -2
- package/dist/components/Skeleton/skeleton.js.map +1 -1
- package/dist/components/Steps/steps.d.ts.map +1 -1
- package/dist/components/Steps/steps.js +6 -3
- package/dist/components/Steps/steps.js.map +1 -1
- package/dist/components/Switch/switch.d.ts +2 -2
- package/dist/components/Switch/switch.d.ts.map +1 -1
- package/dist/components/Switch/switch.js +38 -8
- package/dist/components/Switch/switch.js.map +1 -1
- package/dist/components/Tabs/tabs.d.ts +5 -2
- package/dist/components/Tabs/tabs.d.ts.map +1 -1
- package/dist/components/Tabs/tabs.js +16 -24
- package/dist/components/Tabs/tabs.js.map +1 -1
- package/dist/components/Tag/tag.d.ts.map +1 -1
- package/dist/components/Tag/tag.js +7 -3
- package/dist/components/Tag/tag.js.map +1 -1
- package/dist/components/Textarea/textarea.d.ts +2 -1
- package/dist/components/Textarea/textarea.d.ts.map +1 -1
- package/dist/components/Textarea/textarea.js +20 -12
- package/dist/components/Textarea/textarea.js.map +1 -1
- package/dist/components/TimePicker/time-picker.d.ts +2 -2
- package/dist/components/TimePicker/time-picker.d.ts.map +1 -1
- package/dist/components/TimePicker/time-picker.js +5 -7
- package/dist/components/TimePicker/time-picker.js.map +1 -1
- package/dist/components/Toast/toast.d.ts +1 -1
- package/dist/components/Toast/toast.d.ts.map +1 -1
- package/dist/components/Toast/toast.js +3 -2
- package/dist/components/Toast/toast.js.map +1 -1
- package/dist/components/Tooltip/tooltip.js +1 -1
- package/dist/components/Tooltip/tooltip.js.map +1 -1
- package/dist/components/TreeView/tree-view.d.ts.map +1 -1
- package/dist/components/TreeView/tree-view.js +3 -2
- package/dist/components/TreeView/tree-view.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.d.ts +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.js.map +1 -1
- package/dist/patterns/overlay-surface/overlay-surface.js.map +1 -1
- package/dist/tokens/categorical-color.d.ts +1 -1
- package/dist/tokens/categorical-color.js.map +1 -1
- package/dist/tokens/uiSize/icon-size.d.ts +2 -2
- package/ds-canonical/fork/governance.lock +1 -1
- package/ds-canonical/fork/hooks/check_opacity_token_usage.sh +10 -1
- package/ds-canonical/hooks/check_audit_post_report_validator.sh +13 -0
- package/ds-canonical/hooks/check_full_story_visual_interaction_sweep.sh +4 -3
- package/ds-canonical/hooks/check_opacity_token_usage.sh +10 -1
- package/ds-canonical/hooks/check_plugin_fork_health.sh +30 -22
- package/ds-canonical/hooks/check_story_invariants.sh +17 -5
- package/ds-canonical/hooks/check_substantive_edit_approval_preflight.sh +5 -2
- package/ds-canonical/references/principle-dim-map.json +100 -0
- package/ds-canonical/references/story-baseline-registry.json +4 -3
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +1 -1
- package/ds-canonical/skills/design-system-audit/SKILL.md +2 -2
- package/ds-story-manifest.json +16 -16
- package/llms-full.txt +6 -1
- package/llms.txt +2 -1
- package/package.json +1 -1
- package/src/components/Alert/alert.anatomy.stories.tsx +9 -6
- package/src/components/Alert/alert.spec.md +3 -3
- package/src/components/Alert/alert.tsx +9 -1
- package/src/components/AppShell/app-shell.anatomy.stories.tsx +3 -0
- package/src/components/AppShell/app-shell.spec.md +3 -2
- package/src/components/AppShell/app-shell.tsx +1 -1
- package/src/components/AspectRatio/aspect-ratio.spec.md +1 -2
- package/src/components/AspectRatio/aspect-ratio.tsx +3 -2
- package/src/components/Avatar/avatar.principles.stories.tsx +1 -1
- package/src/components/Avatar/avatar.spec.md +1 -1
- package/src/components/Avatar/avatar.stories.tsx +1 -1
- package/src/components/Avatar/avatar.tsx +17 -9
- package/src/components/Badge/badge.anatomy.stories.tsx +2 -2
- package/src/components/Badge/badge.spec.md +4 -4
- package/src/components/Badge/badge.tsx +4 -1
- package/src/components/Breadcrumb/breadcrumb.anatomy.stories.tsx +2 -2
- package/src/components/Breadcrumb/breadcrumb.principles.stories.tsx +15 -10
- package/src/components/Breadcrumb/breadcrumb.spec.md +4 -2
- package/src/components/Breadcrumb/breadcrumb.tsx +10 -4
- package/src/components/BulkActionBar/bulk-action-bar.anatomy.stories.tsx +2 -1
- package/src/components/BulkActionBar/bulk-action-bar.spec.md +15 -14
- package/src/components/BulkActionBar/bulk-action-bar.tsx +2 -2
- package/src/components/Button/button.anatomy.stories.tsx +6 -6
- package/src/components/Button/button.spec.md +2 -2
- package/src/components/Button/button.tsx +63 -26
- package/src/components/Button/index.ts +1 -0
- package/src/components/Calendar/calendar.anatomy.stories.tsx +2 -2
- package/src/components/Calendar/calendar.spec.md +7 -1
- package/src/components/Carousel/carousel.principles.stories.tsx +1 -1
- package/src/components/Carousel/carousel.tsx +1 -0
- package/src/components/Chart/chart.spec.md +1 -1
- package/src/components/Chart/chart.tsx +2 -1
- package/src/components/Checkbox/checkbox.principles.stories.tsx +1 -1
- package/src/components/Checkbox/checkbox.spec.md +1 -1
- package/src/components/Checkbox/checkbox.tsx +39 -6
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/chip.anatomy.stories.tsx +1 -1
- package/src/components/Chip/chip.spec.md +1 -1
- package/src/components/Chip/chip.tsx +4 -4
- package/src/components/CircularProgress/circular-progress.anatomy.stories.tsx +1 -1
- package/src/components/CircularProgress/circular-progress.principles.stories.tsx +7 -5
- package/src/components/CircularProgress/circular-progress.spec.md +2 -0
- package/src/components/CircularProgress/circular-progress.stories.tsx +3 -11
- package/src/components/Coachmark/coachmark.anatomy.stories.tsx +2 -2
- package/src/components/Coachmark/coachmark.principles.stories.tsx +1 -1
- package/src/components/Coachmark/coachmark.spec.md +3 -3
- package/src/components/Coachmark/coachmark.tsx +13 -5
- package/src/components/Combobox/combobox.anatomy.stories.tsx +4 -4
- package/src/components/Combobox/combobox.spec.md +1 -1
- package/src/components/Combobox/combobox.tsx +23 -16
- package/src/components/Command/command.principles.stories.tsx +10 -12
- package/src/components/Command/command.spec.md +5 -5
- package/src/components/Command/command.stories.tsx +4 -4
- package/src/components/Command/command.tsx +1 -1
- package/src/components/DataTable/active-editor-controller.ts +4 -3
- package/src/components/DataTable/cell-registry.tsx +8 -0
- package/src/components/DataTable/data-table-filter-panel.tsx +8 -2
- package/src/components/DataTable/data-table-interaction-layer.tsx +8 -7
- package/src/components/DataTable/data-table.anatomy.stories.tsx +4 -4
- package/src/components/DataTable/data-table.css +2 -2
- package/src/components/DataTable/data-table.spec.md +25 -25
- package/src/components/DataTable/data-table.stories.tsx +4 -3
- package/src/components/DataTable/data-table.tsx +203 -52
- package/src/components/DataTable/filter-operators.spec.md +4 -4
- package/src/components/DataTable/filter-tree.ts +32 -9
- package/src/components/DateGrid/date-grid.anatomy.stories.tsx +1 -1
- package/src/components/DateGrid/date-grid.spec.md +6 -4
- package/src/components/DateGrid/date-grid.tsx +7 -5
- package/src/components/DatePicker/date-picker.principles.stories.tsx +1 -1
- package/src/components/DatePicker/date-picker.spec.md +1 -0
- package/src/components/DatePicker/date-picker.stories.tsx +19 -0
- package/src/components/DatePicker/date-picker.tsx +33 -12
- package/src/components/DescriptionList/description-list.spec.md +1 -1
- package/src/components/Dialog/dialog.spec.md +1 -1
- package/src/components/Dialog/dialog.tsx +2 -1
- package/src/components/DropdownMenu/dropdown-menu.anatomy.stories.tsx +3 -1
- package/src/components/DropdownMenu/dropdown-menu.spec.md +4 -2
- package/src/components/DropdownMenu/dropdown-menu.tsx +11 -3
- package/src/components/Empty/empty.anatomy.stories.tsx +1 -1
- package/src/components/Empty/empty.spec.md +2 -1
- package/src/components/Empty/empty.stories.tsx +4 -15
- package/src/components/Field/field-controls.spec.md +1 -0
- package/src/components/Field/field-wrapper.tsx +28 -8
- package/src/components/Field/field.anatomy.stories.tsx +7 -7
- package/src/components/Field/field.principles.stories.tsx +1 -1
- package/src/components/Field/field.spec.md +9 -7
- package/src/components/Field/form-validation.spec.md +5 -2
- package/src/components/Field/use-form-validation.ts +38 -14
- package/src/components/FieldControlGroup/field-control-group.anatomy.stories.tsx +11 -10
- package/src/components/FieldControlGroup/field-control-group.principles.stories.tsx +3 -3
- package/src/components/FieldControlGroup/field-control-group.spec.md +3 -3
- package/src/components/FieldControlGroup/field-control-group.tsx +3 -3
- package/src/components/FileItem/file-item.anatomy.stories.tsx +6 -4
- package/src/components/FileItem/file-item.tsx +3 -2
- package/src/components/FileUpload/file-upload.anatomy.stories.tsx +1 -1
- package/src/components/FileUpload/file-upload.spec.md +3 -0
- package/src/components/FileUpload/file-upload.tsx +21 -6
- package/src/components/FileViewer/file-viewer.anatomy.stories.tsx +6 -4
- package/src/components/FileViewer/file-viewer.spec.md +2 -2
- package/src/components/FileViewer/file-viewer.tsx +4 -3
- package/src/components/Input/input.anatomy.stories.tsx +4 -4
- package/src/components/Input/input.principles.stories.tsx +1 -1
- package/src/components/Input/input.spec.md +1 -1
- package/src/components/Input/input.stories.tsx +11 -5
- package/src/components/Input/input.tsx +1 -5
- package/src/components/LinkInput/link-input.anatomy.stories.tsx +2 -0
- package/src/components/LinkInput/link-input.tsx +45 -33
- package/src/components/Menu/menu-item.spec.md +2 -1
- package/src/components/Menu/menu-item.tsx +3 -1
- package/src/components/Notice/notice.anatomy.stories.tsx +10 -5
- package/src/components/Notice/notice.spec.md +4 -3
- package/src/components/Notice/notice.tsx +22 -5
- package/src/components/NumberInput/number-input.anatomy.stories.tsx +5 -4
- package/src/components/NumberInput/number-input.principles.stories.tsx +2 -1
- package/src/components/NumberInput/number-input.spec.md +2 -1
- package/src/components/NumberInput/number-input.tsx +23 -8
- package/src/components/OverflowIndicator/overflow-indicator.anatomy.stories.tsx +3 -3
- package/src/components/OverflowIndicator/overflow-indicator.spec.md +1 -1
- package/src/components/OverflowIndicator/overflow-indicator.tsx +2 -1
- package/src/components/PeoplePicker/people-picker.anatomy.stories.tsx +1 -1
- package/src/components/PeoplePicker/people-picker.spec.md +4 -4
- package/src/components/PeoplePicker/people-picker.stories.tsx +1 -1
- package/src/components/PeoplePicker/people-picker.tsx +63 -54
- package/src/components/PeoplePicker/person-display.tsx +5 -3
- package/src/components/Popover/popover.anatomy.stories.tsx +1 -1
- package/src/components/Popover/popover.spec.md +11 -13
- package/src/components/Popover/popover.tsx +2 -2
- package/src/components/ProfileCard/profile-card.anatomy.stories.tsx +4 -4
- package/src/components/ProfileCard/profile-card.principles.stories.tsx +2 -2
- package/src/components/ProfileCard/profile-card.spec.md +1 -2
- package/src/components/ProfileCard/profile-card.stories.tsx +1 -1
- package/src/components/ProfileCard/profile-card.tsx +5 -2
- package/src/components/RadioGroup/radio-group.principles.stories.tsx +1 -1
- package/src/components/RadioGroup/radio-group.spec.md +2 -2
- package/src/components/RadioGroup/radio-group.stories.tsx +3 -1
- package/src/components/RadioGroup/radio-group.tsx +36 -3
- package/src/components/Rating/rating.anatomy.stories.tsx +11 -8
- package/src/components/Rating/rating.principles.stories.tsx +1 -1
- package/src/components/Rating/rating.spec.md +2 -2
- package/src/components/Rating/rating.stories.tsx +1 -1
- package/src/components/Rating/rating.tsx +3 -3
- package/src/components/ScrollArea/scroll-area.spec.md +1 -0
- package/src/components/ScrollArea/scroll-area.tsx +1 -1
- package/src/components/SegmentedControl/segmented-control.anatomy.stories.tsx +2 -2
- package/src/components/SegmentedControl/segmented-control.spec.md +1 -1
- package/src/components/SegmentedControl/segmented-control.tsx +16 -6
- package/src/components/Select/select.anatomy.stories.tsx +2 -2
- package/src/components/Select/select.spec.md +2 -1
- package/src/components/Select/select.tsx +37 -16
- package/src/components/SelectMenu/select-menu.anatomy.stories.tsx +1 -1
- package/src/components/SelectMenu/select-menu.principles.stories.tsx +1 -1
- package/src/components/SelectMenu/select-menu.spec.md +11 -8
- package/src/components/SelectMenu/select-menu.tsx +92 -10
- package/src/components/SelectionControl/selection-item.anatomy.stories.tsx +1 -1
- package/src/components/SelectionControl/selection-item.principles.stories.tsx +2 -2
- package/src/components/SelectionControl/selection-item.spec.md +2 -1
- package/src/components/SelectionControl/selection-item.stories.tsx +1 -1
- package/src/components/Separator/separator.anatomy.stories.tsx +2 -2
- package/src/components/Separator/separator.tsx +1 -1
- package/src/components/Sheet/sheet.spec.md +1 -1
- package/src/components/Sheet/sheet.tsx +2 -1
- package/src/components/Sidebar/sidebar.anatomy.stories.tsx +1 -1
- package/src/components/Sidebar/sidebar.spec.md +2 -1
- package/src/components/Sidebar/sidebar.stories.tsx +6 -4
- package/src/components/Sidebar/sidebar.tsx +36 -11
- package/src/components/Skeleton/skeleton.principles.stories.tsx +1 -1
- package/src/components/Skeleton/skeleton.spec.md +1 -2
- package/src/components/Skeleton/skeleton.tsx +1 -1
- package/src/components/Slider/slider.spec.md +4 -4
- package/src/components/Steps/steps.anatomy.stories.tsx +1 -1
- package/src/components/Steps/steps.spec.md +5 -4
- package/src/components/Steps/steps.tsx +11 -3
- package/src/components/Switch/switch.spec.md +3 -3
- package/src/components/Switch/switch.tsx +51 -10
- package/src/components/Tabs/tabs.anatomy.stories.tsx +3 -2
- package/src/components/Tabs/tabs.principles.stories.tsx +5 -3
- package/src/components/Tabs/tabs.spec.md +2 -1
- package/src/components/Tabs/tabs.tsx +32 -25
- package/src/components/Tag/tag.principles.stories.tsx +1 -1
- package/src/components/Tag/tag.tsx +7 -3
- package/src/components/Textarea/textarea.spec.md +2 -1
- package/src/components/Textarea/textarea.tsx +16 -9
- package/src/components/TimePicker/time-picker.anatomy.stories.tsx +2 -1
- package/src/components/TimePicker/time-picker.spec.md +2 -2
- package/src/components/TimePicker/time-picker.tsx +6 -8
- package/src/components/Toast/toast.anatomy.stories.tsx +5 -6
- package/src/components/Toast/toast.principles.stories.tsx +10 -11
- package/src/components/Toast/toast.spec.md +5 -5
- package/src/components/Toast/toast.stories.tsx +5 -1
- package/src/components/Toast/toast.tsx +9 -6
- package/src/components/Tooltip/tooltip.spec.md +3 -3
- package/src/components/Tooltip/tooltip.tsx +1 -1
- package/src/components/TreeView/tree-view.anatomy.stories.tsx +6 -1
- package/src/components/TreeView/tree-view.principles.stories.tsx +2 -2
- package/src/components/TreeView/tree-view.spec.md +1 -1
- package/src/components/TreeView/tree-view.tsx +17 -2
- package/src/index.ts +1 -1
- package/src/patterns/element-anatomy/element-anatomy.spec.md +3 -3
- package/src/patterns/element-anatomy/item-anatomy.spec.md +4 -12
- package/src/patterns/element-anatomy/item-anatomy.stories.tsx +1 -0
- package/src/patterns/element-anatomy/item-anatomy.tsx +1 -1
- package/src/patterns/header-canonical/header-canonical.css +1 -2
- package/src/patterns/header-canonical/header-canonical.spec.md +5 -5
- package/src/patterns/horizontal-overflow/horizontal-overflow.spec.md +5 -4
- package/src/patterns/overlay-surface/overlay-surface.spec.md +8 -7
- package/src/patterns/overlay-surface/overlay-surface.tsx +5 -5
- package/src/patterns/resize-handle/resize-handle.spec.md +1 -1
- package/src/tokens/categorical-color.ts +1 -1
- package/src/tokens/color/color.spec.md +6 -6
- package/src/tokens/color/color.stories.tsx +1 -1
- package/src/tokens/color/primitives.css +7 -5
- package/src/tokens/density/density.spec.md +2 -0
- package/src/tokens/elevation/elevation.spec.md +1 -1
- package/src/tokens/layoutSpace/layoutSpace.spec.md +1 -1
- package/src/tokens/layoutSpace/layoutSpace.stories.tsx +3 -3
- package/src/tokens/motion/motion.spec.md +1 -1
- package/src/tokens/opacity/opacity.stories.tsx +7 -11
- package/src/tokens/radius/radius.spec.md +1 -1
- package/src/tokens/typography/typography.css +1 -1
- package/src/tokens/typography/typography.spec.md +1 -1
- package/src/tokens/uiSize/icon-size.ts +2 -2
- package/src/tokens/uiSize/uiSize.spec.md +12 -11
- package/src/tokens/utility-registry.json +5 -4
- package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -1950
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +0 -1
|
@@ -122,12 +122,11 @@ function SourceRowProvider({
|
|
|
122
122
|
droppable.setNodeRef(el);
|
|
123
123
|
}, [draggable.setNodeRef, droppable.setNodeRef]);
|
|
124
124
|
const isDragging = draggable.isDragging;
|
|
125
|
-
const style = { ...dragSourceStyle(isDragging) };
|
|
126
125
|
const handleAttrs = draggable.attributes;
|
|
127
|
-
const ctxValue = {
|
|
126
|
+
const ctxValue = React.useMemo(() => ({
|
|
128
127
|
setNodeRef: setRefs,
|
|
129
128
|
role,
|
|
130
|
-
style,
|
|
129
|
+
style: { ...dragSourceStyle(isDragging) },
|
|
131
130
|
attributes: {},
|
|
132
131
|
isDragging,
|
|
133
132
|
// row 不接 listeners(button-only),baseRowDiv `{...(extra?.listeners ?? {})}` 自動 noop
|
|
@@ -140,7 +139,7 @@ function SourceRowProvider({
|
|
|
140
139
|
handleListeners: draggable.listeners,
|
|
141
140
|
handleAttributes: handleAttrs,
|
|
142
141
|
invalidDrop
|
|
143
|
-
};
|
|
142
|
+
}), [setRefs, role, isDragging, draggable.setActivatorNodeRef, draggable.listeners, handleAttrs, invalidDrop]);
|
|
144
143
|
return /* @__PURE__ */ jsx(SortableRowCtx.Provider, { value: ctxValue, children: children(ctxValue) });
|
|
145
144
|
}
|
|
146
145
|
function MirrorRowProvider({
|
|
@@ -154,7 +153,7 @@ function MirrorRowProvider({
|
|
|
154
153
|
const droppable = useDroppable({ id, disabled, data: { type: "row" } });
|
|
155
154
|
const dndCtx = useDndContext();
|
|
156
155
|
const isDragging = ((_a = dndCtx.active) == null ? void 0 : _a.id) === id;
|
|
157
|
-
const ctxValue = {
|
|
156
|
+
const ctxValue = React.useMemo(() => ({
|
|
158
157
|
setNodeRef: droppable.setNodeRef,
|
|
159
158
|
role,
|
|
160
159
|
style: { ...dragSourceStyle(isDragging) },
|
|
@@ -166,7 +165,7 @@ function MirrorRowProvider({
|
|
|
166
165
|
handleListeners: void 0,
|
|
167
166
|
handleAttributes: {},
|
|
168
167
|
invalidDrop
|
|
169
|
-
};
|
|
168
|
+
}), [droppable.setNodeRef, role, isDragging, invalidDrop]);
|
|
170
169
|
return /* @__PURE__ */ jsx(SortableRowCtx.Provider, { value: ctxValue, children: children(ctxValue) });
|
|
171
170
|
}
|
|
172
171
|
function DraggableHeaderCell({
|
|
@@ -220,12 +219,11 @@ function RowDragHandle({ disabled, anyDragActive }) {
|
|
|
220
219
|
const rRect = rowEl.getBoundingClientRect();
|
|
221
220
|
const tRect = tableEl.getBoundingClientRect();
|
|
222
221
|
const rowHovered = rowEl.hasAttribute("data-hovered");
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
});
|
|
222
|
+
const top = rRect.top + rRect.height / 2;
|
|
223
|
+
const left = tRect.left;
|
|
224
|
+
setPos(
|
|
225
|
+
(prev) => prev && prev.top === top && prev.left === left && prev.rowHovered === rowHovered ? prev : { top, left, rowHovered }
|
|
226
|
+
);
|
|
229
227
|
};
|
|
230
228
|
update();
|
|
231
229
|
const observer = new MutationObserver(update);
|
|
@@ -281,9 +279,10 @@ function RowDragHandle({ disabled, anyDragActive }) {
|
|
|
281
279
|
// 2026-05-12 fix v2(user 抓「drag column sort 啟用時 button 不是 disable 視覺」):
|
|
282
280
|
// 前 Round 4.5 加 `aria-disabled:opacity-[var(--opacity-disabled)]` 在 Button cva
|
|
283
281
|
// 沒生效 — 因為 inline style `opacity` 永遠 win over Tailwind class。Fix:把 disabled
|
|
284
|
-
// state opacity 也 compute 進 inline style。priority order:invisible 0 → drag
|
|
285
|
-
//
|
|
286
|
-
|
|
282
|
+
// state opacity 也 compute 進 inline style。priority order:invisible 0 → drag var(--opacity-disabled)
|
|
283
|
+
// 0.45(2026-07-04 修:原硬寫 0.5 違 lib/drag-visual.ts SSOT)→ canDrag=false(sort active)
|
|
284
|
+
// disabled visual var(--opacity-disabled) 0.45 → idle 1。
|
|
285
|
+
opacity: visible ? ctx.isDragging ? "var(--opacity-disabled)" : canDrag ? 1 : "var(--opacity-disabled)" : 0,
|
|
287
286
|
pointerEvents: visible ? "auto" : "none",
|
|
288
287
|
transition: "opacity 150ms ease"
|
|
289
288
|
},
|
|
@@ -315,6 +314,46 @@ function RowDragHandle({ disabled, anyDragActive }) {
|
|
|
315
314
|
portalTarget && createPortal(wrapped, portalTarget)
|
|
316
315
|
] });
|
|
317
316
|
}
|
|
317
|
+
const EMPTY_META = {};
|
|
318
|
+
const MemoCellSlot = React.memo(function MemoCellSlot2({
|
|
319
|
+
Cell,
|
|
320
|
+
rowId,
|
|
321
|
+
colId,
|
|
322
|
+
value,
|
|
323
|
+
meta,
|
|
324
|
+
mode,
|
|
325
|
+
size,
|
|
326
|
+
autoRowHeight,
|
|
327
|
+
isEditable,
|
|
328
|
+
isDisabled,
|
|
329
|
+
onCommitCell,
|
|
330
|
+
onCancelCell,
|
|
331
|
+
onCellCommitLive,
|
|
332
|
+
onEnterEdit
|
|
333
|
+
}) {
|
|
334
|
+
const onCommit = React.useCallback((next) => onCommitCell(rowId, colId, next), [onCommitCell, rowId, colId]);
|
|
335
|
+
const onCommitLive = React.useCallback((next) => onCellCommitLive == null ? void 0 : onCellCommitLive(rowId, colId, next), [onCellCommitLive, rowId, colId]);
|
|
336
|
+
const onCancel = React.useCallback(() => onCancelCell(rowId, colId), [onCancelCell, rowId, colId]);
|
|
337
|
+
const onRequestEdit = React.useCallback(() => {
|
|
338
|
+
if (!isDisabled) onEnterEdit(rowId, colId);
|
|
339
|
+
}, [onEnterEdit, isDisabled, rowId, colId]);
|
|
340
|
+
return /* @__PURE__ */ jsx(
|
|
341
|
+
Cell,
|
|
342
|
+
{
|
|
343
|
+
value,
|
|
344
|
+
meta,
|
|
345
|
+
mode,
|
|
346
|
+
size,
|
|
347
|
+
autoRowHeight,
|
|
348
|
+
isEditable,
|
|
349
|
+
isDisabled,
|
|
350
|
+
onCommit,
|
|
351
|
+
onCommitLive,
|
|
352
|
+
onCancel,
|
|
353
|
+
onRequestEdit
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
});
|
|
318
357
|
function DataTableInner({
|
|
319
358
|
columns,
|
|
320
359
|
data,
|
|
@@ -362,10 +401,6 @@ function DataTableInner({
|
|
|
362
401
|
var _a, _b, _c;
|
|
363
402
|
const [editingCellId, setEditingCellId] = React.useState(null);
|
|
364
403
|
const [editingDraft, setEditingDraft] = React.useState(void 0);
|
|
365
|
-
const exitEdit = React.useCallback(() => {
|
|
366
|
-
setEditingCellId(null);
|
|
367
|
-
setEditingDraft(void 0);
|
|
368
|
-
}, []);
|
|
369
404
|
const [selectedCellId, setSelectedCellId] = React.useState(null);
|
|
370
405
|
const [rangeAnchor, setRangeAnchor] = React.useState(null);
|
|
371
406
|
const [rangeFocus, setRangeFocus] = React.useState(null);
|
|
@@ -384,14 +419,36 @@ function DataTableInner({
|
|
|
384
419
|
document.addEventListener("pointerdown", handler, true);
|
|
385
420
|
return () => document.removeEventListener("pointerdown", handler, true);
|
|
386
421
|
}, [spreadsheetMode, selectedCellId, rangeAnchor]);
|
|
422
|
+
const restoreCellSelection = React.useCallback((rowId, colId) => {
|
|
423
|
+
if (!spreadsheetMode) return;
|
|
424
|
+
const cellId = `${rowId}:${colId}`;
|
|
425
|
+
setSelectedCellId(cellId);
|
|
426
|
+
setRangeAnchor(cellId);
|
|
427
|
+
setRangeFocus(null);
|
|
428
|
+
requestAnimationFrame(() => {
|
|
429
|
+
const el = tableRef.current;
|
|
430
|
+
if (!el) return;
|
|
431
|
+
const active = document.activeElement;
|
|
432
|
+
if (active === document.body || active === null) el.focus({ preventScroll: true });
|
|
433
|
+
});
|
|
434
|
+
}, [spreadsheetMode]);
|
|
387
435
|
const commitCell = React.useCallback(
|
|
388
436
|
(rowId, colId, next) => {
|
|
389
437
|
onCellCommit == null ? void 0 : onCellCommit(rowId, colId, next);
|
|
390
438
|
setEditingCellId(null);
|
|
391
439
|
setEditingDraft(void 0);
|
|
440
|
+
restoreCellSelection(rowId, colId);
|
|
392
441
|
},
|
|
393
|
-
[onCellCommit]
|
|
442
|
+
[onCellCommit, restoreCellSelection]
|
|
394
443
|
);
|
|
444
|
+
const cancelCellEdit = React.useCallback((rowId, colId) => {
|
|
445
|
+
setEditingCellId(null);
|
|
446
|
+
setEditingDraft(void 0);
|
|
447
|
+
restoreCellSelection(rowId, colId);
|
|
448
|
+
}, [restoreCellSelection]);
|
|
449
|
+
const enterCellEdit = React.useCallback((rowId, colId) => {
|
|
450
|
+
setEditingCellId(cellEditId(rowId, colId));
|
|
451
|
+
}, []);
|
|
395
452
|
const isCellEditable = React.useCallback(
|
|
396
453
|
// any-allow: free-form consumer meta — same rationale as L143 renderTypedValue
|
|
397
454
|
(meta, row) => {
|
|
@@ -700,19 +757,22 @@ function DataTableInner({
|
|
|
700
757
|
const Cell = resolveCellComponent(colType);
|
|
701
758
|
const cellMode = experimentalActiveEditorController && isEditingThisCell ? "display" : isEditingThisCell && !disabled ? "edit" : "display";
|
|
702
759
|
content = /* @__PURE__ */ jsx(
|
|
703
|
-
|
|
760
|
+
MemoCellSlot,
|
|
704
761
|
{
|
|
762
|
+
Cell,
|
|
763
|
+
rowId,
|
|
764
|
+
colId,
|
|
705
765
|
value: cell.getValue(),
|
|
706
|
-
meta: meta ??
|
|
766
|
+
meta: meta ?? EMPTY_META,
|
|
707
767
|
mode: cellMode,
|
|
708
768
|
size,
|
|
709
769
|
autoRowHeight,
|
|
710
770
|
isEditable: editable,
|
|
711
771
|
isDisabled: disabled,
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
772
|
+
onCommitCell: commitCell,
|
|
773
|
+
onCancelCell: cancelCellEdit,
|
|
774
|
+
onCellCommitLive: onCellCommit,
|
|
775
|
+
onEnterEdit: enterCellEdit
|
|
716
776
|
}
|
|
717
777
|
);
|
|
718
778
|
} else {
|
|
@@ -751,7 +811,7 @@ function DataTableInner({
|
|
|
751
811
|
const rowId = cell.row.id;
|
|
752
812
|
const rowOriginal = cell.row.original;
|
|
753
813
|
const isDisabled = isRowSelectable ? !isRowSelectable(rowOriginal) : false;
|
|
754
|
-
const ariaLabel = (getRowAriaLabel == null ? void 0 : getRowAriaLabel(rowOriginal)) ?? "
|
|
814
|
+
const ariaLabel = (getRowAriaLabel == null ? void 0 : getRowAriaLabel(rowOriginal)) ?? "選取此列";
|
|
755
815
|
const checkboxSize = size === "lg" ? "lg" : "md";
|
|
756
816
|
const onCellClick = isDisabled ? void 0 : (e) => {
|
|
757
817
|
e.stopPropagation();
|
|
@@ -889,9 +949,11 @@ function DataTableInner({
|
|
|
889
949
|
// Phase 9 Issue 8 fix(2026-05-10 user 撞 + codex 重比稿 verdict ADOPT):
|
|
890
950
|
// 之前 `border-r border-divider` 只 right edge → hover overlay outline:-1px 只 right
|
|
891
951
|
// 邊壓 cell border,上左下 sub-pixel 不一致(user 抓「右 1px / 上左下 2px」bug)。
|
|
892
|
-
// 改 `dtCellGrid`
|
|
893
|
-
//
|
|
894
|
-
//
|
|
952
|
+
// 改 `dtCellGrid`(data-table.css「dtCellGrid v2/v3」段)box-shadow inset **只保右邊**
|
|
953
|
+
// `inset -1px 0 0 var(--divider)`(bottom 由 row border-b 接管、:last-child 設 none 防 2px;
|
|
954
|
+
// 2026-07-04 對齊 css 現況 — 原「4 邊 inset」敘述已被 v2/v3 取代),不佔 layout
|
|
955
|
+
// (per user verbatim「在 cell 內容起始位置不變」前提)→ 視覺 4 邊 grid line 由
|
|
956
|
+
// row border + 相鄰 cell 合成 → overlay outline:-1px 壓 cell border line。
|
|
895
957
|
// Field naked edit border 仍 own(per Field SSOT)— 編輯時 Field 自帶 border 1px,
|
|
896
958
|
// 跟 cell 4 邊 inset divider 視覺相疊(同 pixel)= 1 line visual,不雙線。
|
|
897
959
|
inlineEdit && "dtCellGrid",
|
|
@@ -1052,6 +1114,18 @@ function DataTableInner({
|
|
|
1052
1114
|
(e) => {
|
|
1053
1115
|
var _a2;
|
|
1054
1116
|
if (e.nativeEvent.isComposing || e.nativeEvent.keyCode === 229) return;
|
|
1117
|
+
if (spreadsheetMode && selectedCellId == null && editingCellId == null && ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(e.key)) {
|
|
1118
|
+
const allRows = table.getRowModel().rows.map((r) => r.id);
|
|
1119
|
+
const allCols = table.getVisibleLeafColumns().map((c) => c.id).filter((id) => id !== SELECT_COL_ID);
|
|
1120
|
+
if (allRows.length > 0 && allCols.length > 0) {
|
|
1121
|
+
e.preventDefault();
|
|
1122
|
+
const firstCellId = `${allRows[0]}:${allCols[0]}`;
|
|
1123
|
+
setSelectedCellId(firstCellId);
|
|
1124
|
+
setRangeAnchor(firstCellId);
|
|
1125
|
+
setRangeFocus(null);
|
|
1126
|
+
}
|
|
1127
|
+
return;
|
|
1128
|
+
}
|
|
1055
1129
|
if (spreadsheetMode && selectedCellId != null && editingCellId == null) {
|
|
1056
1130
|
const navKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter", "F2", "Escape"];
|
|
1057
1131
|
if (!navKeys.includes(e.key)) return;
|
|
@@ -1148,7 +1222,7 @@ function DataTableInner({
|
|
|
1148
1222
|
checked: headerCheckedState,
|
|
1149
1223
|
onClick: (e) => e.stopPropagation(),
|
|
1150
1224
|
onCheckedChange: () => toggleHeaderCheckbox(),
|
|
1151
|
-
"aria-label": "
|
|
1225
|
+
"aria-label": "全選可見列",
|
|
1152
1226
|
disabled: selectableVisibleIds.length === 0
|
|
1153
1227
|
}
|
|
1154
1228
|
)
|
|
@@ -1199,7 +1273,8 @@ function DataTableInner({
|
|
|
1199
1273
|
className: cn(
|
|
1200
1274
|
"flex items-center min-w-0 flex-1 gap-1 outline-none",
|
|
1201
1275
|
canSort && "cursor-pointer hover:text-foreground transition-colors",
|
|
1202
|
-
|
|
1276
|
+
// 2026-07-04:rounded-sm → rounded-md(radius.spec.md 設計哲學(4)rounded-sm 保留未使用,4px 一律 rounded-md)
|
|
1277
|
+
canSort && "focus-visible:ring-2 focus-visible:ring-ring rounded-md"
|
|
1203
1278
|
),
|
|
1204
1279
|
children: [
|
|
1205
1280
|
/* @__PURE__ */ jsx(TruncateCell, { className: cn("min-w-0", align === "right" && "text-right", align === "center" && "text-center"), children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }),
|
|
@@ -1314,6 +1389,14 @@ function DataTableInner({
|
|
|
1314
1389
|
return row.getVisibleCells().filter((c) => ids.has(c.column.id));
|
|
1315
1390
|
};
|
|
1316
1391
|
const [dropIndicator, setDropIndicator] = React.useState(null);
|
|
1392
|
+
const setDropIndicatorIfChanged = React.useCallback(
|
|
1393
|
+
(next) => {
|
|
1394
|
+
setDropIndicator(
|
|
1395
|
+
(prev) => prev && prev.id === next.id && prev.side === next.side && prev.type === next.type ? prev : next
|
|
1396
|
+
);
|
|
1397
|
+
},
|
|
1398
|
+
[]
|
|
1399
|
+
);
|
|
1317
1400
|
const reorderableColumnIdsRef = React.useRef([]);
|
|
1318
1401
|
const renderHeaderRow = (cols, isRight) => {
|
|
1319
1402
|
const headers = getRegionHeaders(cols);
|
|
@@ -1575,25 +1658,34 @@ function DataTableInner({
|
|
|
1575
1658
|
const nextMeta = (_a3 = nextColDef == null ? void 0 : nextColDef.columnDef) == null ? void 0 : _a3.meta;
|
|
1576
1659
|
if (!(nextMeta == null ? void 0 : nextMeta.type) || NON_EDIT_TYPES.includes(nextMeta.type)) continue;
|
|
1577
1660
|
if (!nextRow || !canEditCell(nextMeta, nextRow.original)) continue;
|
|
1661
|
+
if (editingDraft !== void 0) commitCell(rowId, colId, editingDraft);
|
|
1578
1662
|
setEditingCellId(cellEditId(allRows[nextRowIdx], allCols[nextColIdx]));
|
|
1663
|
+
setSelectedCellId(null);
|
|
1664
|
+
setRangeAnchor(null);
|
|
1665
|
+
setRangeFocus(null);
|
|
1579
1666
|
return;
|
|
1580
1667
|
}
|
|
1581
1668
|
};
|
|
1582
|
-
return
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1669
|
+
return (
|
|
1670
|
+
// 2026-07-05 D4 fix:key={cellId} 強制 per-cell remount — 相鄰同型欄位 Tab 過去時
|
|
1671
|
+
// uncontrolled Input / NumberCell localValue 原封不動(上一格的字跑到下一格)。
|
|
1672
|
+
// 對齊 cell-registry「mode-keyed remount canonical」(per-cell edit session 是不同 mount cycle)。
|
|
1673
|
+
/* @__PURE__ */ jsx("div", { onKeyDownCapture: handleEditTab, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsx(
|
|
1674
|
+
Cell,
|
|
1675
|
+
{
|
|
1676
|
+
value,
|
|
1677
|
+
meta,
|
|
1678
|
+
mode: "edit",
|
|
1679
|
+
size,
|
|
1680
|
+
autoRowHeight: false,
|
|
1681
|
+
isEditable: cellEditable,
|
|
1682
|
+
onCommit: (next) => commitCell(rowId, colId, next),
|
|
1683
|
+
onCommitLive: (next) => onCellCommit == null ? void 0 : onCellCommit(rowId, colId, next),
|
|
1684
|
+
onCancel: () => cancelCellEdit(rowId, colId),
|
|
1685
|
+
onDraft: setEditingDraft
|
|
1686
|
+
}
|
|
1687
|
+
) }, cellId)
|
|
1688
|
+
);
|
|
1597
1689
|
} : void 0,
|
|
1598
1690
|
selectedCellId: spreadsheetMode ? selectedCellId : null,
|
|
1599
1691
|
rangeCellIds,
|
|
@@ -1729,7 +1821,7 @@ function DataTableInner({
|
|
|
1729
1821
|
setDropIndicator(null);
|
|
1730
1822
|
return;
|
|
1731
1823
|
}
|
|
1732
|
-
|
|
1824
|
+
setDropIndicatorIfChanged({ id: String(over.id), side, type: "column" });
|
|
1733
1825
|
} else {
|
|
1734
1826
|
const activeIdx = allRowIds.indexOf(String(active.id));
|
|
1735
1827
|
const overIdx = allRowIds.indexOf(String(over.id));
|
|
@@ -1742,9 +1834,9 @@ function DataTableInner({
|
|
|
1742
1834
|
setDropIndicator(null);
|
|
1743
1835
|
return;
|
|
1744
1836
|
}
|
|
1745
|
-
|
|
1837
|
+
setDropIndicatorIfChanged({ id: String(over.id), side, type: "row" });
|
|
1746
1838
|
}
|
|
1747
|
-
}, [allRowIds, isReorderNoop]);
|
|
1839
|
+
}, [allRowIds, isReorderNoop, setDropIndicatorIfChanged]);
|
|
1748
1840
|
const handleDragCancel = React.useCallback(() => {
|
|
1749
1841
|
setActiveDragId(null);
|
|
1750
1842
|
setActiveDragColId(null);
|