react-jupiter 5.12.0 → 6.0.0-beta.2
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/.babelrc +12 -0
- package/.env +3 -0
- package/.eslintignore +2 -0
- package/.eslintrc +18 -0
- package/.eslintrc.js +47 -0
- package/.eslintrc.json +16 -0
- package/.flowconfig +0 -0
- package/.storybook/main.js +27 -0
- package/.storybook/preview-head.html +1 -0
- package/.storybook/preview.js +30 -0
- package/.storybook/style.css +9 -0
- package/.vscode/settings.json +4 -0
- package/__mocks__/fileMock.js +1 -0
- package/config-overrides.js +34 -0
- package/dist/App.js +13 -0
- package/dist/components/accordion/index.js +25 -0
- package/dist/components/accordion/index.stories.js +82 -0
- package/dist/components/accordion/index.styles.js +52 -0
- package/dist/components/accordion/panel.js +41 -0
- package/dist/components/avatar/index.js +41 -0
- package/dist/components/avatar/index.stories.js +59 -0
- package/dist/components/avatar/index.styles.js +17 -0
- package/dist/components/avatar/index.test.js +10 -0
- package/dist/components/avatar/theme.js +13 -0
- package/dist/components/button/__snapshots__/index.test.js.snap +489 -0
- package/dist/components/button/index.js +209 -0
- package/dist/components/button/index.stories.js +304 -0
- package/dist/components/button/index.styles.js +104 -0
- package/dist/components/button/theme.js +58 -0
- package/dist/components/button/utils.js +12 -0
- package/dist/components/card/card-template/index.js +74 -0
- package/dist/components/card/card-template/index.stories.js +110 -0
- package/dist/components/card/card-template/index.style.js +25 -0
- package/dist/components/card/card-template/index.test.js +85 -0
- package/dist/components/card/event-card/constants.js +3 -0
- package/dist/components/card/event-card/event-card-label/index.js +24 -0
- package/dist/components/card/event-card/event-card-label/index.style.js +10 -0
- package/dist/components/card/event-card/event-card-label/index.test.js +23 -0
- package/dist/components/card/event-card/index.js +227 -0
- package/dist/components/card/event-card/index.stories.js +166 -0
- package/dist/components/card/event-card/index.style.js +129 -0
- package/dist/components/card/event-card/index.test.js +79 -0
- package/dist/components/card/index.js +16 -0
- package/dist/components/card/organization-card/index.js +59 -0
- package/dist/components/card/organization-card/index.stories.js +49 -0
- package/dist/components/card/organization-card/index.style.js +10 -0
- package/dist/components/card/organization-card/index.test.js +25 -0
- package/dist/components/card/orgnizer-card/buttons.js +48 -0
- package/dist/components/card/orgnizer-card/index.js +179 -0
- package/dist/components/card/orgnizer-card/index.stories.js +81 -0
- package/dist/components/card/orgnizer-card/index.style.js +58 -0
- package/dist/components/cover/index.js +74 -0
- package/dist/components/cover/index.style.js +48 -0
- package/dist/components/cover/index.test.js +25 -0
- package/dist/components/display/index.js +42 -0
- package/dist/components/display/index.style.js +79 -0
- package/dist/components/file-item/fileImgIcon.js +37 -0
- package/dist/components/file-item/fileImgsFont.js +800 -0
- package/dist/components/file-item/index.js +101 -0
- package/dist/components/file-item/index.stories.js +71 -0
- package/dist/components/file-item/index.style.js +31 -0
- package/dist/components/file-item/index.test.js +106 -0
- package/dist/components/file-item/theme.js +12 -0
- package/dist/components/file-item/utils.js +3 -0
- package/dist/components/form/captcha/index.js +86 -0
- package/dist/components/form/captcha/index.stories.js +42 -0
- package/dist/components/form/captcha/index.style.js +38 -0
- package/dist/components/form/captcha/index.test.js +31 -0
- package/dist/components/form/checkbox/checkbox-option.js +41 -0
- package/dist/components/form/checkbox/checkbox.js +54 -0
- package/dist/components/form/checkbox/index.js +10 -0
- package/dist/components/form/checkbox/index.stories.js +121 -0
- package/dist/components/form/checkbox/index.style.js +62 -0
- package/dist/components/form/dropdown/index.js +10 -0
- package/dist/components/form/dropdown/index.stories.js +119 -0
- package/dist/components/form/dropdown/index.style.js +57 -0
- package/dist/components/form/dropdown/index.test.js +20 -0
- package/dist/components/form/dropdown/option.js +22 -0
- package/dist/components/form/dropdown/select.js +68 -0
- package/dist/components/form/errorMsg.js +21 -0
- package/dist/components/form/index.js +22 -0
- package/dist/components/form/radio/index.js +10 -0
- package/dist/components/form/radio/index.stories.js +119 -0
- package/dist/components/form/radio/index.style.js +61 -0
- package/dist/components/form/radio/radio-option.js +45 -0
- package/dist/components/form/radio/radio.js +56 -0
- package/dist/components/form/text-input/index.js +92 -0
- package/dist/components/form/text-input/index.stories.js +77 -0
- package/dist/components/form/text-input/index.style.js +57 -0
- package/dist/components/form/text-input/index.test.js +63 -0
- package/dist/components/form/textarea/index.js +59 -0
- package/dist/components/form/textarea/index.stories.js +90 -0
- package/dist/components/form/textarea/index.style.js +25 -0
- package/dist/components/form/theme.js +16 -0
- package/dist/components/form-v7/captcha/index.js +101 -0
- package/dist/components/form-v7/captcha/index.stories.js +60 -0
- package/dist/components/form-v7/captcha/index.style.js +38 -0
- package/dist/components/form-v7/captcha/index.test.js +31 -0
- package/dist/components/form-v7/checkbox/checkbox-option.js +44 -0
- package/dist/components/form-v7/checkbox/checkbox.js +70 -0
- package/dist/components/form-v7/checkbox/index.js +10 -0
- package/dist/components/form-v7/checkbox/index.stories.js +113 -0
- package/dist/components/form-v7/checkbox/index.style.js +62 -0
- package/dist/components/form-v7/dropdown/index.js +10 -0
- package/dist/components/form-v7/dropdown/index.stories.js +130 -0
- package/dist/components/form-v7/dropdown/index.style.js +57 -0
- package/dist/components/form-v7/dropdown/index.test.js +20 -0
- package/dist/components/form-v7/dropdown/option.js +18 -0
- package/dist/components/form-v7/dropdown/select.js +85 -0
- package/dist/components/form-v7/errorMsg.js +21 -0
- package/dist/components/form-v7/file-input/index.js +73 -0
- package/dist/components/form-v7/file-input/index.stories.js +73 -0
- package/dist/components/form-v7/file-input/index.style.js +62 -0
- package/dist/components/form-v7/file-input/index.test.js +63 -0
- package/dist/components/form-v7/form/index.stories.js +276 -0
- package/dist/components/form-v7/index.js +25 -0
- package/dist/components/form-v7/index.style.js +11 -0
- package/dist/components/form-v7/label/index.js +31 -0
- package/dist/components/form-v7/label/index.style.js +12 -0
- package/dist/components/form-v7/radio/index.js +10 -0
- package/dist/components/form-v7/radio/index.stories.js +117 -0
- package/dist/components/form-v7/radio/index.style.js +61 -0
- package/dist/components/form-v7/radio/radio-option.js +45 -0
- package/dist/components/form-v7/radio/radio.js +75 -0
- package/dist/components/form-v7/text-input/index.js +132 -0
- package/dist/components/form-v7/text-input/index.stories.js +96 -0
- package/dist/components/form-v7/text-input/index.style.js +49 -0
- package/dist/components/form-v7/text-input/index.test.js +63 -0
- package/dist/components/form-v7/textarea/index.js +71 -0
- package/dist/components/form-v7/textarea/index.stories.js +91 -0
- package/dist/components/form-v7/textarea/index.style.js +25 -0
- package/dist/components/form-v7/theme.js +20 -0
- package/dist/components/globalStyle.js +28 -0
- package/dist/components/grid/index.js +83 -0
- package/dist/components/icon/iconFont.js +806 -0
- package/dist/components/icon/index.js +116 -0
- package/dist/components/icon/index.stories.js +45 -0
- package/dist/components/icon/index.styles.js +12 -0
- package/dist/components/icon/index.test.js +66 -0
- package/dist/components/icon/theme.js +23 -0
- package/dist/components/index.js +75 -0
- package/dist/components/modal/index.js +100 -0
- package/dist/components/modal/index.stories.js +86 -0
- package/dist/components/modal/index.style.js +40 -0
- package/dist/components/modal/theme.js +11 -0
- package/dist/components/numeric-summery-report/index.js +28 -0
- package/dist/components/numeric-summery-report/index.stories.js +37 -0
- package/dist/components/numeric-summery-report/index.style.js +16 -0
- package/dist/components/numeric-summery-report/index.test.js +22 -0
- package/dist/components/product-menu/index.js +10 -0
- package/dist/components/product-menu/index.stories.js +33 -0
- package/dist/components/product-menu/index.style.js +38 -0
- package/dist/components/product-menu/index.test.js +27 -0
- package/dist/components/product-menu/menu-item.js +23 -0
- package/dist/components/product-menu/menu.js +88 -0
- package/dist/components/product-menu/theme.js +16 -0
- package/dist/components/product-owner/index.js +85 -0
- package/dist/components/product-owner/index.style.js +16 -0
- package/dist/components/product-owner/index.test.js +75 -0
- package/dist/components/product-properties/index.js +65 -0
- package/dist/components/product-properties/index.stories.js +52 -0
- package/dist/components/product-properties/index.style.js +14 -0
- package/dist/components/product-properties/index.test.js +31 -0
- package/dist/components/product-properties/product-property/index.js +49 -0
- package/dist/components/product-properties/product-property/index.style.js +9 -0
- package/dist/components/progress-bar/index.js +46 -0
- package/dist/components/progress-bar/index.stories.js +33 -0
- package/dist/components/progress-bar/index.styles.js +65 -0
- package/dist/components/responsive/index.js +44 -0
- package/dist/components/show-date/index.js +25 -0
- package/dist/components/show-date/index.stories.js +51 -0
- package/dist/components/show-date/index.test.js +24 -0
- package/dist/components/spacing/core.js +106 -0
- package/dist/components/spacing/index.js +10 -0
- package/dist/components/spacing/margin/index.js +26 -0
- package/dist/components/spacing/padding/index.js +26 -0
- package/dist/components/storybook.css +54 -0
- package/dist/components/table/actionCell.js +57 -0
- package/dist/components/table/index.js +56 -0
- package/dist/components/table/index.stories.js +188 -0
- package/dist/components/table/index.style.js +107 -0
- package/dist/components/table/index.test.js +119 -0
- package/dist/components/table/tableHeaderRow.js +28 -0
- package/dist/components/table/tableRow.js +60 -0
- package/dist/components/table/theme.js +8 -0
- package/dist/components/tabs/index.js +10 -0
- package/dist/components/tabs/index.stories.js +61 -0
- package/dist/components/tabs/index.style.js +35 -0
- package/dist/components/tabs/index.test.js +30 -0
- package/dist/components/tabs/tabPanel.js +17 -0
- package/dist/components/tabs/tabs.js +71 -0
- package/dist/components/tabs/theme.js +10 -0
- package/dist/components/themes.js +97 -0
- package/dist/components/titled-avatar/index.js +48 -0
- package/dist/components/titled-avatar/index.stories.js +52 -0
- package/dist/components/titled-avatar/index.style.js +30 -0
- package/dist/components/titled-avatar/index.test.js +25 -0
- package/dist/components/typography/heading/index.js +59 -0
- package/dist/components/typography/heading/index.stories.js +94 -0
- package/dist/components/typography/heading/index.styles.js +69 -0
- package/dist/components/typography/heading/index.test.js +122 -0
- package/dist/components/typography/index.js +16 -0
- package/dist/components/typography/link/index.js +82 -0
- package/dist/components/typography/link/index.stories.js +70 -0
- package/dist/components/typography/link/index.styles.js +8 -0
- package/dist/components/typography/link/index.test.js +60 -0
- package/dist/components/typography/paragraph/index.js +37 -0
- package/dist/components/typography/paragraph/index.stories.js +56 -0
- package/dist/components/typography/paragraph/index.styles.js +12 -0
- package/dist/components/typography/paragraph/index.test.js +47 -0
- package/dist/components/typography/text/index.js +156 -0
- package/dist/components/typography/text/index.stories.js +196 -0
- package/dist/components/typography/text/index.styles.js +73 -0
- package/dist/components/typography/text/index.test.js +333 -0
- package/dist/components/typography/theme.js +66 -0
- package/dist/components/typography/utils.js +53 -0
- package/dist/components/typography/utils.test.js +188 -0
- package/dist/components/utils/date.js +7 -0
- package/dist/components/utils/date.test.js +15 -0
- package/dist/components/utils/detectMobile.js +15 -0
- package/dist/components/utils/index.js +7 -0
- package/dist/components/utils/media-query.js +12 -0
- package/dist/components/utils/numbers.js +25 -0
- package/dist/components/utils/test.js +6 -0
- package/dist/components/utils/theme.js +67 -0
- package/dist/docs/App.css +33 -0
- package/dist/docs/App.js +52 -0
- package/dist/docs/assets/ads-label.svg +13 -0
- package/dist/docs/assets/avatar-sample.jpeg +0 -0
- package/dist/docs/assets/cover-sample.png +0 -0
- package/dist/docs/assets/fonts/filesImgs.woff +0 -0
- package/dist/docs/assets/fonts/icomoon.woff +0 -0
- package/dist/docs/assets/fonts/iransharp_bold_web.woff +0 -0
- package/dist/docs/assets/fonts/iransharp_bold_web.woff2 +0 -0
- package/dist/docs/assets/fonts/iransharp_regular_web.woff +0 -0
- package/dist/docs/assets/fonts/iransharp_regular_web.woff2 +0 -0
- package/dist/docs/assets/fonts/wer6t7890- +0 -0
- package/dist/docs/assets/logo.svg +7 -0
- package/dist/docs/components/header/index.js +10 -0
- package/dist/docs/components/header/index.styles.js +10 -0
- package/dist/docs/components/side-navigation/index.js +167 -0
- package/dist/docs/components/side-navigation/index.styles.js +46 -0
- package/dist/docs/containers/avatar/index.js +92 -0
- package/dist/docs/containers/button/index.js +295 -0
- package/dist/docs/containers/card/index.js +153 -0
- package/dist/docs/containers/cover/index.js +77 -0
- package/dist/docs/containers/form/index.js +41 -0
- package/dist/docs/containers/home/index.js +41 -0
- package/dist/docs/containers/icon/index.js +56 -0
- package/dist/docs/containers/icons/index.js +1488 -0
- package/dist/docs/containers/product/index.js +123 -0
- package/dist/docs/containers/typography/index.js +138 -0
- package/dist/docs/globalStyle.js +58 -0
- package/dist/index.css +3 -0
- package/dist/index.js +18 -0
- package/dist/playground/index.js +144 -0
- package/dist/playground.css +26 -0
- package/dist/serviceWorker.js +135 -0
- package/dist/setupTests.js +24 -0
- package/dist/stories/Page.js +67 -0
- package/dist/storybook.css +58 -0
- package/dist/styles.css +3 -0
- package/dist/test-utils.js +21 -0
- package/doctor-storybook.log +25 -0
- package/migration-storybook.log +329 -0
- package/package.json +132 -12
- package/package.lib.json +75 -0
- package/postcss.config.js +6 -0
- package/public/assets/fonts/iransharp_bold_web.woff2 +0 -0
- package/public/assets/fonts/iransharp_light_web.woff2 +0 -0
- package/public/assets/fonts/iransharp_regular_web.woff2 +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo.svg +1 -0
- package/public/logo142.svg +1 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +2 -0
- package/src/App.js +13 -0
- package/src/components/accordion/index.js +25 -0
- package/src/components/accordion/index.stories.js +82 -0
- package/src/components/accordion/index.styles.js +52 -0
- package/src/components/accordion/panel.js +41 -0
- package/src/components/avatar/index.js +41 -0
- package/src/components/avatar/index.stories.js +59 -0
- package/src/components/avatar/index.styles.js +17 -0
- package/src/components/avatar/index.test.js +10 -0
- package/src/components/avatar/theme.js +13 -0
- package/src/components/button/__snapshots__/index.test.js.snap +489 -0
- package/src/components/button/index.js +209 -0
- package/src/components/button/index.stories.js +304 -0
- package/src/components/button/index.styles.js +104 -0
- package/src/components/button/theme.js +60 -0
- package/src/components/button/utils.js +12 -0
- package/src/components/card/card-template/index.js +74 -0
- package/src/components/card/card-template/index.stories.js +110 -0
- package/src/components/card/card-template/index.style.js +25 -0
- package/src/components/card/card-template/index.test.js +85 -0
- package/src/components/card/event-card/constants.js +3 -0
- package/src/components/card/event-card/event-card-label/index.js +24 -0
- package/src/components/card/event-card/event-card-label/index.style.js +10 -0
- package/src/components/card/event-card/event-card-label/index.test.js +23 -0
- package/src/components/card/event-card/index.js +227 -0
- package/src/components/card/event-card/index.stories.js +166 -0
- package/src/components/card/event-card/index.style.js +129 -0
- package/src/components/card/event-card/index.test.js +79 -0
- package/src/components/card/index.js +16 -0
- package/src/components/card/organization-card/index.js +59 -0
- package/src/components/card/organization-card/index.stories.js +49 -0
- package/src/components/card/organization-card/index.style.js +10 -0
- package/src/components/card/organization-card/index.test.js +25 -0
- package/src/components/card/orgnizer-card/buttons.js +48 -0
- package/src/components/card/orgnizer-card/index.js +179 -0
- package/src/components/card/orgnizer-card/index.stories.js +81 -0
- package/src/components/card/orgnizer-card/index.style.js +58 -0
- package/src/components/cover/index.js +74 -0
- package/src/components/cover/index.style.js +48 -0
- package/src/components/cover/index.test.js +25 -0
- package/src/components/display/index.js +42 -0
- package/src/components/display/index.style.js +80 -0
- package/src/components/file-item/fileImgIcon.js +37 -0
- package/src/components/file-item/fileImgsFont.js +800 -0
- package/src/components/file-item/index.js +101 -0
- package/src/components/file-item/index.stories.js +71 -0
- package/src/components/file-item/index.style.js +31 -0
- package/src/components/file-item/index.test.js +106 -0
- package/src/components/file-item/theme.js +12 -0
- package/src/components/file-item/utils.js +3 -0
- package/src/components/form/captcha/index.js +86 -0
- package/src/components/form/captcha/index.stories.js +42 -0
- package/src/components/form/captcha/index.style.js +38 -0
- package/src/components/form/captcha/index.test.js +31 -0
- package/src/components/form/checkbox/checkbox-option.js +41 -0
- package/src/components/form/checkbox/checkbox.js +54 -0
- package/src/components/form/checkbox/index.js +10 -0
- package/src/components/form/checkbox/index.stories.js +121 -0
- package/src/components/form/checkbox/index.style.js +62 -0
- package/src/components/form/dropdown/index.js +10 -0
- package/src/components/form/dropdown/index.stories.js +119 -0
- package/src/components/form/dropdown/index.style.js +57 -0
- package/src/components/form/dropdown/index.test.js +20 -0
- package/src/components/form/dropdown/option.js +22 -0
- package/src/components/form/dropdown/select.js +68 -0
- package/src/components/form/errorMsg.js +21 -0
- package/src/components/form/index.js +22 -0
- package/src/components/form/radio/index.js +10 -0
- package/src/components/form/radio/index.stories.js +119 -0
- package/src/components/form/radio/index.style.js +61 -0
- package/src/components/form/radio/radio-option.js +45 -0
- package/src/components/form/radio/radio.js +56 -0
- package/src/components/form/text-input/index.js +92 -0
- package/src/components/form/text-input/index.stories.js +77 -0
- package/src/components/form/text-input/index.style.js +57 -0
- package/src/components/form/text-input/index.test.js +63 -0
- package/src/components/form/textarea/index.js +59 -0
- package/src/components/form/textarea/index.stories.js +90 -0
- package/src/components/form/textarea/index.style.js +25 -0
- package/src/components/form/theme.js +16 -0
- package/src/components/form-v7/captcha/index.js +101 -0
- package/src/components/form-v7/captcha/index.stories.js +60 -0
- package/src/components/form-v7/captcha/index.style.js +38 -0
- package/src/components/form-v7/captcha/index.test.js +31 -0
- package/src/components/form-v7/checkbox/checkbox-option.js +44 -0
- package/src/components/form-v7/checkbox/checkbox.js +70 -0
- package/src/components/form-v7/checkbox/index.js +10 -0
- package/src/components/form-v7/checkbox/index.stories.js +113 -0
- package/src/components/form-v7/checkbox/index.style.js +62 -0
- package/src/components/form-v7/dropdown/index.js +10 -0
- package/src/components/form-v7/dropdown/index.stories.js +130 -0
- package/src/components/form-v7/dropdown/index.style.js +57 -0
- package/src/components/form-v7/dropdown/index.test.js +20 -0
- package/src/components/form-v7/dropdown/option.js +18 -0
- package/src/components/form-v7/dropdown/select.js +85 -0
- package/src/components/form-v7/errorMsg.js +21 -0
- package/src/components/form-v7/file-input/index.js +73 -0
- package/src/components/form-v7/file-input/index.stories.js +73 -0
- package/src/components/form-v7/file-input/index.style.js +62 -0
- package/src/components/form-v7/file-input/index.test.js +63 -0
- package/src/components/form-v7/form/index.stories.js +276 -0
- package/src/components/form-v7/index.js +25 -0
- package/src/components/form-v7/index.style.js +11 -0
- package/src/components/form-v7/label/index.js +31 -0
- package/src/components/form-v7/label/index.style.js +12 -0
- package/src/components/form-v7/radio/index.js +10 -0
- package/src/components/form-v7/radio/index.stories.js +117 -0
- package/src/components/form-v7/radio/index.style.js +61 -0
- package/src/components/form-v7/radio/radio-option.js +45 -0
- package/src/components/form-v7/radio/radio.js +75 -0
- package/src/components/form-v7/text-input/index.js +132 -0
- package/src/components/form-v7/text-input/index.stories.js +96 -0
- package/src/components/form-v7/text-input/index.style.js +49 -0
- package/src/components/form-v7/text-input/index.test.js +63 -0
- package/src/components/form-v7/textarea/index.js +71 -0
- package/src/components/form-v7/textarea/index.stories.js +91 -0
- package/src/components/form-v7/textarea/index.style.js +25 -0
- package/src/components/form-v7/theme.js +20 -0
- package/src/components/globalStyle.js +28 -0
- package/src/components/grid/index.js +83 -0
- package/src/components/icon/iconFont.js +806 -0
- package/src/components/icon/index.js +116 -0
- package/src/components/icon/index.stories.js +45 -0
- package/src/components/icon/index.styles.js +12 -0
- package/src/components/icon/index.test.js +66 -0
- package/src/components/icon/theme.js +23 -0
- package/src/components/index.js +75 -0
- package/src/components/modal/index.js +100 -0
- package/src/components/modal/index.stories.js +86 -0
- package/src/components/modal/index.style.js +40 -0
- package/src/components/modal/theme.js +11 -0
- package/src/components/numeric-summery-report/index.js +28 -0
- package/src/components/numeric-summery-report/index.stories.js +37 -0
- package/src/components/numeric-summery-report/index.style.js +16 -0
- package/src/components/numeric-summery-report/index.test.js +22 -0
- package/src/components/product-menu/index.js +10 -0
- package/src/components/product-menu/index.stories.js +33 -0
- package/src/components/product-menu/index.style.js +38 -0
- package/src/components/product-menu/index.test.js +27 -0
- package/src/components/product-menu/menu-item.js +23 -0
- package/src/components/product-menu/menu.js +88 -0
- package/src/components/product-menu/theme.js +16 -0
- package/src/components/product-owner/index.js +85 -0
- package/src/components/product-owner/index.style.js +16 -0
- package/src/components/product-owner/index.test.js +75 -0
- package/src/components/product-properties/index.js +65 -0
- package/src/components/product-properties/index.stories.js +52 -0
- package/src/components/product-properties/index.style.js +14 -0
- package/src/components/product-properties/index.test.js +31 -0
- package/src/components/product-properties/product-property/index.js +49 -0
- package/src/components/product-properties/product-property/index.style.js +9 -0
- package/src/components/progress-bar/index.js +46 -0
- package/src/components/progress-bar/index.stories.js +33 -0
- package/src/components/progress-bar/index.styles.js +65 -0
- package/src/components/responsive/index.js +44 -0
- package/src/components/show-date/index.js +25 -0
- package/src/components/show-date/index.stories.js +51 -0
- package/src/components/show-date/index.style.js +1 -0
- package/src/components/show-date/index.test.js +24 -0
- package/src/components/spacing/core.js +106 -0
- package/src/components/spacing/index.js +10 -0
- package/src/components/spacing/margin/index.js +26 -0
- package/src/components/spacing/padding/index.js +26 -0
- package/src/components/storybook.css +54 -0
- package/src/components/table/actionCell.js +57 -0
- package/src/components/table/index.js +56 -0
- package/src/components/table/index.stories.js +188 -0
- package/src/components/table/index.style.js +107 -0
- package/src/components/table/index.test.js +119 -0
- package/src/components/table/tableHeaderRow.js +28 -0
- package/src/components/table/tableRow.js +60 -0
- package/src/components/table/theme.js +8 -0
- package/src/components/tabs/index.js +10 -0
- package/src/components/tabs/index.stories.js +61 -0
- package/src/components/tabs/index.style.js +35 -0
- package/src/components/tabs/index.test.js +30 -0
- package/src/components/tabs/tabPanel.js +17 -0
- package/src/components/tabs/tabs.js +71 -0
- package/src/components/tabs/theme.js +10 -0
- package/src/components/themes.js +97 -0
- package/src/components/titled-avatar/index.js +48 -0
- package/src/components/titled-avatar/index.stories.js +52 -0
- package/src/components/titled-avatar/index.style.js +30 -0
- package/src/components/titled-avatar/index.test.js +25 -0
- package/src/components/typography/heading/index.js +59 -0
- package/src/components/typography/heading/index.stories.js +94 -0
- package/src/components/typography/heading/index.styles.js +69 -0
- package/src/components/typography/heading/index.test.js +122 -0
- package/src/components/typography/index.js +16 -0
- package/src/components/typography/index.styles.js +1 -0
- package/src/components/typography/link/index.js +82 -0
- package/src/components/typography/link/index.stories.js +70 -0
- package/src/components/typography/link/index.styles.js +8 -0
- package/src/components/typography/link/index.test.js +60 -0
- package/src/components/typography/paragraph/index.js +37 -0
- package/src/components/typography/paragraph/index.stories.js +56 -0
- package/src/components/typography/paragraph/index.styles.js +12 -0
- package/src/components/typography/paragraph/index.test.js +47 -0
- package/src/components/typography/text/index.js +156 -0
- package/src/components/typography/text/index.stories.js +196 -0
- package/src/components/typography/text/index.styles.js +73 -0
- package/src/components/typography/text/index.test.js +333 -0
- package/src/components/typography/theme.js +66 -0
- package/src/components/typography/utils.js +53 -0
- package/src/components/typography/utils.test.js +188 -0
- package/src/components/utils/date.js +7 -0
- package/src/components/utils/date.test.js +15 -0
- package/src/components/utils/detectMobile.js +15 -0
- package/src/components/utils/index.js +7 -0
- package/src/components/utils/media-query.js +12 -0
- package/src/components/utils/numbers.js +25 -0
- package/src/components/utils/test.js +6 -0
- package/src/components/utils/theme.js +67 -0
- package/src/docs/App.css +33 -0
- package/src/docs/App.js +52 -0
- package/src/docs/assets/ads-label.svg +13 -0
- package/src/docs/assets/avatar-sample.jpeg +0 -0
- package/src/docs/assets/cover-sample.png +0 -0
- package/src/docs/assets/fonts/filesImgs.woff +0 -0
- package/src/docs/assets/fonts/icomoon.woff +0 -0
- package/src/docs/assets/fonts/iransharp_bold_web.woff +0 -0
- package/src/docs/assets/fonts/iransharp_bold_web.woff2 +0 -0
- package/src/docs/assets/fonts/iransharp_regular_web.woff +0 -0
- package/src/docs/assets/fonts/iransharp_regular_web.woff2 +0 -0
- package/src/docs/assets/fonts/wer6t7890- +0 -0
- package/src/docs/assets/logo.svg +7 -0
- package/src/docs/components/header/index.js +10 -0
- package/src/docs/components/header/index.styles.js +10 -0
- package/src/docs/components/side-navigation/index.js +167 -0
- package/src/docs/components/side-navigation/index.styles.js +46 -0
- package/src/docs/containers/avatar/index.js +92 -0
- package/src/docs/containers/button/index.js +295 -0
- package/src/docs/containers/card/index.js +153 -0
- package/src/docs/containers/cover/index.js +77 -0
- package/src/docs/containers/form/index.js +41 -0
- package/src/docs/containers/home/index.js +41 -0
- package/src/docs/containers/icon/index.js +56 -0
- package/src/docs/containers/icons/index.js +1488 -0
- package/src/docs/containers/product/index.js +123 -0
- package/src/docs/containers/typography/index.js +138 -0
- package/src/docs/globalStyle.js +58 -0
- package/src/index.css +3 -0
- package/src/index.js +18 -0
- package/src/playground/index.js +144 -0
- package/src/playground.css +26 -0
- package/src/serviceWorker.js +135 -0
- package/src/setupTests.js +24 -0
- package/src/stories/Page.jsx +67 -0
- package/src/storybook.css +58 -0
- package/src/styles.css +3 -0
- package/src/test-utils.js +21 -0
- package/storybook.log +113 -0
- package/tailwind.config.js +26 -0
- package/update-stories.js +41 -0
- package/accordion/index.js +0 -25
- package/accordion/index.styles.js +0 -10
- package/accordion/panel.js +0 -41
- package/avatar/index.js +0 -41
- package/avatar/index.styles.js +0 -17
- package/avatar/theme.js +0 -13
- package/button/index.js +0 -116
- package/button/index.styles.js +0 -101
- package/button/theme.js +0 -34
- package/button/utils.js +0 -12
- package/card/card-template/index.js +0 -74
- package/card/card-template/index.stories.js +0 -70
- package/card/card-template/index.style.js +0 -25
- package/card/card-template/index.test.js +0 -85
- package/card/event-card/constants.js +0 -3
- package/card/event-card/event-card-label/index.js +0 -24
- package/card/event-card/event-card-label/index.style.js +0 -10
- package/card/event-card/event-card-label/index.test.js +0 -23
- package/card/event-card/index.js +0 -227
- package/card/event-card/index.stories.js +0 -155
- package/card/event-card/index.style.js +0 -119
- package/card/event-card/index.test.js +0 -79
- package/card/index.js +0 -16
- package/card/organization-card/index.js +0 -59
- package/card/organization-card/index.stories.js +0 -19
- package/card/organization-card/index.style.js +0 -10
- package/card/organization-card/index.test.js +0 -25
- package/card/orgnizer-card/buttons.js +0 -48
- package/card/orgnizer-card/index.js +0 -179
- package/card/orgnizer-card/index.stories.js +0 -25
- package/card/orgnizer-card/index.style.js +0 -47
- package/cover/index.js +0 -74
- package/cover/index.style.js +0 -41
- package/display/index.js +0 -42
- package/display/index.style.js +0 -78
- package/file-item/fileImgIcon.js +0 -37
- package/file-item/fileImgsFont.js +0 -800
- package/file-item/index.js +0 -101
- package/file-item/index.style.js +0 -30
- package/file-item/theme.js +0 -12
- package/file-item/utils.js +0 -3
- package/form/captcha/index.js +0 -86
- package/form/captcha/index.stories.js +0 -23
- package/form/captcha/index.style.js +0 -36
- package/form/captcha/index.test.js +0 -31
- package/form/checkbox/checkbox-option.js +0 -41
- package/form/checkbox/checkbox.js +0 -54
- package/form/checkbox/index.js +0 -10
- package/form/checkbox/index.stories.js +0 -56
- package/form/checkbox/index.style.js +0 -40
- package/form/dropdown/index.js +0 -10
- package/form/dropdown/index.stories.js +0 -62
- package/form/dropdown/index.style.js +0 -55
- package/form/dropdown/index.test.js +0 -20
- package/form/dropdown/option.js +0 -22
- package/form/dropdown/select.js +0 -68
- package/form/errorMsg.js +0 -21
- package/form/index.js +0 -22
- package/form/radio/index.js +0 -10
- package/form/radio/index.stories.js +0 -56
- package/form/radio/index.style.js +0 -52
- package/form/radio/radio-option.js +0 -45
- package/form/radio/radio.js +0 -56
- package/form/text-input/index.js +0 -92
- package/form/text-input/index.stories.js +0 -26
- package/form/text-input/index.style.js +0 -55
- package/form/text-input/index.test.js +0 -63
- package/form/textarea/index.js +0 -59
- package/form/textarea/index.stories.js +0 -31
- package/form/textarea/index.style.js +0 -25
- package/form/theme.js +0 -16
- package/form-v7/captcha/index.js +0 -101
- package/form-v7/captcha/index.stories.js +0 -30
- package/form-v7/captcha/index.style.js +0 -36
- package/form-v7/captcha/index.test.js +0 -31
- package/form-v7/checkbox/checkbox-option.js +0 -42
- package/form-v7/checkbox/checkbox.js +0 -68
- package/form-v7/checkbox/index.js +0 -10
- package/form-v7/checkbox/index.stories.js +0 -80
- package/form-v7/checkbox/index.style.js +0 -40
- package/form-v7/dropdown/index.js +0 -10
- package/form-v7/dropdown/index.stories.js +0 -121
- package/form-v7/dropdown/index.style.js +0 -55
- package/form-v7/dropdown/index.test.js +0 -20
- package/form-v7/dropdown/option.js +0 -18
- package/form-v7/dropdown/select.js +0 -84
- package/form-v7/errorMsg.js +0 -21
- package/form-v7/file-input/index.js +0 -73
- package/form-v7/file-input/index.stories.js +0 -32
- package/form-v7/file-input/index.style.js +0 -54
- package/form-v7/file-input/index.test.js +0 -63
- package/form-v7/form/index.stories.js +0 -173
- package/form-v7/index.js +0 -25
- package/form-v7/index.style.js +0 -3
- package/form-v7/label/index.js +0 -31
- package/form-v7/label/index.style.js +0 -12
- package/form-v7/radio/index.js +0 -10
- package/form-v7/radio/index.stories.js +0 -82
- package/form-v7/radio/index.style.js +0 -52
- package/form-v7/radio/radio-option.js +0 -43
- package/form-v7/radio/radio.js +0 -73
- package/form-v7/text-input/index.js +0 -131
- package/form-v7/text-input/index.stories.js +0 -77
- package/form-v7/text-input/index.style.js +0 -41
- package/form-v7/text-input/index.test.js +0 -63
- package/form-v7/textarea/index.js +0 -70
- package/form-v7/textarea/index.stories.js +0 -45
- package/form-v7/textarea/index.style.js +0 -25
- package/form-v7/theme.js +0 -20
- package/globalStyle.js +0 -28
- package/icon/iconFont.js +0 -796
- package/icon/index.js +0 -52
- package/icon/index.styles.js +0 -12
- package/icon/theme.js +0 -23
- package/icons/index.js +0 -29
- package/icons/index.style.js +0 -30
- package/icons/theme.js +0 -12
- package/icons/utils.js +0 -672
- package/index.js +0 -75
- package/modal/index.js +0 -100
- package/modal/index.style.js +0 -40
- package/modal/theme.js +0 -11
- package/numeric-summery-report/index.js +0 -28
- package/numeric-summery-report/index.style.js +0 -11
- package/product-menu/index.js +0 -10
- package/product-menu/index.style.js +0 -37
- package/product-menu/menu-item.js +0 -23
- package/product-menu/menu.js +0 -88
- package/product-menu/theme.js +0 -12
- package/product-owner/index.js +0 -85
- package/product-owner/index.style.js +0 -10
- package/product-properties/index.js +0 -65
- package/product-properties/index.style.js +0 -11
- package/product-properties/product-property/index.js +0 -49
- package/product-properties/product-property/index.style.js +0 -9
- package/progress-bar/index.js +0 -46
- package/progress-bar/index.styles.js +0 -63
- package/responsive/index.js +0 -44
- package/show-date/index.js +0 -25
- package/spacing/core.js +0 -70
- package/spacing/index.js +0 -10
- package/spacing/margin/index.js +0 -26
- package/spacing/padding/index.js +0 -26
- package/table/actionCell.js +0 -57
- package/table/index.js +0 -56
- package/table/index.style.js +0 -106
- package/table/tableHeaderRow.js +0 -28
- package/table/tableRow.js +0 -60
- package/table/theme.js +0 -8
- package/tabs/index.js +0 -10
- package/tabs/index.style.js +0 -32
- package/tabs/tabPanel.js +0 -17
- package/tabs/tabs.js +0 -71
- package/tabs/theme.js +0 -10
- package/themes.js +0 -97
- package/titled-avatar/index.js +0 -48
- package/titled-avatar/index.style.js +0 -25
- package/typography/heading/index.js +0 -59
- package/typography/heading/index.stories.js +0 -41
- package/typography/heading/index.styles.js +0 -67
- package/typography/heading/index.test.js +0 -122
- package/typography/index.js +0 -16
- package/typography/link/index.js +0 -82
- package/typography/link/index.stories.js +0 -12
- package/typography/link/index.styles.js +0 -8
- package/typography/link/index.test.js +0 -60
- package/typography/paragraph/index.js +0 -37
- package/typography/paragraph/index.stories.js +0 -27
- package/typography/paragraph/index.styles.js +0 -12
- package/typography/paragraph/index.test.js +0 -47
- package/typography/text/index.js +0 -156
- package/typography/text/index.stories.js +0 -26
- package/typography/text/index.styles.js +0 -72
- package/typography/text/index.test.js +0 -333
- package/typography/theme.js +0 -66
- package/typography/utils.js +0 -53
- package/utils/date.js +0 -7
- package/utils/detectMobile.js +0 -15
- package/utils/index.js +0 -7
- package/utils/media-query.js +0 -12
- package/utils/numbers.js +0 -25
- package/utils/test.js +0 -6
- package/utils/theme.js +0 -67
- /package/{show-date → dist/components/show-date}/index.style.js +0 -0
- /package/{typography → dist/components/typography}/index.styles.js +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Link } from 'react-router-dom';
|
|
4
|
+
import { Typography, ProductProperties, ProductOwner } from '../../../components';
|
|
5
|
+
|
|
6
|
+
const { Heading } = Typography;
|
|
7
|
+
|
|
8
|
+
const Container = styled.div`
|
|
9
|
+
margin: 8px;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
const ProductPage = () => (
|
|
13
|
+
<>
|
|
14
|
+
<Heading level={1}>
|
|
15
|
+
کامپوننت های product
|
|
16
|
+
</Heading>
|
|
17
|
+
<br />
|
|
18
|
+
|
|
19
|
+
<Heading level={2}>
|
|
20
|
+
product-properties
|
|
21
|
+
</Heading>
|
|
22
|
+
<br />
|
|
23
|
+
<Container>
|
|
24
|
+
<Heading level={3}>
|
|
25
|
+
single property
|
|
26
|
+
</Heading>
|
|
27
|
+
<ProductProperties list={[{ iconName: 'watch-later', text: 'watch text' }]} />
|
|
28
|
+
</Container>
|
|
29
|
+
<br />
|
|
30
|
+
|
|
31
|
+
<Container>
|
|
32
|
+
<Heading level={3}>
|
|
33
|
+
multiple property
|
|
34
|
+
</Heading>
|
|
35
|
+
<ProductProperties
|
|
36
|
+
list={[
|
|
37
|
+
{ iconName: 'watch-later', text: 'متن زیبا' },
|
|
38
|
+
{ iconName: 'alarm-off', text: 'متن دیگری' },
|
|
39
|
+
{ iconName: 'aspect-ratio', text: 'و باز هم متن دیگری' },
|
|
40
|
+
]}
|
|
41
|
+
/>
|
|
42
|
+
</Container>
|
|
43
|
+
<br />
|
|
44
|
+
|
|
45
|
+
<Container>
|
|
46
|
+
<Heading level={3}>
|
|
47
|
+
colorfull property
|
|
48
|
+
</Heading>
|
|
49
|
+
<ProductProperties
|
|
50
|
+
list={[
|
|
51
|
+
{ iconName: 'watch-later', text: 'متن زیبا' },
|
|
52
|
+
{ iconName: 'alarm-off', text: 'متن دیگری' },
|
|
53
|
+
{ iconName: 'aspect-ratio', text: 'و باز هم متن دیگری' },
|
|
54
|
+
]}
|
|
55
|
+
color="default"
|
|
56
|
+
/>
|
|
57
|
+
<hr />
|
|
58
|
+
<ProductProperties
|
|
59
|
+
list={[
|
|
60
|
+
{ iconName: 'watch-later', text: 'متن زیبا' },
|
|
61
|
+
{ iconName: 'alarm-off', text: 'متن دیگری' },
|
|
62
|
+
{ iconName: 'aspect-ratio', text: 'و باز هم متن دیگری' },
|
|
63
|
+
]}
|
|
64
|
+
color="darkBlue"
|
|
65
|
+
/>
|
|
66
|
+
</Container>
|
|
67
|
+
<br />
|
|
68
|
+
|
|
69
|
+
<Container>
|
|
70
|
+
<Heading level={3}>
|
|
71
|
+
horizontal property
|
|
72
|
+
</Heading>
|
|
73
|
+
<ProductProperties
|
|
74
|
+
isHorizontal
|
|
75
|
+
list={[
|
|
76
|
+
{ iconName: 'watch-later', text: 'متن زیبا' },
|
|
77
|
+
{ iconName: 'alarm-off', text: 'متن دیگری' },
|
|
78
|
+
{ iconName: 'aspect-ratio', text: 'و باز هم متن دیگری' },
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
</Container>
|
|
82
|
+
<br />
|
|
83
|
+
|
|
84
|
+
<Heading level={2}>
|
|
85
|
+
product-owner
|
|
86
|
+
</Heading>
|
|
87
|
+
<br />
|
|
88
|
+
<Container>
|
|
89
|
+
<Heading level={3}>
|
|
90
|
+
product-owner
|
|
91
|
+
</Heading>
|
|
92
|
+
<ProductOwner
|
|
93
|
+
name="انجمن علمی کامپیوتر دانشگاه صنعتی خواجه نصیرالدین طوسی
|
|
94
|
+
انجمن علمی کامپیوتر دانشگاه صنعتی خواجه نصیرالدین طوسی"
|
|
95
|
+
onClickFollowMe={() => {
|
|
96
|
+
window.console.log('Follow Me Button Clicked, and it will return true or false randomly');
|
|
97
|
+
return false;
|
|
98
|
+
}}
|
|
99
|
+
onClickConnectUs={() => { window.console.log('Connect Us Button Clicked'); }}
|
|
100
|
+
renderDescriptionLink={(element) => <Link to="/tosomewherenew">{element}</Link>}
|
|
101
|
+
renderTitledAvatarLink={(element) => <Link to="/tosomewhere">{element}</Link>}
|
|
102
|
+
/>
|
|
103
|
+
<br />
|
|
104
|
+
<ProductOwner
|
|
105
|
+
name="دومی"
|
|
106
|
+
onClickFollowMe={() => {
|
|
107
|
+
window.console.log('Follow Me Button Clicked, and it will return true or false randomly');
|
|
108
|
+
return new Promise(
|
|
109
|
+
(resolve) => {
|
|
110
|
+
setTimeout(() => resolve(!Math.floor(Math.random() * 2)), 3000);
|
|
111
|
+
},
|
|
112
|
+
);
|
|
113
|
+
}}
|
|
114
|
+
onClickConnectUs={() => { window.console.log('Connect Us Button Clicked'); }}
|
|
115
|
+
/>
|
|
116
|
+
<br />
|
|
117
|
+
</Container>
|
|
118
|
+
<br />
|
|
119
|
+
|
|
120
|
+
</>
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
export default ProductPage;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Typography } from '../../../components';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
Heading, Text, Paragraph, Link,
|
|
7
|
+
} = Typography;
|
|
8
|
+
|
|
9
|
+
const TypographyPage = () => (
|
|
10
|
+
<>
|
|
11
|
+
<div>
|
|
12
|
+
<div>Button</div>
|
|
13
|
+
<Heading>سلام</Heading>
|
|
14
|
+
<Heading level={1}>سلام</Heading>
|
|
15
|
+
<Heading size="md" level={1}>سلام</Heading>
|
|
16
|
+
<Heading size="sm" level={1}>سلام</Heading>
|
|
17
|
+
<hr />
|
|
18
|
+
<Heading size="lg" level={2}>سلام</Heading>
|
|
19
|
+
<Heading size="md" level={2}>سلام</Heading>
|
|
20
|
+
<Heading size="sm" level={2}>سلام</Heading>
|
|
21
|
+
<hr />
|
|
22
|
+
<Heading size="lg" level={3}>سلام</Heading>
|
|
23
|
+
<Heading size="md" level={3}>سلام</Heading>
|
|
24
|
+
<Heading size="sm" level={3}>سلام</Heading>
|
|
25
|
+
<hr />
|
|
26
|
+
<Heading level={4}>سلام</Heading>
|
|
27
|
+
<Heading size="md" level={4}>سلام</Heading>
|
|
28
|
+
<Heading size="sm" level={4}>سلام</Heading>
|
|
29
|
+
<hr />
|
|
30
|
+
<Heading size="lg" level={5}>سلام</Heading>
|
|
31
|
+
<Heading size="md" level={5}>سلام</Heading>
|
|
32
|
+
<Heading size="sm" level={5}>سلام</Heading>
|
|
33
|
+
<hr />
|
|
34
|
+
<Heading size="lg" level={6}>سلام</Heading>
|
|
35
|
+
<Heading size="md" level={6}>سلام</Heading>
|
|
36
|
+
<Heading size="sm" level={6}>سلام</Heading>
|
|
37
|
+
<div />
|
|
38
|
+
<Text size={16} strong>تکست ساده استرانگ</Text>
|
|
39
|
+
<div />
|
|
40
|
+
<Text size={11} bold>تکست ساده بولد</Text>
|
|
41
|
+
<div />
|
|
42
|
+
<Text emphasized color="white">تکست ساده</Text>
|
|
43
|
+
<div />
|
|
44
|
+
<Text color="red" underline>تکست ساده</Text>
|
|
45
|
+
<div />
|
|
46
|
+
<Text color="green">تکست ساده</Text>
|
|
47
|
+
<div />
|
|
48
|
+
<Text color="light">تکست ساده</Text>
|
|
49
|
+
<div />
|
|
50
|
+
<Text color="blue">تکست ساده</Text>
|
|
51
|
+
<div />
|
|
52
|
+
<Text underline>تکست ساده</Text>
|
|
53
|
+
<div />
|
|
54
|
+
<Text marked>آنجایی</Text>
|
|
55
|
+
<div />
|
|
56
|
+
<Text lineThrough underline>تکست میکس</Text>
|
|
57
|
+
<div />
|
|
58
|
+
<Text label>آنجایی</Text>
|
|
59
|
+
<div />
|
|
60
|
+
<Text>تکست ساده</Text>
|
|
61
|
+
<div />
|
|
62
|
+
<Text strong emphasized>تکست ساده</Text>
|
|
63
|
+
<div />
|
|
64
|
+
<Text>تکست ساده</Text>
|
|
65
|
+
<div />
|
|
66
|
+
<Link href={(element) => <a href="/">{element}</a>} linkContent="لینک مثلاً داخلی" />
|
|
67
|
+
<div />
|
|
68
|
+
<Link href="http://yahoo.com">تکست ساده لینک خارجی</Link>
|
|
69
|
+
<div />
|
|
70
|
+
<Text>تکست ساده</Text>
|
|
71
|
+
<div />
|
|
72
|
+
<Text>تکست ساده</Text>
|
|
73
|
+
<div />
|
|
74
|
+
<Text>تکست ساده</Text>
|
|
75
|
+
<div />
|
|
76
|
+
<Text>تکست ساده</Text>
|
|
77
|
+
<div />
|
|
78
|
+
<Text>تکست ساده</Text>
|
|
79
|
+
<div />
|
|
80
|
+
<Text>تکست ساده</Text>
|
|
81
|
+
<div />
|
|
82
|
+
<Text>تکست ساده</Text>
|
|
83
|
+
<div />
|
|
84
|
+
<Text subScript>نویسنده</Text>
|
|
85
|
+
</div>
|
|
86
|
+
<Paragraph>
|
|
87
|
+
طراحان معمولاً برای طراحی، ابتدا از متنهای آزمایشی و بیمعنی استفاده میکنند
|
|
88
|
+
تا صرفاً به مشتری یا صاحب کار خود نشان دهند که
|
|
89
|
+
صفحه طراحی یا صفحه بندی شده بعد از اینکه متن
|
|
90
|
+
در آن قرار گیرد چگونه به نظر میرسد و قلمها و
|
|
91
|
+
اندازهبندیها چگونه در نظر گرفته شدهاست. از
|
|
92
|
+
<Text marked>آنجایی</Text>
|
|
93
|
+
که طراحان عموماً
|
|
94
|
+
<Text subScript>نویسنده</Text>
|
|
95
|
+
متن نیستند و وظیفه رعایت حق تکثیر متون را ندارند و در همان
|
|
96
|
+
حال کار آنها به نوعی وابسته به متن میباشد
|
|
97
|
+
آنها با استفاده از محتویات ساختگی،
|
|
98
|
+
صفحه گرافیکی خود را صفحهآرایی میکنند
|
|
99
|
+
تا مرحله طراحی و صفحهبندی را به پایان برند.
|
|
100
|
+
</Paragraph>
|
|
101
|
+
<Paragraph size={24}>
|
|
102
|
+
طراحان معمولاً برای طراحی، ابتدا از
|
|
103
|
+
متنهای آزمایشی و بیمعنی استفاده میکنند تا صرفاً به مشتری
|
|
104
|
+
یا صاحب کار خود نشان دهند که صفحه طراحی یا صفحه بندی شده
|
|
105
|
+
بعد از اینکه متن در آن قرار گیرد چگونه به نظر میرسد
|
|
106
|
+
و قلمها و اندازهبندیها چگونه در نظر گرفته شدهاست. از
|
|
107
|
+
<Text supScript> نویسنده </Text>
|
|
108
|
+
که طراحان عموماً نویسنده متن نیستند
|
|
109
|
+
و وظیفه رعایت حق تکثیر متون را ندارند و در همان حال
|
|
110
|
+
کار آنها به نوعی وابسته به متن میباشد آنها با استفاده
|
|
111
|
+
از محتویات ساختگی، صفحه گرافیکی خود را صفحهآرایی
|
|
112
|
+
میکنند تا مرحله طراحی و صفحهبندی را به پایان برند.
|
|
113
|
+
</Paragraph>
|
|
114
|
+
<Paragraph>
|
|
115
|
+
طراحان معمولاً برای طراحی، ابتدا از متنهای آزمایشی و بیمعنی استفاده میکنند
|
|
116
|
+
تا صرفاً به مشتری یا صاحب کار خود نشان دهند که صفحه طراحی
|
|
117
|
+
یا صفحه بندی شده بعد از اینکه متن در آن قرار گیرد چگونه
|
|
118
|
+
به نظر میرسد و قلمها و اندازهبندیها چگونه در نظر گرفته
|
|
119
|
+
شدهاست. از آنجایی که طراحان عموماً نویسنده متن نیستند
|
|
120
|
+
و وظیفه رعایت حق تکثیر متون را ندارند و در همان حال
|
|
121
|
+
کار آنها به نوعی وابسته به متن میباشد آنها با استفاده
|
|
122
|
+
از محتویات ساختگی، صفحه گرافیکی خود را صفحهآرایی
|
|
123
|
+
میکنند تا مرحله طراحی و صفحهبندی را به پایان برند.
|
|
124
|
+
</Paragraph>
|
|
125
|
+
<Paragraph>
|
|
126
|
+
طراحان معمولاً برای طراحی، ابتدا از متنهای آزمایشی و بیمعنی
|
|
127
|
+
استفاده میکنند تا صرفاً به مشتری یا صاحب کار خود نشان دهند که صفحه
|
|
128
|
+
طراحی یا صفحه بندی شده بعد از اینکه متن در آن قرار گیرد چگونه
|
|
129
|
+
به نظر میرسد و قلمها و اندازهبندیها چگونه در نظر گرفته شدهاست.
|
|
130
|
+
از آنجایی که طراحان عموماً نویسنده متن نیستند و وظیفه رعایت حق
|
|
131
|
+
تکثیر متون را ندارند و در همان حال کار آنها به نوعی وابسته به
|
|
132
|
+
متن میباشد آنها با استفاده از محتویات ساختگی، صفحه گرافیکی خود
|
|
133
|
+
را صفحهآرایی میکنند تا مرحله طراحی و صفحهبندی را به پایان برند.
|
|
134
|
+
</Paragraph>
|
|
135
|
+
</>
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
export default TypographyPage;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import styled, { createGlobalStyle } from 'styled-components';
|
|
2
|
+
import IranSharpBoldWoff from './assets/fonts/iransharp_bold_web.woff';
|
|
3
|
+
import IranSharpBoldWoff2 from './assets/fonts/iransharp_bold_web.woff2';
|
|
4
|
+
import IranSharpRegularWoff from './assets/fonts/iransharp_regular_web.woff';
|
|
5
|
+
import IranSharpRegularWoff2 from './assets/fonts/iransharp_regular_web.woff2';
|
|
6
|
+
import IconMoonWoff from './assets/fonts/icomoon.woff';
|
|
7
|
+
import FilesImgsWoff from './assets/fonts/filesImgs.woff';
|
|
8
|
+
|
|
9
|
+
const GlobalStyle = createGlobalStyle`
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'IranSharp';
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
src:
|
|
15
|
+
url(${IranSharpBoldWoff2}) format("woff2"),
|
|
16
|
+
url(${IranSharpBoldWoff}) format("woff");
|
|
17
|
+
}
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: 'IranSharp';
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 300;
|
|
22
|
+
src:
|
|
23
|
+
url(${IranSharpRegularWoff2}) format("woff2"),
|
|
24
|
+
url(${IranSharpRegularWoff}) format("woff");
|
|
25
|
+
}
|
|
26
|
+
@font-face {
|
|
27
|
+
font-family: 'Jupiterico';
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
font-display: swap;
|
|
31
|
+
src: url(${IconMoonWoff}) format("woff");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: 'JupiterfilesImgs';
|
|
36
|
+
font-style: normal;
|
|
37
|
+
font-weight: normal;
|
|
38
|
+
font-display: swap;
|
|
39
|
+
src: url(${FilesImgsWoff}) format("woff");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body {
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
direction: rtl;
|
|
45
|
+
font-size: 13px;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export default GlobalStyle;
|
|
52
|
+
|
|
53
|
+
export const ContentContainer = styled.section`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
padding: 16px;
|
|
57
|
+
margin-right: 180px;
|
|
58
|
+
`;
|
package/src/index.css
ADDED
package/src/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
4
|
+
import './index.css';
|
|
5
|
+
import App from './App';
|
|
6
|
+
import * as serviceWorker from './serviceWorker';
|
|
7
|
+
|
|
8
|
+
ReactDOM.render(
|
|
9
|
+
<BrowserRouter>
|
|
10
|
+
<App />
|
|
11
|
+
</BrowserRouter>,
|
|
12
|
+
document.getElementById('root'),
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
// If you want your app to work offline and load faster, you can change
|
|
16
|
+
// unregister() to register() below. Note this comes with some pitfalls.
|
|
17
|
+
// Learn more about service workers: https://bit.ly/CRA-PWA
|
|
18
|
+
serviceWorker.unregister();
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import '../playground.css';
|
|
4
|
+
import { Button } from '../components/button';
|
|
5
|
+
import { Text } from '../components/typography/text';
|
|
6
|
+
import { Heading } from '../components/typography/heading';
|
|
7
|
+
import { Link } from '../components/typography/link';
|
|
8
|
+
import { Avatar } from '../components/avatar';
|
|
9
|
+
import { Accordion } from '../components/accordion';
|
|
10
|
+
import { Table } from '../components/table';
|
|
11
|
+
import { TitledAvatar } from '../components/titled-avatar';
|
|
12
|
+
import { ShowDate } from '../components/show-date';
|
|
13
|
+
import { ProductMenu } from '../components/product-menu';
|
|
14
|
+
import { ProductProperties } from '../components/product-properties';
|
|
15
|
+
import { ProgressBar } from '../components/progress-bar';
|
|
16
|
+
import { NumericSummeryReport } from '../components/numeric-summery-report';
|
|
17
|
+
|
|
18
|
+
const PlaygroundContainer = styled.div`
|
|
19
|
+
padding: 2rem;
|
|
20
|
+
max-width: 1200px;
|
|
21
|
+
margin: 0 auto;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
const Section = styled.section`
|
|
25
|
+
margin-bottom: 3rem;
|
|
26
|
+
padding: 2rem;
|
|
27
|
+
border: 1px solid #eee;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
background-color: white;
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
const SectionTitle = styled(Heading)`
|
|
33
|
+
margin-bottom: 1.5rem;
|
|
34
|
+
color: #333;
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const Playground = () => {
|
|
38
|
+
return (
|
|
39
|
+
<PlaygroundContainer>
|
|
40
|
+
<Section>
|
|
41
|
+
<SectionTitle level={2}>Typography</SectionTitle>
|
|
42
|
+
<Heading level={1}>Heading 1</Heading>
|
|
43
|
+
<Heading level={2}>Heading 2</Heading>
|
|
44
|
+
<Heading level={3}>Heading 3</Heading>
|
|
45
|
+
<Text>Regular text</Text>
|
|
46
|
+
<Text color="blue">Blue text</Text>
|
|
47
|
+
<Text color="red">Red text</Text>
|
|
48
|
+
<Link href="https://example.com">Example Link</Link>
|
|
49
|
+
</Section>
|
|
50
|
+
|
|
51
|
+
<Section>
|
|
52
|
+
<SectionTitle level={2}>Buttons</SectionTitle>
|
|
53
|
+
<Button>Default Button</Button>
|
|
54
|
+
<Button styleType="secondary">Secondary Button</Button>
|
|
55
|
+
<Button styleType="tertiary">Tertiary Button</Button>
|
|
56
|
+
</Section>
|
|
57
|
+
|
|
58
|
+
<Section>
|
|
59
|
+
<SectionTitle level={2}>Avatars</SectionTitle>
|
|
60
|
+
<Avatar src="https://via.placeholder.com/150" size="sm" />
|
|
61
|
+
<Avatar src="https://via.placeholder.com/150" size="md" />
|
|
62
|
+
<Avatar src="https://via.placeholder.com/150" size="lg" />
|
|
63
|
+
</Section>
|
|
64
|
+
|
|
65
|
+
<Section>
|
|
66
|
+
<SectionTitle level={2}>Titled Avatar</SectionTitle>
|
|
67
|
+
<TitledAvatar
|
|
68
|
+
title="John Doe"
|
|
69
|
+
avatar="https://via.placeholder.com/40"
|
|
70
|
+
avatarSize={40}
|
|
71
|
+
titleSize={14}
|
|
72
|
+
/>
|
|
73
|
+
</Section>
|
|
74
|
+
|
|
75
|
+
<Section>
|
|
76
|
+
<SectionTitle level={2}>Progress Bar</SectionTitle>
|
|
77
|
+
<ProgressBar progress={50} color="#2196F3" height={8} />
|
|
78
|
+
</Section>
|
|
79
|
+
|
|
80
|
+
<Section>
|
|
81
|
+
<SectionTitle level={2}>Numeric Summary Report</SectionTitle>
|
|
82
|
+
<NumericSummeryReport
|
|
83
|
+
title="Total Users"
|
|
84
|
+
value={1234}
|
|
85
|
+
textColor="#000000"
|
|
86
|
+
/>
|
|
87
|
+
</Section>
|
|
88
|
+
|
|
89
|
+
<Section>
|
|
90
|
+
<SectionTitle level={2}>Product Menu</SectionTitle>
|
|
91
|
+
<ProductMenu
|
|
92
|
+
items={[
|
|
93
|
+
{ id: 1, label: 'Dashboard', icon: 'home' },
|
|
94
|
+
{ id: 2, label: 'Profile', icon: 'user' },
|
|
95
|
+
{ id: 3, label: 'Settings', icon: 'settings' },
|
|
96
|
+
]}
|
|
97
|
+
onItemClick={(id) => console.log('Clicked:', id)}
|
|
98
|
+
/>
|
|
99
|
+
</Section>
|
|
100
|
+
|
|
101
|
+
<Section>
|
|
102
|
+
<SectionTitle level={2}>Product Properties</SectionTitle>
|
|
103
|
+
<ProductProperties
|
|
104
|
+
properties={[
|
|
105
|
+
{ id: 1, label: 'Category', value: 'Electronics', icon: 'category' },
|
|
106
|
+
{ id: 2, label: 'Brand', value: 'Apple', icon: 'brand' },
|
|
107
|
+
{ id: 3, label: 'Model', value: 'iPhone 13', icon: 'model' },
|
|
108
|
+
]}
|
|
109
|
+
isHorizontal={false}
|
|
110
|
+
color="#000000"
|
|
111
|
+
iconColor="#666666"
|
|
112
|
+
/>
|
|
113
|
+
</Section>
|
|
114
|
+
|
|
115
|
+
<Section>
|
|
116
|
+
<SectionTitle level={2}>Show Date</SectionTitle>
|
|
117
|
+
<ShowDate
|
|
118
|
+
date={new Date()}
|
|
119
|
+
format="YYYY-MM-DD"
|
|
120
|
+
fontSize={16}
|
|
121
|
+
color="#000000"
|
|
122
|
+
/>
|
|
123
|
+
</Section>
|
|
124
|
+
|
|
125
|
+
<Section>
|
|
126
|
+
<SectionTitle level={2}>Table</SectionTitle>
|
|
127
|
+
<Table
|
|
128
|
+
columns={[
|
|
129
|
+
{ id: 'name', label: 'Name' },
|
|
130
|
+
{ id: 'age', label: 'Age' },
|
|
131
|
+
{ id: 'city', label: 'City' },
|
|
132
|
+
]}
|
|
133
|
+
data={[
|
|
134
|
+
{ id: 1, name: 'John Doe', age: 30, city: 'New York' },
|
|
135
|
+
{ id: 2, name: 'Jane Smith', age: 25, city: 'Los Angeles' },
|
|
136
|
+
{ id: 3, name: 'Bob Johnson', age: 35, city: 'Chicago' },
|
|
137
|
+
]}
|
|
138
|
+
/>
|
|
139
|
+
</Section>
|
|
140
|
+
</PlaygroundContainer>
|
|
141
|
+
);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export default Playground;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
body {
|
|
2
|
+
direction: rtl;
|
|
3
|
+
margin: 0;
|
|
4
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
|
5
|
+
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
|
6
|
+
sans-serif;
|
|
7
|
+
-webkit-font-smoothing: antialiased;
|
|
8
|
+
-moz-osx-font-smoothing: grayscale;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
* {
|
|
12
|
+
outline: none;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
ul, li {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 0;
|
|
19
|
+
list-style: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.App {
|
|
23
|
+
text-align: right;
|
|
24
|
+
min-height: 100vh;
|
|
25
|
+
background-color: #f5f5f5;
|
|
26
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// This optional code is used to register a service worker.
|
|
2
|
+
// register() is not called by default.
|
|
3
|
+
|
|
4
|
+
// This lets the app load faster on subsequent visits in production, and gives
|
|
5
|
+
// it offline capabilities. However, it also means that developers (and users)
|
|
6
|
+
// will only see deployed updates on subsequent visits to a page, after all the
|
|
7
|
+
// existing tabs open on the page have been closed, since previously cached
|
|
8
|
+
// resources are updated in the background.
|
|
9
|
+
|
|
10
|
+
// To learn more about the benefits of this model and instructions on how to
|
|
11
|
+
// opt-in, read https://bit.ly/CRA-PWA
|
|
12
|
+
|
|
13
|
+
const isLocalhost = Boolean(
|
|
14
|
+
window.location.hostname === 'localhost'
|
|
15
|
+
// [::1] is the IPv6 localhost address.
|
|
16
|
+
|| window.location.hostname === '[::1]'
|
|
17
|
+
// 127.0.0.1/8 is considered localhost for IPv4.
|
|
18
|
+
|| window.location.hostname.match(
|
|
19
|
+
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,
|
|
20
|
+
),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
export function register(config) {
|
|
24
|
+
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
|
25
|
+
// The URL constructor is available in all browsers that support SW.
|
|
26
|
+
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
|
27
|
+
if (publicUrl.origin !== window.location.origin) {
|
|
28
|
+
// Our service worker won't work if PUBLIC_URL is on a different origin
|
|
29
|
+
// from what our page is served on. This might happen if a CDN is used to
|
|
30
|
+
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
window.addEventListener('load', () => {
|
|
35
|
+
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
|
36
|
+
|
|
37
|
+
if (isLocalhost) {
|
|
38
|
+
// This is running on localhost. Let's check if a service worker still exists or not.
|
|
39
|
+
checkValidServiceWorker(swUrl, config);
|
|
40
|
+
|
|
41
|
+
// Add some additional logging to localhost, pointing developers to the
|
|
42
|
+
// service worker/PWA documentation.
|
|
43
|
+
navigator.serviceWorker.ready.then(() => {
|
|
44
|
+
console.log(
|
|
45
|
+
'This web app is being served cache-first by a service '
|
|
46
|
+
+ 'worker. To learn more, visit https://bit.ly/CRA-PWA',
|
|
47
|
+
);
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
// Is not localhost. Just register service worker
|
|
51
|
+
registerValidSW(swUrl, config);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function registerValidSW(swUrl, config) {
|
|
58
|
+
navigator.serviceWorker
|
|
59
|
+
.register(swUrl)
|
|
60
|
+
.then((registration) => {
|
|
61
|
+
registration.onupdatefound = () => {
|
|
62
|
+
const installingWorker = registration.installing;
|
|
63
|
+
if (installingWorker == null) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
installingWorker.onstatechange = () => {
|
|
67
|
+
if (installingWorker.state === 'installed') {
|
|
68
|
+
if (navigator.serviceWorker.controller) {
|
|
69
|
+
// At this point, the updated precached content has been fetched,
|
|
70
|
+
// but the previous service worker will still serve the older
|
|
71
|
+
// content until all client tabs are closed.
|
|
72
|
+
console.log(
|
|
73
|
+
'New content is available and will be used when all '
|
|
74
|
+
+ 'tabs for this page are closed. See https://bit.ly/CRA-PWA.',
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
// Execute callback
|
|
78
|
+
if (config && config.onUpdate) {
|
|
79
|
+
config.onUpdate(registration);
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
// At this point, everything has been precached.
|
|
83
|
+
// It's the perfect time to display a
|
|
84
|
+
// "Content is cached for offline use." message.
|
|
85
|
+
console.log('Content is cached for offline use.');
|
|
86
|
+
|
|
87
|
+
// Execute callback
|
|
88
|
+
if (config && config.onSuccess) {
|
|
89
|
+
config.onSuccess(registration);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
})
|
|
96
|
+
.catch((error) => {
|
|
97
|
+
console.error('Error during service worker registration:', error);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function checkValidServiceWorker(swUrl, config) {
|
|
102
|
+
// Check if the service worker can be found. If it can't reload the page.
|
|
103
|
+
fetch(swUrl)
|
|
104
|
+
.then((response) => {
|
|
105
|
+
// Ensure service worker exists, and that we really are getting a JS file.
|
|
106
|
+
const contentType = response.headers.get('content-type');
|
|
107
|
+
if (
|
|
108
|
+
response.status === 404
|
|
109
|
+
|| (contentType != null && contentType.indexOf('javascript') === -1)
|
|
110
|
+
) {
|
|
111
|
+
// No service worker found. Probably a different app. Reload the page.
|
|
112
|
+
navigator.serviceWorker.ready.then((registration) => {
|
|
113
|
+
registration.unregister().then(() => {
|
|
114
|
+
window.location.reload();
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
} else {
|
|
118
|
+
// Service worker found. Proceed as normal.
|
|
119
|
+
registerValidSW(swUrl, config);
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
.catch(() => {
|
|
123
|
+
console.log(
|
|
124
|
+
'No internet connection found. App is running in offline mode.',
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function unregister() {
|
|
130
|
+
if ('serviceWorker' in navigator) {
|
|
131
|
+
navigator.serviceWorker.ready.then((registration) => {
|
|
132
|
+
registration.unregister();
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
2
|
+
import { configure } from '@testing-library/react';
|
|
3
|
+
import 'jest-styled-components';
|
|
4
|
+
|
|
5
|
+
// Configure React Testing Library
|
|
6
|
+
configure({
|
|
7
|
+
testIdAttribute: 'data-testid',
|
|
8
|
+
throwSuggestions: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
// Mock window.matchMedia
|
|
12
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
13
|
+
writable: true,
|
|
14
|
+
value: jest.fn().mockImplementation(query => ({
|
|
15
|
+
matches: false,
|
|
16
|
+
media: query,
|
|
17
|
+
onchange: null,
|
|
18
|
+
addListener: jest.fn(),
|
|
19
|
+
removeListener: jest.fn(),
|
|
20
|
+
addEventListener: jest.fn(),
|
|
21
|
+
removeEventListener: jest.fn(),
|
|
22
|
+
dispatchEvent: jest.fn(),
|
|
23
|
+
})),
|
|
24
|
+
});
|