@qijenchen/design-system 0.1.0-beta.8 → 0.1.0-beta.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +200 -0
- package/README.md +10 -9
- package/cli-init.mjs +90 -0
- package/dist/components/Accordion/accordion.d.ts +1 -1
- package/dist/components/Accordion/accordion.d.ts.map +1 -1
- package/dist/components/Accordion/accordion.js +4 -1
- package/dist/components/Accordion/accordion.js.map +1 -1
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Accordion/index.d.ts.map +1 -0
- package/dist/components/Accordion/index.js +9 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Alert/alert.d.ts +2 -2
- package/dist/components/Alert/alert.d.ts.map +1 -1
- package/dist/components/Alert/alert.js +8 -7
- package/dist/components/Alert/alert.js.map +1 -1
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Alert/index.js +7 -0
- package/dist/components/Alert/index.js.map +1 -0
- 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 +2 -2
- package/dist/components/AppShell/app-shell.d.ts.map +1 -1
- package/dist/components/AppShell/app-shell.js +9 -8
- package/dist/components/AppShell/app-shell.js.map +1 -1
- package/dist/components/AppShell/index.d.ts +2 -0
- package/dist/components/AppShell/index.d.ts.map +1 -0
- package/dist/components/AppShell/index.js +7 -0
- package/dist/components/AppShell/index.js.map +1 -0
- package/dist/components/AspectRatio/aspect-ratio.d.ts +1 -1
- 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/AspectRatio/index.d.ts +2 -0
- package/dist/components/AspectRatio/index.d.ts.map +1 -0
- package/dist/components/AspectRatio/index.js +6 -0
- package/dist/components/AspectRatio/index.js.map +1 -0
- package/dist/components/Avatar/avatar.d.ts +12 -6
- package/dist/components/Avatar/avatar.d.ts.map +1 -1
- package/dist/components/Avatar/avatar.js +12 -23
- package/dist/components/Avatar/avatar.js.map +1 -1
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Avatar/index.js +6 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/badge.d.ts +20 -8
- package/dist/components/Badge/badge.d.ts.map +1 -1
- package/dist/components/Badge/badge.js +7 -5
- package/dist/components/Badge/badge.js.map +1 -1
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Badge/index.js +7 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Breadcrumb/breadcrumb.d.ts +1 -1
- package/dist/components/Breadcrumb/breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/index.d.ts +2 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/Breadcrumb/index.js +12 -0
- package/dist/components/Breadcrumb/index.js.map +1 -0
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts +2 -2
- package/dist/components/BulkActionBar/bulk-action-bar.d.ts.map +1 -1
- package/dist/components/BulkActionBar/bulk-action-bar.js +3 -3
- package/dist/components/BulkActionBar/bulk-action-bar.js.map +1 -1
- package/dist/components/BulkActionBar/index.d.ts +2 -0
- package/dist/components/BulkActionBar/index.d.ts.map +1 -0
- package/dist/components/BulkActionBar/index.js +7 -0
- package/dist/components/BulkActionBar/index.js.map +1 -0
- package/dist/components/Button/button.d.ts +7 -7
- package/dist/components/Button/button.d.ts.map +1 -1
- package/dist/components/Button/button.js +13 -10
- package/dist/components/Button/button.js.map +1 -1
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +8 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Calendar/calendar.d.ts +9 -5
- package/dist/components/Calendar/calendar.d.ts.map +1 -1
- package/dist/components/Calendar/calendar.js +88 -76
- package/dist/components/Calendar/calendar.js.map +1 -1
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Calendar/index.d.ts.map +1 -0
- package/dist/components/Calendar/index.js +6 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Carousel/carousel.d.ts.map +1 -1
- package/dist/components/Carousel/carousel.js +11 -6
- package/dist/components/Carousel/carousel.js.map +1 -1
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Carousel/index.d.ts.map +1 -0
- package/dist/components/Carousel/index.js +11 -0
- package/dist/components/Carousel/index.js.map +1 -0
- 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 +3 -1
- package/dist/components/Chart/chart.js.map +1 -1
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/Chart/index.d.ts.map +1 -0
- package/dist/components/Chart/index.js +11 -0
- package/dist/components/Chart/index.js.map +1 -0
- 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.map +1 -1
- package/dist/components/Checkbox/checkbox.d.ts +13 -7
- package/dist/components/Checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/checkbox.js +49 -15
- package/dist/components/Checkbox/checkbox.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Checkbox/index.js +7 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Chip/chip.d.ts +6 -6
- package/dist/components/Chip/chip.js +4 -3
- package/dist/components/Chip/chip.js.map +1 -1
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/Chip/index.js +8 -0
- package/dist/components/Chip/index.js.map +1 -0
- 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 +4 -3
- package/dist/components/CircularProgress/circular-progress.js.map +1 -1
- package/dist/components/CircularProgress/index.d.ts +2 -0
- package/dist/components/CircularProgress/index.d.ts.map +1 -0
- package/dist/components/CircularProgress/index.js +6 -0
- package/dist/components/CircularProgress/index.js.map +1 -0
- 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 +4 -4
- package/dist/components/Coachmark/coachmark.d.ts.map +1 -1
- package/dist/components/Coachmark/coachmark.js +9 -4
- package/dist/components/Coachmark/coachmark.js.map +1 -1
- package/dist/components/Coachmark/index.d.ts +2 -0
- package/dist/components/Coachmark/index.d.ts.map +1 -0
- package/dist/components/Coachmark/index.js +6 -0
- package/dist/components/Coachmark/index.js.map +1 -0
- package/dist/components/Combobox/combobox.d.ts +16 -7
- package/dist/components/Combobox/combobox.d.ts.map +1 -1
- package/dist/components/Combobox/combobox.js +74 -39
- package/dist/components/Combobox/combobox.js.map +1 -1
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/Combobox/index.d.ts.map +1 -0
- package/dist/components/Combobox/index.js +6 -0
- package/dist/components/Combobox/index.js.map +1 -0
- package/dist/components/Command/command.d.ts +5 -1
- package/dist/components/Command/command.d.ts.map +1 -1
- package/dist/components/Command/command.js +6 -6
- package/dist/components/Command/command.js.map +1 -1
- package/dist/components/Command/index.d.ts +2 -0
- package/dist/components/Command/index.d.ts.map +1 -0
- package/dist/components/Command/index.js +14 -0
- package/dist/components/Command/index.js.map +1 -0
- package/dist/components/DataTable/cell-registry.d.ts.map +1 -1
- package/dist/components/DataTable/cell-registry.js +6 -5
- package/dist/components/DataTable/cell-registry.js.map +1 -1
- package/dist/components/DataTable/data-table.d.ts +29 -8
- package/dist/components/DataTable/data-table.d.ts.map +1 -1
- package/dist/components/DataTable/data-table.js +69 -39
- 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-tree.d.ts +1 -1
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.d.ts.map +1 -0
- package/dist/components/DataTable/index.js +8 -0
- package/dist/components/DataTable/index.js.map +1 -0
- package/dist/components/DateGrid/date-grid.d.ts +21 -17
- package/dist/components/DateGrid/date-grid.d.ts.map +1 -1
- package/dist/components/DateGrid/date-grid.js +2 -2
- package/dist/components/DateGrid/date-grid.js.map +1 -1
- package/dist/components/DateGrid/index.d.ts +2 -0
- package/dist/components/DateGrid/index.d.ts.map +1 -0
- package/dist/components/DateGrid/index.js +6 -0
- package/dist/components/DateGrid/index.js.map +1 -0
- package/dist/components/DatePicker/date-picker.d.ts.map +1 -1
- package/dist/components/DatePicker/date-picker.js +29 -18
- package/dist/components/DatePicker/date-picker.js.map +1 -1
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/DatePicker/index.js +8 -0
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/DescriptionList/description-list.d.ts +3 -3
- package/dist/components/DescriptionList/description-list.js +4 -3
- package/dist/components/DescriptionList/description-list.js.map +1 -1
- package/dist/components/DescriptionList/index.d.ts +2 -0
- package/dist/components/DescriptionList/index.d.ts.map +1 -0
- package/dist/components/DescriptionList/index.js +7 -0
- package/dist/components/DescriptionList/index.js.map +1 -0
- package/dist/components/Dialog/dialog.d.ts.map +1 -1
- package/dist/components/Dialog/dialog.js.map +1 -1
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Dialog/index.js +16 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/DropdownMenu/dropdown-menu.d.ts +3 -2
- package/dist/components/DropdownMenu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/dropdown-menu.js +3 -4
- package/dist/components/DropdownMenu/dropdown-menu.js.map +1 -1
- package/dist/components/DropdownMenu/index.d.ts +2 -0
- package/dist/components/DropdownMenu/index.d.ts.map +1 -0
- package/dist/components/DropdownMenu/index.js +21 -0
- package/dist/components/DropdownMenu/index.js.map +1 -0
- package/dist/components/Empty/empty.d.ts +11 -3
- package/dist/components/Empty/empty.d.ts.map +1 -1
- package/dist/components/Empty/empty.js +6 -6
- package/dist/components/Empty/empty.js.map +1 -1
- package/dist/components/Empty/index.d.ts +2 -0
- package/dist/components/Empty/index.d.ts.map +1 -0
- package/dist/components/Empty/index.js +6 -0
- package/dist/components/Empty/index.js.map +1 -0
- package/dist/components/Field/field-context.d.ts +49 -0
- package/dist/components/Field/field-context.d.ts.map +1 -1
- package/dist/components/Field/field-context.js +42 -0
- package/dist/components/Field/field-context.js.map +1 -1
- package/dist/components/Field/field-types.js.map +1 -1
- package/dist/components/Field/field-wrapper.js +5 -5
- package/dist/components/Field/field-wrapper.js.map +1 -1
- package/dist/components/Field/field.d.ts +4 -2
- package/dist/components/Field/field.d.ts.map +1 -1
- package/dist/components/Field/field.js +1 -0
- package/dist/components/Field/field.js.map +1 -1
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Field/index.d.ts.map +1 -0
- package/dist/components/Field/index.js +12 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/Field/use-form-validation.d.ts +88 -0
- package/dist/components/Field/use-form-validation.d.ts.map +1 -0
- package/dist/components/Field/use-form-validation.js +127 -0
- package/dist/components/Field/use-form-validation.js.map +1 -0
- package/dist/components/FieldControlGroup/field-control-group.d.ts +5 -5
- package/dist/components/FieldControlGroup/field-control-group.d.ts.map +1 -1
- package/dist/components/FieldControlGroup/field-control-group.js +1 -1
- package/dist/components/FieldControlGroup/field-control-group.js.map +1 -1
- package/dist/components/FieldControlGroup/index.d.ts +2 -0
- package/dist/components/FieldControlGroup/index.d.ts.map +1 -0
- package/dist/components/FieldControlGroup/index.js +6 -0
- package/dist/components/FieldControlGroup/index.js.map +1 -0
- package/dist/components/FileItem/file-item.d.ts +12 -2
- package/dist/components/FileItem/file-item.d.ts.map +1 -1
- package/dist/components/FileItem/file-item.js +20 -6
- package/dist/components/FileItem/file-item.js.map +1 -1
- package/dist/components/FileItem/index.d.ts +2 -0
- package/dist/components/FileItem/index.d.ts.map +1 -0
- package/dist/components/FileItem/index.js +6 -0
- package/dist/components/FileItem/index.js.map +1 -0
- package/dist/components/FileUpload/file-upload.d.ts +32 -13
- package/dist/components/FileUpload/file-upload.d.ts.map +1 -1
- package/dist/components/FileUpload/file-upload.js +62 -18
- package/dist/components/FileUpload/file-upload.js.map +1 -1
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.d.ts.map +1 -0
- package/dist/components/FileUpload/index.js +6 -0
- package/dist/components/FileUpload/index.js.map +1 -0
- package/dist/components/FileViewer/file-viewer.d.ts +2 -2
- package/dist/components/FileViewer/file-viewer.d.ts.map +1 -1
- package/dist/components/FileViewer/file-viewer.js +28 -19
- package/dist/components/FileViewer/file-viewer.js.map +1 -1
- package/dist/components/FileViewer/index.d.ts +2 -0
- package/dist/components/FileViewer/index.d.ts.map +1 -0
- package/dist/components/FileViewer/index.js +7 -0
- package/dist/components/FileViewer/index.js.map +1 -0
- package/dist/components/HoverCard/hover-card.d.ts +7 -3
- package/dist/components/HoverCard/hover-card.d.ts.map +1 -1
- package/dist/components/HoverCard/hover-card.js +4 -3
- package/dist/components/HoverCard/hover-card.js.map +1 -1
- package/dist/components/HoverCard/index.d.ts +2 -0
- package/dist/components/HoverCard/index.d.ts.map +1 -0
- package/dist/components/HoverCard/index.js +8 -0
- package/dist/components/HoverCard/index.js.map +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Input/index.js +6 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/Input/input.d.ts +5 -2
- package/dist/components/Input/input.d.ts.map +1 -1
- package/dist/components/Input/input.js +10 -8
- package/dist/components/Input/input.js.map +1 -1
- package/dist/components/LinkInput/index.d.ts +2 -0
- package/dist/components/LinkInput/index.d.ts.map +1 -0
- package/dist/components/LinkInput/index.js +6 -0
- package/dist/components/LinkInput/index.js.map +1 -0
- package/dist/components/LinkInput/link-input.d.ts.map +1 -1
- package/dist/components/LinkInput/link-input.js +8 -8
- package/dist/components/LinkInput/link-input.js.map +1 -1
- package/dist/components/Menu/index.d.ts +2 -0
- package/dist/components/Menu/index.d.ts.map +1 -0
- package/dist/components/Menu/index.js +9 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/Menu/menu-item.d.ts +6 -2
- package/dist/components/Menu/menu-item.d.ts.map +1 -1
- package/dist/components/Menu/menu-item.js +2 -1
- package/dist/components/Menu/menu-item.js.map +1 -1
- package/dist/components/Notice/index.d.ts +2 -0
- package/dist/components/Notice/index.d.ts.map +1 -0
- package/dist/components/Notice/index.js +8 -0
- package/dist/components/Notice/index.js.map +1 -0
- package/dist/components/Notice/notice.d.ts +13 -6
- package/dist/components/Notice/notice.d.ts.map +1 -1
- package/dist/components/Notice/notice.js +16 -6
- package/dist/components/Notice/notice.js.map +1 -1
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.d.ts.map +1 -0
- package/dist/components/NumberInput/index.js +7 -0
- package/dist/components/NumberInput/index.js.map +1 -0
- package/dist/components/NumberInput/number-input.d.ts.map +1 -1
- package/dist/components/NumberInput/number-input.js +8 -7
- package/dist/components/NumberInput/number-input.js.map +1 -1
- package/dist/components/OverflowIndicator/index.d.ts +2 -0
- package/dist/components/OverflowIndicator/index.d.ts.map +1 -0
- package/dist/components/OverflowIndicator/index.js +6 -0
- package/dist/components/OverflowIndicator/index.js.map +1 -0
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts +5 -1
- package/dist/components/OverflowIndicator/overflow-indicator.d.ts.map +1 -1
- package/dist/components/OverflowIndicator/overflow-indicator.js +13 -6
- package/dist/components/OverflowIndicator/overflow-indicator.js.map +1 -1
- package/dist/components/PeoplePicker/index.d.ts +2 -0
- package/dist/components/PeoplePicker/index.d.ts.map +1 -0
- package/dist/components/PeoplePicker/index.js +9 -0
- package/dist/components/PeoplePicker/index.js.map +1 -0
- 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.map +1 -1
- package/dist/components/PeoplePicker/people-picker.js +21 -17
- package/dist/components/PeoplePicker/people-picker.js.map +1 -1
- package/dist/components/PeoplePicker/person-display.d.ts +7 -7
- package/dist/components/PeoplePicker/person-display.d.ts.map +1 -1
- package/dist/components/PeoplePicker/person-display.js +9 -9
- package/dist/components/PeoplePicker/person-display.js.map +1 -1
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.d.ts.map +1 -0
- package/dist/components/Popover/index.js +14 -0
- package/dist/components/Popover/index.js.map +1 -0
- 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 +12 -12
- 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} +26 -20
- package/dist/components/ProfileCard/profile-card.d.ts.map +1 -0
- package/dist/components/{NameCard/name-card.js → ProfileCard/profile-card.js} +11 -10
- package/dist/components/ProfileCard/profile-card.js.map +1 -0
- package/dist/components/ProgressBar/index.d.ts +2 -0
- package/dist/components/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/ProgressBar/index.js +6 -0
- package/dist/components/ProgressBar/index.js.map +1 -0
- package/dist/components/ProgressBar/progress-bar.d.ts +2 -2
- package/dist/components/ProgressBar/progress-bar.js +3 -3
- package/dist/components/ProgressBar/progress-bar.js.map +1 -1
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -0
- package/dist/components/RadioGroup/index.js +8 -0
- package/dist/components/RadioGroup/index.js.map +1 -0
- package/dist/components/RadioGroup/radio-group.d.ts +15 -9
- package/dist/components/RadioGroup/radio-group.d.ts.map +1 -1
- package/dist/components/RadioGroup/radio-group.js +71 -33
- package/dist/components/RadioGroup/radio-group.js.map +1 -1
- package/dist/components/Rating/index.d.ts +2 -0
- package/dist/components/Rating/index.d.ts.map +1 -0
- package/dist/components/Rating/index.js +6 -0
- package/dist/components/Rating/index.js.map +1 -0
- 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 +10 -7
- package/dist/components/Rating/rating.js.map +1 -1
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/components/ScrollArea/index.js +7 -0
- package/dist/components/ScrollArea/index.js.map +1 -0
- package/dist/components/ScrollArea/scroll-area.d.ts +1 -1
- package/dist/components/ScrollArea/scroll-area.js +2 -2
- package/dist/components/ScrollArea/scroll-area.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/SegmentedControl/index.d.ts.map +1 -0
- package/dist/components/SegmentedControl/index.js +9 -0
- package/dist/components/SegmentedControl/index.js.map +1 -0
- package/dist/components/SegmentedControl/segmented-control.d.ts +2 -2
- package/dist/components/SegmentedControl/segmented-control.d.ts.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.js +8 -10
- package/dist/components/SegmentedControl/segmented-control.js.map +1 -1
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Select/index.js +6 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/select.d.ts.map +1 -1
- package/dist/components/Select/select.js +30 -18
- package/dist/components/Select/select.js.map +1 -1
- package/dist/components/SelectMenu/index.d.ts +2 -0
- package/dist/components/SelectMenu/index.d.ts.map +1 -0
- package/dist/components/SelectMenu/index.js +6 -0
- package/dist/components/SelectMenu/index.js.map +1 -0
- package/dist/components/SelectMenu/select-menu.d.ts +10 -5
- package/dist/components/SelectMenu/select-menu.d.ts.map +1 -1
- package/dist/components/SelectMenu/select-menu.js +12 -4
- package/dist/components/SelectMenu/select-menu.js.map +1 -1
- package/dist/components/SelectionControl/index.d.ts +2 -0
- package/dist/components/SelectionControl/index.d.ts.map +1 -0
- package/dist/components/SelectionControl/index.js +7 -0
- package/dist/components/SelectionControl/index.js.map +1 -0
- 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/index.d.ts +2 -0
- package/dist/components/Separator/index.d.ts.map +1 -0
- package/dist/components/Separator/index.js +6 -0
- package/dist/components/Separator/index.js.map +1 -0
- 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.d.ts +2 -0
- package/dist/components/Sheet/index.d.ts.map +1 -0
- package/dist/components/Sheet/index.js +17 -0
- package/dist/components/Sheet/index.js.map +1 -0
- package/dist/components/Sheet/sheet.d.ts +6 -5
- package/dist/components/Sheet/sheet.d.ts.map +1 -1
- package/dist/components/Sheet/sheet.js +1 -1
- package/dist/components/Sheet/sheet.js.map +1 -1
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/index.d.ts.map +1 -0
- package/dist/components/Sidebar/index.js +24 -0
- package/dist/components/Sidebar/index.js.map +1 -0
- package/dist/components/Sidebar/sidebar.d.ts +2 -2
- package/dist/components/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/sidebar.js +9 -5
- package/dist/components/Sidebar/sidebar.js.map +1 -1
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Skeleton/index.js +6 -0
- package/dist/components/Skeleton/index.js.map +1 -0
- package/dist/components/Skeleton/skeleton.d.ts +1 -1
- package/dist/components/Skeleton/skeleton.js +2 -1
- package/dist/components/Skeleton/skeleton.js.map +1 -1
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/index.js +7 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/slider.d.ts +6 -6
- package/dist/components/Slider/slider.d.ts.map +1 -1
- package/dist/components/Slider/slider.js +25 -10
- package/dist/components/Slider/slider.js.map +1 -1
- package/dist/components/Steps/index.d.ts +2 -0
- package/dist/components/Steps/index.d.ts.map +1 -0
- package/dist/components/Steps/index.js +12 -0
- package/dist/components/Steps/index.js.map +1 -0
- package/dist/components/Steps/steps.d.ts +2 -2
- package/dist/components/Steps/steps.d.ts.map +1 -1
- package/dist/components/Steps/steps.js +48 -23
- package/dist/components/Steps/steps.js.map +1 -1
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Switch/index.js +7 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/switch.d.ts +16 -14
- package/dist/components/Switch/switch.d.ts.map +1 -1
- package/dist/components/Switch/switch.js +46 -17
- package/dist/components/Switch/switch.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +10 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/tabs.d.ts +5 -5
- package/dist/components/Tabs/tabs.d.ts.map +1 -1
- package/dist/components/Tabs/tabs.js +14 -7
- package/dist/components/Tabs/tabs.js.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Tag/index.js +7 -0
- package/dist/components/Tag/index.js.map +1 -0
- package/dist/components/Tag/tag.d.ts +37 -23
- package/dist/components/Tag/tag.d.ts.map +1 -1
- package/dist/components/Tag/tag.js +39 -44
- package/dist/components/Tag/tag.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Textarea/index.js +7 -0
- package/dist/components/Textarea/index.js.map +1 -0
- package/dist/components/Textarea/textarea.d.ts +5 -10
- package/dist/components/Textarea/textarea.d.ts.map +1 -1
- package/dist/components/Textarea/textarea.js +14 -12
- package/dist/components/Textarea/textarea.js.map +1 -1
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/TimePicker/index.d.ts.map +1 -0
- package/dist/components/TimePicker/index.js +6 -0
- package/dist/components/TimePicker/index.js.map +1 -0
- package/dist/components/TimePicker/time-columns.d.ts.map +1 -1
- package/dist/components/TimePicker/time-columns.js +4 -1
- package/dist/components/TimePicker/time-columns.js.map +1 -1
- package/dist/components/TimePicker/time-picker.d.ts +2 -1
- package/dist/components/TimePicker/time-picker.d.ts.map +1 -1
- package/dist/components/TimePicker/time-picker.js +33 -32
- package/dist/components/TimePicker/time-picker.js.map +1 -1
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/index.js +7 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toast/toast.d.ts +1 -1
- package/dist/components/Toast/toast.js +2 -2
- package/dist/components/Toast/toast.js.map +1 -1
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/components/Tooltip/index.js +9 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/Tooltip/tooltip.d.ts +1 -1
- package/dist/components/Tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/tooltip.js +2 -1
- package/dist/components/Tooltip/tooltip.js.map +1 -1
- package/dist/components/TreeView/index.d.ts +2 -0
- package/dist/components/TreeView/index.d.ts.map +1 -0
- package/dist/components/TreeView/index.js +8 -0
- package/dist/components/TreeView/index.js.map +1 -0
- package/dist/components/TreeView/tree-view.d.ts +11 -11
- package/dist/components/TreeView/tree-view.d.ts.map +1 -1
- package/dist/components/TreeView/tree-view.js +36 -9
- package/dist/components/TreeView/tree-view.js.map +1 -1
- 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/index.d.ts +57 -67
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -59
- package/dist/index.js.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +3 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js +1950 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
- package/dist/patterns/element-anatomy/index.d.ts +2 -0
- package/dist/patterns/element-anatomy/index.d.ts.map +1 -0
- package/dist/patterns/element-anatomy/index.js +20 -0
- package/dist/patterns/element-anatomy/index.js.map +1 -0
- package/dist/patterns/element-anatomy/item-anatomy.d.ts +9 -5
- package/dist/patterns/element-anatomy/item-anatomy.d.ts.map +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.js +1 -1
- package/dist/patterns/element-anatomy/item-anatomy.js.map +1 -1
- package/dist/patterns/header-canonical/chrome-header.d.ts +13 -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.d.ts +2 -0
- package/dist/patterns/header-canonical/index.d.ts.map +1 -0
- package/dist/patterns/header-canonical/index.js +6 -0
- package/dist/patterns/header-canonical/index.js.map +1 -0
- package/dist/patterns/horizontal-overflow/index.d.ts +2 -0
- package/dist/patterns/horizontal-overflow/index.d.ts.map +1 -0
- package/dist/patterns/horizontal-overflow/index.js +14 -0
- package/dist/patterns/horizontal-overflow/index.js.map +1 -0
- package/dist/patterns/overlay-surface/index.d.ts +2 -0
- package/dist/patterns/overlay-surface/index.d.ts.map +1 -0
- package/dist/patterns/overlay-surface/index.js +8 -0
- package/dist/patterns/overlay-surface/index.js.map +1 -0
- package/dist/patterns/overlay-surface/overlay-surface.d.ts +11 -2
- package/dist/patterns/overlay-surface/overlay-surface.d.ts.map +1 -1
- package/dist/patterns/overlay-surface/overlay-surface.js +5 -2
- package/dist/patterns/overlay-surface/overlay-surface.js.map +1 -1
- package/dist/patterns/resize-handle/index.d.ts +2 -0
- package/dist/patterns/resize-handle/index.d.ts.map +1 -0
- package/dist/patterns/resize-handle/index.js +5 -0
- package/dist/patterns/resize-handle/index.js.map +1 -0
- 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 +110 -0
- package/dist/tokens/categorical-color.js.map +1 -0
- package/dist/tokens/motion/motion.d.ts +1 -1
- package/dist/tokens/motion/motion.d.ts.map +1 -1
- package/dist/tokens/motion/motion.js.map +1 -1
- package/dist/tokens/uiSize/icon-size.d.ts +1 -2
- package/dist/tokens/uiSize/icon-size.d.ts.map +1 -1
- package/ds-canonical/commands/README.md +26 -0
- package/ds-canonical/commands/gov-status.md +79 -0
- package/ds-canonical/fork/governance.lock +222 -0
- package/ds-canonical/fork/hooks/block_prototype_imports.py +111 -0
- package/ds-canonical/fork/hooks/check_chrome_header_avatar_canonical.sh +95 -0
- package/ds-canonical/fork/hooks/check_consumer_app_invariants.sh +349 -0
- package/ds-canonical/fork/hooks/check_ds_anchor_preflight.sh +132 -0
- package/ds-canonical/fork/hooks/check_escape_marker_abuse.sh +140 -0
- package/ds-canonical/fork/hooks/check_field_family_invariants.sh +250 -0
- package/ds-canonical/fork/hooks/check_fork_product_quality.sh +36 -0
- package/ds-canonical/fork/hooks/check_item_list_gap.sh +54 -0
- package/ds-canonical/fork/hooks/check_layout_space_magic_numbers.sh +96 -0
- package/ds-canonical/fork/hooks/check_opacity_token_usage.sh +149 -0
- package/ds-canonical/fork/hooks/check_pattern_invariants.sh +196 -0
- package/ds-canonical/fork/hooks/check_sidebar_menu_button_implicit_wrap.sh +86 -0
- package/ds-canonical/fork/hooks/check_tabs_content_chrome_body_double_gap.sh +183 -0
- package/ds-canonical/fork/hooks/check_tailwind_wildcard_in_docs.sh +79 -0
- package/ds-canonical/fork/hooks/inject_deploy_url_after_push.sh +238 -0
- package/ds-canonical/fork/launchers/fork-governance-dispatcher.sh +44 -0
- package/ds-canonical/fork/launchers/inject_fork_governance_preamble.sh +54 -0
- package/ds-canonical/fork/launchers/settings-hooks.json +58 -0
- package/ds-canonical/fork/manifest.json +98 -0
- package/ds-canonical/fork/preamble.md +495 -0
- package/ds-canonical/fork/skills/bug-fix-rhythm/SKILL.md +183 -0
- package/ds-canonical/fork/skills/code-quality-audit/SKILL.md +65 -0
- package/ds-canonical/fork/skills/delivery-handoff/SKILL.md +229 -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/performance-audit/SKILL.md +107 -0
- package/ds-canonical/fork/skills/product-ui-audit/SKILL.md +232 -0
- package/ds-canonical/fork/skills/product-ui-audit/references/audit-checks.md +246 -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 +159 -0
- package/ds-canonical/fork/skills/propose-options/SKILL.md +177 -0
- package/ds-canonical/fork/skills/prototype/SKILL.md +244 -0
- package/ds-canonical/fork/skills/prototype/references/audit-checks.md +38 -0
- package/ds-canonical/fork/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/fork/skills/prototype/references/checkpoints.md +191 -0
- package/ds-canonical/fork/skills/prototype/references/evaluation-matrix.md +141 -0
- package/ds-canonical/fork/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/fork/skills/prototype/references/proposal-template.md +229 -0
- package/ds-canonical/fork/skills/scan-similar-bugs/SKILL.md +200 -0
- package/ds-canonical/fork/skills/ux-audit/SKILL.md +130 -0
- package/ds-canonical/fork/skills/visual-audit/SKILL.md +247 -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 +145 -0
- package/ds-canonical/hooks/_log-fire.sh +46 -0
- package/ds-canonical/hooks/auto_regen_ds_barrel.sh +58 -0
- package/ds-canonical/hooks/block_prototype_imports.py +111 -0
- package/ds-canonical/hooks/check_audit_post_report_validator.sh +156 -0
- package/ds-canonical/hooks/check_audit_sample_escape.sh +76 -0
- package/ds-canonical/hooks/check_benchmark_citation.sh +106 -0
- package/ds-canonical/hooks/check_canonical_propagation.sh +189 -0
- package/ds-canonical/hooks/check_chrome_header_avatar_canonical.sh +95 -0
- package/ds-canonical/hooks/check_codex_brief_invariants.sh +115 -0
- package/ds-canonical/hooks/check_codex_collab_5step.sh +108 -0
- package/ds-canonical/hooks/check_consumer_app_invariants.sh +349 -0
- package/ds-canonical/hooks/check_datatable_invariants.sh +180 -0
- package/ds-canonical/hooks/check_dim_count_drift.sh +72 -0
- package/ds-canonical/hooks/check_ds_anchor_preflight.sh +132 -0
- package/ds-canonical/hooks/check_escape_marker_abuse.sh +140 -0
- package/ds-canonical/hooks/check_field_controls_contracts.sh +137 -0
- package/ds-canonical/hooks/check_field_family_invariants.sh +250 -0
- package/ds-canonical/hooks/check_file_size_budget.sh +60 -0
- package/ds-canonical/hooks/check_full_story_visual_interaction_sweep.sh +71 -0
- package/ds-canonical/hooks/check_item_list_gap.sh +54 -0
- package/ds-canonical/hooks/check_layout_space_magic_numbers.sh +96 -0
- package/ds-canonical/hooks/check_main_branch_workbench.sh +93 -0
- package/ds-canonical/hooks/check_naming_and_abstraction.sh +165 -0
- package/ds-canonical/hooks/check_opacity_token_usage.sh +149 -0
- package/ds-canonical/hooks/check_orphan_ds_css.sh +66 -0
- package/ds-canonical/hooks/check_overlay_open_focus_escape_probe.sh +75 -0
- package/ds-canonical/hooks/check_pattern_invariants.sh +196 -0
- package/ds-canonical/hooks/check_peoplepicker_ssot_drift.sh +56 -0
- package/ds-canonical/hooks/check_pixel_quantified_audit.sh +53 -0
- package/ds-canonical/hooks/check_plugin_fork_health.sh +137 -0
- package/ds-canonical/hooks/check_post_main_ssot_propagate.sh +90 -0
- package/ds-canonical/hooks/check_propose_discipline.sh +147 -0
- package/ds-canonical/hooks/check_propose_pre_grep_verify.sh +70 -0
- package/ds-canonical/hooks/check_propose_without_benchmark.sh +63 -0
- package/ds-canonical/hooks/check_select_all_canonical.sh +58 -0
- package/ds-canonical/hooks/check_sidebar_menu_button_implicit_wrap.sh +86 -0
- package/ds-canonical/hooks/check_solo_workflow.sh +317 -0
- package/ds-canonical/hooks/check_spec_class_drift.sh +88 -0
- package/ds-canonical/hooks/check_story_invariants.sh +748 -0
- package/ds-canonical/hooks/check_storybook_addon_packaging.sh +151 -0
- package/ds-canonical/hooks/check_substantive_edit_approval_preflight.sh +110 -0
- package/ds-canonical/hooks/check_tabs_content_chrome_body_double_gap.sh +183 -0
- package/ds-canonical/hooks/check_tailwind_wildcard_in_docs.sh +79 -0
- package/ds-canonical/hooks/check_wrapper_primitive_schema_drift.sh +104 -0
- package/ds-canonical/hooks/chrome_header_dispatcher.sh +56 -0
- package/ds-canonical/hooks/enforce_home_charter.sh +44 -0
- package/ds-canonical/hooks/inject_deploy_url_after_push.sh +238 -0
- package/ds-canonical/hooks/inject_pending_self_audit.sh +248 -0
- package/ds-canonical/hooks/lib/_app_shell_primary_header_consistency.sh +100 -0
- package/ds-canonical/hooks/lib/_approval_re.sh +33 -0
- package/ds-canonical/hooks/lib/_chrome_header_handcraft.sh +75 -0
- package/ds-canonical/hooks/lib/_code_quality.sh +73 -0
- package/ds-canonical/hooks/lib/_cva_default_sync.sh +69 -0
- package/ds-canonical/hooks/lib/_governance_coverage_check.sh +49 -0
- package/ds-canonical/hooks/lib/_hardcoded_strings.sh +163 -0
- package/ds-canonical/hooks/lib/_header_with_tabs_border.sh +87 -0
- package/ds-canonical/hooks/lib/_layout_space_canonical.sh +56 -0
- package/ds-canonical/hooks/lib/_overlay_handcraft.sh +162 -0
- package/ds-canonical/hooks/lib/_person_data_richness.sh +42 -0
- package/ds-canonical/hooks/lib/_story_compile_drift.sh +48 -0
- package/ds-canonical/hooks/lib/_tab_lg_chrome_header_equal.sh +70 -0
- package/ds-canonical/hooks/lib/_token_hygiene.sh +104 -0
- package/ds-canonical/hooks/log_governance_fires.sh +50 -0
- package/ds-canonical/hooks/log_skill_invokes.sh +41 -0
- package/ds-canonical/hooks/post_edit_dispatcher.sh +62 -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/retired/2026-06-11-prune-merge/check_propose_plain_chinese.sh +74 -0
- package/ds-canonical/hooks/retired/2026-06-11-prune-merge/check_storybook_addon_preset_cjs.sh +87 -0
- package/ds-canonical/hooks/retired/check_anatomy_section_numbering.sh +106 -0
- package/ds-canonical/hooks/retired/check_avatar_hovercard.sh +90 -0
- package/ds-canonical/hooks/retired/check_button_icon_literal.sh.retired-2026-04-28 +38 -0
- package/ds-canonical/hooks/retired/check_container_breathing.sh +142 -0
- package/ds-canonical/hooks/retired/check_governance_compliance.sh +61 -0
- package/ds-canonical/hooks/retired/check_icon_only_padding_formula.sh +104 -0
- package/ds-canonical/hooks/retired/check_item_content_primitive.sh +150 -0
- package/ds-canonical/hooks/retired/check_item_list_gap.sh +153 -0
- package/ds-canonical/hooks/retired/check_sideoffset_canonical.sh +65 -0
- package/ds-canonical/hooks/retired/check_spec_iteration_tag.sh +87 -0
- package/ds-canonical/hooks/retired/check_ssot_consultation.sh +88 -0
- package/ds-canonical/hooks/retired/check_sync_update.sh +20 -0
- package/ds-canonical/hooks/retired/check_third_party_dom_verified.sh +95 -0
- package/ds-canonical/hooks/retired/enforce_home_charter.sh +125 -0
- package/ds-canonical/hooks/retired/post_edit_canonical_interrogate.sh +109 -0
- package/ds-canonical/hooks/retired/pre_edit_spec_check.sh +68 -0
- package/ds-canonical/hooks/retired/pre_new_component_spec.sh +39 -0
- package/ds-canonical/hooks/retired/pre_write_subsumption_check.sh +112 -0
- package/ds-canonical/hooks/retired/stop_meta_self_audit.sh.retired-2026-05-13 +76 -0
- package/ds-canonical/hooks/retired/tests/test_check_anatomy_section_numbering.sh +14 -0
- package/ds-canonical/hooks/retired/tests/test_check_avatar_hovercard.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_container_breathing.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_governance_compliance.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_icon_only_padding_formula.sh +79 -0
- package/ds-canonical/hooks/retired/tests/test_check_item_content_primitive.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_item_list_gap.sh +163 -0
- package/ds-canonical/hooks/retired/tests/test_check_sideoffset_canonical.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_spec_iteration_tag.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_ssot_consultation.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_check_sync_update.sh +14 -0
- package/ds-canonical/hooks/retired/tests/test_check_third_party_dom_verified.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_enforce_home_charter.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_pre_edit_spec_check.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_pre_new_component_spec.sh +15 -0
- package/ds-canonical/hooks/retired/tests/test_pre_write_subsumption_check.sh +63 -0
- package/ds-canonical/hooks/session_start_governance_check.sh +310 -0
- package/ds-canonical/hooks/stop_passive_logging.sh +322 -0
- package/ds-canonical/hooks/stop_self_audit.sh +516 -0
- package/ds-canonical/hooks/tests/KNOWN-BROKEN.md +15 -0
- package/ds-canonical/hooks/tests/run-all.sh +76 -0
- package/ds-canonical/hooks/tests/test_auto_regen_ds_barrel.sh +180 -0
- package/ds-canonical/hooks/tests/test_block_prototype_imports.sh +143 -0
- 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 +196 -0
- package/ds-canonical/hooks/tests/test_check_audit_post_report_validator.sh +127 -0
- package/ds-canonical/hooks/tests/test_check_audit_sample_escape.sh +93 -0
- package/ds-canonical/hooks/tests/test_check_benchmark_citation.sh +115 -0
- package/ds-canonical/hooks/tests/test_check_canonical_propagation.sh +133 -0
- 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 +146 -0
- package/ds-canonical/hooks/tests/test_check_code_quality.sh +15 -0
- package/ds-canonical/hooks/tests/test_check_codex_brief_invariants.sh +208 -0
- package/ds-canonical/hooks/tests/test_check_codex_collab_5step.sh +96 -0
- package/ds-canonical/hooks/tests/test_check_consumer_app_invariants.sh +12 -0
- package/ds-canonical/hooks/tests/test_check_consumer_app_story_title.sh +164 -0
- package/ds-canonical/hooks/tests/test_check_consumer_ds_primitive_misuse.sh +240 -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 +202 -0
- package/ds-canonical/hooks/tests/test_check_cva_default_sync.sh +15 -0
- package/ds-canonical/hooks/tests/test_check_data_table_size_num_to_meta_width.sh +53 -0
- package/ds-canonical/hooks/tests/test_check_datatable_invariants.sh +122 -0
- package/ds-canonical/hooks/tests/test_check_dim_count_drift.sh +98 -0
- package/ds-canonical/hooks/tests/test_check_ds_anchor_preflight.sh +104 -0
- package/ds-canonical/hooks/tests/test_check_escape_marker_abuse.sh +192 -0
- package/ds-canonical/hooks/tests/test_check_field_controls_contracts.sh +126 -0
- package/ds-canonical/hooks/tests/test_check_field_family_invariants.sh +203 -0
- package/ds-canonical/hooks/tests/test_check_file_size_budget.sh +32 -0
- package/ds-canonical/hooks/tests/test_check_fork_user_plugin_install.sh +46 -0
- package/ds-canonical/hooks/tests/test_check_full_story_visual_interaction_sweep.sh +190 -0
- package/ds-canonical/hooks/tests/test_check_hardcoded_strings.sh +14 -0
- package/ds-canonical/hooks/tests/test_check_header_with_tabs_border.sh +110 -0
- package/ds-canonical/hooks/tests/test_check_item_list_gap.sh +44 -0
- package/ds-canonical/hooks/tests/test_check_layout_space_canonical.sh +73 -0
- package/ds-canonical/hooks/tests/test_check_layout_space_magic_numbers.sh +206 -0
- package/ds-canonical/hooks/tests/test_check_main_branch_workbench.sh +147 -0
- package/ds-canonical/hooks/tests/test_check_naming_and_abstraction.sh +136 -0
- package/ds-canonical/hooks/tests/test_check_opacity_token_usage.sh +110 -0
- package/ds-canonical/hooks/tests/test_check_orphan_ds_css.sh +212 -0
- package/ds-canonical/hooks/tests/test_check_overlay_handcraft.sh +126 -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 +148 -0
- package/ds-canonical/hooks/tests/test_check_peoplepicker_ssot_drift.sh +108 -0
- package/ds-canonical/hooks/tests/test_check_person_data_richness.sh +58 -0
- package/ds-canonical/hooks/tests/test_check_pixel_quantified_audit.sh +142 -0
- package/ds-canonical/hooks/tests/test_check_plugin_fork_health.sh +9 -0
- package/ds-canonical/hooks/tests/test_check_propose_cite_required.sh +181 -0
- package/ds-canonical/hooks/tests/test_check_propose_discipline.sh +10 -0
- package/ds-canonical/hooks/tests/test_check_propose_plain_chinese.sh +127 -0
- package/ds-canonical/hooks/tests/test_check_propose_pre_grep_verify.sh +117 -0
- package/ds-canonical/hooks/tests/test_check_propose_without_benchmark.sh +55 -0
- package/ds-canonical/hooks/tests/test_check_select_all_canonical.sh +125 -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 +201 -0
- package/ds-canonical/hooks/tests/test_check_spec_class_drift.sh +135 -0
- package/ds-canonical/hooks/tests/test_check_story_anatomy.sh.broken +197 -0
- package/ds-canonical/hooks/tests/test_check_story_category.sh.broken +187 -0
- package/ds-canonical/hooks/tests/test_check_story_compile_drift.sh +15 -0
- package/ds-canonical/hooks/tests/test_check_story_invariants.sh +384 -0
- package/ds-canonical/hooks/tests/test_check_story_name_jargon.sh.broken +53 -0
- package/ds-canonical/hooks/tests/test_check_story_slot_split.sh +156 -0
- package/ds-canonical/hooks/tests/test_check_storybook_addon_packaging.sh +10 -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 +176 -0
- package/ds-canonical/hooks/tests/test_check_tab_lg_chrome_header_equal.sh +141 -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 +21 -0
- package/ds-canonical/hooks/tests/test_check_wrapper_primitive_schema_drift.sh +169 -0
- package/ds-canonical/hooks/tests/test_enforce_home_charter.sh +77 -0
- package/ds-canonical/hooks/tests/test_inject_deploy_url_after_push.sh +193 -0
- package/ds-canonical/hooks/tests/test_inject_pending_self_audit.sh +125 -0
- package/ds-canonical/hooks/tests/test_log_governance_fires.sh +10 -0
- package/ds-canonical/hooks/tests/test_log_skill_invokes.sh +7 -0
- package/ds-canonical/hooks/tests/test_post_edit_dispatcher.sh +108 -0
- package/ds-canonical/hooks/tests/test_session_start_governance_check.sh +154 -0
- package/ds-canonical/hooks/tests/test_stop_capture_metrics.sh +95 -0
- package/ds-canonical/hooks/tests/test_stop_governance_drift_check.sh.broken +125 -0
- package/ds-canonical/hooks/tests/test_stop_harvest_corrections.sh +10 -0
- package/ds-canonical/hooks/tests/test_stop_passive_logging.sh +100 -0
- package/ds-canonical/hooks/tests/test_stop_self_audit.sh +98 -0
- package/ds-canonical/hooks/tests/test_stop_tsc_sanity.sh +10 -0
- package/ds-canonical/references/README.md +46 -0
- package/ds-canonical/references/audit-coverage-vs-24-checklist.md +74 -0
- package/ds-canonical/references/build-ui-canonicals.md +72 -0
- package/ds-canonical/references/composition-fidelity.md +47 -0
- package/ds-canonical/references/cva-patterns.md +41 -0
- package/ds-canonical/references/drag-canonical.md +331 -0
- package/ds-canonical/references/item-anatomy-recipe.md +225 -0
- package/ds-canonical/references/naming-conventions.md +57 -0
- package/ds-canonical/references/principle-dim-map.json +513 -0
- package/ds-canonical/references/props-naming.md +59 -0
- package/ds-canonical/references/scenario-definition.md +146 -0
- package/ds-canonical/references/spec-rules.md +58 -0
- package/ds-canonical/references/ssot-consultation.md +63 -0
- package/ds-canonical/references/ssot-index.md +40 -0
- package/ds-canonical/references/story-baseline-registry.json +107 -0
- package/ds-canonical/references/structural-token-retention.md +42 -0
- package/ds-canonical/references/tailwind-gotchas.md +87 -0
- package/ds-canonical/references/ui-dev-rules.md +81 -0
- package/ds-canonical/rules/README.md +34 -0
- package/ds-canonical/rules/meta-patterns.md +87 -0
- package/ds-canonical/rules/self-verify.md +56 -0
- package/ds-canonical/rules/spec-rules.md +25 -0
- package/ds-canonical/rules/story-rules.md +67 -0
- package/ds-canonical/rules/ui-development.md +92 -0
- package/ds-canonical/skills/README.md +88 -0
- package/ds-canonical/skills/bug-fix-rhythm/SKILL.md +181 -0
- package/ds-canonical/skills/code-quality-audit/SKILL.md +63 -0
- package/ds-canonical/skills/codex-collab/SKILL.md +249 -0
- package/ds-canonical/skills/codex-collab/references/brief-template.md +48 -0
- package/ds-canonical/skills/codex-collab/references/transport.md +58 -0
- package/ds-canonical/skills/codify-corrections/SKILL.md +184 -0
- package/ds-canonical/skills/codify-principle/SKILL.md +151 -0
- package/ds-canonical/skills/component-quality-gate/SKILL.md +102 -0
- package/ds-canonical/skills/component-quality-gate/references/checklist.md +79 -0
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +254 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-a-workflow.md +123 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/phase-b-codex-brief.md +186 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/skill-relationships-antipatterns-benchmarks.md +30 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/triage-rubric.md +69 -0
- package/ds-canonical/skills/deep-audit-cross-codex/references/upstream-directives-r-mapping.md +33 -0
- package/ds-canonical/skills/delivery-handoff/SKILL.md +229 -0
- package/ds-canonical/skills/delivery-handoff/references/flow-diagram.md +180 -0
- package/ds-canonical/skills/delivery-handoff/references/handoff-template.md +177 -0
- package/ds-canonical/skills/delivery-handoff/references/inventory-checklist.md +196 -0
- package/ds-canonical/skills/design-system-audit/SKILL.md +386 -0
- package/ds-canonical/skills/design-system-audit/references/audit-prompts.md +1325 -0
- package/ds-canonical/skills/design-system-audit/references/checkpoints.md +240 -0
- package/ds-canonical/skills/design-system-audit/references/historical-bugs.md +240 -0
- package/ds-canonical/skills/design-system-audit/references/principle-audit-protocol.md +378 -0
- package/ds-canonical/skills/design-system-audit/references/rule-placement.md +175 -0
- package/ds-canonical/skills/ensure-canonical/SKILL.md +196 -0
- package/ds-canonical/skills/governance-health/SKILL.md +147 -0
- package/ds-canonical/skills/knowledge-prune/SKILL.md +250 -0
- package/ds-canonical/skills/knowledge-prune/references/phase-z-cross-repo-ssot-propagation.md +11 -0
- package/ds-canonical/skills/knowledge-prune/references/prune-dimensions-d5-d10.md +55 -0
- package/ds-canonical/skills/knowledge-prune/references/world-class-prune-alignment.md +7 -0
- package/ds-canonical/skills/new-component/SKILL.md +170 -0
- package/ds-canonical/skills/new-component/references/new-component-checklist.md +85 -0
- package/ds-canonical/skills/performance-audit/SKILL.md +107 -0
- package/ds-canonical/skills/product-ui-audit/SKILL.md +230 -0
- package/ds-canonical/skills/product-ui-audit/references/audit-checks.md +246 -0
- package/ds-canonical/skills/product-ui-audit/references/common-misuses.md +329 -0
- package/ds-canonical/skills/product-ui-audit/references/report-template.md +159 -0
- package/ds-canonical/skills/propose-options/SKILL.md +177 -0
- package/ds-canonical/skills/prototype/SKILL.md +244 -0
- package/ds-canonical/skills/prototype/references/audit-checks.md +37 -0
- package/ds-canonical/skills/prototype/references/benchmark-sources.md +94 -0
- package/ds-canonical/skills/prototype/references/checkpoints.md +191 -0
- package/ds-canonical/skills/prototype/references/evaluation-matrix.md +141 -0
- package/ds-canonical/skills/prototype/references/ooux-template.md +198 -0
- package/ds-canonical/skills/prototype/references/proposal-template.md +229 -0
- package/ds-canonical/skills/scan-similar-bugs/SKILL.md +198 -0
- package/ds-canonical/skills/story-auto-compile-migrate/SKILL.md +159 -0
- package/ds-canonical/skills/story-writing/SKILL.md +122 -0
- package/ds-canonical/skills/story-writing/references/anatomy-standard.md +217 -0
- package/ds-canonical/skills/story-writing/references/category-templates.md +174 -0
- package/ds-canonical/skills/story-writing/references/example-selection.md +70 -0
- package/ds-canonical/skills/story-writing/references/self-check.md +20 -0
- package/ds-canonical/skills/ux-audit/SKILL.md +130 -0
- package/ds-canonical/skills/visual-audit/SKILL.md +245 -0
- package/ds-canonical/skills/visual-audit/output/.gitkeep +0 -0
- package/ds-canonical/skills/visual-audit/references/audit-architecture.md +100 -0
- package/ds-canonical/skills/visual-audit/references/visual-checklist.md +297 -0
- package/ds-canonical/skills/visual-audit/references/world-class-benchmarks.md +198 -0
- package/ds-canonical/templates/_README.md +23 -0
- package/ds-canonical/templates/dashboard-app.tsx +161 -0
- package/ds-story-manifest.json +1684 -0
- package/llms-full.txt +414 -0
- package/llms.txt +70 -0
- package/package.json +31 -8
- package/src/components/Accordion/accordion.anatomy.stories.tsx +496 -0
- package/src/components/Accordion/accordion.principles.stories.tsx +360 -0
- package/src/components/Accordion/accordion.spec.md +131 -0
- package/src/components/Accordion/accordion.stories.tsx +190 -0
- package/src/components/Accordion/accordion.tsx +4 -1
- package/src/components/Accordion/index.ts +5 -0
- package/src/components/Alert/alert.anatomy.stories.tsx +238 -0
- package/src/components/Alert/alert.principles.stories.tsx +220 -0
- package/src/components/Alert/alert.spec.md +202 -0
- package/src/components/Alert/alert.stories.tsx +139 -0
- package/src/components/Alert/alert.tsx +9 -6
- package/src/components/Alert/index.ts +5 -0
- package/src/components/AppShell/_demo-helpers.tsx +87 -11
- package/src/components/AppShell/app-shell.anatomy.stories.tsx +176 -0
- package/src/components/AppShell/app-shell.principles.stories.tsx +140 -0
- package/src/components/AppShell/app-shell.spec.md +357 -0
- package/src/components/AppShell/app-shell.stories.tsx +442 -0
- package/src/components/AppShell/app-shell.tsx +15 -9
- package/src/components/AppShell/index.ts +5 -0
- 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 +148 -0
- package/src/components/AspectRatio/aspect-ratio.stories.tsx +170 -0
- package/src/components/AspectRatio/aspect-ratio.tsx +4 -2
- package/src/components/AspectRatio/index.ts +5 -0
- package/src/components/Avatar/avatar.anatomy.stories.tsx +701 -0
- package/src/components/Avatar/avatar.principles.stories.tsx +245 -0
- package/src/components/Avatar/avatar.spec.md +312 -0
- package/src/components/Avatar/avatar.stories.tsx +135 -0
- package/src/components/Avatar/avatar.tsx +45 -46
- package/src/components/Avatar/index.ts +5 -0
- 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 +398 -0
- package/src/components/Badge/badge.stories.tsx +80 -0
- package/src/components/Badge/badge.tsx +34 -13
- package/src/components/Badge/index.ts +5 -0
- package/src/components/Breadcrumb/breadcrumb.anatomy.stories.tsx +458 -0
- package/src/components/Breadcrumb/breadcrumb.principles.stories.tsx +343 -0
- package/src/components/Breadcrumb/breadcrumb.spec.md +268 -0
- package/src/components/Breadcrumb/breadcrumb.stories.tsx +307 -0
- package/src/components/Breadcrumb/breadcrumb.tsx +2 -2
- package/src/components/Breadcrumb/index.ts +5 -0
- package/src/components/BulkActionBar/bulk-action-bar.anatomy.stories.tsx +224 -0
- package/src/components/BulkActionBar/bulk-action-bar.principles.stories.tsx +242 -0
- package/src/components/BulkActionBar/bulk-action-bar.spec.md +226 -0
- package/src/components/BulkActionBar/bulk-action-bar.stories.tsx +136 -0
- package/src/components/BulkActionBar/bulk-action-bar.tsx +13 -11
- package/src/components/BulkActionBar/index.ts +5 -0
- package/src/components/Button/button.anatomy.stories.tsx +710 -0
- package/src/components/Button/button.principles.stories.tsx +370 -0
- package/src/components/Button/button.spec.md +463 -0
- package/src/components/Button/button.stories.tsx +362 -0
- package/src/components/Button/button.tsx +25 -28
- package/src/components/Button/index.ts +5 -0
- package/src/components/Calendar/calendar.anatomy.stories.tsx +218 -0
- package/src/components/Calendar/calendar.principles.stories.tsx +143 -0
- package/src/components/Calendar/calendar.spec.md +264 -0
- package/src/components/Calendar/calendar.stories.tsx +88 -0
- package/src/components/Calendar/calendar.tsx +54 -40
- package/src/components/Calendar/index.ts +5 -0
- package/src/components/Carousel/carousel.anatomy.stories.tsx +516 -0
- package/src/components/Carousel/carousel.principles.stories.tsx +330 -0
- package/src/components/Carousel/carousel.spec.md +273 -0
- package/src/components/Carousel/carousel.stories.tsx +121 -0
- package/src/components/Carousel/carousel.tsx +26 -7
- package/src/components/Carousel/index.ts +5 -0
- package/src/components/Chart/chart.anatomy.stories.tsx +307 -0
- package/src/components/Chart/chart.principles.stories.tsx +436 -0
- package/src/components/Chart/chart.spec.md +174 -0
- package/src/components/Chart/chart.stories.tsx +268 -0
- package/src/components/Chart/chart.tsx +5 -2
- package/src/components/Chart/index.ts +5 -0
- package/src/components/Checkbox/checkbox-group.tsx +2 -1
- package/src/components/Checkbox/checkbox.anatomy.stories.tsx +626 -0
- package/src/components/Checkbox/checkbox.principles.stories.tsx +216 -0
- package/src/components/Checkbox/checkbox.spec.md +372 -0
- package/src/components/Checkbox/checkbox.stories.tsx +114 -0
- package/src/components/Checkbox/checkbox.tsx +80 -22
- package/src/components/Checkbox/index.ts +5 -0
- package/src/components/Chip/chip.anatomy.stories.tsx +422 -0
- package/src/components/Chip/chip.principles.stories.tsx +228 -0
- package/src/components/Chip/chip.spec.md +237 -0
- package/src/components/Chip/chip.stories.tsx +88 -0
- package/src/components/Chip/chip.tsx +6 -6
- package/src/components/Chip/index.ts +5 -0
- package/src/components/CircularProgress/circular-progress.anatomy.stories.tsx +176 -0
- package/src/components/CircularProgress/circular-progress.principles.stories.tsx +258 -0
- package/src/components/CircularProgress/circular-progress.spec.md +267 -0
- package/src/components/CircularProgress/circular-progress.stories.tsx +153 -0
- package/src/components/CircularProgress/circular-progress.tsx +4 -5
- package/src/components/CircularProgress/index.ts +5 -0
- package/src/components/Coachmark/coachmark-story-helpers.tsx +39 -0
- package/src/components/Coachmark/coachmark.anatomy.stories.tsx +356 -0
- package/src/components/Coachmark/coachmark.principles.stories.tsx +355 -0
- package/src/components/Coachmark/coachmark.spec.md +238 -0
- package/src/components/Coachmark/coachmark.stories.tsx +214 -0
- package/src/components/Coachmark/coachmark.tsx +16 -7
- package/src/components/Coachmark/index.ts +5 -0
- package/src/components/Combobox/combobox.anatomy.stories.tsx +919 -0
- package/src/components/Combobox/combobox.principles.stories.tsx +239 -0
- package/src/components/Combobox/combobox.spec.md +202 -0
- package/src/components/Combobox/combobox.stories.tsx +184 -0
- package/src/components/Combobox/combobox.tsx +86 -39
- package/src/components/Combobox/index.ts +5 -0
- package/src/components/Command/command.anatomy.stories.tsx +107 -0
- package/src/components/Command/command.principles.stories.tsx +88 -0
- package/src/components/Command/command.spec.md +181 -0
- package/src/components/Command/command.stories.tsx +280 -0
- package/src/components/Command/command.tsx +13 -8
- package/src/components/Command/index.ts +5 -0
- package/src/components/DataTable/cell-registry.tsx +19 -6
- package/src/components/DataTable/data-table-filter-panel.tsx +8 -8
- package/src/components/DataTable/data-table-sort-manager.tsx +4 -4
- package/src/components/DataTable/data-table.anatomy.stories.tsx +519 -0
- package/src/components/DataTable/data-table.css +1 -1
- package/src/components/DataTable/data-table.principles.stories.tsx +265 -0
- package/src/components/DataTable/data-table.spec.md +540 -0
- package/src/components/DataTable/data-table.stories.tsx +1941 -0
- package/src/components/DataTable/data-table.tsx +121 -53
- package/src/components/DataTable/filter-operators.spec.md +267 -0
- package/src/components/DataTable/filter-operators.ts +1 -1
- package/src/components/DataTable/filter-tree.ts +2 -2
- package/src/components/DataTable/index.ts +5 -0
- package/src/components/DateGrid/date-grid.anatomy.stories.tsx +583 -0
- package/src/components/DateGrid/date-grid.principles.stories.tsx +338 -0
- package/src/components/DateGrid/date-grid.spec.md +218 -0
- package/src/components/DateGrid/date-grid.stories.tsx +195 -0
- package/src/components/DateGrid/date-grid.tsx +22 -18
- package/src/components/DateGrid/index.ts +5 -0
- package/src/components/DatePicker/date-picker.anatomy.stories.tsx +952 -0
- package/src/components/DatePicker/date-picker.principles.stories.tsx +205 -0
- package/src/components/DatePicker/date-picker.spec.md +337 -0
- package/src/components/DatePicker/date-picker.stories.tsx +323 -0
- package/src/components/DatePicker/date-picker.tsx +46 -22
- package/src/components/DatePicker/index.ts +5 -0
- package/src/components/DescriptionList/description-list.anatomy.stories.tsx +252 -0
- package/src/components/DescriptionList/description-list.principles.stories.tsx +309 -0
- package/src/components/DescriptionList/description-list.spec.md +220 -0
- package/src/components/DescriptionList/description-list.stories.tsx +112 -0
- package/src/components/DescriptionList/description-list.tsx +3 -3
- package/src/components/DescriptionList/index.ts +5 -0
- package/src/components/Dialog/dialog.anatomy.stories.tsx +484 -0
- package/src/components/Dialog/dialog.principles.stories.tsx +313 -0
- package/src/components/Dialog/dialog.spec.md +216 -0
- package/src/components/Dialog/dialog.stories.tsx +483 -0
- package/src/components/Dialog/dialog.tsx +9 -9
- package/src/components/Dialog/index.ts +5 -0
- package/src/components/DropdownMenu/dropdown-menu.anatomy.stories.tsx +969 -0
- package/src/components/DropdownMenu/dropdown-menu.principles.stories.tsx +339 -0
- package/src/components/DropdownMenu/dropdown-menu.spec.md +260 -0
- package/src/components/DropdownMenu/dropdown-menu.stories.tsx +286 -0
- package/src/components/DropdownMenu/dropdown-menu.tsx +29 -7
- package/src/components/DropdownMenu/index.ts +5 -0
- 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 +216 -0
- package/src/components/Empty/empty.stories.tsx +80 -0
- package/src/components/Empty/empty.tsx +16 -7
- package/src/components/Empty/index.ts +5 -0
- package/src/components/Field/field-context.ts +98 -0
- package/src/components/Field/field-controls.spec.md +382 -0
- package/src/components/Field/field-types.ts +1 -1
- package/src/components/Field/field-wrapper.tsx +6 -6
- package/src/components/Field/field.anatomy.stories.tsx +544 -0
- package/src/components/Field/field.principles.stories.tsx +278 -0
- package/src/components/Field/field.spec.md +460 -0
- package/src/components/Field/field.stories.tsx +716 -0
- package/src/components/Field/field.tsx +12 -5
- package/src/components/Field/form-validation.spec.md +172 -0
- package/src/components/Field/index.ts +5 -0
- package/src/components/Field/use-form-validation.ts +242 -0
- package/src/components/FieldControlGroup/field-control-group.anatomy.stories.tsx +118 -0
- package/src/components/FieldControlGroup/field-control-group.principles.stories.tsx +121 -0
- package/src/components/FieldControlGroup/field-control-group.spec.md +195 -0
- package/src/components/FieldControlGroup/field-control-group.stories.tsx +161 -0
- package/src/components/FieldControlGroup/field-control-group.tsx +9 -8
- package/src/components/FieldControlGroup/index.ts +5 -0
- package/src/components/FileItem/file-item.anatomy.stories.tsx +344 -0
- package/src/components/FileItem/file-item.principles.stories.tsx +276 -0
- package/src/components/FileItem/file-item.spec.md +491 -0
- package/src/components/FileItem/file-item.stories.tsx +265 -0
- package/src/components/FileItem/file-item.tsx +37 -13
- package/src/components/FileItem/index.ts +5 -0
- 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 +163 -0
- package/src/components/FileUpload/file-upload.stories.tsx +167 -0
- package/src/components/FileUpload/file-upload.tsx +78 -27
- package/src/components/FileUpload/index.ts +5 -0
- package/src/components/FileViewer/file-viewer.anatomy.stories.tsx +1127 -0
- package/src/components/FileViewer/file-viewer.principles.stories.tsx +636 -0
- package/src/components/FileViewer/file-viewer.spec.md +368 -0
- package/src/components/FileViewer/file-viewer.stories.tsx +407 -0
- package/src/components/FileViewer/file-viewer.tsx +58 -28
- package/src/components/FileViewer/index.ts +5 -0
- package/src/components/HoverCard/hover-card.anatomy.stories.tsx +145 -0
- package/src/components/HoverCard/hover-card.principles.stories.tsx +222 -0
- package/src/components/HoverCard/hover-card.spec.md +167 -0
- package/src/components/HoverCard/hover-card.stories.tsx +304 -0
- package/src/components/HoverCard/hover-card.tsx +15 -4
- package/src/components/HoverCard/index.ts +5 -0
- package/src/components/Input/index.ts +5 -0
- package/src/components/Input/input.anatomy.stories.tsx +763 -0
- package/src/components/Input/input.principles.stories.tsx +265 -0
- package/src/components/Input/input.spec.md +207 -0
- package/src/components/Input/input.stories.tsx +133 -0
- package/src/components/Input/input.tsx +17 -14
- package/src/components/LinkInput/index.ts +5 -0
- package/src/components/LinkInput/link-input.anatomy.stories.tsx +746 -0
- package/src/components/LinkInput/link-input.principles.stories.tsx +182 -0
- package/src/components/LinkInput/link-input.spec.md +144 -0
- package/src/components/LinkInput/link-input.stories.tsx +132 -0
- package/src/components/LinkInput/link-input.tsx +9 -8
- package/src/components/Menu/index.ts +5 -0
- 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 +304 -0
- package/src/components/Menu/menu-item.stories.tsx +214 -0
- package/src/components/Menu/menu-item.tsx +8 -3
- package/src/components/Notice/index.ts +5 -0
- package/src/components/Notice/notice.anatomy.stories.tsx +610 -0
- package/src/components/Notice/notice.principles.stories.tsx +102 -0
- package/src/components/Notice/notice.spec.md +158 -0
- package/src/components/Notice/notice.stories.tsx +257 -0
- package/src/components/Notice/notice.tsx +26 -10
- package/src/components/NumberInput/index.ts +5 -0
- package/src/components/NumberInput/number-input.anatomy.stories.tsx +787 -0
- package/src/components/NumberInput/number-input.principles.stories.tsx +199 -0
- package/src/components/NumberInput/number-input.spec.md +144 -0
- package/src/components/NumberInput/number-input.stories.tsx +142 -0
- package/src/components/NumberInput/number-input.tsx +9 -10
- package/src/components/OverflowIndicator/index.ts +5 -0
- package/src/components/OverflowIndicator/overflow-indicator.anatomy.stories.tsx +549 -0
- package/src/components/OverflowIndicator/overflow-indicator.principles.stories.tsx +77 -0
- package/src/components/OverflowIndicator/overflow-indicator.spec.md +127 -0
- package/src/components/OverflowIndicator/overflow-indicator.stories.tsx +238 -0
- package/src/components/OverflowIndicator/overflow-indicator.tsx +19 -6
- package/src/components/PeoplePicker/index.ts +5 -0
- package/src/components/PeoplePicker/people-picker-helpers.ts +5 -5
- package/src/components/PeoplePicker/people-picker.anatomy.stories.tsx +427 -0
- package/src/components/PeoplePicker/people-picker.principles.stories.tsx +192 -0
- package/src/components/PeoplePicker/people-picker.spec.md +292 -0
- package/src/components/PeoplePicker/people-picker.stories.tsx +162 -0
- package/src/components/PeoplePicker/people-picker.tsx +31 -22
- package/src/components/PeoplePicker/person-display.tsx +30 -29
- package/src/components/Popover/index.ts +5 -0
- package/src/components/Popover/popover.anatomy.stories.tsx +279 -0
- package/src/components/Popover/popover.principles.stories.tsx +295 -0
- package/src/components/Popover/popover.spec.md +209 -0
- package/src/components/Popover/popover.stories.tsx +116 -0
- package/src/components/Popover/popover.tsx +17 -14
- package/src/components/ProfileCard/index.ts +5 -0
- package/src/components/ProfileCard/profile-card.anatomy.stories.tsx +504 -0
- package/src/components/ProfileCard/profile-card.principles.stories.tsx +225 -0
- package/src/components/ProfileCard/profile-card.spec.md +191 -0
- package/src/components/ProfileCard/profile-card.stories.tsx +53 -0
- package/src/components/{NameCard/name-card.tsx → ProfileCard/profile-card.tsx} +36 -30
- package/src/components/ProgressBar/index.ts +5 -0
- package/src/components/ProgressBar/progress-bar.anatomy.stories.tsx +438 -0
- package/src/components/ProgressBar/progress-bar.principles.stories.tsx +339 -0
- package/src/components/ProgressBar/progress-bar.spec.md +240 -0
- package/src/components/ProgressBar/progress-bar.stories.tsx +119 -0
- package/src/components/ProgressBar/progress-bar.tsx +4 -4
- package/src/components/RadioGroup/index.ts +5 -0
- package/src/components/RadioGroup/radio-group.anatomy.stories.tsx +681 -0
- package/src/components/RadioGroup/radio-group.principles.stories.tsx +163 -0
- package/src/components/RadioGroup/radio-group.spec.md +149 -0
- package/src/components/RadioGroup/radio-group.stories.tsx +101 -0
- package/src/components/RadioGroup/radio-group.tsx +114 -57
- package/src/components/Rating/index.ts +5 -0
- package/src/components/Rating/rating.anatomy.stories.tsx +495 -0
- package/src/components/Rating/rating.principles.stories.tsx +296 -0
- package/src/components/Rating/rating.spec.md +214 -0
- package/src/components/Rating/rating.stories.tsx +133 -0
- package/src/components/Rating/rating.tsx +29 -14
- package/src/components/ScrollArea/index.ts +5 -0
- 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 +143 -0
- package/src/components/ScrollArea/scroll-area.stories.tsx +243 -0
- package/src/components/ScrollArea/scroll-area.tsx +2 -2
- package/src/components/SegmentedControl/index.ts +5 -0
- package/src/components/SegmentedControl/segmented-control.anatomy.stories.tsx +295 -0
- package/src/components/SegmentedControl/segmented-control.principles.stories.tsx +281 -0
- package/src/components/SegmentedControl/segmented-control.spec.md +297 -0
- package/src/components/SegmentedControl/segmented-control.stories.tsx +33 -0
- package/src/components/SegmentedControl/segmented-control.tsx +9 -10
- package/src/components/Select/index.ts +5 -0
- package/src/components/Select/select.anatomy.stories.tsx +828 -0
- package/src/components/Select/select.principles.stories.tsx +311 -0
- package/src/components/Select/select.spec.md +337 -0
- package/src/components/Select/select.stories.tsx +198 -0
- package/src/components/Select/select.tsx +37 -16
- package/src/components/SelectMenu/index.ts +5 -0
- package/src/components/SelectMenu/select-menu.anatomy.stories.tsx +812 -0
- package/src/components/SelectMenu/select-menu.principles.stories.tsx +107 -0
- package/src/components/SelectMenu/select-menu.spec.md +229 -0
- package/src/components/SelectMenu/select-menu.stories.tsx +155 -0
- package/src/components/SelectMenu/select-menu.tsx +34 -9
- package/src/components/SelectionControl/index.ts +5 -0
- package/src/components/SelectionControl/selection-item.anatomy.stories.tsx +571 -0
- package/src/components/SelectionControl/selection-item.principles.stories.tsx +77 -0
- package/src/components/SelectionControl/selection-item.spec.md +141 -0
- package/src/components/SelectionControl/selection-item.stories.tsx +137 -0
- package/src/components/SelectionControl/selection-item.tsx +8 -2
- package/src/components/Separator/index.ts +5 -0
- 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 +115 -0
- package/src/components/Separator/separator.stories.tsx +127 -0
- package/src/components/Separator/separator.tsx +2 -2
- package/src/components/Sheet/index.ts +5 -0
- package/src/components/Sheet/sheet.anatomy.stories.tsx +269 -0
- package/src/components/Sheet/sheet.principles.stories.tsx +351 -0
- package/src/components/Sheet/sheet.spec.md +146 -0
- package/src/components/Sheet/sheet.stories.tsx +168 -0
- package/src/components/Sheet/sheet.tsx +7 -6
- package/src/components/Sidebar/index.ts +5 -0
- package/src/components/Sidebar/sidebar.anatomy.stories.tsx +772 -0
- package/src/components/Sidebar/sidebar.principles.stories.tsx +505 -0
- package/src/components/Sidebar/sidebar.spec.md +724 -0
- package/src/components/Sidebar/sidebar.stories.tsx +498 -0
- package/src/components/Sidebar/sidebar.tsx +20 -9
- package/src/components/Skeleton/index.ts +5 -0
- 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 +106 -0
- package/src/components/Skeleton/skeleton.stories.tsx +137 -0
- package/src/components/Skeleton/skeleton.tsx +1 -1
- package/src/components/Slider/index.ts +5 -0
- package/src/components/Slider/slider.anatomy.stories.tsx +236 -0
- package/src/components/Slider/slider.principles.stories.tsx +250 -0
- package/src/components/Slider/slider.spec.md +358 -0
- package/src/components/Slider/slider.stories.tsx +99 -0
- package/src/components/Slider/slider.tsx +54 -16
- package/src/components/Steps/index.ts +5 -0
- 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 +479 -0
- package/src/components/Steps/steps.stories.tsx +335 -0
- package/src/components/Steps/steps.tsx +56 -26
- package/src/components/Switch/index.ts +5 -0
- package/src/components/Switch/switch.anatomy.stories.tsx +227 -0
- package/src/components/Switch/switch.principles.stories.tsx +174 -0
- package/src/components/Switch/switch.spec.md +238 -0
- package/src/components/Switch/switch.stories.tsx +107 -0
- package/src/components/Switch/switch.tsx +69 -32
- package/src/components/Tabs/index.ts +5 -0
- package/src/components/Tabs/tabs.anatomy.stories.tsx +414 -0
- package/src/components/Tabs/tabs.principles.stories.tsx +257 -0
- package/src/components/Tabs/tabs.spec.md +331 -0
- package/src/components/Tabs/tabs.stories.tsx +155 -0
- package/src/components/Tabs/tabs.tsx +17 -10
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Tag/tag.anatomy.stories.tsx +664 -0
- package/src/components/Tag/tag.principles.stories.tsx +270 -0
- package/src/components/Tag/tag.spec.md +324 -0
- package/src/components/Tag/tag.stories.tsx +69 -0
- package/src/components/Tag/tag.tsx +55 -57
- package/src/components/Textarea/index.ts +5 -0
- package/src/components/Textarea/textarea.anatomy.stories.tsx +304 -0
- package/src/components/Textarea/textarea.principles.stories.tsx +175 -0
- package/src/components/Textarea/textarea.spec.md +162 -0
- package/src/components/Textarea/textarea.stories.tsx +53 -0
- package/src/components/Textarea/textarea.tsx +20 -18
- package/src/components/TimePicker/index.ts +5 -0
- package/src/components/TimePicker/time-columns.tsx +8 -1
- package/src/components/TimePicker/time-picker.anatomy.stories.tsx +281 -0
- package/src/components/TimePicker/time-picker.principles.stories.tsx +140 -0
- package/src/components/TimePicker/time-picker.spec.md +290 -0
- package/src/components/TimePicker/time-picker.stories.tsx +193 -0
- package/src/components/TimePicker/time-picker.tsx +41 -23
- package/src/components/Toast/index.ts +5 -0
- package/src/components/Toast/toast.anatomy.stories.tsx +324 -0
- package/src/components/Toast/toast.principles.stories.tsx +217 -0
- package/src/components/Toast/toast.spec.md +181 -0
- package/src/components/Toast/toast.stories.tsx +125 -0
- package/src/components/Toast/toast.tsx +2 -2
- package/src/components/Tooltip/index.ts +5 -0
- package/src/components/Tooltip/tooltip.anatomy.stories.tsx +413 -0
- package/src/components/Tooltip/tooltip.principles.stories.tsx +204 -0
- package/src/components/Tooltip/tooltip.spec.md +142 -0
- package/src/components/Tooltip/tooltip.stories.tsx +116 -0
- package/src/components/Tooltip/tooltip.tsx +4 -1
- package/src/components/TreeView/index.ts +5 -0
- package/src/components/TreeView/tree-view.anatomy.stories.tsx +426 -0
- package/src/components/TreeView/tree-view.principles.stories.tsx +190 -0
- package/src/components/TreeView/tree-view.spec.md +390 -0
- package/src/components/TreeView/tree-view.stories.tsx +299 -0
- package/src/components/TreeView/tree-view.tsx +63 -26
- package/src/hooks/use-overflow-items.ts +10 -6
- package/src/index.ts +73 -69
- package/src/lib/utils.ts +2 -1
- package/src/patterns/README.md +15 -11
- package/src/patterns/action-bar/action-bar.spec.md +465 -0
- package/src/patterns/action-bar/action-bar.stories.tsx +612 -0
- package/src/patterns/element-anatomy/element-anatomy.spec.md +217 -0
- package/src/patterns/element-anatomy/index.ts +5 -0
- package/src/patterns/element-anatomy/inline-action.spec.md +320 -0
- package/src/patterns/element-anatomy/item-anatomy.spec.md +1051 -0
- package/src/patterns/element-anatomy/item-anatomy.stories.tsx +1622 -0
- package/src/patterns/element-anatomy/item-anatomy.tsx +9 -5
- package/src/patterns/header-canonical/chrome-header.tsx +16 -5
- package/src/patterns/header-canonical/header-canonical.css +2 -2
- package/src/patterns/header-canonical/header-canonical.spec.md +326 -0
- package/src/patterns/header-canonical/header-canonical.stories.tsx +150 -0
- package/src/patterns/header-canonical/index.ts +5 -0
- package/src/patterns/horizontal-overflow/horizontal-overflow.spec.md +211 -0
- package/src/patterns/horizontal-overflow/index.ts +5 -0
- package/src/patterns/overlay-surface/index.ts +5 -0
- package/src/patterns/overlay-surface/overlay-surface.spec.md +442 -0
- package/src/patterns/overlay-surface/overlay-surface.tsx +26 -11
- package/src/patterns/resize-handle/index.ts +5 -0
- package/src/patterns/resize-handle/resize-handle.spec.md +120 -0
- package/src/patterns/resize-handle/resize-handle.stories.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 +92 -0
- package/src/styles/tokens.css +11 -0
- package/src/tokens/README.md +7 -2
- package/src/tokens/categorical-color.ts +164 -0
- package/src/tokens/color/color.spec.md +801 -0
- package/src/tokens/color/color.stories.tsx +363 -0
- package/src/tokens/color/primitives.css +7 -0
- package/src/tokens/color/semantic.css +28 -13
- package/src/tokens/density/density.spec.md +128 -0
- package/src/tokens/density/density.stories.tsx +240 -0
- package/src/tokens/elevation/elevation.spec.md +78 -0
- package/src/tokens/elevation/elevation.stories.tsx +98 -0
- package/src/tokens/layoutSpace/layoutSpace.css +1 -1
- package/src/tokens/layoutSpace/layoutSpace.spec.md +324 -0
- package/src/tokens/layoutSpace/layoutSpace.stories.tsx +75 -0
- package/src/tokens/motion/motion.css +2 -2
- package/src/tokens/motion/motion.spec.md +105 -0
- package/src/tokens/motion/motion.ts +1 -1
- package/src/tokens/opacity/opacity.spec.md +73 -0
- package/src/tokens/opacity/opacity.stories.tsx +69 -0
- package/src/tokens/orphan-tokens.spec.md +128 -0
- package/src/tokens/radius/radius.spec.md +126 -0
- package/src/tokens/radius/radius.stories.tsx +86 -0
- package/src/tokens/token-system.spec.md +240 -0
- package/src/tokens/typography/typography.spec.md +204 -0
- package/src/tokens/typography/typography.stories.tsx +133 -0
- package/src/tokens/uiSize/icon-size.ts +1 -2
- package/src/tokens/uiSize/uiSize.css +21 -0
- package/src/tokens/uiSize/uiSize.spec.md +465 -0
- package/src/tokens/utility-registry.json +124 -0
- package/dist/components/NameCard/name-card.d.ts.map +0 -1
- package/dist/components/NameCard/name-card.js.map +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Scenario Definition — Monorepo 2-Scenario Architecture(SSOT)
|
|
2
|
+
|
|
3
|
+
> **2026-05-29 ship**:本 file 為 Scenario A / Scenario B 定義 + 互動方式 + verify checkpoints 的**唯一 SSOT**。所有 skill / hook / spec / CLAUDE.md 文字 reference 此 file,**不重述定義**(per user「無多餘重複 SSOT」directive)。
|
|
4
|
+
|
|
5
|
+
> **設計起源**:user 2026-05-29 verbatim「實際上會有兩種場景,一種是直接 fork ds repo 用的一種是 fork template repo 用的使用者,兩種情境都要確保完整沒有斷點又能確保 SSOT」+ codex r5 synthesize verdict(8 gap fix)。
|
|
6
|
+
|
|
7
|
+
## 1. 兩 Scenario 定義
|
|
8
|
+
|
|
9
|
+
### Scenario A — Direct fork DS repo
|
|
10
|
+
|
|
11
|
+
**用戶**:DS 共同維護者 / 想看 DS source 一起改 DS + 寫 product 的人
|
|
12
|
+
**入口**:fork `ajenchen/design-system` GitHub repo
|
|
13
|
+
**他拿到**:DS source(`packages/design-system/`)+ 治理(`.claude/`)native readable + scaffold(`apps/template/`)+ scripts
|
|
14
|
+
**DS 取得方式**:`packages/*` npm workspace link(local resolution)
|
|
15
|
+
**Governance 取得**:`.claude/` 直接讀,**不需 `/plugin install`**(他有 source)
|
|
16
|
+
**E2E 流程**:`fork → npm install → claude → npm run create-app order-dashboard → npm install(workspace re-link)→ npm run storybook → git push`
|
|
17
|
+
**禁**:edit `packages/design-system/src/**` 沒 user approval(`check_substantive_edit_approval_preflight.sh` 攔)
|
|
18
|
+
|
|
19
|
+
### Scenario B — Fork published template repo
|
|
20
|
+
|
|
21
|
+
**用戶**:純做產品 / 不需看 DS source 的人
|
|
22
|
+
**入口**:`ajenchen/ds-product-template` GitHub「Use this template」(該 repo 內容 = mirror artifact,**非 SSOT**,by 自動 mirror workflow auto-generate from DS repo)
|
|
23
|
+
**他拿到**:scaffold + 治理 via C-prime committed-config(.claude hooks + SessionStart preamble 注入)+ DS + 治理本體 via npm
|
|
24
|
+
**DS 取得方式**:`@qijenchen/design-system` npm registry(`^X.Y.Z`)
|
|
25
|
+
**Governance 取得**:committed `.claude/settings.json`(dispatcher hooks + fail-open bootstrap)+ SessionStart 注入 npm-current preamble;本體在 npm `ds-canonical/fork`(`npm install` / `npm run sync-all` 同步)。**不需 /plugin install**(雲端不可靠 #62174/#63028)
|
|
26
|
+
**E2E 流程**:`fork → npm install(治理本體隨 npm + committed hook 自動生效,免 plugin)→ claude → npm run setup:netlify(Netlify env var 設 STORYBOOK_BASIC_AUTH = user:password,免費機制走 edge function basic-auth)→ npm run create-app order-dashboard → npm install → npm run storybook → git push`
|
|
27
|
+
**禁**:import `@qijenchen/design-system/src/**` 或 `/dist/**`(`lint:imports` 攔)
|
|
28
|
+
|
|
29
|
+
## 2. SSOT Architecture
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
ajenchen/design-system (DS repo) ── SSOT ───────────────────────────┐
|
|
33
|
+
├── packages/design-system/ ← DS library source │
|
|
34
|
+
├── apps/template/ ← Product app seed │
|
|
35
|
+
├── scripts/ ← Shared workflow scripts │
|
|
36
|
+
│ ├── create-app.mjs ← copy apps/template → apps/<name> │
|
|
37
|
+
│ ├── setup-netlify-access.mjs │
|
|
38
|
+
│ ├── build-published-template-mirror.mjs ← mirror builder │
|
|
39
|
+
│ └── (4 other consumer scripts) │
|
|
40
|
+
├── .devcontainer/ ← Codespaces cloud-dev path │
|
|
41
|
+
├── .storybook/main.ts ← globs sharedStoryGlobs + apps/** │
|
|
42
|
+
├── .claude/ ← Governance(skills/hooks/rules) │
|
|
43
|
+
├── template/ds-product-template/ ← Consumer-specific scaffold │
|
|
44
|
+
│ ├── CLAUDE.md / README.md ← Scenario B onboarding docs │
|
|
45
|
+
│ ├── .storybook/main.ts ← apps-only glob(no DS internal) │
|
|
46
|
+
│ ├── package.json ← consumer workspaces + npm deps │
|
|
47
|
+
│ └── (.github / .gitignore / .npmrc / netlify.toml / docs / ...) │
|
|
48
|
+
└── .github/workflows/ │
|
|
49
|
+
└── mirror-to-published-template.yml ← auto sync on push main │
|
|
50
|
+
│
|
|
51
|
+
↓ (workflow + CROSS_REPO_TOKEN PAT) │
|
|
52
|
+
│
|
|
53
|
+
ajenchen/ds-product-template (published repo) ← Mirror artifact ─────┘
|
|
54
|
+
(Scenario B fork users land here via「Use this template」)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## 3. Mirror Workflow Chain(Scenario B 自動同步)
|
|
58
|
+
|
|
59
|
+
**Trigger**:DS push main + template-affecting paths(per `.github/workflows/mirror-to-published-template.yml`):
|
|
60
|
+
- `apps/template/**`
|
|
61
|
+
- `scripts/create-app.mjs` + `scripts/setup-netlify-access.mjs` + `scripts/check-plugin-installed.mjs` + `scripts/build-published-template-mirror.mjs`
|
|
62
|
+
- `.devcontainer/**`
|
|
63
|
+
- `template/ds-product-template/**`
|
|
64
|
+
- `package.json`
|
|
65
|
+
|
|
66
|
+
**Build**:`scripts/build-published-template-mirror.mjs` 用 ALLOWLIST(non denylist,per codex r5)+ transform:
|
|
67
|
+
- Flatten `template/ds-product-template/*` → mirror root
|
|
68
|
+
- Transform `package.json`:`workspaces=["apps/*"]` + DS dep `^X.Y.Z`
|
|
69
|
+
- Transform `apps/template/package.json`:`@qijenchen/design-system: "*"` → `^X.Y.Z`
|
|
70
|
+
- 4 integrity scans:DS source residue / secret leak / Storybook glob / package dep
|
|
71
|
+
|
|
72
|
+
**Push**:`workflow + CROSS_REPO_TOKEN PAT(user one-time setup,workflow 印中文指引若 missing)` force-push to `ajenchen/ds-product-template` main
|
|
73
|
+
|
|
74
|
+
## 4. Test Cases(Claude 19 + codex 18 union → 20 canonical)
|
|
75
|
+
|
|
76
|
+
### Scenario A(6 cases)
|
|
77
|
+
|
|
78
|
+
| # | Test | Verify cmd |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| A1 | Workspace link resolution(apps/template DS dep `*` → packages/design-system local)| `jq '.dependencies' apps/template/package.json` |
|
|
81
|
+
| A2 | DS source edit attempt → approval-preflight hook BLOCKER + 中文訊息 | `echo '{...}' \| bash .claude/hooks/check_substantive_edit_approval_preflight.sh` |
|
|
82
|
+
| A3 | `.claude/` native readable(無需 /plugin install)| `ls .claude/{skills,hooks,rules}/` |
|
|
83
|
+
| A4 | `npm run create-app <name>` → `apps/<name>/` 從 `apps/template/` 複製 + story title patched `Apps/<name>/...` | run + ls + grep |
|
|
84
|
+
| A5 | DS root `npm run storybook` 含 DS internal stories + `apps/**` stories,namespace 不撞 | grep `.storybook/main.ts` stories glob + 跑 storybook |
|
|
85
|
+
| A6 | Workspaces 含 `apps/*` | `jq '.workspaces' package.json` |
|
|
86
|
+
|
|
87
|
+
### Scenario B(7 cases,via mirror artifact)
|
|
88
|
+
|
|
89
|
+
| # | Test | Verify cmd |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| B1 | Mirror artifact npm deps `^X.Y.Z`(not workspace `*`)| `jq '.dependencies' /tmp/mirror/package.json` |
|
|
92
|
+
| B2 | Mirror 0 DS source(`packages/design-system/src/` 不存在)| `! -d /tmp/mirror/packages/design-system` |
|
|
93
|
+
| B3 | Mirror workspaces apps-only | `jq '.workspaces' /tmp/mirror/package.json` |
|
|
94
|
+
| B4 | Mirror `.storybook/main.ts` apps-only glob | grep stories |
|
|
95
|
+
| B5 | Mirror 含 `check-plugin-installed.mjs` + `setup-netlify-access.mjs` + `create-app.mjs` | ls /tmp/mirror/scripts/ |
|
|
96
|
+
| B6 | C-prime committed 治理(免 plugin):`npm install` 後 `ds-canonical/fork` 本體就位 + SessionStart 注入設計紀律 preamble + dispatcher 跑 fork hooks;既有 fork `sync-all` 移除 obsolete plugin-era hook | `node scripts/test-fork-governance.mjs` + `node scripts/dogfood-prepublish-verify.mjs` |
|
|
97
|
+
| B7 | `npm run create-app` 同 Scenario A | run + ls |
|
|
98
|
+
|
|
99
|
+
### Mirror integrity(7 cases)
|
|
100
|
+
|
|
101
|
+
| # | Test | Verify cmd |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| M1 | Trigger on DS push main with template-affecting paths(workflow path filter)| workflow log |
|
|
104
|
+
| M2 | DS source residue scan 0 leak(8 paths checked)| build script integrity scan 1 |
|
|
105
|
+
| M3 | Secret leak scan 0 leak(6 paths checked)| build script integrity scan 2 |
|
|
106
|
+
| M4 | Storybook glob apps-only(no `../packages/**`)| build script integrity scan 3 |
|
|
107
|
+
| M5 | package.json workspaces apps-only + DS dep transformed | build script integrity scan 4 |
|
|
108
|
+
| M6 | `apps/template/package.json` DS dep `*` → `^X.Y.Z` | build script auto transform |
|
|
109
|
+
| M7 | Force-push idempotent(reproducible)| `node scripts/build-published-template-mirror.mjs --out=/tmp/x` 多次 = 相同 output |
|
|
110
|
+
|
|
111
|
+
## 5. Verify Checkpoints — 後續增刪改 reference 此 SSOT
|
|
112
|
+
|
|
113
|
+
任何 future edit:
|
|
114
|
+
- 動 `apps/template/` → 影響兩 scenario 的 seed,測 A4 + B7
|
|
115
|
+
- 動 `scripts/{create-app,setup-netlify-access,check-plugin-installed,...}.mjs` → 測 A4 + B5 + mirror integrity scan
|
|
116
|
+
- 動 `.storybook/main.ts`(DS root)→ 測 A5
|
|
117
|
+
- 動 `template/ds-product-template/.storybook/main.ts` → 測 B4 + M4
|
|
118
|
+
- 動 mirror script `build-published-template-mirror.mjs` → 重跑 4 integrity scans + M2-M5
|
|
119
|
+
- 動 mirror workflow `.yml` → workflow_dispatch dry-run
|
|
120
|
+
|
|
121
|
+
## 6. Cross-references(其他 file 該 pointer 到本 SSOT,不重述定義)
|
|
122
|
+
|
|
123
|
+
| File | Reference type |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `.claude/skills/deep-audit-cross-codex/SKILL.md` Phase 0 cwd detection | 已 reference(2-mode based on cwd structure)|
|
|
126
|
+
| `.claude/skills/design-system-audit/SKILL.md` dim 83 | 該砍重述部分,改 pointer here |
|
|
127
|
+
| DS root `CLAUDE.md` task nav row「建產品 / 開新 product app」 | 該 pointer here |
|
|
128
|
+
| `template/ds-product-template/CLAUDE.md` `# Fork-and-go onboarding` 段 | 該 pointer here for Scenario B specifics |
|
|
129
|
+
| `template/README.md` 命名 SSOT 段 | 該 pointer here for 3-layer naming |
|
|
130
|
+
|
|
131
|
+
## 7. Anti-pattern(永久 ban)
|
|
132
|
+
|
|
133
|
+
- ❌ Scenario A 文件叫 user `/plugin install`(他有 .claude/ native)
|
|
134
|
+
- ❌ Scenario B 文件假設 user 看得到 `packages/design-system/src/`
|
|
135
|
+
- ❌ Mirror 用 denylist `rm -rf packages/design-system/src`(per codex「太 narrow 會漏 governance/log/planning leak」)
|
|
136
|
+
- ❌ Mirror 漏 CROSS_REPO_TOKEN secret 時 silent succeed(必 fail + 印中文指引)
|
|
137
|
+
- ❌ `apps/template/package.json` DS dep `"beta"` 字串(Gap 3,scenario A workspace resolution vs scenario B npm version 行為不同)
|
|
138
|
+
- ❌ DS root `.storybook/main.ts` 漏 `apps/**` glob(Scenario A 看不到自己 product apps)
|
|
139
|
+
- ❌ Mirror `.storybook/main.ts` 含 `../packages/**` glob(Gap 4,published mirror 不該 leak DS trait grid)
|
|
140
|
+
|
|
141
|
+
## 8. 對齊上游 canonical
|
|
142
|
+
|
|
143
|
+
- CLAUDE.md 6 mindset 全 + meta-patterns 31 M-rules + 治理 8-home + 自主執行 7 軸 + 命名 SSOT 3-test(per deep-audit-cross-codex SKILL.md「上游 canonical 全繼承」段 2026-05-29)
|
|
144
|
+
- M17 SSOT 鐵律(本 file 就是 example:single canonical home,其他 file pointer)
|
|
145
|
+
- M19 trigger phrase auto-pipeline + M28 solo-work canonical
|
|
146
|
+
- 命名 SSOT 3 層(per `template/README.md`「命名 SSOT」段)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Spec 規則 — 詳細展開
|
|
2
|
+
|
|
3
|
+
`.claude/rules/spec-rules.md` 的詳表。主章留核心原則,本檔放 SSOT 判斷 + 邊界案例 scope default + 禁止清單。
|
|
4
|
+
|
|
5
|
+
## SSOT 結構規則
|
|
6
|
+
|
|
7
|
+
跨元件比較由**一個 spec own 完整內容,其他 spec 用一行 pointer 指回**。
|
|
8
|
+
|
|
9
|
+
**何時需要 SSOT(深度比較)**:
|
|
10
|
+
- 多維度分析(如「與 X 的分界」分多個角度)
|
|
11
|
+
- 情境對照表 > 3 rows
|
|
12
|
+
- 涉及另一元件的內部機制 / 權衡
|
|
13
|
+
|
|
14
|
+
**何時不需要(本地引用即可)**:
|
|
15
|
+
- 「何時不用」表格一行帶過(「改用 X」+ 原因)— 兩側並存不會漂移
|
|
16
|
+
- 「相關」links section 列出
|
|
17
|
+
- 只描述自己元件的 props / variants / state
|
|
18
|
+
|
|
19
|
+
**Ownership 判斷順序**:
|
|
20
|
+
1. 通用預設元件 own(Select owns vs RadioGroup、Input owns vs NumberInput — 通用者是 fallback)
|
|
21
|
+
2. 一側 spec 明顯更深 / 另一側薄 wrapper → 深側 own(Tabs owns vs SegmentedControl)
|
|
22
|
+
3. 兩側對等都需要 → 按字母序決定 anchor
|
|
23
|
+
|
|
24
|
+
**執行規則**:
|
|
25
|
+
- Own 方寫深度 section;被指方寫一行 pointer(**reciprocal 必須存在,不可單向**)
|
|
26
|
+
- Pointer 必須明確指出 anchor spec + section 名稱
|
|
27
|
+
- 本專案目前的 SSOT anchors:
|
|
28
|
+
- Tabs vs SegmentedControl → `tabs.spec.md`「Tabs 與 SegmentedControl 的分界」
|
|
29
|
+
- Select vs RadioGroup → `select.spec.md`「與 RadioGroup 的分界」
|
|
30
|
+
- Checkbox vs Switch → `checkbox.spec.md`「與 Switch 的分界」
|
|
31
|
+
- HoverCard vs Tooltip → `hover-card.spec.md`「與 Tooltip 的分界」
|
|
32
|
+
- Row primitives 共用 → `patterns/element-anatomy/item-anatomy.spec.md`
|
|
33
|
+
- Field Controls 共用 → `components/Field/field-controls.spec.md`
|
|
34
|
+
|
|
35
|
+
**禁止事項**:
|
|
36
|
+
- ❌ 兩 spec 都寫完整對照(保證漂移)
|
|
37
|
+
- ❌ 建孤立 `xxx-selection.spec.md` / `xxx-comparison.spec.md` 承載比較 — 世界級 DS 都把比較放元件 spec 內
|
|
38
|
+
- ❌ 單向指向(A → B,B 沒指回 A)
|
|
39
|
+
- ❌ Pointer 只說「見 X spec」不說 section 名稱
|
|
40
|
+
|
|
41
|
+
## 邊界案例覆蓋(Scope 預設 — 減少重複)
|
|
42
|
+
|
|
43
|
+
適用狀態必須有明確說明 — disabled / loading / empty、dark mode / density、icon-only。不適用則明文「本元件無 X 狀態」,不沉默省略。
|
|
44
|
+
|
|
45
|
+
**Scope 預設**:
|
|
46
|
+
- **Field 家族**(Input / NumberInput / DatePicker / Select / Combobox / LinkInput / Textarea / Switch / Slider / SegmentedControl / Checkbox / RadioGroup)→ 直接寫「Mode / disabled / readonly 詳 `field-controls.spec.md`」
|
|
47
|
+
- **Dark mode**:元件靠 semantic token 切換(無自訂 palette)→ 「Dark mode 由 semantic token 自動處理(見 `color.spec.md`)」
|
|
48
|
+
- **Density**:元件用 `--field-height-*` / `--layout-space-*` → 「Density 由 token 自動切換」
|
|
49
|
+
- **純 wrapper**(無互動狀態,如 Separator / Skeleton / CircularProgress / ProgressBar)→ 「本元件無互動狀態」一行帶過
|
|
50
|
+
|
|
51
|
+
元件特有(non-inherit)狀態必展開寫;繼承自 family / token 的行為 pointer 即可。
|
|
52
|
+
|
|
53
|
+
## spec.md 與 .tsx 職責分離
|
|
54
|
+
|
|
55
|
+
- spec 只記錄設計原則(「為什麼」「何時用」)— 讓 AI 能舉一反三推導邊緣情況
|
|
56
|
+
- 可程式化規則(具體 token class / pixel 值 / 條件邏輯)寫進 `.tsx`
|
|
57
|
+
- 判斷標準:「這條規則能直接變成 code 嗎?」能 → .tsx;不能、需要人類判斷 → spec
|
|
58
|
+
- 可推導的值用 `calc()` / 公式表達,不硬寫結果(例:divider 內縮 = `(行高 - 文字行高) / 2`)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# SSOT 消費 canonical — 完整對照 + 反例
|
|
2
|
+
|
|
3
|
+
CLAUDE.md `# SSOT 消費 canonical` 的詳表 + 反例。主章留核心 + pointer,本檔放大對照表 + 禁止清單 + tsx 註解模板。
|
|
4
|
+
|
|
5
|
+
## 視覺決策 → 必查清單(完整)
|
|
6
|
+
|
|
7
|
+
| 決策 | 必查的 SSOT 家 |
|
|
8
|
+
|------|---------------|
|
|
9
|
+
| **元件選擇**(這該用哪個既有元件?)| `ls packages/design-system/src/components/` + `ls packages/design-system/src/patterns/` + 近親元件 spec |
|
|
10
|
+
| **Token / 值**(padding / gap / height / color)| 對應 `tokens/{name}/spec.md` + `tokens/README.md` |
|
|
11
|
+
| **Padding / spacing**(chrome vs 元件內 vs 精確幾何)| `.claude/references/ui-dev-rules.md`「Padding source 分層規則」+ `tokens/layoutSpace/layoutSpace.spec.md` |
|
|
12
|
+
| **Row / item 結構**(prefix / content / suffix slot)| `patterns/element-anatomy/item-anatomy.spec.md`(Family 1+2 SSOT) |
|
|
13
|
+
| **連續 item list wrapper gap** | `patterns/element-anatomy/item-anatomy.spec.md`「連續 item 貼邊合法性」— 公式:permanent standalone card/pill → 必 gap;permanent flush / transparent → 0 gap。元件專屬 gap 值 + mixed 混合情境決策表查該元件 spec「List wrapper canonical」節 |
|
|
14
|
+
| **視覺容器 breathing**(自建或 override 帶 bg/border/shadow 的 div)| `patterns/element-anatomy/element-anatomy.spec.md`「視覺容器 breathing invariant」— 有視覺邊界容器必有 inner padding。責任在父容器,子元件 w-full responsive 不變 |
|
|
15
|
+
| **Label ↔ Description gap**(2px)| Token `--item-gap-label-desc` + Primitive `<ItemContent>` — 改 token 一處 → 全 DS 同步。Consumer 2 擇 1:(a) token:`mt-[var(--item-gap-label-desc)]`(b) primitive:`<ItemContent label description descriptionTone>`。偏離必 spec 明文 rationale |
|
|
16
|
+
| **Dismiss / inline action / overflow menu**| `patterns/element-anatomy/item-anatomy.spec.md`「Dismiss 按鈕 canonical」+「Inline Action 設計規格」+「常用 icon canonical」 |
|
|
17
|
+
| **按鈕排列 / 群組 / 分隔**| `patterns/action-bar/action-bar.spec.md` |
|
|
18
|
+
| **Header 高度 / chrome padding**| `tokens/uiSize/uiSize.spec.md`(`--chrome-header-height`)+ `tokens/layoutSpace/layoutSpace.spec.md` |
|
|
19
|
+
| **Chrome header 選型**(fixed-h vs padding-based)| `tokens/uiSize/uiSize.spec.md`「Chrome header 選型 canonical」— decision tree + 8 家世界級對照 + checklist |
|
|
20
|
+
| **Header 跨家族視覺契約**(border / padding / withTabs / dismiss size 連動)| `patterns/header-canonical/header-canonical.spec.md` — SSOT for chrome + overlay header 兩家族;含 withTabs 6 lockstep rules(W1 border auto-suppress / W2 padding align / W3 tabs size 對應 / W4 flush stack / W5 md future tier / W6 default sm)|
|
|
21
|
+
| **Overlay chrome dismiss / unbounded button**| `patterns/overlay-surface/overlay-surface.spec.md`「Chrome dismiss size canonical v5」 |
|
|
22
|
+
| **Overlay title size**(modal 16 vs non-modal 14)| `patterns/overlay-surface/overlay-surface.spec.md`「Overlay title typography canonical」 |
|
|
23
|
+
| **Form field gap**| `components/Field/field.spec.md` +「layoutSpace 規則 3:跟 block 相鄰 = tight,inline ↔ inline = loose」 |
|
|
24
|
+
| **Icon 選擇 / 尺寸**| `.claude/rules/ui-development.md`「元件 Props 命名」「Icon canonical」+ `ui-dev-rules.md`「Icon size 來源分層規則」 |
|
|
25
|
+
| **浮層 header / body / footer**| `patterns/overlay-surface/overlay-surface.spec.md` |
|
|
26
|
+
| **Scrollbar / 滾動**| `components/ScrollArea/scroll-area.spec.md` +「horizontal-overflow pattern」 |
|
|
27
|
+
| **Variant / prop 命名**| 既有元件 `variant=` 值 grep + `# 命名與語言一致性`「命名必過三重 test」 |
|
|
28
|
+
| **State 視覺**(selected / disabled / hover)| `patterns/element-anatomy/item-anatomy.spec.md`「選擇 / 狀態視覺規則」 |
|
|
29
|
+
|
|
30
|
+
## 強制 Checklist — 新 tsx 檔 top-of-file 註解
|
|
31
|
+
|
|
32
|
+
新元件 / 新 feature 的 tsx 開頭**必須**有註解段落:
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
/**
|
|
36
|
+
* {Component} — {定位一句話}
|
|
37
|
+
*
|
|
38
|
+
* ── 定位 ──
|
|
39
|
+
* {...}
|
|
40
|
+
*
|
|
41
|
+
* ── 實作基礎 ──
|
|
42
|
+
* 消費:{List components / primitives used}
|
|
43
|
+
* 對應 pattern:{patterns/xxx}
|
|
44
|
+
*
|
|
45
|
+
* ── 消費的 SSOT ──
|
|
46
|
+
* - components: [Button, Input, ItemInlineAction, ...]
|
|
47
|
+
* - patterns: [item-anatomy, action-bar, overlay-surface]
|
|
48
|
+
* - tokens: [--layout-space-loose, --chrome-header-height, --field-height-md]
|
|
49
|
+
* - spec refs: {近親 spec 清單}
|
|
50
|
+
*/
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Hook `check_ssot_consultation.sh`(retired;改靠 mindset #2 + `check_canonical_propagation.sh`)(原 Write 新 tsx 到 `packages/design-system/src/components/` 或 `src/explorations/` → 若檔內無上述註解區 → warn 要求補齊)。
|
|
54
|
+
|
|
55
|
+
## 禁止:隱性自創
|
|
56
|
+
|
|
57
|
+
下列行為等同自創(就算沒宣告新命名):
|
|
58
|
+
- 自寫 `h-14` / `h-12` 等 chrome 高度(應用 `--chrome-header-height` token)
|
|
59
|
+
- 自寫 `gap-3` 當 toolbar 按鈕群 gap(應查 `patterns/action-bar` canonical)
|
|
60
|
+
- 自寫 `<button aria-label="Close"><X /></button>` 作 dismiss(應用 `ItemInlineAction`)
|
|
61
|
+
- 自寫 Row `<div><Icon /><span>label</span><Button /></div>`(應用 `<MenuItem>` + slot)
|
|
62
|
+
- 自訂 Input `variant="custom-name"` 未先 grep 既有 variant 值
|
|
63
|
+
- 在 Toolbar 用 `<input className="bg-transparent border-0 ...">`(應用 `<Input variant="bare">` 若既有;無 → Ambiguity Protocol)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# SSOT Index — High-risk interface ownership map
|
|
2
|
+
|
|
3
|
+
**Purpose**:per codex round 5 (e) — 設計提案前必查本 index 找 owner,再 grep spec verify。
|
|
4
|
+
避免 round 1-4 反覆「沒查就提案 → 提錯 owner → user 糾 → 再來」的 loop。
|
|
5
|
+
|
|
6
|
+
**Usage**:
|
|
7
|
+
1. 動視覺 / 結構前 → grep 本 file 找該 interface 是否列管
|
|
8
|
+
2. 命中 → 跳 owner spec 查 canonical sentence + 看 conflicting code 嗎?
|
|
9
|
+
3. 沒命中 → grep `*.spec.md` 找 anchor,**找到後加進本 index**(防下次再漏)
|
|
10
|
+
|
|
11
|
+
## High-risk interfaces(active divergence / past trap)
|
|
12
|
+
|
|
13
|
+
| Interface | Owner spec | Canonical sentence | Drift status | Last divergence event |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| **DataTable body cell internal indicator**(display endAction / clear / edit indicator)| `data-table.spec.md`「Body cell internal」row + `inline-action.spec.md`「DataTable body cell internal」row | 「Body cell internal = Field family endAction(自動繼承)」「Field display 元件已對齊」 | ✅ aligned:2026-05-09 D-path retired — `getEditIndicator(colType)` parallel system 移除,indicator authority 移交 Field naked-display `showDisplayEndIcon` opt-in,cellEl 不再 render parallel indicator(見 data-table.tsx「D-path retired」註解)| 2026-05-08 round 5 → 2026-05-09 resolved |
|
|
16
|
+
| **Field naked variant state ring**(hover / focus / open / error)| `field-wrapper.tsx` cva compoundVariants(v13.3)+ `field.spec.md`「focus dominates」段 | 「SSOT 在 field-wrapper.tsx 三 compoundVariant — 改一處全 control + cell + variant 跟動」 | ✅ aligned(2026-05-08 D path canary 違反後 revert)| 2026-05-08 round 4(D path canary 違反 SSOT,已 revert `f0faab9`)|
|
|
17
|
+
| **Row prefix/suffix slot**(`<ItemPrefix>` / `<ItemSuffix>`)| `patterns/element-anatomy/item-anatomy.spec.md:175+190` | 「row prefix/suffix slot 必走 patterns/element-anatomy L1 primitive」「`h-[1lh] shrink-0 flex items-center` 普世正確」 | ✅ aligned(hook `check_pattern_invariants.sh` C.4 enforce)| — |
|
|
18
|
+
| **Inline action gap**(ItemInlineAction sibling spacing)| `patterns/element-anatomy/inline-action.spec.md`「多個 inline action 間距」段 | 「inline-action 跟 sibling gap 必 = `gap-2`(8px)」 | ✅ aligned(hook C.2 enforce)| — |
|
|
19
|
+
| **Drag visual**(drop indicator / drag overlay)| `lib/drag-visual.ts`(2026-05-06 v14.5)+ `tree-view.spec.md:265` | 「TreeView 是 DS 內最早 codified 的 drag canonical,DataTable row drag + column reorder 都 inherit via drag-visual.ts SSOT module」 | ✅ aligned | — |
|
|
20
|
+
| **Color tokens**(primitive vs semantic)| `tokens/color/color.spec.md`(架構流派定位)+ `tokens/color/semantic.css` | 「禁 primitive 色名作 utility,用 semantic alias」 | ✅ aligned(hook D.3 enforce)| — |
|
|
21
|
+
| **Layout space**(region/element + 親疏三級)| `tokens/layoutSpace/layoutSpace.spec.md` v6(原 memory `feedback_layout_v6_canonical.md` 已 retire)| 「region/element + bounded/unbounded + 親疏三級」 | ✅ aligned(2026-05-01 flush variant retire)| 2026-05-01 |
|
|
22
|
+
| **DataTable scroll**(3-region synced + cross-OS scrollbar)| `data-table.spec.md:245-251` | 「center body 用 native overflow-x-auto(非 ScrollArea),pinned column 三 region 同步」 | ✅ aligned(v15.13 interim CSS parity for Windows Bug H,deferred ScrollArea full migration)| 2026-04-30 / 2026-05-07 |
|
|
23
|
+
| **Cell display vs edit content position**(picker offset)| `field.spec.md`「Layout Family 4」段 + `data-table.spec.md`「Body cell internal」row | 「Field control display + edit 共用同 wrapper geometry」 | ⚠ partial:DataTable cell 場景已對齊(D-path `showDisplayEndIcon` opt-in 走 Field naked-display);standalone `mode="display"` 仍 bare-span(documented deferral,見 select.tsx 檔頭 `@renderer-symmetry-allow`)| 2026-05-07~08 round 1-5 → 2026-05-09 D-path 部分解決 |
|
|
24
|
+
| **Field state machine focus dominates**(v13.3)| `field-wrapper.tsx` cva compoundVariants + `field.spec.md`「focus dominates」段 + `check_field_family_invariants.sh` A.3 | 「focus dominates everything;naked 不寫平行 outline ring」 | ✅ aligned;hook A.3 enforce | 2026-05-06 v9-v13.3 5 round refinement |
|
|
25
|
+
| **Solo dev workflow**(1 chat = 1 branch / Netlify gate / squash merge)| `feedback_solo_dev_workflow.md` + CLAUDE.md「Git solo-work canonical」 | 「1 chat = 1 working branch;Netlify preview = user gate;『push / OK』trigger 才 merge main」 | ✅ aligned(M28 + hook `check_solo_workflow.sh`)| 2026-05-08 M28 codify |
|
|
26
|
+
| **Wrapper-vs-primitive schema unify**(SelectOption / MenuItemProps 等)| `SelectMenu/select-menu.tsx` SelectMenuOption + `Combobox/combobox.tsx` extends + `PeoplePicker/people-picker.tsx` extends | 「wrapper API schema 必 `extends primitive`,wrapper 內部 mapping 必 forward 全 primitive surface field(M30)」 | ✅ aligned(2026-05-10 Round 1 commit `561945b` Combobox extends + forward 全 field;PeoplePicker 對齊 + hook `check_wrapper_primitive_schema_drift.sh` BLOCKER)| 2026-05-10 M30 codify |
|
|
27
|
+
|
|
28
|
+
## How to maintain
|
|
29
|
+
|
|
30
|
+
- 新 interface 第一次 surface → 加進本 index
|
|
31
|
+
- 新 divergence 發現 → 加 row + 標 ⚠ DRIFT
|
|
32
|
+
- Drift 解決 → 改 ✅ aligned
|
|
33
|
+
- 重大 round 結束 → 跑 audit Dim 38 反 grep verify
|
|
34
|
+
|
|
35
|
+
## 與 hook 關係
|
|
36
|
+
|
|
37
|
+
- `check_ds_anchor_preflight.sh`(live,soft warn)— 偵測編 Field / DataTable / patterns code 時 stderr 提醒「先 grep ssot-index.md」
|
|
38
|
+
- `check_field_family_invariants.sh` A.3 — 機械化 enforce v13.3 SSOT
|
|
39
|
+
- `check_pattern_invariants.sh` C.4 — 機械化 enforce row slot SSOT
|
|
40
|
+
- `check_canonical_propagation.sh` E.2 — 機械化 enforce L3 primitive import
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./story-baseline-registry.schema.json",
|
|
3
|
+
"_meta": {
|
|
4
|
+
"purpose": "Anti-drift registry for stories wrap既有 primitive(Sidebar / ChromeHeader / DataTable / Dialog / Sheet / Popover)— machine-readable canonical archetype。Hook `check_story_invariants.sh R8` reads this(not grep spec.md / not憑 Claude judgment)to enforce nearest same-purpose canonical usage(per codex Layer B D4 2026-05-20)。新增 primitive entry 必先寫 baseline + helper list + antiPatterns regex + variantRules。",
|
|
5
|
+
"owner": ".claude/references/story-baseline-registry.json",
|
|
6
|
+
"consumed_by": [
|
|
7
|
+
".claude/hooks/check_story_invariants.sh#R8(story_archetype_registry)",
|
|
8
|
+
".claude/skills/story-writing/SKILL.md#Phase-0.0(load registry + read baseline + produce diff table)"
|
|
9
|
+
],
|
|
10
|
+
"rollout": "ship as warn mode first;確認 zero existing violation → 升 P0 BLOCKER"
|
|
11
|
+
},
|
|
12
|
+
"components": {
|
|
13
|
+
"Sidebar": {
|
|
14
|
+
"baseline": "packages/design-system/src/components/Sidebar/sidebar.stories.tsx#IconCollapse",
|
|
15
|
+
"requiredHelpers": [
|
|
16
|
+
"WorkspaceBrand",
|
|
17
|
+
"MAIN_NAV",
|
|
18
|
+
"SidebarHeader",
|
|
19
|
+
"SidebarFooter"
|
|
20
|
+
],
|
|
21
|
+
"antiPatterns": [
|
|
22
|
+
{
|
|
23
|
+
"id": "sidebar-header-simplified-span",
|
|
24
|
+
"regex": "<SidebarHeader[^>]*>[[:space:]]*<span",
|
|
25
|
+
"severity": "block",
|
|
26
|
+
"rationale": "SidebarHeader 必 wrap WorkspaceBrand-like ItemAvatar block(per sidebar.stories#IconCollapse baseline);simplified <span> mock = drift"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "sidebar-menu-button-inline-icon",
|
|
30
|
+
"regex": "<SidebarMenuButton[^>]*>[^<]*<[A-Z][a-zA-Z]+[[:space:]]+className=\"size-",
|
|
31
|
+
"severity": "block",
|
|
32
|
+
"rationale": "SidebarMenuButton 必用 startIcon prop + tooltip prop;children inline icon = drift"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "sidebar-header-subtitle-second-line",
|
|
36
|
+
"regex": "<SidebarHeader[^>]*>[[:space:]]*<div[^>]*flex-col",
|
|
37
|
+
"severity": "block",
|
|
38
|
+
"rationale": "SidebarHeader brand 必單行(Fixed-h chrome 不可成長,sidebar.spec.md SidebarHeader 段 2026-06-12 明文)。flex-col 直接子層 = logo name 下加副標的結構簽名 — shadcn TeamSwitcher demo prior 滲漏;plan/org 資訊歸 workspace switcher dropdown row,非常駐 header"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "sidebar-footer-two-line",
|
|
42
|
+
"regex": "<SidebarFooter[^>]*>.{0,400}(text-xs|leading-tight)",
|
|
43
|
+
"severity": "block",
|
|
44
|
+
"rationale": "SidebarFooter user 區必單行(名字 only;職稱/email 等身份資訊歸 ItemAvatar hoverCard 的 ProfileCard,sidebar.stories.tsx UserFooter canonical)。shadcn nav-user 的「name + email text-xs 兩行」是強 LLM 先驗,且 text-xs 違反 chrome typography canonical(sidebar.spec『chrome 內 text 一律 text-body-lg』);400 字元窗限制 greediness"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"DataTable": {
|
|
49
|
+
"baseline": "packages/design-system/src/components/DataTable/data-table.stories.tsx#WithBulkActions",
|
|
50
|
+
"toolbar": {
|
|
51
|
+
"requiredHelpers": [
|
|
52
|
+
"Popover",
|
|
53
|
+
"PopoverTrigger",
|
|
54
|
+
"PopoverContent",
|
|
55
|
+
"Input"
|
|
56
|
+
],
|
|
57
|
+
"filterPanel": "DataTableFilterPanel",
|
|
58
|
+
"sortManager": "DataTableSortManager",
|
|
59
|
+
"buttonCanonical": {
|
|
60
|
+
"variant": "text",
|
|
61
|
+
"size": "sm",
|
|
62
|
+
"iconOnly": true,
|
|
63
|
+
"pressed": "required(state expression)",
|
|
64
|
+
"rationale": "per codex D2 verdict 2026-05-20 + action-bar.spec.md narrow scope:dense always-visible toolbar = low visual weight + pressed/chips/badges 顯示 state;tertiary 只用 standalone/labeled context"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"antiPatterns": [
|
|
68
|
+
{
|
|
69
|
+
"id": "datatable-toolbar-tertiary-filter-sort",
|
|
70
|
+
"regex": "startIcon=\\{(Filter|ArrowUpDown)\\}[^>]*variant=\"tertiary\"|variant=\"tertiary\"[^>]*startIcon=\\{(Filter|ArrowUpDown)\\}",
|
|
71
|
+
"severity": "block",
|
|
72
|
+
"rationale": "DataTable toolbar filter/sort 必 variant=text(per data-table.stories#WithBulkActions L998 canonical)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "datatable-toolbar-button-with-label",
|
|
76
|
+
"regex": "startIcon=\\{(Filter|ArrowUpDown)\\}[^>]*>[^<]+(篩選|排序|Filter|Sort)[^<]*</Button>",
|
|
77
|
+
"severity": "block",
|
|
78
|
+
"rationale": "DataTable toolbar 必 iconOnly(per WithBulkActions L998 canonical),不掛 label"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "datatable-toolbar-no-popover-wrap",
|
|
82
|
+
"regex": "startIcon=\\{(Filter|ArrowUpDown)\\}(?![\\s\\S]*?(DataTableFilterPanel|DataTableSortManager))",
|
|
83
|
+
"severity": "warn",
|
|
84
|
+
"rationale": "DataTable toolbar filter/sort button 必包在 Popover 內,內含真 DataTableFilterPanel / DataTableSortManager primitive"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"ChromeHeader": {
|
|
89
|
+
"baseline": "packages/design-system/src/components/Sidebar/sidebar.stories.tsx#IconCollapse (PageContent helper)",
|
|
90
|
+
"requiredStructure": "SidebarTrigger + h1.text-body-lg.font-medium 緊鄰 gap-2",
|
|
91
|
+
"antiPatterns": [
|
|
92
|
+
{
|
|
93
|
+
"id": "chromeheader-span-flex-1",
|
|
94
|
+
"regex": "<ChromeHeader[^>]*>.{0,160}<span[[:space:]]+className=\"[^\"]*flex-1[^\"]*\">",
|
|
95
|
+
"severity": "block",
|
|
96
|
+
"rationale": "ChromeHeader title 該用 <h1 className=\"text-body-lg font-medium\"> 緊鄰 SidebarTrigger,不該用 <span flex-1> 撐空間造成 toggle + title 巨大間距"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "chromeheader-subtitle-second-line",
|
|
100
|
+
"regex": "<(ChromeHeader|PageHeader)[^>]*>[[:space:]]*<div[^>]*flex-col",
|
|
101
|
+
"severity": "block",
|
|
102
|
+
"rationale": "Chrome 家族永遠 single-row(header-canonical.spec.md:47,剛性 --chrome-header-height);title 下加副標/description = LLM 先驗回填(Polaris Page subtitle / Tailwind UI page heading 先驗),頁面說明文字歸 content 區,非 chrome。flex-col 直接子層 = 兩行結構簽名"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 結構性保留 token canonical(audit Dim 48 SSOT,2026-05-17 codified)
|
|
2
|
+
|
|
3
|
+
某些 token 看起來「0 consumer」但屬**結構性保留**,不該 retire。**Sub-agent 跑 audit Dim 48 抓 0-consumer candidate 時必先過此 table,屬下列 6 類則 retract finding(不列為 violation)**。
|
|
4
|
+
|
|
5
|
+
## 6 類結構性保留(對齊 Radix Color / Atlassian @atlaskit/tokens / Polaris polaris-tokens 三家共識)
|
|
6
|
+
|
|
7
|
+
| 類別 | Examples | 保留 rationale |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **1. Radix-style palette completeness** | `--color-{blue,deep-orange,orange,amber,yellow,lime,green,turquoise,indigo,purple,magenta}-{3,4,5,8,9,10}` / `--white-a{12,15,25,45,65,85}` / `--color-red-{1..10}`(red palette 因 semantic 重映射 deep-orange 而不直接消費)| Radix Color idiom 必 12 步階完整,即使目前只消費 step-{1,2,6,7} 給 Tag/Avatar,中間步階保留供未來 hue scale 擴充 / hue calibration 對照。Retire = 破壞 palette 完整契約,新加 hue 時需重新訂全套 |
|
|
10
|
+
| **2. Forward-looking consumer reservation** | `--brand` / `--color-brand` | 預留給 consumer-layer(`src/app` / product UI)消費的品牌色 token。DS 本身不消費,跟 `--primary`(DS UI accent)分層。Retire = 未來產品做品牌頁時要重補 token + spec |
|
|
11
|
+
| **3. Tailwind bridge alias to semantic state SOP** | `--color-status-{online,busy,away,offline}` / `--color-inverse-neutral-{hover,active}` | `@theme inline` bridge 讓 `bg-status-online` 類 utility 可用,即使現有 code 走 `var(--status-online)` direct(NameCard.tsx / Avatar.tsx / Tag.tsx 實際消費 underlying token 非 alias)。Bridge 是 future-proof Tailwind class consumption,retire = 限縮使用方式。(2026-06-04:原 `--color-warning-foreground` 已移除——改名 `--on-emphasis-dark`,white/dark on-fill 配對見 color.spec.md)|
|
|
12
|
+
| **4. State SOP 5 件套** | `--info-active / --success-active / --warning-active / --primary-text` 等 | semantic state 5 件套(base / hover / active / subtle / text)結構完整性,即使現有 active variant 無 consumer,保留供未來互動 state 擴充 |
|
|
13
|
+
| **5. Type scale completeness** | `--font-h1-size` / `--font-h4-size` 等 typography utility | Type scale 12-tier completeness,即使現有 production 只用 h2/h3/h5,h1/h4/h6 預留供 marketing / hero / drawer title 等場景 |
|
|
14
|
+
| **6. Elevation dark-mode pair** | `--elevation-100-hover / --elevation-200-hover` | `primitives.css:236,238,419,421` light + dark 雙模式各自定義 → 結構性 dual-tier,retire 會破 dark mode visual contract |
|
|
15
|
+
|
|
16
|
+
## Retire criteria 真實 strict(只有以下才 retire)
|
|
17
|
+
|
|
18
|
+
- 真實 0 consumer + **0 forward-looking reservation** + **0 dark-mode pair** + **0 palette completeness role**
|
|
19
|
+
- 對齊 Radix Color / Atlassian `@atlaskit/tokens` / Polaris polaris-tokens 三家 retire 政策共識
|
|
20
|
+
|
|
21
|
+
## Sub-agent 強制 triple-verify before propose retire
|
|
22
|
+
|
|
23
|
+
對每 candidate retire token,sub-agent 必 verify 3 layer:
|
|
24
|
+
|
|
25
|
+
1. **`grep -rn var(--TOKEN_NAME)` DS-wide**(含 `packages/design-system/src/**` + `src/app/**` + `src/explorations/**`)— 抓 direct `var()` consumption
|
|
26
|
+
2. **`grep -rn "TOKEN_NAME"` 排除 css/spec.md 定義 + template literal usage**(eg. `\`h-table-row-${size}\``)— 抓動態 utility class generation
|
|
27
|
+
3. **Cross-check 上 6 類**:屬任一 → retract finding,**不列 retire candidate**
|
|
28
|
+
|
|
29
|
+
**任一 layer 顯示「有 consumer / 屬結構保留」→ 從 retire report 中拿掉**(不要送 user 拍板浪費時間)。
|
|
30
|
+
|
|
31
|
+
## Audit Dim 48 false-positive 經驗(2026-05-17,user 抓教訓)
|
|
32
|
+
|
|
33
|
+
Sub-agent 用 narrow grep(只看 utility class hit,沒看 `var()` direct + template literal + dark mode override + forward-looking)抓 58 個 retire candidate;Layer A own re-verify 後 100% 為 false positive(全是結構性保留)。
|
|
34
|
+
|
|
35
|
+
User verbatim 2026-05-17:「每次抓出的問題你他媽要給我基於我們所有的檔案包括設計原則去再三確認到底是不是問題,避免明明就不是問題卻一直要我決策浪費我的時間」。
|
|
36
|
+
|
|
37
|
+
本檔 codify 後類似 audit 跑時自動辨識結構性保留 token,不再誤判。
|
|
38
|
+
|
|
39
|
+
## 引用
|
|
40
|
+
|
|
41
|
+
- `tokens/color/color.spec.md`「結構性保留 token canonical」(pointer 段)
|
|
42
|
+
- `.claude/skills/design-system-audit/SKILL.md` Dim 48(sub-agent prompt 必 cite 本檔)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Tailwind 使用完整陷阱對照(從 CLAUDE.md 拆出)
|
|
2
|
+
|
|
3
|
+
`.claude/rules/ui-development.md`「Tailwind 5 條核心」段保留最精要 rules 和一行 bug anchor;完整範例、完整禁止清單、每條 bug 的詳細歷史在本檔。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Tailwind v4 任意值:CSS variable 必須用 `var()` 包覆
|
|
8
|
+
|
|
9
|
+
**必須寫 `w-[var(--foo)]`,不能寫 `w-[--foo]`**。Tailwind v4 對任意值裡的 CSS variable 處理改了——舊的 `[--foo]` shorthand **不會自動包 `var()`**,會被當成 custom property declaration,整個 class **靜默失效**(不報錯,但完全沒效果)。
|
|
10
|
+
|
|
11
|
+
**曾經發生的 bug**:Sidebar 從 shadcn 複製的 `w-[--sidebar-width]` 在 8 個位置寬度全失效,sidebar 寬度變成 content fallback 導致主內容被蓋住。
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
// ❌ 錯(v4 失效)
|
|
15
|
+
<div className="w-[--sidebar-width] min-w-[--sidebar-width-min]" />
|
|
16
|
+
|
|
17
|
+
// ✅ 對
|
|
18
|
+
<div className="w-[var(--sidebar-width)] min-w-[var(--sidebar-width-min)]" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**自我檢查**:若 CSS var 相關寬高看起來怪怪的,先 `grep '\[--[a-z]'` 在 src 裡找有沒有漏網的 shorthand 語法。
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 圓角對應表
|
|
26
|
+
|
|
27
|
+
| Utility class | 值 |
|
|
28
|
+
|----------------|---------------------------|
|
|
29
|
+
| `rounded-md` | 4px(--radius-md) |
|
|
30
|
+
| `rounded-lg` | 8px(--radius-lg) |
|
|
31
|
+
| `rounded-full` | 9999px(--radius-full)|
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## tailwind-merge 自訂 utility 註冊(技術陷阱)
|
|
36
|
+
|
|
37
|
+
新增任何 `text-*`、`bg-*`、`border-*`、`ring-*` 自訂 utility 後,**必須到 `lib/utils.ts` 顯式註冊到正確的 group**(font-size / text-color 等)。否則 tailwind-merge 會用 heuristic 猜分組,把不衝突的 class 誤判為衝突並 strip 掉。
|
|
38
|
+
|
|
39
|
+
**曾發生的 bug**:`text-body`(font-size)和 `text-fg-secondary`(color)被誤判同組,description 失去 font-size。
|
|
40
|
+
|
|
41
|
+
**診斷法**:`cn()` 後某個 class 消失 → 99% 是 tailwind-merge 誤判 → 去 `lib/utils.ts` 註冊。
|
|
42
|
+
**逃生艙**:inline style + CSS variable(`style={{ fontSize: 'var(--font-body-size)' }}`)。
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 何時可以 / 不可以用 Tailwind utility
|
|
47
|
+
|
|
48
|
+
### 核可清單(我們的元件 code 可以直接用)
|
|
49
|
+
|
|
50
|
+
| 類別 | 允許 utility | 備註 |
|
|
51
|
+
|------|-------------|------|
|
|
52
|
+
| **Layout / Flex / Grid** | `flex`, `grid`, `items-*`, `justify-*`, `gap-*`, `p-*`, `m-*`, `w-*`, `h-*`, `min-*`, `max-*` 等 Tailwind 預設 | spacing scale `p-4` / `gap-2` 等都 OK |
|
|
53
|
+
| **Display / Position** | `block`, `hidden`, `absolute`, `relative`, `z-*` | |
|
|
54
|
+
| **我們 DS 自訂 token utility** | `bg-surface-raised`, `text-foreground`, `text-fg-secondary`, `text-fg-muted`, `border-border`, `border-divider`, `text-body`, `text-caption`, `h-field-*`, `rounded-md` 等 | 所有 semantic token 對應的 utility |
|
|
55
|
+
| **CSS variable 任意值** | `shadow-[var(--elevation-200)]`, `h-[var(--field-height-md)]` 等 | **必須 `var()` 包覆**,不能 `[--foo]` shorthand |
|
|
56
|
+
|
|
57
|
+
### 禁止清單
|
|
58
|
+
|
|
59
|
+
| 類別 | 為什麼禁止 | 改用 |
|
|
60
|
+
|------|----------|------|
|
|
61
|
+
| `shadow-sm/md/lg/xl/2xl` | 繞過 elevation token 系統,沒跟 dark mode 調整聯動 | 用 `shadow-[var(--elevation-N)]` 其中 N ∈ `{100, 200}`(+`-hover` 變體;per elevation.spec.md tier;2026-05-31 修:無 300)|
|
|
62
|
+
| 硬寫色值 `#xxx`, `rgb(...)`, `bg-red-500` | 繞過 semantic token,dark mode / brand swap 會斷 | 對應 semantic token |
|
|
63
|
+
| Tailwind 預設 typography `text-xs/sm/base/lg` | 我們有自己的 `text-caption/body/body-lg/h1/h2` 系統 | 用我們的 typography token |
|
|
64
|
+
| 硬寫 px 值 `w-[48px]` 當有 token | 失去 token 關聯,改值時零散處要一起改 | 對應 token 或 calc() |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## shadcn compat aliases — 不給我們元件用
|
|
69
|
+
|
|
70
|
+
`semantic.css` 的「shadcn Compat Aliases」段(`--popover`, `--popover-foreground`, `--muted-foreground`, `--accent`, `--accent-foreground` 等)**只是 `npx shadcn add X` 複製貼上時的安全網**,讓 shadcn 原生 className 不會因找不到 CSS variable 而 fallback。
|
|
71
|
+
|
|
72
|
+
**我們自己 design-system 的元件 code 禁止直接使用這些 alias**:
|
|
73
|
+
|
|
74
|
+
| 禁止(shadcn alias) | 必用(我們的 token) |
|
|
75
|
+
|--------------------|--------------------|
|
|
76
|
+
| `bg-popover` | `bg-surface-raised` |
|
|
77
|
+
| `text-popover-foreground` | `text-foreground` |
|
|
78
|
+
| `text-muted-foreground` | `text-fg-muted` |
|
|
79
|
+
| `bg-accent` | `bg-neutral-hover` |
|
|
80
|
+
| `text-accent-foreground` | `text-foreground` |
|
|
81
|
+
| `bg-muted` | 這個是我們核可的 token(neutral-2 subtle bg),**不是** shadcn alias,OK 用 |
|
|
82
|
+
|
|
83
|
+
**原則**:shadcn 原生 utility 只在 shadcn 自動生成的檔案**暫時**存在(作遷移緩衝);任何人類編輯或新增的元件 code 都必須用我們的 direct token。**用 shadcn alias = 設計 bug**,優先改為 direct token。
|
|
84
|
+
|
|
85
|
+
**為什麼**:shadcn alias 是「臨時橋」讓 shadcn add 不炸;我們有自己 design opinion 後直接用 own token,保持 DS 單一真實來源。允許 shadcn alias 進我們的 code = 慢慢讓 shadcn 命名污染回流,DS 自主性退化。
|
|
86
|
+
|
|
87
|
+
**曾經發生的 bug**:Popover.tsx / Command.tsx 保留 shadcn template 的 `bg-popover`, `text-popover-foreground`, `text-muted-foreground`, `bg-accent`, `text-accent-foreground` 多處,2026-04-18 session 時 audit 發現統一遷移為 direct token(`bg-surface-raised` / `text-foreground` / `text-fg-muted` / `bg-neutral-hover`)。hook `lib/_token_hygiene.sh`(由 `post_edit_dispatcher.sh` source)現已自動攔截此類回流(Check 1 shadcn alias)。
|