pixelize-design-library 2.4.2-beta.4 → 2.4.2-beta.41
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/COMPONENT-GOTCHAS.md +1102 -0
- package/README.md +26 -0
- package/dist/Components/Accordion/Accordion.d.ts +1 -0
- package/dist/Components/Accordion/Accordion.js +4 -1
- package/dist/Components/Accordion/AccordionProps.d.ts +2 -0
- package/dist/Components/AlertDialog/AlertDialog.d.ts +1 -0
- package/dist/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/Components/AlertDialog/AlertDialogProps.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +4 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +8 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +3 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +3 -0
- package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
- package/dist/Components/AppSwitcher/AppMark.js +62 -0
- package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +278 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +70 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -0
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +3 -0
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +4 -3
- package/dist/Components/Button/Button.styles.js +37 -23
- package/dist/Components/Button/ButtonProps.d.ts +9 -1
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +7 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/Components/Buttons/ButtonsProps.d.ts +2 -0
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +3 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +6 -0
- package/dist/Components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/Components/Checkbox/Checkbox.js +2 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
- package/dist/Components/Checkbox/CheckboxProps.d.ts +4 -0
- package/dist/Components/Common/ErrorComponent.d.ts +2 -0
- package/dist/Components/Common/ErrorComponent.js +7 -5
- package/dist/Components/Common/ErrorMessage.js +2 -2
- package/dist/Components/Common/FormLabel.d.ts +4 -0
- package/dist/Components/Common/FormLabel.js +1 -0
- package/dist/Components/Common/FormattedDescription.d.ts +2 -0
- package/dist/Components/Common/FormattedDescription.js +1 -0
- package/dist/Components/Common/HelperText.d.ts +2 -0
- package/dist/Components/Common/HelperText.js +2 -0
- package/dist/Components/Common/Label.d.ts +1 -0
- package/dist/Components/Common/Label.js +1 -0
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/ContactForm/ContactForm.d.ts +1 -0
- package/dist/Components/ContactForm/ContactForm.js +1 -0
- package/dist/Components/ContactForm/ContactFormProps.d.ts +4 -0
- package/dist/Components/CopyButton/CopyButton.d.ts +3 -1
- package/dist/Components/CopyButton/CopyButton.js +9 -3
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +8 -0
- package/dist/Components/DatePicker/CalendarPanel.d.ts +6 -0
- package/dist/Components/DatePicker/CalendarPanel.js +37 -15
- package/dist/Components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/DatePicker.js +1 -0
- package/dist/Components/DatePicker/DatePickerProps.d.ts +30 -0
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +30 -5
- package/dist/Components/DatePicker/SingleDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/SingleDatePicker.js +49 -14
- package/dist/Components/DatePicker/ThemeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/Components/DatePicker/TimePicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimePicker.js +4 -3
- package/dist/Components/DatePicker/TimePickerInput.d.ts +1 -0
- package/dist/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/Components/DatePicker/dayStates.d.ts +56 -0
- package/dist/Components/DatePicker/dayStates.js +87 -0
- package/dist/Components/Divider/Divider.d.ts +1 -0
- package/dist/Components/Divider/Divider.js +1 -0
- package/dist/Components/Drawer/DrawerProps.d.ts +2 -0
- package/dist/Components/Dropdown/DropDown.d.ts +1 -0
- package/dist/Components/Dropdown/DropDown.js +22 -6
- package/dist/Components/Dropdown/DropdownProps.d.ts +3 -0
- package/dist/Components/Editor/Editor.d.ts +1 -0
- package/dist/Components/Editor/Editor.js +1 -0
- package/dist/Components/Editor/EditorProps.d.ts +2 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +4 -0
- package/dist/Components/EmptyState/EmptyState.d.ts +1 -0
- package/dist/Components/EmptyState/EmptyState.js +4 -2
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +3 -2
- package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/Components/FilePreview/FilePreview.d.ts +1 -0
- package/dist/Components/FilePreview/FilePreview.js +3 -1
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +5 -2
- package/dist/Components/FileUpload/FileUpload.d.ts +1 -0
- package/dist/Components/FileUpload/FileUpload.js +7 -5
- package/dist/Components/FileUpload/FileUploadProps.d.ts +7 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FileUploader/FileUploader.d.ts +1 -0
- package/dist/Components/FileUploader/FileUploader.js +1 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +2 -0
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts +3 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +2 -10
- package/dist/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/Components/Form/FormWrapper.d.ts +3 -0
- package/dist/Components/Form/FormWrapper.js +2 -1
- package/dist/Components/Header/HeaderProps.d.ts +5 -0
- package/dist/Components/Header/components/mobileMenu.js +12 -3
- package/dist/Components/Input/Input/InputProps.d.ts +2 -0
- package/dist/Components/Input/PhoneNumberInput.d.ts +1 -0
- package/dist/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/Components/Input/PhoneNumberInputProps.d.ts +3 -0
- package/dist/Components/Input/Switch/InputSwitch.d.ts +2 -0
- package/dist/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/Components/Input/TextInput.js +1 -0
- package/dist/Components/Input/TextInput.styles.js +8 -10
- package/dist/Components/Input/TextInputProps.d.ts +2 -0
- package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -0
- package/dist/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/Components/InputTextArea/InputTextAreaProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountCard.d.ts +3 -0
- package/dist/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/Components/KanbanBoard/AccountRow.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +2 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -0
- package/dist/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +39 -14
- package/dist/Components/KanbanBoard/MeasuredItem.d.ts +1 -0
- package/dist/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/Components/LazyWrapper/LazyWrapper.d.ts +3 -2
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +4 -1
- package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts +2 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/Components/Loading/Loading.d.ts +1 -0
- package/dist/Components/Loading/Loading.js +16 -14
- package/dist/Components/Loading/LoadingProps.d.ts +2 -0
- package/dist/Components/Modal/ModalProps.d.ts +2 -0
- package/dist/Components/MoreItems/MoreItems.d.ts +1 -0
- package/dist/Components/MoreItems/MoreItems.js +4 -1
- package/dist/Components/MoreItems/MoreItemsProps.d.ts +4 -2
- package/dist/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +2 -0
- package/dist/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +3 -0
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +1 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -0
- package/dist/Components/Notification/Notification.d.ts +1 -0
- package/dist/Components/Notification/Notification.js +1 -0
- package/dist/Components/Notification/NotificationProps.d.ts +6 -0
- package/dist/Components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/Components/NumberInput/NumberInput.js +4 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/Components/NumberInput/NumberInputProps.d.ts +3 -0
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +6 -1
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -2
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +17 -4
- package/dist/Components/PdfViewer/PdfViewer.d.ts +2 -1
- package/dist/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/Components/PinInput/PinInput.d.ts +1 -0
- package/dist/Components/PinInput/PinInput.js +1 -0
- package/dist/Components/PinInput/PinInputProps.d.ts +2 -0
- package/dist/Components/PinInputs/PinInputs.d.ts +1 -0
- package/dist/Components/PinInputs/PinInputs.js +1 -0
- package/dist/Components/PinInputs/PinInputsProps.d.ts +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +2 -0
- package/dist/Components/PlanPill/PlanPillProps.d.ts +2 -0
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
- package/dist/Components/ProductCard/ProductReview.d.ts +1 -0
- package/dist/Components/ProductCard/ProductReview.js +6 -1
- package/dist/Components/ProductCard/ProductTags.js +1 -1
- package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +7 -0
- package/dist/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +3 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +9 -1
- package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/Components/ProgressBar/ProgressBarProps.d.ts +2 -0
- package/dist/Components/RadioButton/RadioButton.js +3 -2
- package/dist/Components/RadioButton/RadioButtonProps.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.js +1 -0
- package/dist/Components/Reorder/ReorderProps.d.ts +3 -0
- package/dist/Components/RolesPermission/RolesPermission.d.ts +1 -0
- package/dist/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +16 -1
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts +3 -2
- package/dist/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +7 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/Components/Search/Search.d.ts +1 -0
- package/dist/Components/Search/Search.js +3 -2
- package/dist/Components/Search/SearchProps.d.ts +2 -0
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -0
- package/dist/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/dist/Components/SegmentedControl/SegmentedControl.js +89 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +4 -2
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/Select/SelectProps.d.ts +6 -0
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +5 -0
- package/dist/Components/SelectV2/SelectV2.d.ts +1 -0
- package/dist/Components/SelectV2/SelectV2.js +20 -5
- package/dist/Components/SelectV2/SelectV2Props.d.ts +6 -1
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/SideBar/SideBar.js +5 -3
- package/dist/Components/SideBar/SideBarProps.d.ts +38 -24
- package/dist/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +3 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +2 -0
- package/dist/Components/Skeletons/Skeletons.d.ts +1 -0
- package/dist/Components/Skeletons/Skeletons.js +1 -0
- package/dist/Components/Slider/Slider.d.ts +3 -0
- package/dist/Components/Slider/Slider.js +9 -1
- package/dist/Components/StageProgress/StageItem.d.ts +1 -0
- package/dist/Components/StageProgress/StageItem.js +1 -0
- package/dist/Components/StageProgress/StageProgress.d.ts +1 -0
- package/dist/Components/StageProgress/StageProgress.js +1 -0
- package/dist/Components/StageProgress/StageProgressProps.d.ts +45 -4
- package/dist/Components/StageProgress/StageProgressProps.js +6 -4
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/Switch/Switch.d.ts +1 -0
- package/dist/Components/Switch/Switch.js +1 -0
- package/dist/Components/Switch/SwitchProps.d.ts +1 -0
- package/dist/Components/Table/Table.d.ts +2 -1
- package/dist/Components/Table/Table.js +15 -5
- package/dist/Components/Table/TableProps.d.ts +47 -0
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableActions.js +2 -2
- package/dist/Components/Table/components/TableBody.js +44 -18
- package/dist/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/CompactSelect.d.ts +1 -0
- package/dist/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +9 -1
- package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/Components/Table/settings/TableSettings.js +6 -4
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Components/Tag/Tag.d.ts +1 -0
- package/dist/Components/Tag/Tag.js +1 -0
- package/dist/Components/Tag/Tag.styles.js +16 -11
- package/dist/Components/Tag/TagProps.d.ts +7 -0
- package/dist/Components/Timeline/Timeline.d.ts +1 -0
- package/dist/Components/Timeline/Timeline.js +1 -0
- package/dist/Components/Timeline/TimelineProps.d.ts +8 -0
- package/dist/Components/Toaster/Toaster.d.ts +1 -0
- package/dist/Components/Toaster/Toaster.js +1 -0
- package/dist/Components/Toaster/ToasterProps.d.ts +3 -0
- package/dist/Components/Toggle/TableToggle.d.ts +1 -0
- package/dist/Components/Toggle/TableToggle.js +73 -18
- package/dist/Components/Toggle/TableToggleProps.d.ts +6 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +19 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +13 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
- package/dist/Components/ToolTip/ToolTip.d.ts +1 -0
- package/dist/Components/ToolTip/ToolTip.js +7 -6
- package/dist/Components/ToolTip/ToolTipProps.d.ts +5 -1
- package/dist/Components/Trail/EditableCell.d.ts +2 -0
- package/dist/Components/Trail/EditableCell.js +2 -1
- package/dist/Components/Trail/SelectAllCheckbox.d.ts +1 -0
- package/dist/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/Components/Trail/TrailWorks.d.ts +1 -0
- package/dist/Components/Trail/TrailWorks.js +2 -1
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +6 -2
- package/dist/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/Components/UserDetails/UserDetails.d.ts +1 -0
- package/dist/Components/UserDetails/UserDetails.js +6 -3
- package/dist/Components/UserDetails/UserDetailsProps.d.ts +30 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +6 -1
- package/dist/Hooks/exclusiveOverlay.d.ts +4 -0
- package/dist/Hooks/exclusiveOverlay.js +22 -0
- package/dist/Hooks/useExclusiveOverlay.d.ts +5 -0
- package/dist/Hooks/useExclusiveOverlay.js +24 -0
- package/dist/Theme/assertPalette.d.ts +1 -1
- package/dist/Theme/assertPalette.js +3 -2
- package/dist/Theme/chakra/Menu.styles.d.ts +2 -0
- package/dist/Theme/chakra/Menu.styles.js +9 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
- package/dist/Theme/chakra/Popover.styles.js +5 -1
- package/dist/Theme/chakra/componentStyles.d.ts +5 -0
- package/dist/Theme/chakra/componentStyles.js +16 -9
- package/dist/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
- package/dist/Theme/chakra/focusRing.styles.js +46 -0
- package/dist/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/Theme/tokens/brands/index.js +6 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/filledSurface.d.ts +29 -0
- package/dist/Theme/tokens/builders/filledSurface.js +74 -0
- package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
- package/dist/Theme/tokens/builders/focusRing.js +92 -0
- package/dist/Theme/tokens/builders/index.d.ts +2 -0
- package/dist/Theme/tokens/builders/index.js +2 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +41 -3
- package/dist/Theme/tokens/builders/outlineRung.js +82 -5
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
- package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
- package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
- package/dist/Theme/tokens/builders/rowStates.js +19 -0
- package/dist/Theme/tokens/builders/scrollShadow.d.ts +2 -0
- package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -2
- package/dist/Theme/tokens/builders/surfaceRungs.js +19 -9
- package/dist/Theme/tokens/types.d.ts +21 -1
- package/dist/Utils/table.d.ts +3 -0
- package/dist/Utils/table.js +49 -3
- package/dist/esm/Components/Accordion/Accordion.js +4 -1
- package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +243 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
- package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/esm/Components/Button/Button.js +5 -4
- package/dist/esm/Components/Button/Button.styles.js +38 -24
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/esm/Components/Checkbox/Checkbox.js +2 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
- package/dist/esm/Components/Common/ErrorComponent.js +7 -5
- package/dist/esm/Components/Common/ErrorMessage.js +2 -2
- package/dist/esm/Components/Common/FormLabel.js +1 -0
- package/dist/esm/Components/Common/FormattedDescription.js +1 -0
- package/dist/esm/Components/Common/HelperText.js +2 -0
- package/dist/esm/Components/Common/Label.js +1 -0
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -0
- package/dist/esm/Components/CopyButton/CopyButton.js +10 -4
- package/dist/esm/Components/DatePicker/CalendarPanel.js +38 -16
- package/dist/esm/Components/DatePicker/DatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +31 -6
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +50 -15
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/esm/Components/DatePicker/TimePicker.js +4 -3
- package/dist/esm/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +79 -0
- package/dist/esm/Components/Divider/Divider.js +1 -0
- package/dist/esm/Components/Dropdown/DropDown.js +23 -7
- package/dist/esm/Components/Editor/Editor.js +1 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/esm/Components/EmptyState/EmptyState.js +4 -2
- package/dist/esm/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +3 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +8 -6
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/esm/Components/Form/FormWrapper.js +2 -1
- package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
- package/dist/esm/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/esm/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/esm/Components/Input/TextInput.js +1 -0
- package/dist/esm/Components/Input/TextInput.styles.js +8 -10
- package/dist/esm/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/esm/Components/Loading/Loading.js +13 -11
- package/dist/esm/Components/MoreItems/MoreItems.js +4 -1
- package/dist/esm/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/esm/Components/Notification/Notification.js +1 -0
- package/dist/esm/Components/NumberInput/NumberInput.js +5 -2
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/esm/Components/PinInput/PinInput.js +1 -0
- package/dist/esm/Components/PinInputs/PinInputs.js +1 -0
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
- package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +6 -4
- package/dist/esm/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
- package/dist/esm/Components/Reorder/Reorder.js +1 -0
- package/dist/esm/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/esm/Components/Search/Search.js +3 -2
- package/dist/esm/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +86 -0
- package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
- package/dist/esm/Components/Select/Select.js +5 -3
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/esm/Components/SelectV2/SelectV2.js +20 -5
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/SideBar/SideBar.js +5 -3
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/esm/Components/Skeletons/Skeletons.js +1 -0
- package/dist/esm/Components/Slider/Slider.js +9 -1
- package/dist/esm/Components/StageProgress/StageItem.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgress.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgressProps.js +7 -5
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/Switch/Switch.js +1 -0
- package/dist/esm/Components/Table/Table.js +15 -5
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableActions.js +2 -2
- package/dist/esm/Components/Table/components/TableBody.js +44 -18
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/components/TableSearch.js +1 -1
- package/dist/esm/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/esm/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/esm/Components/Table/settings/TableSettings.js +7 -5
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Components/Tag/Tag.js +1 -0
- package/dist/esm/Components/Tag/Tag.styles.js +17 -12
- package/dist/esm/Components/Timeline/Timeline.js +1 -0
- package/dist/esm/Components/Toaster/Toaster.js +1 -0
- package/dist/esm/Components/Toggle/TableToggle.js +72 -17
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +16 -0
- package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
- package/dist/esm/Components/ToolTip/ToolTip.js +7 -6
- package/dist/esm/Components/Trail/EditableCell.js +2 -1
- package/dist/esm/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/esm/Components/Trail/TrailWorks.js +2 -1
- package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +6 -3
- package/dist/esm/Hooks/exclusiveOverlay.js +16 -0
- package/dist/esm/Hooks/useExclusiveOverlay.js +20 -0
- package/dist/esm/Theme/assertPalette.js +3 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +9 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
- package/dist/esm/Theme/chakra/componentStyles.js +16 -9
- package/dist/esm/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/esm/Theme/tokens/brands/index.js +6 -1
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/filledSurface.js +67 -0
- package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
- package/dist/esm/Theme/tokens/builders/index.js +2 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +78 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
- package/dist/esm/Theme/tokens/builders/scrollShadow.js +13 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -10
- package/dist/esm/Utils/table.js +50 -5
- package/dist/esm/index.js +26 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.js +67 -4
- package/package.json +11 -4
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Button = void 0;
|
|
4
4
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
5
|
+
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
5
6
|
const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
|
|
7
|
+
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
6
8
|
/**
|
|
7
9
|
* Outline/ghost/link text sits ON the canvas, so it needs a rung that stays readable there —
|
|
8
10
|
* `[500]` is pinned dark enough to carry a white label on the solid variant and measures only
|
|
@@ -20,24 +22,28 @@ const onCanvasHoverBg = (theme, colorScheme, step) => {
|
|
|
20
22
|
const scale = theme.colors[colorScheme];
|
|
21
23
|
return "opacity" in scale ? scale.opacity[step] : scale[50];
|
|
22
24
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* white label stays legible.
|
|
26
|
-
*
|
|
27
|
-
* Every dark scale runs dark -> light across 50 -> 900 (brand scales are rebuilt that way, utility
|
|
28
|
-
* hues are reversed), the mirror of light mode. So "darker than [500]" is [600]/[700] in light but
|
|
29
|
-
* [400]/[300] in dark. Hardcoding [600] would hand the label a LIGHTER fill in dark and drop it to
|
|
30
|
-
* ~3.2 contrast.
|
|
31
|
-
*/
|
|
32
|
-
const FILL_STEP_RUNGS = { light: [600, 700], dark: [400, 300] };
|
|
25
|
+
const swatch = (theme, colorScheme) => theme.colors[colorScheme];
|
|
26
|
+
const buttonSolidRung = (theme, colorScheme) => (0, filledSurface_1.solidFillRung)(swatch(theme, colorScheme), theme.colors.white);
|
|
33
27
|
const darkerFill = (theme, colorScheme, step) => {
|
|
34
|
-
const
|
|
35
|
-
|
|
28
|
+
const scale = swatch(theme, colorScheme);
|
|
29
|
+
const rung = (0, filledSurface_1.darkerFillRung)(scale, theme.colors.backgroundColor.main, theme.colors.white, step);
|
|
30
|
+
return scale[rung];
|
|
36
31
|
};
|
|
37
32
|
/** Label for the solid variant's filled bg — derived from THAT fill, since hover/active swap it. */
|
|
38
|
-
const labelFor = (theme, fill) => (0,
|
|
33
|
+
const labelFor = (theme, fill) => (0, filledSurface_1.labelOnFill)(fill, theme.colors.white, theme.colors.black);
|
|
34
|
+
/**
|
|
35
|
+
* The two-tone `:focus-visible` ring, from the palette's derived `focusRing` pair.
|
|
36
|
+
*
|
|
37
|
+
* Every variant spreads this. Before it, none of them defined `_focusVisible` at all, so every
|
|
38
|
+
* button in every consuming app fell through to Chakra's stock `shadows.outline` — one fixed blue
|
|
39
|
+
* that measured 1.83:1 on the canvas and 1.38:1 on a primary fill, failing WCAG 1.4.11 (3:1) on
|
|
40
|
+
* all nine brands. `focusRing.test.ts` is the gate that keeps this true.
|
|
41
|
+
*/
|
|
42
|
+
const focusRing = (theme) => (0, focusRing_styles_1.focusVisibleStyles)(theme.colors);
|
|
39
43
|
exports.Button = {
|
|
40
|
-
|
|
44
|
+
// The ring is repeated on every variant below AND here, so a variant name this file does not
|
|
45
|
+
// define (a consumer's own, or an `IconButton` falling through) still gets an indicator.
|
|
46
|
+
baseStyle: ({ theme }) => ({
|
|
41
47
|
borderRadius: "lg",
|
|
42
48
|
fontWeight: 500,
|
|
43
49
|
fontSize: "1rem",
|
|
@@ -46,10 +52,11 @@ exports.Button = {
|
|
|
46
52
|
opacity: 0.6,
|
|
47
53
|
cursor: "not-allowed",
|
|
48
54
|
},
|
|
55
|
+
...focusRing(theme),
|
|
49
56
|
}),
|
|
50
57
|
variants: {
|
|
51
58
|
solid: ({ theme, colorScheme = "primary" }) => {
|
|
52
|
-
const fill = theme.colors[colorScheme][
|
|
59
|
+
const fill = theme.colors[colorScheme][buttonSolidRung(theme, colorScheme)];
|
|
53
60
|
const hoverFill = darkerFill(theme, colorScheme, 0);
|
|
54
61
|
const activeFill = darkerFill(theme, colorScheme, 1);
|
|
55
62
|
const hoverLabel = labelFor(theme, hoverFill);
|
|
@@ -78,25 +85,26 @@ exports.Button = {
|
|
|
78
85
|
color: hoverLabel,
|
|
79
86
|
},
|
|
80
87
|
},
|
|
88
|
+
...focusRing(theme),
|
|
81
89
|
};
|
|
82
90
|
},
|
|
83
91
|
outline: ({ theme, colorScheme = "primary" }) => {
|
|
84
|
-
|
|
92
|
+
// Same rung as `solid`'s fill, not raw [500] — keeps hover bg AA-safe for white text.
|
|
93
|
+
const hoverFill = theme.colors[colorScheme][buttonSolidRung(theme, colorScheme)];
|
|
85
94
|
const activeFill = darkerFill(theme, colorScheme, 0);
|
|
95
|
+
const ink = onCanvasText(theme, colorScheme);
|
|
86
96
|
return {
|
|
87
97
|
border: "0.1rem solid",
|
|
88
|
-
borderColor:
|
|
89
|
-
color:
|
|
98
|
+
borderColor: ink,
|
|
99
|
+
color: ink,
|
|
90
100
|
bg: "transparent",
|
|
91
101
|
_hover: {
|
|
92
102
|
bg: hoverFill,
|
|
93
103
|
borderColor: activeFill,
|
|
94
|
-
// Was a hardcoded `theme.colors.white` — fails AA for any colorScheme whose [500]
|
|
95
|
-
// doesn't clear white contrast (e.g. emerald/rosewood primary in dark, 3.38/3.46).
|
|
96
104
|
color: labelFor(theme, hoverFill),
|
|
97
105
|
_disabled: {
|
|
98
106
|
// bg: theme.colors[colorScheme][500],
|
|
99
|
-
color:
|
|
107
|
+
color: ink,
|
|
100
108
|
},
|
|
101
109
|
},
|
|
102
110
|
_active: {
|
|
@@ -105,8 +113,9 @@ exports.Button = {
|
|
|
105
113
|
},
|
|
106
114
|
_loading: {
|
|
107
115
|
// bg: theme.colors[colorScheme][500],
|
|
108
|
-
color:
|
|
116
|
+
color: ink,
|
|
109
117
|
},
|
|
118
|
+
...focusRing(theme),
|
|
110
119
|
};
|
|
111
120
|
},
|
|
112
121
|
ghost: ({ theme, colorScheme = "primary" }) => ({
|
|
@@ -119,6 +128,7 @@ exports.Button = {
|
|
|
119
128
|
_active: {
|
|
120
129
|
bg: onCanvasHoverBg(theme, colorScheme, 24),
|
|
121
130
|
},
|
|
131
|
+
...focusRing(theme),
|
|
122
132
|
}),
|
|
123
133
|
link: ({ theme, colorScheme = "primary" }) => ({
|
|
124
134
|
color: onCanvasText(theme, colorScheme),
|
|
@@ -131,13 +141,16 @@ exports.Button = {
|
|
|
131
141
|
_active: {
|
|
132
142
|
color: onCanvasText(theme, colorScheme),
|
|
133
143
|
},
|
|
144
|
+
...focusRing(theme),
|
|
134
145
|
}),
|
|
135
|
-
unstyled:
|
|
146
|
+
// `unstyled` drops the fill, not the affordance: a focus indicator is not styling.
|
|
147
|
+
unstyled: ({ theme }) => ({
|
|
136
148
|
bg: "transparent",
|
|
137
149
|
color: "inherit",
|
|
138
150
|
_hover: {
|
|
139
151
|
bg: "transparent",
|
|
140
152
|
},
|
|
153
|
+
...focusRing(theme),
|
|
141
154
|
}),
|
|
142
155
|
// Theme-based two-tone gradient: each theme defines its own `gradient` {from,to} pair.
|
|
143
156
|
// Ignores colorScheme; hover/active shift brightness so it works for any pair.
|
|
@@ -164,6 +177,7 @@ exports.Button = {
|
|
|
164
177
|
filter: "brightness(0.92)",
|
|
165
178
|
_hover: { bgImage: bg, filter: "brightness(0.92)" },
|
|
166
179
|
},
|
|
180
|
+
...focusRing(theme),
|
|
167
181
|
};
|
|
168
182
|
},
|
|
169
183
|
},
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
|
|
2
|
-
|
|
2
|
+
type LayoutProps = Pick<ChakraButtonProps, "as" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "p" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "w" | "minW" | "maxW" | "h" | "minH" | "maxH" | "boxSize" | "flex" | "flexShrink" | "flexGrow" | "alignSelf" | "justifyContent" | "cursor" | "fontWeight" | "fontSize" | "textAlign" | "whiteSpace" | "_hover" | "_active" | "_focus" | "_focusVisible" | "_disabled" | "isActive" | "onKeyDown" | "onFocus" | "onBlur" | "onPointerDown" | "tabIndex" | "form" | "name" | "value" | "autoFocus" | "role">;
|
|
3
|
+
type DataAttributes = {
|
|
4
|
+
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** Themed Chakra Button; loadingText defaults to the literal "Loading" (pass "" for spinner-only) — for a plain unthemed <button>, see the separate Buttons component. */
|
|
7
|
+
export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "spinner" | "sx" | "border" | "borderRadius" | "onMouseEnter" | "onMouseLeave" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "aria-current" | "id" | "title"> & {
|
|
3
8
|
label?: string;
|
|
9
|
+
/** Defaults to "fit-content", not 100%; the w alias only applies when width is unset — width wins if both are passed. */
|
|
4
10
|
width?: string | number;
|
|
5
11
|
size?: "lg" | "md" | "sm" | "xs" | "xl";
|
|
6
12
|
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled" | "gradient";
|
|
7
13
|
type?: "button" | "submit" | "reset";
|
|
14
|
+
/** Ignored when variant="gradient" — that variant always paints the theme's fixed gradient pair, not this scheme. */
|
|
8
15
|
colorScheme?: 'primary' | 'secondary' | 'tertiary' | 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink';
|
|
9
16
|
ref?: React.Ref<HTMLButtonElement>;
|
|
10
17
|
children?: React.ReactNode;
|
|
11
18
|
opacity?: number;
|
|
12
19
|
};
|
|
20
|
+
export {};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
|
+
/** Themed Chakra ButtonGroup wrapper (left icon + text button + right icon/dropdown) — closed prop list, no ...rest, text via buttonText only. */
|
|
2
3
|
export type ButtonGroupIconProps = {
|
|
3
4
|
leftIcon?: ReactElement;
|
|
4
5
|
rightIcon?: ReactElement;
|
|
5
6
|
onLeftIconClick?: () => void;
|
|
6
7
|
onRightIconClick?: () => void;
|
|
8
|
+
/** Auto-wrapped in a tooltip showing full text, but only when it visually truncates (maxW 200px). */
|
|
7
9
|
buttonText: string;
|
|
8
10
|
onButtonClick?: () => void;
|
|
11
|
+
/** Fires on every click inside the group via DOM bubbling too — not just clicks on group chrome. */
|
|
9
12
|
onButtongroupClick?: () => void;
|
|
10
13
|
size?: "lg" | "md" | "sm" | "xs" | "xl";
|
|
11
14
|
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled" | "gradient";
|
|
15
|
+
/** Actually Chakra's colorScheme (a palette name like "red"), not a CSS text or icon color. */
|
|
12
16
|
color?: "primary" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha";
|
|
13
17
|
buttonGroupStyle?: React.CSSProperties;
|
|
14
18
|
buttonGroupLeftIconStyle?: React.CSSProperties;
|
|
@@ -16,6 +20,7 @@ export type ButtonGroupIconProps = {
|
|
|
16
20
|
buttonStyle?: React.CSSProperties;
|
|
17
21
|
onBlurLeftIcon?: () => void;
|
|
18
22
|
onBlurRightIcon?: () => void;
|
|
23
|
+
/** Rendered only when BOTH rightIcon and rightIconDropdown are also set — otherwise silently unused. */
|
|
19
24
|
dropdownOptions?: {
|
|
20
25
|
label: string;
|
|
21
26
|
id: string | number;
|
|
@@ -25,11 +30,13 @@ export type ButtonGroupIconProps = {
|
|
|
25
30
|
label: string;
|
|
26
31
|
id: string | number;
|
|
27
32
|
}) => void;
|
|
33
|
+
/** Also requires rightIcon — without it, neither the dropdown nor a plain right icon button renders. */
|
|
28
34
|
rightIconDropdown?: boolean;
|
|
29
35
|
menulistStyle?: React.CSSProperties;
|
|
30
36
|
menuItemStyle?: React.CSSProperties;
|
|
31
37
|
isLoading?: boolean;
|
|
32
38
|
divider?: boolean;
|
|
33
39
|
leftIconLoading?: boolean;
|
|
40
|
+
/** Capitalized "R" unlike leftIconLoading — same casing must match exactly, there is no rightIconLoading. */
|
|
34
41
|
RightIconLoading?: boolean;
|
|
35
42
|
};
|
|
@@ -72,7 +72,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
72
72
|
// this theme-swap app never triggers) — our `bg` prop above only recolors the list
|
|
73
73
|
// itself, not the inherited var, so items fell back to white until hover/focus (which
|
|
74
74
|
// our own sx already overrides). Setting the var here fixes the rest state too.
|
|
75
|
-
sx: { "--menu-bg": theme.colors.backgroundColor.light },
|
|
75
|
+
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
|
|
76
76
|
display: "flex",
|
|
77
77
|
alignItems: "center",
|
|
78
78
|
gap: "0.5rem",
|
|
@@ -82,7 +82,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
82
82
|
borderRadius: "lg",
|
|
83
83
|
fontSize: "13px",
|
|
84
84
|
fontWeight: 500,
|
|
85
|
-
color: theme.colors.
|
|
85
|
+
color: theme.colors.text[700],
|
|
86
86
|
transition: "background 0.12s",
|
|
87
87
|
"& svg": { width: "16px", height: "16px" },
|
|
88
88
|
...(divider
|
|
@@ -93,8 +93,6 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
93
93
|
borderColor: theme.colors.boxborder[200],
|
|
94
94
|
}
|
|
95
95
|
: {}),
|
|
96
|
-
_hover: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
|
|
97
|
-
_focus: { bg: theme.colors.primary[50], color: theme.colors.primary[700] },
|
|
98
96
|
"&:last-child": { borderBottom: "none" },
|
|
99
97
|
}, children: [option === null || option === void 0 ? void 0 : option.image, option.label] }, index))) }) })] })) : (rightIcon && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Right icon button", icon: rightIcon, isLoading: RightIconLoading, onClick: onRightIconClick, onBlur: onBlurRightIcon, style: buttonGroupRightIconStyle, sx: gradientItemSx })))] }));
|
|
100
98
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** Hardcoded Tailwind bg-purple-600 button, not theme-aware; not exported from the package root and not a group wrapper despite the plural name. */
|
|
1
2
|
export type ButtonsProps = {
|
|
2
3
|
label: string;
|
|
4
|
+
/** Typed with no event param, so preventDefault/stopPropagation aren't reachable through this prop. */
|
|
3
5
|
onClick: () => void;
|
|
4
6
|
className?: string;
|
|
5
7
|
disabled?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from "./CardProps";
|
|
2
|
-
export default function Card({
|
|
2
|
+
export default function Card({ maxW, align, variant, direction, justify, children, size, color, overflow, sx, }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = Card;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("@chakra-ui/react");
|
|
6
|
-
function Card({
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Card, { maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, p: 4, sx: sx, children: children }
|
|
6
|
+
function Card({ maxW, align, variant, direction, justify, children, size, color, overflow, sx, }) {
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Card, { maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, p: 4, sx: sx, children: children }));
|
|
8
8
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { CardProps as ChakraCardProps } from "@chakra-ui/react";
|
|
2
|
+
/** Plain padded Chakra Card wrapper for arbitrary children — not ProfileCard, which has Header/Body/Footer slots. */
|
|
2
3
|
export type CardProps = Pick<ChakraCardProps, "direction" | "maxW" | "align" | "justify" | "overflow" | "sx"> & {
|
|
4
|
+
/** header, footer, dividercolor, dividersize and dividervariant are all declared but never read — Card renders only `children`, no divider. */
|
|
3
5
|
header?: React.ReactNode;
|
|
4
6
|
footer?: React.ReactNode;
|
|
5
7
|
children: React.ReactNode;
|
|
6
8
|
variant?: "elevated" | "outline" | "filled" | "unstyled";
|
|
7
9
|
size?: "sm" | "md" | "lg";
|
|
10
|
+
/** Passed to Chakra as `colorScheme` — a token name like "blue", not a CSS color or hex value. */
|
|
8
11
|
color?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
9
|
-
key?: string;
|
|
10
12
|
dividercolor?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
|
|
11
13
|
dividersize?: string;
|
|
12
14
|
dividervariant?: "solid" | "dashed";
|
|
@@ -7,19 +7,26 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("@chakra-ui/react");
|
|
8
8
|
const lucide_react_1 = require("lucide-react");
|
|
9
9
|
const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
|
|
10
|
-
const
|
|
10
|
+
const filledSurface_1 = require("../../../Theme/tokens/builders/filledSurface");
|
|
11
11
|
const Button_1 = __importDefault(require("../../Button/Button"));
|
|
12
12
|
const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
|
|
13
|
-
const withOnButtonColor = (styles) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const withOnButtonColor = (styles) => {
|
|
14
|
+
const scale = theme.colors[styles.buttonScale];
|
|
15
|
+
const solid = (0, filledSurface_1.resolveFilledSurface)(scale, theme.colors);
|
|
16
|
+
return {
|
|
17
|
+
...styles,
|
|
18
|
+
buttonColor: solid.fill,
|
|
19
|
+
onButtonColor: solid.color,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
17
22
|
if (isActive) {
|
|
18
23
|
return withOnButtonColor({
|
|
19
24
|
badgeText: "Active Plan",
|
|
20
25
|
badgeColor: `0.125rem solid ${theme.colors.green[500]}`,
|
|
21
26
|
buttonColor: theme.colors.green[500],
|
|
27
|
+
buttonScale: "green",
|
|
22
28
|
buttonColor50: theme.colors.green[50],
|
|
29
|
+
colorScheme: "green",
|
|
23
30
|
});
|
|
24
31
|
}
|
|
25
32
|
if (isNextUpgrade) {
|
|
@@ -27,7 +34,9 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
|
|
|
27
34
|
badgeText: "Upgrade Your Plan",
|
|
28
35
|
badgeColor: `0.125rem solid ${theme.colors.primary[500]}`,
|
|
29
36
|
buttonColor: theme.colors.primary[500],
|
|
37
|
+
buttonScale: "primary",
|
|
30
38
|
buttonColor50: theme.colors.primary[50],
|
|
39
|
+
colorScheme: "primary",
|
|
31
40
|
});
|
|
32
41
|
}
|
|
33
42
|
if (popular) {
|
|
@@ -35,25 +44,25 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
|
|
|
35
44
|
badgeText: "Most Popular",
|
|
36
45
|
badgeColor: `0.125rem solid ${theme.colors.primary[500]}`,
|
|
37
46
|
buttonColor: theme.colors.primary[500],
|
|
47
|
+
buttonScale: "primary",
|
|
38
48
|
buttonColor50: theme.colors.primary[50],
|
|
49
|
+
colorScheme: "primary",
|
|
39
50
|
});
|
|
40
51
|
}
|
|
41
52
|
return withOnButtonColor({
|
|
42
53
|
badgeText: "",
|
|
43
54
|
badgeColor: "",
|
|
44
55
|
buttonColor: theme.colors.primary[500],
|
|
56
|
+
buttonScale: "primary",
|
|
45
57
|
buttonColor50: theme.colors.primary[50],
|
|
58
|
+
colorScheme: "primary",
|
|
46
59
|
});
|
|
47
60
|
};
|
|
48
61
|
const PaymentCard = ({ plan, isActive = false, isNextUpgrade = false, billingCycle, onSelect, onHover, buttonLoading, isLoading = false, isRenewal = false, }) => {
|
|
49
62
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
50
|
-
const { badgeText, badgeColor, buttonColor, buttonColor50, onButtonColor } = getCardStyles(isActive, isNextUpgrade, !!plan.popular, theme);
|
|
63
|
+
const { badgeText, badgeColor, buttonColor, buttonColor50, onButtonColor, colorScheme } = getCardStyles(isActive, isNextUpgrade, !!plan.popular, theme);
|
|
51
64
|
const variantStyles = plan.buttonVariant === "outline"
|
|
52
|
-
? {
|
|
53
|
-
borderColor: buttonColor,
|
|
54
|
-
color: buttonColor,
|
|
55
|
-
_hover: { bg: buttonColor50 },
|
|
56
|
-
}
|
|
65
|
+
? {}
|
|
57
66
|
: {
|
|
58
67
|
bg: buttonColor,
|
|
59
68
|
color: onButtonColor,
|
|
@@ -65,6 +74,6 @@ const PaymentCard = ({ plan, isActive = false, isNextUpgrade = false, billingCyc
|
|
|
65
74
|
// 🔹 Actual Card Content
|
|
66
75
|
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [badgeText && ((0, jsx_runtime_1.jsx)(react_1.Badge, { position: "absolute", top: "-0.75rem", left: "50%", transform: "translateX(-50%)", bg: buttonColor, color: onButtonColor, fontSize: "sm", px: 4, py: 1, borderRadius: "full", children: badgeText })), (0, jsx_runtime_1.jsxs)(react_1.Box, { textAlign: "center", mb: 6, children: [(0, jsx_runtime_1.jsx)(react_1.Flex, { justify: "center", align: "center", w: "3.125rem", h: "3.125rem", borderRadius: "lg", bg: buttonColor50, color: buttonColor, mx: "auto", mb: 4, children: plan.icon }), (0, jsx_runtime_1.jsx)(react_1.Heading, { as: "h3", size: "lg", mb: 4, color: theme.colors.gray[800], children: plan.name }), (plan.yearlyPrice !== 0 || plan.monthlyPrice !== 0) && ((0, jsx_runtime_1.jsxs)(react_1.Heading, { as: "h4", size: "2xl", mb: 1, color: theme.colors.gray[800], display: "flex", justifyContent: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { fontSize: "1.5rem", children: "\u20B9" }), billingCycle === "yearly"
|
|
67
76
|
? plan.yearlyPrice
|
|
68
|
-
: plan.monthlyPrice, (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", justifyContent: "end", ml: 1, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "0.9rem", fontWeight: "normal", color: theme.colors.gray[600], children: plan.billing }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "0.7rem", fontWeight: "normal", color: theme.colors.gray[600], children: plan.tax })] })] })), plan.priceDescription && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: theme.colors.green[800], mt: 2, children: plan === null || plan === void 0 ? void 0 : plan.priceDescription })), (0, jsx_runtime_1.jsx)(react_1.Text, { color: theme.colors.gray[600], mt: 2, children: plan.description })] }), ((!isActive && plan.buttonText) || isRenewal) && ((0, jsx_runtime_1.jsx)(Button_1.default, { isLoading: plan.plan_id === buttonLoading, loadingText: plan.buttonLoadingText, width: "full", variant: plan.buttonVariant, size: "lg", onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(plan.plan_id), onMouseEnter: () => onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", true), onMouseLeave: () => onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", false), ...variantStyles, children: plan.buttonText })), (0, jsx_runtime_1.jsx)(react_1.VStack, { align: "start", spacing: 3, mt: 6, children: plan.features.map((feature, i) => ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.Check, color: theme.colors.green[500], mr: 2 }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "sm", children: feature })] }, i))) })] })) }) }));
|
|
77
|
+
: plan.monthlyPrice, (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", justifyContent: "end", ml: 1, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "0.9rem", fontWeight: "normal", color: theme.colors.gray[600], children: plan.billing }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "0.7rem", fontWeight: "normal", color: theme.colors.gray[600], children: plan.tax })] })] })), plan.priceDescription && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: theme.colors.green[800], mt: 2, children: plan === null || plan === void 0 ? void 0 : plan.priceDescription })), (0, jsx_runtime_1.jsx)(react_1.Text, { color: theme.colors.gray[600], mt: 2, children: plan.description })] }), ((!isActive && plan.buttonText) || isRenewal) && ((0, jsx_runtime_1.jsx)(Button_1.default, { isLoading: plan.plan_id === buttonLoading, loadingText: plan.buttonLoadingText, width: "full", variant: plan.buttonVariant, colorScheme: colorScheme, size: "lg", onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(plan.plan_id), onMouseEnter: () => onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", true), onMouseLeave: () => onHover === null || onHover === void 0 ? void 0 : onHover(plan.plan_id, "button", false), ...variantStyles, children: plan.buttonText })), (0, jsx_runtime_1.jsx)(react_1.VStack, { align: "start", spacing: 3, mt: 6, children: plan.features.map((feature, i) => ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.Check, color: theme.colors.green[500], mr: 2 }), (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "sm", children: feature })] }, i))) })] })) }) }));
|
|
69
78
|
};
|
|
70
79
|
exports.default = PaymentCard;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
/** Subscription/pricing-tier card — takes a `Plan` (billing cycle, features), not a physical product like ProductCard's `options`. */
|
|
1
2
|
export type PaymentCardProps = {
|
|
2
3
|
plan: Plan;
|
|
4
|
+
/** true hides the CTA button unless `isRenewal` is also true, no matter what `plan.buttonText` says. */
|
|
3
5
|
isActive?: boolean;
|
|
4
6
|
isNextUpgrade?: boolean;
|
|
5
7
|
billingCycle: "monthly" | "yearly";
|
|
6
8
|
onSelect?: (planId: number) => void;
|
|
9
|
+
/** `type` is always "button" in practice — PaymentCard never wires hover on the outer card, only the CTA button. */
|
|
7
10
|
onHover?: (planId: number, type: "card" | "button", state: boolean) => void;
|
|
11
|
+
/** The plan_id whose button should spin, not a boolean — matched via `===` against each plan's plan_id. */
|
|
8
12
|
buttonLoading?: number;
|
|
9
13
|
isLoading?: boolean;
|
|
10
14
|
isRenewal?: boolean;
|
|
11
15
|
};
|
|
16
|
+
/** Plan data rendered by PaymentCard — `billing`/`tax` are pre-formatted display strings shown under the price, not derived from monthlyPrice/yearlyPrice. */
|
|
12
17
|
export type Plan = {
|
|
13
18
|
plan_id: number;
|
|
14
19
|
name: string;
|
|
@@ -20,6 +25,7 @@ export type Plan = {
|
|
|
20
25
|
features: string[];
|
|
21
26
|
icon: React.ReactNode;
|
|
22
27
|
buttonText: string;
|
|
28
|
+
/** "link" still gets the same filled bg/color override as "solid" — only "outline" is excluded from it. */
|
|
23
29
|
buttonVariant: "solid" | "outline" | "link";
|
|
24
30
|
popular?: boolean;
|
|
25
31
|
buttonLoadingText?: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { CheckboxProps } from "./CheckboxProps";
|
|
2
|
+
/** Renders Chakra's native role="checkbox"; label is optional and falls back to aria-label — pass isInvalid (not just error) for the invalid state to register. */
|
|
2
3
|
export default function CheckBox({ label, labelFontSize, showLabelTooltip, labelTooltip, labelClampLines, spacing, isInvalid, color, iconColor, iconSize, isChecked, isIndeterminate, onChange, isDisabled, size, value, defaultChecked, sx, error, errorMessage, helperText, onClick, labelSx, ...aria }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
10
10
|
const ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
|
|
11
11
|
const HelperText_1 = __importDefault(require("../Common/HelperText"));
|
|
12
12
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
13
|
+
/** Renders Chakra's native role="checkbox"; label is optional and falls back to aria-label — pass isInvalid (not just error) for the invalid state to register. */
|
|
13
14
|
function CheckBox({ label, labelFontSize, showLabelTooltip, labelTooltip, labelClampLines, spacing, isInvalid, color, iconColor, iconSize, isChecked, isIndeterminate, onChange, isDisabled, size = "md", value, defaultChecked, sx, error, errorMessage, helperText, onClick, labelSx, ...aria }) {
|
|
14
15
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
15
16
|
const controlSize = size === "sm" ? "1rem"
|
|
@@ -27,7 +28,7 @@ function CheckBox({ label, labelFontSize, showLabelTooltip, labelTooltip, labelC
|
|
|
27
28
|
...labelSx,
|
|
28
29
|
}
|
|
29
30
|
: { ...labelSx };
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Checkbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Checkbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], display: "flex", alignItems: "center", sx: {
|
|
31
32
|
...sx,
|
|
32
33
|
".chakra-checkbox__control": { w: controlSize, h: controlSize },
|
|
33
34
|
}, children: label && (showLabelTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: labelTooltip !== null && labelTooltip !== void 0 ? labelTooltip : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }))) }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage }), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText })] }));
|
|
@@ -2,22 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Checkbox = void 0;
|
|
4
4
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
5
|
+
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
5
6
|
exports.Checkbox = {
|
|
6
7
|
baseStyle: ({ theme, colorScheme = "primary" }) => {
|
|
7
8
|
var _a;
|
|
8
9
|
const palette = (_a = theme.colors[colorScheme]) !== null && _a !== void 0 ? _a : theme.colors.primary;
|
|
9
|
-
//
|
|
10
|
-
// Chakra's stock control also carries a checked-hover at `_checked._hover` (this override
|
|
11
|
-
// nests the other way, `_hover._checked`) — two different key paths landing on the same
|
|
12
|
-
// selector, so whichever one the cascade picks must still differ from resting. Setting both
|
|
13
|
-
// paths to the same lifted value removes that ambiguity outright.
|
|
10
|
+
// Both `_checked._hover` and `_hover._checked` paths get the same lifted value.
|
|
14
11
|
const hoverChecked = (0, outlineRung_1.resolveHoverTint)(palette[600], palette[600]);
|
|
12
|
+
const checkedIcon = (0, accentText_1.onFilled)(palette[600], theme.colors.white, theme.colors.black);
|
|
13
|
+
const hoverCheckedIcon = (0, accentText_1.onFilled)(hoverChecked, theme.colors.white, theme.colors.black);
|
|
14
|
+
const focusRing = (0, outlineRung_1.liftToContrast)(palette[300], theme.colors.backgroundColor.main, outlineRung_1.AA_NON_TEXT);
|
|
15
15
|
return {
|
|
16
16
|
control: {
|
|
17
17
|
width: "1.25rem",
|
|
18
18
|
height: "1.25rem",
|
|
19
19
|
borderWidth: "1.6px",
|
|
20
20
|
borderRadius: "base",
|
|
21
|
+
// Without a resting colour Chakra falls back to its own gray.500.
|
|
22
|
+
borderColor: theme.colors.boxborder[500],
|
|
21
23
|
transition: "background 0.15s, border-color 0.15s, box-shadow 0.15s",
|
|
22
24
|
_disabled: {
|
|
23
25
|
bg: theme.colors.background[50],
|
|
@@ -52,7 +54,7 @@ exports.Checkbox = {
|
|
|
52
54
|
},
|
|
53
55
|
},
|
|
54
56
|
_focus: {
|
|
55
|
-
boxShadow: `0 0 0 2px ${
|
|
57
|
+
boxShadow: `0 0 0 2px ${focusRing}`,
|
|
56
58
|
borderColor: palette[500],
|
|
57
59
|
},
|
|
58
60
|
_active: {
|
|
@@ -61,7 +63,10 @@ exports.Checkbox = {
|
|
|
61
63
|
},
|
|
62
64
|
},
|
|
63
65
|
icon: {
|
|
64
|
-
color:
|
|
66
|
+
color: checkedIcon,
|
|
67
|
+
_hover: {
|
|
68
|
+
color: hoverCheckedIcon,
|
|
69
|
+
},
|
|
65
70
|
},
|
|
66
71
|
};
|
|
67
72
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CheckboxProps as ChakraButtonProps } from "@chakra-ui/react";
|
|
2
|
+
/** Curated Pick of Chakra's native CheckboxProps (not a full re-export) plus this library's label/tooltip/error additions. */
|
|
2
3
|
export type CheckboxProps = Pick<ChakraButtonProps, "spacing" | "isInvalid" | "size" | "iconColor" | "iconSize" | "isChecked" | "isIndeterminate" | "onChange" | "isDisabled" | "value" | "defaultChecked" | "sx" | "onClick" | "aria-label" | "aria-labelledby" | "aria-describedby" | "id"> & {
|
|
3
4
|
label?: string;
|
|
4
5
|
labelFontSize?: string;
|
|
@@ -6,9 +7,12 @@ export type CheckboxProps = Pick<ChakraButtonProps, "spacing" | "isInvalid" | "s
|
|
|
6
7
|
labelTooltip?: string;
|
|
7
8
|
labelClampLines?: number;
|
|
8
9
|
width?: string | number;
|
|
10
|
+
/** Not wired to this library's Checkbox theme (no variants key) — any effect comes from Chakra's own default, not design tokens. */
|
|
9
11
|
variant?: "solid" | "outline" | "ghost" | "link" | "unstyled";
|
|
12
|
+
/** Maps to Chakra's colorScheme (icon/fill tint), not a CSS color — text color is fixed via theme tokens. */
|
|
10
13
|
color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha";
|
|
11
14
|
size?: "sm" | "md" | "lg";
|
|
15
|
+
/** error/errorMessage/helperText render as visible text only — no aria-describedby link to the input, and helperText hides whenever error is true. */
|
|
12
16
|
error?: boolean;
|
|
13
17
|
errorMessage?: string;
|
|
14
18
|
helperText?: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** Inline error row for Input/PinInputs; `error` is the message text itself, not ErrorMessage's boolean `error` + `errorMessage` pair, and there's no `id` for aria-describedby. */
|
|
1
2
|
declare const ErrorComponent: ({ error, errorClassName, }: {
|
|
3
|
+
/** Required and rendered as-is — callers gate with `error && <ErrorComponent />` themselves; an empty string still draws the icon. */
|
|
2
4
|
error: string;
|
|
3
5
|
errorClassName?: string;
|
|
4
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
6
|
-
const
|
|
6
|
+
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
7
|
+
/** Inline error row for Input/PinInputs; `error` is the message text itself, not ErrorMessage's boolean `error` + `errorMessage` pair, and there's no `id` for aria-describedby. */
|
|
7
8
|
const ErrorComponent = ({ error, errorClassName, }) => {
|
|
8
9
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
const errorText = colors.semanticText.error;
|
|
11
|
+
const errorSolid = (0, filledSurface_1.resolveFilledSurface)(colors.semantic.error, colors);
|
|
12
|
+
const errorFill = errorSolid.fill;
|
|
13
|
+
const markInk = errorSolid.color;
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.HStack, { as: "p", align: "flex-start", spacing: 1, mt: 1, fontSize: "sm", color: errorText, className: errorClassName, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "50", fill: errorFill }), (0, jsx_runtime_1.jsx)("rect", { x: "46", y: "40", width: "8", height: "30", rx: "2", fill: markInk }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "28", r: "4", fill: markInk })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", children: error })] }));
|
|
13
15
|
};
|
|
14
16
|
exports.default = ErrorComponent;
|
|
@@ -4,8 +4,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const lucide_react_1 = require("lucide-react");
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
|
-
// `id` lets a field point `aria-describedby` here
|
|
8
|
-
//
|
|
7
|
+
// `id` lets a field point `aria-describedby` here; `role="alert"` announces once, on render.
|
|
8
|
+
// Always pass `errorMessage` when `error` is true — omitted, this renders the literal word "Error", and every caller hides `helperText` while `error` is true.
|
|
9
9
|
const ErrorMessage = ({ errorMessage, id }) => {
|
|
10
10
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
11
11
|
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { id: id, align: "center", color: colors.semanticText.error, fontSize: "0.875rem", role: "alert", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Info, { width: "0.875rem" }), (0, jsx_runtime_1.jsx)(react_1.Text, { ml: "0.188rem", children: errorMessage !== null && errorMessage !== void 0 ? errorMessage : "Error" })] }));
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>` — not a substitute for `Label` (Common/Label.tsx), which always renders a `FormLabel`. */
|
|
1
2
|
export declare const TextLabel: ({ label, id, isRequired, isInformation, informationMessage, fontSize, showTooltip, tooltipLabel, clampLines, inline, }: {
|
|
2
3
|
label: string;
|
|
4
|
+
/** Omit only when this sits inside another element's own `<label>` (e.g. Checkbox) — otherwise the visible text has no accessible association. */
|
|
3
5
|
id?: string;
|
|
6
|
+
/** Both are required together — `isInformation` alone renders no icon at all; `informationMessage` alone is never read. */
|
|
4
7
|
isInformation?: boolean;
|
|
5
8
|
informationMessage?: string;
|
|
6
9
|
isRequired?: boolean;
|
|
7
10
|
fontSize?: string;
|
|
8
11
|
showTooltip?: boolean;
|
|
12
|
+
/** Defaults to `label` when omitted, so a tooltip from `showTooltip` alone just repeats the visible text. */
|
|
9
13
|
tooltipLabel?: string;
|
|
10
14
|
clampLines?: number;
|
|
11
15
|
inline?: boolean;
|
|
@@ -9,6 +9,7 @@ const react_1 = require("@chakra-ui/react");
|
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
10
|
const lucide_react_1 = require("lucide-react");
|
|
11
11
|
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
12
|
+
/** Renders a real `<label htmlFor>` only when `id` is given, else a `<span>` — not a substitute for `Label` (Common/Label.tsx), which always renders a `FormLabel`. */
|
|
12
13
|
const TextLabel = ({ label, id, isRequired = false, isInformation = false, informationMessage = "", fontSize, showTooltip, tooltipLabel, clampLines, inline = false, }) => {
|
|
13
14
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
14
15
|
const clampStyles = clampLines ? {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
/** Tiny pseudo-markdown only — "#"/"##"/"###" headings and "**bold**"; single "*italic*" markers are stripped but render with no italic style. */
|
|
2
3
|
content?: string;
|
|
3
4
|
};
|
|
5
|
+
/** Not a full Markdown renderer — lists, links and code blocks render as literal text; returns null (no wrapper) when `content` is falsy. */
|
|
4
6
|
declare const FormattedDescription: ({ content }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
5
7
|
export default FormattedDescription;
|
|
@@ -41,6 +41,7 @@ const InlineText = ({ text }) => {
|
|
|
41
41
|
}
|
|
42
42
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: nodes });
|
|
43
43
|
};
|
|
44
|
+
/** Not a full Markdown renderer — lists, links and code blocks render as literal text; returns null (no wrapper) when `content` is falsy. */
|
|
44
45
|
const FormattedDescription = ({ content }) => {
|
|
45
46
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
46
47
|
if (!content)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** `id` is optional — pass one to control aria-describedby yourself; omitted, Chakra auto-generates one only inside a FormControl ancestor. */
|
|
2
|
+
/** Renders `helperText` unconditionally; each field hides this while showing an error (see ErrorMessage) — HelperText itself has no `error` prop. */
|
|
1
3
|
declare const HelperText: ({ helperText, id }: {
|
|
2
4
|
helperText: string;
|
|
3
5
|
id?: string;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
6
|
+
/** `id` is optional — pass one to control aria-describedby yourself; omitted, Chakra auto-generates one only inside a FormControl ancestor. */
|
|
7
|
+
/** Renders `helperText` unconditionally; each field hides this while showing an error (see ErrorMessage) — HelperText itself has no `error` prop. */
|
|
6
8
|
const HelperText = ({ helperText, id }) => {
|
|
7
9
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
8
10
|
const field = (0, react_1.useFormControlContext)();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Always renders a real Chakra `<label>` (FormLabel), even without `htmlFor` — unlike `TextLabel` (FormLabel.tsx), which falls back to a plain `<span>`. */
|
|
1
2
|
declare const Label: ({ label, htmlFor, labelClassName, isRequired, }: {
|
|
2
3
|
label: string;
|
|
3
4
|
/** id of the control being labelled. Omit rather than guess — `label` text is not an id. */
|