@makroz/web 1.0.1 → 1.1.0
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/dist/auth/MkAuthProvider.js +2 -4
- package/dist/auth/MkAuthProvider.js.map +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/auth/types.js +1 -1
- package/dist/components/FormField.d.ts +27 -0
- package/dist/components/FormField.d.ts.map +1 -0
- package/dist/components/FormField.js +18 -0
- package/dist/components/FormField.js.map +1 -0
- package/dist/components/FormField.stories.d.ts +11 -0
- package/dist/components/FormField.stories.d.ts.map +1 -0
- package/dist/components/FormField.stories.js +61 -0
- package/dist/components/FormField.stories.js.map +1 -0
- package/dist/components/MkAccordion.d.ts.map +1 -1
- package/dist/components/MkAccordion.js +0 -2
- package/dist/components/MkAccordion.js.map +1 -1
- package/dist/components/MkAccordion.stories.d.ts +13 -0
- package/dist/components/MkAccordion.stories.d.ts.map +1 -0
- package/dist/components/MkAccordion.stories.js +76 -0
- package/dist/components/MkAccordion.stories.js.map +1 -0
- package/dist/components/MkAccordion.stories.test.d.ts +2 -0
- package/dist/components/MkAccordion.stories.test.d.ts.map +1 -0
- package/dist/components/MkAccordion.stories.test.js +18 -0
- package/dist/components/MkAccordion.stories.test.js.map +1 -0
- package/dist/components/MkAlert.d.ts.map +1 -1
- package/dist/components/MkAlert.js +0 -2
- package/dist/components/MkAlert.js.map +1 -1
- package/dist/components/MkAlert.stories.d.ts +13 -0
- package/dist/components/MkAlert.stories.d.ts.map +1 -0
- package/dist/components/MkAlert.stories.js +75 -0
- package/dist/components/MkAlert.stories.js.map +1 -0
- package/dist/components/MkAlert.stories.test.d.ts +2 -0
- package/dist/components/MkAlert.stories.test.d.ts.map +1 -0
- package/dist/components/MkAlert.stories.test.js +16 -0
- package/dist/components/MkAlert.stories.test.js.map +1 -0
- package/dist/components/MkAvatar.d.ts.map +1 -1
- package/dist/components/MkAvatar.js +0 -2
- package/dist/components/MkAvatar.js.map +1 -1
- package/dist/components/MkAvatar.stories.d.ts +14 -0
- package/dist/components/MkAvatar.stories.d.ts.map +1 -0
- package/dist/components/MkAvatar.stories.js +67 -0
- package/dist/components/MkAvatar.stories.js.map +1 -0
- package/dist/components/MkAvatar.stories.test.d.ts +2 -0
- package/dist/components/MkAvatar.stories.test.d.ts.map +1 -0
- package/dist/components/MkAvatar.stories.test.js +16 -0
- package/dist/components/MkAvatar.stories.test.js.map +1 -0
- package/dist/components/MkBadge.d.ts.map +1 -1
- package/dist/components/MkBadge.js +0 -2
- package/dist/components/MkBadge.js.map +1 -1
- package/dist/components/MkBadge.stories.d.ts +15 -0
- package/dist/components/MkBadge.stories.d.ts.map +1 -0
- package/dist/components/MkBadge.stories.js +78 -0
- package/dist/components/MkBadge.stories.js.map +1 -0
- package/dist/components/MkBadge.stories.test.d.ts +2 -0
- package/dist/components/MkBadge.stories.test.d.ts.map +1 -0
- package/dist/components/MkBadge.stories.test.js +16 -0
- package/dist/components/MkBadge.stories.test.js.map +1 -0
- package/dist/components/MkButton.d.ts +1 -1
- package/dist/components/MkButton.d.ts.map +1 -1
- package/dist/components/MkButton.js +0 -2
- package/dist/components/MkButton.js.map +1 -1
- package/dist/components/MkButton.stories.d.ts +12 -0
- package/dist/components/MkButton.stories.d.ts.map +1 -0
- package/dist/components/MkButton.stories.js +57 -0
- package/dist/components/MkButton.stories.js.map +1 -0
- package/dist/components/MkButton.test.js +2 -4
- package/dist/components/MkButton.test.js.map +1 -1
- package/dist/components/MkCard.d.ts.map +1 -1
- package/dist/components/MkCard.js +0 -2
- package/dist/components/MkCard.js.map +1 -1
- package/dist/components/MkCard.stories.d.ts +11 -0
- package/dist/components/MkCard.stories.d.ts.map +1 -0
- package/dist/components/MkCard.stories.js +57 -0
- package/dist/components/MkCard.stories.js.map +1 -0
- package/dist/components/MkCheck.d.ts.map +1 -1
- package/dist/components/MkCheck.js +0 -2
- package/dist/components/MkCheck.js.map +1 -1
- package/dist/components/MkCheck.stories.d.ts +13 -0
- package/dist/components/MkCheck.stories.d.ts.map +1 -0
- package/dist/components/MkCheck.stories.js +63 -0
- package/dist/components/MkCheck.stories.js.map +1 -0
- package/dist/components/MkCheck.stories.test.d.ts +2 -0
- package/dist/components/MkCheck.stories.test.d.ts.map +1 -0
- package/dist/components/MkCheck.stories.test.js +16 -0
- package/dist/components/MkCheck.stories.test.js.map +1 -0
- package/dist/components/MkDatePicker.d.ts.map +1 -1
- package/dist/components/MkDatePicker.js +0 -2
- package/dist/components/MkDatePicker.js.map +1 -1
- package/dist/components/MkDatePicker.stories.d.ts +11 -0
- package/dist/components/MkDatePicker.stories.d.ts.map +1 -0
- package/dist/components/MkDatePicker.stories.js +47 -0
- package/dist/components/MkDatePicker.stories.js.map +1 -0
- package/dist/components/MkDatePicker.stories.test.d.ts +2 -0
- package/dist/components/MkDatePicker.stories.test.d.ts.map +1 -0
- package/dist/components/MkDatePicker.stories.test.js +16 -0
- package/dist/components/MkDatePicker.stories.test.js.map +1 -0
- package/dist/components/MkDivider.d.ts.map +1 -1
- package/dist/components/MkDivider.js +0 -2
- package/dist/components/MkDivider.js.map +1 -1
- package/dist/components/MkDivider.stories.d.ts +12 -0
- package/dist/components/MkDivider.stories.d.ts.map +1 -0
- package/dist/components/MkDivider.stories.js +33 -0
- package/dist/components/MkDivider.stories.js.map +1 -0
- package/dist/components/MkDivider.stories.test.d.ts +2 -0
- package/dist/components/MkDivider.stories.test.d.ts.map +1 -0
- package/dist/components/MkDivider.stories.test.js +15 -0
- package/dist/components/MkDivider.stories.test.js.map +1 -0
- package/dist/components/MkDropDown.d.ts.map +1 -1
- package/dist/components/MkDropDown.js +0 -2
- package/dist/components/MkDropDown.js.map +1 -1
- package/dist/components/MkDropDown.stories.d.ts +12 -0
- package/dist/components/MkDropDown.stories.d.ts.map +1 -0
- package/dist/components/MkDropDown.stories.js +76 -0
- package/dist/components/MkDropDown.stories.js.map +1 -0
- package/dist/components/MkDropDown.stories.test.d.ts +2 -0
- package/dist/components/MkDropDown.stories.test.d.ts.map +1 -0
- package/dist/components/MkDropDown.stories.test.js +18 -0
- package/dist/components/MkDropDown.stories.test.js.map +1 -0
- package/dist/components/MkEmptyState.d.ts.map +1 -1
- package/dist/components/MkEmptyState.js +0 -2
- package/dist/components/MkEmptyState.js.map +1 -1
- package/dist/components/MkEmptyState.stories.d.ts +12 -0
- package/dist/components/MkEmptyState.stories.d.ts.map +1 -0
- package/dist/components/MkEmptyState.stories.js +44 -0
- package/dist/components/MkEmptyState.stories.js.map +1 -0
- package/dist/components/MkEmptyState.stories.test.d.ts +2 -0
- package/dist/components/MkEmptyState.stories.test.d.ts.map +1 -0
- package/dist/components/MkEmptyState.stories.test.js +15 -0
- package/dist/components/MkEmptyState.stories.test.js.map +1 -0
- package/dist/components/MkFileUpload.d.ts.map +1 -1
- package/dist/components/MkFileUpload.js +0 -2
- package/dist/components/MkFileUpload.js.map +1 -1
- package/dist/components/MkFileUpload.stories.d.ts +12 -0
- package/dist/components/MkFileUpload.stories.d.ts.map +1 -0
- package/dist/components/MkFileUpload.stories.js +53 -0
- package/dist/components/MkFileUpload.stories.js.map +1 -0
- package/dist/components/MkFileUpload.stories.test.d.ts +2 -0
- package/dist/components/MkFileUpload.stories.test.d.ts.map +1 -0
- package/dist/components/MkFileUpload.stories.test.js +15 -0
- package/dist/components/MkFileUpload.stories.test.js.map +1 -0
- package/dist/components/MkIcons.d.ts +6 -6
- package/dist/components/MkIcons.d.ts.map +1 -1
- package/dist/components/MkIcons.js +0 -2
- package/dist/components/MkIcons.js.map +1 -1
- package/dist/components/MkInfiniteList.d.ts +1 -1
- package/dist/components/MkInfiniteList.d.ts.map +1 -1
- package/dist/components/MkInfiniteList.js +0 -2
- package/dist/components/MkInfiniteList.js.map +1 -1
- package/dist/components/MkInfiniteList.stories.d.ts +17 -0
- package/dist/components/MkInfiniteList.stories.d.ts.map +1 -0
- package/dist/components/MkInfiniteList.stories.js +90 -0
- package/dist/components/MkInfiniteList.stories.js.map +1 -0
- package/dist/components/MkInfiniteList.stories.test.d.ts +2 -0
- package/dist/components/MkInfiniteList.stories.test.d.ts.map +1 -0
- package/dist/components/MkInfiniteList.stories.test.js +24 -0
- package/dist/components/MkInfiniteList.stories.test.js.map +1 -0
- package/dist/components/MkInput.d.ts.map +1 -1
- package/dist/components/MkInput.js +0 -2
- package/dist/components/MkInput.js.map +1 -1
- package/dist/components/MkInput.stories.d.ts +13 -0
- package/dist/components/MkInput.stories.d.ts.map +1 -0
- package/dist/components/MkInput.stories.js +75 -0
- package/dist/components/MkInput.stories.js.map +1 -0
- package/dist/components/MkInput.stories.test.d.ts +2 -0
- package/dist/components/MkInput.stories.test.d.ts.map +1 -0
- package/dist/components/MkInput.stories.test.js +16 -0
- package/dist/components/MkInput.stories.test.js.map +1 -0
- package/dist/components/MkLoading.d.ts.map +1 -1
- package/dist/components/MkLoading.js +0 -2
- package/dist/components/MkLoading.js.map +1 -1
- package/dist/components/MkLoading.stories.d.ts +13 -0
- package/dist/components/MkLoading.stories.d.ts.map +1 -0
- package/dist/components/MkLoading.stories.js +35 -0
- package/dist/components/MkLoading.stories.js.map +1 -0
- package/dist/components/MkLoading.stories.test.d.ts +2 -0
- package/dist/components/MkLoading.stories.test.d.ts.map +1 -0
- package/dist/components/MkLoading.stories.test.js +15 -0
- package/dist/components/MkLoading.stories.test.js.map +1 -0
- package/dist/components/MkModal.d.ts.map +1 -1
- package/dist/components/MkModal.js +0 -2
- package/dist/components/MkModal.js.map +1 -1
- package/dist/components/MkModal.stories.d.ts +13 -0
- package/dist/components/MkModal.stories.d.ts.map +1 -0
- package/dist/components/MkModal.stories.js +73 -0
- package/dist/components/MkModal.stories.js.map +1 -0
- package/dist/components/MkProgressBar.d.ts.map +1 -1
- package/dist/components/MkProgressBar.js +0 -2
- package/dist/components/MkProgressBar.js.map +1 -1
- package/dist/components/MkProgressBar.stories.d.ts +13 -0
- package/dist/components/MkProgressBar.stories.d.ts.map +1 -0
- package/dist/components/MkProgressBar.stories.js +39 -0
- package/dist/components/MkProgressBar.stories.js.map +1 -0
- package/dist/components/MkProgressBar.stories.test.d.ts +2 -0
- package/dist/components/MkProgressBar.stories.test.d.ts.map +1 -0
- package/dist/components/MkProgressBar.stories.test.js +15 -0
- package/dist/components/MkProgressBar.stories.test.js.map +1 -0
- package/dist/components/MkRadio.d.ts.map +1 -1
- package/dist/components/MkRadio.js +0 -2
- package/dist/components/MkRadio.js.map +1 -1
- package/dist/components/MkRadio.stories.d.ts +13 -0
- package/dist/components/MkRadio.stories.d.ts.map +1 -0
- package/dist/components/MkRadio.stories.js +55 -0
- package/dist/components/MkRadio.stories.js.map +1 -0
- package/dist/components/MkRadio.stories.test.d.ts +2 -0
- package/dist/components/MkRadio.stories.test.d.ts.map +1 -0
- package/dist/components/MkRadio.stories.test.js +18 -0
- package/dist/components/MkRadio.stories.test.js.map +1 -0
- package/dist/components/MkSearchInput.d.ts.map +1 -1
- package/dist/components/MkSearchInput.js +0 -2
- package/dist/components/MkSearchInput.js.map +1 -1
- package/dist/components/MkSearchInput.stories.d.ts +13 -0
- package/dist/components/MkSearchInput.stories.d.ts.map +1 -0
- package/dist/components/MkSearchInput.stories.js +47 -0
- package/dist/components/MkSearchInput.stories.js.map +1 -0
- package/dist/components/MkSearchInput.stories.test.d.ts +2 -0
- package/dist/components/MkSearchInput.stories.test.d.ts.map +1 -0
- package/dist/components/MkSearchInput.stories.test.js +15 -0
- package/dist/components/MkSearchInput.stories.test.js.map +1 -0
- package/dist/components/MkSelect.d.ts.map +1 -1
- package/dist/components/MkSelect.js +0 -2
- package/dist/components/MkSelect.js.map +1 -1
- package/dist/components/MkSelect.stories.d.ts +12 -0
- package/dist/components/MkSelect.stories.d.ts.map +1 -0
- package/dist/components/MkSelect.stories.js +84 -0
- package/dist/components/MkSelect.stories.js.map +1 -0
- package/dist/components/MkSelect.stories.test.d.ts +2 -0
- package/dist/components/MkSelect.stories.test.d.ts.map +1 -0
- package/dist/components/MkSelect.stories.test.js +21 -0
- package/dist/components/MkSelect.stories.test.js.map +1 -0
- package/dist/components/MkSkeleton.d.ts.map +1 -1
- package/dist/components/MkSkeleton.js +0 -2
- package/dist/components/MkSkeleton.js.map +1 -1
- package/dist/components/MkSkeleton.stories.d.ts +12 -0
- package/dist/components/MkSkeleton.stories.d.ts.map +1 -0
- package/dist/components/MkSkeleton.stories.js +32 -0
- package/dist/components/MkSkeleton.stories.js.map +1 -0
- package/dist/components/MkSkeleton.stories.test.d.ts +2 -0
- package/dist/components/MkSkeleton.stories.test.d.ts.map +1 -0
- package/dist/components/MkSkeleton.stories.test.js +15 -0
- package/dist/components/MkSkeleton.stories.test.js.map +1 -0
- package/dist/components/MkSwitch.d.ts.map +1 -1
- package/dist/components/MkSwitch.js +0 -2
- package/dist/components/MkSwitch.js.map +1 -1
- package/dist/components/MkSwitch.stories.d.ts +13 -0
- package/dist/components/MkSwitch.stories.d.ts.map +1 -0
- package/dist/components/MkSwitch.stories.js +37 -0
- package/dist/components/MkSwitch.stories.js.map +1 -0
- package/dist/components/MkSwitch.stories.test.d.ts +2 -0
- package/dist/components/MkSwitch.stories.test.d.ts.map +1 -0
- package/dist/components/MkSwitch.stories.test.js +15 -0
- package/dist/components/MkSwitch.stories.test.js.map +1 -0
- package/dist/components/MkTable.d.ts +1 -1
- package/dist/components/MkTable.d.ts.map +1 -1
- package/dist/components/MkTable.js +0 -2
- package/dist/components/MkTable.js.map +1 -1
- package/dist/components/MkTable.stories.d.ts +16 -0
- package/dist/components/MkTable.stories.d.ts.map +1 -0
- package/dist/components/MkTable.stories.js +65 -0
- package/dist/components/MkTable.stories.js.map +1 -0
- package/dist/components/MkTable.stories.test.d.ts +2 -0
- package/dist/components/MkTable.stories.test.d.ts.map +1 -0
- package/dist/components/MkTable.stories.test.js +25 -0
- package/dist/components/MkTable.stories.test.js.map +1 -0
- package/dist/components/MkTabs.d.ts.map +1 -1
- package/dist/components/MkTabs.js +0 -2
- package/dist/components/MkTabs.js.map +1 -1
- package/dist/components/MkTabs.stories.d.ts +11 -0
- package/dist/components/MkTabs.stories.d.ts.map +1 -0
- package/dist/components/MkTabs.stories.js +73 -0
- package/dist/components/MkTabs.stories.js.map +1 -0
- package/dist/components/MkTextArea.d.ts.map +1 -1
- package/dist/components/MkTextArea.js +0 -2
- package/dist/components/MkTextArea.js.map +1 -1
- package/dist/components/MkTextArea.stories.d.ts +13 -0
- package/dist/components/MkTextArea.stories.d.ts.map +1 -0
- package/dist/components/MkTextArea.stories.js +56 -0
- package/dist/components/MkTextArea.stories.js.map +1 -0
- package/dist/components/MkTextArea.stories.test.d.ts +2 -0
- package/dist/components/MkTextArea.stories.test.d.ts.map +1 -0
- package/dist/components/MkTextArea.stories.test.js +15 -0
- package/dist/components/MkTextArea.stories.test.js.map +1 -0
- package/dist/components/MkThemeEditor.js +1 -1
- package/dist/components/MkThemeEditor.js.map +1 -1
- package/dist/components/MkToastContainer.d.ts.map +1 -1
- package/dist/components/MkToastContainer.js +0 -2
- package/dist/components/MkToastContainer.js.map +1 -1
- package/dist/components/MkToastContainer.stories.d.ts +9 -0
- package/dist/components/MkToastContainer.stories.d.ts.map +1 -0
- package/dist/components/MkToastContainer.stories.js +43 -0
- package/dist/components/MkToastContainer.stories.js.map +1 -0
- package/dist/components/MkToastContainer.stories.test.d.ts +2 -0
- package/dist/components/MkToastContainer.stories.test.d.ts.map +1 -0
- package/dist/components/MkToastContainer.stories.test.js +29 -0
- package/dist/components/MkToastContainer.stories.test.js.map +1 -0
- package/dist/components/MkTooltip.d.ts.map +1 -1
- package/dist/components/MkTooltip.js +0 -2
- package/dist/components/MkTooltip.js.map +1 -1
- package/dist/components/MkTooltip.stories.d.ts +13 -0
- package/dist/components/MkTooltip.stories.d.ts.map +1 -0
- package/dist/components/MkTooltip.stories.js +59 -0
- package/dist/components/MkTooltip.stories.js.map +1 -0
- package/dist/components/MkTooltip.stories.test.d.ts +2 -0
- package/dist/components/MkTooltip.stories.test.d.ts.map +1 -0
- package/dist/components/MkTooltip.stories.test.js +15 -0
- package/dist/components/MkTooltip.stories.test.js.map +1 -0
- package/dist/components/MkWindowList.d.ts +1 -1
- package/dist/components/MkWindowList.d.ts.map +1 -1
- package/dist/components/MkWindowList.js +0 -2
- package/dist/components/MkWindowList.js.map +1 -1
- package/dist/components/MkWindowList.stories.d.ts +16 -0
- package/dist/components/MkWindowList.stories.d.ts.map +1 -0
- package/dist/components/MkWindowList.stories.js +76 -0
- package/dist/components/MkWindowList.stories.js.map +1 -0
- package/dist/components/MkWindowList.stories.test.d.ts +2 -0
- package/dist/components/MkWindowList.stories.test.d.ts.map +1 -0
- package/dist/components/MkWindowList.stories.test.js +19 -0
- package/dist/components/MkWindowList.stories.test.js.map +1 -0
- package/dist/context/MkApiContext.d.ts.map +1 -1
- package/dist/context/MkApiContext.js +0 -2
- package/dist/context/MkApiContext.js.map +1 -1
- package/dist/context/MkAuthContext.d.ts +1 -1
- package/dist/context/MkAuthContext.d.ts.map +1 -1
- package/dist/context/MkAuthContext.js +1 -3
- package/dist/context/MkAuthContext.js.map +1 -1
- package/dist/context/MkConfirmContext.d.ts +1 -1
- package/dist/context/MkConfirmContext.d.ts.map +1 -1
- package/dist/context/MkConfirmContext.js +0 -2
- package/dist/context/MkConfirmContext.js.map +1 -1
- package/dist/context/MkToastContext.d.ts +1 -1
- package/dist/context/MkToastContext.d.ts.map +1 -1
- package/dist/context/MkToastContext.js +0 -2
- package/dist/context/MkToastContext.js.map +1 -1
- package/dist/hooks/useApi.d.ts +1 -1
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useApi.js +0 -2
- package/dist/hooks/useApi.js.map +1 -1
- package/dist/hooks/useApi.test.js +0 -2
- package/dist/hooks/useApi.test.js.map +1 -1
- package/dist/hooks/useMkClickOutside.d.ts.map +1 -1
- package/dist/hooks/useMkClickOutside.js +0 -2
- package/dist/hooks/useMkClickOutside.js.map +1 -1
- package/dist/hooks/useMkCrud.d.ts +1 -1
- package/dist/hooks/useMkCrud.d.ts.map +1 -1
- package/dist/hooks/useMkCrud.js +0 -2
- package/dist/hooks/useMkCrud.js.map +1 -1
- package/dist/hooks/useMkCrud.test.js +0 -2
- package/dist/hooks/useMkCrud.test.js.map +1 -1
- package/dist/hooks/useMkDebounce.d.ts.map +1 -1
- package/dist/hooks/useMkDebounce.js +0 -2
- package/dist/hooks/useMkDebounce.js.map +1 -1
- package/dist/hooks/useMkEvent.d.ts +1 -1
- package/dist/hooks/useMkEvent.js +1 -1
- package/dist/hooks/useMkForm.d.ts +1 -1
- package/dist/hooks/useMkForm.d.ts.map +1 -1
- package/dist/hooks/useMkForm.js +1 -1
- package/dist/hooks/useMkForm.js.map +1 -1
- package/dist/hooks/useMkList.d.ts +7 -7
- package/dist/hooks/useMkList.js +0 -1
- package/dist/hooks/useMkList.js.map +1 -1
- package/dist/hooks/useMkScreenSize.js +0 -1
- package/dist/hooks/useMkScreenSize.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/test-setup.js +29 -0
- package/dist/test-setup.js.map +1 -1
- package/dist/theme/MkThemeProvider.d.ts +3 -3
- package/dist/theme/MkThemeProvider.d.ts.map +1 -1
- package/dist/theme/MkThemeProvider.js +2 -2
- package/dist/theme/MkThemeProvider.js.map +1 -1
- package/eslint-plugin-mk/README.md +167 -0
- package/package.json +16 -4
- package/dist/auth/auth/MkAuthContext.d.ts +0 -42
- package/dist/auth/auth/MkAuthForm.d.ts +0 -41
- package/dist/auth/auth/MkAuthProvider.d.ts +0 -29
- package/dist/auth/auth/types.d.ts +0 -62
- package/dist/auth/auth/useMkAuth.d.ts +0 -18
- package/dist/auth/components/MkButton.d.ts +0 -10
- package/dist/auth/components/MkInput.d.ts +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMkScreenSize.js","sourceRoot":"","sources":["../../src/hooks/useMkScreenSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAe5C,MAAM,mBAAmB,GAAw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,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3B,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { useMkAuth } from './auth/useMkAuth';
|
|
|
30
30
|
export { MkAuthForm } from './auth/MkAuthForm';
|
|
31
31
|
// Utils
|
|
32
32
|
export * from './utils/images';
|
|
33
|
-
// Note: Global CSS (`@
|
|
33
|
+
// Note: Global CSS (`@makroz/web/styles/index.css`) MUST be imported by the
|
|
34
34
|
// consuming app from `pages/_app.tsx` (or `app/layout.tsx`) — Next 13+
|
|
35
35
|
// forbids auto-importing global CSS from a package's main entry, and
|
|
36
36
|
// Turbopack in Next 16 enforces it strictly. See package README for usage.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE,WAAW;AACX,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AAExC,QAAQ;AACR,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CA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UAAU,EAAE,MAAM,mBAAmB,CAAC;AAW/C,QAAQ;AACR,cAAc,gBAAgB,CAAC;AAE/B,4EAA4E;AAC5E,uEAAuE;AACvE,qEAAqE;AACrE,2EAA2E"}
|
package/dist/test-setup.js
CHANGED
|
@@ -1,2 +1,31 @@
|
|
|
1
|
+
var _a, _b;
|
|
1
2
|
import '@testing-library/jest-dom';
|
|
3
|
+
// jsdom does not implement these browser APIs. Both are used by
|
|
4
|
+
// virtualized list components (MkWindowList uses ResizeObserver;
|
|
5
|
+
// MkInfiniteList uses IntersectionObserver). We stub them with
|
|
6
|
+
// no-op classes so jsdom can mount the components without crashing.
|
|
7
|
+
class ResizeObserverStub {
|
|
8
|
+
observe() { }
|
|
9
|
+
unobserve() { }
|
|
10
|
+
disconnect() { }
|
|
11
|
+
}
|
|
12
|
+
class IntersectionObserverStub {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.root = null;
|
|
15
|
+
this.rootMargin = '';
|
|
16
|
+
this.thresholds = [];
|
|
17
|
+
}
|
|
18
|
+
observe() { }
|
|
19
|
+
unobserve() { }
|
|
20
|
+
disconnect() { }
|
|
21
|
+
takeRecords() {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// jsdom does not implement these browser APIs. Both are used by
|
|
26
|
+
// virtualized list components (MkWindowList uses ResizeObserver;
|
|
27
|
+
// MkInfiniteList uses IntersectionObserver). We stub them with
|
|
28
|
+
// no-op classes so jsdom can mount the components without crashing.
|
|
29
|
+
globalThis.ResizeObserver = (_a = globalThis.ResizeObserver) !== null && _a !== void 0 ? _a : ResizeObserverStub;
|
|
30
|
+
globalThis.IntersectionObserver = (_b = globalThis.IntersectionObserver) !== null && _b !== void 0 ? _b : IntersectionObserverStub;
|
|
2
31
|
//# sourceMappingURL=test-setup.js.map
|
package/dist/test-setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":";AAAA,OAAO,2BAA2B,CAAC;AAEnC,gEAAgE;AAChE,iEAAiE;AACjE,+DAA+D;AAC/D,oEAAoE;AACpE,MAAM,kBAAkB;IACpB,OAAO,KAAI,CAAC;IACZ,SAAS,KAAI,CAAC;IACd,UAAU,KAAI,CAAC;CAClB;AAED,MAAM,wBAAwB;IAA9B;QACa,SAAI,GAAG,IAAI,CAAC;QACZ,eAAU,GAAG,EAAE,CAAC;QAChB,eAAU,GAA0B,EAAE,CAAC;IAOpD,CAAC;IANG,OAAO,KAAI,CAAC;IACZ,SAAS,KAAI,CAAC;IACd,UAAU,KAAI,CAAC;IACf,WAAW;QACP,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAED,gEAAgE;AAChE,iEAAiE;AACjE,+DAA+D;AAC/D,oEAAoE;AACpE,UAAU,CAAC,cAAc,GAAG,MAAA,UAAU,CAAC,cAAc,mCAAI,kBAAkB,CAAC;AAC5E,UAAU,CAAC,oBAAoB,GAAG,MAAA,UAAU,CAAC,oBAAoB,mCAAI,wBAAwB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { MkTheme } from '@
|
|
2
|
+
import type { MkTheme } from '@makroz/core';
|
|
3
3
|
interface ThemeContextType {
|
|
4
4
|
theme: MkTheme;
|
|
5
5
|
isDark: boolean;
|
|
@@ -15,6 +15,6 @@ export declare function MkThemeProvider({ children, initialDark, defaultTheme, }
|
|
|
15
15
|
defaultTheme?: MkTheme;
|
|
16
16
|
}): React.JSX.Element;
|
|
17
17
|
export declare const useMkTheme: () => ThemeContextType;
|
|
18
|
-
export { tokens } from '@
|
|
19
|
-
export type { MkTheme } from '@
|
|
18
|
+
export { tokens } from '@makroz/core';
|
|
19
|
+
export type { MkTheme } from '@makroz/core';
|
|
20
20
|
//# sourceMappingURL=MkThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MkThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/MkThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MkThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/MkThemeProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,UAAU,gBAAgB;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEjC,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAID,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAmB,EACnB,YAAY,GACb,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiFpB;AAED,eAAO,MAAM,UAAU,wBAMtB,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useState, useMemo, useEffect } from 'react';
|
|
4
|
-
import { tokens } from '@
|
|
4
|
+
import { tokens } from '@makroz/core';
|
|
5
5
|
const ThemeContext = createContext(undefined);
|
|
6
6
|
export function MkThemeProvider({ children, initialDark = false, defaultTheme, }) {
|
|
7
7
|
const [isDark, setIsDark] = useState(initialDark);
|
|
@@ -87,5 +87,5 @@ export const useMkTheme = () => {
|
|
|
87
87
|
}
|
|
88
88
|
return context;
|
|
89
89
|
};
|
|
90
|
-
export { tokens } from '@
|
|
90
|
+
export { tokens } from '@makroz/core';
|
|
91
91
|
//# sourceMappingURL=MkThemeProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MkThemeProvider.js","sourceRoot":"","sources":["../../src/theme/MkThemeProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MkThemeProvider.js","sourceRoot":"","sources":["../../src/theme/MkThemeProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAatC,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAE5E,MAAM,UAAU,eAAe,CAAC,EAC9B,QAAQ,EACR,WAAW,GAAG,KAAK,EACnB,YAAY,GAKb;IACC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,WAAW,CAAC,CAAC;IAC3D,MAAM,CAAC,eAAe,EAAE,kBAA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,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YACxD,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,+CAA+C;QAC/C,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IAEpB,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAyB,CAAC;AACjF,CAAC;AAAA,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# `@mk/eslint-plugin-mk`
|
|
2
|
+
|
|
3
|
+
> ESLint plugin that enforces the **MME rule (R-MK-001)** for
|
|
4
|
+
> JavaScript / TypeScript code in the `mk-director` monorepo and
|
|
5
|
+
> any downstream app that adopts `mk-director` modules.
|
|
6
|
+
>
|
|
7
|
+
> **Companion to** `mk:lint:boundaries` on the Laravel side. Both
|
|
8
|
+
> are required CI checks on `dev` of the `mk-director` monorepo
|
|
9
|
+
> (see [`../../BRANCH_PROTECTION.md`](../../BRANCH_PROTECTION.md)).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## The rule: `no-cross-module-import`
|
|
14
|
+
|
|
15
|
+
Forbids files inside `src/modules/<X>/` from importing deep paths
|
|
16
|
+
inside another module. Only `@/modules/<X>` (the public index) is
|
|
17
|
+
allowed.
|
|
18
|
+
|
|
19
|
+
| Import | Verdict |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `import { useAuth } from '@/modules/auth';` | OK — uses the public index |
|
|
22
|
+
| `import { PaymentForm } from '@/modules/payments/components/PaymentForm';` (file in `modules/payments/`) | OK — same module |
|
|
23
|
+
| `import { AdminForm } from '@/modules/admin/components/AdminForm';` (file in `modules/payments/`) | **Error** — deep cross-module import |
|
|
24
|
+
| `import { AdminListPage } from '@/modules/admin/pages/AdminListPage';` (file in `app/admin/page.tsx`) | OK — file is outside any module |
|
|
25
|
+
| `import { foo } from './useFoo';` | OK — relative import, ignored by the rule |
|
|
26
|
+
|
|
27
|
+
The error message is:
|
|
28
|
+
|
|
29
|
+
> Cross-module import is forbidden. Use '@/modules/<source>'
|
|
30
|
+
> public API instead. Got: '<imported>'.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
The plugin is shipped as a workspace entry of `@makroz/web` (and
|
|
37
|
+
re-exported by `@makroz/mobile`). Add it to your consuming app's
|
|
38
|
+
dependencies:
|
|
39
|
+
|
|
40
|
+
```jsonc
|
|
41
|
+
// package.json
|
|
42
|
+
{
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@makroz/web": "^1.1.0" // (or @makroz/mobile)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The `eslint-plugin-mk` sub-path is exported automatically:
|
|
50
|
+
|
|
51
|
+
```jsonc
|
|
52
|
+
// @makroz/web/package.json (excerpt)
|
|
53
|
+
"exports": {
|
|
54
|
+
"./eslint-plugin-mk": "./eslint-plugin-mk/index.js"
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Activate (ESLint v9 flat config)
|
|
61
|
+
|
|
62
|
+
Add the plugin to your `eslint.config.js` (or `.mjs`):
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
// eslint.config.js
|
|
66
|
+
import mkPlugin from '@makroz/web/eslint-plugin-mk';
|
|
67
|
+
|
|
68
|
+
export default [
|
|
69
|
+
// ...your other config blocks...
|
|
70
|
+
{
|
|
71
|
+
files: ['src/modules/**/*.{ts,tsx}'],
|
|
72
|
+
plugins: {
|
|
73
|
+
'@mk': mkPlugin,
|
|
74
|
+
},
|
|
75
|
+
rules: {
|
|
76
|
+
'@mk/no-cross-module-import': 'error',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> **The `files` glob must match the folders where your modules
|
|
83
|
+
> live.** In the `mk-director` monorepo, the glob is
|
|
84
|
+
> `{,apps/sandbox-web/,apps/sandbox-mobile/}src/modules/**/*.{ts,tsx}`
|
|
85
|
+
> so the rule fires whether `pnpm lint` is run from the root or
|
|
86
|
+
> from inside a sandbox app.
|
|
87
|
+
|
|
88
|
+
### Next.js (downstream)
|
|
89
|
+
|
|
90
|
+
For a Next.js 16 app generated by `create-mk-director`, the
|
|
91
|
+
template already wires this up — see
|
|
92
|
+
[`../../create-mk-director/src/templates/admin-nextjs/eslint.config.mjs`](../../create-mk-director/src/templates/admin-nextjs/eslint.config.mjs).
|
|
93
|
+
|
|
94
|
+
### React Native (downstream)
|
|
95
|
+
|
|
96
|
+
Use `@makroz/mobile/eslint-plugin-mk` instead. The mobile entry
|
|
97
|
+
re-exports the same rule with mobile-flavored metadata, so RN
|
|
98
|
+
consumers don't pull in React-specific types from `@makroz/web`.
|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
// eslint.config.js (RN app)
|
|
102
|
+
import mkPlugin from '@makroz/mobile/eslint-plugin-mk';
|
|
103
|
+
// ...same activation as above
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Required CI check (mk-director monorepo)
|
|
109
|
+
|
|
110
|
+
`pnpm lint` at the root activates the rule. The job that
|
|
111
|
+
enforces it on `dev` is **`lint-eslint-mk-rule`** in
|
|
112
|
+
[`../../workflows/ci.yml`](../../workflows/ci.yml). The job
|
|
113
|
+
runs `pnpm install --frozen-lockfile` and then `pnpm lint`; any
|
|
114
|
+
deep cross-module import makes it fail with exit 1. The
|
|
115
|
+
corresponding branch-protection entry (status check name) is:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
🌳 MME: @mk/no-cross-module-import (R-MK-001, ESLint)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Escape hatch
|
|
124
|
+
|
|
125
|
+
If a deep import is truly needed (rare — usually a sign of a
|
|
126
|
+
missing public export), suppress on a per-line basis with a
|
|
127
|
+
justified comment:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
// eslint-disable-next-line @mk/no-cross-module-import
|
|
131
|
+
import { AdminForm } from '@/modules/admin/components/AdminForm';
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
> **Default in this monorepo**: every existing cross-module
|
|
135
|
+
> import is a code smell. Fix the public surface of the source
|
|
136
|
+
> module first, then re-export from its `index.ts`.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Test the rule
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
pnpm --filter @makroz/web test
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Tests live in
|
|
147
|
+
[`__tests__/no-cross-module-import.test.js`](./__tests__/no-cross-module-import.test.js)
|
|
148
|
+
and use `vitest` + `eslint`'s `RuleTester`.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Layout
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
packages/mk-web/eslint-plugin-mk/
|
|
156
|
+
├── index.js # plugin entry (default export)
|
|
157
|
+
├── README.md # this file
|
|
158
|
+
├── rules/
|
|
159
|
+
│ └── no-cross-module-import.js # the rule
|
|
160
|
+
└── __tests__/
|
|
161
|
+
└── no-cross-module-import.test.js # 8 vitest cases
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The mobile re-export lives at
|
|
165
|
+
`packages/mk-mobile/eslint-plugin-mk/index.js` and is a thin
|
|
166
|
+
shim that re-exports the web plugin's rules under the
|
|
167
|
+
`@mk/eslint-plugin-mk (mobile)` metadata.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makroz/web",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "React UI components and hooks for MK-Director web applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -32,11 +32,16 @@
|
|
|
32
32
|
"@makroz/core": "1.0.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
+
"next": "^16.0.0",
|
|
35
36
|
"react": "19.2.3",
|
|
36
|
-
"react-dom": "19.2.3"
|
|
37
|
-
"next": "^16.0.0"
|
|
37
|
+
"react-dom": "19.2.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
+
"@storybook/addon-essentials": "^8.6.14",
|
|
41
|
+
"@storybook/nextjs": "^8.6.18",
|
|
42
|
+
"@storybook/react": "^8.6.18",
|
|
43
|
+
"@storybook/react-vite": "^8.6.18",
|
|
44
|
+
"@storybook/test-runner": "^0.21.3",
|
|
40
45
|
"@testing-library/jest-dom": "^6.9.1",
|
|
41
46
|
"@testing-library/react": "^16.0.0",
|
|
42
47
|
"@types/react": "19.2.3",
|
|
@@ -46,17 +51,24 @@
|
|
|
46
51
|
"jsdom": "^24.0.0",
|
|
47
52
|
"react": "^19.0.0",
|
|
48
53
|
"react-dom": "^19.0.0",
|
|
54
|
+
"storybook": "^8.6.18",
|
|
49
55
|
"typescript": "^5.7.0",
|
|
56
|
+
"vite": "^5.4.21",
|
|
50
57
|
"vitest": "^3.0.0"
|
|
51
58
|
},
|
|
52
59
|
"scripts": {
|
|
53
60
|
"build": "tsc && rm -f dist/**/*.test.* && cp -r src/components/*.css dist/components/ && cp -r src/styles dist/",
|
|
54
61
|
"lint": "eslint src/",
|
|
55
62
|
"lint:fix": "eslint src/ --fix",
|
|
63
|
+
"lint:stories": "node scripts/lint-stories.mjs",
|
|
64
|
+
"lint:stories:json": "node scripts/lint-stories.mjs --json",
|
|
56
65
|
"test": "vitest run",
|
|
57
66
|
"test:watch": "vitest",
|
|
58
67
|
"test:coverage": "vitest run --coverage",
|
|
59
68
|
"type-check": "tsc --noEmit",
|
|
60
|
-
"clean": "rm -rf dist"
|
|
69
|
+
"clean": "rm -rf dist",
|
|
70
|
+
"storybook": "storybook dev -p 6006",
|
|
71
|
+
"build-storybook": "storybook build",
|
|
72
|
+
"test:storybook": "test-storybook --url http://localhost:6006"
|
|
61
73
|
}
|
|
62
74
|
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { AdminDto } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Shape of the value exposed by `<MkAuthProvider>`.
|
|
4
|
-
*
|
|
5
|
-
* The provider is intentionally minimal: it only knows about the
|
|
6
|
-
* current scope, the cached `user`, and the auth lifecycle (`login`,
|
|
7
|
-
* `logout`, `refresh`, `hasAbility`). Token persistence is internal —
|
|
8
|
-
* callers never see the raw tokens, only the boolean/typed results.
|
|
9
|
-
*/
|
|
10
|
-
export interface MkAuthContextValue {
|
|
11
|
-
/** The currently authenticated admin, or `null` if signed out. */
|
|
12
|
-
user: AdminDto | null;
|
|
13
|
-
/** True once the provider has completed its initial bootstrap (me/refresh). */
|
|
14
|
-
isLoading: boolean;
|
|
15
|
-
/** True iff `user !== null`. */
|
|
16
|
-
isAuthenticated: boolean;
|
|
17
|
-
/** Last error from login/refresh, cleared on the next successful call. */
|
|
18
|
-
error: Error | null;
|
|
19
|
-
/**
|
|
20
|
-
* Exchange email + password for tokens, persist them, and set `user`.
|
|
21
|
-
* On failure throws — the form catches and renders the error inline.
|
|
22
|
-
*/
|
|
23
|
-
login: (email: string, password: string) => Promise<AdminDto>;
|
|
24
|
-
/**
|
|
25
|
-
* Hit the logout endpoint, clear the local cache, drop `user`.
|
|
26
|
-
* Best-effort: even if the network call fails, the local state is cleared.
|
|
27
|
-
*/
|
|
28
|
-
logout: () => Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Manually trigger a token refresh and re-fetch the current user.
|
|
31
|
-
* Mostly used internally on mount, but exposed so consumers can
|
|
32
|
-
* force-refresh after a permission change, for example.
|
|
33
|
-
*/
|
|
34
|
-
refresh: () => Promise<AdminDto | null>;
|
|
35
|
-
/**
|
|
36
|
-
* True iff the current user's `abilities` array contains `ability`
|
|
37
|
-
* (exact match). The backend may return wildcard scopes in the
|
|
38
|
-
* future; for now it's a plain array of strings.
|
|
39
|
-
*/
|
|
40
|
-
hasAbility: (ability: string) => boolean;
|
|
41
|
-
}
|
|
42
|
-
export declare const MkAuthContext: import("react").Context<MkAuthContextValue | undefined>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export interface MkAuthFormProps {
|
|
2
|
-
/** Auth scope to use, e.g. "admin", "member", "guard". */
|
|
3
|
-
scope: string;
|
|
4
|
-
/**
|
|
5
|
-
* Path to navigate to after a successful login. Defaults to
|
|
6
|
-
* `/{scope}/dashboard`. Use a fully qualified path or a relative one
|
|
7
|
-
* — this component only triggers a callback.
|
|
8
|
-
*/
|
|
9
|
-
redirectAfterLogin?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Show a "¿Olvidaste tu contraseña?" link below the submit button.
|
|
12
|
-
* Defaults to `true`.
|
|
13
|
-
*/
|
|
14
|
-
showForgotPassword?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Optional: invoked after a successful login. Receives the resolved
|
|
17
|
-
* `AdminDto` and the `redirectAfterLogin` value so the host can do
|
|
18
|
-
* `router.push(...)` with its own router. When omitted, the
|
|
19
|
-
* component only logs the success.
|
|
20
|
-
*/
|
|
21
|
-
onLoginSuccess?: (admin: {
|
|
22
|
-
id: string;
|
|
23
|
-
email: string;
|
|
24
|
-
}, redirectTo: string) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Optional: invoked when the user clicks the forgot-password link.
|
|
27
|
-
* When omitted, the link is rendered as a plain `<a href="/{scope}/forgot">`
|
|
28
|
-
* — sufficient for any routing setup.
|
|
29
|
-
*/
|
|
30
|
-
onForgotPassword?: () => void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Minimal, dependency-free login form. Renders email + password fields,
|
|
34
|
-
* a submit button, an inline error region, and an optional
|
|
35
|
-
* "¿Olvidaste tu contraseña?" link.
|
|
36
|
-
*
|
|
37
|
-
* Validation is intentionally simple (non-empty + email shape) — the
|
|
38
|
-
* server is the source of truth, and this keeps the component focused
|
|
39
|
-
* on the auth lifecycle.
|
|
40
|
-
*/
|
|
41
|
-
export declare function MkAuthForm({ scope, redirectAfterLogin, showForgotPassword, onLoginSuccess, onForgotPassword, }: MkAuthFormProps): React.JSX.Element;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { AuthStorageAdapter } from './types';
|
|
3
|
-
export interface MkAuthProviderProps {
|
|
4
|
-
/** Logical scope of this provider, e.g. "admin", "member", "guard". */
|
|
5
|
-
scope: string;
|
|
6
|
-
/**
|
|
7
|
-
* Base URL of the API. The provider appends `/api/${scope}/auth/...`
|
|
8
|
-
* to it. Trailing slashes are tolerated.
|
|
9
|
-
*/
|
|
10
|
-
apiBaseUrl: string;
|
|
11
|
-
/** Children wrapped by the provider. */
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Optional storage adapter. Defaults to `window.localStorage` when
|
|
15
|
-
* available. Tests pass an in-memory adapter.
|
|
16
|
-
*/
|
|
17
|
-
storage?: AuthStorageAdapter;
|
|
18
|
-
/**
|
|
19
|
-
* Optional: inject a custom `fetch` implementation (e.g. for tests
|
|
20
|
-
* that polyfill `global.fetch` differently). Defaults to `globalThis.fetch`.
|
|
21
|
-
*/
|
|
22
|
-
fetcher?: typeof fetch;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* `<QueryClientProvider>` + `<MkAuthProviderInner>`. The outer wrapper
|
|
26
|
-
* exists so consumers don't have to remember to also mount a
|
|
27
|
-
* `QueryClient` — the auth provider is self-contained.
|
|
28
|
-
*/
|
|
29
|
-
export declare function MkAuthProvider(props: MkAuthProviderProps): React.JSX.Element;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auth types for @mk/web.
|
|
3
|
-
*
|
|
4
|
-
* Mirrors the JSON contract produced by the Laravel backend's
|
|
5
|
-
* `AuthTokenResource` and `AdminResource` (see
|
|
6
|
-
* `apps/sandbox-laravel/app/Modules/Admin/Http/Resources/*`):
|
|
7
|
-
*
|
|
8
|
-
* - `AdminDto` — shape returned by `/api/{scope}/auth/me` and embedded in
|
|
9
|
-
* login/refresh responses under `admin`.
|
|
10
|
-
* - `AuthTokens` — the `access_token` / `refresh_token` bundle issued on
|
|
11
|
-
* successful login and refresh.
|
|
12
|
-
* - `LoginInput` — payload POSTed to `/api/{scope}/auth/login`.
|
|
13
|
-
* - `RefreshResponse` — shape returned by `/api/{scope}/auth/refresh`.
|
|
14
|
-
*
|
|
15
|
-
* These types are intentionally local to the auth module (not exported as
|
|
16
|
-
* a generic MK contract) so that future scopes (e.g. `member`, `guard`)
|
|
17
|
-
* can reuse the same provider with their own DTOs.
|
|
18
|
-
*/
|
|
19
|
-
export interface AdminDto {
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
email: string;
|
|
23
|
-
auth_scope: string;
|
|
24
|
-
email_verified_at: string | null;
|
|
25
|
-
abilities: string[];
|
|
26
|
-
roles: string[];
|
|
27
|
-
}
|
|
28
|
-
export interface AuthTokens {
|
|
29
|
-
access_token: string;
|
|
30
|
-
refresh_token: string;
|
|
31
|
-
token_type: 'Bearer';
|
|
32
|
-
expires_in: number;
|
|
33
|
-
}
|
|
34
|
-
export interface LoginInput {
|
|
35
|
-
email: string;
|
|
36
|
-
password: string;
|
|
37
|
-
}
|
|
38
|
-
export interface RefreshResponse extends AuthTokens {
|
|
39
|
-
admin: AdminDto;
|
|
40
|
-
}
|
|
41
|
-
export interface AuthStorageAdapter {
|
|
42
|
-
getItem: (key: string) => string | null;
|
|
43
|
-
setItem: (key: string, value: string) => void;
|
|
44
|
-
removeItem: (key: string) => void;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* JSON shape returned by a login attempt. Login responses nest the user
|
|
48
|
-
* under `admin` (matches the backend's `AuthTokenResource`).
|
|
49
|
-
*/
|
|
50
|
-
export interface LoginResponse {
|
|
51
|
-
access_token: string;
|
|
52
|
-
refresh_token: string;
|
|
53
|
-
token_type: 'Bearer';
|
|
54
|
-
expires_in: number;
|
|
55
|
-
admin: AdminDto;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* JSON shape returned by the `/me` endpoint.
|
|
59
|
-
*/
|
|
60
|
-
export interface MeResponse {
|
|
61
|
-
data: AdminDto;
|
|
62
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { MkAuthContextValue } from './MkAuthContext';
|
|
2
|
-
/**
|
|
3
|
-
* Hook to consume the value exposed by `<MkAuthProvider>`.
|
|
4
|
-
*
|
|
5
|
-
* Throws if used outside of a provider — this is intentional. We don't
|
|
6
|
-
* want auth code to silently no-op when the provider is missing, which
|
|
7
|
-
* is a real source of bugs (e.g. a deeply nested page that forgets to
|
|
8
|
-
* mount the auth context).
|
|
9
|
-
*
|
|
10
|
-
* The error message is deliberately short and includes the provider name
|
|
11
|
-
* so the dev can grep for it.
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* const { user, isAuthenticated, hasAbility, login, logout } = useMkAuth();
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function useMkAuth(): MkAuthContextValue;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { MkTheme } from '@mk/core';
|
|
3
|
-
interface MkButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
variant?: 'primary' | 'outline' | 'ghost' | 'error';
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
/** @deprecated Theme is now controlled via CSS variables */
|
|
7
|
-
_theme?: MkTheme;
|
|
8
|
-
}
|
|
9
|
-
export declare const MkButton: React.FC<MkButtonProps>;
|
|
10
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface MkInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
3
|
-
label?: string;
|
|
4
|
-
error?: string;
|
|
5
|
-
success?: boolean;
|
|
6
|
-
helperText?: string;
|
|
7
|
-
iconLeft?: React.ReactNode;
|
|
8
|
-
iconRight?: React.ReactNode;
|
|
9
|
-
onChange?: (value: string) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const MkInput: React.FC<MkInputProps>;
|
|
12
|
-
export {};
|