@qijenchen/design-system 0.1.0-beta.83 → 0.1.0-beta.85
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 +8 -8
- package/README.md +3 -2
- package/dist/components/Alert/alert.js.map +1 -1
- package/dist/components/AppShell/_demo-helpers.d.ts.map +1 -1
- package/dist/components/AppShell/app-shell.d.ts +1 -1
- package/dist/components/AppShell/app-shell.d.ts.map +1 -1
- package/dist/components/AppShell/app-shell.js +22 -2
- package/dist/components/AppShell/app-shell.js.map +1 -1
- package/dist/components/Avatar/avatar.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.js +4 -4
- package/dist/components/Avatar/avatar.js.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/Button/button.d.ts +2 -2
- package/dist/components/Button/button.d.ts.map +1 -1
- package/dist/components/Button/button.js +12 -3
- package/dist/components/Button/button.js.map +1 -1
- package/dist/components/Calendar/calendar.d.ts +13 -5
- package/dist/components/Calendar/calendar.d.ts.map +1 -1
- package/dist/components/Calendar/calendar.js +7 -1
- package/dist/components/Calendar/calendar.js.map +1 -1
- package/dist/components/Carousel/carousel.d.ts.map +1 -1
- package/dist/components/Carousel/carousel.js +8 -3
- 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 -0
- package/dist/components/Chart/chart.js.map +1 -1
- package/dist/components/Checkbox/checkbox.d.ts +1 -1
- package/dist/components/Checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/checkbox.js +8 -4
- package/dist/components/Checkbox/checkbox.js.map +1 -1
- package/dist/components/Chip/chip.d.ts +1 -1
- package/dist/components/Chip/chip.d.ts.map +1 -1
- package/dist/components/Chip/chip.js.map +1 -1
- package/dist/components/Coachmark/coachmark.d.ts +10 -3
- package/dist/components/Coachmark/coachmark.d.ts.map +1 -1
- package/dist/components/Coachmark/coachmark.js.map +1 -1
- package/dist/components/Combobox/combobox.d.ts +5 -1
- package/dist/components/Combobox/combobox.d.ts.map +1 -1
- package/dist/components/Combobox/combobox.js +30 -13
- package/dist/components/Combobox/combobox.js.map +1 -1
- package/dist/components/DataTable/cell-registry.d.ts.map +1 -1
- package/dist/components/DataTable/cell-registry.js +53 -62
- package/dist/components/DataTable/cell-registry.js.map +1 -1
- package/dist/components/DataTable/column-types.d.ts +10 -4
- package/dist/components/DataTable/column-types.d.ts.map +1 -1
- package/dist/components/DataTable/column-types.js.map +1 -1
- package/dist/components/DataTable/data-table-column-visibility-panel.d.ts +1 -1
- package/dist/components/DataTable/data-table-column-visibility-panel.js +183 -0
- package/dist/components/DataTable/data-table-column-visibility-panel.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-group.d.ts +47 -0
- package/dist/components/DataTable/data-table-filter-group.d.ts.map +1 -0
- package/dist/components/DataTable/data-table-filter-group.js +154 -0
- package/dist/components/DataTable/data-table-filter-group.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-panel.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-filter-panel.js +285 -0
- package/dist/components/DataTable/data-table-filter-panel.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-value-picker.d.ts +29 -0
- package/dist/components/DataTable/data-table-filter-value-picker.d.ts.map +1 -0
- package/dist/components/DataTable/data-table-filter-value-picker.js +187 -0
- package/dist/components/DataTable/data-table-filter-value-picker.js.map +1 -0
- package/dist/components/DataTable/data-table-interaction-layer.d.ts +11 -15
- package/dist/components/DataTable/data-table-interaction-layer.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-interaction-layer.js +1 -3
- package/dist/components/DataTable/data-table-interaction-layer.js.map +1 -1
- package/dist/components/DataTable/data-table-sort-manager.js +140 -0
- package/dist/components/DataTable/data-table-sort-manager.js.map +1 -0
- package/dist/components/DataTable/data-table.d.ts +5 -6
- package/dist/components/DataTable/data-table.d.ts.map +1 -1
- package/dist/components/DataTable/data-table.js +36 -15
- package/dist/components/DataTable/data-table.js.map +1 -1
- package/dist/components/DataTable/filter-operators.js +140 -0
- package/dist/components/DataTable/filter-operators.js.map +1 -0
- package/dist/components/DataTable/filter-tree.js +312 -0
- package/dist/components/DataTable/filter-tree.js.map +1 -0
- package/dist/components/DataTable/index.d.ts +3 -0
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/index.js +12 -1
- package/dist/components/DataTable/index.js.map +1 -1
- package/dist/components/DataTable/lib/column-meta.js +25 -0
- package/dist/components/DataTable/lib/column-meta.js.map +1 -0
- package/dist/components/DateGrid/date-grid.d.ts.map +1 -1
- package/dist/components/DateGrid/date-grid.js +3 -1
- package/dist/components/DateGrid/date-grid.js.map +1 -1
- package/dist/components/DatePicker/date-picker.d.ts +7 -1
- package/dist/components/DatePicker/date-picker.d.ts.map +1 -1
- package/dist/components/DatePicker/date-picker.js +105 -74
- package/dist/components/DatePicker/date-picker.js.map +1 -1
- package/dist/components/Dialog/dialog.d.ts +20 -3
- package/dist/components/Dialog/dialog.d.ts.map +1 -1
- package/dist/components/Dialog/dialog.js +38 -20
- package/dist/components/Dialog/dialog.js.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.js +3 -1
- package/dist/components/DropdownMenu/dropdown-menu.js.map +1 -1
- package/dist/components/Field/field-context.d.ts +45 -5
- package/dist/components/Field/field-context.d.ts.map +1 -1
- package/dist/components/Field/field-context.js +19 -0
- package/dist/components/Field/field-context.js.map +1 -1
- package/dist/components/Field/field-edit-keys.d.ts +21 -0
- package/dist/components/Field/field-edit-keys.d.ts.map +1 -0
- package/dist/components/Field/field-edit-keys.js +19 -0
- package/dist/components/Field/field-edit-keys.js.map +1 -0
- package/dist/components/Field/field-types.d.ts +20 -1
- package/dist/components/Field/field-types.d.ts.map +1 -1
- package/dist/components/Field/field-types.js.map +1 -1
- package/dist/components/Field/field-wrapper.d.ts +3 -2
- package/dist/components/Field/field-wrapper.d.ts.map +1 -1
- package/dist/components/Field/field-wrapper.js +38 -39
- package/dist/components/Field/field-wrapper.js.map +1 -1
- package/dist/components/Field/field.d.ts +2 -1
- package/dist/components/Field/field.d.ts.map +1 -1
- package/dist/components/Field/field.js.map +1 -1
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +2 -0
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/FieldControlGroup/field-control-group.d.ts +1 -1
- 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 +1 -1
- package/dist/components/FileItem/file-item.js.map +1 -1
- package/dist/components/FileUpload/file-upload.d.ts +1 -1
- 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 +7 -2
- package/dist/components/FileViewer/file-viewer.js.map +1 -1
- package/dist/components/FileViewer/image-renderer.d.ts.map +1 -1
- package/dist/components/FileViewer/image-renderer.js +22 -1
- package/dist/components/FileViewer/image-renderer.js.map +1 -1
- package/dist/components/HoverCard/hover-card.d.ts.map +1 -1
- package/dist/components/HoverCard/hover-card.js +5 -3
- package/dist/components/HoverCard/hover-card.js.map +1 -1
- package/dist/components/InlineEdit/index.d.ts +2 -0
- package/dist/components/InlineEdit/index.d.ts.map +1 -0
- package/dist/components/InlineEdit/index.js +5 -0
- package/dist/components/InlineEdit/index.js.map +1 -0
- package/dist/components/InlineEdit/inline-edit.d.ts +59 -0
- package/dist/components/InlineEdit/inline-edit.d.ts.map +1 -0
- package/dist/components/InlineEdit/inline-edit.js +164 -0
- package/dist/components/InlineEdit/inline-edit.js.map +1 -0
- package/dist/components/Input/input.d.ts +6 -11
- package/dist/components/Input/input.d.ts.map +1 -1
- package/dist/components/Input/input.js +43 -13
- 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 +6 -5
- package/dist/components/LinkInput/link-input.js.map +1 -1
- package/dist/components/Menu/menu-item.d.ts +14 -2
- package/dist/components/Menu/menu-item.d.ts.map +1 -1
- package/dist/components/Menu/menu-item.js +25 -3
- package/dist/components/Menu/menu-item.js.map +1 -1
- package/dist/components/NumberInput/number-input.d.ts +3 -3
- package/dist/components/NumberInput/number-input.d.ts.map +1 -1
- package/dist/components/NumberInput/number-input.js +6 -5
- package/dist/components/NumberInput/number-input.js.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.js +2 -6
- package/dist/components/OverflowIndicator/overflow-indicator.js.map +1 -1
- package/dist/components/Pagination/pagination.js +1 -1
- package/dist/components/Pagination/pagination.js.map +1 -1
- package/dist/components/PeoplePicker/index.js +7 -1
- package/dist/components/PeoplePicker/index.js.map +1 -1
- package/dist/components/PeoplePicker/people-picker.d.ts +9 -2
- package/dist/components/PeoplePicker/people-picker.d.ts.map +1 -1
- package/dist/components/PeoplePicker/people-picker.js +23 -10
- package/dist/components/PeoplePicker/people-picker.js.map +1 -1
- package/dist/components/PeoplePicker/person-display.d.ts +6 -3
- package/dist/components/PeoplePicker/person-display.d.ts.map +1 -1
- package/dist/components/PeoplePicker/person-display.js +19 -14
- package/dist/components/PeoplePicker/person-display.js.map +1 -1
- package/dist/components/Popover/popover.d.ts.map +1 -1
- package/dist/components/Popover/popover.js +3 -1
- package/dist/components/Popover/popover.js.map +1 -1
- package/dist/components/ProfileCard/profile-card.d.ts +2 -2
- package/dist/components/ProfileCard/profile-card.js +3 -3
- package/dist/components/ProfileCard/profile-card.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.d.ts.map +1 -1
- package/dist/components/RadioGroup/radio-group.js +15 -9
- package/dist/components/RadioGroup/radio-group.js.map +1 -1
- package/dist/components/ScrollArea/scroll-area.d.ts +11 -1
- package/dist/components/ScrollArea/scroll-area.d.ts.map +1 -1
- package/dist/components/ScrollArea/scroll-area.js +6 -3
- package/dist/components/ScrollArea/scroll-area.js.map +1 -1
- package/dist/components/Select/select.d.ts +46 -5
- package/dist/components/Select/select.d.ts.map +1 -1
- package/dist/components/Select/select.js +109 -28
- package/dist/components/Select/select.js.map +1 -1
- package/dist/components/SelectMenu/select-menu.d.ts +3 -1
- package/dist/components/SelectMenu/select-menu.d.ts.map +1 -1
- package/dist/components/SelectMenu/select-menu.js +8 -1
- package/dist/components/SelectMenu/select-menu.js.map +1 -1
- package/dist/components/SelectionControl/boolean-value.d.ts +11 -0
- package/dist/components/SelectionControl/boolean-value.d.ts.map +1 -0
- package/dist/components/SelectionControl/boolean-value.js +23 -0
- package/dist/components/SelectionControl/boolean-value.js.map +1 -0
- package/dist/components/SelectionControl/index.d.ts +1 -0
- package/dist/components/SelectionControl/index.d.ts.map +1 -1
- package/dist/components/SelectionControl/index.js +2 -0
- package/dist/components/SelectionControl/index.js.map +1 -1
- package/dist/components/Sheet/index.js +2 -1
- package/dist/components/Sheet/sheet.d.ts +7 -1
- package/dist/components/Sheet/sheet.d.ts.map +1 -1
- package/dist/components/Sheet/sheet.js +5 -2
- package/dist/components/Sheet/sheet.js.map +1 -1
- package/dist/components/Sidebar/sidebar.d.ts +9 -4
- package/dist/components/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/sidebar.js +8 -10
- package/dist/components/Sidebar/sidebar.js.map +1 -1
- package/dist/components/Slider/slider.d.ts.map +1 -1
- package/dist/components/Slider/slider.js.map +1 -1
- package/dist/components/Switch/switch.d.ts +6 -6
- package/dist/components/Switch/switch.d.ts.map +1 -1
- package/dist/components/Switch/switch.js +3 -2
- package/dist/components/Switch/switch.js.map +1 -1
- package/dist/components/Tabs/tabs.d.ts.map +1 -1
- package/dist/components/Tabs/tabs.js +15 -1
- package/dist/components/Tabs/tabs.js.map +1 -1
- package/dist/components/Textarea/textarea.d.ts +2 -2
- package/dist/components/Textarea/textarea.d.ts.map +1 -1
- package/dist/components/Textarea/textarea.js +50 -42
- package/dist/components/Textarea/textarea.js.map +1 -1
- package/dist/components/TimePicker/time-columns.d.ts.map +1 -1
- package/dist/components/TimePicker/time-columns.js +42 -38
- package/dist/components/TimePicker/time-columns.js.map +1 -1
- package/dist/components/TimePicker/time-picker.d.ts.map +1 -1
- package/dist/components/TimePicker/time-picker.js +8 -6
- package/dist/components/TimePicker/time-picker.js.map +1 -1
- package/dist/components/Tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/tooltip.js +7 -5
- package/dist/components/Tooltip/tooltip.js.map +1 -1
- package/dist/components/TreeView/tree-view.d.ts +56 -1
- package/dist/components/TreeView/tree-view.d.ts.map +1 -1
- package/dist/components/TreeView/tree-view.js +211 -12
- package/dist/components/TreeView/tree-view.js.map +1 -1
- package/dist/index.d.ts +115 -58
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +95 -108
- package/dist/index.js.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.d.ts +7 -6
- package/dist/patterns/element-anatomy/item-anatomy.d.ts.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.js.map +1 -1
- package/dist/tokens/categorical-color.js +15 -0
- package/dist/tokens/categorical-color.js.map +1 -1
- package/dist/tokens/motion/motion.d.ts +7 -6
- package/dist/tokens/motion/motion.d.ts.map +1 -1
- package/dist/tokens/motion/motion.js +6 -6
- package/dist/tokens/motion/motion.js.map +1 -1
- package/dist/tokens/motion/overlay-motion.d.ts +19 -0
- package/dist/tokens/motion/overlay-motion.d.ts.map +1 -0
- package/dist/tokens/motion/overlay-motion.js +9 -0
- package/dist/tokens/motion/overlay-motion.js.map +1 -0
- package/dist/tokens/uiSize/icon-size.js +5 -0
- package/dist/tokens/uiSize/icon-size.js.map +1 -0
- package/ds-canonical/fork/governance.lock +31 -19
- package/ds-canonical/fork/hooks/_log-fire.sh +46 -0
- package/ds-canonical/fork/hooks/block_prototype_imports.py +15 -4
- package/ds-canonical/fork/hooks/check_consumer_app_invariants.sh +145 -13
- package/ds-canonical/fork/hooks/check_ds_anchor_preflight.sh +2 -1
- package/ds-canonical/fork/hooks/check_dynamic_tailwind_class.sh +47 -0
- package/ds-canonical/fork/hooks/check_escape_marker_abuse.sh +27 -0
- package/ds-canonical/fork/hooks/check_field_family_invariants.sh +61 -1
- package/ds-canonical/fork/hooks/check_layout_space_magic_numbers.sh +28 -4
- package/ds-canonical/fork/hooks/check_opacity_token_usage.sh +28 -0
- package/ds-canonical/fork/hooks/check_story_determinism.sh +2 -0
- package/ds-canonical/fork/hooks/check_story_invariants.sh +119 -0
- package/ds-canonical/fork/hooks/check_tabs_content_chrome_body_double_gap.sh +29 -0
- package/ds-canonical/fork/manifest.json +15 -0
- package/ds-canonical/fork/preamble.md +20 -18
- package/ds-canonical/fork/skills/bug-fix-rhythm/SKILL.md +3 -3
- package/ds-canonical/fork/skills/code-quality-audit/SKILL.md +3 -3
- package/ds-canonical/fork/skills/delivery-handoff/SKILL.md +1 -1
- package/ds-canonical/fork/skills/product-ui-audit/SKILL.md +3 -3
- package/ds-canonical/fork/skills/propose-options/SKILL.md +3 -3
- package/ds-canonical/fork/skills/prototype/SKILL.md +1 -1
- package/ds-canonical/fork/skills/scan-similar-bugs/SKILL.md +2 -2
- package/ds-canonical/fork/skills/visual-audit/SKILL.md +2 -2
- package/ds-canonical/hooks/README.md +1 -1
- package/ds-canonical/hooks/block_prototype_imports.py +15 -4
- package/ds-canonical/hooks/check_audit_post_report_validator.sh +65 -7
- package/ds-canonical/hooks/check_codex_brief_invariants.sh +28 -1
- package/ds-canonical/hooks/check_consumer_app_invariants.sh +145 -13
- package/ds-canonical/hooks/check_datatable_invariants.sh +6 -3
- package/ds-canonical/hooks/check_ds_anchor_preflight.sh +2 -1
- package/ds-canonical/hooks/check_dynamic_tailwind_class.sh +47 -0
- package/ds-canonical/hooks/check_escape_marker_abuse.sh +27 -0
- package/ds-canonical/hooks/check_field_family_invariants.sh +61 -1
- package/ds-canonical/hooks/check_layout_space_magic_numbers.sh +28 -4
- package/ds-canonical/hooks/check_naming_and_abstraction.sh +1 -1
- package/ds-canonical/hooks/check_opacity_token_usage.sh +28 -0
- package/ds-canonical/hooks/check_pixel_quantified_audit.sh +3 -2
- package/ds-canonical/hooks/check_post_main_ssot_propagate.sh +6 -1
- package/ds-canonical/hooks/check_ssot_header_declaration.sh +3 -1
- package/ds-canonical/hooks/check_story_determinism.sh +2 -0
- package/ds-canonical/hooks/check_substantive_edit_approval_preflight.sh +8 -7
- package/ds-canonical/hooks/check_tabs_content_chrome_body_double_gap.sh +29 -0
- package/ds-canonical/hooks/lib/_story_compile_drift.sh +1 -1
- package/ds-canonical/hooks/lib/_token_hygiene.sh +10 -1
- package/ds-canonical/hooks/stop_self_audit.sh +31 -0
- package/ds-canonical/hooks/tests/test_block_prototype_imports.sh +24 -0
- package/ds-canonical/hooks/tests/test_check_audit_post_report_validator.sh +44 -0
- package/ds-canonical/hooks/tests/test_check_codex_brief_invariants.sh +43 -2
- package/ds-canonical/hooks/tests/test_check_consumer_ds_primitive_misuse.sh +112 -0
- package/ds-canonical/hooks/tests/test_check_consumer_story_baseline.sh +9 -2
- package/ds-canonical/hooks/tests/test_check_dynamic_tailwind_class.sh +76 -0
- package/ds-canonical/hooks/tests/test_check_escape_marker_abuse.sh +24 -0
- package/ds-canonical/hooks/tests/test_check_field_family_invariants.sh +27 -2
- package/ds-canonical/hooks/tests/test_check_opacity_token_usage.sh +39 -0
- package/ds-canonical/hooks/tests/test_check_tabs_content_chrome_body_double_gap.sh +76 -0
- package/ds-canonical/references/audit-coverage-vs-24-checklist.md +1 -1
- package/ds-canonical/references/build-ui-canonicals.md +2 -1
- package/ds-canonical/references/failure-class-registry.json +145 -0
- package/ds-canonical/references/governance-audit-coverage.md +33 -0
- package/ds-canonical/references/item-anatomy-recipe.md +2 -2
- package/ds-canonical/references/scenario-definition.md +6 -9
- package/ds-canonical/references/ssot-consultation.md +2 -2
- package/ds-canonical/references/ssot-index.md +5 -4
- package/ds-canonical/references/story-baseline-registry.json +8 -2
- package/ds-canonical/references/structural-token-retention.md +6 -9
- package/ds-canonical/rules/meta-patterns.md +8 -8
- package/ds-canonical/rules/self-verify.md +4 -3
- package/ds-canonical/rules/story-rules.md +2 -2
- package/ds-canonical/rules/ui-development.md +2 -2
- package/ds-canonical/skills/bug-fix-rhythm/SKILL.md +3 -3
- package/ds-canonical/skills/code-quality-audit/SKILL.md +3 -3
- package/ds-canonical/skills/codex-collab/SKILL.md +9 -7
- package/ds-canonical/skills/codex-collab/references/brief-template.md +1 -1
- package/ds-canonical/skills/codify-principle/SKILL.md +2 -2
- package/ds-canonical/skills/component-quality-gate/SKILL.md +1 -1
- package/ds-canonical/skills/component-quality-gate/references/checklist.md +2 -2
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +51 -58
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-a-workflow.md +29 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-b-codex-brief.md +29 -10
- package/ds-canonical/skills/deep-audit-cross-codex/references/triage-rubric.md +21 -0
- package/ds-canonical/skills/delivery-handoff/SKILL.md +1 -1
- package/ds-canonical/skills/design-system-audit/SKILL.md +26 -25
- package/ds-canonical/skills/design-system-audit/references/audit-prompts.md +13 -1
- package/ds-canonical/skills/design-system-audit/references/rule-placement.md +1 -1
- package/ds-canonical/skills/governance-health/SKILL.md +1 -1
- package/ds-canonical/skills/knowledge-prune/SKILL.md +3 -0
- package/ds-canonical/skills/knowledge-prune/references/prune-dimensions-d5-d10.md +1 -0
- package/ds-canonical/skills/new-component/SKILL.md +5 -5
- package/ds-canonical/skills/new-component/references/new-component-checklist.md +1 -1
- package/ds-canonical/skills/product-ui-audit/SKILL.md +3 -3
- package/ds-canonical/skills/propose-options/SKILL.md +3 -3
- package/ds-canonical/skills/prototype/SKILL.md +1 -1
- package/ds-canonical/skills/scan-similar-bugs/SKILL.md +2 -2
- package/ds-canonical/skills/story-auto-compile-migrate/SKILL.md +3 -3
- package/ds-canonical/skills/story-writing/SKILL.md +3 -3
- package/ds-canonical/skills/visual-audit/SKILL.md +2 -2
- package/ds-story-manifest.json +29 -20
- package/llms-full.txt +22 -1
- package/llms.txt +5 -4
- package/package.json +7 -3
- package/src/components/Accordion/accordion.principles.stories.tsx +1 -1
- package/src/components/Accordion/accordion.stories.tsx +16 -1
- package/src/components/Alert/alert.principles.stories.tsx +1 -1
- package/src/components/Alert/alert.spec.md +8 -10
- package/src/components/Alert/alert.stories.tsx +28 -28
- package/src/components/Alert/alert.tsx +1 -1
- package/src/components/AppShell/_demo-helpers.tsx +6 -3
- package/src/components/AppShell/app-shell.spec.md +4 -4
- package/src/components/AppShell/app-shell.tsx +28 -2
- package/src/components/AspectRatio/aspect-ratio.spec.md +1 -1
- package/src/components/AspectRatio/aspect-ratio.stories.tsx +7 -89
- package/src/components/Avatar/avatar.anatomy.stories.tsx +7 -3
- package/src/components/Avatar/avatar.principles.stories.tsx +19 -15
- package/src/components/Avatar/avatar.spec.md +2 -2
- package/src/components/Avatar/avatar.stories.tsx +8 -6
- package/src/components/Avatar/avatar.tsx +13 -5
- package/src/components/Badge/badge.principles.stories.tsx +1 -1
- package/src/components/Badge/badge.spec.md +2 -0
- package/src/components/Badge/badge.stories.tsx +4 -2
- package/src/components/Breadcrumb/breadcrumb.principles.stories.tsx +6 -4
- package/src/components/Breadcrumb/breadcrumb.stories.tsx +6 -5
- package/src/components/Breadcrumb/breadcrumb.tsx +3 -2
- package/src/components/BulkActionBar/bulk-action-bar.spec.md +4 -2
- package/src/components/Button/button.principles.stories.tsx +1 -1
- package/src/components/Button/button.spec.md +2 -2
- package/src/components/Button/button.tsx +18 -3
- package/src/components/Calendar/calendar.anatomy.stories.tsx +12 -10
- package/src/components/Calendar/calendar.principles.stories.tsx +14 -6
- package/src/components/Calendar/calendar.spec.md +5 -4
- package/src/components/Calendar/calendar.stories.tsx +7 -4
- package/src/components/Calendar/calendar.tsx +26 -7
- package/src/components/Carousel/carousel.anatomy.stories.tsx +5 -4
- package/src/components/Carousel/carousel.spec.md +2 -2
- package/src/components/Carousel/carousel.tsx +11 -3
- package/src/components/Chart/chart.anatomy.stories.tsx +7 -4
- package/src/components/Chart/chart.principles.stories.tsx +1 -1
- package/src/components/Chart/chart.stories.tsx +2 -8
- package/src/components/Chart/chart.tsx +3 -0
- package/src/components/Checkbox/checkbox.anatomy.stories.tsx +28 -49
- package/src/components/Checkbox/checkbox.principles.stories.tsx +1 -1
- package/src/components/Checkbox/checkbox.spec.md +13 -26
- package/src/components/Checkbox/checkbox.stories.tsx +11 -8
- package/src/components/Checkbox/checkbox.tsx +18 -13
- package/src/components/Chip/chip.anatomy.stories.tsx +44 -24
- package/src/components/Chip/chip.principles.stories.tsx +1 -1
- package/src/components/Chip/chip.spec.md +5 -4
- package/src/components/Chip/chip.tsx +5 -1
- package/src/components/CircularProgress/circular-progress.principles.stories.tsx +7 -4
- package/src/components/CircularProgress/circular-progress.spec.md +3 -3
- package/src/components/CircularProgress/circular-progress.stories.tsx +2 -2
- package/src/components/Coachmark/coachmark.anatomy.stories.tsx +2 -2
- package/src/components/Coachmark/coachmark.principles.stories.tsx +2 -1
- package/src/components/Coachmark/coachmark.spec.md +5 -5
- package/src/components/Coachmark/coachmark.stories.tsx +3 -1
- package/src/components/Coachmark/coachmark.tsx +10 -3
- package/src/components/Combobox/combobox.anatomy.stories.tsx +2 -2
- package/src/components/Combobox/combobox.tsx +53 -19
- package/src/components/Command/command.anatomy.stories.tsx +2 -2
- package/src/components/Command/command.principles.stories.tsx +1 -1
- package/src/components/Command/command.stories.tsx +42 -10
- package/src/components/DataTable/cell-registry.tsx +86 -63
- package/src/components/DataTable/column-types.ts +10 -1
- package/src/components/DataTable/data-table-column-visibility-panel.tsx +1 -1
- package/src/components/DataTable/data-table-filter-group.tsx +231 -0
- package/src/components/DataTable/data-table-filter-panel.tsx +16 -430
- package/src/components/DataTable/data-table-filter-value-picker.tsx +237 -0
- package/src/components/DataTable/data-table-interaction-layer.tsx +15 -19
- package/src/components/DataTable/data-table.anatomy.stories.tsx +15 -13
- package/src/components/DataTable/data-table.principles.stories.tsx +9 -9
- package/src/components/DataTable/data-table.spec.md +33 -13
- package/src/components/DataTable/data-table.stories.tsx +16 -17
- package/src/components/DataTable/data-table.tsx +107 -61
- package/src/components/DataTable/filter-operators.spec.md +3 -3
- package/src/components/DataTable/index.ts +3 -0
- package/src/components/DateGrid/date-grid.anatomy.stories.tsx +4 -4
- package/src/components/DateGrid/date-grid.principles.stories.tsx +1 -1
- package/src/components/DateGrid/date-grid.spec.md +1 -1
- package/src/components/DateGrid/date-grid.tsx +3 -1
- package/src/components/DatePicker/date-picker.anatomy.stories.tsx +8 -8
- package/src/components/DatePicker/date-picker.principles.stories.tsx +3 -3
- package/src/components/DatePicker/date-picker.spec.md +3 -3
- package/src/components/DatePicker/date-picker.stories.tsx +4 -5
- package/src/components/DatePicker/date-picker.tsx +99 -45
- package/src/components/DescriptionList/description-list.anatomy.stories.tsx +12 -10
- package/src/components/DescriptionList/description-list.principles.stories.tsx +2 -2
- package/src/components/DescriptionList/description-list.spec.md +3 -3
- package/src/components/DescriptionList/description-list.stories.tsx +7 -6
- package/src/components/Dialog/dialog.anatomy.stories.tsx +1 -0
- package/src/components/Dialog/dialog.spec.md +9 -0
- package/src/components/Dialog/dialog.stories.tsx +66 -5
- package/src/components/Dialog/dialog.tsx +60 -25
- package/src/components/DropdownMenu/dropdown-menu.anatomy.stories.tsx +1 -1
- package/src/components/DropdownMenu/dropdown-menu.principles.stories.tsx +8 -6
- package/src/components/DropdownMenu/dropdown-menu.spec.md +5 -5
- package/src/components/DropdownMenu/dropdown-menu.tsx +18 -9
- package/src/components/Empty/empty.anatomy.stories.tsx +1 -1
- package/src/components/Empty/empty.spec.md +2 -2
- package/src/components/Field/field-context.ts +69 -5
- package/src/components/Field/field-controls.spec.md +62 -8
- package/src/components/Field/field-edit-keys.ts +66 -0
- package/src/components/Field/field-types.ts +58 -9
- package/src/components/Field/field-wrapper.tsx +50 -42
- package/src/components/Field/field.anatomy.stories.tsx +9 -6
- package/src/components/Field/field.spec.md +1 -1
- package/src/components/Field/field.stories.tsx +1 -1
- package/src/components/Field/field.tsx +2 -1
- package/src/components/Field/form-validation.spec.md +3 -3
- package/src/components/Field/index.ts +1 -0
- package/src/components/FieldControlGroup/field-control-group.principles.stories.tsx +6 -6
- package/src/components/FieldControlGroup/field-control-group.spec.md +9 -4
- package/src/components/FieldControlGroup/field-control-group.tsx +1 -1
- package/src/components/FileItem/file-item.anatomy.stories.tsx +1 -1
- package/src/components/FileItem/file-item.spec.md +5 -8
- package/src/components/FileItem/file-item.stories.tsx +36 -25
- package/src/components/FileItem/file-item.tsx +8 -6
- package/src/components/FileUpload/file-upload.anatomy.stories.tsx +6 -6
- package/src/components/FileUpload/file-upload.principles.stories.tsx +5 -5
- package/src/components/FileUpload/file-upload.spec.md +1 -1
- package/src/components/FileUpload/file-upload.tsx +1 -1
- package/src/components/FileViewer/file-viewer.anatomy.stories.tsx +4 -3
- package/src/components/FileViewer/file-viewer.principles.stories.tsx +3 -3
- package/src/components/FileViewer/file-viewer.spec.md +30 -12
- package/src/components/FileViewer/file-viewer.stories.tsx +1 -2
- package/src/components/FileViewer/file-viewer.tsx +12 -4
- package/src/components/FileViewer/image-renderer.tsx +35 -7
- package/src/components/HoverCard/hover-card.anatomy.stories.tsx +6 -2
- package/src/components/HoverCard/hover-card.principles.stories.tsx +6 -3
- package/src/components/HoverCard/hover-card.spec.md +5 -5
- package/src/components/HoverCard/hover-card.stories.tsx +16 -16
- package/src/components/HoverCard/hover-card.tsx +5 -3
- package/src/components/InlineEdit/index.ts +5 -0
- package/src/components/InlineEdit/inline-edit.spec.md +149 -0
- package/src/components/InlineEdit/inline-edit.stories.tsx +246 -0
- package/src/components/InlineEdit/inline-edit.tsx +287 -0
- package/src/components/Input/input.anatomy.stories.tsx +8 -7
- package/src/components/Input/input.principles.stories.tsx +2 -12
- package/src/components/Input/input.spec.md +13 -18
- package/src/components/Input/input.tsx +69 -22
- package/src/components/LinkInput/link-input.anatomy.stories.tsx +1 -1
- package/src/components/LinkInput/link-input.principles.stories.tsx +2 -2
- package/src/components/LinkInput/link-input.tsx +11 -10
- package/src/components/Menu/menu-item.anatomy.stories.tsx +3 -3
- package/src/components/Menu/menu-item.principles.stories.tsx +1 -1
- package/src/components/Menu/menu-item.spec.md +22 -15
- package/src/components/Menu/menu-item.stories.tsx +39 -11
- package/src/components/Menu/menu-item.tsx +38 -4
- package/src/components/Notice/notice.principles.stories.tsx +1 -1
- package/src/components/Notice/notice.spec.md +16 -3
- package/src/components/NumberInput/number-input.anatomy.stories.tsx +3 -3
- package/src/components/NumberInput/number-input.principles.stories.tsx +1 -1
- package/src/components/NumberInput/number-input.spec.md +4 -4
- package/src/components/NumberInput/number-input.tsx +19 -12
- package/src/components/OverflowIndicator/overflow-indicator.anatomy.stories.tsx +10 -8
- package/src/components/OverflowIndicator/overflow-indicator.principles.stories.tsx +3 -3
- package/src/components/OverflowIndicator/overflow-indicator.spec.md +4 -2
- package/src/components/OverflowIndicator/overflow-indicator.stories.tsx +71 -63
- package/src/components/OverflowIndicator/overflow-indicator.tsx +9 -8
- package/src/components/Pagination/pagination.spec.md +1 -1
- package/src/components/Pagination/pagination.stories.tsx +2 -6
- package/src/components/Pagination/pagination.tsx +1 -1
- package/src/components/PeoplePicker/people-picker.anatomy.stories.tsx +4 -4
- package/src/components/PeoplePicker/people-picker.principles.stories.tsx +2 -2
- package/src/components/PeoplePicker/people-picker.spec.md +6 -6
- package/src/components/PeoplePicker/people-picker.tsx +56 -16
- package/src/components/PeoplePicker/person-display.tsx +32 -16
- package/src/components/Popover/popover.anatomy.stories.tsx +2 -2
- package/src/components/Popover/popover.tsx +3 -1
- package/src/components/ProfileCard/profile-card.anatomy.stories.tsx +12 -23
- package/src/components/ProfileCard/profile-card.spec.md +3 -3
- package/src/components/ProfileCard/profile-card.tsx +6 -6
- package/src/components/ProgressBar/progress-bar.anatomy.stories.tsx +3 -1
- package/src/components/ProgressBar/progress-bar.principles.stories.tsx +1 -1
- package/src/components/ProgressBar/progress-bar.stories.tsx +50 -42
- package/src/components/RadioGroup/radio-group.anatomy.stories.tsx +10 -28
- package/src/components/RadioGroup/radio-group.stories.tsx +29 -32
- package/src/components/RadioGroup/radio-group.tsx +41 -15
- package/src/components/Rating/rating.spec.md +11 -3
- package/src/components/ScrollArea/scroll-area.anatomy.stories.tsx +1 -1
- package/src/components/ScrollArea/scroll-area.principles.stories.tsx +1 -1
- package/src/components/ScrollArea/scroll-area.spec.md +7 -3
- package/src/components/ScrollArea/scroll-area.stories.tsx +1 -1
- package/src/components/ScrollArea/scroll-area.tsx +17 -4
- package/src/components/Select/select.anatomy.stories.tsx +3 -3
- package/src/components/Select/select.spec.md +29 -17
- package/src/components/Select/select.stories.tsx +33 -0
- package/src/components/Select/select.tsx +190 -36
- package/src/components/SelectMenu/select-menu.anatomy.stories.tsx +4 -4
- package/src/components/SelectMenu/select-menu.spec.md +15 -7
- package/src/components/SelectMenu/select-menu.tsx +16 -3
- package/src/components/SelectionControl/boolean-value.tsx +39 -0
- package/src/components/SelectionControl/index.ts +1 -0
- package/src/components/SelectionControl/selection-item.anatomy.stories.tsx +2 -2
- package/src/components/SelectionControl/selection-item.principles.stories.tsx +2 -2
- package/src/components/SelectionControl/selection-item.spec.md +3 -3
- package/src/components/SelectionControl/selection-item.stories.tsx +3 -3
- package/src/components/Separator/separator.spec.md +2 -2
- package/src/components/Separator/separator.stories.tsx +6 -27
- package/src/components/Sheet/sheet.anatomy.stories.tsx +1 -1
- package/src/components/Sheet/sheet.principles.stories.tsx +1 -1
- package/src/components/Sheet/sheet.spec.md +2 -2
- package/src/components/Sheet/sheet.tsx +9 -5
- package/src/components/Sidebar/sidebar.anatomy.stories.tsx +16 -12
- package/src/components/Sidebar/sidebar.principles.stories.tsx +10 -8
- package/src/components/Sidebar/sidebar.spec.md +13 -15
- package/src/components/Sidebar/sidebar.stories.tsx +8 -7
- package/src/components/Sidebar/sidebar.tsx +37 -25
- package/src/components/Skeleton/skeleton.stories.tsx +4 -11
- package/src/components/Slider/slider.anatomy.stories.tsx +3 -3
- package/src/components/Slider/slider.principles.stories.tsx +2 -2
- package/src/components/Slider/slider.spec.md +5 -5
- package/src/components/Slider/slider.tsx +3 -1
- package/src/components/Steps/steps.anatomy.stories.tsx +4 -4
- package/src/components/Steps/steps.principles.stories.tsx +1 -1
- package/src/components/Steps/steps.spec.md +1 -1
- package/src/components/Switch/switch.anatomy.stories.tsx +7 -7
- package/src/components/Switch/switch.principles.stories.tsx +4 -4
- package/src/components/Switch/switch.spec.md +8 -8
- package/src/components/Switch/switch.stories.tsx +9 -24
- package/src/components/Switch/switch.tsx +17 -13
- package/src/components/Tabs/tabs.anatomy.stories.tsx +10 -7
- package/src/components/Tabs/tabs.spec.md +1 -1
- package/src/components/Tabs/tabs.tsx +21 -1
- package/src/components/Textarea/textarea.anatomy.stories.tsx +1 -1
- package/src/components/Textarea/textarea.principles.stories.tsx +1 -1
- package/src/components/Textarea/textarea.spec.md +4 -4
- package/src/components/Textarea/textarea.tsx +72 -46
- package/src/components/TimePicker/time-columns.tsx +6 -2
- package/src/components/TimePicker/time-picker.principles.stories.tsx +1 -1
- package/src/components/TimePicker/time-picker.spec.md +3 -3
- package/src/components/TimePicker/time-picker.tsx +16 -10
- package/src/components/Toast/toast.stories.tsx +7 -4
- package/src/components/Tooltip/tooltip.anatomy.stories.tsx +4 -4
- package/src/components/Tooltip/tooltip.principles.stories.tsx +3 -3
- package/src/components/Tooltip/tooltip.spec.md +1 -1
- package/src/components/Tooltip/tooltip.stories.tsx +4 -39
- package/src/components/Tooltip/tooltip.tsx +8 -6
- package/src/components/TreeView/tree-view.anatomy.stories.tsx +6 -3
- package/src/components/TreeView/tree-view.spec.md +42 -11
- package/src/components/TreeView/tree-view.stories.tsx +1 -0
- package/src/components/TreeView/tree-view.tsx +322 -17
- package/src/index.ts +588 -60
- package/src/patterns/action-bar/action-bar.spec.md +9 -0
- package/src/patterns/action-bar/action-bar.stories.tsx +6 -3
- package/src/patterns/element-anatomy/inline-action.spec.md +2 -0
- package/src/patterns/element-anatomy/item-anatomy.spec.md +14 -5
- package/src/patterns/element-anatomy/item-anatomy.stories.tsx +6 -4
- package/src/patterns/element-anatomy/item-anatomy.tsx +7 -6
- package/src/patterns/header-canonical/header-canonical.spec.md +5 -4
- package/src/patterns/overlay-surface/overlay-surface.spec.md +22 -1
- package/src/styles/tokens.css +3 -0
- package/src/tokens/README.md +1 -1
- package/src/tokens/color/color.spec.md +4 -4
- package/src/tokens/color/color.stories.tsx +3 -3
- package/src/tokens/density/density.stories.tsx +16 -3
- package/src/tokens/layoutSpace/layoutSpace.spec.md +3 -1
- package/src/tokens/motion/motion.css +33 -21
- package/src/tokens/motion/motion.spec.md +32 -15
- package/src/tokens/motion/motion.stories.tsx +58 -5
- package/src/tokens/motion/motion.ts +7 -6
- package/src/tokens/motion/overlay-motion.ts +26 -0
- package/src/tokens/orphan-tokens.spec.md +4 -4
- package/src/tokens/token-system.spec.md +1 -0
- package/src/tokens/uiSize/uiSize.css +1 -1
- package/src/tokens/uiSize/uiSize.spec.md +1 -1
- package/src/tokens/uiSize/uiSize.stories.tsx +4 -2
- package/src/tokens/utility-registry.json +160 -23
|
@@ -1,33 +1,23 @@
|
|
|
1
1
|
// @benchmark-unverified-blanket: file-level retraction per M22 (d) — claims herein not individually URL-cited; treat as unverified visual/usage rumor unless retrofit per-claim. Hook escape preserved.
|
|
2
2
|
// same-row-mixed-allow: header chrome corner buttons(close)跟 row inline actions(trash)不在同 row
|
|
3
|
-
// code-quality-allow: file-size — 2026-05-03 M21 retract:filter-value-picker.tsx(187 行 / 1 consumer)inline 回本檔。panel 從 505 → 687 行,進 transition zone 但未過 800 hard cap。等 inline filter UI 接入第 2 consumer 再考慮抽出。
|
|
4
3
|
import * as React from 'react'
|
|
5
|
-
import { Plus,
|
|
4
|
+
import { Plus, X as XIcon, RotateCcw } from 'lucide-react'
|
|
6
5
|
import type { ColumnDef } from '@tanstack/react-table'
|
|
7
6
|
import { cn } from '@/lib/utils'
|
|
8
7
|
import { Button } from '@/design-system/components/Button/button'
|
|
9
|
-
import {
|
|
10
|
-
import { Combobox } from '@/design-system/components/Combobox/combobox'
|
|
11
|
-
import { Input } from '@/design-system/components/Input/input'
|
|
12
|
-
import { NumberInput } from '@/design-system/components/NumberInput/number-input'
|
|
13
|
-
import { DatePicker, DatePickerRange } from '@/design-system/components/DatePicker/date-picker'
|
|
14
|
-
import { PeoplePicker } from '@/design-system/components/PeoplePicker/people-picker'
|
|
15
|
-
import type { PersonValue } from '@/design-system/components/PeoplePicker/person-display'
|
|
8
|
+
import type { SelectOption } from '@/design-system/components/Select/select'
|
|
16
9
|
import { SurfaceHeader, SurfaceBody, COMPACT_HEADER_SLOT } from '@/design-system/patterns/overlay-surface/overlay-surface'
|
|
17
10
|
import { PopoverTitle, PopoverClose } from '@/design-system/components/Popover/popover'
|
|
18
11
|
import { ButtonDivider } from '@/design-system/components/Button/button-group'
|
|
19
|
-
import { FieldControlGroup } from '@/design-system/components/FieldControlGroup/field-control-group'
|
|
20
12
|
import type { ColumnType } from './column-types'
|
|
21
13
|
import { getColumnId, getColumnLabel, getColumnMeta } from './lib/column-meta'
|
|
22
14
|
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type ValueShape,
|
|
30
|
-
} from './filter-operators'
|
|
15
|
+
FilterRow,
|
|
16
|
+
GroupBlock,
|
|
17
|
+
getDefaultOperator,
|
|
18
|
+
datePrecisionOf,
|
|
19
|
+
type FilterColumn,
|
|
20
|
+
} from './data-table-filter-group'
|
|
31
21
|
import {
|
|
32
22
|
createEmptyFilterTree,
|
|
33
23
|
isFilterTreeActive,
|
|
@@ -64,6 +54,9 @@ export type { Conjunction, FilterCondition, FilterGroup, FilterTree, FilterTreeF
|
|
|
64
54
|
* Source-of-truth:
|
|
65
55
|
* - Operator definitions:`./filter-operators.ts` `OPERATOR_REGISTRY`(SSOT,禁 hardcode op 字串)
|
|
66
56
|
* - Filter state:**FilterTree**(本檔自管;搭配 TanStack `globalFilter` 求值)
|
|
57
|
+
* - Row / nested-group renderer:`./data-table-filter-group.tsx`;value picker:
|
|
58
|
+
* `./data-table-filter-value-picker.tsx`(皆 @internal — 2026-07-14 file-size 拆檔,
|
|
59
|
+
* 本檔只留 orchestration:columns 抽取 / FilterTree mutators / panel chrome)
|
|
67
60
|
*
|
|
68
61
|
* 詳:`./filter-operators.spec.md`
|
|
69
62
|
*/
|
|
@@ -73,17 +66,8 @@ export type { Conjunction, FilterCondition, FilterGroup, FilterTree, FilterTreeF
|
|
|
73
66
|
let _idSeed = 0
|
|
74
67
|
const newId = () => `f${++_idSeed}-${Date.now().toString(36)}`
|
|
75
68
|
|
|
76
|
-
// ── Helpers —
|
|
77
|
-
|
|
78
|
-
interface FilterColumn {
|
|
79
|
-
id: string
|
|
80
|
-
label: string
|
|
81
|
-
type: ColumnType
|
|
82
|
-
options?: Array<{ value: string; label: string }>
|
|
83
|
-
/** People pool for person/multiPerson filter picker(對齊 cell-registry meta.people SSOT)*/
|
|
84
|
-
people?: Array<{ name: string; avatarUrl?: string; description?: string }>
|
|
85
|
-
includeTime?: boolean
|
|
86
|
-
}
|
|
69
|
+
// ── Helpers — column extraction + condition factories ──────────────────
|
|
70
|
+
// (FilterColumn type + operator helpers 住 ./data-table-filter-group.tsx)
|
|
87
71
|
|
|
88
72
|
function extractColumns<TData>(columns: ColumnDef<TData, any>[]): FilterColumn[] {
|
|
89
73
|
const out: FilterColumn[] = []
|
|
@@ -106,20 +90,6 @@ function extractColumns<TData>(columns: ColumnDef<TData, any>[]): FilterColumn[]
|
|
|
106
90
|
return out
|
|
107
91
|
}
|
|
108
92
|
|
|
109
|
-
function getOperatorOptions(type?: ColumnType): SelectOption[] {
|
|
110
|
-
const registry = type && OPERATOR_REGISTRY[type] ? OPERATOR_REGISTRY[type] : OPERATOR_REGISTRY.string
|
|
111
|
-
return registry.map((op) => ({ value: op.op, label: op.label }))
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function getDefaultOperator(type?: ColumnType): string {
|
|
115
|
-
return (type && DEFAULT_OPERATOR[type]) || DEFAULT_OPERATOR.string
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Q6(2026-07-04):date 欄位把比對精度寫進 condition(includeTime=true → ms,否則 day)。
|
|
119
|
-
// 'time' 欄暫不寫(值非完整日期,truncate 語意不成立;見 filter-operators.spec v3 time 註)。
|
|
120
|
-
const datePrecisionOf = (col: FilterColumn | undefined): 'day' | 'ms' | undefined =>
|
|
121
|
-
col?.type === 'date' ? (col.includeTime ? 'ms' : 'day') : undefined
|
|
122
|
-
|
|
123
93
|
const newCondition = (firstCol: FilterColumn | undefined): FilterCondition => ({
|
|
124
94
|
kind: 'cond',
|
|
125
95
|
id: newId(),
|
|
@@ -153,217 +123,6 @@ const newEmptyGroup = (): FilterGroup => ({
|
|
|
153
123
|
children: [newEmptyCondition()],
|
|
154
124
|
})
|
|
155
125
|
|
|
156
|
-
// ── Internal — FilterValuePicker(value-picker switcher per ValueShape)──
|
|
157
|
-
//
|
|
158
|
-
// 2026-05-03 M21 retract:本 helper 原本獨立檔 `filter-value-picker.tsx`,
|
|
159
|
-
// claim「未來 inline filter UI 共用」但只 1 consumer(本 panel)= 違 M21
|
|
160
|
-
// premature abstraction。inline 回 panel,日後若真有第 2 consumer 再抽。
|
|
161
|
-
|
|
162
|
-
interface FilterValuePickerColInfo {
|
|
163
|
-
id: string
|
|
164
|
-
label: string
|
|
165
|
-
options?: Array<{ value: string; label: string }>
|
|
166
|
-
/** Person pool — person/multiPerson filter picker 用(2026-05-07 升級,SSOT 對齊 cell-registry) */
|
|
167
|
-
people?: Array<{ name: string; avatarUrl?: string; description?: string }>
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
interface FilterValuePickerProps {
|
|
171
|
-
shape: ValueShape | null
|
|
172
|
-
value: unknown
|
|
173
|
-
onChange: (v: unknown) => void
|
|
174
|
-
colInfo?: FilterValuePickerColInfo
|
|
175
|
-
disabled?: boolean
|
|
176
|
-
/** 用 column.label 組「{label} 篩選值」(panel 每 row 不顯式 label,a11y 必填) */
|
|
177
|
-
ariaLabel?: string
|
|
178
|
-
/** Forward 給內部 Field control 的 className(2026-05-04 #2 fix)
|
|
179
|
-
* 避免外層包 wrapper div 破壞 FieldControlGroup CSS variants(rounded radii / margin overlap) */
|
|
180
|
-
className?: string
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function FilterValuePicker({
|
|
184
|
-
shape,
|
|
185
|
-
value,
|
|
186
|
-
onChange,
|
|
187
|
-
colInfo,
|
|
188
|
-
disabled,
|
|
189
|
-
ariaLabel,
|
|
190
|
-
className,
|
|
191
|
-
}: FilterValuePickerProps) {
|
|
192
|
-
if (!shape || disabled) {
|
|
193
|
-
return <Input size="sm" value="" onChange={() => {}} placeholder="輸入值…" disabled aria-label={ariaLabel} className={className} />
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
switch (shape) {
|
|
197
|
-
case 'none':
|
|
198
|
-
return null
|
|
199
|
-
|
|
200
|
-
case 'text':
|
|
201
|
-
return (
|
|
202
|
-
<Input
|
|
203
|
-
size="sm"
|
|
204
|
-
value={String(value ?? '')}
|
|
205
|
-
onChange={(e) => onChange(e.target.value)}
|
|
206
|
-
placeholder="輸入值…"
|
|
207
|
-
aria-label={ariaLabel}
|
|
208
|
-
className={className}
|
|
209
|
-
/>
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
case 'number':
|
|
213
|
-
return (
|
|
214
|
-
<NumberInput
|
|
215
|
-
size="sm"
|
|
216
|
-
value={typeof value === 'number' ? value : null}
|
|
217
|
-
onChange={(v) => onChange(v ?? '')}
|
|
218
|
-
placeholder="輸入數字…"
|
|
219
|
-
aria-label={ariaLabel}
|
|
220
|
-
className={className}
|
|
221
|
-
/>
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
case 'date_single':
|
|
225
|
-
return (
|
|
226
|
-
<DatePicker
|
|
227
|
-
size="sm"
|
|
228
|
-
value={typeof value === 'string' ? value : null}
|
|
229
|
-
onChange={(v) => onChange(v ?? '')}
|
|
230
|
-
aria-label={ariaLabel}
|
|
231
|
-
className={className}
|
|
232
|
-
/>
|
|
233
|
-
)
|
|
234
|
-
|
|
235
|
-
case 'date_range':
|
|
236
|
-
return (
|
|
237
|
-
<DatePickerRange
|
|
238
|
-
size="sm"
|
|
239
|
-
value={Array.isArray(value) && value.length === 2
|
|
240
|
-
? (value as [string | null, string | null])
|
|
241
|
-
: null}
|
|
242
|
-
onChange={(v) => onChange(v)}
|
|
243
|
-
aria-label={ariaLabel}
|
|
244
|
-
className={className}
|
|
245
|
-
/>
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
case 'date_relative': {
|
|
249
|
-
// 群組分類:Past / Current / Future(對齊 Linear / Notion idiom),走 Select.groups → SelectMenu
|
|
250
|
-
const opts: SelectOption[] = DATE_RELATIVE_OPTIONS.map((o) => ({
|
|
251
|
-
value: o.value,
|
|
252
|
-
label: o.label,
|
|
253
|
-
group: o.group,
|
|
254
|
-
}))
|
|
255
|
-
return (
|
|
256
|
-
<Select
|
|
257
|
-
size="sm"
|
|
258
|
-
options={opts}
|
|
259
|
-
groups={DATE_RELATIVE_GROUPS as unknown as Array<{ key: string; label: string }>}
|
|
260
|
-
value={String(value ?? '')}
|
|
261
|
-
onChange={(v) => onChange(v)}
|
|
262
|
-
placeholder="選擇相對日期"
|
|
263
|
-
aria-label={ariaLabel}
|
|
264
|
-
className={className}
|
|
265
|
-
/>
|
|
266
|
-
)
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
case 'select_single': {
|
|
270
|
-
const opts: SelectOption[] = (colInfo?.options ?? []).map((o) => ({
|
|
271
|
-
value: o.value,
|
|
272
|
-
label: o.label,
|
|
273
|
-
}))
|
|
274
|
-
return (
|
|
275
|
-
<Select
|
|
276
|
-
size="sm"
|
|
277
|
-
options={opts}
|
|
278
|
-
value={String(value ?? '')}
|
|
279
|
-
onChange={(v) => onChange(v)}
|
|
280
|
-
placeholder="選擇值"
|
|
281
|
-
aria-label={ariaLabel}
|
|
282
|
-
className={className}
|
|
283
|
-
/>
|
|
284
|
-
)
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
case 'select_multi': {
|
|
288
|
-
const opts = (colInfo?.options ?? []).map((o) => ({
|
|
289
|
-
value: o.value,
|
|
290
|
-
label: o.label,
|
|
291
|
-
}))
|
|
292
|
-
const arr = Array.isArray(value) ? (value as string[]) : []
|
|
293
|
-
return (
|
|
294
|
-
<Combobox
|
|
295
|
-
size="sm"
|
|
296
|
-
options={opts}
|
|
297
|
-
value={arr}
|
|
298
|
-
onChange={(v) => onChange(v)}
|
|
299
|
-
placeholder="選擇值…"
|
|
300
|
-
aria-label={ariaLabel}
|
|
301
|
-
className={className}
|
|
302
|
-
/>
|
|
303
|
-
)
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
case 'datetime_single':
|
|
307
|
-
return (
|
|
308
|
-
<DatePicker
|
|
309
|
-
size="sm"
|
|
310
|
-
showTime
|
|
311
|
-
value={typeof value === 'string' ? value : null}
|
|
312
|
-
onChange={(v) => onChange(v ?? '')}
|
|
313
|
-
aria-label={ariaLabel}
|
|
314
|
-
className={className}
|
|
315
|
-
/>
|
|
316
|
-
)
|
|
317
|
-
|
|
318
|
-
case 'datetime_range':
|
|
319
|
-
return (
|
|
320
|
-
<DatePickerRange
|
|
321
|
-
size="sm"
|
|
322
|
-
showTime
|
|
323
|
-
value={Array.isArray(value) && value.length === 2
|
|
324
|
-
? (value as [string | null, string | null])
|
|
325
|
-
: null}
|
|
326
|
-
onChange={(v) => onChange(v)}
|
|
327
|
-
aria-label={ariaLabel}
|
|
328
|
-
className={className}
|
|
329
|
-
/>
|
|
330
|
-
)
|
|
331
|
-
|
|
332
|
-
// person_single / person_multi — 走 PeoplePicker(2026-05-07 升級,對齊 cell-registry SSOT)。
|
|
333
|
-
// colInfo.people 來自 column meta.people。Filter value:
|
|
334
|
-
// - person_single:存 PersonValue | null(picker emit array,我們取 [0])
|
|
335
|
-
// - person_multi:存 PersonValue[]
|
|
336
|
-
case 'person_single': {
|
|
337
|
-
const v = value as PersonValue | null | undefined
|
|
338
|
-
return (
|
|
339
|
-
<PeoplePicker
|
|
340
|
-
size="sm"
|
|
341
|
-
value={v ?? null}
|
|
342
|
-
people={colInfo?.people ?? []}
|
|
343
|
-
onChange={(next) => onChange(next[0] ?? null)}
|
|
344
|
-
aria-label={ariaLabel}
|
|
345
|
-
className={className}
|
|
346
|
-
/>
|
|
347
|
-
)
|
|
348
|
-
}
|
|
349
|
-
case 'person_multi': {
|
|
350
|
-
const v = Array.isArray(value) ? (value as PersonValue[]) : []
|
|
351
|
-
return (
|
|
352
|
-
<PeoplePicker
|
|
353
|
-
size="sm"
|
|
354
|
-
value={v}
|
|
355
|
-
people={colInfo?.people ?? []}
|
|
356
|
-
onChange={(next) => onChange(next)}
|
|
357
|
-
aria-label={ariaLabel}
|
|
358
|
-
className={className}
|
|
359
|
-
/>
|
|
360
|
-
)
|
|
361
|
-
}
|
|
362
|
-
default:
|
|
363
|
-
return null
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
126
|
// ── Component Props ─────────────────────────────────────────────────────
|
|
368
127
|
|
|
369
128
|
export interface DataTableFilterPanelProps<TData> {
|
|
@@ -439,6 +198,9 @@ function DataTableFilterPanelInner<TData>({
|
|
|
439
198
|
field: prefilledColumnId,
|
|
440
199
|
op: getDefaultOperator(colInfo.type),
|
|
441
200
|
value: '',
|
|
201
|
+
// 2026-07-14 deep-audit fix:補 datePrecision(原漏 → datetime(includeTime=true)欄
|
|
202
|
+
// prefill 掉到 undefined=day 精度忽略 ms;對齊初始 add / changeField 路徑的 datePrecisionOf)
|
|
203
|
+
datePrecision: datePrecisionOf(colInfo),
|
|
442
204
|
}
|
|
443
205
|
if (value.mode === 'flat') {
|
|
444
206
|
onChange({ ...value, children: [...value.children, cond] })
|
|
@@ -641,179 +403,3 @@ export const DataTableFilterPanel = React.forwardRef(DataTableFilterPanelInner)
|
|
|
641
403
|
props: DataTableFilterPanelProps<TData> & { ref?: React.ForwardedRef<HTMLDivElement> }
|
|
642
404
|
) => React.ReactElement
|
|
643
405
|
;(DataTableFilterPanel as { displayName?: string }).displayName = 'DataTableFilterPanel'
|
|
644
|
-
|
|
645
|
-
// ── ConjunctionLabel ───────────────────────────────────────────────────
|
|
646
|
-
|
|
647
|
-
const CONJ_OPTIONS: SelectOption[] = [
|
|
648
|
-
{ value: 'and', label: 'And' },
|
|
649
|
-
{ value: 'or', label: 'Or' },
|
|
650
|
-
]
|
|
651
|
-
|
|
652
|
-
function ConjunctionLabel({
|
|
653
|
-
index, conjunction, onChange,
|
|
654
|
-
}: { index: number; conjunction: Conjunction; onChange: (c: Conjunction) => void }) {
|
|
655
|
-
// index === 0:首 row 顯示靜態「Where」label
|
|
656
|
-
// index === 1:**唯一可改**的 AND/OR Select(連動整 group conjunction)
|
|
657
|
-
// index ≥ 2:被連動的 row,read-only 顯示當前 conjunction 文字(同 Where 視覺,A6 canonical)
|
|
658
|
-
// 對齊 Airtable / Notion / Linear 共識 @benchmark-unverified(non-OSS)
|
|
659
|
-
// px-[var(--field-px)] 對齊 Field 內部 padding 12px(Q13)
|
|
660
|
-
if (index === 0) {
|
|
661
|
-
return <div className="w-20 shrink-0 text-body text-fg-muted px-[var(--field-px)] self-center">Where</div>
|
|
662
|
-
}
|
|
663
|
-
if (index >= 2) {
|
|
664
|
-
const label = conjunction === 'and' ? 'And' : 'Or'
|
|
665
|
-
return <div className="w-20 shrink-0 text-body text-fg-muted px-[var(--field-px)] self-center">{label}</div>
|
|
666
|
-
}
|
|
667
|
-
// index === 1:可切換的 AND/OR Select
|
|
668
|
-
// minRows={2} — And/Or 2 選項,顯式縮 menu 高度避免 reserve 3 row 空白(Q5)
|
|
669
|
-
return (
|
|
670
|
-
<div className="w-20 shrink-0">
|
|
671
|
-
<Select
|
|
672
|
-
size="sm"
|
|
673
|
-
options={CONJ_OPTIONS}
|
|
674
|
-
value={conjunction}
|
|
675
|
-
onChange={(v) => onChange(v as Conjunction)}
|
|
676
|
-
minRows={2}
|
|
677
|
-
aria-label="連接詞 — 同 group 共用"
|
|
678
|
-
/>
|
|
679
|
-
</div>
|
|
680
|
-
)
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
// ── FilterRow(flat 用 + group 內共用) ──────────────────────────────
|
|
684
|
-
|
|
685
|
-
function FilterRow({
|
|
686
|
-
index, condition, conjunction, filterableColumns, fieldOptions,
|
|
687
|
-
onChangeConjunction, onChangeField, onChangeOp, onChangeValue, onRemove,
|
|
688
|
-
}: {
|
|
689
|
-
index: number
|
|
690
|
-
condition: FilterCondition
|
|
691
|
-
conjunction: Conjunction
|
|
692
|
-
filterableColumns: FilterColumn[]
|
|
693
|
-
fieldOptions: SelectOption[]
|
|
694
|
-
onChangeConjunction: (c: Conjunction) => void
|
|
695
|
-
onChangeField: (v: string) => void
|
|
696
|
-
onChangeOp: (v: string) => void
|
|
697
|
-
onChangeValue: (v: unknown) => void
|
|
698
|
-
onRemove: () => void
|
|
699
|
-
}) {
|
|
700
|
-
const colInfo = filterableColumns.find((c) => c.id === condition.field)
|
|
701
|
-
const operatorOptions = getOperatorOptions(colInfo?.type)
|
|
702
|
-
const hasField = !!condition.field
|
|
703
|
-
const opSpec = colInfo ? getOperatorSpec(colInfo.type, condition.op) : null
|
|
704
|
-
const valueShape: ValueShape | null = colInfo && opSpec
|
|
705
|
-
? getValueShape(opSpec, colInfo.type, colInfo.includeTime)
|
|
706
|
-
: null
|
|
707
|
-
// op 'is_set' / 'is_not_set' 等 shape='none' → 無 value cell,op 自動 expand 填剩餘寬
|
|
708
|
-
// 對齊 Notion / Airtable / Linear filter row 行為
|
|
709
|
-
// 注意:valueShape=null(初始無 field 選)時仍 render value cell(disabled placeholder)— 只 'none' 才 fold
|
|
710
|
-
const hasValueCell = valueShape !== 'none'
|
|
711
|
-
|
|
712
|
-
// FieldControlGroup 接合 field + op + value 視覺(2026-05-04 E refactor + 多輪 fix):
|
|
713
|
-
// - border collapse 取代 3 顆獨立 Select 並排,對齊 Airtable / Linear / Notion filter row idiom
|
|
714
|
-
// - ConjunctionLabel + Trash 在 group 外層(meta actions,不屬 control 一體)
|
|
715
|
-
// - **#5 fix**:row 內水平 gap = `gap-2` (8px),layoutSpace 規則 5 緊密相關
|
|
716
|
-
// - **#9 fix**:cell 用 `min-w-[]`(field 160 / op 120),value flex-1 min-w-0,讓 long label 可撐寬
|
|
717
|
-
// - **#2 fix**:FilterValuePicker 直接是 FieldControlGroup direct child(無 wrapper div),CSS variants 命中正確
|
|
718
|
-
return (
|
|
719
|
-
<div className="flex items-center gap-2">
|
|
720
|
-
<ConjunctionLabel index={index} conjunction={conjunction} onChange={onChangeConjunction} />
|
|
721
|
-
{/* **#9 fix(2026-05-04 v4)**:Field controls trigger `w-full` override 外 className,改用 Tailwind `!`
|
|
722
|
-
important 強制 override(`!w-[160px]` / `!w-[120px]`),value 用 `!flex-1 !min-w-0`。
|
|
723
|
-
Select 元件本身沒 destructure `style` prop 所以 inline style flex-basis 行不通,只能用 className。 */}
|
|
724
|
-
<FieldControlGroup block className="flex-1 min-w-0">
|
|
725
|
-
{/* 2026-05-23 Phase A.4 Decision 2:`!w-[160px]` / `!w-[120px]` → tokens
|
|
726
|
-
`--data-table-filter-field-width` / `--data-table-filter-op-width`(SSOT in uiSize.css)
|
|
727
|
-
Behavior preserved 完好如初:flat + nested 同 width(token 是 design constant) */}
|
|
728
|
-
<Select
|
|
729
|
-
className="!w-[var(--data-table-filter-field-width)] flex-shrink-0"
|
|
730
|
-
size="sm"
|
|
731
|
-
options={fieldOptions}
|
|
732
|
-
value={condition.field}
|
|
733
|
-
onChange={onChangeField}
|
|
734
|
-
placeholder="選擇欄位"
|
|
735
|
-
aria-label="篩選欄位"
|
|
736
|
-
/>
|
|
737
|
-
<Select
|
|
738
|
-
className={hasValueCell ? '!w-[var(--data-table-filter-op-width)] flex-shrink-0' : '!flex-1 !min-w-0'}
|
|
739
|
-
size="sm"
|
|
740
|
-
options={operatorOptions}
|
|
741
|
-
value={condition.op}
|
|
742
|
-
onChange={onChangeOp}
|
|
743
|
-
disabled={!hasField}
|
|
744
|
-
placeholder="運算子"
|
|
745
|
-
aria-label="篩選運算子"
|
|
746
|
-
/>
|
|
747
|
-
{hasValueCell && (
|
|
748
|
-
<FilterValuePicker
|
|
749
|
-
shape={valueShape}
|
|
750
|
-
value={condition.value}
|
|
751
|
-
onChange={onChangeValue}
|
|
752
|
-
colInfo={colInfo}
|
|
753
|
-
disabled={!hasField}
|
|
754
|
-
ariaLabel={colInfo ? `${colInfo.label} 篩選值` : '篩選值'}
|
|
755
|
-
className="!flex-1 !min-w-0"
|
|
756
|
-
/>
|
|
757
|
-
)}
|
|
758
|
-
</FieldControlGroup>
|
|
759
|
-
{/* Trash 用 text Button — filter row 是 form-control row,Field 同高對齊(28 md) */}
|
|
760
|
-
<Button variant="text" size="sm" iconOnly startIcon={Trash2} aria-label="刪除" onClick={onRemove} />
|
|
761
|
-
</div>
|
|
762
|
-
)
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
// ── GroupBlock(nested 用) ────────────────────────────────────────────
|
|
766
|
-
|
|
767
|
-
function GroupBlock({
|
|
768
|
-
index, group, rootConjunction, filterableColumns, fieldOptions,
|
|
769
|
-
onChangeRootConjunction, onChangeGroupConjunction,
|
|
770
|
-
onChangeCondition, onRemoveCondition, onAddCondition, onRemoveGroup,
|
|
771
|
-
}: {
|
|
772
|
-
index: number
|
|
773
|
-
group: FilterGroup
|
|
774
|
-
rootConjunction: Conjunction
|
|
775
|
-
filterableColumns: FilterColumn[]
|
|
776
|
-
fieldOptions: SelectOption[]
|
|
777
|
-
onChangeRootConjunction: (c: Conjunction) => void
|
|
778
|
-
onChangeGroupConjunction: (c: Conjunction) => void
|
|
779
|
-
onChangeCondition: (condId: string, patch: Partial<FilterCondition>) => void
|
|
780
|
-
onRemoveCondition: (condId: string) => void
|
|
781
|
-
onAddCondition: () => void
|
|
782
|
-
onRemoveGroup: () => void
|
|
783
|
-
}) {
|
|
784
|
-
return (
|
|
785
|
-
<div className="flex items-start gap-2">
|
|
786
|
-
<div className="pt-2">
|
|
787
|
-
<ConjunctionLabel index={index} conjunction={rootConjunction} onChange={onChangeRootConjunction} />
|
|
788
|
-
</div>
|
|
789
|
-
{/* Group container 灰底 — `bg-muted`(`--muted` neutral-2,user 2026-05-09 拍板 Q3 A)。對齊 color.spec.md L651-654 「table header / tab / code block / skeleton」靜態低重要 surface semantic */}
|
|
790
|
-
<div className="flex-1 min-w-0 rounded-md bg-muted p-2 flex flex-col gap-2">
|
|
791
|
-
{group.children.map((cond, cIdx) => (
|
|
792
|
-
<FilterRow
|
|
793
|
-
key={cond.id}
|
|
794
|
-
index={cIdx}
|
|
795
|
-
condition={cond}
|
|
796
|
-
conjunction={group.conjunction}
|
|
797
|
-
filterableColumns={filterableColumns}
|
|
798
|
-
fieldOptions={fieldOptions}
|
|
799
|
-
onChangeConjunction={onChangeGroupConjunction}
|
|
800
|
-
onChangeField={(v) => {
|
|
801
|
-
const newCol = filterableColumns.find((c) => c.id === v)
|
|
802
|
-
onChangeCondition(cond.id, { field: v, op: getDefaultOperator(newCol?.type), value: '', datePrecision: datePrecisionOf(newCol) })
|
|
803
|
-
}}
|
|
804
|
-
onChangeOp={(v) => onChangeCondition(cond.id, { op: v, value: '' })}
|
|
805
|
-
onChangeValue={(v) => onChangeCondition(cond.id, { value: v })}
|
|
806
|
-
onRemove={() => onRemoveCondition(cond.id)}
|
|
807
|
-
/>
|
|
808
|
-
))}
|
|
809
|
-
{/* Q9 — text variant 對齊 inline 派 + 視覺輕量 */}
|
|
810
|
-
<div className="flex items-center justify-between">
|
|
811
|
-
<Button variant="text" size="sm" startIcon={Plus} onClick={onAddCondition}>加入巢狀篩選</Button>
|
|
812
|
-
{group.children.length === 0 && (
|
|
813
|
-
<Button variant="text" size="sm" startIcon={Trash2} danger onClick={onRemoveGroup}>移除空群組</Button>
|
|
814
|
-
)}
|
|
815
|
-
</div>
|
|
816
|
-
</div>
|
|
817
|
-
</div>
|
|
818
|
-
)
|
|
819
|
-
}
|