react-jupiter 6.0.0-beta.2 → 6.0.0-beta.4
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/accordion/index.js +25 -0
- package/{src/components/accordion → accordion}/index.styles.js +6 -6
- package/accordion/panel.js +41 -0
- package/avatar/index.js +41 -0
- package/avatar/index.styles.js +17 -0
- package/avatar/theme.js +13 -0
- package/button/index.js +210 -0
- package/button/index.styles.js +104 -0
- package/button/theme.js +58 -0
- package/button/utils.js +12 -0
- package/card/card-template/index.js +74 -0
- package/card/card-template/index.stories.js +110 -0
- package/card/card-template/index.style.js +25 -0
- package/card/card-template/index.test.js +85 -0
- package/card/event-card/constants.js +3 -0
- package/card/event-card/event-card-label/index.js +24 -0
- package/card/event-card/event-card-label/index.style.js +10 -0
- package/card/event-card/event-card-label/index.test.js +23 -0
- package/card/event-card/index.js +227 -0
- package/card/event-card/index.stories.js +166 -0
- package/card/event-card/index.style.js +129 -0
- package/card/event-card/index.test.js +79 -0
- package/card/index.js +16 -0
- package/card/organization-card/index.js +59 -0
- package/card/organization-card/index.stories.js +49 -0
- package/card/organization-card/index.style.js +10 -0
- package/card/organization-card/index.test.js +25 -0
- package/card/orgnizer-card/buttons.js +48 -0
- package/card/orgnizer-card/index.js +179 -0
- package/card/orgnizer-card/index.stories.js +81 -0
- package/card/orgnizer-card/index.style.js +58 -0
- package/cover/index.js +74 -0
- package/cover/index.style.js +48 -0
- package/display/index.js +42 -0
- package/display/index.style.js +79 -0
- package/file-item/fileImgIcon.js +37 -0
- package/{src/components/file-item → file-item}/fileImgsFont.js +4 -4
- package/file-item/index.js +101 -0
- package/file-item/index.style.js +31 -0
- package/file-item/theme.js +12 -0
- package/file-item/utils.js +3 -0
- package/form/captcha/index.js +86 -0
- package/form/captcha/index.stories.js +42 -0
- package/form/captcha/index.style.js +38 -0
- package/form/captcha/index.test.js +31 -0
- package/form/checkbox/checkbox-option.js +41 -0
- package/form/checkbox/checkbox.js +54 -0
- package/form/checkbox/index.js +10 -0
- package/form/checkbox/index.stories.js +121 -0
- package/form/checkbox/index.style.js +62 -0
- package/form/dropdown/index.js +10 -0
- package/form/dropdown/index.stories.js +119 -0
- package/form/dropdown/index.style.js +57 -0
- package/form/dropdown/index.test.js +20 -0
- package/form/dropdown/option.js +22 -0
- package/form/dropdown/select.js +68 -0
- package/form/errorMsg.js +21 -0
- package/form/index.js +22 -0
- package/form/radio/index.js +10 -0
- package/form/radio/index.stories.js +119 -0
- package/form/radio/index.style.js +61 -0
- package/form/radio/radio-option.js +45 -0
- package/form/radio/radio.js +56 -0
- package/form/text-input/index.js +92 -0
- package/form/text-input/index.stories.js +77 -0
- package/form/text-input/index.style.js +57 -0
- package/form/text-input/index.test.js +63 -0
- package/form/textarea/index.js +59 -0
- package/form/textarea/index.stories.js +90 -0
- package/form/textarea/index.style.js +25 -0
- package/form/theme.js +16 -0
- package/form-v7/captcha/index.js +101 -0
- package/form-v7/captcha/index.stories.js +60 -0
- package/form-v7/captcha/index.style.js +38 -0
- package/form-v7/captcha/index.test.js +31 -0
- package/form-v7/checkbox/checkbox-option.js +44 -0
- package/form-v7/checkbox/checkbox.js +70 -0
- package/form-v7/checkbox/index.js +10 -0
- package/form-v7/checkbox/index.stories.js +113 -0
- package/form-v7/checkbox/index.style.js +62 -0
- package/form-v7/dropdown/index.js +10 -0
- package/form-v7/dropdown/index.stories.js +130 -0
- package/form-v7/dropdown/index.style.js +57 -0
- package/form-v7/dropdown/index.test.js +20 -0
- package/form-v7/dropdown/option.js +18 -0
- package/form-v7/dropdown/select.js +85 -0
- package/form-v7/errorMsg.js +21 -0
- package/form-v7/file-input/index.js +73 -0
- package/form-v7/file-input/index.stories.js +73 -0
- package/form-v7/file-input/index.style.js +62 -0
- package/form-v7/file-input/index.test.js +63 -0
- package/form-v7/form/index.stories.js +276 -0
- package/form-v7/index.js +25 -0
- package/form-v7/index.style.js +11 -0
- package/form-v7/label/index.js +31 -0
- package/form-v7/label/index.style.js +12 -0
- package/form-v7/radio/index.js +10 -0
- package/form-v7/radio/index.stories.js +117 -0
- package/form-v7/radio/index.style.js +61 -0
- package/form-v7/radio/radio-option.js +45 -0
- package/form-v7/radio/radio.js +75 -0
- package/form-v7/text-input/index.js +132 -0
- package/form-v7/text-input/index.stories.js +96 -0
- package/form-v7/text-input/index.style.js +49 -0
- package/form-v7/text-input/index.test.js +63 -0
- package/form-v7/textarea/index.js +71 -0
- package/form-v7/textarea/index.stories.js +91 -0
- package/form-v7/textarea/index.style.js +25 -0
- package/form-v7/theme.js +20 -0
- package/{src/components/globalStyle.js → globalStyle.js} +4 -4
- package/grid/index.js +83 -0
- package/{dist/components/icon → icon}/iconFont.js +4 -4
- package/icon/index.js +116 -0
- package/icon/index.styles.js +12 -0
- package/icon/theme.js +23 -0
- package/index.js +75 -0
- package/modal/index.js +100 -0
- package/modal/index.style.js +40 -0
- package/modal/theme.js +11 -0
- package/numeric-summery-report/index.js +28 -0
- package/numeric-summery-report/index.style.js +16 -0
- package/package.json +11 -130
- package/product-menu/index.js +10 -0
- package/product-menu/index.style.js +38 -0
- package/product-menu/menu-item.js +23 -0
- package/product-menu/menu.js +88 -0
- package/product-menu/theme.js +16 -0
- package/product-owner/index.js +85 -0
- package/product-owner/index.style.js +16 -0
- package/product-properties/index.js +65 -0
- package/product-properties/index.style.js +14 -0
- package/product-properties/product-property/index.js +49 -0
- package/product-properties/product-property/index.style.js +9 -0
- package/progress-bar/index.js +46 -0
- package/{dist/components/progress-bar → progress-bar}/index.styles.js +11 -11
- package/responsive/index.js +44 -0
- package/show-date/index.js +25 -0
- package/spacing/core.js +106 -0
- package/spacing/index.js +10 -0
- package/spacing/margin/index.js +26 -0
- package/spacing/padding/index.js +26 -0
- package/table/actionCell.js +57 -0
- package/table/index.js +56 -0
- package/{src/components/table → table}/index.style.js +31 -31
- package/table/tableHeaderRow.js +28 -0
- package/table/tableRow.js +60 -0
- package/table/theme.js +8 -0
- package/tabs/index.js +10 -0
- package/tabs/index.style.js +35 -0
- package/tabs/tabPanel.js +17 -0
- package/tabs/tabs.js +71 -0
- package/tabs/theme.js +10 -0
- package/themes.js +97 -0
- package/titled-avatar/index.js +48 -0
- package/titled-avatar/index.style.js +30 -0
- package/typography/heading/index.js +59 -0
- package/typography/heading/index.stories.js +94 -0
- package/typography/heading/index.styles.js +69 -0
- package/typography/heading/index.test.js +122 -0
- package/typography/index.js +16 -0
- package/typography/link/index.js +82 -0
- package/typography/link/index.stories.js +70 -0
- package/typography/link/index.styles.js +8 -0
- package/typography/link/index.test.js +60 -0
- package/typography/paragraph/index.js +37 -0
- package/typography/paragraph/index.stories.js +56 -0
- package/typography/paragraph/index.styles.js +12 -0
- package/typography/paragraph/index.test.js +47 -0
- package/typography/text/index.js +156 -0
- package/typography/text/index.stories.js +196 -0
- package/typography/text/index.styles.js +73 -0
- package/typography/text/index.test.js +333 -0
- package/typography/theme.js +66 -0
- package/typography/utils.js +53 -0
- package/utils/date.js +7 -0
- package/utils/detectMobile.js +15 -0
- package/utils/index.js +7 -0
- package/utils/media-query.js +12 -0
- package/utils/numbers.js +25 -0
- package/utils/test.js +6 -0
- package/utils/theme.js +67 -0
- package/.babelrc +0 -12
- package/.env +0 -3
- package/.eslintignore +0 -2
- package/.eslintrc +0 -18
- package/.eslintrc.js +0 -47
- package/.eslintrc.json +0 -16
- package/.flowconfig +0 -0
- package/.storybook/main.js +0 -27
- package/.storybook/preview-head.html +0 -1
- package/.storybook/preview.js +0 -30
- package/.storybook/style.css +0 -9
- package/.vscode/settings.json +0 -4
- package/__mocks__/fileMock.js +0 -1
- package/config-overrides.js +0 -34
- package/dist/App.js +0 -13
- package/dist/components/accordion/index.js +0 -25
- package/dist/components/accordion/index.stories.js +0 -82
- package/dist/components/accordion/index.styles.js +0 -52
- package/dist/components/accordion/panel.js +0 -41
- package/dist/components/avatar/index.js +0 -41
- package/dist/components/avatar/index.stories.js +0 -59
- package/dist/components/avatar/index.styles.js +0 -17
- package/dist/components/avatar/index.test.js +0 -10
- package/dist/components/avatar/theme.js +0 -13
- package/dist/components/button/__snapshots__/index.test.js.snap +0 -489
- package/dist/components/button/index.js +0 -209
- package/dist/components/button/index.stories.js +0 -304
- package/dist/components/button/index.styles.js +0 -104
- package/dist/components/button/theme.js +0 -58
- package/dist/components/button/utils.js +0 -12
- package/dist/components/card/card-template/index.js +0 -74
- package/dist/components/card/card-template/index.stories.js +0 -110
- package/dist/components/card/card-template/index.style.js +0 -25
- package/dist/components/card/card-template/index.test.js +0 -85
- package/dist/components/card/event-card/constants.js +0 -3
- package/dist/components/card/event-card/event-card-label/index.js +0 -24
- package/dist/components/card/event-card/event-card-label/index.style.js +0 -10
- package/dist/components/card/event-card/event-card-label/index.test.js +0 -23
- package/dist/components/card/event-card/index.js +0 -227
- package/dist/components/card/event-card/index.stories.js +0 -166
- package/dist/components/card/event-card/index.style.js +0 -129
- package/dist/components/card/event-card/index.test.js +0 -79
- package/dist/components/card/index.js +0 -16
- package/dist/components/card/organization-card/index.js +0 -59
- package/dist/components/card/organization-card/index.stories.js +0 -49
- package/dist/components/card/organization-card/index.style.js +0 -10
- package/dist/components/card/organization-card/index.test.js +0 -25
- package/dist/components/card/orgnizer-card/buttons.js +0 -48
- package/dist/components/card/orgnizer-card/index.js +0 -179
- package/dist/components/card/orgnizer-card/index.stories.js +0 -81
- package/dist/components/card/orgnizer-card/index.style.js +0 -58
- package/dist/components/cover/index.js +0 -74
- package/dist/components/cover/index.style.js +0 -48
- package/dist/components/cover/index.test.js +0 -25
- package/dist/components/display/index.js +0 -42
- package/dist/components/display/index.style.js +0 -79
- package/dist/components/file-item/fileImgIcon.js +0 -37
- package/dist/components/file-item/fileImgsFont.js +0 -800
- package/dist/components/file-item/index.js +0 -101
- package/dist/components/file-item/index.stories.js +0 -71
- package/dist/components/file-item/index.style.js +0 -31
- package/dist/components/file-item/index.test.js +0 -106
- package/dist/components/file-item/theme.js +0 -12
- package/dist/components/file-item/utils.js +0 -3
- package/dist/components/form/captcha/index.js +0 -86
- package/dist/components/form/captcha/index.stories.js +0 -42
- package/dist/components/form/captcha/index.style.js +0 -38
- package/dist/components/form/captcha/index.test.js +0 -31
- package/dist/components/form/checkbox/checkbox-option.js +0 -41
- package/dist/components/form/checkbox/checkbox.js +0 -54
- package/dist/components/form/checkbox/index.js +0 -10
- package/dist/components/form/checkbox/index.stories.js +0 -121
- package/dist/components/form/checkbox/index.style.js +0 -62
- package/dist/components/form/dropdown/index.js +0 -10
- package/dist/components/form/dropdown/index.stories.js +0 -119
- package/dist/components/form/dropdown/index.style.js +0 -57
- package/dist/components/form/dropdown/index.test.js +0 -20
- package/dist/components/form/dropdown/option.js +0 -22
- package/dist/components/form/dropdown/select.js +0 -68
- package/dist/components/form/errorMsg.js +0 -21
- package/dist/components/form/index.js +0 -22
- package/dist/components/form/radio/index.js +0 -10
- package/dist/components/form/radio/index.stories.js +0 -119
- package/dist/components/form/radio/index.style.js +0 -61
- package/dist/components/form/radio/radio-option.js +0 -45
- package/dist/components/form/radio/radio.js +0 -56
- package/dist/components/form/text-input/index.js +0 -92
- package/dist/components/form/text-input/index.stories.js +0 -77
- package/dist/components/form/text-input/index.style.js +0 -57
- package/dist/components/form/text-input/index.test.js +0 -63
- package/dist/components/form/textarea/index.js +0 -59
- package/dist/components/form/textarea/index.stories.js +0 -90
- package/dist/components/form/textarea/index.style.js +0 -25
- package/dist/components/form/theme.js +0 -16
- package/dist/components/form-v7/captcha/index.js +0 -101
- package/dist/components/form-v7/captcha/index.stories.js +0 -60
- package/dist/components/form-v7/captcha/index.style.js +0 -38
- package/dist/components/form-v7/captcha/index.test.js +0 -31
- package/dist/components/form-v7/checkbox/checkbox-option.js +0 -44
- package/dist/components/form-v7/checkbox/checkbox.js +0 -70
- package/dist/components/form-v7/checkbox/index.js +0 -10
- package/dist/components/form-v7/checkbox/index.stories.js +0 -113
- package/dist/components/form-v7/checkbox/index.style.js +0 -62
- package/dist/components/form-v7/dropdown/index.js +0 -10
- package/dist/components/form-v7/dropdown/index.stories.js +0 -130
- package/dist/components/form-v7/dropdown/index.style.js +0 -57
- package/dist/components/form-v7/dropdown/index.test.js +0 -20
- package/dist/components/form-v7/dropdown/option.js +0 -18
- package/dist/components/form-v7/dropdown/select.js +0 -85
- package/dist/components/form-v7/errorMsg.js +0 -21
- package/dist/components/form-v7/file-input/index.js +0 -73
- package/dist/components/form-v7/file-input/index.stories.js +0 -73
- package/dist/components/form-v7/file-input/index.style.js +0 -62
- package/dist/components/form-v7/file-input/index.test.js +0 -63
- package/dist/components/form-v7/form/index.stories.js +0 -276
- package/dist/components/form-v7/index.js +0 -25
- package/dist/components/form-v7/index.style.js +0 -11
- package/dist/components/form-v7/label/index.js +0 -31
- package/dist/components/form-v7/label/index.style.js +0 -12
- package/dist/components/form-v7/radio/index.js +0 -10
- package/dist/components/form-v7/radio/index.stories.js +0 -117
- package/dist/components/form-v7/radio/index.style.js +0 -61
- package/dist/components/form-v7/radio/radio-option.js +0 -45
- package/dist/components/form-v7/radio/radio.js +0 -75
- package/dist/components/form-v7/text-input/index.js +0 -132
- package/dist/components/form-v7/text-input/index.stories.js +0 -96
- package/dist/components/form-v7/text-input/index.style.js +0 -49
- package/dist/components/form-v7/text-input/index.test.js +0 -63
- package/dist/components/form-v7/textarea/index.js +0 -71
- package/dist/components/form-v7/textarea/index.stories.js +0 -91
- package/dist/components/form-v7/textarea/index.style.js +0 -25
- package/dist/components/form-v7/theme.js +0 -20
- package/dist/components/globalStyle.js +0 -28
- package/dist/components/grid/index.js +0 -83
- package/dist/components/icon/index.js +0 -116
- package/dist/components/icon/index.stories.js +0 -45
- package/dist/components/icon/index.styles.js +0 -12
- package/dist/components/icon/index.test.js +0 -66
- package/dist/components/icon/theme.js +0 -23
- package/dist/components/index.js +0 -75
- package/dist/components/modal/index.js +0 -100
- package/dist/components/modal/index.stories.js +0 -86
- package/dist/components/modal/index.style.js +0 -40
- package/dist/components/modal/theme.js +0 -11
- package/dist/components/numeric-summery-report/index.js +0 -28
- package/dist/components/numeric-summery-report/index.stories.js +0 -37
- package/dist/components/numeric-summery-report/index.style.js +0 -16
- package/dist/components/numeric-summery-report/index.test.js +0 -22
- package/dist/components/product-menu/index.js +0 -10
- package/dist/components/product-menu/index.stories.js +0 -33
- package/dist/components/product-menu/index.style.js +0 -38
- package/dist/components/product-menu/index.test.js +0 -27
- package/dist/components/product-menu/menu-item.js +0 -23
- package/dist/components/product-menu/menu.js +0 -88
- package/dist/components/product-menu/theme.js +0 -16
- package/dist/components/product-owner/index.js +0 -85
- package/dist/components/product-owner/index.style.js +0 -16
- package/dist/components/product-owner/index.test.js +0 -75
- package/dist/components/product-properties/index.js +0 -65
- package/dist/components/product-properties/index.stories.js +0 -52
- package/dist/components/product-properties/index.style.js +0 -14
- package/dist/components/product-properties/index.test.js +0 -31
- package/dist/components/product-properties/product-property/index.js +0 -49
- package/dist/components/product-properties/product-property/index.style.js +0 -9
- package/dist/components/progress-bar/index.js +0 -46
- package/dist/components/progress-bar/index.stories.js +0 -33
- package/dist/components/responsive/index.js +0 -44
- package/dist/components/show-date/index.js +0 -25
- package/dist/components/show-date/index.stories.js +0 -51
- package/dist/components/show-date/index.test.js +0 -24
- package/dist/components/spacing/core.js +0 -106
- package/dist/components/spacing/index.js +0 -10
- package/dist/components/spacing/margin/index.js +0 -26
- package/dist/components/spacing/padding/index.js +0 -26
- package/dist/components/storybook.css +0 -54
- package/dist/components/table/actionCell.js +0 -57
- package/dist/components/table/index.js +0 -56
- package/dist/components/table/index.stories.js +0 -188
- package/dist/components/table/index.style.js +0 -107
- package/dist/components/table/index.test.js +0 -119
- package/dist/components/table/tableHeaderRow.js +0 -28
- package/dist/components/table/tableRow.js +0 -60
- package/dist/components/table/theme.js +0 -8
- package/dist/components/tabs/index.js +0 -10
- package/dist/components/tabs/index.stories.js +0 -61
- package/dist/components/tabs/index.style.js +0 -35
- package/dist/components/tabs/index.test.js +0 -30
- package/dist/components/tabs/tabPanel.js +0 -17
- package/dist/components/tabs/tabs.js +0 -71
- package/dist/components/tabs/theme.js +0 -10
- package/dist/components/themes.js +0 -97
- package/dist/components/titled-avatar/index.js +0 -48
- package/dist/components/titled-avatar/index.stories.js +0 -52
- package/dist/components/titled-avatar/index.style.js +0 -30
- package/dist/components/titled-avatar/index.test.js +0 -25
- package/dist/components/typography/heading/index.js +0 -59
- package/dist/components/typography/heading/index.stories.js +0 -94
- package/dist/components/typography/heading/index.styles.js +0 -69
- package/dist/components/typography/heading/index.test.js +0 -122
- package/dist/components/typography/index.js +0 -16
- package/dist/components/typography/link/index.js +0 -82
- package/dist/components/typography/link/index.stories.js +0 -70
- package/dist/components/typography/link/index.styles.js +0 -8
- package/dist/components/typography/link/index.test.js +0 -60
- package/dist/components/typography/paragraph/index.js +0 -37
- package/dist/components/typography/paragraph/index.stories.js +0 -56
- package/dist/components/typography/paragraph/index.styles.js +0 -12
- package/dist/components/typography/paragraph/index.test.js +0 -47
- package/dist/components/typography/text/index.js +0 -156
- package/dist/components/typography/text/index.stories.js +0 -196
- package/dist/components/typography/text/index.styles.js +0 -73
- package/dist/components/typography/text/index.test.js +0 -333
- package/dist/components/typography/theme.js +0 -66
- package/dist/components/typography/utils.js +0 -53
- package/dist/components/typography/utils.test.js +0 -188
- package/dist/components/utils/date.js +0 -7
- package/dist/components/utils/date.test.js +0 -15
- package/dist/components/utils/detectMobile.js +0 -15
- package/dist/components/utils/index.js +0 -7
- package/dist/components/utils/media-query.js +0 -12
- package/dist/components/utils/numbers.js +0 -25
- package/dist/components/utils/test.js +0 -6
- package/dist/components/utils/theme.js +0 -67
- package/dist/docs/App.css +0 -33
- package/dist/docs/App.js +0 -52
- package/dist/docs/assets/ads-label.svg +0 -13
- 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 +0 -7
- package/dist/docs/components/header/index.js +0 -10
- package/dist/docs/components/header/index.styles.js +0 -10
- package/dist/docs/components/side-navigation/index.js +0 -167
- package/dist/docs/components/side-navigation/index.styles.js +0 -46
- package/dist/docs/containers/avatar/index.js +0 -92
- package/dist/docs/containers/button/index.js +0 -295
- package/dist/docs/containers/card/index.js +0 -153
- package/dist/docs/containers/cover/index.js +0 -77
- package/dist/docs/containers/form/index.js +0 -41
- package/dist/docs/containers/home/index.js +0 -41
- package/dist/docs/containers/icon/index.js +0 -56
- package/dist/docs/containers/icons/index.js +0 -1488
- package/dist/docs/containers/product/index.js +0 -123
- package/dist/docs/containers/typography/index.js +0 -138
- package/dist/docs/globalStyle.js +0 -58
- package/dist/index.css +0 -3
- package/dist/index.js +0 -18
- package/dist/playground/index.js +0 -144
- package/dist/playground.css +0 -26
- package/dist/serviceWorker.js +0 -135
- package/dist/setupTests.js +0 -24
- package/dist/stories/Page.js +0 -67
- package/dist/storybook.css +0 -58
- package/dist/styles.css +0 -3
- package/dist/test-utils.js +0 -21
- package/doctor-storybook.log +0 -25
- package/migration-storybook.log +0 -329
- package/package.lib.json +0 -75
- package/postcss.config.js +0 -6
- 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 +0 -43
- package/public/logo.svg +0 -1
- package/public/logo142.svg +0 -1
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -2
- package/src/App.js +0 -13
- package/src/components/accordion/index.js +0 -25
- package/src/components/accordion/index.stories.js +0 -82
- package/src/components/accordion/panel.js +0 -41
- package/src/components/avatar/index.js +0 -41
- package/src/components/avatar/index.stories.js +0 -59
- package/src/components/avatar/index.styles.js +0 -17
- package/src/components/avatar/index.test.js +0 -10
- package/src/components/avatar/theme.js +0 -13
- package/src/components/button/__snapshots__/index.test.js.snap +0 -489
- package/src/components/button/index.js +0 -209
- package/src/components/button/index.stories.js +0 -304
- package/src/components/button/index.styles.js +0 -104
- package/src/components/button/theme.js +0 -60
- package/src/components/button/utils.js +0 -12
- package/src/components/card/card-template/index.js +0 -74
- package/src/components/card/card-template/index.stories.js +0 -110
- package/src/components/card/card-template/index.style.js +0 -25
- package/src/components/card/card-template/index.test.js +0 -85
- package/src/components/card/event-card/constants.js +0 -3
- package/src/components/card/event-card/event-card-label/index.js +0 -24
- package/src/components/card/event-card/event-card-label/index.style.js +0 -10
- package/src/components/card/event-card/event-card-label/index.test.js +0 -23
- package/src/components/card/event-card/index.js +0 -227
- package/src/components/card/event-card/index.stories.js +0 -166
- package/src/components/card/event-card/index.style.js +0 -129
- package/src/components/card/event-card/index.test.js +0 -79
- package/src/components/card/index.js +0 -16
- package/src/components/card/organization-card/index.js +0 -59
- package/src/components/card/organization-card/index.stories.js +0 -49
- package/src/components/card/organization-card/index.style.js +0 -10
- package/src/components/card/organization-card/index.test.js +0 -25
- package/src/components/card/orgnizer-card/buttons.js +0 -48
- package/src/components/card/orgnizer-card/index.js +0 -179
- package/src/components/card/orgnizer-card/index.stories.js +0 -81
- package/src/components/card/orgnizer-card/index.style.js +0 -58
- package/src/components/cover/index.js +0 -74
- package/src/components/cover/index.style.js +0 -48
- package/src/components/cover/index.test.js +0 -25
- package/src/components/display/index.js +0 -42
- package/src/components/display/index.style.js +0 -80
- package/src/components/file-item/fileImgIcon.js +0 -37
- package/src/components/file-item/index.js +0 -101
- package/src/components/file-item/index.stories.js +0 -71
- package/src/components/file-item/index.style.js +0 -31
- package/src/components/file-item/index.test.js +0 -106
- package/src/components/file-item/theme.js +0 -12
- package/src/components/file-item/utils.js +0 -3
- package/src/components/form/captcha/index.js +0 -86
- package/src/components/form/captcha/index.stories.js +0 -42
- package/src/components/form/captcha/index.style.js +0 -38
- package/src/components/form/captcha/index.test.js +0 -31
- package/src/components/form/checkbox/checkbox-option.js +0 -41
- package/src/components/form/checkbox/checkbox.js +0 -54
- package/src/components/form/checkbox/index.js +0 -10
- package/src/components/form/checkbox/index.stories.js +0 -121
- package/src/components/form/checkbox/index.style.js +0 -62
- package/src/components/form/dropdown/index.js +0 -10
- package/src/components/form/dropdown/index.stories.js +0 -119
- package/src/components/form/dropdown/index.style.js +0 -57
- package/src/components/form/dropdown/index.test.js +0 -20
- package/src/components/form/dropdown/option.js +0 -22
- package/src/components/form/dropdown/select.js +0 -68
- package/src/components/form/errorMsg.js +0 -21
- package/src/components/form/index.js +0 -22
- package/src/components/form/radio/index.js +0 -10
- package/src/components/form/radio/index.stories.js +0 -119
- package/src/components/form/radio/index.style.js +0 -61
- package/src/components/form/radio/radio-option.js +0 -45
- package/src/components/form/radio/radio.js +0 -56
- package/src/components/form/text-input/index.js +0 -92
- package/src/components/form/text-input/index.stories.js +0 -77
- package/src/components/form/text-input/index.style.js +0 -57
- package/src/components/form/text-input/index.test.js +0 -63
- package/src/components/form/textarea/index.js +0 -59
- package/src/components/form/textarea/index.stories.js +0 -90
- package/src/components/form/textarea/index.style.js +0 -25
- package/src/components/form/theme.js +0 -16
- package/src/components/form-v7/captcha/index.js +0 -101
- package/src/components/form-v7/captcha/index.stories.js +0 -60
- package/src/components/form-v7/captcha/index.style.js +0 -38
- package/src/components/form-v7/captcha/index.test.js +0 -31
- package/src/components/form-v7/checkbox/checkbox-option.js +0 -44
- package/src/components/form-v7/checkbox/checkbox.js +0 -70
- package/src/components/form-v7/checkbox/index.js +0 -10
- package/src/components/form-v7/checkbox/index.stories.js +0 -113
- package/src/components/form-v7/checkbox/index.style.js +0 -62
- package/src/components/form-v7/dropdown/index.js +0 -10
- package/src/components/form-v7/dropdown/index.stories.js +0 -130
- package/src/components/form-v7/dropdown/index.style.js +0 -57
- package/src/components/form-v7/dropdown/index.test.js +0 -20
- package/src/components/form-v7/dropdown/option.js +0 -18
- package/src/components/form-v7/dropdown/select.js +0 -85
- package/src/components/form-v7/errorMsg.js +0 -21
- package/src/components/form-v7/file-input/index.js +0 -73
- package/src/components/form-v7/file-input/index.stories.js +0 -73
- package/src/components/form-v7/file-input/index.style.js +0 -62
- package/src/components/form-v7/file-input/index.test.js +0 -63
- package/src/components/form-v7/form/index.stories.js +0 -276
- package/src/components/form-v7/index.js +0 -25
- package/src/components/form-v7/index.style.js +0 -11
- package/src/components/form-v7/label/index.js +0 -31
- package/src/components/form-v7/label/index.style.js +0 -12
- package/src/components/form-v7/radio/index.js +0 -10
- package/src/components/form-v7/radio/index.stories.js +0 -117
- package/src/components/form-v7/radio/index.style.js +0 -61
- package/src/components/form-v7/radio/radio-option.js +0 -45
- package/src/components/form-v7/radio/radio.js +0 -75
- package/src/components/form-v7/text-input/index.js +0 -132
- package/src/components/form-v7/text-input/index.stories.js +0 -96
- package/src/components/form-v7/text-input/index.style.js +0 -49
- package/src/components/form-v7/text-input/index.test.js +0 -63
- package/src/components/form-v7/textarea/index.js +0 -71
- package/src/components/form-v7/textarea/index.stories.js +0 -91
- package/src/components/form-v7/textarea/index.style.js +0 -25
- package/src/components/form-v7/theme.js +0 -20
- package/src/components/grid/index.js +0 -83
- package/src/components/icon/iconFont.js +0 -806
- package/src/components/icon/index.js +0 -116
- package/src/components/icon/index.stories.js +0 -45
- package/src/components/icon/index.styles.js +0 -12
- package/src/components/icon/index.test.js +0 -66
- package/src/components/icon/theme.js +0 -23
- package/src/components/index.js +0 -75
- package/src/components/modal/index.js +0 -100
- package/src/components/modal/index.stories.js +0 -86
- package/src/components/modal/index.style.js +0 -40
- package/src/components/modal/theme.js +0 -11
- package/src/components/numeric-summery-report/index.js +0 -28
- package/src/components/numeric-summery-report/index.stories.js +0 -37
- package/src/components/numeric-summery-report/index.style.js +0 -16
- package/src/components/numeric-summery-report/index.test.js +0 -22
- package/src/components/product-menu/index.js +0 -10
- package/src/components/product-menu/index.stories.js +0 -33
- package/src/components/product-menu/index.style.js +0 -38
- package/src/components/product-menu/index.test.js +0 -27
- package/src/components/product-menu/menu-item.js +0 -23
- package/src/components/product-menu/menu.js +0 -88
- package/src/components/product-menu/theme.js +0 -16
- package/src/components/product-owner/index.js +0 -85
- package/src/components/product-owner/index.style.js +0 -16
- package/src/components/product-owner/index.test.js +0 -75
- package/src/components/product-properties/index.js +0 -65
- package/src/components/product-properties/index.stories.js +0 -52
- package/src/components/product-properties/index.style.js +0 -14
- package/src/components/product-properties/index.test.js +0 -31
- package/src/components/product-properties/product-property/index.js +0 -49
- package/src/components/product-properties/product-property/index.style.js +0 -9
- package/src/components/progress-bar/index.js +0 -46
- package/src/components/progress-bar/index.stories.js +0 -33
- package/src/components/progress-bar/index.styles.js +0 -65
- package/src/components/responsive/index.js +0 -44
- package/src/components/show-date/index.js +0 -25
- package/src/components/show-date/index.stories.js +0 -51
- package/src/components/show-date/index.style.js +0 -1
- package/src/components/show-date/index.test.js +0 -24
- package/src/components/spacing/core.js +0 -106
- package/src/components/spacing/index.js +0 -10
- package/src/components/spacing/margin/index.js +0 -26
- package/src/components/spacing/padding/index.js +0 -26
- package/src/components/storybook.css +0 -54
- package/src/components/table/actionCell.js +0 -57
- package/src/components/table/index.js +0 -56
- package/src/components/table/index.stories.js +0 -188
- package/src/components/table/index.test.js +0 -119
- package/src/components/table/tableHeaderRow.js +0 -28
- package/src/components/table/tableRow.js +0 -60
- package/src/components/table/theme.js +0 -8
- package/src/components/tabs/index.js +0 -10
- package/src/components/tabs/index.stories.js +0 -61
- package/src/components/tabs/index.style.js +0 -35
- package/src/components/tabs/index.test.js +0 -30
- package/src/components/tabs/tabPanel.js +0 -17
- package/src/components/tabs/tabs.js +0 -71
- package/src/components/tabs/theme.js +0 -10
- package/src/components/themes.js +0 -97
- package/src/components/titled-avatar/index.js +0 -48
- package/src/components/titled-avatar/index.stories.js +0 -52
- package/src/components/titled-avatar/index.style.js +0 -30
- package/src/components/titled-avatar/index.test.js +0 -25
- package/src/components/typography/heading/index.js +0 -59
- package/src/components/typography/heading/index.stories.js +0 -94
- package/src/components/typography/heading/index.styles.js +0 -69
- package/src/components/typography/heading/index.test.js +0 -122
- package/src/components/typography/index.js +0 -16
- package/src/components/typography/index.styles.js +0 -1
- package/src/components/typography/link/index.js +0 -82
- package/src/components/typography/link/index.stories.js +0 -70
- package/src/components/typography/link/index.styles.js +0 -8
- package/src/components/typography/link/index.test.js +0 -60
- package/src/components/typography/paragraph/index.js +0 -37
- package/src/components/typography/paragraph/index.stories.js +0 -56
- package/src/components/typography/paragraph/index.styles.js +0 -12
- package/src/components/typography/paragraph/index.test.js +0 -47
- package/src/components/typography/text/index.js +0 -156
- package/src/components/typography/text/index.stories.js +0 -196
- package/src/components/typography/text/index.styles.js +0 -73
- package/src/components/typography/text/index.test.js +0 -333
- package/src/components/typography/theme.js +0 -66
- package/src/components/typography/utils.js +0 -53
- package/src/components/typography/utils.test.js +0 -188
- package/src/components/utils/date.js +0 -7
- package/src/components/utils/date.test.js +0 -15
- package/src/components/utils/detectMobile.js +0 -15
- package/src/components/utils/index.js +0 -7
- package/src/components/utils/media-query.js +0 -12
- package/src/components/utils/numbers.js +0 -25
- package/src/components/utils/test.js +0 -6
- package/src/components/utils/theme.js +0 -67
- package/src/docs/App.css +0 -33
- package/src/docs/App.js +0 -52
- package/src/docs/assets/ads-label.svg +0 -13
- 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 +0 -7
- package/src/docs/components/header/index.js +0 -10
- package/src/docs/components/header/index.styles.js +0 -10
- package/src/docs/components/side-navigation/index.js +0 -167
- package/src/docs/components/side-navigation/index.styles.js +0 -46
- package/src/docs/containers/avatar/index.js +0 -92
- package/src/docs/containers/button/index.js +0 -295
- package/src/docs/containers/card/index.js +0 -153
- package/src/docs/containers/cover/index.js +0 -77
- package/src/docs/containers/form/index.js +0 -41
- package/src/docs/containers/home/index.js +0 -41
- package/src/docs/containers/icon/index.js +0 -56
- package/src/docs/containers/icons/index.js +0 -1488
- package/src/docs/containers/product/index.js +0 -123
- package/src/docs/containers/typography/index.js +0 -138
- package/src/docs/globalStyle.js +0 -58
- package/src/index.css +0 -3
- package/src/index.js +0 -18
- package/src/playground/index.js +0 -144
- package/src/playground.css +0 -26
- package/src/serviceWorker.js +0 -135
- package/src/setupTests.js +0 -24
- package/src/stories/Page.jsx +0 -67
- package/src/storybook.css +0 -58
- package/src/styles.css +0 -3
- package/src/test-utils.js +0 -21
- package/storybook.log +0 -113
- package/tailwind.config.js +0 -26
- package/update-stories.js +0 -41
- /package/{dist/components/show-date → show-date}/index.style.js +0 -0
- /package/{dist/components/typography → typography}/index.styles.js +0 -0
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Button from './index';
|
|
3
|
-
// import '../storybook.css';
|
|
4
|
-
import { Text } from '../typography';
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Button',
|
|
8
|
-
component: Button,
|
|
9
|
-
argTypes: {
|
|
10
|
-
size: {
|
|
11
|
-
control: 'select',
|
|
12
|
-
options: ['sm', 'md', 'lg', 'xs'],
|
|
13
|
-
defaultValue: 'md',
|
|
14
|
-
},
|
|
15
|
-
icon: {
|
|
16
|
-
control: 'select',
|
|
17
|
-
options: ['warning', 'arrow-down-on-square', 'bell-alert', 'help'],
|
|
18
|
-
defaultValue: undefined,
|
|
19
|
-
},
|
|
20
|
-
wide: {
|
|
21
|
-
control: 'boolean',
|
|
22
|
-
defaultValue: false,
|
|
23
|
-
},
|
|
24
|
-
disabled: {
|
|
25
|
-
control: 'boolean',
|
|
26
|
-
defaultValue: false,
|
|
27
|
-
},
|
|
28
|
-
styleType: {
|
|
29
|
-
control: 'select',
|
|
30
|
-
options: ['primary', 'secondary', 'tertiary'],
|
|
31
|
-
defaultValue: 'primary',
|
|
32
|
-
},
|
|
33
|
-
mainColor: {
|
|
34
|
-
control: 'select',
|
|
35
|
-
options: ['red', 'blue', 'green', 'yellow', 'darkBlue', 'gray'],
|
|
36
|
-
defaultValue: 'blue',
|
|
37
|
-
},
|
|
38
|
-
children: {
|
|
39
|
-
control: 'text',
|
|
40
|
-
defaultValue: 'متن زیبای داخل دکمه',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const Template = (args) => <Button {...args} />;
|
|
46
|
-
|
|
47
|
-
export const Default = Template.bind({});
|
|
48
|
-
Default.args = {
|
|
49
|
-
size: 'md',
|
|
50
|
-
styleType: 'primary',
|
|
51
|
-
mainColor: 'blue',
|
|
52
|
-
children: 'متن زیبای داخل دکمه',
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const WithIcon = Template.bind({});
|
|
56
|
-
WithIcon.args = {
|
|
57
|
-
icon: 'watch-later',
|
|
58
|
-
children: 'دکمه با آیکون',
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export const WithSpecificWidth = Template.bind({});
|
|
62
|
-
WithSpecificWidth.args = {
|
|
63
|
-
icon: 'watch-later',
|
|
64
|
-
width: '184px',
|
|
65
|
-
children: 'دکمه با آیکون',
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export const WideButton = Template.bind({});
|
|
69
|
-
WideButton.args = {
|
|
70
|
-
wide: true,
|
|
71
|
-
children: 'دکمهی تمام عرض',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export const ExtraSmall = Template.bind({});
|
|
75
|
-
ExtraSmall.args = {
|
|
76
|
-
size: 'xs',
|
|
77
|
-
children: 'دکمهی خیلی کوچک',
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const Small = Template.bind({});
|
|
81
|
-
Small.args = {
|
|
82
|
-
size: 'sm',
|
|
83
|
-
children: 'دکمهی کوچک',
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const Medium = Template.bind({});
|
|
87
|
-
Medium.args = {
|
|
88
|
-
size: 'md',
|
|
89
|
-
children: 'دکمهی متوسط',
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const Large = Template.bind({});
|
|
93
|
-
Large.args = {
|
|
94
|
-
size: 'lg',
|
|
95
|
-
children: 'دکمهی بزرگ',
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const ExtraSmallWithIcon = Template.bind({});
|
|
99
|
-
ExtraSmallWithIcon.args = {
|
|
100
|
-
size: 'xs',
|
|
101
|
-
icon: 'watch-later',
|
|
102
|
-
children: 'دکمهی خیلی کوچک با آیکون',
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const SmallWithIcon = Template.bind({});
|
|
106
|
-
SmallWithIcon.args = {
|
|
107
|
-
size: 'sm',
|
|
108
|
-
icon: 'watch-later',
|
|
109
|
-
children: 'دکمهی کوچک با آیکون',
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export const MediumWithIcon = Template.bind({});
|
|
113
|
-
MediumWithIcon.args = {
|
|
114
|
-
size: 'md',
|
|
115
|
-
icon: 'watch-later',
|
|
116
|
-
children: 'دکمهی متوسط با آیکون',
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
export const LargeWithIcon = Template.bind({});
|
|
120
|
-
LargeWithIcon.args = {
|
|
121
|
-
size: 'lg',
|
|
122
|
-
icon: 'watch-later',
|
|
123
|
-
children: 'دکمهی بزرگ با آیکون',
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export const Primary = Template.bind({});
|
|
127
|
-
Primary.args = {
|
|
128
|
-
styleType: 'primary',
|
|
129
|
-
children: 'دکمهی دیفالت اولیه',
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export const Secondary = Template.bind({});
|
|
133
|
-
Secondary.args = {
|
|
134
|
-
styleType: 'secondary',
|
|
135
|
-
children: 'دکمهی دیفالت ثانویه',
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export const Tertiary = Template.bind({});
|
|
139
|
-
Tertiary.args = {
|
|
140
|
-
styleType: 'tertiary',
|
|
141
|
-
children: 'دکمهی دیفالت ثالثیه',
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export const PrimaryDisabled = Template.bind({});
|
|
145
|
-
PrimaryDisabled.args = {
|
|
146
|
-
disabled: true,
|
|
147
|
-
children: 'دکمهی دیفالت غیر فعال',
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export const SecondaryDisabled = Template.bind({});
|
|
151
|
-
SecondaryDisabled.args = {
|
|
152
|
-
styleType: 'secondary',
|
|
153
|
-
disabled: true,
|
|
154
|
-
children: 'دکمهی دیفالت ثانویه غیر فعال',
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
export const TertiaryDisabled = Template.bind({});
|
|
158
|
-
TertiaryDisabled.args = {
|
|
159
|
-
styleType: 'tertiary',
|
|
160
|
-
disabled: true,
|
|
161
|
-
children: 'دکمهی دیفالت ثالثیه غیر فعال',
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export const RedPrimary = Template.bind({});
|
|
165
|
-
RedPrimary.args = {
|
|
166
|
-
styleType: 'primary',
|
|
167
|
-
mainColor: 'red',
|
|
168
|
-
children: 'دکمهی قرمز اولیه',
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export const RedSecondary = Template.bind({});
|
|
172
|
-
RedSecondary.args = {
|
|
173
|
-
styleType: 'secondary',
|
|
174
|
-
mainColor: 'red',
|
|
175
|
-
children: 'دکمهی قرمز ثانویه',
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export const RedPrimaryDisabled = Template.bind({});
|
|
179
|
-
RedPrimaryDisabled.args = {
|
|
180
|
-
mainColor: 'red',
|
|
181
|
-
disabled: true,
|
|
182
|
-
children: 'دکمهی قرمز اولیه غیر فعال',
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
export const RedSecondaryDisabled = Template.bind({});
|
|
186
|
-
RedSecondaryDisabled.args = {
|
|
187
|
-
styleType: 'secondary',
|
|
188
|
-
mainColor: 'red',
|
|
189
|
-
disabled: true,
|
|
190
|
-
children: 'دکمهی قرمز ثانویه غیر فعال',
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
export const BluePrimary = Template.bind({});
|
|
194
|
-
BluePrimary.args = {
|
|
195
|
-
styleType: 'primary',
|
|
196
|
-
mainColor: 'blue',
|
|
197
|
-
children: 'دکمهی آبی اولیه',
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export const BlueSecondary = Template.bind({});
|
|
201
|
-
BlueSecondary.args = {
|
|
202
|
-
styleType: 'secondary',
|
|
203
|
-
mainColor: 'blue',
|
|
204
|
-
children: 'دکمهی آبی ثانویه',
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
export const BluePrimaryDisabled = Template.bind({});
|
|
208
|
-
BluePrimaryDisabled.args = {
|
|
209
|
-
mainColor: 'blue',
|
|
210
|
-
disabled: true,
|
|
211
|
-
children: 'دکمهی آبی اولیه غیر فعال',
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
export const BlueSecondaryDisabled = Template.bind({});
|
|
215
|
-
BlueSecondaryDisabled.args = {
|
|
216
|
-
styleType: 'secondary',
|
|
217
|
-
mainColor: 'blue',
|
|
218
|
-
disabled: true,
|
|
219
|
-
children: 'دکمهی آبیه ثانویه غیر فعال',
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
export const GrayPrimary = Template.bind({});
|
|
223
|
-
GrayPrimary.args = {
|
|
224
|
-
styleType: 'primary',
|
|
225
|
-
mainColor: 'gray',
|
|
226
|
-
icon: 'watch-later',
|
|
227
|
-
children: 'دکمهی خاکستری اولیه',
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
export const GreenPrimary = Template.bind({});
|
|
231
|
-
GreenPrimary.args = {
|
|
232
|
-
styleType: 'primary',
|
|
233
|
-
mainColor: 'green',
|
|
234
|
-
children: 'دکمهی سبز اولیه',
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
export const GreenSecondary = Template.bind({});
|
|
238
|
-
GreenSecondary.args = {
|
|
239
|
-
styleType: 'secondary',
|
|
240
|
-
mainColor: 'green',
|
|
241
|
-
children: 'دکمهی سبز ثانویه',
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
export const GreenPrimaryDisabled = Template.bind({});
|
|
245
|
-
GreenPrimaryDisabled.args = {
|
|
246
|
-
mainColor: 'green',
|
|
247
|
-
disabled: true,
|
|
248
|
-
children: 'دکمهی سبز اولیه غیر فعال',
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export const GreenSecondaryDisabled = Template.bind({});
|
|
252
|
-
GreenSecondaryDisabled.args = {
|
|
253
|
-
styleType: 'secondary',
|
|
254
|
-
mainColor: 'green',
|
|
255
|
-
disabled: true,
|
|
256
|
-
children: 'دکمهی سبز ثانویه غیر فعال',
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
export const YellowPrimary = Template.bind({});
|
|
260
|
-
YellowPrimary.args = {
|
|
261
|
-
styleType: 'primary',
|
|
262
|
-
mainColor: 'yellow',
|
|
263
|
-
children: 'دکمهی زرد اولیه',
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
export const YellowSecondary = Template.bind({});
|
|
267
|
-
YellowSecondary.args = {
|
|
268
|
-
styleType: 'secondary',
|
|
269
|
-
mainColor: 'yellow',
|
|
270
|
-
children: 'دکمهی زرد ثانویه',
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
export const YellowPrimaryDisabled = Template.bind({});
|
|
274
|
-
YellowPrimaryDisabled.args = {
|
|
275
|
-
mainColor: 'yellow',
|
|
276
|
-
disabled: true,
|
|
277
|
-
children: 'دکمهی زرد اولیه غیر فعال',
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
export const YellowSecondaryDisabled = Template.bind({});
|
|
281
|
-
YellowSecondaryDisabled.args = {
|
|
282
|
-
styleType: 'secondary',
|
|
283
|
-
mainColor: 'yellow',
|
|
284
|
-
disabled: true,
|
|
285
|
-
children: 'دکمهی زرد ثانویه غیر فعال',
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
export const LinkButton = Template.bind({});
|
|
289
|
-
LinkButton.args = {
|
|
290
|
-
renderLink: (element) => <a href="http://google.com">{element}</a>,
|
|
291
|
-
children: 'لینک به گوگل',
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
export const ExternalLinkButton = Template.bind({});
|
|
295
|
-
ExternalLinkButton.args = {
|
|
296
|
-
linkTo: 'http://google.com',
|
|
297
|
-
children: 'لینک به گوگل',
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export const WithReactNodeChildren = Template.bind({});
|
|
301
|
-
WithReactNodeChildren.args = {
|
|
302
|
-
size: 'md',
|
|
303
|
-
children: <Text color="white">این یک متن تستی است</Text>,
|
|
304
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import Icon from '../icon';
|
|
3
|
-
import { getColorFromName, getHoverColorFromName, getFocusColorFromName } from '../utils/theme';
|
|
4
|
-
|
|
5
|
-
export const BaseButton = styled.button`
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
|
|
10
|
-
width: ${({ width, wide }) => (width ? `${width}` : wide ? '100%' : 'auto')};
|
|
11
|
-
height: ${({ height }) => (height ? `${height}` : 'auto')};
|
|
12
|
-
min-width: ${({ size, theme, width }) => (width ? `${width}` : `${theme.size[size].minWidth}px`)};
|
|
13
|
-
min-height: ${({ size, theme, height }) => (height ? `${height}` : `${theme.size[size].height}px`)};
|
|
14
|
-
|
|
15
|
-
padding: ${({ size, theme }) => theme.size[size].padding};
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
|
|
18
|
-
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
|
|
19
|
-
opacity: ${({ disabled }) => (disabled ? '0.25' : '1')};
|
|
20
|
-
border-radius: ${({ theme }) => `${theme.borderRadius}px`};
|
|
21
|
-
|
|
22
|
-
margin: ${({
|
|
23
|
-
marginRight, marginLeft,
|
|
24
|
-
}) => `0 ${marginRight || 0}px 0 ${marginLeft || 0}px`};
|
|
25
|
-
|
|
26
|
-
&[data-styletype="primary"] {
|
|
27
|
-
border: none;
|
|
28
|
-
background: ${({ theme, mainColor }) => getColorFromName(theme, mainColor)};
|
|
29
|
-
|
|
30
|
-
&:hover {
|
|
31
|
-
transition: all 0.25s;
|
|
32
|
-
background: ${({ theme, mainColor, disabled }) => (!disabled ? getHoverColorFromName(theme, mainColor) : getColorFromName(theme, mainColor))};
|
|
33
|
-
}
|
|
34
|
-
&:active {
|
|
35
|
-
transition: all 0.25s;
|
|
36
|
-
background: ${({ theme, mainColor, disabled }) => (!disabled ? getFocusColorFromName(theme, mainColor) : getColorFromName(theme, mainColor))};
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&[data-styletype="secondary"] {
|
|
41
|
-
border: 1px solid ${({ theme, mainColor }) => getColorFromName(theme, mainColor)};
|
|
42
|
-
background: transparent;
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
border-color: ${({ theme, disabled, mainColor }) => (!disabled ? 'transparent' : getColorFromName(theme, mainColor))};
|
|
46
|
-
transition: all 0.25s;
|
|
47
|
-
background: ${({ theme, mainColor, disabled }) => (!disabled ? getColorFromName(theme, mainColor) : 'transparent')};
|
|
48
|
-
* {
|
|
49
|
-
transition: all 0.25s;
|
|
50
|
-
color: ${({ theme, mainColor, disabled }) => (!disabled ? theme.colors.white : getColorFromName(theme, mainColor))};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
&:active {
|
|
54
|
-
border-color: ${({ theme, disabled, mainColor }) => (!disabled ? 'transparent' : getColorFromName(theme, mainColor))};
|
|
55
|
-
background: ${({ theme, mainColor, disabled }) => (!disabled ? getFocusColorFromName(theme, mainColor) : 'transparent')};
|
|
56
|
-
* {
|
|
57
|
-
transition: all 0.25s;
|
|
58
|
-
color: ${({ theme, mainColor, disabled }) => (!disabled ? theme.colors.white : getColorFromName(theme, mainColor))};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&[data-styletype="tertiary"] {
|
|
64
|
-
border: none;
|
|
65
|
-
background: transparent;
|
|
66
|
-
|
|
67
|
-
&:hover {
|
|
68
|
-
* {
|
|
69
|
-
transition: all 0.25s;
|
|
70
|
-
color: ${({ theme }) => theme.colors.darkBlue400};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
&:active {
|
|
74
|
-
* {
|
|
75
|
-
transition: all 0.25s;
|
|
76
|
-
color: ${({ theme }) => theme.colors.darkBlue800};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
`;
|
|
82
|
-
|
|
83
|
-
export const StyledIcon = styled(Icon)`
|
|
84
|
-
margin-right: 0;
|
|
85
|
-
`;
|
|
86
|
-
|
|
87
|
-
export const ExternalLink = styled.a`
|
|
88
|
-
color: ${({ theme, color }) => getColorFromName(theme, color)};
|
|
89
|
-
text-decoration: none;
|
|
90
|
-
&:hover {
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
}
|
|
93
|
-
&:visited {
|
|
94
|
-
color: ${({ theme, color }) => getColorFromName(theme, color)};
|
|
95
|
-
text-decoration: none;
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
|
|
99
|
-
export const InternalLink = styled.div`
|
|
100
|
-
a {
|
|
101
|
-
color: ${({ theme, color }) => getColorFromName(theme, color)};
|
|
102
|
-
text-decoration: none;
|
|
103
|
-
}
|
|
104
|
-
`;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import defaultTheme from '../themes';
|
|
2
|
-
|
|
3
|
-
const theme = {
|
|
4
|
-
colors: defaultTheme.colors,
|
|
5
|
-
borderRadius: defaultTheme.borderRadius.low,
|
|
6
|
-
};
|
|
7
|
-
const sizes = {
|
|
8
|
-
xs: 'px-2 py-1 text-xs min-h-[24px]',
|
|
9
|
-
sm: 'px-3 py-1 text-xs min-h-[32px]',
|
|
10
|
-
md: 'px-4 py-2 text-sm min-h-[40px]',
|
|
11
|
-
lg: 'px-6 py-3 text-base min-h-[48px]',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// Color mapping to Tailwind colors
|
|
15
|
-
const colorMap = {
|
|
16
|
-
red: {
|
|
17
|
-
base: 'red-600',
|
|
18
|
-
hover: 'red-700',
|
|
19
|
-
active: 'red-800',
|
|
20
|
-
light: 'red-50',
|
|
21
|
-
lighter: 'red-100',
|
|
22
|
-
},
|
|
23
|
-
blue: {
|
|
24
|
-
base: 'secondary',
|
|
25
|
-
hover: 'secondary/90',
|
|
26
|
-
active: 'secondary/80',
|
|
27
|
-
light: 'secondary/10',
|
|
28
|
-
lighter: 'secondary/20',
|
|
29
|
-
},
|
|
30
|
-
green: {
|
|
31
|
-
base: 'green-600',
|
|
32
|
-
hover: 'green-700',
|
|
33
|
-
active: 'green-800',
|
|
34
|
-
light: 'green-50',
|
|
35
|
-
lighter: 'green-100',
|
|
36
|
-
},
|
|
37
|
-
yellow: {
|
|
38
|
-
base: 'yellow-500',
|
|
39
|
-
hover: 'yellow-600',
|
|
40
|
-
active: 'yellow-700',
|
|
41
|
-
light: 'yellow-50',
|
|
42
|
-
lighter: 'yellow-100',
|
|
43
|
-
},
|
|
44
|
-
darkBlue: {
|
|
45
|
-
base: 'main',
|
|
46
|
-
hover: 'main/90',
|
|
47
|
-
active: 'main/80',
|
|
48
|
-
light: 'main/10',
|
|
49
|
-
lighter: 'main/20',
|
|
50
|
-
},
|
|
51
|
-
gray: {
|
|
52
|
-
base: 'gray-600',
|
|
53
|
-
hover: 'gray-700',
|
|
54
|
-
active: 'gray-800',
|
|
55
|
-
light: 'gray-50',
|
|
56
|
-
lighter: 'gray-100',
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export { theme, colorMap, sizes };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { ThemeProvider } from 'styled-components';
|
|
4
|
-
import GlobalStyle from '../../globalStyle';
|
|
5
|
-
import generalTheme from '../../themes';
|
|
6
|
-
import TemplateContainer from './index.style';
|
|
7
|
-
|
|
8
|
-
const CardTemplate = ({
|
|
9
|
-
level = 1,
|
|
10
|
-
hoverToLevel = 1,
|
|
11
|
-
maxWidth = null,
|
|
12
|
-
renderLink = undefined,
|
|
13
|
-
direction = 'vertical',
|
|
14
|
-
background = '',
|
|
15
|
-
children,
|
|
16
|
-
...rest
|
|
17
|
-
}) => {
|
|
18
|
-
const renderContent = () => {
|
|
19
|
-
if (renderLink) {
|
|
20
|
-
return renderLink(
|
|
21
|
-
<TemplateContainer
|
|
22
|
-
maxWidth={maxWidth}
|
|
23
|
-
level={level}
|
|
24
|
-
hoverToLevel={hoverToLevel}
|
|
25
|
-
direction={direction}
|
|
26
|
-
data-test="card-template"
|
|
27
|
-
background={background}
|
|
28
|
-
{...rest}
|
|
29
|
-
>
|
|
30
|
-
{children}
|
|
31
|
-
</TemplateContainer>,
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
return (
|
|
35
|
-
<TemplateContainer
|
|
36
|
-
maxWidth={maxWidth}
|
|
37
|
-
level={level}
|
|
38
|
-
hoverToLevel={hoverToLevel}
|
|
39
|
-
direction={direction}
|
|
40
|
-
data-test="card-template"
|
|
41
|
-
background={background}
|
|
42
|
-
{...rest}
|
|
43
|
-
>
|
|
44
|
-
{children}
|
|
45
|
-
</TemplateContainer>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
return (
|
|
50
|
-
<ThemeProvider theme={generalTheme}>
|
|
51
|
-
<GlobalStyle />
|
|
52
|
-
{renderContent()}
|
|
53
|
-
</ThemeProvider>
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
CardTemplate.propTypes = {
|
|
58
|
-
children: PropTypes.oneOfType([
|
|
59
|
-
PropTypes.arrayOf(PropTypes.node),
|
|
60
|
-
PropTypes.node,
|
|
61
|
-
PropTypes.string,
|
|
62
|
-
]).isRequired,
|
|
63
|
-
level: PropTypes.oneOf([1, 2, 3, 4, 5]),
|
|
64
|
-
hoverToLevel: PropTypes.number,
|
|
65
|
-
maxWidth: PropTypes.oneOfType([
|
|
66
|
-
PropTypes.number,
|
|
67
|
-
PropTypes.string,
|
|
68
|
-
]),
|
|
69
|
-
renderLink: PropTypes.func,
|
|
70
|
-
direction: PropTypes.oneOf(['vertical', 'horizontal']),
|
|
71
|
-
background: PropTypes.string,
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export default CardTemplate;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import CardTemplate from './index';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/Card/CardTemplate',
|
|
6
|
-
component: CardTemplate,
|
|
7
|
-
argTypes: {
|
|
8
|
-
level: {
|
|
9
|
-
control: 'number',
|
|
10
|
-
description: 'The level of the card (1-5)',
|
|
11
|
-
},
|
|
12
|
-
hoverToLevel: {
|
|
13
|
-
control: 'number',
|
|
14
|
-
description: 'The level to hover to',
|
|
15
|
-
},
|
|
16
|
-
direction: {
|
|
17
|
-
control: 'select',
|
|
18
|
-
options: ['vertical', 'horizontal'],
|
|
19
|
-
description: 'The direction of the card content',
|
|
20
|
-
},
|
|
21
|
-
background: {
|
|
22
|
-
control: 'text',
|
|
23
|
-
description: 'The background image URL',
|
|
24
|
-
},
|
|
25
|
-
renderLink: {
|
|
26
|
-
control: 'function',
|
|
27
|
-
description: 'Function to render a link wrapper',
|
|
28
|
-
},
|
|
29
|
-
style: {
|
|
30
|
-
control: 'object',
|
|
31
|
-
description: 'Additional styles to apply',
|
|
32
|
-
},
|
|
33
|
-
children: {
|
|
34
|
-
control: 'text',
|
|
35
|
-
description: 'The content of the card',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const Template = (args) => (
|
|
41
|
-
<CardTemplate {...args}>
|
|
42
|
-
<div style={{ height: '100px' }}>Hello card template.</div>
|
|
43
|
-
</CardTemplate>
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
export const Default = Template.bind({});
|
|
47
|
-
|
|
48
|
-
export const Level2 = Template.bind({});
|
|
49
|
-
Level2.args = {
|
|
50
|
-
level: 2,
|
|
51
|
-
style: { marginTop: '50px' },
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const Level3 = Template.bind({});
|
|
55
|
-
Level3.args = {
|
|
56
|
-
level: 3,
|
|
57
|
-
style: { marginTop: '50px' },
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const Level4 = Template.bind({});
|
|
61
|
-
Level4.args = {
|
|
62
|
-
level: 4,
|
|
63
|
-
style: { marginTop: '50px' },
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const Level5 = Template.bind({});
|
|
67
|
-
Level5.args = {
|
|
68
|
-
level: 5,
|
|
69
|
-
style: { marginTop: '50px' },
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const HoverLevel1To4 = Template.bind({});
|
|
73
|
-
HoverLevel1To4.args = {
|
|
74
|
-
level: 1,
|
|
75
|
-
hoverToLevel: 4,
|
|
76
|
-
style: { marginTop: '50px' },
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const WithLink = Template.bind({});
|
|
80
|
-
WithLink.args = {
|
|
81
|
-
renderLink: (el) => <a href="http://google.com">{el}</a>,
|
|
82
|
-
children: <div style={{ height: '100px' }}>with link to google</div>,
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const VerticalDirection = Template.bind({});
|
|
86
|
-
VerticalDirection.args = {
|
|
87
|
-
direction: 'vertical',
|
|
88
|
-
children: (
|
|
89
|
-
<>
|
|
90
|
-
<div style={{ height: '100px', backgroundColor: 'lightgray' }}>Hello card template.</div>
|
|
91
|
-
<div style={{ height: '100px', backgroundColor: 'oldlace' }}>Hello card template.</div>
|
|
92
|
-
</>
|
|
93
|
-
),
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const HorizontalDirection = Template.bind({});
|
|
97
|
-
HorizontalDirection.args = {
|
|
98
|
-
direction: 'horizontal',
|
|
99
|
-
children: (
|
|
100
|
-
<>
|
|
101
|
-
<div style={{ height: '100px', backgroundColor: 'lightgray' }}>Hello card template.</div>
|
|
102
|
-
<div style={{ height: '100px', backgroundColor: 'oldlace' }}>Hello card template.</div>
|
|
103
|
-
</>
|
|
104
|
-
),
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export const WithBackground = Template.bind({});
|
|
108
|
-
WithBackground.args = {
|
|
109
|
-
background: 'http://static.simpledesktops.com/uploads/desktops/2019/11/08/Jupiter.png',
|
|
110
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const TemplateContainer = styled.section`
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: ${({ direction }) => (direction === 'vertical' ? 'column' : 'row')};
|
|
6
|
-
border-radius: ${({ theme }) => (`${theme.borderRadius.low}px`)};
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
${({ maxWidth }) => (maxWidth ? `max-width: ${maxWidth}px` : '')};
|
|
9
|
-
box-shadow: ${({ theme, level }) => (
|
|
10
|
-
`0 0 ${theme.shadows[level].blur}px ${theme.shadows[level].spread}px rgba(0, 0, 0, ${theme.shadows[level].opacity})`
|
|
11
|
-
)};
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
transition: ${({ theme }) => (`all ${theme.animation.time}s ${theme.animation.method}`)};
|
|
14
|
-
${({ background }) => (background ? `background: url(${background}) bottom left / 142px no-repeat` : '')};
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
${({ theme, level, hoverToLevel }) => (
|
|
18
|
-
hoverToLevel > level
|
|
19
|
-
? `box-shadow: 0 0 ${theme.shadows[hoverToLevel].blur}px ${theme.shadows[hoverToLevel].spread}px rgba(0, 0, 0, ${theme.shadows[hoverToLevel].opacity})`
|
|
20
|
-
: ''
|
|
21
|
-
)};
|
|
22
|
-
}
|
|
23
|
-
`;
|
|
24
|
-
|
|
25
|
-
export default TemplateContainer;
|