pixelize-design-library 2.3.22 → 2.4.1
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/settings.local.json +51 -0
- package/.cursor/TASK-SETUP.md +43 -0
- package/.cursor/agents/be-impl.md +37 -0
- package/.cursor/agents/fe-impl.md +39 -0
- package/.cursor/agents/task-plan.md +56 -0
- package/.cursor/agents/test-create.md +31 -0
- package/.cursor/agents/test-exec.md +26 -0
- package/.cursor/hooks/task-hint.env +1 -0
- package/.cursor/hooks/task-skill-nudge.sh +71 -0
- package/.cursor/hooks/task-slash-guard.sh +31 -0
- package/.cursor/hooks.json +13 -0
- package/.cursor/modules/account-management/MODULE.md +34 -0
- package/.cursor/modules/buttons/MODULE.md +47 -0
- package/.cursor/modules/cards/MODULE.md +55 -0
- package/.cursor/modules/charts/MODULE.md +40 -0
- package/.cursor/modules/common/MODULE.md +36 -0
- package/.cursor/modules/contact-auth/MODULE.md +19 -0
- package/.cursor/modules/data-display/MODULE.md +42 -0
- package/.cursor/modules/feedback/MODULE.md +32 -0
- package/.cursor/modules/form/MODULE.md +13 -0
- package/.cursor/modules/inputs-basic/MODULE.md +42 -0
- package/.cursor/modules/inputs-date-file/MODULE.md +56 -0
- package/.cursor/modules/inputs-select/MODULE.md +27 -0
- package/.cursor/modules/inputs-toggle/MODULE.md +18 -0
- package/.cursor/modules/kanban/MODULE.md +22 -0
- package/.cursor/modules/layout-navigation/MODULE.md +269 -0
- package/.cursor/modules/overlays/MODULE.md +69 -0
- package/.cursor/modules/playground/MODULE.md +28 -0
- package/.cursor/modules/table/MODULE.md +78 -0
- package/.cursor/modules/theme/MODULE.md +314 -0
- package/.cursor/modules/types-exports/MODULE.md +17 -0
- package/.cursor/modules/utility-ui/MODULE.md +50 -0
- package/.cursor/modules/utils-hooks/MODULE.md +35 -0
- package/.cursor/pixelize-task-statusline.sh +64 -0
- package/.cursor/plans/blocked/.gitkeep +0 -0
- package/.cursor/plans/current.md +12 -0
- package/.cursor/plans/current.theme-tokens-dark-mode.md +77 -0
- package/.cursor/plans/current.theme-tokens-dark.md +155 -0
- package/.cursor/plans/done/.gitkeep +0 -0
- package/.cursor/rules +31 -0
- package/.cursor/skills/task/SKILL.md +167 -0
- package/CLAUDE.md +148 -0
- package/README.md +77 -10
- package/__mocks__/styleMock.js +8 -0
- package/coverage/clover.xml +405 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/coverage-summary.json +50 -0
- package/coverage/lcov-report/Button/Button.tsx.html +244 -0
- package/coverage/lcov-report/Button/index.html +116 -0
- package/coverage/lcov-report/Checkbox/Checkbox.tsx.html +433 -0
- package/coverage/lcov-report/Checkbox/index.html +116 -0
- package/coverage/lcov-report/Common/ErrorMessage.tsx.html +148 -0
- package/coverage/lcov-report/Common/FormLabel.tsx.html +331 -0
- package/coverage/lcov-report/Common/HelperText.tsx.html +124 -0
- package/coverage/lcov-report/Common/index.html +146 -0
- package/coverage/lcov-report/Components/Button/Button.tsx.html +244 -0
- package/coverage/lcov-report/Components/Button/index.html +116 -0
- package/coverage/lcov-report/Components/Checkbox/Checkbox.tsx.html +433 -0
- package/coverage/lcov-report/Components/Checkbox/index.html +116 -0
- package/coverage/lcov-report/Components/Common/ErrorMessage.tsx.html +148 -0
- package/coverage/lcov-report/Components/Common/FormLabel.tsx.html +331 -0
- package/coverage/lcov-report/Components/Common/HelperText.tsx.html +124 -0
- package/coverage/lcov-report/Components/Common/index.html +146 -0
- package/coverage/lcov-report/Components/CustomModulesTable/CustomModulesTable.tsx.html +712 -0
- package/coverage/lcov-report/Components/CustomModulesTable/DeleteModuleModal.tsx.html +343 -0
- package/coverage/lcov-report/Components/CustomModulesTable/EditModuleModal.tsx.html +313 -0
- package/coverage/lcov-report/Components/CustomModulesTable/index.html +146 -0
- package/coverage/lcov-report/Components/Divider/Divider.tsx.html +133 -0
- package/coverage/lcov-report/Components/Divider/index.html +116 -0
- package/coverage/lcov-report/Components/Dropdown/DropDown.tsx.html +994 -0
- package/coverage/lcov-report/Components/Dropdown/index.html +116 -0
- package/coverage/lcov-report/Components/EmptyState/EmptyState.tsx.html +466 -0
- package/coverage/lcov-report/Components/EmptyState/index.html +116 -0
- package/coverage/lcov-report/Components/Header/HeaderActions.tsx.html +373 -0
- package/coverage/lcov-report/Components/Header/index.html +116 -0
- package/coverage/lcov-report/Components/Input/TextInput.tsx.html +487 -0
- package/coverage/lcov-report/Components/Input/index.html +116 -0
- package/coverage/lcov-report/Components/Input/textInputIconSize.ts.html +205 -0
- package/coverage/lcov-report/Components/KanbanBoard/AccountCard.tsx.html +547 -0
- package/coverage/lcov-report/Components/KanbanBoard/AccountRow.tsx.html +190 -0
- package/coverage/lcov-report/Components/KanbanBoard/KanbanActions/KanbanActions.tsx.html +247 -0
- package/coverage/lcov-report/Components/KanbanBoard/KanbanActions/index.html +116 -0
- package/coverage/lcov-report/Components/KanbanBoard/KanbanBoard.tsx.html +3598 -0
- package/coverage/lcov-report/Components/KanbanBoard/MeasuredItem.tsx.html +283 -0
- package/coverage/lcov-report/Components/KanbanBoard/index.html +161 -0
- package/coverage/lcov-report/Components/OrganizationDetails/CreateOrgModal.tsx.html +511 -0
- package/coverage/lcov-report/Components/OrganizationDetails/DeleteOrgModal.tsx.html +334 -0
- package/coverage/lcov-report/Components/OrganizationDetails/OrganizationDetails.tsx.html +1519 -0
- package/coverage/lcov-report/Components/OrganizationDetails/index.html +146 -0
- package/coverage/lcov-report/Components/RolesPermission/DeleteRoleModal.tsx.html +328 -0
- package/coverage/lcov-report/Components/RolesPermission/RolesPermission.tsx.html +1732 -0
- package/coverage/lcov-report/Components/RolesPermission/index.html +131 -0
- package/coverage/lcov-report/Components/SearchSelect/SearchSelect.tsx.html +2575 -0
- package/coverage/lcov-report/Components/SearchSelect/SelectTruncatedLabel.tsx.html +202 -0
- package/coverage/lcov-report/Components/SearchSelect/index.html +146 -0
- package/coverage/lcov-report/Components/SearchSelect/searchSelectSize.ts.html +496 -0
- package/coverage/lcov-report/Components/Select/Select.tsx.html +361 -0
- package/coverage/lcov-report/Components/Select/index.html +116 -0
- package/coverage/lcov-report/Components/SideBar/components/OtherApps.tsx.html +562 -0
- package/coverage/lcov-report/Components/SideBar/components/OverflowTooltipText.tsx.html +346 -0
- package/coverage/lcov-report/Components/SideBar/components/index.html +116 -0
- package/coverage/lcov-report/Components/SignInActivityTable/SignInActivityTable.tsx.html +490 -0
- package/coverage/lcov-report/Components/SignInActivityTable/index.html +116 -0
- package/coverage/lcov-report/Components/Table/components/TableActions.tsx.html +595 -0
- package/coverage/lcov-report/Components/Table/components/TableBody.tsx.html +2212 -0
- package/coverage/lcov-report/Components/Table/components/TableGroupRow.tsx.html +358 -0
- package/coverage/lcov-report/Components/Table/components/TableLoading.tsx.html +358 -0
- package/coverage/lcov-report/Components/Table/components/index.html +161 -0
- package/coverage/lcov-report/Components/Table/settings/ManageColumns.tsx.html +856 -0
- package/coverage/lcov-report/Components/Table/settings/index.html +116 -0
- package/coverage/lcov-report/Components/Tag/Tag.styles.tsx.html +331 -0
- package/coverage/lcov-report/Components/Tag/Tag.tsx.html +256 -0
- package/coverage/lcov-report/Components/Tag/index.html +131 -0
- package/coverage/lcov-report/Components/ToolTip/ToolTip.tsx.html +286 -0
- package/coverage/lcov-report/Components/ToolTip/index.html +116 -0
- package/coverage/lcov-report/Components/UserDetails/AddUserModal.tsx.html +709 -0
- package/coverage/lcov-report/Components/UserDetails/ChangeRoleModal.tsx.html +505 -0
- package/coverage/lcov-report/Components/UserDetails/DeactivateConfirmModal.tsx.html +379 -0
- package/coverage/lcov-report/Components/UserDetails/UserDetails.tsx.html +1900 -0
- package/coverage/lcov-report/Components/UserDetails/index.html +161 -0
- package/coverage/lcov-report/EmptyState/EmptyState.tsx.html +466 -0
- package/coverage/lcov-report/EmptyState/index.html +116 -0
- package/coverage/lcov-report/Hooks/index.html +116 -0
- package/coverage/lcov-report/Hooks/usePreferences.ts.html +421 -0
- package/coverage/lcov-report/Input/TextInput.tsx.html +487 -0
- package/coverage/lcov-report/Input/index.html +131 -0
- package/coverage/lcov-report/Input/textInputIconSize.ts.html +205 -0
- package/coverage/lcov-report/KanbanBoard.tsx.html +3481 -0
- package/coverage/lcov-report/OrganizationDetails/CreateOrgModal.tsx.html +511 -0
- package/coverage/lcov-report/OrganizationDetails/DeleteOrgModal.tsx.html +334 -0
- package/coverage/lcov-report/OrganizationDetails/OrganizationDetails.tsx.html +1519 -0
- package/coverage/lcov-report/OrganizationDetails/index.html +146 -0
- package/coverage/lcov-report/RolesPermission/DeleteRoleModal.tsx.html +328 -0
- package/coverage/lcov-report/RolesPermission/RolesPermission.tsx.html +1732 -0
- package/coverage/lcov-report/RolesPermission/index.html +116 -0
- package/coverage/lcov-report/SearchSelect/SearchSelect.tsx.html +2575 -0
- package/coverage/lcov-report/SearchSelect/SelectTruncatedLabel.tsx.html +202 -0
- package/coverage/lcov-report/SearchSelect/index.html +146 -0
- package/coverage/lcov-report/SearchSelect/searchSelectSize.ts.html +496 -0
- package/coverage/lcov-report/Table/CompactSelect.tsx.html +379 -0
- package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +514 -0
- package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +373 -0
- package/coverage/lcov-report/Table/Components/Pagination.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableActions.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableBody.tsx.html +1027 -0
- package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +397 -0
- package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +1060 -0
- package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +361 -0
- package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +337 -0
- package/coverage/lcov-report/Table/Components/index.html +266 -0
- package/coverage/lcov-report/Table/Components/useDebounce.ts.html +178 -0
- package/coverage/lcov-report/Table/Components/useTable.ts.html +778 -0
- package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +1810 -0
- package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +178 -0
- package/coverage/lcov-report/Table/Table.tsx.html +1567 -0
- package/coverage/lcov-report/Table/TableProps.tsx.html +658 -0
- package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +619 -0
- package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +229 -0
- package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +532 -0
- package/coverage/lcov-report/Table/TableSettings/index.html +146 -0
- package/coverage/lcov-report/Table/TableToDo.tsx.html +973 -0
- package/coverage/lcov-report/Table/TextOperationControls.tsx.html +271 -0
- package/coverage/lcov-report/Table/filterTypes.ts.html +97 -0
- package/coverage/lcov-report/Table/index.html +176 -0
- package/coverage/lcov-report/Table/settings/ManageColumns.tsx.html +856 -0
- package/coverage/lcov-report/Table/settings/index.html +116 -0
- package/coverage/lcov-report/Tag/Tag.tsx.html +256 -0
- package/coverage/lcov-report/Tag/index.html +116 -0
- package/coverage/lcov-report/Theme/buildBrandTokens.ts.html +175 -0
- package/coverage/lcov-report/Theme/chartColorsFromTheme.ts.html +214 -0
- package/coverage/lcov-report/Theme/index.html +131 -0
- package/coverage/lcov-report/Theme/useCustomTheme.ts.html +100 -0
- package/coverage/lcov-report/ToolTip/ToolTip.tsx.html +286 -0
- package/coverage/lcov-report/ToolTip/index.html +116 -0
- package/coverage/lcov-report/UserDetails/AddUserModal.tsx.html +709 -0
- package/coverage/lcov-report/UserDetails/ChangeRoleModal.tsx.html +505 -0
- package/coverage/lcov-report/UserDetails/index.html +116 -0
- package/coverage/lcov-report/Utils/functions.ts.html +106 -0
- package/coverage/lcov-report/Utils/index.html +116 -0
- package/coverage/lcov-report/Utils/table.ts.html +1189 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +251 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +981 -0
- package/dist/App.d.ts.map +1 -1
- package/dist/Assets/defaultLogo.tsx +30 -0
- package/dist/Components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/Components/Accordion/Accordion.js +15 -12
- package/dist/Components/Accordion/accordionColors.d.ts +6 -0
- package/dist/Components/Accordion/accordionColors.d.ts.map +1 -0
- package/dist/Components/Accordion/accordionColors.js +20 -0
- package/dist/Components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/Components/AlertDialog/AlertDialog.js +4 -1
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts.map +1 -1
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +5 -1
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.d.ts.map +1 -1
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +6 -4
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts.map +1 -1
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +5 -1
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.d.ts.map +1 -1
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +5 -1
- package/dist/Components/Button/Button.styles.d.ts.map +1 -1
- package/dist/Components/Button/Button.styles.js +100 -47
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts.map +1 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +11 -3
- package/dist/Components/Card/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +17 -12
- package/dist/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Components/Checkbox/Checkbox.js +2 -1
- package/dist/Components/Common/ErrorComponent.d.ts.map +1 -1
- package/dist/Components/Common/ErrorComponent.js +7 -3
- package/dist/Components/Common/ErrorMessage.d.ts.map +1 -1
- package/dist/Components/Common/ErrorMessage.js +7 -1
- package/dist/Components/Common/FormLabel.d.ts.map +1 -1
- package/dist/Components/Common/FormLabel.js +7 -1
- package/dist/Components/Common/Label.d.ts.map +1 -1
- package/dist/Components/Common/Label.js +4 -2
- package/dist/Components/Common/fieldStyles.d.ts.map +1 -1
- package/dist/Components/Common/fieldStyles.js +3 -1
- package/dist/Components/CopyButton/CopyButton.d.ts.map +1 -1
- package/dist/Components/CopyButton/CopyButton.js +14 -6
- package/dist/Components/CustomModulesTable/CustomModulesTable.d.ts.map +1 -1
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +9 -6
- package/dist/Components/CustomModulesTable/DeleteModuleModal.d.ts.map +1 -1
- package/dist/Components/CustomModulesTable/DeleteModuleModal.js +2 -2
- package/dist/Components/CustomModulesTable/EditModuleModal.d.ts.map +1 -1
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -2
- package/dist/Components/DatePicker/CalendarPanel.js +1 -1
- package/dist/Components/DatePicker/DatePicker.js +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +1 -1
- package/dist/Components/DatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/Components/DatePicker/SingleDatePicker.js +1 -1
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts.map +1 -1
- package/dist/Components/DatePicker/TimeOnlyPicker.js +3 -1
- package/dist/Components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Components/Drawer/Drawer.js +4 -1
- package/dist/Components/Dropdown/DropDown.js +5 -5
- package/dist/Components/Editor/Editor.d.ts.map +1 -1
- package/dist/Components/Editor/Editor.js +32 -2
- package/dist/Components/Editor/joditThemeVars.d.ts +21 -0
- package/dist/Components/Editor/joditThemeVars.d.ts.map +1 -0
- package/dist/Components/Editor/joditThemeVars.js +70 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts.map +1 -1
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +5 -1
- package/dist/Components/EmptyState/EmptyState.js +3 -3
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts.map +1 -1
- package/dist/Components/FieldSelectModal/FieldSelectModal.js +4 -2
- package/dist/Components/FilePreview/FilePreview.d.ts.map +1 -1
- package/dist/Components/FilePreview/FilePreview.js +7 -1
- package/dist/Components/FileUpload/FileUpload.js +4 -4
- package/dist/Components/FileUploader/FileUploader.d.ts.map +1 -1
- package/dist/Components/FileUploader/FileUploader.js +7 -2
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts.map +1 -1
- package/dist/Components/FilterSidebar/FilterSidebar.js +166 -142
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +12 -0
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts.map +1 -0
- package/dist/Components/FilterSidebar/filterHoverStyle.js +14 -0
- package/dist/Components/Form/FormWrapper.js +2 -2
- package/dist/Components/Header/Header.d.ts +17 -0
- package/dist/Components/Header/Header.d.ts.map +1 -1
- package/dist/Components/Header/Header.js +34 -6
- package/dist/Components/Header/HeaderActions.d.ts.map +1 -1
- package/dist/Components/Header/HeaderActions.js +3 -2
- package/dist/Components/Header/components/desktopMenu.d.ts.map +1 -1
- package/dist/Components/Header/components/desktopMenu.js +21 -5
- package/dist/Components/Input/Input/Input.d.ts.map +1 -1
- package/dist/Components/Input/Input/Input.js +6 -2
- package/dist/Components/Input/Switch/InputSwitch.d.ts.map +1 -1
- package/dist/Components/Input/Switch/InputSwitch.js +4 -2
- package/dist/Components/Input/TextInput.styles.d.ts.map +1 -1
- package/dist/Components/Input/TextInput.styles.js +6 -1
- package/dist/Components/InputTextArea/InputTextArea.style.d.ts.map +1 -1
- package/dist/Components/InputTextArea/InputTextArea.style.js +4 -1
- package/dist/Components/KanbanBoard/AccountCard.js +4 -4
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -2
- package/dist/Components/Modal/Modal.d.ts.map +1 -1
- package/dist/Components/Modal/Modal.js +4 -1
- package/dist/Components/MoreItems/MoreItems.d.ts.map +1 -1
- package/dist/Components/MoreItems/MoreItems.js +10 -4
- package/dist/Components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/Components/MultiSelect/MultiSelect.js +5 -2
- package/dist/Components/NavigationBar/NavigationBar.d.ts.map +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +8 -2
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts.map +1 -1
- package/dist/Components/NoteTextArea/NoteTextArea.js +5 -2
- package/dist/Components/Notification/Notification.d.ts.map +1 -1
- package/dist/Components/Notification/Notification.js +9 -5
- package/dist/Components/NumberInput/NumberInput.styles.d.ts.map +1 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +4 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts.map +1 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +14 -7
- package/dist/Components/OrganizationDetails/CreateOrgModal.d.ts.map +1 -1
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +1 -1
- package/dist/Components/OrganizationDetails/DeleteOrgModal.js +2 -2
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +11 -11
- package/dist/Components/PdfViewer/PdfViewer.js +1 -2
- package/dist/Components/PinInput/PinInput.d.ts.map +1 -1
- package/dist/Components/PinInput/PinInput.js +5 -1
- package/dist/Components/PinInputs/PinInputs.d.ts.map +1 -1
- package/dist/Components/PinInputs/PinInputs.js +3 -1
- package/dist/Components/ProductCard/ProductCard.js +1 -1
- package/dist/Components/ProductCard/ProductPrice.d.ts.map +1 -1
- package/dist/Components/ProductCard/ProductPrice.js +7 -4
- package/dist/Components/ProductCard/ProductReview.d.ts.map +1 -1
- package/dist/Components/ProductCard/ProductReview.js +7 -3
- package/dist/Components/ProductCard/ProductTags.js +1 -1
- package/dist/Components/ProductDetails/ProductDtlPrice.d.ts.map +1 -1
- package/dist/Components/ProductDetails/ProductDtlPrice.js +4 -1
- package/dist/Components/ProductDetails/ProductImageSlider.js +4 -4
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts.map +1 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +10 -7
- package/dist/Components/Reorder/Reorder.js +2 -1
- package/dist/Components/RolesPermission/DeleteRoleModal.d.ts.map +1 -1
- package/dist/Components/RolesPermission/DeleteRoleModal.js +4 -2
- package/dist/Components/RolesPermission/RolesPermission.js +6 -6
- package/dist/Components/SearchSelect/SearchSelect.d.ts.map +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +4 -4
- package/dist/Components/Select/Select.styles.d.ts.map +1 -1
- package/dist/Components/Select/Select.styles.js +4 -1
- package/dist/Components/SelectSearch/SelectSearch.d.ts.map +1 -1
- package/dist/Components/SelectSearch/SelectSearch.js +5 -3
- package/dist/Components/SideBar/SecondaryBar.d.ts.map +1 -1
- package/dist/Components/SideBar/SecondaryBar.js +14 -3
- package/dist/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/Components/SideBar/SideBar.js +18 -4
- package/dist/Components/SideBar/components/MenuItemBox.d.ts.map +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.js +13 -9
- package/dist/Components/SideBar/components/MenuPopoverContent.d.ts.map +1 -1
- package/dist/Components/SideBar/components/MenuPopoverContent.js +7 -2
- package/dist/Components/SideBar/sidebarAccentColors.d.ts +21 -0
- package/dist/Components/SideBar/sidebarAccentColors.d.ts.map +1 -0
- package/dist/Components/SideBar/sidebarAccentColors.js +36 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.d.ts.map +1 -1
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +7 -6
- package/dist/Components/StageProgress/StageProgress.d.ts.map +1 -1
- package/dist/Components/StageProgress/StageProgress.js +9 -4
- package/dist/Components/StageProgress/StageProgressProps.d.ts.map +1 -1
- package/dist/Components/StageProgress/StageProgressProps.js +13 -4
- package/dist/Components/StageProgress/StepperStage.js +1 -1
- package/dist/Components/Switch/Switch.d.ts.map +1 -1
- package/dist/Components/Switch/Switch.js +5 -3
- package/dist/Components/Table/Table.d.ts.map +1 -1
- package/dist/Components/Table/Table.js +9 -9
- package/dist/Components/Table/TableProps.d.ts +1 -0
- package/dist/Components/Table/TableProps.d.ts.map +1 -1
- package/dist/Components/Table/components/HeaderActions.d.ts.map +1 -1
- package/dist/Components/Table/components/HeaderActions.js +2 -1
- package/dist/Components/Table/components/TableActions.js +1 -1
- package/dist/Components/Table/components/TableBody.d.ts.map +1 -1
- package/dist/Components/Table/components/TableBody.js +21 -15
- package/dist/Components/Table/components/TableHeader.d.ts.map +1 -1
- package/dist/Components/Table/components/TableHeader.js +7 -4
- package/dist/Components/Table/components/tableRowHoverStyle.d.ts +13 -0
- package/dist/Components/Table/components/tableRowHoverStyle.d.ts.map +1 -0
- package/dist/Components/Table/components/tableRowHoverStyle.js +26 -0
- package/dist/Components/Table/filters/CompactSelect.d.ts.map +1 -1
- package/dist/Components/Table/filters/CompactSelect.js +4 -1
- package/dist/Components/Table/filters/LeftFilterPane.d.ts.map +1 -1
- package/dist/Components/Table/filters/LeftFilterPane.js +5 -4
- package/dist/Components/Tag/Tag.styles.d.ts.map +1 -1
- package/dist/Components/Tag/Tag.styles.js +21 -8
- package/dist/Components/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Components/Timeline/Timeline.js +18 -17
- package/dist/Components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/Components/Toaster/Toaster.js +8 -5
- package/dist/Components/Toggle/TableToggle.js +2 -2
- package/dist/Components/ToolTip/ToolTip.d.ts.map +1 -1
- package/dist/Components/ToolTip/ToolTip.js +14 -2
- package/dist/Components/Trail/EditableCell.js +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.d.ts.map +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.js +9 -4
- package/dist/Components/UserDetails/AddUserModal.d.ts.map +1 -1
- package/dist/Components/UserDetails/AddUserModal.js +1 -1
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -2
- package/dist/Components/UserDetails/DeactivateConfirmModal.d.ts.map +1 -1
- package/dist/Components/UserDetails/DeactivateConfirmModal.js +5 -2
- package/dist/Components/UserDetails/UserDetails.d.ts.map +1 -1
- package/dist/Components/UserDetails/UserDetails.js +15 -8
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.d.ts.map +1 -1
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +3 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.d.ts.map +1 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +5 -1
- package/dist/Theme/chakra/common.web.d.ts +171 -0
- package/dist/Theme/chakra/common.web.d.ts.map +1 -0
- package/dist/Theme/chakra/common.web.js +21 -0
- package/dist/Theme/chakra/componentStyles.d.ts +13 -0
- package/dist/Theme/chakra/componentStyles.d.ts.map +1 -0
- package/dist/Theme/chakra/componentStyles.js +88 -0
- package/dist/Theme/chakra/createBrandTheme.d.ts +18 -0
- package/dist/Theme/chakra/createBrandTheme.d.ts.map +1 -0
- package/dist/Theme/chakra/createBrandTheme.js +78 -0
- package/dist/Theme/chakra/fonts.web.d.ts +42 -0
- package/dist/Theme/chakra/fonts.web.d.ts.map +1 -0
- package/dist/Theme/chakra/fonts.web.js +15 -0
- package/dist/Theme/index.d.ts +29 -8
- package/dist/Theme/index.d.ts.map +1 -1
- package/dist/Theme/index.js +54 -22
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +36 -0
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -0
- package/dist/Theme/provider/PixelizeThemeProvider.js +91 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts +8 -0
- package/dist/Theme/provider/ThemeSwitcher.d.ts.map +1 -0
- package/dist/Theme/provider/ThemeSwitcher.js +99 -0
- package/dist/Theme/provider/colorModeStorage.d.ts +10 -0
- package/dist/Theme/provider/colorModeStorage.d.ts.map +1 -0
- package/dist/Theme/provider/colorModeStorage.js +106 -0
- package/dist/Theme/provider/index.d.ts +6 -0
- package/dist/Theme/provider/index.d.ts.map +1 -0
- package/dist/Theme/provider/index.js +9 -0
- package/dist/Theme/provider/useThemeMode.d.ts +3 -0
- package/dist/Theme/provider/useThemeMode.d.ts.map +1 -0
- package/dist/Theme/provider/useThemeMode.js +13 -0
- package/dist/Theme/themeProps.d.ts +10 -373
- package/dist/Theme/themeProps.d.ts.map +1 -1
- package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/emerald/palette.light.js +135 -0
- package/dist/Theme/tokens/brands/index.d.ts +28 -0
- package/dist/Theme/tokens/brands/index.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/index.js +93 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/lavender/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/lavender/palette.light.js +316 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/meadow/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/meadow/palette.light.js +133 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/radiant/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/radiant/palette.light.js +135 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/rosewood/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +139 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/skyline/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/skyline/palette.light.js +133 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/slate/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/slate/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/slate/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/slate/palette.light.js +137 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts +7 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/storefront/palette.dark.js +13 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/storefront/palette.light.js +127 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +204 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +204 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +375 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.d.ts.map +1 -0
- package/dist/Theme/tokens/brands/zinc/palette.light.js +383 -0
- package/dist/Theme/tokens/builders/accentText.d.ts +56 -0
- package/dist/Theme/tokens/builders/accentText.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/accentText.js +92 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.d.ts +16 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/buildBrandTokens.js +33 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +23 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +282 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts +17 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +26 -0
- package/dist/Theme/tokens/builders/color.d.ts +50 -0
- package/dist/Theme/tokens/builders/color.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/color.js +156 -0
- package/dist/Theme/tokens/builders/index.d.ts +6 -0
- package/dist/Theme/tokens/builders/index.d.ts.map +1 -0
- package/dist/Theme/tokens/builders/index.js +21 -0
- package/dist/Theme/tokens/index.d.ts +15 -0
- package/dist/Theme/tokens/index.d.ts.map +1 -0
- package/dist/Theme/tokens/index.js +30 -0
- package/dist/Theme/tokens/primitives/breakpoints.d.ts +9 -0
- package/dist/Theme/tokens/primitives/breakpoints.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/breakpoints.js +10 -0
- package/dist/Theme/tokens/primitives/index.d.ts +10 -0
- package/dist/Theme/tokens/primitives/index.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/index.js +27 -0
- package/dist/Theme/tokens/primitives/letterSpacings.d.ts +10 -0
- package/dist/Theme/tokens/primitives/letterSpacings.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/letterSpacings.js +11 -0
- package/dist/Theme/tokens/primitives/lineHeights.d.ts +19 -0
- package/dist/Theme/tokens/primitives/lineHeights.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/lineHeights.js +20 -0
- package/dist/Theme/tokens/primitives/radii.d.ts +13 -0
- package/dist/Theme/tokens/primitives/radii.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/radii.js +14 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/shadows.js +17 -0
- package/dist/Theme/tokens/primitives/sizes.d.ts +63 -0
- package/dist/Theme/tokens/primitives/sizes.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/sizes.js +39 -0
- package/dist/Theme/tokens/primitives/space.d.ts +34 -0
- package/dist/Theme/tokens/primitives/space.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/space.js +35 -0
- package/dist/Theme/tokens/primitives/typography.d.ts +73 -0
- package/dist/Theme/tokens/primitives/typography.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/typography.js +43 -0
- package/dist/Theme/tokens/primitives/zIndices.d.ts +17 -0
- package/dist/Theme/tokens/primitives/zIndices.d.ts.map +1 -0
- package/dist/Theme/tokens/primitives/zIndices.js +18 -0
- package/dist/Theme/tokens/types.d.ts +116 -0
- package/dist/Theme/tokens/types.d.ts.map +1 -0
- package/dist/Theme/tokens/types.js +8 -0
- package/dist/Utils/table.d.ts +9 -2
- package/dist/Utils/table.d.ts.map +1 -1
- package/dist/Utils/table.js +23 -7
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +52 -1
- package/eslint.config.js +48 -0
- package/index.html +13 -0
- package/package.json +1 -5
- package/vite.config.ts +13 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
# RESUME POINT — paused 2026-07-16 ~12:50, user resuming in ~1hr
|
|
5
|
+
|
|
6
|
+
## State: SAFE TO PAUSE
|
|
7
|
+
Working tree is green: `tsc` 0, `lint` clean, **679/679 tests**, `build` 0.
|
|
8
|
+
Nothing committed yet. Branch `feature/theme-tokens-dark-mode`. Vite dev server may still be on :5173.
|
|
9
|
+
|
|
10
|
+
## Scope decision (user answered popup — BINDING)
|
|
11
|
+
1. **"Full WCAG + polish now (light WILL change)"** — the earlier "never touch light / don't affect
|
|
12
|
+
consumers" constraint is now **RELEASED** for visual changes. API compatibility still absolute
|
|
13
|
+
(`src/index.publicApi.test.ts` must stay green). Light-mode *pixels* may change; consumers need
|
|
14
|
+
no code edits.
|
|
15
|
+
2. **shadcn theme = exact zinc/slate clone** — match real shadcn default tokens (zinc/slate
|
|
16
|
+
neutrals, near-black primary in light, near-white primary in dark, minimal color).
|
|
17
|
+
|
|
18
|
+
## What is DONE
|
|
19
|
+
- Portable `Theme/tokens/**` (pure, no Chakra/React/CSS) + `Theme/chakra/**` web binding.
|
|
20
|
+
- 7 brands x light+dark; `PixelizeThemeProvider` (defaults `system`) + `useThemeMode` + `ThemeSwitcher`.
|
|
21
|
+
- 29 families migrated hex->tokens. MODULE.md doc-sync done for 12 domains.
|
|
22
|
+
- Fixed already: `accentText` token; Button outline/ghost/link on-canvas text; ghost hover tint;
|
|
23
|
+
dark `gray[500]` ramp L48->L52.
|
|
24
|
+
|
|
25
|
+
## THE ROOT CAUSE (next thing to fix — Wave A)
|
|
26
|
+
`liftScale()` in `tokens/builders/buildDarkPalette.ts` adds a lightness delta to EVERY rung, so for
|
|
27
|
+
**brand (primary/secondary/tertiary) and semantic** scales in dark:
|
|
28
|
+
- `[50]`/`[100]` stay near-white (lum ~0.907) -> used as tint chips/avatars/hover => **17 pages
|
|
29
|
+
render light surfaces on the dark canvas** (this is the broken Accordion the user screenshotted).
|
|
30
|
+
- `[600]`+ stay DARKER than `[500]` -> but components use `primary[600]` as **text**
|
|
31
|
+
(e.g. `Accordion.tsx:90`) => dark-on-dark, contrast **1.34**.
|
|
32
|
+
- Utility hues (gray/red/green/blue/...) are `reverseScale`d and are CORRECT already.
|
|
33
|
+
|
|
34
|
+
**Fix:** give brand+semantic a proper dark ramp — monotonic **dark->light** across 50->900, with
|
|
35
|
+
`[500]` PINNED to the adaptive white-label-safe accent (`accentLightnessDelta`, do not change it).
|
|
36
|
+
Proposed targets (verify empirically): 50:12, 100:16, 200:22, 300:32, 400:44, 500:<accent>,
|
|
37
|
+
600:67, 700:76, 800:85, 900:93.
|
|
38
|
+
|
|
39
|
+
**Cascade (Wave A2):** flipping the ramp breaks `Button.styles.ts` `solid._hover: bg=[600]` /
|
|
40
|
+
`_active: bg=[700]` — those become LIGHT, so the white label fails. Semantics should be "one step
|
|
41
|
+
darker" per mode: light uses `[600]`/`[700]`, dark must use `[400]`/`[300]`. `onCanvasText` and
|
|
42
|
+
`onCanvasHoverBg` helpers already exist in `Button.styles.ts` — extend that pattern.
|
|
43
|
+
|
|
44
|
+
**Obsolete test:** `Button.styles.test.ts` "light mode is untouched" pins light to `primary[500]`.
|
|
45
|
+
The user has now approved light changes, so that test must be REWRITTEN (not deleted) to assert the
|
|
46
|
+
new intended light values.
|
|
47
|
+
|
|
48
|
+
## Verified audit numbers (baseline to beat)
|
|
49
|
+
Auditor: `scratchpad/audit-all-pages.cjs` (walks all 51 pages; `MODE=Light|Dark`, `ONLY_PAGE=<name>`).
|
|
50
|
+
Reports: `scratchpad/shots-all/report.json` (dark), `scratchpad/shots-light/report.json` (light).
|
|
51
|
+
|
|
52
|
+
| | DARK | LIGHT |
|
|
53
|
+
|------------------------|------|-------|
|
|
54
|
+
| failing text signatures | 95 | 118 |
|
|
55
|
+
| worst ratio | 1.0 | 1.0 |
|
|
56
|
+
| near-invisible (<1.5) | 16 | 6 |
|
|
57
|
+
| pages w/ light surface | 17 | n/a |
|
|
58
|
+
|
|
59
|
+
- 43 dark failures ALSO fail in light => pre-existing debt.
|
|
60
|
+
- **52 dark failures are NEW** across 24 pages => the dark-mode regression to fix.
|
|
61
|
+
- Light's 118 are PRE-EXISTING (present on base commit, untouched by this task).
|
|
62
|
+
|
|
63
|
+
## Known, deliberately NOT yet fixed
|
|
64
|
+
- `bg={colors.white}` used as a SURFACE in 8 files (never in the 29-family scope because they use a
|
|
65
|
+
token, not a hex — a hex-only grep could not see them):
|
|
66
|
+
FileUpload:153, Dropdown:197, Reorder:44, Form/FormWrapper:36, Accordion:46,
|
|
67
|
+
ProfilePhotoViewer:190, KanbanBoard/AccountCard:54, Header/components/desktopMenu:83
|
|
68
|
+
-> should become `colors.background[50]` (identical #ffffff in light, dark-aware).
|
|
69
|
+
- `KanbanBoard.tsx:876` uses `var(--chakra-colors-gray-300)` but `cssVarPrefix` is `"ck"` — that var
|
|
70
|
+
has NEVER resolved. Pre-existing; unrelated to dark mode.
|
|
71
|
+
|
|
72
|
+
## CI reality (pre-existing, do NOT silently "fix")
|
|
73
|
+
`.github/workflows/build.yml` runs `npm run test:coverage` with an 80% global threshold.
|
|
74
|
+
**Base commit already fails it** (branches 62.57%). Our branch reads ~42% because
|
|
75
|
+
`src/index.publicApi.test.ts` imports the barrel, growing the coverage denominator 101 -> 302 files.
|
|
76
|
+
That is the TRUE coverage finally being measured, not a regression. Lowering the threshold =
|
|
77
|
+
weakening a safety guard => user decision, not ours.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Theme refactor → portable tokens + full dark mode + exported theme switcher
|
|
2
|
+
|
|
3
|
+
## Complexity
|
|
4
|
+
hard
|
|
5
|
+
|
|
6
|
+
## Goal
|
|
7
|
+
1. **Restructure theme into a pure, platform-agnostic token layer** (zero Chakra/React/CSS imports)
|
|
8
|
+
so the mobile design library can copy-paste it. Web-only Chakra binding lives separately.
|
|
9
|
+
2. **Full dark mode** across every component (derived from each brand's existing colors).
|
|
10
|
+
3. **Export** `PixelizeThemeProvider` + `useThemeMode()` + `<ThemeSwitcher/>` for consuming apps.
|
|
11
|
+
4. Refactor/improve along the way (dedupe 7 identical brand theme files, types, a11y contrast).
|
|
12
|
+
|
|
13
|
+
## Constraints (non-negotiable)
|
|
14
|
+
- **Backward compatible — zero consumer rework.** No removed/renamed public exports, no changed
|
|
15
|
+
prop signatures. `pixelize-design-library` stays **2.x**.
|
|
16
|
+
- **Light mode must stay pixel-identical.** Dark mode is purely additive.
|
|
17
|
+
- **Keep existing internal import paths as re-export shims** — `Theme/useCustomTheme` (91 importers)
|
|
18
|
+
and `Theme/themeProps` (~20 importers) must not move.
|
|
19
|
+
- Purity boundary: `Theme/tokens/**` must never import Chakra, React, or CSS.
|
|
20
|
+
(`fonts.ts` CSS side-effect + `common.ts` `cssVarPrefix` are web-only → stay in web layer.)
|
|
21
|
+
|
|
22
|
+
## Phase checklist
|
|
23
|
+
- [x] 1. Plan
|
|
24
|
+
- [ ] 2a. Wave 0a — token restructure (serial)
|
|
25
|
+
- [ ] 2b. Wave 0b — dark palettes + provider/hook/switcher (serial)
|
|
26
|
+
- [ ] 2c. Wave 1 — component hex migration (PARALLEL, 17 disjoint families)
|
|
27
|
+
- [ ] 3a/3b. Tests
|
|
28
|
+
- [ ] 3d. Doc sync
|
|
29
|
+
- [ ] 3c. PR readiness (lint + typecheck + test + build)
|
|
30
|
+
- [ ] 4. Review gate
|
|
31
|
+
- [ ] 5. Commit
|
|
32
|
+
|
|
33
|
+
## Baseline
|
|
34
|
+
- `npx tsc --noEmit` → **exit 0** (green before any change).
|
|
35
|
+
- Branch: `develop`, clean tree. Package v2.3.21.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Architecture — the linchpin
|
|
40
|
+
|
|
41
|
+
Components read **resolved hex strings** via `useCustomTheme()` and interpolate them:
|
|
42
|
+
```tsx
|
|
43
|
+
border={`0.063rem solid ${theme.colors.border?.[500]}`}
|
|
44
|
+
```
|
|
45
|
+
Chakra `semanticTokens` **cannot** work here (they only resolve as style-prop token names).
|
|
46
|
+
|
|
47
|
+
**Therefore:** make `useCustomTheme()` **color-mode-aware** — it returns the dark palette when
|
|
48
|
+
`colorMode === "dark"`. All **127** token-consuming files then flip to dark with **zero edits**.
|
|
49
|
+
Remaining real work = the **22** files that hardcode hex.
|
|
50
|
+
|
|
51
|
+
## Target structure
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
src/Theme/
|
|
55
|
+
tokens/ ← PURE. zero Chakra/React/CSS. Copy-paste to mobile.
|
|
56
|
+
index.ts ← barrel (brands, primitives, builders, types)
|
|
57
|
+
types.ts ← PaletteProps, ThemeName, ColorMode
|
|
58
|
+
primitives/ ← space, sizes, radii, shadows, zIndices,
|
|
59
|
+
breakpoints, lineHeights, letterSpacings, typography
|
|
60
|
+
builders/
|
|
61
|
+
buildBrandTokens.ts ← moved (already pure)
|
|
62
|
+
buildDarkPalette.ts ← NEW: pure light→dark derivation
|
|
63
|
+
brands/<brand>/palette.light.ts + palette.dark.ts ← 7 brands
|
|
64
|
+
chakra/ ← WEB-ONLY binding
|
|
65
|
+
createBrandTheme.ts ← factory replacing 7 duplicated theme.ts
|
|
66
|
+
componentStyles.ts ← moved
|
|
67
|
+
fonts.web.ts ← CSS side-effect import + typography
|
|
68
|
+
provider/ ← NEW
|
|
69
|
+
PixelizeThemeProvider.tsx, useThemeMode.ts, ThemeSwitcher.tsx, storage.ts
|
|
70
|
+
useCustomTheme.ts ← KEEP PATH, now color-mode-aware
|
|
71
|
+
themeProps.ts ← KEEP PATH, re-export shim
|
|
72
|
+
index.ts, <Brand>/theme.ts, <Brand>/palette.ts ← KEEP PATHS as shims
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Dark palette derivation (my call — "mix of existing theme colours")
|
|
76
|
+
Pure `buildDarkPalette(lightPalette)`, applied to all 7 brands — **role-preserving inversion**:
|
|
77
|
+
- **Surface/neutral/text/border scales** (`background`, `text`, `header`, `placeholder`, `border`,
|
|
78
|
+
`boxborder`, `table.hover`, `disabled`, `gray`): reverse the ramp (50↔900 …) so each index keeps
|
|
79
|
+
its semantic role but flips lightness. Because each brand's light ramps are already brand-tinted
|
|
80
|
+
(lavender's gray is violet-tinted), reversing yields **brand-tinted dark for free** — no invented hexes.
|
|
81
|
+
- **Named surface keys** (`backgroundColor.{main,secondary,…,tableHeader}`): explicit dark anchors;
|
|
82
|
+
elevation goes **lighter** in dark (inverse of light mode).
|
|
83
|
+
- **Brand/semantic** (`primary`, `secondary`, `tertiary`, `semantic.*`): keep hue; accessible accent
|
|
84
|
+
on dark shifts lighter.
|
|
85
|
+
- **`boxShadow`**: deepen. **`sidebar`**: already dark in light mode → keep near-identical.
|
|
86
|
+
- Verify WCAG AA contrast for text-on-surface pairs.
|
|
87
|
+
|
|
88
|
+
## API contract (FROZEN)
|
|
89
|
+
Additive exports from `src/index.ts` — nothing removed:
|
|
90
|
+
```ts
|
|
91
|
+
export { PixelizeThemeProvider } from "./Theme/provider/PixelizeThemeProvider";
|
|
92
|
+
export { useThemeMode } from "./Theme/provider/useThemeMode";
|
|
93
|
+
export { ThemeSwitcher } from "./Theme/provider/ThemeSwitcher";
|
|
94
|
+
export type { ColorMode, ThemeName, PaletteProps } from "./Theme/tokens/types";
|
|
95
|
+
// unchanged: default withTheme, useCustomTheme, ThemesList, all 73 components
|
|
96
|
+
```
|
|
97
|
+
```ts
|
|
98
|
+
type ColorMode = "light" | "dark" | "system";
|
|
99
|
+
useThemeMode(): {
|
|
100
|
+
mode: ColorMode; // user selection
|
|
101
|
+
resolvedMode: "light"|"dark";// after system resolution
|
|
102
|
+
setMode(m: ColorMode): void;
|
|
103
|
+
toggle(): void;
|
|
104
|
+
brand: ThemeName;
|
|
105
|
+
setBrand(b: ThemeName): void;
|
|
106
|
+
};
|
|
107
|
+
<PixelizeThemeProvider brand? defaultMode? storageKey? disablePersistence?>
|
|
108
|
+
<ThemeSwitcher variant?="icon"|"segmented"|"menu" showBrandPicker?=false />
|
|
109
|
+
```
|
|
110
|
+
- Persisted to localStorage; SSR-safe (no window access during render).
|
|
111
|
+
- `withTheme` keeps working unchanged (delegates to the provider internally).
|
|
112
|
+
|
|
113
|
+
## Wave plan (parallel/serial split)
|
|
114
|
+
- **Wave 0a — SERIAL (orchestrator).** Token restructure + shims. Pure moves, zero behavior change.
|
|
115
|
+
Gate: `tsc --noEmit` exit 0.
|
|
116
|
+
- **Wave 0b — SERIAL (orchestrator).** `buildDarkPalette`, 7 dark palettes, color-mode-aware
|
|
117
|
+
`useCustomTheme`, provider/hook/switcher, componentStyles `_dark`, exports.
|
|
118
|
+
Serial because every Wave-1 agent depends on this contract.
|
|
119
|
+
- **Wave 1 — PARALLEL (17 disjoint families).** Migrate the 22 hex files → tokens.
|
|
120
|
+
*Proof of independence:* each agent owns exactly one `src/Components/<Family>/` folder; the sets are
|
|
121
|
+
pairwise disjoint; **no agent touches** `src/index.ts`, `src/Theme/**`, `src/withTheme.tsx`,
|
|
122
|
+
`src/App.tsx`, `src/Layout.tsx`, `src/global.css`, or any git/npm command. No new exports needed
|
|
123
|
+
(all 22 files are in already-exported components) → shared registry untouched.
|
|
124
|
+
- **Wave 2 — SERIAL.** `global.css` dark, playground demo, docs, full verify.
|
|
125
|
+
|
|
126
|
+
## Files — Wave 1 lanes (22 files / 17 families, pairwise disjoint)
|
|
127
|
+
| Lane | Family | Files |
|
|
128
|
+
|---|---|---|
|
|
129
|
+
| 1 | UserDetails | UserDetails.tsx (16), DeactivateConfirmModal.tsx (3) |
|
|
130
|
+
| 2 | OrganizationDetails | OrganizationDetails.tsx (16), DeleteOrgModal.tsx (2) |
|
|
131
|
+
| 3 | OrgSwitcher | OrgSwitcher.tsx (13), OrgSwitcherProps.tsx (8) |
|
|
132
|
+
| 4 | RolesPermission | RolesPermission.tsx (8), DeleteRoleModal.tsx (2) |
|
|
133
|
+
| 5 | Toaster | Toaster.tsx (8) |
|
|
134
|
+
| 6 | StageProgress | StageProgressProps.tsx (7) |
|
|
135
|
+
| 7 | PdfViewer | PdfViewer.tsx (6) |
|
|
136
|
+
| 8 | CustomModulesTable | CustomModulesTable.tsx (5), DeleteModuleModal.tsx (2) |
|
|
137
|
+
| 9 | CopyButton | CopyButton.tsx (5) |
|
|
138
|
+
| 10 | SignInActivityTable | SignInActivityTable.tsx (5) |
|
|
139
|
+
| 11 | EmptyState | EmptyState.tsx (4) |
|
|
140
|
+
| 12 | FilePreview | FilePreview.tsx (4) |
|
|
141
|
+
| 13 | FieldSelectModal | FieldSelectModal.tsx (3) |
|
|
142
|
+
| 14 | UpgradeButton | UpgradeButton.tsx (3) |
|
|
143
|
+
| 15 | MoreItems | MoreItems.tsx (2) |
|
|
144
|
+
| 16 | LazyWrapper | LazyWrapper.tsx (1) |
|
|
145
|
+
| 17 | ToolTip | ToolTip.tsx (1) |
|
|
146
|
+
|
|
147
|
+
## Risks
|
|
148
|
+
- 38 **test/story** files assert hardcoded hex → may break when components move to tokens. Handled in 3a/3b.
|
|
149
|
+
- `Switch.tsx` / `InputSwitch.tsx` already call `useColorModeValue` → will finally activate under the
|
|
150
|
+
provider; verify they look right in both modes.
|
|
151
|
+
- `Theme/Default/palette` imported directly by 2 DatePicker tests → keep shim path.
|
|
152
|
+
- Coverage thresholds are 80% global; new provider/builder code needs tests to hold the gate.
|
|
153
|
+
|
|
154
|
+
## Files-changed manifest
|
|
155
|
+
(updated as waves land)
|
|
File without changes
|
package/.cursor/rules
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
## Session start
|
|
2
|
+
- Always read CLAUDE.md before starting any task
|
|
3
|
+
- Always read MODULE.md before touching a component family (`.cursor/modules/<domain>/MODULE.md`)
|
|
4
|
+
- Read one similar existing component before implementing
|
|
5
|
+
- Never invent a new pattern if one already exists
|
|
6
|
+
|
|
7
|
+
## Implementation
|
|
8
|
+
- Components live in `src/Components/<Name>/`
|
|
9
|
+
- Public API via `src/index.ts` only
|
|
10
|
+
- Demo pages in `src/Pages/` for playground — not published
|
|
11
|
+
- Never add CRM/app-specific API calls to library components
|
|
12
|
+
- Use theme tokens from `src/Theme/` — no hardcoded brand colors
|
|
13
|
+
- Add Jest tests for new behavior (`*.test.tsx`)
|
|
14
|
+
- Keep changes minimal — no scope creep
|
|
15
|
+
|
|
16
|
+
## Output quality
|
|
17
|
+
- Never create placeholder files unless explicitly asked
|
|
18
|
+
- Never use fake data, lorem ipsum, example.com, or demo seeds
|
|
19
|
+
- Never leave TODO comments — implement fully or report blocked
|
|
20
|
+
- Production-ready components with loading/error states where applicable
|
|
21
|
+
|
|
22
|
+
## Branch rules
|
|
23
|
+
- Always branch from **develop** — never from main
|
|
24
|
+
- Feature work: `feature/<domain>-<short-description>`
|
|
25
|
+
- Bug fixes: `fix/<domain>-<short-description>`
|
|
26
|
+
- Never commit directly to main
|
|
27
|
+
|
|
28
|
+
## Commit rules
|
|
29
|
+
- Never commit without explicit user confirmation
|
|
30
|
+
- Never run git push under any condition
|
|
31
|
+
- Never add Cursor co-author lines
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task
|
|
3
|
+
description: >-
|
|
4
|
+
Runs the Pixelize Design Library dev pipeline: task-plan → fe-impl → test-create → test-exec → review gate → commit. Use when the user invokes @task, /task, or requests component library delivery.
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Task Pipeline — Pixelize Design Library
|
|
9
|
+
|
|
10
|
+
Single library repo **Micro-Components** (`pixelize-design-library`). Module docs: `.cursor/modules/<domain>/MODULE.md`.
|
|
11
|
+
|
|
12
|
+
Run phases in order. Do not skip unless user opts out.
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
- [ ] 1. Task plan (agent: task-plan)
|
|
16
|
+
- [ ] 2. Implementation (agents: fe-impl + be-impl, parallel when both needed)
|
|
17
|
+
- [ ] 3a. Test creation (agent: test-create)
|
|
18
|
+
- [ ] 3b. Test execution (agent: test-exec)
|
|
19
|
+
- [ ] 4. Review gate (orchestrator — show diff, wait for user)
|
|
20
|
+
- [ ] 5. Commit (orchestrator only)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Before Starting
|
|
26
|
+
|
|
27
|
+
1. Read CLAUDE.md
|
|
28
|
+
2. Confirm user goal — feat / fix / refactor / chore
|
|
29
|
+
3. Tell user which phases apply
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Phase 1 — Task Plan
|
|
34
|
+
|
|
35
|
+
Agent: task-plan → `.cursor/agents/task-plan.md`
|
|
36
|
+
|
|
37
|
+
- Read `.cursor/modules/<domain>/MODULE.md` for touched component families
|
|
38
|
+
- Plan saved to `.cursor/plans/current.md`
|
|
39
|
+
- If current.md already exists — read it first, user may be resuming
|
|
40
|
+
|
|
41
|
+
Gate: do not start phase 2 until plan has concrete tasks.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Phase 2 — Implementation
|
|
46
|
+
|
|
47
|
+
| Plan says | Action |
|
|
48
|
+
|-----------|--------|
|
|
49
|
+
| Library only | Invoke fe-impl only |
|
|
50
|
+
| Both | Rare — fe-impl + test agents |
|
|
51
|
+
|
|
52
|
+
Pass `.cursor/plans/current.md` to each agent.
|
|
53
|
+
|
|
54
|
+
If blocked mid-task:
|
|
55
|
+
- Save progress to `.cursor/plans/blocked/<task-name>.md` with exact blocker details
|
|
56
|
+
- Stop pipeline and report to user
|
|
57
|
+
|
|
58
|
+
Gate: all required agents must report Done or Blocked before phase 3.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 3 — Tests
|
|
63
|
+
|
|
64
|
+
3a: test-create → `.cursor/agents/test-create.md`
|
|
65
|
+
3b: test-exec → `.cursor/agents/test-exec.md`
|
|
66
|
+
|
|
67
|
+
Jest: `npm test` from repo root.
|
|
68
|
+
|
|
69
|
+
Gate: do not proceed to review if tests failed and not explicitly waived by user.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Phase 4 — Review Gate
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
git status
|
|
77
|
+
git diff
|
|
78
|
+
git diff --staged
|
|
79
|
+
git log -5 --oneline
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Run git status/diff. STOP and wait for user approval.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
CHANGES READY TO COMMIT
|
|
86
|
+
|
|
87
|
+
Backend:
|
|
88
|
+
- path/to/file — what changed
|
|
89
|
+
|
|
90
|
+
Frontend:
|
|
91
|
+
- path/to/component — what changed
|
|
92
|
+
|
|
93
|
+
Tests:
|
|
94
|
+
- path/to/test — what it covers
|
|
95
|
+
|
|
96
|
+
MODULE.md updates:
|
|
97
|
+
- path/to/MODULE.md
|
|
98
|
+
|
|
99
|
+
Excluded:
|
|
100
|
+
- none
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
STOP. Wait for: "yes" / "commit" / "looks good" / "go ahead"
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## Phase 5 — Commit
|
|
107
|
+
|
|
108
|
+
### Commit message format
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
<type>(<module>): <concise imperative title>
|
|
112
|
+
|
|
113
|
+
Backend:
|
|
114
|
+
- <specific change — file context>
|
|
115
|
+
|
|
116
|
+
Frontend:
|
|
117
|
+
- <specific change — file context>
|
|
118
|
+
|
|
119
|
+
Tests:
|
|
120
|
+
- <what is covered and where>
|
|
121
|
+
|
|
122
|
+
Config:
|
|
123
|
+
- <migrations, registry changes, config updates>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Commit steps
|
|
127
|
+
|
|
128
|
+
1. Scan diff — if .env or secrets found, warn user and ask if they want to include. Commit only on confirmation.
|
|
129
|
+
2. git add relevant files — state any exclusions clearly
|
|
130
|
+
3. git commit using HEREDOC — never add Cursor attribution lines
|
|
131
|
+
4. If Cursor injects co-author lines — amend immediately if unpushed
|
|
132
|
+
5. Verify: git status + git log -1 --format=full
|
|
133
|
+
6. Show commit hash to user
|
|
134
|
+
7. Move `.cursor/plans/current.md` → `.cursor/plans/done/<YYYY-MM-DD>-<title>.md`
|
|
135
|
+
|
|
136
|
+
Never run git push under any condition.
|
|
137
|
+
|
|
138
|
+
### Commit safety
|
|
139
|
+
|
|
140
|
+
- Never --no-verify unless user explicitly requests
|
|
141
|
+
- Never force-push any branch
|
|
142
|
+
- Nothing staged → skip commit, report clearly
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Final Report
|
|
147
|
+
|
|
148
|
+
| Phase | Status | Notes |
|
|
149
|
+
| -------- | -------------- | --------------------------------- |
|
|
150
|
+
| 1 Plan | done / skipped | saved to .cursor/plans/current.md |
|
|
151
|
+
| 2 Impl | fe / be / both | done / blocked |
|
|
152
|
+
| 3 Tests | create / exec | pass / fail / blocked |
|
|
153
|
+
| 4 Review | approved | confirmed by user |
|
|
154
|
+
| 5 Commit | done / skipped | hash if committed |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## User Opt-outs
|
|
159
|
+
|
|
160
|
+
| User says | Effect |
|
|
161
|
+
| ------------- | ----------------------------------------- |
|
|
162
|
+
| "plan only" | Stop after phase 1 |
|
|
163
|
+
| "no tests" | Skip phase 3 — confirm with user first |
|
|
164
|
+
| "no commit" | Stop after phase 4 review |
|
|
165
|
+
| "commit only" | Phase 4+5 only — still show diff and wait |
|
|
166
|
+
| "skip review" | Go straight to commit — confirm with user |
|
|
167
|
+
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Pixelize Design Library — Agent Guide
|
|
2
|
+
|
|
3
|
+
Rules for AI assistants working in **Micro-Components** (npm: `pixelize-design-library`).
|
|
4
|
+
|
|
5
|
+
## 1. App name and purpose
|
|
6
|
+
|
|
7
|
+
**Pixelize Design Library** — shared React UI component library and theme system for all Pixelize frontends. Published to npm; local Vite playground demos components in `src/Pages/`.
|
|
8
|
+
|
|
9
|
+
## 2. Stack
|
|
10
|
+
|
|
11
|
+
| Layer | Technology | Version |
|
|
12
|
+
| ------------- | ----------------------------------- | -------------- |
|
|
13
|
+
| Framework | React + TypeScript | 18.3.1 / 5.9.3 |
|
|
14
|
+
| UI base | Chakra UI + Emotion + Framer Motion | 2.8.2 |
|
|
15
|
+
| Build | `tsc` → `dist/` + CSS copy | — |
|
|
16
|
+
| Dev | Vite playground | 6.2.0 |
|
|
17
|
+
| Styling | Tailwind + global CSS | 3.4.17 |
|
|
18
|
+
| Tests | Jest + Testing Library | 29.7.0 |
|
|
19
|
+
| Package | `pixelize-design-library` | 2.2.x |
|
|
20
|
+
|
|
21
|
+
Not a monorepo — single package, one `package.json`.
|
|
22
|
+
|
|
23
|
+
## 3. Repo relationship
|
|
24
|
+
|
|
25
|
+
| Repo / package | Role |
|
|
26
|
+
| --------------------------- | ------------------------------------------------- |
|
|
27
|
+
| **Micro-Components** (here) | Source of `pixelize-design-library` npm package |
|
|
28
|
+
| **crm-frontend** | Consumer — `npm run pixelize` to update |
|
|
29
|
+
| **account-frontend** | Consumer |
|
|
30
|
+
| **social-frontend** | Consumer |
|
|
31
|
+
| **tickets-frontend** | Consumer |
|
|
32
|
+
| **crm-mobile** | Consumer (native-base overlap — check mobile) |
|
|
33
|
+
| **pixelize-authenticator** | Companion auth UI package (separate repo) |
|
|
34
|
+
|
|
35
|
+
No backend API in this repo. Demo pages may call dev APIs for playground only.
|
|
36
|
+
|
|
37
|
+
## 4. Folder structure (2 levels)
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Micro-Components/
|
|
41
|
+
├── package.json, tsconfig.json, vite.config.ts
|
|
42
|
+
├── src/
|
|
43
|
+
│ ├── index.ts public exports (~110)
|
|
44
|
+
│ ├── withTheme.tsx legacy HOC wrapper (light-only, unchanged)
|
|
45
|
+
│ ├── Components/ 73 component families
|
|
46
|
+
│ ├── Theme/
|
|
47
|
+
│ │ ├── tokens/ PURE, platform-agnostic — shared with the mobile lib
|
|
48
|
+
│ │ │ ├── types.ts PaletteProps, ThemeName, ColorMode
|
|
49
|
+
│ │ │ ├── primitives/ space, sizes, radii, shadows, typography, …
|
|
50
|
+
│ │ │ ├── builders/ buildDarkPalette, buildBrandTokens, color math
|
|
51
|
+
│ │ │ └── brands/<brand>/palette.light.ts + palette.dark.ts (7 brands)
|
|
52
|
+
│ │ ├── chakra/ WEB-ONLY binding (createBrandTheme, componentStyles, fonts)
|
|
53
|
+
│ │ ├── provider/ PixelizeThemeProvider, useThemeMode, ThemeSwitcher
|
|
54
|
+
│ │ ├── useCustomTheme.ts hook used by ~127 components
|
|
55
|
+
│ │ └── index.ts ThemesList (light) + brandThemes (light+dark)
|
|
56
|
+
│ ├── Pages/ 49 Vite demo/playground pages
|
|
57
|
+
│ ├── Utils/, Hooks/, services/, types/
|
|
58
|
+
│ └── App.tsx, Layout.tsx playground shell
|
|
59
|
+
├── dist/ publish output (gitignored)
|
|
60
|
+
└── .cursor/modules/ MODULE.md per component domain (22 domains)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Theme rules (read before touching color)
|
|
64
|
+
|
|
65
|
+
- **`Theme/tokens/**` must never import Chakra, React, or CSS.** It is copy-paste portable to the
|
|
66
|
+
mobile design library; one CSS/Chakra import breaks that. Web-only concerns (the Inter font-face
|
|
67
|
+
import, Chakra's `cssVarPrefix`) live in `Theme/chakra/`.
|
|
68
|
+
- **Dark mode works by swapping which palette the theme carries** — not via `_dark`/`semanticTokens`.
|
|
69
|
+
`componentStyles` variants are functions of `({ theme })` and `useCustomTheme()` reads
|
|
70
|
+
`theme.colors`, so both follow the active palette automatically.
|
|
71
|
+
- **Never hardcode a hex in a component.** Read tokens from `useCustomTheme()`, or the component
|
|
72
|
+
will be stuck in light mode.
|
|
73
|
+
- **`colors.white` is a foreground token** (the label on a filled button) and stays white in dark.
|
|
74
|
+
For a white *surface* use `colors.background[50]` — identical `#ffffff` in light, dark-aware.
|
|
75
|
+
- Dark palettes are **derived** (`buildDarkPalette`) from each brand's own light palette, so brand
|
|
76
|
+
hue carries through. Override per brand in that brand's `palette.dark.ts` if ever needed.
|
|
77
|
+
- `withTheme` stays **light-only** so existing apps are visually unchanged; dark is opt-in via
|
|
78
|
+
`PixelizeThemeProvider` (defaults to `system`).
|
|
79
|
+
|
|
80
|
+
## 5. Dev commands
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm start # Vite playground
|
|
84
|
+
npm run build # tsc + copy CSS → dist/
|
|
85
|
+
npm test # Jest
|
|
86
|
+
npm run test:watch
|
|
87
|
+
npm run remove # strip dev artifacts from dist before publish
|
|
88
|
+
npm run package # version patch + build + publish
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## 6. Module / component pattern
|
|
92
|
+
|
|
93
|
+
Follow the **Table** or **KanbanBoard** pattern for complex components:
|
|
94
|
+
|
|
95
|
+
| Step | Path |
|
|
96
|
+
| ---- | ---- |
|
|
97
|
+
| Component | `src/Components/<Name>/` |
|
|
98
|
+
| Subcomponents | `src/Components/<Name>/Components/` or nested folders |
|
|
99
|
+
| Props/types | `<Name>Props.ts` or colocated types |
|
|
100
|
+
| Tests | `*.test.tsx` next to component |
|
|
101
|
+
| Stories | `*.stories.tsx` (where present) |
|
|
102
|
+
| Demo page | `src/Pages/<name>.tsx` |
|
|
103
|
+
| Public export | add to `src/index.ts` |
|
|
104
|
+
| Module doc | `.cursor/modules/<domain>/MODULE.md` |
|
|
105
|
+
|
|
106
|
+
Read `.cursor/modules/<domain>/MODULE.md` before touching a component family.
|
|
107
|
+
|
|
108
|
+
## 7. Publishing integration
|
|
109
|
+
|
|
110
|
+
- **Exports:** every public component must be exported from `src/index.ts`
|
|
111
|
+
- **Peers:** React 18, Chakra, Emotion — consumers install alongside library
|
|
112
|
+
- **Build:** `npm run build` compiles to `dist/`; never edit `dist/` directly
|
|
113
|
+
- **Version:** patch releases via `npm run package`; CI publishes on merge to `develop`
|
|
114
|
+
- **Breaking changes:** require version bump + consumer update in frontends
|
|
115
|
+
|
|
116
|
+
## 8. Checklist — adding a new component
|
|
117
|
+
|
|
118
|
+
1. Read similar component + `.cursor/modules/<domain>/MODULE.md`
|
|
119
|
+
2. Create `src/Components/<Name>/` with component + props
|
|
120
|
+
3. Add demo page in `src/Pages/` if needed
|
|
121
|
+
4. Export from `src/index.ts`
|
|
122
|
+
5. Add Jest tests (`*.test.tsx`)
|
|
123
|
+
6. Update `.cursor/modules/<domain>/MODULE.md`
|
|
124
|
+
7. Verify playground: `npm start`
|
|
125
|
+
8. After merge to develop: consumers run `npm run pixelize` in their frontend
|
|
126
|
+
|
|
127
|
+
## 9. Do
|
|
128
|
+
|
|
129
|
+
- Match existing Chakra + design token patterns in `src/Theme/`
|
|
130
|
+
- Keep components framework-agnostic where possible (props in, events out)
|
|
131
|
+
- Add tests for new behavior
|
|
132
|
+
- Use `useCustomTheme` / theme tokens — no hardcoded brand colors
|
|
133
|
+
- Branch from **feature/cursor-ai-setup** or **develop**
|
|
134
|
+
|
|
135
|
+
## 10. Don't
|
|
136
|
+
|
|
137
|
+
- Don't add app-specific business logic (CRM entities, API calls) to library components
|
|
138
|
+
- Don't break existing exports without semver major bump
|
|
139
|
+
- Don't edit `dist/` — always change `src/` and rebuild
|
|
140
|
+
- Don't skip `index.ts` export for public components
|
|
141
|
+
- Don't introduce a second component pattern without team agreement
|
|
142
|
+
- Don't commit npm tokens or `.env` secrets
|
|
143
|
+
|
|
144
|
+
## Task pipeline
|
|
145
|
+
|
|
146
|
+
- **Feature work:** invoke via **`/` menu → `task`** (not by typing `/task` in the message).
|
|
147
|
+
- Cross-repo: **`/ → design-task**`.
|
|
148
|
+
- One-time status line + hook details: [.cursor/TASK-SETUP.md](.cursor/TASK-SETUP.md).
|
package/README.md
CHANGED
|
@@ -191,17 +191,84 @@ function DataTable() {
|
|
|
191
191
|
|
|
192
192
|
## Theming
|
|
193
193
|
|
|
194
|
-
The library
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
194
|
+
The library ships **7 brand themes** (`lavender`, `meadow`, `radiant`, `skyline`, `slate`,
|
|
195
|
+
`emerald`, `rosewood`), each with a **light and a dark palette**.
|
|
196
|
+
|
|
197
|
+
### Existing apps (unchanged)
|
|
198
|
+
|
|
199
|
+
`withTheme` is the original default export and still renders **light only**. Upgrading the package
|
|
200
|
+
changes nothing visually:
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import withTheme, { ThemesList } from 'pixelize-design-library';
|
|
204
|
+
|
|
205
|
+
export default withTheme(App, ThemesList.lavender);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Opting into light / dark / system
|
|
209
|
+
|
|
210
|
+
Wrap the app in `PixelizeThemeProvider` instead. It defaults to **`system`** (follows the OS) and
|
|
211
|
+
persists the user's choice to `localStorage`.
|
|
212
|
+
|
|
213
|
+
```tsx
|
|
214
|
+
import { PixelizeThemeProvider, ThemeSwitcher } from 'pixelize-design-library';
|
|
215
|
+
|
|
216
|
+
function Root() {
|
|
217
|
+
return (
|
|
218
|
+
<PixelizeThemeProvider brand="lavender" defaultMode="system">
|
|
219
|
+
<App />
|
|
220
|
+
</PixelizeThemeProvider>
|
|
221
|
+
);
|
|
204
222
|
}
|
|
223
|
+
|
|
224
|
+
// Drop the switcher anywhere inside the provider:
|
|
225
|
+
<ThemeSwitcher /> // icon toggle
|
|
226
|
+
<ThemeSwitcher variant="segmented" /> // Light / System / Dark
|
|
227
|
+
<ThemeSwitcher variant="menu" showBrandPicker /> // + brand picker
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
| `PixelizeThemeProvider` prop | Default | Meaning |
|
|
231
|
+
| ---------------------------- | ------- | ------- |
|
|
232
|
+
| `brand` | `"lavender"` | Which brand theme to use |
|
|
233
|
+
| `defaultMode` | `"system"` | `"light"` \| `"dark"` \| `"system"` |
|
|
234
|
+
| `storageKey` | `"pixelize-theme"` | localStorage key |
|
|
235
|
+
| `disablePersistence` | `false` | Don't read/write localStorage |
|
|
236
|
+
|
|
237
|
+
### Reading or changing the theme in code
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
import { useThemeMode, useCustomTheme } from 'pixelize-design-library';
|
|
241
|
+
|
|
242
|
+
const { mode, resolvedMode, setMode, toggle, brand, setBrand } = useThemeMode();
|
|
243
|
+
const theme = useCustomTheme(); // returns the palette for the ACTIVE color mode
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
`useCustomTheme()` returns the dark palette automatically in dark mode, so components that read
|
|
247
|
+
their colors from it are dark-aware with no extra work.
|
|
248
|
+
|
|
249
|
+
### Building components
|
|
250
|
+
|
|
251
|
+
Read colors from the theme — never hardcode a hex, or the component will be stuck in light mode:
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
const theme = useCustomTheme();
|
|
255
|
+
<Box bg={theme.colors.background[50]} color={theme.colors.text[900]} /> // ✅ adapts
|
|
256
|
+
<Box bg="#ffffff" color="#26213c" /> // ❌ breaks in dark
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`colors.white` is a **foreground** token (the label on a filled button) and stays white in dark
|
|
260
|
+
mode. For a white **surface**, use `colors.background[50]`.
|
|
261
|
+
|
|
262
|
+
### Design tokens (shared with the mobile library)
|
|
263
|
+
|
|
264
|
+
`lightPalettes`, `darkPalettes`, `palettes`, `themeNames`, and `buildDarkPalette` are exported for
|
|
265
|
+
apps that build custom themes. The token source (`src/Theme/tokens/`) is pure TypeScript with no
|
|
266
|
+
Chakra, React, or CSS imports, so it is portable to React Native.
|
|
267
|
+
|
|
268
|
+
```ts
|
|
269
|
+
import { lightPalettes, buildDarkPalette } from 'pixelize-design-library';
|
|
270
|
+
|
|
271
|
+
const myDark = buildDarkPalette(lightPalettes.emerald);
|
|
205
272
|
```
|
|
206
273
|
|
|
207
274
|
## TypeScript Support
|