@qijenchen/design-system 0.1.0-beta.14 → 0.1.0-beta.142
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/AGENTS.md +8 -0
- package/CLAUDE.md +3 -199
- package/README.md +6 -4
- package/cli-init.mjs +30 -2
- package/dist/components/Accordion/accordion.d.ts +3 -3
- package/dist/components/Accordion/accordion.d.ts.map +1 -1
- package/dist/components/Accordion/accordion.js +8 -4
- package/dist/components/Accordion/accordion.js.map +1 -1
- package/dist/components/AccountMenu/account-menu.d.ts +93 -0
- package/dist/components/AccountMenu/account-menu.d.ts.map +1 -0
- package/dist/components/AccountMenu/account-menu.js +73 -0
- package/dist/components/AccountMenu/account-menu.js.map +1 -0
- package/dist/components/AccountMenu/index.d.ts +2 -0
- package/dist/components/AccountMenu/index.d.ts.map +1 -0
- package/dist/components/AccountMenu/index.js +6 -0
- package/dist/components/AgentPanel/agent-panel-fab.d.ts +157 -0
- package/dist/components/AgentPanel/agent-panel-fab.d.ts.map +1 -0
- package/dist/components/AgentPanel/agent-panel-fab.js +552 -0
- package/dist/components/AgentPanel/agent-panel-fab.js.map +1 -0
- package/dist/components/AgentPanel/agent-panel-logo.d.ts +116 -0
- package/dist/components/AgentPanel/agent-panel-logo.d.ts.map +1 -0
- package/dist/components/AgentPanel/agent-panel-logo.js +539 -0
- package/dist/components/AgentPanel/agent-panel-logo.js.map +1 -0
- package/dist/components/AgentPanel/agent-panel.d.ts +229 -0
- package/dist/components/AgentPanel/agent-panel.d.ts.map +1 -0
- package/dist/components/AgentPanel/agent-panel.js +1108 -0
- package/dist/components/AgentPanel/agent-panel.js.map +1 -0
- package/dist/components/AgentPanel/index.d.ts +4 -0
- package/dist/components/AgentPanel/index.d.ts.map +1 -0
- package/dist/components/AgentPanel/index.js +35 -0
- package/dist/components/AgentPanel/index.js.map +1 -0
- package/dist/components/Alert/alert.d.ts +7 -2
- package/dist/components/Alert/alert.d.ts.map +1 -1
- package/dist/components/Alert/alert.js +12 -8
- package/dist/components/Alert/alert.js.map +1 -1
- package/dist/components/AppShell/_demo-helpers.d.ts +3 -1
- package/dist/components/AppShell/_demo-helpers.d.ts.map +1 -1
- package/dist/components/AppShell/app-shell.d.ts +19 -4
- package/dist/components/AppShell/app-shell.d.ts.map +1 -1
- package/dist/components/AppShell/app-shell.js +53 -15
- package/dist/components/AppShell/app-shell.js.map +1 -1
- package/dist/components/AppShell/index.js +2 -1
- package/dist/components/AspectRatio/aspect-ratio.d.ts +3 -2
- package/dist/components/AspectRatio/aspect-ratio.d.ts.map +1 -1
- package/dist/components/AspectRatio/aspect-ratio.js +4 -2
- package/dist/components/AspectRatio/aspect-ratio.js.map +1 -1
- package/dist/components/Avatar/avatar.d.ts +14 -7
- package/dist/components/Avatar/avatar.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.js +26 -31
- package/dist/components/Avatar/avatar.js.map +1 -1
- package/dist/components/Badge/badge.d.ts +21 -9
- package/dist/components/Badge/badge.d.ts.map +1 -1
- package/dist/components/Badge/badge.js +9 -6
- package/dist/components/Badge/badge.js.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.d.ts +16 -3
- package/dist/components/Breadcrumb/breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.js +21 -54
- package/dist/components/Breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts +7 -4
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts.map +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.js +8 -8
- package/dist/components/BulkActionBar/bulk-action-bar.js.map +1 -1
- package/dist/components/Button/button-group.d.ts +31 -5
- package/dist/components/Button/button-group.d.ts.map +1 -1
- package/dist/components/Button/button-group.js +31 -14
- package/dist/components/Button/button-group.js.map +1 -1
- package/dist/components/Button/button.d.ts +15 -14
- package/dist/components/Button/button.d.ts.map +1 -1
- package/dist/components/Button/button.js +95 -54
- 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/Calendar/calendar.d.ts +22 -19
- package/dist/components/Calendar/calendar.d.ts.map +1 -1
- package/dist/components/Calendar/calendar.js +184 -136
- package/dist/components/Calendar/calendar.js.map +1 -1
- package/dist/components/Carousel/carousel.d.ts +15 -9
- package/dist/components/Carousel/carousel.d.ts.map +1 -1
- package/dist/components/Carousel/carousel.js +92 -51
- package/dist/components/Carousel/carousel.js.map +1 -1
- package/dist/components/Chart/chart.d.ts +2 -2
- package/dist/components/Chart/chart.d.ts.map +1 -1
- package/dist/components/Chart/chart.js +12 -3
- package/dist/components/Chart/chart.js.map +1 -1
- package/dist/components/Checkbox/checkbox-group.d.ts +2 -1
- package/dist/components/Checkbox/checkbox-group.d.ts.map +1 -1
- package/dist/components/Checkbox/checkbox-group.js +21 -14
- package/dist/components/Checkbox/checkbox-group.js.map +1 -1
- package/dist/components/Checkbox/checkbox.d.ts +20 -11
- package/dist/components/Checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/checkbox.js +118 -19
- 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 +30 -11
- package/dist/components/Chip/chip.d.ts.map +1 -1
- package/dist/components/Chip/chip.js +83 -34
- package/dist/components/Chip/chip.js.map +1 -1
- package/dist/components/CircularProgress/circular-progress.d.ts +2 -3
- package/dist/components/CircularProgress/circular-progress.d.ts.map +1 -1
- package/dist/components/CircularProgress/circular-progress.js +5 -4
- package/dist/components/CircularProgress/circular-progress.js.map +1 -1
- package/dist/components/Coachmark/coachmark-story-helpers.d.ts +22 -0
- package/dist/components/Coachmark/coachmark-story-helpers.d.ts.map +1 -0
- package/dist/components/Coachmark/coachmark.d.ts +15 -6
- package/dist/components/Coachmark/coachmark.d.ts.map +1 -1
- package/dist/components/Coachmark/coachmark.js +12 -4
- package/dist/components/Coachmark/coachmark.js.map +1 -1
- package/dist/components/Combobox/combobox.d.ts +67 -13
- package/dist/components/Combobox/combobox.d.ts.map +1 -1
- package/dist/components/Combobox/combobox.js +216 -216
- package/dist/components/Combobox/combobox.js.map +1 -1
- package/dist/components/Command/command.d.ts +98 -10
- package/dist/components/Command/command.d.ts.map +1 -1
- package/dist/components/Command/command.js +178 -62
- package/dist/components/Command/command.js.map +1 -1
- package/dist/components/Command/index.js +3 -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 +5 -5
- package/dist/components/DataTable/cell-registry.d.ts.map +1 -1
- package/dist/components/DataTable/cell-registry.js +89 -95
- package/dist/components/DataTable/cell-registry.js.map +1 -1
- package/dist/components/DataTable/column-types.d.ts +11 -21
- 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/column-widths.d.ts +28 -0
- package/dist/components/DataTable/column-widths.d.ts.map +1 -0
- package/dist/components/DataTable/column-widths.js +45 -0
- package/dist/components/DataTable/column-widths.js.map +1 -0
- package/dist/components/DataTable/data-table-column-visibility-panel.d.ts +4 -3
- package/dist/components/DataTable/data-table-column-visibility-panel.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-column-visibility-panel.js +205 -0
- package/dist/components/DataTable/data-table-column-visibility-panel.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-group.d.ts +51 -0
- package/dist/components/DataTable/data-table-filter-group.d.ts.map +1 -0
- package/dist/components/DataTable/data-table-filter-group.js +158 -0
- package/dist/components/DataTable/data-table-filter-group.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-labels.d.ts +44 -0
- package/dist/components/DataTable/data-table-filter-labels.d.ts.map +1 -0
- package/dist/components/DataTable/data-table-filter-labels.js +55 -0
- package/dist/components/DataTable/data-table-filter-labels.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-panel.d.ts +12 -3
- package/dist/components/DataTable/data-table-filter-panel.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-filter-panel.js +316 -0
- package/dist/components/DataTable/data-table-filter-panel.js.map +1 -0
- package/dist/components/DataTable/data-table-filter-value-picker.d.ts +32 -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 +205 -0
- package/dist/components/DataTable/data-table-filter-value-picker.js.map +1 -0
- package/dist/components/DataTable/data-table-interaction-layer.d.ts +17 -20
- package/dist/components/DataTable/data-table-interaction-layer.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-interaction-layer.js +13 -4
- package/dist/components/DataTable/data-table-interaction-layer.js.map +1 -1
- package/dist/components/DataTable/data-table-sort-manager.d.ts +5 -5
- package/dist/components/DataTable/data-table-sort-manager.d.ts.map +1 -1
- package/dist/components/DataTable/data-table-sort-manager.js +162 -0
- package/dist/components/DataTable/data-table-sort-manager.js.map +1 -0
- package/dist/components/DataTable/data-table.d.ts +68 -15
- package/dist/components/DataTable/data-table.d.ts.map +1 -1
- package/dist/components/DataTable/data-table.js +1605 -429
- package/dist/components/DataTable/data-table.js.map +1 -1
- package/dist/components/DataTable/filter-operators.d.ts +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.d.ts +6 -1
- package/dist/components/DataTable/filter-tree.d.ts.map +1 -1
- package/dist/components/DataTable/filter-tree.js +318 -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 +16 -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/DataTable/perf-debug-overlay.d.ts +2 -0
- package/dist/components/DataTable/perf-debug-overlay.d.ts.map +1 -0
- package/dist/components/DateGrid/date-grid.d.ts +24 -20
- package/dist/components/DateGrid/date-grid.d.ts.map +1 -1
- package/dist/components/DateGrid/date-grid.js +109 -22
- package/dist/components/DateGrid/date-grid.js.map +1 -1
- package/dist/components/DatePicker/date-picker.d.ts +17 -13
- package/dist/components/DatePicker/date-picker.d.ts.map +1 -1
- package/dist/components/DatePicker/date-picker.js +453 -310
- package/dist/components/DatePicker/date-picker.js.map +1 -1
- package/dist/components/DescriptionList/description-list.d.ts +6 -6
- package/dist/components/DescriptionList/description-list.d.ts.map +1 -1
- package/dist/components/DescriptionList/description-list.js +11 -10
- package/dist/components/DescriptionList/description-list.js.map +1 -1
- package/dist/components/Dialog/dialog.d.ts +75 -24
- package/dist/components/Dialog/dialog.d.ts.map +1 -1
- package/dist/components/Dialog/dialog.js +111 -36
- package/dist/components/Dialog/dialog.js.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.d.ts +22 -12
- package/dist/components/DropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.js +116 -33
- package/dist/components/DropdownMenu/dropdown-menu.js.map +1 -1
- package/dist/components/Empty/empty.d.ts +14 -6
- package/dist/components/Empty/empty.d.ts.map +1 -1
- package/dist/components/Empty/empty.js +7 -7
- package/dist/components/Empty/empty.js.map +1 -1
- package/dist/components/Field/field-context.d.ts +111 -4
- package/dist/components/Field/field-context.d.ts.map +1 -1
- package/dist/components/Field/field-context.js +70 -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 +21 -4
- package/dist/components/Field/field-types.d.ts.map +1 -1
- package/dist/components/Field/field-wrapper.d.ts +128 -6
- package/dist/components/Field/field-wrapper.d.ts.map +1 -1
- package/dist/components/Field/field-wrapper.js +125 -118
- package/dist/components/Field/field-wrapper.js.map +1 -1
- package/dist/components/Field/field.d.ts +7 -6
- package/dist/components/Field/field.d.ts.map +1 -1
- package/dist/components/Field/field.js +26 -6
- 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 +3 -1
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/Field/use-form-validation.d.ts +92 -0
- package/dist/components/Field/use-form-validation.d.ts.map +1 -0
- package/dist/components/Field/use-form-validation.js +137 -0
- package/dist/components/Field/use-form-validation.js.map +1 -0
- package/dist/components/FieldControlGroup/field-control-group.d.ts +8 -11
- package/dist/components/FieldControlGroup/field-control-group.d.ts.map +1 -1
- package/dist/components/FieldControlGroup/field-control-group.js +5 -3
- package/dist/components/FieldControlGroup/field-control-group.js.map +1 -1
- package/dist/components/FileItem/file-item.d.ts +14 -2
- package/dist/components/FileItem/file-item.d.ts.map +1 -1
- package/dist/components/FileItem/file-item.js +53 -16
- package/dist/components/FileItem/file-item.js.map +1 -1
- package/dist/components/FileUpload/file-upload.d.ts +39 -19
- package/dist/components/FileUpload/file-upload.d.ts.map +1 -1
- package/dist/components/FileUpload/file-upload.js +104 -33
- package/dist/components/FileUpload/file-upload.js.map +1 -1
- package/dist/components/FileViewer/can-render-image.d.ts +6 -0
- package/dist/components/FileViewer/can-render-image.d.ts.map +1 -0
- package/dist/components/FileViewer/can-render-image.js +11 -0
- package/dist/components/FileViewer/can-render-image.js.map +1 -0
- package/dist/components/FileViewer/file-viewer.d.ts +17 -4
- package/dist/components/FileViewer/file-viewer.d.ts.map +1 -1
- package/dist/components/FileViewer/file-viewer.js +130 -51
- package/dist/components/FileViewer/file-viewer.js.map +1 -1
- package/dist/components/FileViewer/image-renderer.d.ts +0 -5
- package/dist/components/FileViewer/image-renderer.d.ts.map +1 -1
- package/dist/components/FileViewer/image-renderer.js +23 -10
- package/dist/components/FileViewer/image-renderer.js.map +1 -1
- package/dist/components/HoverCard/hover-card.d.ts +9 -5
- package/dist/components/HoverCard/hover-card.d.ts.map +1 -1
- package/dist/components/HoverCard/hover-card.js +16 -7
- 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 +6 -0
- package/dist/components/InlineEdit/index.js.map +1 -0
- package/dist/components/InlineEdit/inline-edit.d.ts +86 -0
- package/dist/components/InlineEdit/inline-edit.d.ts.map +1 -0
- package/dist/components/InlineEdit/inline-edit.js +255 -0
- package/dist/components/InlineEdit/inline-edit.js.map +1 -0
- package/dist/components/Input/input.d.ts +31 -10
- package/dist/components/Input/input.d.ts.map +1 -1
- package/dist/components/Input/input.js +66 -29
- package/dist/components/Input/input.js.map +1 -1
- package/dist/components/LinkInput/link-input.d.ts +9 -9
- package/dist/components/LinkInput/link-input.d.ts.map +1 -1
- package/dist/components/LinkInput/link-input.js +40 -37
- package/dist/components/LinkInput/link-input.js.map +1 -1
- package/dist/components/Menu/menu-item.d.ts +27 -4
- package/dist/components/Menu/menu-item.d.ts.map +1 -1
- package/dist/components/Menu/menu-item.js +78 -12
- package/dist/components/Menu/menu-item.js.map +1 -1
- package/dist/components/Notice/notice.d.ts +35 -7
- package/dist/components/Notice/notice.d.ts.map +1 -1
- package/dist/components/Notice/notice.js +34 -10
- package/dist/components/Notice/notice.js.map +1 -1
- package/dist/components/NumberInput/number-input.d.ts +5 -5
- package/dist/components/NumberInput/number-input.d.ts.map +1 -1
- package/dist/components/NumberInput/number-input.js +40 -18
- package/dist/components/NumberInput/number-input.js.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts +6 -2
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.js +10 -7
- package/dist/components/OverflowIndicator/overflow-indicator.js.map +1 -1
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.d.ts.map +1 -0
- package/dist/components/Pagination/index.js +6 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Pagination/pagination.d.ts +49 -0
- package/dist/components/Pagination/pagination.d.ts.map +1 -0
- package/dist/components/Pagination/pagination.js +235 -0
- package/dist/components/Pagination/pagination.js.map +1 -0
- package/dist/components/PeoplePicker/avatar-stack-overflow.d.ts +1 -1
- package/dist/components/PeoplePicker/avatar-stack-overflow.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-helpers.d.ts.map +1 -1
- package/dist/components/PeoplePicker/people-picker-helpers.js +2 -2
- package/dist/components/PeoplePicker/people-picker-helpers.js.map +1 -1
- package/dist/components/PeoplePicker/people-picker.d.ts +49 -10
- package/dist/components/PeoplePicker/people-picker.d.ts.map +1 -1
- package/dist/components/PeoplePicker/people-picker.js +148 -73
- package/dist/components/PeoplePicker/people-picker.js.map +1 -1
- package/dist/components/PeoplePicker/person-display.d.ts +19 -11
- package/dist/components/PeoplePicker/person-display.d.ts.map +1 -1
- package/dist/components/PeoplePicker/person-display.js +66 -30
- package/dist/components/PeoplePicker/person-display.js.map +1 -1
- package/dist/components/Popover/popover.d.ts +2 -2
- package/dist/components/Popover/popover.d.ts.map +1 -1
- package/dist/components/Popover/popover.js +75 -43
- package/dist/components/Popover/popover.js.map +1 -1
- package/dist/components/ProfileCard/index.d.ts +2 -0
- package/dist/components/ProfileCard/index.d.ts.map +1 -0
- package/dist/components/ProfileCard/index.js +8 -0
- package/dist/components/ProfileCard/index.js.map +1 -0
- package/dist/components/{NameCard/name-card.d.ts → ProfileCard/profile-card.d.ts} +34 -20
- package/dist/components/ProfileCard/profile-card.d.ts.map +1 -0
- package/dist/components/{NameCard/name-card.js → ProfileCard/profile-card.js} +27 -16
- package/dist/components/ProfileCard/profile-card.js.map +1 -0
- package/dist/components/ProgressBar/progress-bar.d.ts +2 -14
- package/dist/components/ProgressBar/progress-bar.d.ts.map +1 -1
- package/dist/components/ProgressBar/progress-bar.js +5 -9
- package/dist/components/ProgressBar/progress-bar.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.d.ts +18 -12
- package/dist/components/RadioGroup/radio-group.d.ts.map +1 -1
- package/dist/components/RadioGroup/radio-group.js +134 -41
- package/dist/components/RadioGroup/radio-group.js.map +1 -1
- package/dist/components/Rating/rating.d.ts +6 -2
- package/dist/components/Rating/rating.d.ts.map +1 -1
- package/dist/components/Rating/rating.js +18 -11
- package/dist/components/Rating/rating.js.map +1 -1
- package/dist/components/ScrollArea/scroll-area.d.ts +16 -4
- package/dist/components/ScrollArea/scroll-area.d.ts.map +1 -1
- package/dist/components/ScrollArea/scroll-area.js +10 -7
- package/dist/components/ScrollArea/scroll-area.js.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.d.ts +8 -7
- package/dist/components/SegmentedControl/segmented-control.d.ts.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.js +32 -21
- package/dist/components/SegmentedControl/segmented-control.js.map +1 -1
- package/dist/components/Select/select.d.ts +85 -15
- package/dist/components/Select/select.d.ts.map +1 -1
- package/dist/components/Select/select.js +319 -100
- package/dist/components/Select/select.js.map +1 -1
- package/dist/components/SelectMenu/index.js +4 -2
- package/dist/components/SelectMenu/select-menu.d.ts +127 -17
- package/dist/components/SelectMenu/select-menu.d.ts.map +1 -1
- package/dist/components/SelectMenu/select-menu.js +230 -122
- 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/SelectionControl/selection-item.d.ts +5 -1
- package/dist/components/SelectionControl/selection-item.d.ts.map +1 -1
- package/dist/components/SelectionControl/selection-item.js +3 -1
- package/dist/components/SelectionControl/selection-item.js.map +1 -1
- package/dist/components/Separator/separator.d.ts +2 -2
- package/dist/components/Separator/separator.js +4 -3
- package/dist/components/Separator/separator.js.map +1 -1
- package/dist/components/Sheet/index.js +2 -1
- package/dist/components/Sheet/sheet.d.ts +15 -8
- package/dist/components/Sheet/sheet.d.ts.map +1 -1
- package/dist/components/Sheet/sheet.js +10 -5
- package/dist/components/Sheet/sheet.js.map +1 -1
- package/dist/components/Sidebar/sidebar.d.ts +17 -11
- package/dist/components/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/sidebar.js +84 -37
- package/dist/components/Sidebar/sidebar.js.map +1 -1
- package/dist/components/Skeleton/skeleton.d.ts +2 -2
- package/dist/components/Skeleton/skeleton.js +4 -3
- package/dist/components/Skeleton/skeleton.js.map +1 -1
- package/dist/components/Slider/slider.d.ts +7 -7
- package/dist/components/Slider/slider.d.ts.map +1 -1
- package/dist/components/Slider/slider.js +51 -18
- package/dist/components/Slider/slider.js.map +1 -1
- package/dist/components/Steps/steps.d.ts +8 -6
- package/dist/components/Steps/steps.d.ts.map +1 -1
- package/dist/components/Steps/steps.js +83 -33
- package/dist/components/Steps/steps.js.map +1 -1
- package/dist/components/Switch/switch.d.ts +20 -18
- package/dist/components/Switch/switch.d.ts.map +1 -1
- package/dist/components/Switch/switch.js +149 -30
- package/dist/components/Switch/switch.js.map +1 -1
- package/dist/components/Tabs/tabs-inline-action-geometry.d.ts +31 -0
- package/dist/components/Tabs/tabs-inline-action-geometry.d.ts.map +1 -0
- package/dist/components/Tabs/tabs-inline-action-geometry.js +43 -0
- package/dist/components/Tabs/tabs-inline-action-geometry.js.map +1 -0
- package/dist/components/Tabs/tabs.d.ts +14 -11
- package/dist/components/Tabs/tabs.d.ts.map +1 -1
- package/dist/components/Tabs/tabs.js +191 -71
- package/dist/components/Tabs/tabs.js.map +1 -1
- package/dist/components/Tag/index.js +2 -1
- package/dist/components/Tag/tag.d.ts +48 -23
- package/dist/components/Tag/tag.d.ts.map +1 -1
- package/dist/components/Tag/tag.js +78 -66
- package/dist/components/Tag/tag.js.map +1 -1
- package/dist/components/Textarea/textarea.d.ts +24 -17
- package/dist/components/Textarea/textarea.d.ts.map +1 -1
- package/dist/components/Textarea/textarea.js +104 -95
- 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 +55 -36
- package/dist/components/TimePicker/time-columns.js.map +1 -1
- package/dist/components/TimePicker/time-picker.d.ts +8 -7
- package/dist/components/TimePicker/time-picker.d.ts.map +1 -1
- package/dist/components/TimePicker/time-picker.js +88 -55
- package/dist/components/TimePicker/time-picker.js.map +1 -1
- package/dist/components/Toast/toast.d.ts +2 -2
- package/dist/components/Toast/toast.d.ts.map +1 -1
- package/dist/components/Toast/toast.js +82 -20
- package/dist/components/Toast/toast.js.map +1 -1
- package/dist/components/Tooltip/tooltip.d.ts +2 -2
- package/dist/components/Tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/tooltip.js +80 -26
- package/dist/components/Tooltip/tooltip.js.map +1 -1
- package/dist/components/TreeView/tree-view.d.ts +70 -13
- package/dist/components/TreeView/tree-view.d.ts.map +1 -1
- package/dist/components/TreeView/tree-view.js +356 -48
- package/dist/components/TreeView/tree-view.js.map +1 -1
- package/dist/hooks/use-controllable.d.ts.map +1 -1
- package/dist/hooks/use-controllable.js +4 -2
- package/dist/hooks/use-controllable.js.map +1 -1
- package/dist/hooks/use-input-modality.d.ts +58 -0
- package/dist/hooks/use-input-modality.d.ts.map +1 -0
- package/dist/hooks/use-input-modality.js +98 -0
- package/dist/hooks/use-input-modality.js.map +1 -0
- package/dist/hooks/use-is-touch-device.d.ts.map +1 -1
- package/dist/hooks/use-is-touch-device.js +3 -1
- package/dist/hooks/use-is-touch-device.js.map +1 -1
- package/dist/hooks/use-known-options.d.ts +14 -0
- package/dist/hooks/use-known-options.d.ts.map +1 -0
- package/dist/hooks/use-known-options.js +14 -0
- package/dist/hooks/use-known-options.js.map +1 -0
- package/dist/hooks/use-overflow-items.d.ts +10 -6
- package/dist/hooks/use-overflow-items.d.ts.map +1 -1
- package/dist/hooks/use-overflow-items.js.map +1 -1
- package/dist/hooks/use-truncated.d.ts +27 -0
- package/dist/hooks/use-truncated.d.ts.map +1 -0
- package/dist/hooks/use-truncated.js +57 -0
- package/dist/hooks/use-truncated.js.map +1 -0
- package/dist/{react-day-picker.css → index.css} +59 -0
- package/dist/index.d.ts +124 -65
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +170 -165
- package/dist/index.js.map +1 -1
- package/dist/lib/drag-announcements.d.ts +59 -0
- package/dist/lib/drag-announcements.d.ts.map +1 -0
- package/dist/lib/drag-announcements.js +17 -0
- package/dist/lib/drag-announcements.js.map +1 -0
- package/dist/lib/drag-visual.d.ts +107 -5
- package/dist/lib/drag-visual.d.ts.map +1 -1
- package/dist/lib/drag-visual.js +40 -1
- package/dist/lib/drag-visual.js.map +1 -1
- package/dist/lib/overlay-coexistence.d.ts +59 -0
- package/dist/lib/overlay-coexistence.d.ts.map +1 -0
- package/dist/lib/overlay-coexistence.js +156 -0
- package/dist/lib/overlay-coexistence.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +24 -2
- package/dist/lib/utils.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +147 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/patterns/element-anatomy/index.d.ts +1 -0
- package/dist/patterns/element-anatomy/index.d.ts.map +1 -1
- package/dist/patterns/element-anatomy/index.js +2 -0
- package/dist/patterns/element-anatomy/index.js.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.d.ts +32 -16
- package/dist/patterns/element-anatomy/item-anatomy.d.ts.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.js +94 -37
- package/dist/patterns/element-anatomy/item-anatomy.js.map +1 -1
- package/dist/patterns/element-anatomy/truncated-text.d.ts +27 -0
- package/dist/patterns/element-anatomy/truncated-text.d.ts.map +1 -0
- package/dist/patterns/element-anatomy/truncated-text.js +16 -0
- package/dist/patterns/element-anatomy/truncated-text.js.map +1 -0
- package/dist/patterns/header-canonical/chrome-header.d.ts +20 -4
- package/dist/patterns/header-canonical/chrome-header.d.ts.map +1 -1
- package/dist/patterns/header-canonical/chrome-header.js +4 -2
- package/dist/patterns/header-canonical/chrome-header.js.map +1 -1
- package/dist/patterns/header-canonical/index.js +3 -2
- package/dist/patterns/horizontal-overflow/horizontal-overflow.d.ts +1 -1
- package/dist/patterns/horizontal-overflow/horizontal-overflow.js.map +1 -1
- package/dist/patterns/overlay-surface/index.js +2 -1
- package/dist/patterns/overlay-surface/overlay-surface.d.ts +12 -2
- package/dist/patterns/overlay-surface/overlay-surface.d.ts.map +1 -1
- package/dist/patterns/overlay-surface/overlay-surface.js +10 -2
- package/dist/patterns/overlay-surface/overlay-surface.js.map +1 -1
- package/dist/patterns/resize-handle/resize-handle.d.ts +40 -80
- package/dist/patterns/resize-handle/resize-handle.d.ts.map +1 -1
- package/dist/patterns/resize-handle/resize-handle.js +108 -24
- package/dist/patterns/resize-handle/resize-handle.js.map +1 -1
- package/dist/story-governance/category-matrix.d.ts +35 -0
- package/dist/story-governance/category-matrix.d.ts.map +1 -0
- package/dist/tokens/categorical-color.d.ts +60 -0
- package/dist/tokens/categorical-color.d.ts.map +1 -0
- package/dist/tokens/categorical-color.js +125 -0
- package/dist/tokens/categorical-color.js.map +1 -0
- package/dist/tokens/elevation/overlay-geometry.d.ts +16 -0
- package/dist/tokens/elevation/overlay-geometry.d.ts.map +1 -1
- package/dist/tokens/elevation/overlay-geometry.js +2 -0
- package/dist/tokens/elevation/overlay-geometry.js.map +1 -1
- package/dist/tokens/motion/motion.d.ts +8 -7
- 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 +20 -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.d.ts +3 -4
- package/dist/tokens/uiSize/icon-size.d.ts.map +1 -1
- package/dist/tokens/uiSize/icon-size.js +5 -0
- package/dist/tokens/uiSize/icon-size.js.map +1 -0
- package/ds-canonical/adapters/claude/agents/README.md +58 -0
- package/ds-canonical/adapters/claude/agents/canonical-reviewer.md +14 -0
- package/ds-canonical/adapters/claude-root-instructions.md +24 -0
- package/ds-canonical/adapters/claude-settings-base.json +172 -0
- package/ds-canonical/commands/README.md +9 -14
- package/ds-canonical/fork/AGENTS.md +110 -0
- package/ds-canonical/fork/CLAUDE.md +54 -0
- package/ds-canonical/fork/codex/agents/skills/bug-fix-rhythm/SKILL.md +207 -0
- package/ds-canonical/fork/codex/agents/skills/code-quality-audit/SKILL.md +71 -0
- package/ds-canonical/fork/codex/agents/skills/delivery-handoff/SKILL.md +244 -0
- package/ds-canonical/fork/codex/agents/skills/delivery-handoff/references/flow-diagram.md +180 -0
- package/ds-canonical/fork/codex/agents/skills/delivery-handoff/references/handoff-template.md +177 -0
- package/ds-canonical/fork/codex/agents/skills/delivery-handoff/references/inventory-checklist.md +196 -0
- package/ds-canonical/fork/codex/agents/skills/independent-review/SKILL.md +43 -0
- package/ds-canonical/fork/codex/agents/skills/independent-review/agents/openai.yaml +4 -0
- package/ds-canonical/fork/codex/agents/skills/independent-review/references/evidence-contract.md +23 -0
- package/ds-canonical/fork/codex/agents/skills/performance-audit/SKILL.md +114 -0
- package/ds-canonical/fork/codex/agents/skills/product-ui-audit/SKILL.md +252 -0
- package/ds-canonical/fork/codex/agents/skills/product-ui-audit/references/audit-checks.md +250 -0
- package/ds-canonical/fork/codex/agents/skills/product-ui-audit/references/common-misuses.md +329 -0
- package/ds-canonical/fork/codex/agents/skills/product-ui-audit/references/report-template.md +163 -0
- package/ds-canonical/fork/codex/agents/skills/propose-options/SKILL.md +190 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/SKILL.md +246 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/audit-checks.md +39 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/checkpoints.md +200 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/evaluation-matrix.md +142 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/fork/codex/agents/skills/prototype/references/proposal-template.md +230 -0
- package/ds-canonical/fork/codex/agents/skills/scan-similar-bugs/SKILL.md +203 -0
- package/ds-canonical/fork/codex/agents/skills/ux-audit/SKILL.md +135 -0
- package/ds-canonical/fork/codex/agents/skills/visual-audit/SKILL.md +258 -0
- package/ds-canonical/fork/codex/agents/skills/visual-audit/output/.gitkeep +0 -0
- package/ds-canonical/fork/codex/agents/skills/visual-audit/references/audit-architecture.md +101 -0
- package/ds-canonical/fork/codex/agents/skills/visual-audit/references/visual-checklist.md +297 -0
- package/ds-canonical/fork/codex/agents/skills/visual-audit/references/world-class-benchmarks.md +198 -0
- package/ds-canonical/fork/codex/hooks.json +57 -0
- package/ds-canonical/fork/common/closed-tool-execution.mjs +1005 -0
- package/ds-canonical/fork/common/instruction.md +110 -0
- package/ds-canonical/fork/consumer/governance-check.mjs +3163 -0
- package/ds-canonical/fork/consumer/lib/closed-tool-execution.mjs +1005 -0
- package/ds-canonical/fork/consumer/lock.json +189 -0
- package/ds-canonical/fork/consumer/lock.schema.json +338 -0
- package/ds-canonical/fork/consumer/managed-files/0235cf6b3fd402a3717881dc205b5bf77aed7632e7d7d6f1811a40e3033bd816.blob +145 -0
- package/ds-canonical/fork/consumer/managed-files/145aab4b4fc470fc9ba7679b4a1d87d4f6a6d604940bd40f8d675c8af696498f.blob +53 -0
- package/ds-canonical/fork/consumer/managed-files/189e551431181e4a88783c02130d2787b801ef731c86e35bcde89a7313aa020e.blob +149 -0
- package/ds-canonical/fork/consumer/managed-files/24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686.blob +28 -0
- package/ds-canonical/fork/consumer/managed-files/2d1ef5617a5ce3c39ad9aae1c42af7d199f9270c0a0ccb490b63d62dbc6913db.blob +1005 -0
- package/ds-canonical/fork/consumer/managed-files/3625e02235cf166a50649a4d704cfb68fead69d0e168c481df013ebae9f6be25.blob +1412 -0
- package/ds-canonical/fork/consumer/managed-files/3ddedc67b464bdfe3dde9803a2d917920c96d633678b802eee638a44cd47366a.blob +8 -0
- package/ds-canonical/fork/consumer/managed-files/423729840acdd43c812f17c245b871716c6b60f76e4d3e94864d0e34a815bf8d.blob +348 -0
- package/ds-canonical/fork/consumer/managed-files/46f10bc55cdfdf834d0749eebff42ea0bb8576f361b36d2b6ba1851354c50150.blob +573 -0
- package/ds-canonical/fork/consumer/managed-files/475fba657eaeb8abd88f60635f3eadab27a9d0d3114ba4fffc65f43a2a0fe6e2.blob +124 -0
- package/ds-canonical/fork/consumer/managed-files/5aeda1df235815f40dd755951f2b868d4e02035653d4536a8dde209cdc75b493.blob +268 -0
- package/ds-canonical/fork/consumer/managed-files/61c6aca6d7f04bedbf556eaa9d3043681fe48cbe0e93a8ccb1d69a7c5e23fdcf.blob +113 -0
- package/ds-canonical/fork/consumer/managed-files/63061e05969667005020166ea2ae7df3c96663f7a928e7dd3eebc1471022df56.blob +2454 -0
- package/ds-canonical/fork/consumer/managed-files/65410b66e8799a560e07b71779c186fed2a0ef50575ac44745df7a0938a9c2b4.blob +321 -0
- package/ds-canonical/fork/consumer/managed-files/6b746628ac11fcccbe277ef6fea94cc2a7b90ea2822e83536eae80d5ee4b3fa5.blob +167 -0
- package/ds-canonical/fork/consumer/managed-files/76d485470d30ff014afacf7ce643763de9f4f956d9fc8128dbc1814774cf2e63.blob +671 -0
- package/ds-canonical/fork/consumer/managed-files/7937321877e5c34c27dae36c0d507d21cd42fa3f46a8f11a284b8b4a52b6faa4.blob +84 -0
- package/ds-canonical/fork/consumer/managed-files/794bb911ba8ebef58ab0d44a55b9968a19d2c62bcfb310b1ee3a84166f087f21.blob +924 -0
- package/ds-canonical/fork/consumer/managed-files/7ab15a8aeca39485d7b9b57234bbc4a69e0b9e70b4a851dfe10f6447127cee78.blob +51 -0
- package/ds-canonical/fork/consumer/managed-files/7b17835d0ceb17cdcdcaf930540a3e5d0943a34a747ac43c12ca8cd485c11581.blob +44 -0
- package/ds-canonical/fork/consumer/managed-files/7eb6cc60abfdabaf6617c336058fad1454ccde08889295767bfd9b7fd153cc6e.blob +900 -0
- package/ds-canonical/fork/consumer/managed-files/81037efa5b3b9f4a875704005fb268acdc9233bb901f44902e4e37e1da92b8e3.blob +46 -0
- package/ds-canonical/fork/consumer/managed-files/884721550b56308812b20917adac7a12f36fdb4ecda6b02460a7f5a219c0c966.blob +82 -0
- package/ds-canonical/fork/consumer/managed-files/91f414b9462ddc1e4be1d4c6ca4ac7a7340a6eec9e98ee109cbc049d3b354b6a.blob +36 -0
- package/ds-canonical/fork/consumer/managed-files/92e4828cdcb96ff0d01daa16f6885f24045a8e72820665650f2a1890dc3a446c.blob +134 -0
- package/ds-canonical/fork/consumer/managed-files/93a89f16f6717d1e4e4e27ec20ef916e3355c7aa890ca74cd9b12db30d8a899f.blob +36 -0
- package/ds-canonical/fork/consumer/managed-files/974521d6b8fe796ea4c58b3c78b0c2b8a1be262b97100d77aaf4cc9c7724bcab.blob +45 -0
- package/ds-canonical/fork/consumer/managed-files/9791c85388d2e2e2bd564e2550fadc3351c4c960a47ce838098afcba7544eb90.blob +973 -0
- package/ds-canonical/fork/consumer/managed-files/a448d2222133335c30e6fda5116e26a40db3283a19d62ccc0663c30d272262a7.blob +174 -0
- package/ds-canonical/fork/consumer/managed-files/ab072e7f2eca51f0e18a5e18c4b333260ee5d219a12cc6df5bb2d683f0b2734d.blob +2639 -0
- package/ds-canonical/fork/consumer/managed-files/bc44cabad181f766611dab6a8f52d81100afadd50ac59799015e8ba7bf46d9eb.blob +620 -0
- package/ds-canonical/fork/consumer/managed-files/c4aa767f11714467de0038a2149cf78074baddc17fc6a9e074b6aed7544c6f3c.blob +80 -0
- package/ds-canonical/fork/consumer/managed-files/c893e9b734b162f4c631fef871128c16a9ab565f796a0e76d7f320f821f220f5.blob +41 -0
- package/ds-canonical/fork/consumer/managed-files/cd9c61f8ff24fb9bcc3663e346e2cfa419cfb84e02aae18d3dc66dd192681696.blob +9 -0
- package/ds-canonical/fork/consumer/managed-files/da2ad2737315d25a5300905ddefd62f1695056a8a1af155c5b34170ad9923bce.blob +38 -0
- package/ds-canonical/fork/consumer/managed-files/e26057408661597aac4a57cdf7e30e2f9d0afb1b9a2dbbb692c3805cd9028ca5.blob +250 -0
- package/ds-canonical/fork/consumer/managed-files/e68ae1915965d8e17d4b2441c00c2b97fe062ea308ae8535c9eebb2fc16fa245.blob +20 -0
- package/ds-canonical/fork/consumer/managed-files/e71c65f45c6af7ce12b6b3c0d8028f185da5b719e2050c9b2a6b243d41ae4878.blob +204 -0
- package/ds-canonical/fork/consumer/managed-files/e813096d69c49812e40e00be9ac8fa14d77f0ec1f97ab4c45cb096b3bedd35de.blob +3 -0
- package/ds-canonical/fork/consumer/managed-files/e930ebca6fd8eeb30802aac0930efae7bcc44cc0996f24de07c11ca6a081fedf.blob +277 -0
- package/ds-canonical/fork/consumer/managed-files/ea94e914d5c8acb84ad7660e5bda0f01b6ccc8cf96b0f6b1ce048f8938d0f5b5.blob +47 -0
- package/ds-canonical/fork/consumer/managed-files/f4db6e616d5229aa7e700c6a3ace022cb9d90baae74e38ca65fce617f18e0d9b.blob +110 -0
- package/ds-canonical/fork/consumer/managed-files/faa128c26102415dc5345e68698efbbd28a395c35ee278dceae044cf430692b2.blob +11 -0
- package/ds-canonical/fork/governance.lock +1696 -0
- package/ds-canonical/fork/hooks/_log-fire.sh +143 -0
- package/ds-canonical/fork/hooks/block_prototype_imports.py +241 -0
- package/ds-canonical/fork/hooks/check_chrome_header_avatar_canonical.sh +106 -0
- package/ds-canonical/fork/hooks/check_consumer_app_invariants.sh +731 -0
- package/ds-canonical/fork/hooks/check_consumer_code_quality.sh +173 -0
- package/ds-canonical/fork/hooks/check_ds_anchor_preflight.sh +219 -0
- package/ds-canonical/fork/hooks/check_dynamic_tailwind_class.sh +57 -0
- package/ds-canonical/fork/hooks/check_escape_marker_abuse.sh +213 -0
- package/ds-canonical/fork/hooks/check_field_family_invariants.sh +376 -0
- package/ds-canonical/fork/hooks/check_fork_product_quality.sh +38 -0
- package/ds-canonical/fork/hooks/check_item_list_gap.sh +56 -0
- package/ds-canonical/fork/hooks/check_layout_space_magic_numbers.sh +160 -0
- package/ds-canonical/fork/hooks/check_opacity_token_usage.sh +319 -0
- package/ds-canonical/fork/hooks/check_pattern_invariants.sh +375 -0
- package/ds-canonical/fork/hooks/check_sidebar_menu_button_implicit_wrap.sh +99 -0
- package/ds-canonical/fork/hooks/check_story_determinism.sh +39 -0
- package/ds-canonical/fork/hooks/check_story_invariants.sh +400 -0
- package/ds-canonical/fork/hooks/check_tabs_content_chrome_body_double_gap.sh +241 -0
- package/ds-canonical/fork/hooks/check_tailwind_wildcard_in_docs.sh +86 -0
- package/ds-canonical/fork/hooks/inject_deploy_url_after_push.sh +333 -0
- package/ds-canonical/fork/hooks/lib/_hook_integrity.sh +158 -0
- package/ds-canonical/fork/hooks/lib/_micro_geometry.sh +291 -0
- package/ds-canonical/fork/hooks/lib/_provider_paths.sh +162 -0
- package/ds-canonical/fork/launchers/approval-evidence.mjs +1721 -0
- package/ds-canonical/fork/launchers/authority-decision-evidence.mjs +413 -0
- package/ds-canonical/fork/launchers/canonical-order.mjs +8 -0
- package/ds-canonical/fork/launchers/fork-governance-dispatcher.sh +154 -0
- package/ds-canonical/fork/launchers/format-provider-hook-output.mjs +25 -0
- package/ds-canonical/fork/launchers/independent-review.mjs +490 -0
- package/ds-canonical/fork/launchers/inject_fork_governance_preamble.sh +99 -0
- package/ds-canonical/fork/launchers/normalize-provider-event.mjs +355 -0
- package/ds-canonical/fork/launchers/product-hook-dispatch-runtime.mjs +1067 -0
- package/ds-canonical/fork/launchers/provider-hook-normalization.mjs +1640 -0
- package/ds-canonical/fork/launchers/provider-hook-output-transport.mjs +546 -0
- package/ds-canonical/fork/launchers/settings-hooks.json +35 -0
- package/ds-canonical/fork/manifest.json +1984 -0
- package/ds-canonical/fork/providers/claude/hook-config.json +330 -0
- package/ds-canonical/fork/providers/claude/instruction.md +54 -0
- package/ds-canonical/fork/providers/claude/skills/bug-fix-rhythm/SKILL.md +207 -0
- package/ds-canonical/fork/providers/claude/skills/code-quality-audit/SKILL.md +71 -0
- package/ds-canonical/fork/providers/claude/skills/delivery-handoff/SKILL.md +244 -0
- package/ds-canonical/fork/providers/claude/skills/delivery-handoff/references/flow-diagram.md +180 -0
- package/ds-canonical/fork/providers/claude/skills/delivery-handoff/references/handoff-template.md +177 -0
- package/ds-canonical/fork/providers/claude/skills/delivery-handoff/references/inventory-checklist.md +196 -0
- package/ds-canonical/fork/providers/claude/skills/independent-review/SKILL.md +43 -0
- package/ds-canonical/fork/providers/claude/skills/independent-review/agents/openai.yaml +4 -0
- package/ds-canonical/fork/providers/claude/skills/independent-review/references/evidence-contract.md +23 -0
- package/ds-canonical/fork/providers/claude/skills/performance-audit/SKILL.md +114 -0
- package/ds-canonical/fork/providers/claude/skills/product-ui-audit/SKILL.md +252 -0
- package/ds-canonical/fork/providers/claude/skills/product-ui-audit/references/audit-checks.md +250 -0
- package/ds-canonical/fork/providers/claude/skills/product-ui-audit/references/common-misuses.md +329 -0
- package/ds-canonical/fork/providers/claude/skills/product-ui-audit/references/report-template.md +163 -0
- package/ds-canonical/fork/providers/claude/skills/propose-options/SKILL.md +190 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/SKILL.md +246 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/audit-checks.md +39 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/checkpoints.md +200 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/evaluation-matrix.md +142 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/fork/providers/claude/skills/prototype/references/proposal-template.md +230 -0
- package/ds-canonical/fork/providers/claude/skills/scan-similar-bugs/SKILL.md +203 -0
- package/ds-canonical/fork/providers/claude/skills/ux-audit/SKILL.md +135 -0
- package/ds-canonical/fork/providers/claude/skills/visual-audit/SKILL.md +258 -0
- package/ds-canonical/fork/providers/claude/skills/visual-audit/output/.gitkeep +0 -0
- package/ds-canonical/fork/providers/claude/skills/visual-audit/references/audit-architecture.md +101 -0
- package/ds-canonical/fork/providers/claude/skills/visual-audit/references/visual-checklist.md +297 -0
- package/ds-canonical/fork/providers/claude/skills/visual-audit/references/world-class-benchmarks.md +198 -0
- package/ds-canonical/fork/providers/codex/hook-config.json +57 -0
- package/ds-canonical/fork/providers/codex/skills/bug-fix-rhythm/SKILL.md +207 -0
- package/ds-canonical/fork/providers/codex/skills/code-quality-audit/SKILL.md +71 -0
- package/ds-canonical/fork/providers/codex/skills/delivery-handoff/SKILL.md +244 -0
- package/ds-canonical/fork/providers/codex/skills/delivery-handoff/references/flow-diagram.md +180 -0
- package/ds-canonical/fork/providers/codex/skills/delivery-handoff/references/handoff-template.md +177 -0
- package/ds-canonical/fork/providers/codex/skills/delivery-handoff/references/inventory-checklist.md +196 -0
- package/ds-canonical/fork/providers/codex/skills/independent-review/SKILL.md +43 -0
- package/ds-canonical/fork/providers/codex/skills/independent-review/agents/openai.yaml +4 -0
- package/ds-canonical/fork/providers/codex/skills/independent-review/references/evidence-contract.md +23 -0
- package/ds-canonical/fork/providers/codex/skills/performance-audit/SKILL.md +114 -0
- package/ds-canonical/fork/providers/codex/skills/product-ui-audit/SKILL.md +252 -0
- package/ds-canonical/fork/providers/codex/skills/product-ui-audit/references/audit-checks.md +250 -0
- package/ds-canonical/fork/providers/codex/skills/product-ui-audit/references/common-misuses.md +329 -0
- package/ds-canonical/fork/providers/codex/skills/product-ui-audit/references/report-template.md +163 -0
- package/ds-canonical/fork/providers/codex/skills/propose-options/SKILL.md +190 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/SKILL.md +246 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/audit-checks.md +39 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/checkpoints.md +200 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/evaluation-matrix.md +142 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/fork/providers/codex/skills/prototype/references/proposal-template.md +230 -0
- package/ds-canonical/fork/providers/codex/skills/scan-similar-bugs/SKILL.md +203 -0
- package/ds-canonical/fork/providers/codex/skills/ux-audit/SKILL.md +135 -0
- package/ds-canonical/fork/providers/codex/skills/visual-audit/SKILL.md +258 -0
- package/ds-canonical/fork/providers/codex/skills/visual-audit/output/.gitkeep +0 -0
- package/ds-canonical/fork/providers/codex/skills/visual-audit/references/audit-architecture.md +101 -0
- package/ds-canonical/fork/providers/codex/skills/visual-audit/references/visual-checklist.md +297 -0
- package/ds-canonical/fork/providers/codex/skills/visual-audit/references/world-class-benchmarks.md +198 -0
- package/ds-canonical/fork/references/story-baseline-registry.json +123 -0
- package/ds-canonical/fork/references/story-baseline-registry.schema.json +145 -0
- package/ds-canonical/fork/references/utility-registry.json +426 -0
- package/ds-canonical/fork/references/utility-registry.schema.json +409 -0
- package/ds-canonical/fork/review/canonical-order.mjs +8 -0
- package/ds-canonical/fork/review/provider-review-binding.mjs +2377 -0
- package/ds-canonical/fork/skills/bug-fix-rhythm/SKILL.md +196 -0
- package/ds-canonical/fork/skills/code-quality-audit/SKILL.md +69 -0
- package/ds-canonical/fork/skills/delivery-handoff/SKILL.md +242 -0
- package/ds-canonical/fork/skills/delivery-handoff/references/flow-diagram.md +180 -0
- package/ds-canonical/fork/skills/delivery-handoff/references/handoff-template.md +177 -0
- package/ds-canonical/fork/skills/delivery-handoff/references/inventory-checklist.md +196 -0
- package/ds-canonical/fork/skills/independent-review/SKILL.md +37 -0
- package/ds-canonical/fork/skills/independent-review/agents/openai.yaml +4 -0
- package/ds-canonical/fork/skills/independent-review/references/evidence-contract.md +23 -0
- package/ds-canonical/fork/skills/performance-audit/SKILL.md +112 -0
- package/ds-canonical/fork/skills/product-ui-audit/SKILL.md +250 -0
- package/ds-canonical/fork/skills/product-ui-audit/references/audit-checks.md +250 -0
- package/ds-canonical/fork/skills/product-ui-audit/references/common-misuses.md +329 -0
- package/ds-canonical/fork/skills/product-ui-audit/references/report-template.md +163 -0
- package/ds-canonical/fork/skills/propose-options/SKILL.md +179 -0
- package/ds-canonical/fork/skills/prototype/SKILL.md +244 -0
- package/ds-canonical/fork/skills/prototype/references/audit-checks.md +39 -0
- package/ds-canonical/fork/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/fork/skills/prototype/references/checkpoints.md +200 -0
- package/ds-canonical/fork/skills/prototype/references/evaluation-matrix.md +142 -0
- package/ds-canonical/fork/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/fork/skills/prototype/references/proposal-template.md +230 -0
- package/ds-canonical/fork/skills/scan-similar-bugs/SKILL.md +201 -0
- package/ds-canonical/fork/skills/ux-audit/SKILL.md +133 -0
- package/ds-canonical/fork/skills/visual-audit/SKILL.md +248 -0
- package/ds-canonical/fork/skills/visual-audit/output/.gitkeep +0 -0
- package/ds-canonical/fork/skills/visual-audit/references/audit-architecture.md +101 -0
- package/ds-canonical/fork/skills/visual-audit/references/visual-checklist.md +297 -0
- package/ds-canonical/fork/skills/visual-audit/references/world-class-benchmarks.md +198 -0
- package/ds-canonical/hooks/README.md +44 -28
- package/ds-canonical/hooks/_log-fire.sh +111 -12
- package/ds-canonical/hooks/auto_regen_ds_barrel.sh +90 -0
- package/ds-canonical/hooks/block_prototype_imports.py +156 -26
- package/ds-canonical/hooks/check_audit_post_report_validator.sh +328 -32
- package/ds-canonical/hooks/check_audit_sample_escape.sh +10 -7
- package/ds-canonical/hooks/check_benchmark_citation.sh +41 -8
- package/ds-canonical/hooks/check_canonical_propagation.sh +85 -24
- package/ds-canonical/hooks/check_chrome_header_avatar_canonical.sh +106 -0
- package/ds-canonical/hooks/check_codex_brief_invariants.sh +138 -29
- package/ds-canonical/hooks/check_codex_collab_5step.sh +31 -25
- package/ds-canonical/hooks/check_consumer_app_invariants.sh +731 -0
- package/ds-canonical/hooks/check_consumer_code_quality.sh +173 -0
- package/ds-canonical/hooks/check_datatable_invariants.sh +173 -29
- package/ds-canonical/hooks/check_dim_count_drift.sh +8 -7
- package/ds-canonical/hooks/check_ds_anchor_preflight.sh +219 -0
- package/ds-canonical/hooks/check_dynamic_tailwind_class.sh +57 -0
- package/ds-canonical/hooks/check_escape_marker_abuse.sh +213 -0
- package/ds-canonical/hooks/check_field_controls_contracts.sh +37 -8
- package/ds-canonical/hooks/check_field_family_invariants.sh +195 -24
- package/ds-canonical/hooks/check_file_size_budget.sh +32 -14
- package/ds-canonical/hooks/check_full_story_visual_interaction_sweep.sh +111 -0
- package/ds-canonical/hooks/check_item_list_gap.sh +56 -0
- package/ds-canonical/hooks/check_layout_space_magic_numbers.sh +160 -0
- package/ds-canonical/hooks/check_main_branch_workbench.sh +27 -68
- package/ds-canonical/hooks/check_naming_and_abstraction.sh +21 -10
- package/ds-canonical/hooks/check_opacity_token_usage.sh +238 -68
- package/ds-canonical/hooks/check_orphan_ds_css.sh +96 -0
- package/ds-canonical/hooks/check_overlay_open_focus_escape_probe.sh +110 -0
- package/ds-canonical/hooks/check_pattern_invariants.sh +196 -15
- package/ds-canonical/hooks/check_peoplepicker_ssot_drift.sh +4 -4
- package/ds-canonical/hooks/check_pixel_quantified_audit.sh +6 -4
- package/ds-canonical/hooks/check_plugin_fork_health.sh +282 -0
- package/ds-canonical/hooks/check_propose_discipline.sh +255 -0
- package/ds-canonical/hooks/check_propose_pre_grep_verify.sh +6 -4
- package/ds-canonical/hooks/check_propose_without_benchmark.sh +71 -0
- package/ds-canonical/hooks/check_select_all_canonical.sh +1 -1
- package/ds-canonical/hooks/check_sidebar_menu_button_implicit_wrap.sh +99 -0
- package/ds-canonical/hooks/check_solo_workflow.sh +62 -168
- package/ds-canonical/hooks/check_spec_class_drift.sh +33 -19
- package/ds-canonical/hooks/check_ssot_header_declaration.sh +56 -0
- package/ds-canonical/hooks/check_story_determinism.sh +39 -0
- package/ds-canonical/hooks/check_story_invariants.sh +806 -222
- package/ds-canonical/hooks/check_storybook_addon_packaging.sh +201 -0
- package/ds-canonical/hooks/check_substantive_edit_approval_preflight.sh +146 -64
- package/ds-canonical/hooks/check_tabs_content_chrome_body_double_gap.sh +241 -0
- package/ds-canonical/hooks/check_tailwind_wildcard_in_docs.sh +86 -0
- package/ds-canonical/hooks/check_wrapper_primitive_schema_drift.sh +15 -12
- package/ds-canonical/hooks/chrome_header_dispatcher.sh +105 -0
- package/ds-canonical/hooks/enforce_home_charter.sh +31 -10
- package/ds-canonical/hooks/governance_control_plane.sh +15 -0
- package/ds-canonical/hooks/inject_deploy_url_after_push.sh +333 -0
- package/ds-canonical/hooks/inject_pending_self_audit.sh +68 -21
- package/ds-canonical/hooks/lib/_app_shell_primary_header_consistency.sh +148 -0
- package/ds-canonical/hooks/lib/_chrome_header_handcraft.sh +121 -0
- package/ds-canonical/hooks/lib/_code_quality.sh +9 -9
- package/ds-canonical/hooks/lib/_cva_default_sync.sh +11 -13
- package/ds-canonical/hooks/lib/_governance_coverage_check.sh +48 -21
- package/ds-canonical/hooks/lib/_hardcoded_strings.sh +18 -10
- package/ds-canonical/hooks/lib/_header_with_tabs_border.sh +107 -0
- package/ds-canonical/hooks/lib/_hook_integrity.sh +158 -0
- package/ds-canonical/hooks/lib/_layout_space_canonical.sh +5 -5
- package/ds-canonical/hooks/lib/_micro_geometry.sh +291 -0
- package/ds-canonical/hooks/lib/_overlay_handcraft.sh +42 -23
- package/ds-canonical/hooks/lib/_person_data_richness.sh +5 -5
- package/ds-canonical/hooks/lib/_provider_paths.sh +162 -0
- package/ds-canonical/hooks/lib/_story_compile_drift.sh +5 -5
- package/ds-canonical/hooks/lib/_tab_lg_chrome_header_equal.sh +290 -0
- package/ds-canonical/hooks/lib/_token_hygiene.sh +55 -20
- package/ds-canonical/hooks/lib/approval-evidence.mjs +1721 -0
- package/ds-canonical/hooks/lib/audit-report-validator.mjs +122 -0
- package/ds-canonical/hooks/lib/provider-marker-regex.mjs +23 -0
- package/ds-canonical/hooks/lib/tsx-governance-analysis.mjs +410 -0
- package/ds-canonical/hooks/log_governance_fires.sh +45 -13
- package/ds-canonical/hooks/log_skill_invokes.sh +8 -7
- package/ds-canonical/hooks/post_edit_dispatcher.sh +106 -28
- package/ds-canonical/hooks/record_release_consent.sh +78 -0
- package/ds-canonical/hooks/registrations.json +491 -0
- package/ds-canonical/hooks/registrations.schema.json +58 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_addon_subdir_ship.sh +76 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_consumer_app_story_title.sh +81 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_consumer_ds_primitive_misuse.sh +120 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_consumer_no_ds_catalog.sh +101 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_consumer_story_baseline.sh +76 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_data_table_size_num_to_meta_width.sh +68 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_fork_user_plugin_install.sh +79 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_plugin_freshness.sh +68 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_propose_cite_required.sh +88 -0
- package/ds-canonical/hooks/{check_propose_plain_chinese.sh → retired/2026-06-11-prune-merge/check_propose_plain_chinese.sh} +2 -2
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_storybook_addon_preset_cjs.sh +87 -0
- package/ds-canonical/hooks/{lib/_approval_re.sh → retired/_approval_re.sh.retired-2026-08-18} +6 -7
- package/ds-canonical/hooks/retired/check_container_breathing.sh +1 -1
- package/ds-canonical/hooks/retired/check_governance_compliance.sh +1 -1
- package/ds-canonical/hooks/session_start_governance_check.sh +157 -69
- package/ds-canonical/hooks/stop_audit_content_quality.sh +23 -0
- package/ds-canonical/hooks/stop_extract_canonical_rules.sh +21 -0
- package/ds-canonical/hooks/stop_passive_logging.sh +133 -59
- package/ds-canonical/hooks/stop_self_audit.sh +619 -190
- package/ds-canonical/hooks/tests/fixtures/transcripts/claude-transcript-jsonl-v1.jsonl +3 -0
- package/ds-canonical/hooks/tests/fixtures/transcripts/claude-transcript-jsonl-v2.jsonl +3 -0
- package/ds-canonical/hooks/tests/registration-output-contracts.mjs +151 -0
- package/ds-canonical/hooks/tests/run-all.sh +35 -5
- package/ds-canonical/hooks/tests/test_auto_regen_ds_barrel.sh +224 -0
- package/ds-canonical/hooks/tests/test_block_prototype_imports.sh +181 -9
- package/ds-canonical/hooks/tests/test_check_addon_subdir_ship.sh +171 -0
- package/ds-canonical/hooks/tests/test_check_app_shell_primary_header_consistency.sh +275 -81
- package/ds-canonical/hooks/tests/test_check_audit_post_report_validator.sh +292 -14
- package/ds-canonical/hooks/tests/test_check_audit_sample_escape.sh +0 -0
- package/ds-canonical/hooks/tests/test_check_benchmark_citation.sh +41 -9
- package/ds-canonical/hooks/tests/test_check_canonical_propagation.sh +56 -5
- package/ds-canonical/hooks/tests/test_check_chrome_header_avatar_canonical.sh +198 -0
- package/ds-canonical/hooks/tests/test_check_chrome_header_handcraft.sh +197 -81
- package/ds-canonical/hooks/tests/test_check_codex_brief_invariants.sh +375 -0
- package/ds-canonical/hooks/tests/test_check_codex_collab_5step.sh +49 -5
- package/ds-canonical/hooks/tests/test_check_consumer_app_invariants.sh +140 -0
- package/ds-canonical/hooks/tests/test_check_consumer_app_story_title.sh +164 -0
- package/ds-canonical/hooks/tests/test_check_consumer_code_quality.sh +86 -0
- package/ds-canonical/hooks/tests/test_check_consumer_ds_primitive_misuse.sh +417 -0
- package/ds-canonical/hooks/tests/test_check_consumer_no_ds_catalog.sh +214 -0
- package/ds-canonical/hooks/tests/test_check_consumer_story_baseline.sh +209 -0
- package/ds-canonical/hooks/tests/test_check_data_table_size_num_to_meta_width.sh +71 -0
- package/ds-canonical/hooks/tests/test_check_datatable_invariants.sh +126 -12
- package/ds-canonical/hooks/tests/test_check_dim_count_drift.sh +13 -8
- package/ds-canonical/hooks/tests/test_check_ds_anchor_preflight.sh +150 -0
- package/ds-canonical/hooks/tests/test_check_dynamic_tailwind_class.sh +76 -0
- package/ds-canonical/hooks/tests/test_check_escape_marker_abuse.sh +278 -0
- package/ds-canonical/hooks/tests/test_check_field_family_invariants.sh +108 -18
- package/ds-canonical/hooks/tests/test_check_file_size_budget.sh +67 -5
- package/ds-canonical/hooks/tests/test_check_fork_user_plugin_install.sh +151 -0
- package/ds-canonical/hooks/tests/test_check_full_story_visual_interaction_sweep.sh +200 -0
- package/ds-canonical/hooks/tests/test_check_header_with_tabs_border.sh +178 -68
- package/ds-canonical/hooks/tests/test_check_item_list_gap.sh +44 -0
- package/ds-canonical/hooks/tests/test_check_layout_space_magic_numbers.sh +264 -0
- package/ds-canonical/hooks/tests/test_check_main_branch_workbench.sh +45 -110
- package/ds-canonical/hooks/tests/test_check_naming_and_abstraction.sh +19 -2
- package/ds-canonical/hooks/tests/test_check_opacity_token_usage.sh +151 -6
- package/ds-canonical/hooks/tests/test_check_orphan_ds_css.sh +228 -0
- package/ds-canonical/hooks/tests/test_check_overlay_open_focus_escape_probe.sh +191 -0
- package/ds-canonical/hooks/tests/test_check_pattern_invariants.sh +103 -7
- package/ds-canonical/hooks/tests/test_check_plugin_fork_health.sh +132 -0
- package/ds-canonical/hooks/tests/test_check_propose_cite_required.sh +181 -0
- package/ds-canonical/hooks/tests/test_check_propose_discipline.sh +69 -0
- package/ds-canonical/hooks/tests/test_check_propose_plain_chinese.sh +10 -7
- package/ds-canonical/hooks/tests/test_check_propose_pre_grep_verify.sh +5 -5
- package/ds-canonical/hooks/tests/test_check_propose_without_benchmark.sh +100 -0
- package/ds-canonical/hooks/tests/test_check_sidebar_menu_button_implicit_wrap.sh +224 -0
- package/ds-canonical/hooks/tests/test_check_solo_workflow.sh +86 -105
- package/ds-canonical/hooks/tests/test_check_spec_class_drift.sh +35 -7
- package/ds-canonical/hooks/tests/test_check_ssot_header_declaration.sh +72 -0
- package/ds-canonical/hooks/tests/{test_check_story_anatomy.sh.broken → test_check_story_anatomy.sh} +73 -4
- package/ds-canonical/hooks/tests/test_check_story_category.sh +411 -0
- package/ds-canonical/hooks/tests/test_check_story_determinism.sh +39 -0
- package/ds-canonical/hooks/tests/test_check_story_invariants.sh +844 -43
- package/ds-canonical/hooks/tests/{test_check_story_name_jargon.sh.broken → test_check_story_name_jargon.sh} +22 -1
- package/ds-canonical/hooks/tests/test_check_storybook_addon_packaging.sh +89 -0
- package/ds-canonical/hooks/tests/test_check_storybook_addon_preset_cjs.sh +200 -0
- package/ds-canonical/hooks/tests/test_check_substantive_edit_approval_preflight.sh +1061 -28
- package/ds-canonical/hooks/tests/test_check_tab_lg_chrome_header_equal.sh +182 -97
- package/ds-canonical/hooks/tests/test_check_tabs_content_chrome_body_double_gap.sh +76 -0
- package/ds-canonical/hooks/tests/test_check_tailwind_wildcard_in_docs.sh +182 -0
- package/ds-canonical/hooks/tests/test_check_token_hygiene.sh +63 -15
- package/ds-canonical/hooks/tests/test_check_wrapper_primitive_schema_drift.sh +12 -6
- package/ds-canonical/hooks/tests/test_chrome_header_dispatcher.sh +125 -0
- package/ds-canonical/hooks/tests/test_enforce_home_charter.sh +58 -4
- package/ds-canonical/hooks/tests/test_governance_control_plane.sh +66 -0
- package/ds-canonical/hooks/tests/test_governance_coverage_check.sh +88 -0
- package/ds-canonical/hooks/tests/test_hook_integrity_classification.sh +217 -0
- package/ds-canonical/hooks/tests/test_inject_deploy_url_after_push.sh +276 -0
- package/ds-canonical/hooks/tests/test_inject_pending_self_audit.sh +116 -11
- package/ds-canonical/hooks/tests/test_log_governance_fires.sh +117 -1
- package/ds-canonical/hooks/tests/test_log_skill_invokes.sh +74 -5
- package/ds-canonical/hooks/tests/test_post_edit_dispatcher.sh +234 -77
- package/ds-canonical/hooks/tests/test_provider_peer_symmetry.sh +76 -0
- package/ds-canonical/hooks/tests/test_record_release_consent.sh +95 -0
- package/ds-canonical/hooks/tests/test_registration_output_contracts.sh +20 -0
- package/ds-canonical/hooks/tests/test_session_start_governance_check.sh +145 -22
- package/ds-canonical/hooks/tests/test_stop_audit_content_quality.sh +75 -0
- package/ds-canonical/hooks/tests/test_stop_capture_metrics.sh +101 -23
- package/ds-canonical/hooks/tests/test_stop_extract_canonical_rules.sh +75 -0
- package/ds-canonical/hooks/tests/{test_stop_governance_drift_check.sh.broken → test_stop_governance_drift_check.sh} +22 -12
- package/ds-canonical/hooks/tests/test_stop_passive_logging.sh +102 -1
- package/ds-canonical/hooks/tests/test_stop_repository_command_context.sh +38 -0
- package/ds-canonical/hooks/tests/test_stop_self_audit.sh +458 -13
- package/ds-canonical/hooks/tests/test_stop_self_audit_push_gate.sh +111 -0
- package/ds-canonical/references/README.md +20 -11
- package/ds-canonical/references/build-ui-canonicals.md +24 -7
- package/ds-canonical/references/certified-surfaces.md +46 -0
- package/ds-canonical/references/composition-fidelity.md +47 -0
- package/ds-canonical/references/cva-patterns.md +2 -2
- package/ds-canonical/references/drag-canonical.md +99 -311
- package/ds-canonical/references/failure-class-registry.json +160 -0
- package/ds-canonical/references/focus-canonical.md +681 -0
- package/ds-canonical/references/governance-audit-coverage.md +34 -0
- package/ds-canonical/references/item-anatomy-recipe.md +3 -3
- package/ds-canonical/references/naming-conventions.md +2 -1
- package/ds-canonical/references/principle-dim-map.json +136 -9
- package/ds-canonical/references/props-naming.md +18 -3
- package/ds-canonical/references/repository-hygiene-policy.json +143 -0
- package/ds-canonical/references/repository-hygiene.md +106 -0
- package/ds-canonical/references/runtime-evidence-retention.md +88 -0
- package/ds-canonical/references/scenario-definition.md +146 -0
- package/ds-canonical/references/spec-rules.md +1 -1
- package/ds-canonical/references/ssot-consultation.md +5 -5
- package/ds-canonical/references/ssot-index.md +11 -10
- package/ds-canonical/references/story-baseline-registry.json +55 -11
- package/ds-canonical/references/story-baseline-registry.schema.json +145 -0
- package/ds-canonical/references/structural-token-retention.md +7 -10
- package/ds-canonical/references/tailwind-gotchas.md +4 -4
- package/ds-canonical/references/ui-dev-rules.md +22 -1
- package/ds-canonical/rules/README.md +15 -10
- package/ds-canonical/rules/meta-patterns.md +32 -30
- package/ds-canonical/rules/self-verify.md +22 -12
- package/ds-canonical/rules/spec-rules.md +2 -2
- package/ds-canonical/rules/story-rules.md +68 -9
- package/ds-canonical/rules/ui-development.md +23 -15
- package/ds-canonical/skills/README.md +29 -17
- package/ds-canonical/skills/bug-fix-rhythm/SKILL.md +26 -13
- package/ds-canonical/skills/canonical-reviewer/SKILL.md +29 -0
- package/ds-canonical/skills/code-quality-audit/SKILL.md +15 -11
- package/ds-canonical/skills/codex-collab/SKILL.md +22 -235
- package/ds-canonical/skills/codex-collab/references/brief-template.md +37 -43
- package/ds-canonical/skills/codex-collab/references/transport.md +38 -57
- package/ds-canonical/skills/codify-corrections/SKILL.md +37 -36
- package/ds-canonical/skills/codify-principle/SKILL.md +35 -34
- package/ds-canonical/skills/component-quality-gate/SKILL.md +17 -17
- package/ds-canonical/skills/component-quality-gate/references/checklist.md +8 -8
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +47 -224
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-a-workflow.md +36 -102
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-b-codex-brief.md +33 -147
- package/ds-canonical/skills/deep-audit-cross-codex/references/skill-relationships-antipatterns-benchmarks.md +28 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/triage-rubric.md +15 -80
- package/ds-canonical/skills/deep-audit-cross-codex/references/upstream-directives-r-mapping.md +34 -0
- package/ds-canonical/skills/delivery-handoff/SKILL.md +19 -8
- package/ds-canonical/skills/design-system-audit/SKILL.md +130 -76
- package/ds-canonical/skills/design-system-audit/references/audit-prompts.md +207 -105
- package/ds-canonical/skills/design-system-audit/references/checkpoints.md +59 -50
- package/ds-canonical/skills/design-system-audit/references/historical-bugs.md +108 -9
- package/ds-canonical/skills/design-system-audit/references/principle-audit-protocol.md +51 -32
- package/ds-canonical/skills/design-system-audit/references/rule-placement.md +64 -56
- package/ds-canonical/skills/ensure-canonical/SKILL.md +37 -35
- package/ds-canonical/skills/governance-health/SKILL.md +34 -26
- package/ds-canonical/skills/governance-status/SKILL.md +30 -0
- package/ds-canonical/skills/independent-review/SKILL.md +37 -0
- package/ds-canonical/skills/independent-review/agents/openai.yaml +4 -0
- package/ds-canonical/skills/independent-review/references/evidence-contract.md +23 -0
- package/ds-canonical/skills/knowledge-prune/SKILL.md +57 -114
- package/ds-canonical/skills/knowledge-prune/references/phase-z-cross-repo-ssot-propagation.md +15 -0
- package/ds-canonical/skills/knowledge-prune/references/prune-dimensions-d5-d10.md +57 -0
- package/ds-canonical/skills/knowledge-prune/references/world-class-prune-alignment.md +7 -0
- package/ds-canonical/skills/new-component/SKILL.md +33 -25
- package/ds-canonical/skills/new-component/references/new-component-checklist.md +12 -11
- package/ds-canonical/skills/performance-audit/SKILL.md +15 -12
- package/ds-canonical/skills/product-ui-audit/SKILL.md +52 -34
- package/ds-canonical/skills/product-ui-audit/references/audit-checks.md +10 -7
- package/ds-canonical/skills/product-ui-audit/references/report-template.md +30 -26
- package/ds-canonical/skills/propose-options/SKILL.md +23 -23
- package/ds-canonical/skills/prototype/SKILL.md +19 -21
- package/ds-canonical/skills/prototype/references/audit-checks.md +6 -5
- package/ds-canonical/skills/prototype/references/checkpoints.md +26 -17
- package/ds-canonical/skills/prototype/references/evaluation-matrix.md +2 -2
- package/ds-canonical/skills/prototype/references/ooux-template.md +1 -1
- package/ds-canonical/skills/prototype/references/proposal-template.md +5 -5
- package/ds-canonical/skills/scan-similar-bugs/SKILL.md +29 -28
- package/ds-canonical/skills/story-auto-compile-migrate/SKILL.md +26 -25
- package/ds-canonical/skills/story-writing/SKILL.md +25 -14
- package/ds-canonical/skills/story-writing/references/anatomy-standard.md +2 -2
- package/ds-canonical/skills/story-writing/references/category-templates.md +15 -15
- package/ds-canonical/skills/ux-audit/SKILL.md +13 -10
- package/ds-canonical/skills/visual-audit/SKILL.md +47 -46
- package/ds-canonical/skills/visual-audit/references/audit-architecture.md +7 -7
- package/ds-canonical/skills/visual-audit/references/visual-checklist.md +14 -14
- package/ds-canonical/skills/visual-audit/references/world-class-benchmarks.md +3 -3
- package/ds-canonical/templates/_README.md +22 -0
- package/ds-canonical/templates/consumer-governance.md +82 -0
- package/ds-canonical/templates/dashboard-app.tsx +186 -0
- package/ds-canonical/templates/product-launchers/fork-governance-dispatcher.sh +154 -0
- package/ds-canonical/templates/product-launchers/format-provider-hook-output.mjs +25 -0
- package/ds-canonical/templates/product-launchers/independent-review.mjs +490 -0
- package/ds-canonical/templates/product-launchers/inject_fork_governance_preamble.sh +99 -0
- package/ds-canonical/templates/product-launchers/normalize-provider-event.mjs +355 -0
- package/ds-canonical/templates/product-launchers/product-hook-dispatch-runtime.mjs +1067 -0
- package/ds-canonical/templates/product-provider-wiring.json +82 -0
- package/ds-canonical/templates/product-provider-wiring.schema.json +153 -0
- package/ds-story-manifest.json +1828 -0
- package/llms-full.txt +455 -0
- package/llms.txt +75 -0
- package/package.json +35 -10
- package/src/README.md +1 -1
- package/src/components/Accordion/accordion.anatomy.stories.tsx +496 -0
- package/src/components/Accordion/accordion.principles.stories.tsx +365 -0
- package/src/components/Accordion/accordion.spec.md +31 -5
- package/src/components/Accordion/accordion.stories.tsx +192 -0
- package/src/components/Accordion/accordion.tsx +15 -6
- package/src/components/AccountMenu/account-menu.anatomy.stories.tsx +117 -0
- package/src/components/AccountMenu/account-menu.principles.stories.tsx +99 -0
- package/src/components/AccountMenu/account-menu.spec.md +127 -0
- package/src/components/AccountMenu/account-menu.stories.tsx +65 -0
- package/src/components/AccountMenu/account-menu.tsx +194 -0
- package/src/components/AccountMenu/index.ts +5 -0
- package/src/components/AgentPanel/agent-panel-fab.tsx +920 -0
- package/src/components/AgentPanel/agent-panel-logo.tsx +748 -0
- package/src/components/AgentPanel/agent-panel.anatomy.stories.tsx +366 -0
- package/src/components/AgentPanel/agent-panel.css +59 -0
- package/src/components/AgentPanel/agent-panel.principles.stories.tsx +60 -0
- package/src/components/AgentPanel/agent-panel.spec.md +659 -0
- package/src/components/AgentPanel/agent-panel.stories.tsx +1168 -0
- package/src/components/AgentPanel/agent-panel.tsx +1637 -0
- package/src/components/AgentPanel/index.ts +7 -0
- package/src/components/Alert/alert.anatomy.stories.tsx +241 -0
- package/src/components/Alert/alert.principles.stories.tsx +214 -0
- package/src/components/Alert/alert.spec.md +28 -26
- package/src/components/Alert/alert.stories.tsx +136 -0
- package/src/components/Alert/alert.tsx +19 -8
- package/src/components/AppShell/_demo-helpers.tsx +107 -28
- package/src/components/AppShell/app-shell.anatomy.stories.tsx +185 -0
- package/src/components/AppShell/app-shell.principles.stories.tsx +140 -0
- package/src/components/AppShell/app-shell.spec.md +84 -48
- package/src/components/AppShell/app-shell.stories.tsx +446 -0
- package/src/components/AppShell/app-shell.tsx +80 -26
- package/src/components/AspectRatio/aspect-ratio.anatomy.stories.tsx +208 -0
- package/src/components/AspectRatio/aspect-ratio.principles.stories.tsx +303 -0
- package/src/components/AspectRatio/aspect-ratio.spec.md +24 -12
- package/src/components/AspectRatio/aspect-ratio.stories.tsx +91 -0
- package/src/components/AspectRatio/aspect-ratio.tsx +6 -3
- package/src/components/Avatar/avatar.anatomy.stories.tsx +705 -0
- package/src/components/Avatar/avatar.principles.stories.tsx +249 -0
- package/src/components/Avatar/avatar.spec.md +68 -103
- package/src/components/Avatar/avatar.stories.tsx +156 -0
- package/src/components/Avatar/avatar.tsx +94 -66
- package/src/components/Badge/badge.anatomy.stories.tsx +591 -0
- package/src/components/Badge/badge.principles.stories.tsx +391 -0
- package/src/components/Badge/badge.spec.md +43 -23
- package/src/components/Badge/badge.stories.tsx +82 -0
- package/src/components/Badge/badge.tsx +38 -14
- package/src/components/Breadcrumb/breadcrumb.anatomy.stories.tsx +462 -0
- package/src/components/Breadcrumb/breadcrumb.principles.stories.tsx +353 -0
- package/src/components/Breadcrumb/breadcrumb.spec.md +55 -43
- package/src/components/Breadcrumb/breadcrumb.stories.tsx +381 -0
- package/src/components/Breadcrumb/breadcrumb.tsx +43 -87
- package/src/components/BulkActionBar/bulk-action-bar.anatomy.stories.tsx +225 -0
- package/src/components/BulkActionBar/bulk-action-bar.principles.stories.tsx +255 -0
- package/src/components/BulkActionBar/bulk-action-bar.spec.md +64 -36
- package/src/components/BulkActionBar/bulk-action-bar.stories.tsx +124 -0
- package/src/components/BulkActionBar/bulk-action-bar.tsx +26 -18
- package/src/components/Button/button-group.tsx +64 -21
- package/src/components/Button/button.anatomy.stories.tsx +729 -0
- package/src/components/Button/button.principles.stories.tsx +369 -0
- package/src/components/Button/button.spec.md +64 -40
- package/src/components/Button/button.stories.tsx +368 -0
- package/src/components/Button/button.tsx +110 -57
- package/src/components/Button/index.ts +1 -0
- package/src/components/Calendar/calendar.anatomy.stories.tsx +237 -0
- package/src/components/Calendar/calendar.principles.stories.tsx +152 -0
- package/src/components/Calendar/calendar.spec.md +80 -55
- package/src/components/Calendar/calendar.stories.tsx +108 -0
- package/src/components/Calendar/calendar.tsx +216 -136
- package/src/components/Carousel/carousel.anatomy.stories.tsx +517 -0
- package/src/components/Carousel/carousel.principles.stories.tsx +334 -0
- package/src/components/Carousel/carousel.spec.md +51 -15
- package/src/components/Carousel/carousel.stories.tsx +125 -0
- package/src/components/Carousel/carousel.tsx +140 -57
- package/src/components/Chart/chart.anatomy.stories.tsx +310 -0
- package/src/components/Chart/chart.principles.stories.tsx +437 -0
- package/src/components/Chart/chart.spec.md +24 -5
- package/src/components/Chart/chart.stories.tsx +263 -0
- package/src/components/Chart/chart.tsx +17 -4
- package/src/components/Checkbox/checkbox-group.tsx +28 -16
- package/src/components/Checkbox/checkbox.anatomy.stories.tsx +614 -0
- package/src/components/Checkbox/checkbox.principles.stories.tsx +216 -0
- package/src/components/Checkbox/checkbox.spec.md +65 -42
- package/src/components/Checkbox/checkbox.stories.tsx +119 -0
- package/src/components/Checkbox/checkbox.tsx +190 -33
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/chip.anatomy.stories.tsx +442 -0
- package/src/components/Chip/chip.principles.stories.tsx +228 -0
- package/src/components/Chip/chip.spec.md +52 -40
- package/src/components/Chip/chip.stories.tsx +111 -0
- package/src/components/Chip/chip.tsx +130 -46
- package/src/components/CircularProgress/circular-progress.anatomy.stories.tsx +177 -0
- package/src/components/CircularProgress/circular-progress.principles.stories.tsx +265 -0
- package/src/components/CircularProgress/circular-progress.spec.md +39 -37
- package/src/components/CircularProgress/circular-progress.stories.tsx +149 -0
- package/src/components/CircularProgress/circular-progress.tsx +5 -6
- package/src/components/Coachmark/coachmark-story-helpers.tsx +39 -0
- package/src/components/Coachmark/coachmark.anatomy.stories.tsx +361 -0
- package/src/components/Coachmark/coachmark.principles.stories.tsx +356 -0
- package/src/components/Coachmark/coachmark.spec.md +36 -29
- package/src/components/Coachmark/coachmark.stories.tsx +220 -0
- package/src/components/Coachmark/coachmark.tsx +36 -10
- package/src/components/Combobox/combobox.anatomy.stories.tsx +928 -0
- package/src/components/Combobox/combobox.principles.stories.tsx +238 -0
- package/src/components/Combobox/combobox.spec.md +88 -19
- package/src/components/Combobox/combobox.stories.tsx +467 -0
- package/src/components/Combobox/combobox.tsx +412 -178
- package/src/components/Command/command.anatomy.stories.tsx +93 -0
- package/src/components/Command/command.principles.stories.tsx +86 -0
- package/src/components/Command/command.spec.md +40 -29
- package/src/components/Command/command.stories.tsx +213 -0
- package/src/components/Command/command.tsx +294 -57
- package/src/components/DataTable/active-editor-controller.ts +4 -3
- package/src/components/DataTable/cell-registry.tsx +161 -120
- package/src/components/DataTable/column-types.ts +14 -18
- package/src/components/DataTable/column-widths.ts +77 -0
- package/src/components/DataTable/data-table-column-visibility-panel.tsx +51 -16
- package/src/components/DataTable/data-table-filter-group.tsx +246 -0
- package/src/components/DataTable/data-table-filter-labels.ts +100 -0
- package/src/components/DataTable/data-table-filter-panel.tsx +85 -448
- package/src/components/DataTable/data-table-filter-value-picker.tsx +254 -0
- package/src/components/DataTable/data-table-interaction-layer.tsx +38 -30
- package/src/components/DataTable/data-table-sort-manager.tsx +42 -16
- package/src/components/DataTable/data-table.anatomy.stories.tsx +522 -0
- package/src/components/DataTable/data-table.css +227 -84
- package/src/components/DataTable/data-table.principles.stories.tsx +270 -0
- package/src/components/DataTable/data-table.spec.md +606 -171
- package/src/components/DataTable/data-table.stories.tsx +2350 -0
- package/src/components/DataTable/data-table.tsx +2835 -518
- package/src/components/DataTable/filter-operators.spec.md +269 -0
- package/src/components/DataTable/filter-operators.ts +1 -1
- package/src/components/DataTable/filter-tree.ts +194 -44
- package/src/components/DataTable/index.ts +3 -0
- package/src/components/DataTable/perf-debug-overlay.tsx +199 -0
- package/src/components/DateGrid/date-grid.anatomy.stories.tsx +587 -0
- package/src/components/DateGrid/date-grid.principles.stories.tsx +344 -0
- package/src/components/DateGrid/date-grid.spec.md +80 -45
- package/src/components/DateGrid/date-grid.stories.tsx +204 -0
- package/src/components/DateGrid/date-grid.tsx +142 -40
- package/src/components/DatePicker/date-picker.anatomy.stories.tsx +946 -0
- package/src/components/DatePicker/date-picker.principles.stories.tsx +205 -0
- package/src/components/DatePicker/date-picker.spec.md +93 -57
- package/src/components/DatePicker/date-picker.stories.tsx +364 -0
- package/src/components/DatePicker/date-picker.tsx +441 -207
- package/src/components/DescriptionList/description-list.anatomy.stories.tsx +254 -0
- package/src/components/DescriptionList/description-list.principles.stories.tsx +309 -0
- package/src/components/DescriptionList/description-list.spec.md +35 -30
- package/src/components/DescriptionList/description-list.stories.tsx +113 -0
- package/src/components/DescriptionList/description-list.tsx +16 -14
- package/src/components/Dialog/dialog.anatomy.stories.tsx +434 -0
- package/src/components/Dialog/dialog.principles.stories.tsx +261 -0
- package/src/components/Dialog/dialog.spec.md +158 -38
- package/src/components/Dialog/dialog.stories.tsx +686 -0
- package/src/components/Dialog/dialog.tsx +246 -55
- package/src/components/DropdownMenu/dropdown-menu.anatomy.stories.tsx +971 -0
- package/src/components/DropdownMenu/dropdown-menu.principles.stories.tsx +341 -0
- package/src/components/DropdownMenu/dropdown-menu.spec.md +40 -22
- package/src/components/DropdownMenu/dropdown-menu.stories.tsx +276 -0
- package/src/components/DropdownMenu/dropdown-menu.tsx +205 -47
- package/src/components/Empty/empty.anatomy.stories.tsx +275 -0
- package/src/components/Empty/empty.principles.stories.tsx +314 -0
- package/src/components/Empty/empty.spec.md +47 -47
- package/src/components/Empty/empty.stories.tsx +69 -0
- package/src/components/Empty/empty.tsx +23 -11
- package/src/components/Field/field-context.ts +196 -4
- package/src/components/Field/field-controls.spec.md +175 -62
- package/src/components/Field/field-edit-keys.ts +66 -0
- package/src/components/Field/field-types.ts +71 -32
- package/src/components/Field/field-wrapper.tsx +203 -133
- package/src/components/Field/field.anatomy.stories.tsx +547 -0
- package/src/components/Field/field.principles.stories.tsx +255 -0
- package/src/components/Field/field.spec.md +91 -40
- package/src/components/Field/field.stories.tsx +751 -0
- package/src/components/Field/field.tsx +67 -15
- package/src/components/Field/form-validation.spec.md +60 -34
- package/src/components/Field/index.ts +1 -0
- package/src/components/Field/use-form-validation.ts +270 -0
- package/src/components/FieldControlGroup/field-control-group.anatomy.stories.tsx +119 -0
- package/src/components/FieldControlGroup/field-control-group.principles.stories.tsx +121 -0
- package/src/components/FieldControlGroup/field-control-group.spec.md +41 -19
- package/src/components/FieldControlGroup/field-control-group.stories.tsx +162 -0
- package/src/components/FieldControlGroup/field-control-group.tsx +16 -16
- package/src/components/FileItem/file-item.anatomy.stories.tsx +346 -0
- package/src/components/FileItem/file-item.principles.stories.tsx +245 -0
- package/src/components/FileItem/file-item.spec.md +133 -104
- package/src/components/FileItem/file-item.stories.tsx +302 -0
- package/src/components/FileItem/file-item.tsx +95 -39
- package/src/components/FileUpload/file-upload.anatomy.stories.tsx +446 -0
- package/src/components/FileUpload/file-upload.principles.stories.tsx +312 -0
- package/src/components/FileUpload/file-upload.spec.md +68 -24
- package/src/components/FileUpload/file-upload.stories.tsx +219 -0
- package/src/components/FileUpload/file-upload.tsx +140 -44
- package/src/components/FileViewer/can-render-image.ts +15 -0
- package/src/components/FileViewer/file-viewer.anatomy.stories.tsx +1134 -0
- package/src/components/FileViewer/file-viewer.principles.stories.tsx +636 -0
- package/src/components/FileViewer/file-viewer.spec.md +70 -58
- package/src/components/FileViewer/file-viewer.stories.tsx +473 -0
- package/src/components/FileViewer/file-viewer.tsx +234 -75
- package/src/components/FileViewer/image-renderer.tsx +38 -15
- package/src/components/HoverCard/hover-card.anatomy.stories.tsx +151 -0
- package/src/components/HoverCard/hover-card.principles.stories.tsx +211 -0
- package/src/components/HoverCard/hover-card.spec.md +38 -28
- package/src/components/HoverCard/hover-card.stories.tsx +304 -0
- package/src/components/HoverCard/hover-card.tsx +28 -8
- package/src/components/InlineEdit/index.ts +5 -0
- package/src/components/InlineEdit/inline-edit.anatomy.stories.tsx +250 -0
- package/src/components/InlineEdit/inline-edit.principles.stories.tsx +142 -0
- package/src/components/InlineEdit/inline-edit.spec.md +186 -0
- package/src/components/InlineEdit/inline-edit.stories.tsx +261 -0
- package/src/components/InlineEdit/inline-edit.tsx +457 -0
- package/src/components/Input/input.anatomy.stories.tsx +780 -0
- package/src/components/Input/input.principles.stories.tsx +260 -0
- package/src/components/Input/input.spec.md +35 -27
- package/src/components/Input/input.stories.tsx +150 -0
- package/src/components/Input/input.tsx +102 -45
- package/src/components/LinkInput/link-input.anatomy.stories.tsx +748 -0
- package/src/components/LinkInput/link-input.principles.stories.tsx +182 -0
- package/src/components/LinkInput/link-input.spec.md +25 -7
- package/src/components/LinkInput/link-input.stories.tsx +133 -0
- package/src/components/LinkInput/link-input.tsx +89 -66
- package/src/components/Menu/menu-item.anatomy.stories.tsx +780 -0
- package/src/components/Menu/menu-item.principles.stories.tsx +81 -0
- package/src/components/Menu/menu-item.spec.md +79 -36
- package/src/components/Menu/menu-item.stories.tsx +263 -0
- package/src/components/Menu/menu-item.tsx +121 -15
- package/src/components/Notice/notice.anatomy.stories.tsx +614 -0
- package/src/components/Notice/notice.principles.stories.tsx +102 -0
- package/src/components/Notice/notice.spec.md +39 -18
- package/src/components/Notice/notice.stories.tsx +257 -0
- package/src/components/Notice/notice.tsx +62 -16
- package/src/components/NumberInput/number-input.anatomy.stories.tsx +822 -0
- package/src/components/NumberInput/number-input.principles.stories.tsx +206 -0
- package/src/components/NumberInput/number-input.spec.md +35 -16
- package/src/components/NumberInput/number-input.stories.tsx +167 -0
- package/src/components/NumberInput/number-input.tsx +65 -31
- package/src/components/OverflowIndicator/overflow-indicator.anatomy.stories.tsx +550 -0
- package/src/components/OverflowIndicator/overflow-indicator.principles.stories.tsx +76 -0
- package/src/components/OverflowIndicator/overflow-indicator.spec.md +36 -26
- package/src/components/OverflowIndicator/overflow-indicator.stories.tsx +222 -0
- package/src/components/OverflowIndicator/overflow-indicator.tsx +21 -7
- package/src/components/{NameCard → Pagination}/index.ts +1 -1
- package/src/components/Pagination/pagination.anatomy.stories.tsx +144 -0
- package/src/components/Pagination/pagination.principles.stories.tsx +81 -0
- package/src/components/Pagination/pagination.spec.md +208 -0
- package/src/components/Pagination/pagination.stories.tsx +128 -0
- package/src/components/Pagination/pagination.tsx +374 -0
- package/src/components/PeoplePicker/avatar-stack-overflow.ts +1 -1
- package/src/components/PeoplePicker/people-picker-helpers.ts +5 -5
- package/src/components/PeoplePicker/people-picker.anatomy.stories.tsx +448 -0
- package/src/components/PeoplePicker/people-picker.principles.stories.tsx +196 -0
- package/src/components/PeoplePicker/people-picker.spec.md +113 -41
- package/src/components/PeoplePicker/people-picker.stories.tsx +327 -0
- package/src/components/PeoplePicker/people-picker.tsx +315 -119
- package/src/components/PeoplePicker/person-display.tsx +149 -54
- package/src/components/Popover/popover.anatomy.stories.tsx +282 -0
- package/src/components/Popover/popover.principles.stories.tsx +316 -0
- package/src/components/Popover/popover.spec.md +46 -34
- package/src/components/Popover/popover.stories.tsx +133 -0
- package/src/components/Popover/popover.tsx +110 -48
- package/src/components/ProfileCard/index.ts +5 -0
- package/src/components/ProfileCard/profile-card.anatomy.stories.tsx +493 -0
- package/src/components/ProfileCard/profile-card.principles.stories.tsx +225 -0
- package/src/components/ProfileCard/profile-card.spec.md +189 -0
- package/src/components/ProfileCard/profile-card.stories.tsx +57 -0
- package/src/components/{NameCard/name-card.tsx → ProfileCard/profile-card.tsx} +66 -39
- package/src/components/ProgressBar/progress-bar.anatomy.stories.tsx +441 -0
- package/src/components/ProgressBar/progress-bar.principles.stories.tsx +326 -0
- package/src/components/ProgressBar/progress-bar.spec.md +25 -21
- package/src/components/ProgressBar/progress-bar.stories.tsx +133 -0
- package/src/components/ProgressBar/progress-bar.tsx +6 -23
- package/src/components/README.md +5 -4
- package/src/components/RadioGroup/radio-group.anatomy.stories.tsx +672 -0
- package/src/components/RadioGroup/radio-group.principles.stories.tsx +163 -0
- package/src/components/RadioGroup/radio-group.spec.md +17 -9
- package/src/components/RadioGroup/radio-group.stories.tsx +204 -0
- package/src/components/RadioGroup/radio-group.tsx +226 -69
- package/src/components/Rating/rating.anatomy.stories.tsx +498 -0
- package/src/components/Rating/rating.principles.stories.tsx +296 -0
- package/src/components/Rating/rating.spec.md +41 -29
- package/src/components/Rating/rating.stories.tsx +119 -0
- package/src/components/Rating/rating.tsx +38 -19
- package/src/components/ScrollArea/scroll-area.anatomy.stories.tsx +451 -0
- package/src/components/ScrollArea/scroll-area.principles.stories.tsx +331 -0
- package/src/components/ScrollArea/scroll-area.spec.md +35 -24
- package/src/components/ScrollArea/scroll-area.stories.tsx +247 -0
- package/src/components/ScrollArea/scroll-area.tsx +25 -8
- package/src/components/SegmentedControl/segmented-control.anatomy.stories.tsx +295 -0
- package/src/components/SegmentedControl/segmented-control.principles.stories.tsx +284 -0
- package/src/components/SegmentedControl/segmented-control.spec.md +38 -39
- package/src/components/SegmentedControl/segmented-control.stories.tsx +37 -0
- package/src/components/SegmentedControl/segmented-control.tsx +45 -25
- package/src/components/Select/select.anatomy.stories.tsx +841 -0
- package/src/components/Select/select.principles.stories.tsx +312 -0
- package/src/components/Select/select.spec.md +109 -40
- package/src/components/Select/select.stories.tsx +388 -0
- package/src/components/Select/select.tsx +447 -117
- package/src/components/SelectMenu/select-menu.anatomy.stories.tsx +854 -0
- package/src/components/SelectMenu/select-menu.principles.stories.tsx +106 -0
- package/src/components/SelectMenu/select-menu.spec.md +281 -41
- package/src/components/SelectMenu/select-menu.stories.tsx +143 -0
- package/src/components/SelectMenu/select-menu.tsx +492 -123
- 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 +580 -0
- package/src/components/SelectionControl/selection-item.principles.stories.tsx +77 -0
- package/src/components/SelectionControl/selection-item.spec.md +30 -16
- package/src/components/SelectionControl/selection-item.stories.tsx +137 -0
- package/src/components/SelectionControl/selection-item.tsx +8 -2
- package/src/components/Separator/separator.anatomy.stories.tsx +125 -0
- package/src/components/Separator/separator.principles.stories.tsx +141 -0
- package/src/components/Separator/separator.spec.md +15 -9
- package/src/components/Separator/separator.stories.tsx +106 -0
- package/src/components/Separator/separator.tsx +2 -2
- package/src/components/Sheet/sheet.anatomy.stories.tsx +269 -0
- package/src/components/Sheet/sheet.principles.stories.tsx +353 -0
- package/src/components/Sheet/sheet.spec.md +16 -17
- package/src/components/Sheet/sheet.stories.tsx +172 -0
- package/src/components/Sheet/sheet.tsx +25 -14
- package/src/components/Sidebar/sidebar.anatomy.stories.tsx +776 -0
- package/src/components/Sidebar/sidebar.principles.stories.tsx +507 -0
- package/src/components/Sidebar/sidebar.spec.md +70 -62
- package/src/components/Sidebar/sidebar.stories.tsx +535 -0
- package/src/components/Sidebar/sidebar.tsx +141 -60
- package/src/components/Skeleton/skeleton.anatomy.stories.tsx +145 -0
- package/src/components/Skeleton/skeleton.principles.stories.tsx +234 -0
- package/src/components/Skeleton/skeleton.spec.md +15 -14
- package/src/components/Skeleton/skeleton.stories.tsx +134 -0
- package/src/components/Skeleton/skeleton.tsx +2 -2
- package/src/components/Slider/slider.anatomy.stories.tsx +237 -0
- package/src/components/Slider/slider.principles.stories.tsx +250 -0
- package/src/components/Slider/slider.spec.md +68 -118
- package/src/components/Slider/slider.stories.tsx +115 -0
- package/src/components/Slider/slider.tsx +102 -27
- package/src/components/Steps/steps.anatomy.stories.tsx +448 -0
- package/src/components/Steps/steps.principles.stories.tsx +300 -0
- package/src/components/Steps/steps.spec.md +91 -74
- package/src/components/Steps/steps.stories.tsx +306 -0
- package/src/components/Steps/steps.tsx +111 -39
- package/src/components/Switch/switch.anatomy.stories.tsx +227 -0
- package/src/components/Switch/switch.principles.stories.tsx +177 -0
- package/src/components/Switch/switch.spec.md +76 -26
- package/src/components/Switch/switch.stories.tsx +95 -0
- package/src/components/Switch/switch.tsx +192 -47
- package/src/components/Tabs/tabs-inline-action-geometry.ts +99 -0
- package/src/components/Tabs/tabs.anatomy.stories.tsx +424 -0
- package/src/components/Tabs/tabs.principles.stories.tsx +291 -0
- package/src/components/Tabs/tabs.spec.md +68 -69
- package/src/components/Tabs/tabs.stories.tsx +257 -0
- package/src/components/Tabs/tabs.tsx +276 -84
- package/src/components/Tag/tag.anatomy.stories.tsx +667 -0
- package/src/components/Tag/tag.principles.stories.tsx +270 -0
- package/src/components/Tag/tag.spec.md +124 -100
- package/src/components/Tag/tag.stories.tsx +88 -0
- package/src/components/Tag/tag.tsx +142 -84
- package/src/components/Textarea/textarea.anatomy.stories.tsx +310 -0
- package/src/components/Textarea/textarea.principles.stories.tsx +192 -0
- package/src/components/Textarea/textarea.spec.md +35 -16
- package/src/components/Textarea/textarea.stories.tsx +57 -0
- package/src/components/Textarea/textarea.tsx +149 -107
- package/src/components/TimePicker/time-columns.tsx +29 -4
- package/src/components/TimePicker/time-picker.anatomy.stories.tsx +288 -0
- package/src/components/TimePicker/time-picker.principles.stories.tsx +133 -0
- package/src/components/TimePicker/time-picker.spec.md +61 -53
- package/src/components/TimePicker/time-picker.stories.tsx +193 -0
- package/src/components/TimePicker/time-picker.tsx +137 -60
- package/src/components/Toast/toast.anatomy.stories.tsx +328 -0
- package/src/components/Toast/toast.principles.stories.tsx +216 -0
- package/src/components/Toast/toast.spec.md +26 -16
- package/src/components/Toast/toast.stories.tsx +241 -0
- package/src/components/Toast/toast.tsx +101 -23
- package/src/components/Tooltip/tooltip.anatomy.stories.tsx +422 -0
- package/src/components/Tooltip/tooltip.principles.stories.tsx +204 -0
- package/src/components/Tooltip/tooltip.spec.md +38 -23
- package/src/components/Tooltip/tooltip.stories.tsx +82 -0
- package/src/components/Tooltip/tooltip.tsx +83 -13
- package/src/components/TreeView/tree-view.anatomy.stories.tsx +436 -0
- package/src/components/TreeView/tree-view.principles.stories.tsx +223 -0
- package/src/components/TreeView/tree-view.spec.md +103 -54
- package/src/components/TreeView/tree-view.stories.tsx +365 -0
- package/src/components/TreeView/tree-view.tsx +575 -68
- package/src/hooks/use-controllable.ts +7 -2
- package/src/hooks/use-input-modality.ts +164 -0
- package/src/hooks/use-is-touch-device.ts +8 -1
- package/src/hooks/use-known-options.ts +25 -0
- package/src/hooks/use-overflow-items.ts +10 -6
- package/src/hooks/use-truncated.ts +111 -0
- package/src/index.ts +681 -67
- package/src/lib/drag-announcements.ts +87 -0
- package/src/lib/drag-visual.ts +135 -5
- package/src/lib/overlay-coexistence.ts +232 -0
- package/src/lib/utils.ts +21 -1
- package/src/patterns/README.md +20 -16
- package/src/patterns/action-bar/action-bar.spec.md +79 -45
- package/src/patterns/action-bar/action-bar.stories.tsx +619 -0
- package/src/patterns/element-anatomy/element-anatomy.spec.md +17 -13
- package/src/patterns/element-anatomy/index.ts +1 -0
- package/src/patterns/element-anatomy/inline-action.spec.md +37 -26
- package/src/patterns/element-anatomy/item-anatomy.spec.md +144 -82
- package/src/patterns/element-anatomy/item-anatomy.stories.tsx +1648 -0
- package/src/patterns/element-anatomy/item-anatomy.tsx +159 -59
- package/src/patterns/element-anatomy/truncated-text.spec.md +68 -0
- package/src/patterns/element-anatomy/truncated-text.tsx +61 -0
- package/src/patterns/header-canonical/chrome-header.tsx +26 -6
- package/src/patterns/header-canonical/header-canonical.css +3 -4
- package/src/patterns/header-canonical/header-canonical.spec.md +96 -42
- package/src/patterns/header-canonical/header-canonical.stories.tsx +257 -0
- package/src/patterns/horizontal-overflow/horizontal-overflow.spec.md +37 -15
- package/src/patterns/horizontal-overflow/horizontal-overflow.stories.tsx +139 -0
- package/src/patterns/horizontal-overflow/horizontal-overflow.tsx +1 -1
- package/src/patterns/overlay-surface/overlay-surface.spec.md +228 -62
- package/src/patterns/overlay-surface/overlay-surface.stories.tsx +132 -0
- package/src/patterns/overlay-surface/overlay-surface.tsx +41 -18
- package/src/patterns/resize-handle/resize-handle.spec.md +49 -30
- package/src/patterns/resize-handle/resize-handle.stories.tsx +85 -0
- package/src/patterns/resize-handle/resize-handle.tsx +172 -106
- package/src/stories-helpers/overlay/open-overlay-docs.ts +34 -0
- package/src/stories-helpers/scene/data-toolbar.tsx +52 -0
- package/src/stories-helpers/scene/simulated-browser.tsx +71 -0
- package/src/story-governance/category-matrix.json +132 -0
- package/src/story-governance/category-matrix.ts +55 -0
- package/src/styles/base.css +134 -0
- package/src/styles/tokens.css +14 -0
- package/src/tokens/README.md +12 -5
- package/src/tokens/categorical-color.ts +164 -0
- package/src/tokens/color/color.spec.md +181 -70
- package/src/tokens/color/color.stories.tsx +402 -0
- package/src/tokens/color/primitives.css +23 -7
- package/src/tokens/color/semantic.css +117 -22
- package/src/tokens/density/density.spec.md +33 -30
- package/src/tokens/density/density.stories.tsx +259 -0
- package/src/tokens/elevation/elevation.spec.md +11 -14
- package/src/tokens/elevation/elevation.stories.tsx +99 -0
- package/src/tokens/elevation/overlay-geometry.ts +17 -0
- package/src/tokens/layoutSpace/layoutSpace.css +12 -1
- package/src/tokens/layoutSpace/layoutSpace.spec.md +60 -32
- package/src/tokens/layoutSpace/layoutSpace.stories.tsx +76 -0
- package/src/tokens/motion/motion.css +49 -20
- package/src/tokens/motion/motion.spec.md +69 -21
- package/src/tokens/motion/motion.stories.tsx +196 -0
- package/src/tokens/motion/motion.ts +8 -7
- package/src/tokens/motion/overlay-motion.ts +27 -0
- package/src/tokens/opacity/opacity.spec.md +15 -20
- package/src/tokens/opacity/opacity.stories.tsx +66 -0
- package/src/tokens/orphan-tokens.spec.md +22 -11
- package/src/tokens/radius/radius.spec.md +14 -11
- package/src/tokens/radius/radius.stories.tsx +87 -0
- package/src/tokens/token-system.spec.md +241 -0
- package/src/tokens/typography/typography.css +1 -1
- package/src/tokens/typography/typography.spec.md +12 -8
- package/src/tokens/typography/typography.stories.tsx +134 -0
- package/src/tokens/uiSize/icon-size.ts +3 -4
- package/src/tokens/uiSize/uiSize.css +76 -1
- package/src/tokens/uiSize/uiSize.spec.md +94 -36
- package/src/tokens/uiSize/uiSize.stories.tsx +106 -0
- package/src/tokens/utility-registry.json +426 -0
- package/src/tokens/utility-registry.schema.json +409 -0
- package/tools/README.md +9 -0
- package/tools/codemods/cli.mjs +93 -0
- package/tools/codemods/index.mjs +582 -0
- package/tools/shared/safe-filesystem.mjs +371 -0
- package/tools/visual-baseline/cli.mjs +97 -0
- package/tools/visual-baseline/index.mjs +522 -0
- package/dist/components/Field/field-types.js +0 -13
- package/dist/components/Field/field-types.js.map +0 -1
- package/dist/components/NameCard/index.d.ts +0 -2
- package/dist/components/NameCard/index.d.ts.map +0 -1
- package/dist/components/NameCard/index.js +0 -8
- package/dist/components/NameCard/name-card.d.ts.map +0 -1
- package/dist/components/NameCard/name-card.js.map +0 -1
- package/dist/stories-helpers/anatomy/anatomy-utils.d.ts +0 -40
- package/dist/stories-helpers/anatomy/anatomy-utils.d.ts.map +0 -1
- package/ds-canonical/commands/gov-status.md +0 -79
- package/ds-canonical/hooks/check_app_shell_primary_header_consistency.sh +0 -68
- package/ds-canonical/hooks/check_chrome_header_handcraft.sh +0 -70
- package/ds-canonical/hooks/check_header_with_tabs_border.sh +0 -87
- package/ds-canonical/hooks/check_tab_lg_chrome_header_equal.sh +0 -66
- package/ds-canonical/hooks/tests/KNOWN-BROKEN.md +0 -15
- package/ds-canonical/hooks/tests/test_check_story_category.sh.broken +0 -187
- package/ds-canonical/references/audit-coverage-vs-24-checklist.md +0 -74
- package/ds-canonical/skills/design-system-audit/references/spec-template.md +0 -66
- package/src/components/NameCard/name-card.spec.md +0 -171
- /package/dist/components/{NameCard → AccountMenu}/index.js.map +0 -0
|
@@ -12,8 +12,6 @@ benchmark:
|
|
|
12
12
|
- Ant Design Popover: github.com/ant-design/ant-design/tree/master/components/popover
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
<!-- @benchmark-cited: D5 retrofit 2026-05-18 — body claims marked per-claim @benchmark-unverified inline; canonical source URLs in frontmatter benchmark list. -->
|
|
16
|
-
|
|
17
15
|
# Popover 設計原則
|
|
18
16
|
|
|
19
17
|
## 定位
|
|
@@ -24,16 +22,16 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
24
22
|
|
|
25
23
|
**Layout Family**:非上述 family — composite / multi-section(多區塊組合,自 own layout)。
|
|
26
24
|
|
|
27
|
-
**視覺對齊 Dialog**:外殼 token 與 Dialog 完全一致(`bg-surface-raised` / `border-border` / `rounded-lg` / `elevation-200`)。差別僅兩點:(1) Popover 是 non-modal 輕量浮層不阻斷背景,(2) **
|
|
25
|
+
**視覺對齊 Dialog**:外殼 token 與 Dialog 完全一致(`bg-surface-raised` / `border-border` / `rounded-lg` / `elevation-200`)。差別僅兩點:(1) Popover 是 non-modal 輕量浮層不阻斷背景,(2) **layout-space 鎖 `md`** — header / footer padding 不隨頁面放大(輕量 chrome 保持精簡);**ui-size 不鎖、繼承 page** — 內部控件隨 page 放大、對齊觸發點(2026-06-15 改,原 `data-density` master switch,見 `popover.tsx` docblock)。
|
|
28
26
|
|
|
29
|
-
**Content size canonical(2026-04-29
|
|
27
|
+
**Content size canonical(2026-04-29,2026-06-15 更新)**:ui-size 繼承 page → **fields(Input / Select / Checkbox)預設隨 page ui-size**(md page = `size="md"` field-height-md 32px;lg page 放大,與觸發點一致)。其餘細節走 SSOT pointer:
|
|
30
28
|
- Chrome corner buttons(close X / refresh / dismiss)→ `patterns/overlay-surface/overlay-surface.spec.md`「Chrome dismiss size canonical」(sm native + v5 trick)
|
|
31
29
|
- Row inline action(panel list row 內 Eye / drag / suffix toggle)→ `patterns/element-anatomy/inline-action.spec.md`「尺寸對照」table(md = 16+18 hover bg)
|
|
32
30
|
- Footer action button → `action-bar.spec.md`(輕量 chrome,sm canonical)
|
|
33
31
|
|
|
34
|
-
**觸發距離 canonical**:`sideOffset = 8`(px)—— trigger 到 Popover
|
|
32
|
+
**觸發距離 canonical**:`sideOffset = 8`(px)—— trigger 到 Popover 邊緣的垂直/水平間距。小於 4px 會讓浮層貼死 trigger 失去「另一層」感,大於 12px 會拉斷 trigger ↔ content 的視覺關聯。本 DS 固定 8px 作為 overlay primitive 的共用呼吸距離;Dialog 居中或 full-screen,不適用此規則。
|
|
35
33
|
|
|
36
|
-
**Viewport 邊距 canonical**:`collisionPadding = 8`(px)——浮層與 viewport 邊緣的最小間距。當 popover 原本要貼近 viewport 邊(trigger 在頁面最右側、或視窗很窄)
|
|
34
|
+
**Viewport 邊距 canonical**:`collisionPadding = 8`(px)——浮層與 viewport 邊緣的最小間距。當 popover 原本要貼近 viewport 邊(trigger 在頁面最右側、或視窗很窄),定位 primitive 會自動推開 8px,防止內容與螢幕邊界相黏。`sideOffset` 管 trigger↔popover,`collisionPadding` 管 popover↔viewport,兩者互補。Consumer 不需傳 — 預設值是 canonical。
|
|
37
35
|
|
|
38
36
|
**Align 對齊 canonical(跨浮層 SSOT)**:`align` 必須跟隨 trigger 在容器中的位置,**不是自由選擇**:
|
|
39
37
|
|
|
@@ -43,7 +41,7 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
43
41
|
| **置中**(toolbar 中央、modal 內置中按鈕) | `"center"`(default)| Popover 與 trigger 中心對齊 |
|
|
44
42
|
| **右側 / 右上**(page header right、設定按鈕、overflow menu) | `"end"` | Popover 與 trigger 右邊緣對齊,向左展開 |
|
|
45
43
|
|
|
46
|
-
**為什麼**:Popover 通常比 trigger 寬。align 錯方向會 (1)溢出容器邊緣 / 被 viewport 裁切、(2)視覺上 popover「沒黏在 trigger 那一側」產生 disconnect
|
|
44
|
+
**為什麼**:Popover 通常比 trigger 寬。align 錯方向會 (1)溢出容器邊緣 / 被 viewport 裁切、(2)視覺上 popover「沒黏在 trigger 那一側」產生 disconnect,使用者以為兩者無關。因此 trigger 靠哪邊,浮層就跟著靠哪邊。
|
|
47
45
|
|
|
48
46
|
**SSOT 適用範圍(2026-04-20 精緻化)**:本規則是**「結構化浮層」的 canonical** —— Popover / DropdownMenu / Coachmark / SelectMenu 嚴格遵守(這些浮層寬度通常比 trigger 寬、且有結構化內容,錯方向必視覺 disconnect)。
|
|
49
47
|
|
|
@@ -54,7 +52,7 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
54
52
|
其他結構化浮層 spec 若討論 align 應 pointer 指回本節。
|
|
55
53
|
|
|
56
54
|
**結構化組合(可選)**:PopoverContent 外殼無內距,consumer 可選擇:
|
|
57
|
-
- **單一 body**:包 `<PopoverBody>` 取得
|
|
55
|
+
- **單一 body**:包 `<PopoverBody>` 取得 SurfaceBody canonical padding (`px-loose py-tight`,`overlay-surface.spec.md` SSOT;Dialog body 另有 `pb-[--layout-space-bottom]` 特化)
|
|
58
56
|
- **含標題**:組合 `<PopoverHeader>` + `<PopoverBody>`(下分隔線由 Header 提供)
|
|
59
57
|
- **含操作按鈕列**:再加 `<PopoverFooter>`(上分隔線由 Footer 提供)
|
|
60
58
|
|
|
@@ -62,15 +60,15 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
62
60
|
|
|
63
61
|
> **跨家族 SSOT pointer**:PopoverHeader 屬 **Padding-based overlay header 家族**;border / padding / dismiss size / withTabs(tabs 進 PopoverHeader 時 border auto-suppress + tabs size sm)的跨家族視覺契約 SSOT 詳 `patterns/header-canonical/header-canonical.spec.md`。本節僅 codify Popover 特有 close X v5 unbounded canonical。
|
|
64
62
|
|
|
65
|
-
**Close X 按鈕(2026-04-22 v5 unbounded canonical)**:所有 `PopoverHeader` 內建右上 X 按鈕,`<Button data-dismiss iconOnly dismiss size="sm" />` native sm(28 md / 32 lg)。透過 SurfaceHeader 的 v5 CSS rule 自動套負 margin 讓 layout
|
|
63
|
+
**Close X 按鈕(2026-04-22 v5 unbounded canonical)**:所有 `PopoverHeader` 內建右上 X 按鈕,`<Button data-dismiss iconOnly dismiss size="sm" />` native sm(28 md / 32 lg)。透過 SurfaceHeader 的 v5 CSS rule 自動套負 margin 讓 layout 佔位;PopoverHeader 走 `COMPACT_HEADER_SLOT`(= calc(--font-body-size×1.5) = 21 = title line-box,衍生)→ 佔位 21(輕量 chrome,見 `popover.tsx` docblock),非 Dialog 的 24。`hideClose` prop 可讓 composition 元件(如 Coachmark)選擇隱藏。詳 `patterns/overlay-surface/overlay-surface.spec.md`「Chrome dismiss size canonical」。
|
|
66
64
|
|
|
67
|
-
**Header / Footer 高度 canonical**:padding-based(繼承 SurfaceHeader / SurfaceFooter),高度 = max(child layout) + 2×tight。
|
|
65
|
+
**Header / Footer 高度 canonical**:padding-based(繼承 SurfaceHeader / SurfaceFooter),高度 = max(child layout) + 2×tight。header:slot 佔位 21(`COMPACT_HEADER_SLOT` = title line-box,衍生)→ max(21 title, 21 slot) + 2×12 = **45**,自然比 Dialog / Sheet 48 輕一級(`popover.tsx` PopoverHeader docblock + overlay-surface.tsx 對照);footer:SurfaceFooter **不**套 unbounded slot trick(僅 padding + `border-t`,見 `overlay-surface.spec.md`「為什麼 SurfaceHeader 是 padding-based」)→ 高度 = max(child layout) + 2×tight(sm action button 28 → **52** md)。詳 `tokens/uiSize/uiSize.spec.md`「Chrome header 選型 canonical」。
|
|
68
66
|
|
|
69
67
|
---
|
|
70
68
|
|
|
71
69
|
## Title typography canonical(non-modal 特化,2026-04-22 v4)
|
|
72
70
|
|
|
73
|
-
**PopoverTitle 用 `text-body font-medium`(14px),不是 Dialog / Sheet 的 `text-body-lg`(16px)**。這是針對 **non-modal 輕量浮層** 的視覺考量,跟
|
|
71
|
+
**PopoverTitle 用 `text-body font-medium`(14px),不是 Dialog / Sheet 的 `text-body-lg`(16px)**。這是針對 **non-modal 輕量浮層** 的視覺考量,跟 layout-space 鎖 md 同源的輕量 rationale。
|
|
74
72
|
|
|
75
73
|
**重量分級(world-class 共通 pattern)**:
|
|
76
74
|
|
|
@@ -92,7 +90,7 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
92
90
|
|
|
93
91
|
**共通原則**:non-modal overlay 的 title 比 modal 小一級。我方採 16 → 14 分級,在 world-class 範圍內。
|
|
94
92
|
|
|
95
|
-
**Coachmark 的 PopoverTitle 消費**:Coachmark 的 header 小標籤(如 "新功能介紹" / "Tip 1 of 3")繼承 PopoverTitle 14px。Coachmark **body 內容的主 title**(長敘述型 "建立你的第一個 Workspace")另走 `text-body-lg`(見 `coachmark.tsx
|
|
93
|
+
**Coachmark 的 PopoverTitle 消費**:Coachmark 的 header 小標籤(如 "新功能介紹" / "Tip 1 of 3")繼承 PopoverTitle 14px。Coachmark **body 內容的主 title**(長敘述型 "建立你的第一個 Workspace")另走 `text-body-lg`(見 `coachmark.tsx` CoachmarkBody 主 title `<h3>`)— 那是 body content 不是 chrome title,分離 concerns。
|
|
96
94
|
|
|
97
95
|
**禁止**:consumer 自己在 PopoverContent 裡手刻 `<h2 className="text-body-lg">` 當 title(繞 PopoverTitle 的 canonical)。若需要大 title,視為該用 Dialog 而非 Popover(選對元件)。
|
|
98
96
|
|
|
@@ -132,10 +130,12 @@ Popover 是**點擊觸發的浮層容器**——提供定位、動畫、焦點
|
|
|
132
130
|
|
|
133
131
|
### 合法但少見:Popover 內含可選 item 列 + footer save CTA
|
|
134
132
|
|
|
135
|
-
Popover 可以在 body
|
|
133
|
+
Popover 可以在 body 放可選 item 列,**但必在 footer 有 CTA 按鈕(套用 / 儲存 / 完成)觸發狀態提交**。這個 pattern 跟 DropdownMenu 的差別是:**DropdownMenu 一 click 即觸發動作,Popover 這類是「暫存選擇 → 按 CTA 才 commit」**。
|
|
134
|
+
|
|
135
|
+
**body 是一份可選清單時,列走選單列**(`patterns/overlay-surface/overlay-surface.spec.md`「預設:浮層的 body 是一份可選清單 → 走選單列」):body 撤 chrome padding、`Command`(cmdk)包住提供鍵盤與 listbox 結構、item 自帶 `px-loose` 對齊 header 標題。**不要用 `CheckboxGroup` + 裸 `Checkbox` 自組** —— 那是表單欄位的組合方式,不是選項清單。典型情境:
|
|
136
136
|
|
|
137
|
-
- **多選 filter panel
|
|
138
|
-
- **Bulk edit**:選多個
|
|
137
|
+
- **多選 filter panel**:勾選列 + 底部 `清除 / 套用`(canonical = `FilterPanel` story 的 `StatusFilterPanel`)
|
|
138
|
+
- **Bulk edit**:選多個 options + 底部 `儲存變更`
|
|
139
139
|
- **Custom toolbar 設定**:可選 toggle 列 + 底部 `套用偏好`
|
|
140
140
|
|
|
141
141
|
canonical 判斷:「使用者 click 單項是否立即改變系統狀態?」是 → DropdownMenu;否(要按 footer CTA 才 commit)→ Popover。
|
|
@@ -150,26 +150,39 @@ canonical 判斷:「使用者 click 單項是否立即改變系統狀態?」是
|
|
|
150
150
|
|
|
151
151
|
---
|
|
152
152
|
|
|
153
|
+
## 邊界案例
|
|
154
|
+
|
|
155
|
+
- **極長內容**:PopoverContent 設 `max-h-[var(--radix-popover-content-available-height)]`(popover.tsx:103),body 包 `<PopoverBody>`(SurfaceBody `flex-1 min-h-0 overflow-y-auto`)→ viewport 太小時 header / footer 留在視窗內、body 內捲。中間 wrapper 必 forward flex chain,詳 `../../patterns/overlay-surface/overlay-surface.spec.md`「Viewport-aware scroll chain invariant」。
|
|
156
|
+
- **Viewport 邊緣**:`collisionPadding = 8` 自動推開(見「Viewport 邊距 canonical」)。
|
|
157
|
+
- **嵌套 Popover**:禁止(見「禁止事項」)。
|
|
158
|
+
- **Dark mode**:殼走 semantic token 自動 adapt(見 `color.spec.md`)。
|
|
159
|
+
- **Density**:layout-space 鎖 `md`(header / footer padding 精簡);ui-size 繼承 page(見「定位」段)。
|
|
160
|
+
- **空內容 / loading / error / validation ownership**:Popover shell **不擁有**這些狀態——由 `PopoverBody` 內的 consumer 內容層負責:空狀態放 `<Empty>`、載入放 `<Skeleton>`、錯誤放 `<Alert>`、表單驗證放 `<Field>` 的 `FieldError`。structural pattern 的職責邊界 SSOT 見 `../../patterns/overlay-surface/overlay-surface.spec.md` SurfaceBody「邊界」段(loading / error / empty 屬 consumer 內容層)。
|
|
161
|
+
- **disabled ownership**:Popover 容器無 disabled 態;trigger 的 disabled 由 trigger 元件自管(`<Button disabled>`),content 內控件各自的 disabled 由該控件負責(對應 `StateBehavior` story「職責邊界」段)。
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
153
165
|
## A11y 預設
|
|
154
166
|
|
|
155
|
-
Radix
|
|
167
|
+
焦點 / 鍵盤 / ARIA 行為分兩層——**DS 覆寫**(改 Radix 預設)與 **Radix 內建**(沿用):
|
|
156
168
|
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
169
|
+
- **開啟焦點(DS 覆寫)**:DS 以 `onOpenAutoFocus` 覆寫底層 primitive 的預設 autofocus(見 `popover.tsx` `handlePopoverOpenAutoFocus`),開啟時把焦點落在 body 第一個**表單控件**(`input` / `textarea` / `select` / `button`,排除右上 close X);查無表單控件時退回 footer 按鈕,再無則落在 content 容器(`role="dialog"`)本身。原預設會先 focus 右上 close X,DS 覆寫以避免觸發 tooltip leak,selector 與 `dialog.tsx handleOpenAutoFocus` 共用同一套 DS canonical。**注意**:(1) 若移除此 default handler,行為會回退成底層預設 focus close X;(2) selector 只認表單控件——body 若只含 `a[href]` / `[tabindex]` / `contenteditable` 類可聚焦內容,焦點會落在 content 容器而非該內容,consumer 需自傳 `onOpenAutoFocus` 指定要聚焦的元素。
|
|
170
|
+
- **關閉返回(Radix 內建)**:關閉時 focus return to trigger
|
|
171
|
+
- **Esc 關閉(Radix 內建)**:按 Esc 自動關閉並返回焦點
|
|
172
|
+
- **Focus trap(Radix 內建,僅 modal)**:`modal={true}` 時焦點鎖在 content 內
|
|
173
|
+
- **點外 / 焦點離開即關(Radix 內建,non-modal)**:預設 non-modal **不鎖焦點**(無 focus trap),焦點或指標離開 content 樹時由 DismissableLayer 觸發 dismiss 自動關閉——這是 dismiss-on-focus-out 機制,**不是** focus trap
|
|
174
|
+
- **ARIA(Radix 內建)**:trigger 自動 `aria-expanded` / `aria-controls`,content `role="dialog"`
|
|
175
|
+
- **Accessible name(DS 覆寫)**:Radix Popover 沒有 Radix Dialog Title 式的自動接線,content `role="dialog"` 預設**無 accessible name**。DS 以 context 補同機制(見 `popover.tsx` `PopoverTitleContext`):`<PopoverTitle>` 掛載時自動把 id 接上 content 的 `aria-labelledby`;consumer 自傳 `aria-label` / `aria-labelledby` 一律優先
|
|
161
176
|
|
|
162
|
-
|
|
177
|
+
焦點與 accessible name 的 DS 覆寫 default 已 wire 在 `PopoverContent`(consumer 可傳自己的 `onOpenAutoFocus` override),保留 Radix `data-state` 屬性即可。**無 `<PopoverTitle>` 的 naked popover 需 consumer 自傳 `aria-label`**,否則 `role="dialog"` 無 accessible name。
|
|
163
178
|
|
|
164
179
|
---
|
|
165
180
|
|
|
166
|
-
##
|
|
181
|
+
## Inspector
|
|
167
182
|
|
|
168
|
-
|
|
183
|
+
`Inspector` 提供互動 Controls 即時切換 PopoverContent 六個關鍵維度:`side` / `align`(12 種定位組合)、`sideOffset`(與 trigger 距離)、`width`(w-72 / w-80 / w-96)、`showHeader` / `showFooter`(chrome 結構開關)。內容區由 consumer 決定,Inspector 聚焦容器層級的可試玩 prop(對齊 `sheet.spec.md`「Inspector」canonical)。`PlacementMatrix` 另以靜態 12-cell side × align 矩陣一眼呈現所有定位組合;Header / Body / Footer padding 屬 `overlay-surface` SSOT,由 `ColorMatrix` 的 token 表 + 該 pattern spec 覆蓋。
|
|
169
184
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
對應 anatomy story:保留 `Overview` + 元件特有 `PlacementMatrix`(12-cell side × align 矩陣) + `ColorMatrix` + `SizeMatrix` + `StateBehavior`(open / close / animation)。
|
|
185
|
+
對應 anatomy story:保留 `Overview` + `Inspector` + 元件特有 `PlacementMatrix`(12-cell side × align 矩陣) + `ColorMatrix` + `SizeMatrix` + `StateBehavior`(open / close / animation) + `Accessibility`。
|
|
173
186
|
|
|
174
187
|
---
|
|
175
188
|
|
|
@@ -188,11 +201,10 @@ Popover 內容完全由 consumer 決定,無自己的 variant/size/disabled 等
|
|
|
188
201
|
|
|
189
202
|
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
190
203
|
|
|
191
|
-
- `
|
|
192
|
-
- `
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- `density.spec.md`
|
|
204
|
+
- `coachmark.spec.md`
|
|
205
|
+
- `dialog.spec.md`
|
|
206
|
+
- `dropdown-menu.spec.md`
|
|
207
|
+
- `hover-card.spec.md`
|
|
208
|
+
- `overlay-surface.spec.md`
|
|
209
|
+
- `select-menu.spec.md`
|
|
210
|
+
- `tooltip.spec.md`
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
import { Filter } from 'lucide-react'
|
|
3
|
+
import {
|
|
4
|
+
Popover,
|
|
5
|
+
PopoverTrigger,
|
|
6
|
+
PopoverContent,
|
|
7
|
+
PopoverHeader,
|
|
8
|
+
PopoverBody,
|
|
9
|
+
PopoverFooter,
|
|
10
|
+
PopoverTitle,
|
|
11
|
+
} from './popover'
|
|
12
|
+
import * as React from 'react'
|
|
13
|
+
import { Button } from '@/design-system/components/Button/button'
|
|
14
|
+
import { Command, CommandList, CommandGroup, CommandItem } from '@/design-system/components/Command/command'
|
|
15
|
+
|
|
16
|
+
const meta: Meta = {
|
|
17
|
+
title: 'Design System/Components/Popover/展示',
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'centered',
|
|
21
|
+
docs: { description: { component: '由 trigger 錨定的輕量浮層,可承載簡短資訊、篩選或小型表單。內容需要保留來源位置且不值得打斷整頁時使用;複雜流程改用 Dialog 或 Sheet。' } },
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
export default meta
|
|
25
|
+
type Story = StoryObj
|
|
26
|
+
|
|
27
|
+
const STATUS_OPTIONS = ['待處理', '進行中', '已完成', '已封存'] as const
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 狀態篩選面板 —— 兩支 story(互動版 / 截圖版)共用同一份內容,避免只改一邊造成漂移。
|
|
31
|
+
*
|
|
32
|
+
* body 主體就是一份可選清單 → 走 `overlay-surface.spec.md`「List-as-region in overlay body」:
|
|
33
|
+
* body 撤掉 chrome padding、`CommandGroup` 自帶 `py-2` 給上下呼吸、item 自帶 `px-loose`。
|
|
34
|
+
* 容器用 `Command`(cmdk)而不是裸 `MenuItem`:`menu-item.spec.md:246` 要求選單項目待在提供鍵盤
|
|
35
|
+
* 導覽與 listbox 結構的容器內,`Command` 自帶方向鍵與 `role="listbox"`(`SelectMenu` 內部走同一條路)。
|
|
36
|
+
* **列的水平內距是唯一要客製的東西**,而且**設在清單容器上、不是設在每一列**:
|
|
37
|
+
* 列的內距讀 `--item-px`(owner = `item-anatomy.spec.md`「Token: `--item-px`」,預設 `var(--field-px)` 12px);
|
|
38
|
+
* 這裡在 `Command` 根設一次 `var(--layout-space-loose)`(16px),整份清單(含空狀態 / 載入中訊息列)一起換。
|
|
39
|
+
*
|
|
40
|
+
* 目的是讓**列的最前緣**(這裡是勾選框)對齊 header 標題與 footer 按鈕左緣
|
|
41
|
+
* (`overlay-surface.spec.md:100` 第 2 條 + `:202` footer 同一條對齊線)。**對齊的是前緣不是文字** ——
|
|
42
|
+
* `item-anatomy.spec.md:423` content 槽的 x 是剩餘空間、`:665`/`:671` 跨群組不強求文字對齊、
|
|
43
|
+
* `:677` 把「為了讓文字齊左而改前綴尺寸」列為錯誤示範。
|
|
44
|
+
*
|
|
45
|
+
* **禁止寫在單列的 `className`**:`CommandItem` 是兩層,外層 cmdk Item 負責「反白底色鋪滿整列」恆為
|
|
46
|
+
* `p-0`(`command.tsx:326`),內層 `MenuItem` 才帶內距(`:352-366`)。寫在 className 會落在外層與內層相加 ——
|
|
47
|
+
* 2026-09-17 實測 16+12=28px,標題在 17px、勾選框跑到 29px。機械閘 `scripts/overlay-list-as-region-invariant.mjs`。
|
|
48
|
+
*/
|
|
49
|
+
function StatusFilterPanel({ defaultOpen = false }: { defaultOpen?: boolean }) {
|
|
50
|
+
// 暫存選擇:勾選只改這裡,按「套用」才 commit(對照 DropdownMenu 的 click 即觸發)。
|
|
51
|
+
const [staged, setStaged] = React.useState<string[]>(['待處理', '進行中'])
|
|
52
|
+
const toggle = (value: string) =>
|
|
53
|
+
setStaged((prev) => (prev.includes(value) ? prev.filter((v) => v !== value) : [...prev, value]))
|
|
54
|
+
return (
|
|
55
|
+
<Popover defaultOpen={defaultOpen}>
|
|
56
|
+
<PopoverTrigger asChild>
|
|
57
|
+
<Button variant="tertiary" startIcon={Filter}>依狀態篩選</Button>
|
|
58
|
+
</PopoverTrigger>
|
|
59
|
+
<PopoverContent align="start">
|
|
60
|
+
<PopoverHeader>
|
|
61
|
+
<PopoverTitle>依狀態篩選</PopoverTitle>
|
|
62
|
+
</PopoverHeader>
|
|
63
|
+
<PopoverBody className="!px-0 !pt-0 !pb-0">
|
|
64
|
+
<Command label="狀態選項" style={{ '--item-px': 'var(--layout-space-loose)' } as React.CSSProperties}>
|
|
65
|
+
<CommandList>
|
|
66
|
+
<CommandGroup>
|
|
67
|
+
{STATUS_OPTIONS.map((status) => (
|
|
68
|
+
<CommandItem
|
|
69
|
+
key={status}
|
|
70
|
+
value={status}
|
|
71
|
+
checkbox
|
|
72
|
+
checked={staged.includes(status)}
|
|
73
|
+
onSelect={() => toggle(status)}
|
|
74
|
+
>
|
|
75
|
+
{status}
|
|
76
|
+
</CommandItem>
|
|
77
|
+
))}
|
|
78
|
+
</CommandGroup>
|
|
79
|
+
</CommandList>
|
|
80
|
+
</Command>
|
|
81
|
+
</PopoverBody>
|
|
82
|
+
<PopoverFooter>
|
|
83
|
+
<Button variant="tertiary" size="sm" className="flex-1" onClick={() => setStaged([])}>清除</Button>
|
|
84
|
+
<Button variant="primary" size="sm" className="flex-1">套用</Button>
|
|
85
|
+
</PopoverFooter>
|
|
86
|
+
</PopoverContent>
|
|
87
|
+
</Popover>
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const FilterPanel: Story = {
|
|
92
|
+
name: '篩選面板',
|
|
93
|
+
render: () => <StatusFilterPanel />,
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* OpenSnapshot — visual-audit 專用 story(非 consumer-facing 教學範例)。
|
|
98
|
+
*
|
|
99
|
+
* 用 `defaultOpen` 讓 Popover 在 render 當下就開著,Playwright 截圖才抓得到
|
|
100
|
+
* Popover chrome(Header + X / Body / Footer)。不用 play() + userEvent,是
|
|
101
|
+
* 因為 Radix `defaultOpen` 對 Portal 自動生效 — 世界級 DS 的 chromatic 稽核
|
|
102
|
+
* 也走同 pattern。
|
|
103
|
+
*
|
|
104
|
+
* 情境沿用 FilterPanel(Jira / Linear 狀態篩選),是 Popover「多選 + footer
|
|
105
|
+
* save CTA」canonical 的完整示範,涵蓋 Header X、checkbox list、footer 雙
|
|
106
|
+
* action 整組 chrome。
|
|
107
|
+
*/
|
|
108
|
+
export const OpenSnapshot: Story = {
|
|
109
|
+
name: '開啟狀態',
|
|
110
|
+
tags: ['test-only'],
|
|
111
|
+
render: () => <StatusFilterPanel defaultOpen />,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// SettingsPanel story 於 2026-04-20 移除:
|
|
115
|
+
// 原本是「顯示設定 mini panel (Notion 頁面設定)」— 用 Popover + 多個 horizontal
|
|
116
|
+
// Field + Switch 展示 settings list。
|
|
117
|
+
//
|
|
118
|
+
// B13 決策(user 回饋):Notion 頁面設定的實際做法是 `<DropdownMenu>` +
|
|
119
|
+
// `<DropdownMenuCheckboxItem>` — menu 內 binary toggle 已由 CheckboxItem 覆蓋
|
|
120
|
+
// (見 `../DropdownMenu/dropdown-menu.stories.tsx` 的 `CheckboxItems` story)。
|
|
121
|
+
// Popover 的 canonical 是「自由組合 UI 面板」(filter / form / 圖表),純 toggle
|
|
122
|
+
// 列表用 DropdownMenu 語意更準確 + 鍵盤上下導覽更自然。
|
|
123
|
+
//
|
|
124
|
+
// 同一情境兩處 demo = 噪音 + 教壞 consumer,不保留重複範例。Popover 只保留
|
|
125
|
+
// FilterPanel(多選 checkbox + footer save CTA — Popover canonical)即可。
|
|
126
|
+
|
|
127
|
+
// BareBody 範例於 2026-04-20 移除:
|
|
128
|
+
// 原 demo 是「選擇優先度」(5 個選項選一個)、在浮層內手刻原生按鈕當作
|
|
129
|
+
// item 列表 — 這是 `<Select>` / `<DropdownMenu>` 的標準情境,不該走 Popover。
|
|
130
|
+
//
|
|
131
|
+
// B1 決策(user):menu / select / combobox 早已定義過那種「格式化的選單範例」,
|
|
132
|
+
// Popover 不再 demo。Popover 的本質是「輕量盡量不干擾使用者心流的 modal」—
|
|
133
|
+
// 結構化 form / filter / settings 等情境才是 canonical。
|
|
@@ -4,16 +4,18 @@ import * as PopoverPrimitive from "@radix-ui/react-popover"
|
|
|
4
4
|
import { X as XIcon } from "lucide-react"
|
|
5
5
|
|
|
6
6
|
import { cn } from "@/lib/utils"
|
|
7
|
-
import { SurfaceHeader, SurfaceBody, SurfaceFooter } from "@/design-system/patterns/overlay-surface/overlay-surface"
|
|
7
|
+
import { SurfaceHeader, SurfaceBody, SurfaceFooter, COMPACT_HEADER_SLOT } from "@/design-system/patterns/overlay-surface/overlay-surface"
|
|
8
|
+
import { TruncatedText } from "@/design-system/patterns/element-anatomy/truncated-text"
|
|
8
9
|
import { Button } from "@/design-system/components/Button/button"
|
|
9
|
-
import { OVERLAY_SIDE_OFFSET, OVERLAY_COLLISION_PADDING } from "@/design-system/tokens/elevation/overlay-geometry"
|
|
10
|
+
import { OVERLAY_SIDE_OFFSET, OVERLAY_COLLISION_PADDING, OVERLAY_HIDE_WHEN_DETACHED } from "@/design-system/tokens/elevation/overlay-geometry"
|
|
11
|
+
import { overlayMotion } from "@/design-system/tokens/motion/overlay-motion"
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Popover — Radix Popover + 設計系統 token
|
|
13
15
|
*
|
|
14
16
|
* ── 視覺 ──
|
|
15
17
|
* 與 Dialog 對齊:bg-surface-raised / rounded-lg / border-border / elevation-200。
|
|
16
|
-
*
|
|
18
|
+
* layout-space 鎖 md(輕量浮層 header py-tight 保持精簡);ui-size 繼承 page(內部控件對齊觸發點,2026-06-15 改,原 data-density master switch)。
|
|
17
19
|
*
|
|
18
20
|
* ── 結構 ──
|
|
19
21
|
* PopoverContent:外殼(bg / border / radius / shadow / density),無內距。
|
|
@@ -33,45 +35,88 @@ const PopoverAnchor = PopoverPrimitive.Anchor
|
|
|
33
35
|
const PopoverClose = PopoverPrimitive.Close
|
|
34
36
|
|
|
35
37
|
// AutoFocus canonical(對齊 Dialog / Sheet / Material / Polaris)—
|
|
36
|
-
// 開啟時 focus 落在 body 第一個有意義互動元素,避免 focus 到 close X 觸發 tooltip leak
|
|
38
|
+
// 開啟時 focus 落在 body 第一個有意義互動元素,避免 focus 到 close X 觸發 tooltip leak。
|
|
39
|
+
// 兩段查詢對齊 dialog.tsx handleOpenAutoFocus(2026-07-05 修):舊版單一混合清單按 DOM 序取
|
|
40
|
+
// 第一 match,header 內互動元素(非 data-dismiss)會搶走 body 首元素焦點,且 bare 段漏 select。
|
|
41
|
+
// 改為:先 body-scoped 查詢,查無才退 bare 全域清單(保留 naked popover — consumer 不用
|
|
42
|
+
// PopoverBody 自管結構 — 的 fallback 意圖),最後 footer → content 容器。
|
|
37
43
|
const handlePopoverOpenAutoFocus = (e: Event) => {
|
|
38
44
|
e.preventDefault()
|
|
39
45
|
const content = e.currentTarget as HTMLElement
|
|
40
46
|
const firstBodyTarget = content.querySelector<HTMLElement>(
|
|
41
|
-
'[data-popover-body] input:not([disabled]),[data-popover-body] textarea:not([disabled]),[data-popover-body] select:not([disabled]),[data-popover-body] button:not([disabled]):not([data-dismiss])
|
|
47
|
+
'[data-popover-body] input:not([disabled]),[data-popover-body] textarea:not([disabled]),[data-popover-body] select:not([disabled]),[data-popover-body] button:not([disabled]):not([data-dismiss])'
|
|
48
|
+
)
|
|
49
|
+
const firstBareTarget = content.querySelector<HTMLElement>(
|
|
50
|
+
'input:not([disabled]),textarea:not([disabled]),select:not([disabled]),button:not([disabled]):not([data-dismiss])'
|
|
42
51
|
)
|
|
43
52
|
const firstFooterButton = content.querySelector<HTMLElement>(
|
|
44
53
|
'[data-popover-footer] button:not([disabled]):not([data-dismiss])'
|
|
45
54
|
)
|
|
46
|
-
;(firstBodyTarget ?? firstFooterButton ?? content).focus({ preventScroll: true })
|
|
55
|
+
;(firstBodyTarget ?? firstBareTarget ?? firstFooterButton ?? content).focus({ preventScroll: true })
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ── PopoverTitle → aria-labelledby 自動接線(2026-07-05,照 Radix Dialog Title 機制補 DS 層)──
|
|
59
|
+
// Radix Popover 的 content 有 role="dialog",但沒有 Radix Dialog Title 式的自動 accessible name
|
|
60
|
+
// 接線 → 一般 Popover 預設無 accessible name。DS 層以 context 補同機制:PopoverContent 以 useId
|
|
61
|
+
// 建 titleId 供給 children;PopoverTitle 掛載時註冊,PopoverContent 偵測到有 title 註冊才設
|
|
62
|
+
// aria-labelledby。Consumer 自傳 aria-label / aria-labelledby 一律優先。PopoverTitle 亦被
|
|
63
|
+
// DataTable sort / filter panel 等非 PopoverContent 場景裸用(raw SurfaceHeader chrome)—
|
|
64
|
+
// context 為 null 時全部 no-op,行為與舊版一致。
|
|
65
|
+
interface PopoverTitleContextValue {
|
|
66
|
+
titleId: string
|
|
67
|
+
onTitleMount: () => void
|
|
68
|
+
onTitleUnmount: () => void
|
|
47
69
|
}
|
|
48
70
|
|
|
71
|
+
const PopoverTitleContext = React.createContext<PopoverTitleContextValue | null>(null)
|
|
72
|
+
|
|
49
73
|
const PopoverContent = React.forwardRef<
|
|
50
74
|
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
51
75
|
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
52
|
-
>(({ className, align = "center", sideOffset = OVERLAY_SIDE_OFFSET, collisionPadding = OVERLAY_COLLISION_PADDING, onOpenAutoFocus, ...props }, ref) =>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
>(({ className, align = "center", sideOffset = OVERLAY_SIDE_OFFSET, collisionPadding = OVERLAY_COLLISION_PADDING, hideWhenDetached = OVERLAY_HIDE_WHEN_DETACHED, onOpenAutoFocus, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, ref) => {
|
|
77
|
+
const titleId = React.useId()
|
|
78
|
+
const [hasTitle, setHasTitle] = React.useState(false)
|
|
79
|
+
const titleContext = React.useMemo<PopoverTitleContextValue>(
|
|
80
|
+
() => ({ titleId, onTitleMount: () => setHasTitle(true), onTitleUnmount: () => setHasTitle(false) }),
|
|
81
|
+
[titleId],
|
|
82
|
+
)
|
|
83
|
+
return (
|
|
84
|
+
<PopoverPrimitive.Portal>
|
|
85
|
+
<PopoverTitleContext.Provider value={titleContext}>
|
|
86
|
+
<PopoverPrimitive.Content
|
|
87
|
+
ref={ref}
|
|
88
|
+
align={align}
|
|
89
|
+
sideOffset={sideOffset}
|
|
90
|
+
collisionPadding={collisionPadding}
|
|
91
|
+
// 錨點失去版面時不畫(同 Tooltip;詳 tokens/elevation/overlay-geometry.ts)
|
|
92
|
+
hideWhenDetached={hideWhenDetached}
|
|
93
|
+
// Layout-space lock(2026-06-15 canonical,原 data-density="md" 改為只鎖 layout-space):Popover 是
|
|
94
|
+
// 輕量浮層,header/footer 用 py-tight(layout-space)→ 鎖 layout-space=md 保持精簡 padding;但
|
|
95
|
+
// **ui-size 不鎖、繼承 page** → 內部 field 控件 / dismiss 按鈕隨 page 放大,跟觸發點一致(decouple)。
|
|
96
|
+
// [data-layout-space="md"] 有 reset selector(layoutSpace.css L31)→ lg page 上正確 reset 回 md。
|
|
97
|
+
data-layout-space="md"
|
|
98
|
+
onOpenAutoFocus={onOpenAutoFocus ?? handlePopoverOpenAutoFocus}
|
|
99
|
+
aria-label={ariaLabel}
|
|
100
|
+
// accessible name 自動接線:consumer 自傳優先;無 aria-label 且有 PopoverTitle 註冊才掛 titleId
|
|
101
|
+
aria-labelledby={ariaLabelledBy ?? (ariaLabel == null && hasTitle ? titleId : undefined)}
|
|
102
|
+
className={cn(
|
|
103
|
+
// @focus-suppress E — E 浮層程式落點;承擔者:浮層開啟時的程式落點;內部控件各自有指示
|
|
104
|
+
"z-50 w-72 rounded-lg border border-border bg-surface-raised text-foreground shadow-[var(--elevation-200)] outline-none",
|
|
105
|
+
// 2026-05-04 viewport-aware max-h SSOT(從 ProfileCard 升 DS-wide):header/footer 永遠 in-viewport,body 壓縮 scroll
|
|
106
|
+
// 2026-05-05 audit dim 35 補:加 `min-h-0` 完成 M25 chain invariant(flex item default min-h: auto 阻 shrink)
|
|
107
|
+
"max-h-[var(--radix-popover-content-available-height,100vh)] flex flex-col overflow-hidden min-h-0",
|
|
108
|
+
overlayMotion,
|
|
109
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
110
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
111
|
+
"origin-[var(--radix-popover-content-transform-origin)]",
|
|
112
|
+
className
|
|
113
|
+
)}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
</PopoverTitleContext.Provider>
|
|
117
|
+
</PopoverPrimitive.Portal>
|
|
118
|
+
)
|
|
119
|
+
})
|
|
75
120
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName
|
|
76
121
|
|
|
77
122
|
// PopoverHeader: SurfaceHeader + Close X(對齊 Dialog 的 canonical,見 docblock)
|
|
@@ -86,20 +131,19 @@ interface PopoverHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
86
131
|
|
|
87
132
|
const PopoverHeader = React.forwardRef<HTMLDivElement, PopoverHeaderProps>(
|
|
88
133
|
({ className, children, hideClose = false, ...props }, ref) => (
|
|
89
|
-
// Popover lightweight chrome canonical(2026-05-04 重思 v2):
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// max(21 title,
|
|
93
|
-
// Q10 穩定:title-only / title+close 都 = title + py
|
|
94
|
-
// 無 min-h / 無 py override — 修正前一版過度設計。
|
|
134
|
+
// Popover lightweight chrome canonical(2026-05-04 重思 v2;2026-06-16 slot 改衍生 + 收斂 SSOT):
|
|
135
|
+
// 走 `COMPACT_HEADER_SLOT`(= calc(--font-body-size×1.5) = 14×1.5 = 21 = PopoverTitle text-body line-box,
|
|
136
|
+
// 衍生非寫死,取代舊各自寫死的 1.25rem / 20 巧合值)→ slot = title 行高,title 字級改 slot 自動跟。
|
|
137
|
+
// Header 維持 padding-based:max(21 title, 21 slot) + py-tight(12*2) = 45 → 自然比 Dialog/Sheet 48 輕一級。
|
|
138
|
+
// Q10 穩定:title-only / title+close 都 = title + py 主導(slot=title)。無 min-h / 無 py override。
|
|
95
139
|
<SurfaceHeader
|
|
96
140
|
ref={ref}
|
|
97
|
-
className={cn("justify-between
|
|
141
|
+
className={cn("justify-between", COMPACT_HEADER_SLOT, className)}
|
|
98
142
|
{...props}
|
|
99
143
|
>
|
|
100
144
|
<div className="flex-1 min-w-0">{children}</div>
|
|
101
145
|
{!hideClose && (
|
|
102
|
-
// Dismiss X = native sm,SurfaceHeader 負 my trick 讓 layout
|
|
146
|
+
// Dismiss X = native sm,SurfaceHeader 負 my trick 讓 layout 佔位縮到 slot(21 = title line-box)
|
|
103
147
|
<PopoverPrimitive.Close asChild>
|
|
104
148
|
<Button data-dismiss iconOnly dismiss size="sm" startIcon={XIcon} aria-label="關閉" />
|
|
105
149
|
</PopoverPrimitive.Close>
|
|
@@ -131,24 +175,42 @@ PopoverFooter.displayName = "PopoverFooter"
|
|
|
131
175
|
// PopoverTitle(2026-04-22 v4 non-modal canonical):`text-body font-medium`(14px)
|
|
132
176
|
// Rationale:Popover / Coachmark 屬 **non-modal 輕量浮層**,跟 density 鎖 md 同源的視覺語言 —
|
|
133
177
|
// chrome 全體輕量:
|
|
134
|
-
// -
|
|
135
|
-
// - dismiss X
|
|
178
|
+
// - layout-space 鎖 md(ui-size 繼承 page,2026-06-15)
|
|
179
|
+
// - dismiss X 走 COMPACT_HEADER_SLOT 佔位 21(= title text-body line-box;見 PopoverHeader docblock)
|
|
136
180
|
// - **title `text-body`(14px)跟 Dialog / Sheet modal 的 body-lg(16px)形成重量級 vs 輕量級視覺區分**
|
|
137
181
|
// 世界級對照:Figma / Notion / Linear / Material 的 popover / filter panel / inline settings
|
|
138
182
|
// 的 header title 多半比 modal dialog title 小一級(16→14 或同比),視覺宣告「此浮層可忽略」
|
|
139
183
|
//
|
|
140
184
|
// Coachmark 同樣消費 PopoverTitle 作 header 小標籤(如 "新功能介紹" / "Tip 1 of 3"),
|
|
141
|
-
// CoachmarkBody 的主 title 另走 text-body-lg(見 coachmark.tsx
|
|
185
|
+
// CoachmarkBody 的主 title 另走 text-body-lg(見 coachmark.tsx CoachmarkBody 主 title <h3>)。
|
|
142
186
|
const PopoverTitle = React.forwardRef<
|
|
143
187
|
HTMLHeadingElement,
|
|
144
188
|
React.HTMLAttributes<HTMLHeadingElement>
|
|
145
|
-
>(({ className, ...props }, ref) =>
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
189
|
+
>(({ className, id, children, ...props }, ref) => {
|
|
190
|
+
const titleCtx = React.useContext(PopoverTitleContext)
|
|
191
|
+
// 掛載時向 PopoverContent 註冊 → content 自動設 aria-labelledby(見 PopoverTitleContext docblock)。
|
|
192
|
+
// consumer 自傳 id 時不註冊:auto 接線指向 context titleId,自訂 id 下引用會斷 → aria 由 consumer 自管。
|
|
193
|
+
const shouldRegister = id == null && titleCtx != null
|
|
194
|
+
const onTitleMount = titleCtx?.onTitleMount
|
|
195
|
+
const onTitleUnmount = titleCtx?.onTitleUnmount
|
|
196
|
+
React.useLayoutEffect(() => {
|
|
197
|
+
if (!shouldRegister) return
|
|
198
|
+
onTitleMount?.()
|
|
199
|
+
return onTitleUnmount
|
|
200
|
+
}, [shouldRegister, onTitleMount, onTitleUnmount])
|
|
201
|
+
return (
|
|
202
|
+
<h2
|
|
203
|
+
ref={ref}
|
|
204
|
+
id={id ?? titleCtx?.titleId}
|
|
205
|
+
className={cn("text-body font-medium truncate", className)}
|
|
206
|
+
{...props}
|
|
207
|
+
>
|
|
208
|
+
{/* 2026-07-28:截斷必附 tooltip(tooltip.spec.md「截斷 → tooltip,僅實際截斷時顯示」)——
|
|
209
|
+
同 DialogTitle 同型修;id/aria-labelledby 留在 h2 本體不受影響。 */}
|
|
210
|
+
<TruncatedText display="block">{children}</TruncatedText>
|
|
211
|
+
</h2>
|
|
212
|
+
)
|
|
213
|
+
})
|
|
152
214
|
PopoverTitle.displayName = "PopoverTitle"
|
|
153
215
|
|
|
154
216
|
// Story auto-compile metadata — Phase 1 mechanical migration(2026-04-24)
|
|
@@ -162,7 +224,7 @@ export const popoverMeta = {
|
|
|
162
224
|
sizes: {
|
|
163
225
|
|
|
164
226
|
},
|
|
165
|
-
states: ['default',
|
|
227
|
+
states: ['default'], // 浮層容器 primitive,無自己的 variant/size/disabled 互動 state(spec「為何無 Inspector」段;對齊 separator.tsx meta canonical)
|
|
166
228
|
tokens: {
|
|
167
229
|
bg: ['bg-surface-raised'],
|
|
168
230
|
fg: ['text-foreground'],
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/gen-component-indexes.mjs — DO NOT EDIT MANUALLY.
|
|
2
|
+
// Re-export pattern enables package.json exports map subpath:
|
|
3
|
+
// import { ... } from '@qijenchen/design-system/{components,patterns}/<Dir>'
|
|
4
|
+
// Regenerate: node scripts/gen-component-indexes.mjs
|
|
5
|
+
export * from './profile-card'
|