├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc.airbnb.js ├── .eslintrc.js ├── .flowconfig ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ └── main.yml ├── .gitignore ├── .node-version ├── .npmignore ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .storybook ├── addons.js ├── config.js └── webpack.config.js ├── .stylelintignore ├── .stylelintrc ├── .yarnrc ├── CHANGELOG.md ├── CODEOWNERS ├── Makefile ├── README.md ├── __mocks__ ├── base64-image-loader.js ├── emptyString.js └── textContentMocks.js ├── assets ├── css │ ├── main.css │ ├── tailwind.css │ └── tailwind.min.css ├── images │ └── app_download │ │ ├── android │ │ ├── download_de.png │ │ ├── download_en.png │ │ ├── download_es.png │ │ ├── download_fr.png │ │ ├── download_it.png │ │ ├── download_ja.png │ │ ├── download_ko.png │ │ ├── download_nl.png │ │ ├── download_pl.png │ │ ├── download_pt.png │ │ ├── download_ru.png │ │ ├── download_th.png │ │ └── download_tr.png │ │ └── ios │ │ ├── download_de.png │ │ ├── download_en.png │ │ ├── download_es.png │ │ ├── download_fr.png │ │ ├── download_it.png │ │ ├── download_ja.png │ │ ├── download_ko.png │ │ ├── download_nl.png │ │ ├── download_pl.png │ │ ├── download_pt.png │ │ ├── download_ru.png │ │ ├── download_th.png │ │ └── download_tr.png ├── scss │ ├── components │ │ ├── _accentHeader.scss │ │ ├── _accordion.scss │ │ ├── _adminBar.scss │ │ ├── _all.scss │ │ ├── _appBadges.scss │ │ ├── _avatar.scss │ │ ├── _bounds.scss │ │ ├── _button.scss │ │ ├── _calendar.scss │ │ ├── _card.scss │ │ ├── _checkbox.scss │ │ ├── _chunk.scss │ │ ├── _dropdown.scss │ │ ├── _flex.scss │ │ ├── _footer.scss │ │ ├── _forms.scss │ │ ├── _gridList.scss │ │ ├── _hscroll.scss │ │ ├── _icon.scss │ │ ├── _infoToggle.scss │ │ ├── _inlineblockList.scss │ │ ├── _loading.scss │ │ ├── _lockedBadge.scss │ │ ├── _modal.scss │ │ ├── _navbar.scss │ │ ├── _popover.scss │ │ ├── _radio.scss │ │ ├── _section.scss │ │ ├── _signup.scss │ │ ├── _stripe.scss │ │ ├── _tabs.scss │ │ ├── _textInput.scss │ │ ├── _toast.scss │ │ ├── _togglePill.scss │ │ ├── _toggleSwitch.scss │ │ ├── _tooltip.scss │ │ └── _typeahead.scss │ ├── helpers │ │ └── _popup.scss │ ├── main.scss │ ├── storybook.scss │ └── util │ │ ├── _color-mappings.scss │ │ └── _vars.scss └── svg │ ├── apple.svg │ ├── connections.svg │ ├── email.svg │ ├── facebook.svg │ ├── google.svg │ ├── host-badge.svg │ ├── loaderSprite.svg │ ├── logo--mSwarm--2color.svg │ ├── logo--script.svg │ ├── member-plus-badge.svg │ ├── message.svg │ ├── notification.svg │ ├── organizer-badge.svg │ └── proDashboard.svg ├── flow-typed ├── api.js ├── design-system.js ├── event-types.js ├── flatpickr.js ├── js-joda.js └── npm │ ├── @alrra │ └── travis-scripts_vx.x.x.js │ ├── @js-joda │ └── core_vx.x.x.js │ ├── @meetup │ ├── swarm-components_vx.x.x.js │ └── swarm-styles_vx.x.x.js │ ├── @storybook │ ├── addon-actions_v3.x.x.js │ ├── addon-actions_vx.x.x.js │ ├── addon-info_vx.x.x.js │ ├── addon-knobs_v3.x.x.js │ ├── addon-knobs_vx.x.x.js │ ├── addon-links_vx.x.x.js │ ├── addon-notes_vx.x.x.js │ ├── addon-options_vx.x.x.js │ ├── addons_vx.x.x.js │ ├── react_v3.x.x.js │ └── react_vx.x.x.js │ ├── autosize_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── babel-core_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── babel-plugin-react-docgen_vx.x.x.js │ ├── babel-plugin-react-intl_vx.x.x.js │ ├── babel-plugin-react-transform_vx.x.x.js │ ├── babel-plugin-transform-class-properties_vx.x.x.js │ ├── babel-plugin-transform-flow-strip-types_vx.x.x.js │ ├── babel-preset-env_vx.x.x.js │ ├── babel-preset-es2015_vx.x.x.js │ ├── babel-preset-flow_vx.x.x.js │ ├── babel-preset-react_vx.x.x.js │ ├── babel-preset-stage-2_vx.x.x.js │ ├── babel-register_v6.x.x.js │ ├── babel-register_vx.x.x.js │ ├── classnames_v2.x.x.js │ ├── coveralls_vx.x.x.js │ ├── css-loader_vx.x.x.js │ ├── downshift_vx.x.x.js │ ├── enzyme-adapter-react-16_vx.x.x.js │ ├── enzyme-to-json_vx.x.x.js │ ├── enzyme_v3.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── eslint-config-prettier_vx.x.x.js │ ├── eslint-import-resolver-webpack_vx.x.x.js │ ├── eslint-loader_vx.x.x.js │ ├── eslint-plugin-flowtype_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-jsx-a11y_vx.x.x.js │ ├── eslint-plugin-meetup_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── file-loader_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── flow-typed_vx.x.x.js │ ├── focus-trap-react_vx.x.x.js │ ├── gh-pages_vx.x.x.js │ ├── husky_vx.x.x.js │ ├── inquirer_vx.x.x.js │ ├── jest_v23.x.x.js │ ├── js-joda_v1.8.x.js │ ├── lint-staged_vx.x.x.js │ ├── meetup-web-mocks_vx.x.x.js │ ├── mwp-app-render_vx.x.x.js │ ├── mwp-config_vx.x.x.js │ ├── mwp-i18n_vx.x.x.js │ ├── node-sass_vx.x.x.js │ ├── npm-run-all_vx.x.x.js │ ├── prettier_v1.x.x.js │ ├── prop-types_v15.x.x.js │ ├── raf-schd_vx.x.x.js │ ├── raf_vx.x.x.js │ ├── raw-loader_vx.x.x.js │ ├── react-flatpickr_vx.x.x.js │ ├── react-helmet_v5.x.x.js │ ├── react-intl_v2.x.x.js │ ├── react-portal_v4.1.x.js │ ├── react-portal_vx.x.x.js │ ├── react-redux_v5.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── react-router_v4.x.x.js │ ├── react-transition-group_v2.x.x.js │ ├── recompose_v0.26.x.js │ ├── redux_v4.x.x.js │ ├── redux_vx.x.x.js │ ├── sass-loader_vx.x.x.js │ ├── storybook-addon-i18n-tools_vx.x.x.js │ ├── storybook-react-router_vx.x.x.js │ ├── style-loader_vx.x.x.js │ ├── stylelint-config-prettier_vx.x.x.js │ ├── swarm-animation_vx.x.x.js │ ├── swarm-constants_vx.x.x.js │ ├── swarm-icons_vx.x.x.js │ ├── swarm-sasstools_vx.x.x.js │ ├── uri-js_vx.x.x.js │ ├── webpack_v4.x.x.js │ └── webpack_vx.x.x.js ├── jest.config.json ├── package.json ├── src ├── AccentHeader.jsx ├── AccentHeader.story.jsx ├── Footer.jsx ├── Hscroll.jsx ├── SignupModal.jsx ├── SignupModal.test.jsx ├── __snapshots__ │ ├── SignupModal.test.jsx.snap │ ├── accentHeader.test.jsx.snap │ ├── footer.test.jsx.snap │ └── hscroll.test.jsx.snap ├── accentHeader.test.jsx ├── footer.story.jsx ├── footer.test.jsx ├── forms │ ├── Button.jsx │ ├── CalendarComponent.jsx │ ├── CharCounter.jsx │ ├── Checkbox.jsx │ ├── ErrorList.jsx │ ├── FieldsetTime.jsx │ ├── InputTime.jsx │ ├── LockedBadge.jsx │ ├── LockedBadge.story.jsx │ ├── LockedBadge.test.jsx │ ├── NumberInput.jsx │ ├── RadioButton.jsx │ ├── RadioButtonGroup.jsx │ ├── Select.jsx │ ├── SelectInput.jsx │ ├── SwarmTextInput.jsx │ ├── TextInput.jsx │ ├── Textarea.jsx │ ├── TimeInput.jsx │ ├── TogglePill.jsx │ ├── ToggleSwitch.jsx │ ├── Typeahead.jsx │ ├── TypeaheadItem.jsx │ ├── __snapshots__ │ │ ├── LockedBadge.test.jsx.snap │ │ ├── button.test.jsx.snap │ │ ├── charCounter.test.jsx.snap │ │ ├── checkbox.test.jsx.snap │ │ ├── errorList.test.jsx.snap │ │ ├── fieldsetTime.test.jsx.snap │ │ ├── inputTime.test.jsx.snap │ │ ├── numberInput.test.jsx.snap │ │ ├── radioButton.test.jsx.snap │ │ ├── radioButtonGroup.test.jsx.snap │ │ ├── select.test.jsx.snap │ │ ├── selectInput.test.jsx.snap │ │ ├── textInput.test.jsx.snap │ │ ├── textarea.test.jsx.snap │ │ ├── timeInput.test.jsx.snap │ │ ├── togglePill.test.jsx.snap │ │ ├── toggleSwitch.test.jsx.snap │ │ └── typeahead.test.jsx.snap │ ├── button.story.jsx │ ├── button.test.jsx │ ├── calendarComponent.story.jsx │ ├── calendarComponent.test.jsx │ ├── charCounter.test.jsx │ ├── checkbox.story.jsx │ ├── checkbox.test.jsx │ ├── errorList.story.jsx │ ├── errorList.test.jsx │ ├── fieldsetTime.test.jsx │ ├── inputTime.story.jsx │ ├── inputTime.test.jsx │ ├── numberInput.story.jsx │ ├── numberInput.test.jsx │ ├── radioButton.story.jsx │ ├── radioButton.test.jsx │ ├── radioButtonGroup.story.jsx │ ├── radioButtonGroup.test.jsx │ ├── redux-form │ │ ├── CalendarComponent.jsx │ │ ├── Checkbox.jsx │ │ ├── NumberInput.jsx │ │ ├── RadioButtonGroup.jsx │ │ ├── RadioButtonGroup.test.jsx │ │ ├── SelectInput.jsx │ │ ├── TextInput.jsx │ │ ├── Textarea.jsx │ │ ├── TimeInput.jsx │ │ ├── TogglePill.jsx │ │ ├── __snapshots__ │ │ │ ├── RadioButtonGroup.test.jsx.snap │ │ │ ├── calendarComponent.test.jsx.snap │ │ │ ├── checkbox.test.jsx.snap │ │ │ ├── numberInput.test.jsx.snap │ │ │ ├── selectInput.test.jsx.snap │ │ │ ├── textInput.test.jsx.snap │ │ │ ├── textarea.test.jsx.snap │ │ │ ├── timeInput.test.jsx.snap │ │ │ └── togglePill.test.jsx.snap │ │ ├── calendarComponent.test.jsx │ │ ├── checkbox.test.jsx │ │ ├── numberInput.test.jsx │ │ ├── selectInput.test.jsx │ │ ├── textInput.test.jsx │ │ ├── textarea.test.jsx │ │ ├── timeInput.test.jsx │ │ └── togglePill.test.jsx │ ├── select.story.jsx │ ├── select.test.jsx │ ├── selectInput.story.jsx │ ├── selectInput.test.jsx │ ├── textInput.story.jsx │ ├── textInput.test.jsx │ ├── textarea.story.jsx │ ├── textarea.test.jsx │ ├── timeInput.test.jsx │ ├── togglePill.test.jsx │ ├── toggleSwitch.story.jsx │ ├── toggleSwitch.test.jsx │ ├── togglepill.story.jsx │ ├── typeahead.story.jsx │ └── typeahead.test.jsx ├── hscroll.story.jsx ├── hscroll.test.jsx ├── interactive │ ├── AccordionPanel.jsx │ ├── AccordionPanelGroup.jsx │ ├── AdminBar.jsx │ ├── AdminBar.story.jsx │ ├── AdminBar.test.jsx │ ├── Dropdown.jsx │ ├── InfoToggle.jsx │ ├── Modal.jsx │ ├── Tabs.jsx │ ├── Toast.jsx │ ├── Toaster.jsx │ ├── Tooltip.jsx │ ├── __snapshots__ │ │ ├── AdminBar.test.jsx.snap │ │ ├── accordionPanel.test.jsx.snap │ │ ├── accordionPanelGroup.test.jsx.snap │ │ ├── toast.test.jsx.snap │ │ └── tooltip.test.jsx.snap │ ├── accordion.story.jsx │ ├── accordionPanel.test.jsx │ ├── accordionPanelGroup.test.jsx │ ├── dropdown.story.jsx │ ├── dropdown.test.jsx │ ├── infoToggle.story.jsx │ ├── infoToggle.test.jsx │ ├── modal.story.jsx │ ├── modal.test.js │ ├── tabs.story.jsx │ ├── tabs.test.jsx │ ├── toast.story.jsx │ ├── toast.test.jsx │ ├── tooltip.story.jsx │ └── tooltip.test.jsx ├── layout │ ├── Bounds.jsx │ ├── Card.jsx │ ├── Chunk.jsx │ ├── Flex.jsx │ ├── FlexItem.jsx │ ├── FormSection.jsx │ ├── GridList.jsx │ ├── InlineBlockList.jsx │ ├── Section.jsx │ ├── SectionTitle.jsx │ ├── Stripe.jsx │ ├── __snapshots__ │ │ ├── bounds.test.jsx.snap │ │ ├── card.test.jsx.snap │ │ ├── chunk.test.jsx.snap │ │ ├── flex.test.jsx.snap │ │ ├── formSection.test.jsx.snap │ │ ├── inlineBlockList.test.jsx.snap │ │ ├── section.test.jsx.snap │ │ └── stripe.test.jsx.snap │ ├── bounds.story.jsx │ ├── bounds.test.jsx │ ├── card.story.jsx │ ├── card.test.jsx │ ├── chunk.story.jsx │ ├── chunk.test.jsx │ ├── flex.story.jsx │ ├── flex.test.jsx │ ├── flexItem.story.jsx │ ├── flexItem.test.jsx │ ├── formSection.story.jsx │ ├── formSection.test.jsx │ ├── gridList.story.jsx │ ├── gridList.test.jsx │ ├── inlineBlockList.story.jsx │ ├── inlineBlockList.test.jsx │ ├── section.story.jsx │ ├── section.test.jsx │ ├── sectionTitle.story.jsx │ ├── sectionTitle.test.jsx │ ├── stripe.story.jsx │ └── stripe.test.jsx ├── media │ ├── AppBadges.jsx │ ├── Avatar.jsx │ ├── AvatarMember.jsx │ ├── Icon.jsx │ ├── Loading.jsx │ ├── __snapshots__ │ │ ├── appBadges.test.jsx.snap │ │ └── loading.test.jsx.snap │ ├── appBadges.story.jsx │ ├── appBadges.test.jsx │ ├── avatar.story.jsx │ ├── avatar.test.js │ ├── avatarmember.story.jsx │ ├── avatarmember.test.js │ ├── icon.story.jsx │ ├── icon.test.jsx │ ├── loading.story.jsx │ └── loading.test.jsx ├── navigation │ ├── Nav.jsx │ ├── Nav.test.jsx │ ├── __snapshots__ │ │ └── Nav.test.jsx.snap │ ├── components │ │ ├── NavItem.jsx │ │ ├── __snapshots__ │ │ │ └── navItems.test.jsx.snap │ │ ├── dashboard │ │ │ ├── DashboardDropdown.jsx │ │ │ ├── DashboardDropdown.test.jsx │ │ │ └── __snapshots__ │ │ │ │ └── DashboardDropdown.test.jsx.snap │ │ ├── groupDraftItem │ │ │ ├── GroupDraftItem.jsx │ │ │ ├── GroupDraftItem.test.jsx │ │ │ └── __snapshots__ │ │ │ │ └── GroupDraftItem.test.jsx.snap │ │ ├── navItems.test.jsx │ │ ├── notifications │ │ │ ├── Notifications.jsx │ │ │ ├── Notifications.test.jsx │ │ │ ├── NotificationsDropdown.jsx │ │ │ ├── NotificationsDropdown.test.jsx │ │ │ └── __snapshots__ │ │ │ │ ├── Notifications.test.jsx.snap │ │ │ │ └── NotificationsDropdown.test.jsx.snap │ │ ├── profile │ │ │ ├── ProfileDropdown.jsx │ │ │ ├── ProfileDropdown.test.jsx │ │ │ └── __snapshots__ │ │ │ │ └── ProfileDropdown.test.jsx.snap │ │ └── search │ │ │ └── NavbarSearch.jsx │ └── nav.story.jsx ├── signupModal.story.jsx ├── types.js └── utils │ ├── a11yPassThrough.js │ ├── bindAll.js │ ├── components │ ├── ConditionalWrap.jsx │ ├── DeprecationWarning.jsx │ ├── FloatingPosition.jsx │ ├── ToggleWrapper.jsx │ ├── __snapshots__ │ │ ├── toggleWrapper.test.jsx.snap │ │ ├── withErrorList.test.jsx.snap │ │ └── withLoading.test.jsx.snap │ ├── floatingPosition.test.jsx │ ├── toggleWrapper.test.jsx │ ├── withErrorList.jsx │ ├── withErrorList.test.jsx │ ├── withLoading.jsx │ ├── withLoading.test.jsx │ ├── withMatchMedia.jsx │ ├── withMatchMedia.story.jsx │ └── withMatchMedia.test.jsx │ ├── decorators.jsx │ ├── designConstants.js │ ├── getSocialLinks.js │ ├── storyComponents.js │ └── testUtils.js ├── tailwind.config.js ├── util ├── jestSystemShim.js ├── sassRelativeImporter.js └── setupTest.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015", 4 | "react", 5 | "flow", 6 | "stage-2" 7 | ], 8 | "plugins": [ 9 | "transform-class-properties", 10 | "react-docgen" 11 | ] 12 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = tab 12 | indent_size = 4 13 | max_line_length = 90 14 | 15 | # We recommend you to keep these unchanged 16 | end_of_line = lf 17 | charset = utf-8 18 | trim_trailing_whitespace = true 19 | insert_final_newline = true 20 | 21 | [*.md] 22 | trim_trailing_whitespace = false 23 | 24 | [*.json] 25 | indent_style = space 26 | 27 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/ 2 | coverage/ 3 | flow-typed/ 4 | infrastructure/ 5 | node_modules/ 6 | svg/ 7 | *.log 8 | tests/ -------------------------------------------------------------------------------- /.eslintrc.airbnb.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | extends: ['airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'], 5 | parserOptions: { 6 | ecmaVersion: 6, 7 | ecmaFeatures: { 8 | jsx: true, 9 | experimentalObjectRestSpread: true, 10 | }, 11 | sourceType: 'module', 12 | }, 13 | env: { 14 | browser: true, 15 | node: true, 16 | jest: true, 17 | jasmine: true, 18 | es6: true, 19 | }, 20 | plugins: ['flowtype', 'react', 'meetup'], 21 | rules: { 22 | 'no-tabs': 0, 23 | }, 24 | }; 25 | 26 | module.exports = config; 27 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | root: true, 3 | parser: 'babel-eslint', 4 | extends: [ 5 | 'eslint:recommended', 6 | 'prettier', 7 | 'prettier/flowtype', 8 | 'prettier/react', 9 | 'plugin:flowtype/recommended', 10 | ], 11 | parserOptions: { 12 | ecmaVersion: 6, 13 | ecmaFeatures: { 14 | jsx: true, 15 | experimentalObjectRestSpread: true, 16 | }, 17 | sourceType: 'module', 18 | }, 19 | env: { 20 | browser: true, 21 | node: true, 22 | jest: true, 23 | jasmine: true, 24 | es6: true, 25 | }, 26 | plugins: ['react', 'flowtype'], 27 | rules: { 28 | 'array-callback-return': 2, 29 | 'comma-dangle': 0, 30 | 'eol-last': 2, 31 | indent: [0, 'tab'], 32 | 'no-console': 0, 33 | 'no-empty-pattern': 2, 34 | 'no-lone-blocks': 2, 35 | 'no-lonely-if': 2, 36 | 'no-multi-spaces': 2, 37 | 'no-negated-condition': 2, 38 | 'no-trailing-spaces': 2, 39 | 'no-unused-vars': [2, { args: 'none' }], 40 | 'no-use-before-define': 2, 41 | 'no-useless-call': 2, 42 | 'no-useless-concat': 2, 43 | 'no-useless-escape': 2, 44 | 'no-var': 2, 45 | 'no-whitespace-before-property': 2, 46 | 'prefer-const': 2, 47 | 'prefer-template': 2, 48 | 'quote-props': [2, 'as-needed'], 49 | 'react/jsx-no-undef': 0, 50 | 'react/jsx-uses-react': 1, 51 | 'react/jsx-uses-vars': 1, 52 | 'react/no-deprecated': 2, 53 | 'react/no-string-refs': 1, 54 | 'react/react-in-jsx-scope': 2, 55 | 'react/jsx-wrap-multilines': 2, 56 | 'react/jsx-boolean-value': 2, 57 | 'react/jsx-equals-spacing': [2, 'never'], 58 | 'react/jsx-no-duplicate-props': 2, 59 | 'react/jsx-pascal-case': 2, 60 | 'react/jsx-uses-react': 2, 61 | semi: 2, 62 | 'space-in-parens': [2, 'never'], 63 | 'spaced-comment': [2, 'always'], 64 | strict: 0, 65 | }, 66 | }; 67 | 68 | module.exports = config; 69 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ./build/* 3 | ./coverage/* 4 | ./node_modules/radium/* 5 | ./node_modules/stylelint/* 6 | .*.json 7 | ./node_modules/radium/* 8 | ./node_modules/@meetup/swarm-components/* 9 | 10 | [include] 11 | 12 | [libs] 13 | 14 | [options] 15 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### Related issues 2 | Fixes PIVOTAL-xxx 3 | 4 | #### Description 5 | 6 | #### Screenshots (if applicable) 7 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: npm 9 | directory: "/" 10 | schedule: 11 | interval: daily 12 | commit-message: 13 | prefix: "chore" 14 | include: "scope" 15 | open-pull-requests-limit: 0 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Runtime data 2 | pids 3 | *.pid 4 | *.seed 5 | 6 | # node-waf configuration 7 | .lock-wscript 8 | 9 | # Dependency directory 10 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 11 | node_modules 12 | 13 | .DS_Store 14 | .sass-cache/ 15 | coverage 16 | lib 17 | .swo 18 | .swp 19 | .*.swp 20 | *.log 21 | .vscode/ 22 | .idea 23 | 24 | # Generated icon library file 25 | /src/media/iconLibrary.story.jsx 26 | 27 | # static build of storybook 28 | .storybook-out 29 | 30 | github_deploy_key 31 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 10.24.1 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Runtime data 2 | pids 3 | *.pid 4 | *.seed 5 | 6 | # node-waf configuration 7 | .lock-wscript 8 | 9 | # Dependency directory 10 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 11 | node_modules 12 | 13 | .DS_Store 14 | coverage 15 | npm-debug.log 16 | .swo 17 | .swp 18 | .*.swp 19 | .npmrc 20 | 21 | # Generated icon library file 22 | /src/media/iconLibrary.story.jsx 23 | 24 | github_deploy_key 25 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 10.24.1 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "useTabs": true, 4 | "semi": true, 5 | "singleQuote": true, 6 | "overrides": [ 7 | { 8 | "files": "assets/scss/**/*.scss", 9 | "options": { 10 | "singleQuote": false, 11 | "trailingComma": "none" 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.storybook/addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-knobs/register'; 2 | import '@storybook/addon-actions/register'; 3 | import '@storybook/addon-notes/register'; 4 | import '@storybook/addon-options/register'; -------------------------------------------------------------------------------- /.storybook/config.js: -------------------------------------------------------------------------------- 1 | import { configure, setAddon } from '@storybook/react'; 2 | import '../assets/scss/storybook.scss'; 3 | import infoAddon from '@storybook/addon-info'; 4 | import { setOptions } from '@storybook/addon-options'; 5 | 6 | import '@meetup/swarm-styles/dist/global.css'; 7 | import '@meetup/swarm-styles/dist/main.css'; 8 | 9 | const componentStories = require.context('../src', true, /\.story\.jsx$/); 10 | 11 | function loadStories() { 12 | componentStories.keys().forEach(componentStories); 13 | } 14 | 15 | setAddon(infoAddon); 16 | 17 | // Storybook runtime configuration 18 | setOptions({ 19 | name: 'Meetup Web Components', 20 | // url the button will take people to 21 | url: 'https://meetup.github.io/swarm-design-system', 22 | showStoriesPanel: true, 23 | showAddonPanel: true, 24 | }); 25 | 26 | configure(loadStories, module); 27 | -------------------------------------------------------------------------------- /.storybook/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | const SCSS_PATH = path.resolve(__dirname, '../assets', 'scss'); 4 | const CSS_PATH = path.resolve(__dirname, '../assets', 'css'); 5 | const SVG_PATH = path.resolve(__dirname, '../assets', 'svg'); 6 | const SRC_PATH = path.resolve(__dirname, '../src'); 7 | const IMG_PATH = path.resolve(__dirname, '../assets', 'images'); 8 | const PLATFORM_PATH = /node_modules\/meetup-web-platform/; 9 | const SWARM_STYLES_PATH = /node_modules\/@meetup\/swarm-styles/; 10 | 11 | module.exports = { 12 | module: { 13 | rules: [ 14 | { 15 | enforce: 'pre', 16 | test: /\.jsx?$/, 17 | loader: 'eslint-loader?{fix:true}', 18 | include: SRC_PATH, 19 | }, 20 | { 21 | test: /\.css$/, 22 | loaders: ['style-loader', 'css-loader'], 23 | include: CSS_PATH, 24 | }, 25 | { 26 | test: /\.scss$/, 27 | loaders: ['style-loader', 'css-loader', 'sass-loader'], 28 | include: SCSS_PATH, 29 | }, 30 | { 31 | test: /\.css$/, 32 | loaders: ['style-loader', 'css-loader'], 33 | include: SWARM_STYLES_PATH, 34 | }, 35 | { 36 | test: /\.svg$/, 37 | loaders: ['file-loader'], 38 | include: SVG_PATH, 39 | }, 40 | { 41 | test: /\.jsx?$/, 42 | loader: 'babel-loader', 43 | include: [SRC_PATH, PLATFORM_PATH], 44 | }, 45 | { 46 | test: /\.(png|jpg|gif)$/, 47 | loader: 'file-loader', 48 | include: [IMG_PATH], 49 | }, 50 | ], 51 | }, 52 | 53 | resolve: { 54 | extensions: ['.js', '.jsx'], 55 | }, 56 | watch: true, 57 | }; 58 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | /assets/scss/storybook.scss -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "mwp-config/stylelint/stylelint-config-base", 4 | "mwp-config/stylelint/stylelint-config-swarmProject", 5 | "stylelint-config-prettier" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.yarnrc: -------------------------------------------------------------------------------- 1 | save-exact true -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @meetup/revenue-guardians 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | CI_BUILD_NUMBER ?= $(USER)-snapshot 2 | VERSION ?= 8.1.$(CI_BUILD_NUMBER) 3 | 4 | version: 5 | @echo $(VERSION) 6 | -------------------------------------------------------------------------------- /__mocks__/base64-image-loader.js: -------------------------------------------------------------------------------- 1 | const base64String = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNyA3YTUgNSAwIDEgMSAxMCAwQTUgNSAwIDAgMSA3IDd6bTUgN2MtNCAwLTkgMy41LTkgNiAwIC44MjguNjU2IDIgMiAyaDE0YzEuMzI4IDAgMi0xLjE3MiAyLTIgMC0yLjUtNS02LTktNnoiLz48L3N2Zz4='; 2 | 3 | module.exports = base64String; 4 | -------------------------------------------------------------------------------- /__mocks__/emptyString.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This module can be used to map certain module names to an empty string in 3 | * Jest if you just want the module to output an empty string 4 | */ 5 | module.exports = ''; 6 | -------------------------------------------------------------------------------- /__mocks__/textContentMocks.js: -------------------------------------------------------------------------------- 1 | export const textContent1 = 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'; 2 | export const textContent2 = 'Classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'; 3 | -------------------------------------------------------------------------------- /assets/css/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind components; 2 | @tailwind utilities; 3 | -------------------------------------------------------------------------------- /assets/images/app_download/android/download_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_de.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_en.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_es.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_fr.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_it.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_ja.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_ko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_ko.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_nl.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_pl.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_pt.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_ru.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_th.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_th.png -------------------------------------------------------------------------------- /assets/images/app_download/android/download_tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/android/download_tr.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_de.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_en.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_es.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_fr.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_it.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_ja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_ja.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_ko.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_ko.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_nl.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_pl.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_pt.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_ru.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_th.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_th.png -------------------------------------------------------------------------------- /assets/images/app_download/ios/download_tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/meetuparchive/meetup-web-components/14ab35de7a7beefb7c48b937afa8b8ceddb6f796/assets/images/app_download/ios/download_tr.png -------------------------------------------------------------------------------- /assets/scss/components/_accentHeader.scss: -------------------------------------------------------------------------------- 1 | .accentHeader, 2 | .accentHeaderWrapper { 3 | padding-bottom: calc(var(--responsive-space) * 2); 4 | } 5 | 6 | .accentHeader { 7 | font-size: $font-size-big2; 8 | position: relative; 9 | 10 | &::after { 11 | background-color: $C_blue; 12 | bottom: 0; 13 | content: ""; 14 | height: 3px; 15 | position: absolute; 16 | width: calc(var(--responsive-space) * 2); 17 | } 18 | 19 | @include atMediaUp(medium) { 20 | font-size: $font-size-title; 21 | } 22 | } 23 | 24 | .accentHeader--left { 25 | &::after { 26 | left: 0; 27 | } 28 | } 29 | 30 | .accentHeader--right { 31 | &::after { 32 | right: 0; 33 | } 34 | } 35 | 36 | .accentHeader--center { 37 | &::after { 38 | left: 50%; 39 | transform: translateX(-50%); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /assets/scss/components/_accordion.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Animation values taken from https://github.com/google/material-design-lite/blob/mdl-1.x/src/_variables.scss 3 | // Maybe we can bring this into `swarm-constants` or `swarm-animation`? 4 | // 5 | .accordionPanel-animator { 6 | overflow: hidden; 7 | transition: height $duration--medium $easing--standard; 8 | will-change: height; 9 | } 10 | 11 | .accordionPanel-animator--collapse { 12 | padding-bottom: 0 !important; 13 | visibility: hidden; 14 | } 15 | 16 | .accordionPanel-label { 17 | @extend %buttonPersonality; 18 | background: inherit; 19 | border: inherit; 20 | padding: 0; 21 | text-align: inherit; 22 | } 23 | 24 | .accordionPanel:focus { 25 | outline: 0; 26 | } 27 | 28 | .accordionPanel-label:focus { 29 | outline: 0; 30 | 31 | .accordionPanel { 32 | @include color-svg($C_black); 33 | font-weight: $W_bold; 34 | position: relative; 35 | 36 | &::after { 37 | background-color: $C_selection; 38 | bottom: -2px; 39 | content: ""; 40 | left: -#{$space-half}; 41 | position: absolute; 42 | right: -#{$space-half}; 43 | top: -1px; 44 | } 45 | } 46 | } 47 | 48 | .accordionPanel-icon { 49 | @extend %buttonPersonality; 50 | } 51 | 52 | .indicator { 53 | transform: rotate(0deg); 54 | transition: transform $duration--short $easing--standard; 55 | } 56 | 57 | .indicator--animateActive { 58 | transform: rotate(180deg); 59 | } 60 | 61 | .accordionPanel-locked { 62 | margin-right: auto; 63 | } 64 | 65 | .accordionPanel-locked-panel-label { 66 | margin-bottom: 5px; 67 | } 68 | 69 | @include atMediaUp(medium) { 70 | .accordionPanel-locked { 71 | align-items: center; 72 | flex-direction: row; 73 | flex-wrap: nowrap; 74 | } 75 | 76 | .accordionPanel-locked-panel-label { 77 | margin-bottom: 0; 78 | margin-right: 16px; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /assets/scss/components/_adminBar.scss: -------------------------------------------------------------------------------- 1 | .groupAdminLinks { 2 | bottom: 0; 3 | padding: var(--space-1); 4 | position: fixed; 5 | right: 0; 6 | z-index: 9999; 7 | } 8 | 9 | .redbar { 10 | background-color: var(--c-red); 11 | width: 100%; 12 | } 13 | 14 | .greenbar { 15 | background-color: var(--c-teal); 16 | width: 100%; 17 | } 18 | -------------------------------------------------------------------------------- /assets/scss/components/_all.scss: -------------------------------------------------------------------------------- 1 | // 2 | // color vars 3 | // 4 | @import "../util/color-mappings"; 5 | @import "../util/vars"; 6 | 7 | // 8 | // Layout 9 | // 10 | @import "bounds"; 11 | @import "chunk"; 12 | @import "flex"; 13 | @import "stripe"; 14 | @import "section"; 15 | @import "hscroll"; 16 | @import "gridList"; 17 | @import "inlineblockList"; 18 | 19 | // 20 | // Animation 21 | // 22 | @import "~swarm-animation/src/constants"; 23 | @import "~swarm-animation/src/fade"; 24 | 25 | // 26 | // Helpers 27 | // 28 | @import "../helpers/popup"; 29 | 30 | // 31 | // UI Components 32 | // 33 | @import "accentHeader"; 34 | @import "appBadges"; 35 | @import "accordion"; 36 | @import "avatar"; 37 | @import "button"; 38 | @import "card"; 39 | @import "calendar"; 40 | @import "checkbox"; 41 | @import "radio"; 42 | @import "dropdown"; 43 | @import "footer"; 44 | @import "forms"; 45 | @import "icon"; 46 | @import "infoToggle"; 47 | @import "loading"; 48 | @import "modal"; 49 | @import "popover"; 50 | @import "tabs"; 51 | @import "toast"; 52 | @import "togglePill"; 53 | @import "toggleSwitch"; 54 | @import "tooltip"; 55 | @import "typeahead"; 56 | @import "navbar"; 57 | @import "signup"; 58 | @import "adminBar"; 59 | @import "lockedBadge"; 60 | @import "textInput"; 61 | -------------------------------------------------------------------------------- /assets/scss/components/_appBadges.scss: -------------------------------------------------------------------------------- 1 | .getTheApp-downloadImage { 2 | max-width: 160px; 3 | } 4 | -------------------------------------------------------------------------------- /assets/scss/components/_bounds.scss: -------------------------------------------------------------------------------- 1 | /*doc 2 | --- 3 | title: Bounds 4 | --- 5 | Used as a non-visual content container that manages content measure. 6 | 7 | Centers children with auto margin, clears floats, applies 8 | padding, and sets a max-width. 9 | */ 10 | 11 | .bounds { 12 | @extend %clearfix; 13 | box-sizing: border-box; 14 | margin-left: auto; 15 | margin-right: auto; 16 | max-width: $bounds; 17 | width: 100%; 18 | } 19 | 20 | .bounds--wide { 21 | max-width: $bounds-wide; 22 | } 23 | -------------------------------------------------------------------------------- /assets/scss/components/_checkbox.scss: -------------------------------------------------------------------------------- 1 | .checkbox-container { 2 | align-items: center; 3 | display: flex; 4 | 5 | input { 6 | display: none; 7 | } 8 | } 9 | 10 | .checkbox { 11 | align-items: center; 12 | background-color: white; 13 | border: 1px solid $C_secondary; 14 | border-radius: 4px; 15 | box-sizing: border-box; 16 | cursor: pointer; 17 | display: flex; 18 | font-size: $font-size; 19 | height: 20px; 20 | justify-content: center; 21 | line-height: $line-height; 22 | margin: 0 8px 0 0 !important; 23 | width: 20px; 24 | 25 | @include browser-lessThanIE(10) { 26 | top: $space / 2; 27 | } 28 | 29 | &:disabled { 30 | background-color: var(--color-gray-3); 31 | border: 1px solid var(--color-gray-3); 32 | } 33 | } 34 | 35 | .checkbox:focus { 36 | outline: 1px solid black; 37 | } 38 | 39 | [data-swarm-checkbox]:focus-within > span:first-of-type { 40 | box-shadow: 0 0 1px 2px #426b8f !important; 41 | } 42 | -------------------------------------------------------------------------------- /assets/scss/components/_chunk.scss: -------------------------------------------------------------------------------- 1 | /*doc 2 | --- 3 | title: Chunk 4 | --- 5 | Adds bottom space to an element 6 | or a group of elements. 7 | ``` 8 | */ 9 | 10 | %chunk, 11 | .chunk { 12 | @extend %clearfix; 13 | display: block; 14 | padding-bottom: var(--responsive-space) !important; 15 | } 16 | -------------------------------------------------------------------------------- /assets/scss/components/_dropdown.scss: -------------------------------------------------------------------------------- 1 | .dropdownMenu-item { 2 | border-bottom: 1px solid $C_border; 3 | box-sizing: border-box; 4 | cursor: pointer; 5 | justify-content: flex-start; 6 | padding: calc(var(--responsive-space) / 2); 7 | 8 | &:hover, 9 | &:focus { 10 | background-color: $C_coolGrayLight; 11 | } 12 | 13 | &:last-child { 14 | border-bottom: 0; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /assets/scss/components/_footer.scss: -------------------------------------------------------------------------------- 1 | .footerStripe--main, 2 | .footerStripe-legal { 3 | -webkit-font-smoothing: antialiased; 4 | -moz-osx-font-smoothing: grayscale; 5 | } 6 | 7 | .footerStripe-main { 8 | background-color: $C_darkGray; 9 | } 10 | 11 | .footerStripe-main--isLight { 12 | background-color: $C_collectionBG; 13 | } 14 | 15 | .footerList-legal li::after { 16 | content: ""; 17 | 18 | @include atMediaUp(medium) { 19 | content: attr(data-separator); 20 | } 21 | } 22 | 23 | .footerStripe-legal { 24 | background-color: darken($C_darkGray, 03%); 25 | } 26 | 27 | .footerStripe-legal--isLight { 28 | background-color: darken($C_collectionBG, 03%); 29 | } 30 | 31 | .bounds--footer { 32 | max-width: 320px; 33 | 34 | @include atMediaUp(medium) { 35 | max-width: $bounds-wide; 36 | } 37 | } 38 | 39 | .footer-item { 40 | padding-bottom: $space-half; 41 | } 42 | -------------------------------------------------------------------------------- /assets/scss/components/_icon.scss: -------------------------------------------------------------------------------- 1 | @mixin _iconColor($color, $invertedColor) { 2 | @include color-svg($color); 3 | 4 | .inverted & { 5 | @include color-svg($invertedColor); 6 | } 7 | } 8 | 9 | @keyframes spin { 10 | 0% { 11 | transform: rotate(0deg); 12 | } 13 | 14 | 100% { 15 | transform: rotate(360deg); 16 | } 17 | } 18 | 19 | // 20 | // Base icon styles 21 | // 22 | .svg { 23 | // SVG wrapping span 24 | display: inline-block; 25 | } 26 | 27 | .svg-icon { 28 | // SVG element 29 | @include _iconColor($C_svgIcon, $C_svgIconInverted); 30 | display: inline-flex; 31 | font-size: 0; 32 | 33 | // click handling on svg elements 34 | // (ensures the entire element is clickable, not just the drawn bits 35 | position: relative; 36 | vertical-align: bottom; 37 | 38 | use { 39 | pointer-events: none; 40 | } 41 | } 42 | 43 | // 44 | // Icons with enclosing circle 45 | // 46 | .svg--circled { 47 | position: relative; 48 | 49 | &::before { 50 | background-color: $C_lightGray; 51 | border: 1px solid $C_border; 52 | border-radius: 100%; 53 | bottom: 0; 54 | content: ""; 55 | left: 0; 56 | position: absolute; 57 | right: 0; 58 | top: 0; 59 | } 60 | 61 | svg { 62 | transform: scale(0.4); 63 | } 64 | } 65 | 66 | // 67 | // Specific icon shape styles 68 | // 69 | .svg--updates { 70 | animation: spin 400ms linear; 71 | animation-iteration-count: infinite; 72 | transform-origin: center center; 73 | } 74 | -------------------------------------------------------------------------------- /assets/scss/components/_infoToggle.scss: -------------------------------------------------------------------------------- 1 | .infoToggle { 2 | &-trigger { 3 | background-color: var(--c-textSecondary); 4 | border-radius: 50%; 5 | color: var(--c-white); 6 | font-size: 10px; 7 | height: 15px; 8 | width: 15px; 9 | } 10 | &-label { 11 | display: inline-block; 12 | margin-right: var(--space-quarter); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /assets/scss/components/_inlineblockList.scss: -------------------------------------------------------------------------------- 1 | %inlineblockList, 2 | .inlineblockList { 3 | margin: 0; 4 | padding: 0; 5 | 6 | > li { 7 | display: inline-block; 8 | padding-right: var(--responsive-space); 9 | 10 | &:last-child { 11 | padding-right: 0; 12 | } 13 | } 14 | } 15 | 16 | .inlineblockList--separated > li { 17 | padding-right: calc(var(--responsive-space) / 2); 18 | 19 | &::after { 20 | content: attr(data-separator); 21 | padding-left: calc(var(--responsive-space) / 2); 22 | speak: none; 23 | } 24 | 25 | &:last-child { 26 | &::after { 27 | display: none; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/scss/components/_loading.scss: -------------------------------------------------------------------------------- 1 | .loading { 2 | align-items: center; 3 | display: flex; 4 | justify-content: center; 5 | } 6 | 7 | .loading--cover { 8 | bottom: 0; 9 | left: 0; 10 | right: 0; 11 | top: 0; 12 | z-index: var(--zindex-popup); 13 | } 14 | 15 | .loading--partialCover { 16 | position: absolute; 17 | } 18 | 19 | .loading--fullCover { 20 | position: fixed; 21 | } 22 | 23 | .loadingShape { 24 | animation: rotate 1750ms linear infinite; 25 | height: auto; 26 | } 27 | 28 | 29 | .loadingShape-path { 30 | animation: dash 1250ms ease-in-out infinite; 31 | stroke-dasharray: 1,200; 32 | stroke-dashoffset: 0; 33 | stroke-linecap: round; 34 | } 35 | 36 | .component--isLoading { 37 | position: relative; 38 | } 39 | 40 | @keyframes rotate { 41 | 100% { 42 | transform: rotate(360deg); 43 | } 44 | } 45 | 46 | @keyframes dash { 47 | 0% { 48 | stroke-dasharray: 1,200; 49 | stroke-dashoffset: 0; 50 | } 51 | 52 | 50% { 53 | stroke-dasharray: 89,200; 54 | stroke-dashoffset: -35; 55 | } 56 | 57 | 100% { 58 | stroke-dasharray: 89,200; 59 | stroke-dashoffset: -124; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /assets/scss/components/_lockedBadge.scss: -------------------------------------------------------------------------------- 1 | .lockedBadge-container { 2 | border-radius: 8px; 3 | cursor: pointer; 4 | padding: 0; 5 | } 6 | 7 | .lockedBadge-label { 8 | font-size: 14px; 9 | line-height: 1.43; 10 | padding-left: 6px; 11 | } 12 | 13 | .lockedBadge-icon-container { 14 | display: inline-flex; 15 | } 16 | 17 | .lockedBadge-badge { 18 | align-items: center; 19 | display: flex; 20 | padding: 6px 8px; 21 | } 22 | -------------------------------------------------------------------------------- /assets/scss/components/_popover.scss: -------------------------------------------------------------------------------- 1 | /* stylelint-disable */ 2 | // disabling stylelint because this file is going away, 3 | // per https://meetup.atlassian.net/browse/WC-235 4 | // 5 | // Popover 6 | // 7 | $popoverShadow: $interactiveShadow; 8 | $view-minWidth: 320px; 9 | 10 | .popover { 11 | position: relative; 12 | } 13 | 14 | .clickable { 15 | cursor: pointer; 16 | } 17 | 18 | .popover-trigger { 19 | cursor: pointer; 20 | 21 | &--active { 22 | background: $C_selection; 23 | box-shadow: 0 0 0 8px $C_selection; 24 | 25 | &:focus { 26 | outline: 0; 27 | } 28 | } 29 | } 30 | 31 | .popover-container { 32 | background-color: $C_contentBG; 33 | border-radius: $defaultRadius; 34 | box-shadow: $popoverShadow; 35 | box-sizing: border-box; 36 | max-height: $block-6; 37 | max-width: $view-minWidth; 38 | position: absolute; 39 | text-align: left !important; 40 | z-index: 1; 41 | } 42 | 43 | .popover-container--menu { 44 | min-width: $block-4; 45 | } 46 | 47 | .popover-menu-option { 48 | border-top: 1px solid $C_border; 49 | cursor: pointer; 50 | 51 | &:first-child { 52 | border-top: none; 53 | } 54 | 55 | .popover-menu-option-target { 56 | color: $C_textPrimary; 57 | display: block; 58 | padding: $space-half $space; 59 | 60 | &:focus { 61 | background: $C_selection; 62 | outline: 0; 63 | } 64 | } 65 | } 66 | 67 | .popover-container--menu:hover { 68 | .popover-menu-option { 69 | & > a, 70 | & > span, 71 | & > div, 72 | & > button { 73 | &:focus { 74 | background: transparent; 75 | } 76 | 77 | &:hover { 78 | background: $C_selection; 79 | } 80 | } 81 | } 82 | } 83 | 84 | .popover-container--horizontal-left { 85 | right: 0; 86 | } 87 | 88 | .popover-container--horizontal-right { 89 | left: 0; 90 | } 91 | /* stylelint-enable */ 92 | -------------------------------------------------------------------------------- /assets/scss/components/_radio.scss: -------------------------------------------------------------------------------- 1 | .radio-container { 2 | align-items: center; 3 | display: flex; 4 | input { 5 | display: none; 6 | } 7 | } 8 | 9 | .radio { 10 | align-items: center; 11 | border: 1px solid $C_secondary; 12 | border-radius: 50%; 13 | box-sizing: border-box; 14 | cursor: pointer; 15 | display: flex; 16 | height: 19px; 17 | justify-content: center; 18 | margin: 0 $space-half 0 0; 19 | width: 19px; 20 | 21 | @include browser-lessThanIE(10) { 22 | top: $space / 2; 23 | } 24 | 25 | &.checked { 26 | background-color: $C_viridian; 27 | } 28 | &.disabled { 29 | background-color: var(--color-gray-3); 30 | border-color: var(--color-gray-3); 31 | span { 32 | background-color: var(--color-gray-3); 33 | } 34 | } 35 | } 36 | 37 | .radio-indicator { 38 | background-color: white; 39 | display: block; 40 | height: 7px; 41 | width: 7px; 42 | } 43 | -------------------------------------------------------------------------------- /assets/scss/components/_section.scss: -------------------------------------------------------------------------------- 1 | /*doc 2 | --- 3 | title: Section 4 | --- 5 | Used to group sets of related components 6 | into discrete sections by adding padding 7 | around it's children. 8 | */ 9 | 10 | $sectionSpaceMultiple: 2; 11 | 12 | .section { 13 | margin: 0 var(--responsive-space); 14 | padding: calc(var(--responsive-space) * #{$sectionSpaceMultiple}) 0 0 0; 15 | } 16 | 17 | @include _bpModifier(section, hasSeparator) { 18 | border-bottom-width: 0; 19 | padding-bottom: 0; 20 | } 21 | 22 | .section--hasSeparator { 23 | border-bottom: 1px solid $C_border; 24 | padding: calc(var(--responsive-space) * #{$sectionSpaceMultiple}) 0 25 | calc(var(--responsive-space) * #{$sectionSpaceMultiple} - var(--responsive-space)) 26 | 0; 27 | 28 | .inverted & { 29 | border-bottom: 1px solid $C_borderInverted; 30 | } 31 | } 32 | 33 | .section--flush { 34 | margin: 0; 35 | } 36 | 37 | @include _bpModifier(section, flush) { 38 | margin: 0 var(--responsive-space); 39 | } 40 | -------------------------------------------------------------------------------- /assets/scss/components/_signup.scss: -------------------------------------------------------------------------------- 1 | .meetup-signupModal-wrapper { 2 | margin: $space $space-2; 3 | } 4 | 5 | .meetup-signupModal-facebook { 6 | background-color: $C_facebook; 7 | 8 | &:hover { 9 | background-color: $C_facebook; 10 | } 11 | } 12 | 13 | .meetup-signupModal-apple img { 14 | margin: -14px -14px; 15 | } 16 | 17 | .meetup-signupModal-apple div { 18 | align-items: center; 19 | } 20 | 21 | .meetup-signupModal-or { 22 | text-transform: uppercase; 23 | } 24 | -------------------------------------------------------------------------------- /assets/scss/components/_textInput.scss: -------------------------------------------------------------------------------- 1 | .text-input-container { 2 | display: flex !important; 3 | } 4 | 5 | .input-with-currency-label { 6 | border-bottom-right-radius: 0 !important; 7 | border-right: 0 !important; 8 | border-top-right-radius: 0 !important; 9 | margin-bottom: 0; 10 | } 11 | 12 | .currency-label { 13 | align-items: center; 14 | background-color: var(--color-gray-2); 15 | border: 1px solid var(--color-gray-5); 16 | border-bottom-right-radius: 4px; 17 | border-left: 0; 18 | border-top-right-radius: 4px; 19 | display: flex; 20 | font-weight: 500; 21 | justify-items: center; 22 | padding: 0 calc(var(--responsive-space) / 2); 23 | } 24 | 25 | [data-swarm-text-input]:hover + .currency-label { 26 | border-color: var(--color-gray-6); 27 | outline: none; // stylelint-disable-line declaration-property-value-blacklist 28 | } 29 | 30 | [data-swarm-text-input]:focus + .currency-label { 31 | border-color: var(--color-viridian); 32 | outline: none; // stylelint-disable-line declaration-property-value-blacklist 33 | } 34 | 35 | [data-swarm-text-input="disabled"] + .currency-label { 36 | background-color: var(--color-gray-3); 37 | border-color: var(--color-gray-3) !important; 38 | color: var(--color-gray-6); 39 | } 40 | 41 | [data-swarm-text-input="error"] + .currency-label { 42 | border-color: var(--color-alert-red); 43 | } 44 | -------------------------------------------------------------------------------- /assets/scss/components/_toast.scss: -------------------------------------------------------------------------------- 1 | .toaster { 2 | box-sizing: border-box; 3 | position: absolute; 4 | top: 0; 5 | width: 100%; 6 | } 7 | 8 | .toast { 9 | background-color: $C_blue; 10 | box-sizing: border-box; 11 | display: block; 12 | margin-bottom: $space-half; 13 | padding: $space-3 $space; 14 | 15 | @include atMediaUp(large) { 16 | padding: $space-3; 17 | } 18 | } 19 | 20 | .toast--error { 21 | background-color: $C_orange; 22 | } 23 | 24 | .toast--success { 25 | background-color: $C_teal; 26 | } 27 | 28 | .toast-action { 29 | text-decoration: underline; 30 | } 31 | 32 | .toast-dismissBtn { 33 | cursor: pointer; 34 | } 35 | 36 | // 37 | // Toast transitions 38 | // 39 | .slide-appear, 40 | .slide-enter { 41 | opacity: 0.01; 42 | transform: translateY(-100px); 43 | } 44 | 45 | .slide-appear.slide-appear-active, 46 | .slide-enter.slide-enter-active { 47 | opacity: 1; 48 | transform: translateY(0); 49 | transition: opacity $duration--medium $easing--enter, transform $duration--medium $easing--enter; 50 | } 51 | 52 | .slide-exit { 53 | opacity: 1; 54 | transform: translateY(0); 55 | } 56 | 57 | .slide-exit.slide-exit-active { 58 | opacity: 0.01; 59 | transform: translateY(-100px); 60 | transition: opacity $duration--medium $easing--exit, transform $duration--medium $easing--exit; 61 | } 62 | -------------------------------------------------------------------------------- /assets/scss/components/_togglePill.scss: -------------------------------------------------------------------------------- 1 | .toggleButton-icon { 2 | margin-left: $space-half; // relative sizing because icon could be 's' or 'xs' 3 | } 4 | 5 | .toggleButton-label { 6 | @include buttonBase(); 7 | @include standardBorder(all); 8 | @include buttonColor( 9 | $bgColor: transparentize($C_accent, 1), 10 | $hoverColor: transparentize($C_accent, 0.9), 11 | $activeColor: transparentize($C_accent, 0.8), 12 | $textTransition: false 13 | ); 14 | @include color-all($C_accent); 15 | align-items: center; 16 | border-color: $C_accent; 17 | border-radius: 999px; 18 | display: inline-flex; 19 | flex-direction: row; 20 | font-weight: $W_normal; 21 | justify-content: center; 22 | margin: $space-quarter 0; 23 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 24 | 25 | .inverted & { 26 | @include buttonColor( 27 | $bgColor: transparentize($C_lightBlue, 1), 28 | $hoverColor: transparentize($C_lightBlue, 0.75), 29 | $activeColor: transparentize($C_lightBlue, 0.65), 30 | $textTransition: false 31 | ); 32 | @include color-all($C_accent); 33 | border-color: $C_accent; 34 | } 35 | } 36 | 37 | .toggleButton-label--small { 38 | padding: $space-half $space; 39 | } 40 | 41 | .toggleButton-input { 42 | &:checked + .toggleButton-label { 43 | @include buttonColor($bgColor: $C_blue, $textTransition: false); 44 | font-weight: $W_medium; 45 | } 46 | 47 | &:focus + .toggleButton-label { 48 | outline: 1px dotted $C_borderDark; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /assets/scss/components/_toggleSwitch.scss: -------------------------------------------------------------------------------- 1 | .toggleSwitch { 2 | /* stylelint-disable */ 3 | /* stylelint disabling is a temporary solution to override styles from swarm ui */ 4 | &[data-swarm-toggle="unchecked"]:not(:disabled) { 5 | border-color: #707070 !important; 6 | [data-swarm-toggle-switch-disc] { 7 | border-color: inherit; 8 | margin-left: -1px; 9 | margin-top: 0; 10 | svg { 11 | fill: #707070 !important; 12 | } 13 | } 14 | } 15 | 16 | &[data-swarm-toggle="checked"] [data-swarm-toggle-switch-disc] { 17 | border-color: #707070; 18 | margin-top: 0; 19 | } 20 | /* stylelint-enable */ 21 | } 22 | -------------------------------------------------------------------------------- /assets/scss/components/_tooltip.scss: -------------------------------------------------------------------------------- 1 | .tooltip-bubble { 2 | background-color: $C_darkGray; 3 | 4 | &::after { 5 | border-bottom-color: $C_darkGray; 6 | border-top-color: $C_darkGray; 7 | } 8 | } 9 | 10 | .tooltip-closeBtn { 11 | float: right; 12 | padding: 5px !important; 13 | 14 | .svg-icon { 15 | height: 24px; 16 | width: 24px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /assets/scss/components/_typeahead.scss: -------------------------------------------------------------------------------- 1 | .typeahead { 2 | position: relative; 3 | } 4 | 5 | .typeahead-input { 6 | margin-bottom: 0; 7 | } 8 | 9 | .typeahead-dropdown { 10 | background-color: $C_contentBG; 11 | border: 1px solid $C_textPrimary; // match `input` focus border color 12 | border-radius: 0 0 $largeRadius $largeRadius; 13 | left: 0; 14 | // $defaultRadius/2 : equal to the whitespace left around a $defaultRadius rounded corner 15 | // $space-quarter : equal to the bottom margin on an input 16 | // .5px : nudge up a little to hide a remaining subpixel of whitespace 17 | margin-top: -#{$defaultRadius / 2 + $space-quarter + 0.5px}; 18 | position: absolute; 19 | right: 0; 20 | z-index: map-get($zindex-map, "floating-content"); 21 | } 22 | 23 | .typeahead-dropdown--inline { 24 | position: relative; 25 | } 26 | 27 | .typeahead-item { 28 | cursor: pointer; 29 | padding: $space-half $space; 30 | 31 | [type="checkbox"], 32 | [type="radio"], 33 | label { 34 | pointer-events: none; 35 | } 36 | } 37 | 38 | .typeahead-item--isActive { 39 | background-color: $C_coolGrayLightTransp; 40 | } 41 | -------------------------------------------------------------------------------- /assets/scss/main.scss: -------------------------------------------------------------------------------- 1 | @import "~swarm-constants/dist/scss/colors"; 2 | 3 | @import url("//a248.e.akamai.net/secure.meetupstatic.com/s/fonts/402715706936963211631/graphik.css"); 4 | 5 | // sasstools CSS reset 6 | 7 | @import "~swarm-sasstools/scss/reset/all"; 8 | 9 | // all meetup-web-components component partials 10 | 11 | @import "./components/all"; 12 | 13 | // sasstools modifier classes 14 | 15 | @import "~swarm-sasstools/scss/modifierClasses/all"; 16 | 17 | // tailwind 18 | 19 | @import "../css/tailwind.min"; 20 | -------------------------------------------------------------------------------- /assets/scss/storybook.scss: -------------------------------------------------------------------------------- 1 | //storybook styles 2 | html, 3 | body, 4 | #root { 5 | height: 100%; 6 | } 7 | 8 | #root { 9 | display: flex; 10 | align-items: center; 11 | justify-content: center; 12 | 13 | > div { 14 | width: 100%; 15 | } 16 | } 17 | 18 | div[data-reactroot] { 19 | width: 100%; 20 | 21 | div { 22 | width: 100%; 23 | } 24 | } 25 | 26 | // 27 | // SASS BASE FILE 28 | // 29 | // include any additional scss from 30 | // `src/assets/scss/` as sass partials 31 | // 32 | 33 | // webfont 34 | 35 | @import url("//a248.e.akamai.net/secure.meetupstatic.com/s/fonts/402715706936963211631/graphik.css"); 36 | 37 | // sasstools CSS reset 38 | 39 | @import "~swarm-sasstools/scss/reset/all"; 40 | 41 | // all meetup-web-components component partials 42 | 43 | @import "./components/all"; 44 | 45 | // sasstools modifier classes 46 | 47 | @import "~swarm-sasstools/scss/modifierClasses/all"; 48 | 49 | // tailwind 50 | 51 | @import "../css/tailwind.min"; 52 | -------------------------------------------------------------------------------- /assets/scss/util/_color-mappings.scss: -------------------------------------------------------------------------------- 1 | $C_accent: $C_blue; 2 | $C_secondary: #707070; 3 | $C_viridian: #00798a; 4 | $C_meetupRed: #e32359; 5 | 6 | $C_buttonBGNeutral: $C_coolGrayLightTransp; 7 | $C_buttonBGNeutral--disabled: transparentize($C_coolGrayLightTransp, 0.04); 8 | 9 | $C_buttonBGNeutralInverted: $C_borderInverted; 10 | $C_buttonBGNeutralInverted--disabled: transparentize($C_borderInverted, 0.17); 11 | 12 | $C_svgIcon: rgba(46, 62, 72, 0.75); 13 | $C_svgIconInverted: rgba(255, 255, 255, 0.7); 14 | 15 | :root { 16 | --color-meetup-red: #{$C_meetupRed} !important; 17 | --color-viridian: #{$C_viridian} !important; 18 | --color-gray-6: #{$C_secondary} !important; 19 | } 20 | -------------------------------------------------------------------------------- /assets/scss/util/_vars.scss: -------------------------------------------------------------------------------- 1 | // shadow for "interactive" elements, 2 | // like popover or dropdown menus 3 | $interactiveShadow: 0 2px 2px 0 $C_border, 0 3px 1px -2px $C_separator, 4 | 0 1px 5px 0 $C_border; 5 | $animate_easeOutQuad: cubic-bezier( 6 | 0.165, 7 | 0.84, 8 | 0.44, 9 | 1 10 | ); // stylelint-disable-line number-max-precision 11 | -------------------------------------------------------------------------------- /assets/svg/apple.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/svg/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/svg/facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/svg/google.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/svg/host-badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/svg/message.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/svg/notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/svg/proDashboard.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /flow-typed/design-system.js: -------------------------------------------------------------------------------- 1 | // a list of all constants related to design systems 2 | 3 | declare type MediaSizes = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'; 4 | 5 | declare type MediaSizeMap = {| 6 | xxs: '12', 7 | xs: '16', 8 | s: '24', 9 | m: '36', 10 | l: '48', 11 | xl: '72', 12 | xxl: '120', 13 | |}; 14 | 15 | declare type MediaQuerySize = 'small' | 'medium' | 'large' | 'huge'; 16 | 17 | declare type MediaQueryMap = {| 18 | small: 'screen and (min-width: 440px)', 19 | medium: 'screen and (min-width: 640px)', 20 | large: 'screen and (min-width: 840px)', 21 | huge: 'screen and (min-width: 1024px)', 22 | |} -------------------------------------------------------------------------------- /flow-typed/npm/@alrra/travis-scripts_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: febad60289e1b817e6fddff33cc021b8 2 | // flow-typed version: <>/@alrra/travis-scripts_v3.0.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@alrra/travis-scripts' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@alrra/travis-scripts' { 17 | declare module.exports: any; 18 | } 19 | -------------------------------------------------------------------------------- /flow-typed/npm/@meetup/swarm-styles_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3df0ff97861e61cdde3d3addc4a909b6 2 | // flow-typed version: <>/@meetup/swarm-styles_v0.2.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@meetup/swarm-styles' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@meetup/swarm-styles' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@meetup/swarm-styles/lib/styles' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module '@meetup/swarm-styles/lib/styles.js' { 31 | declare module.exports: $Exports<'@meetup/swarm-styles/lib/styles'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/addon-actions_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2f5b0f18c5b5b31b01f63163429685c7 2 | // flow-typed version: 5edd39ab2e/@storybook/addon-actions_v3.x.x/flow_>=v0.25.x 3 | 4 | declare module '@storybook/addon-actions' { 5 | declare type Action = (name: string) => (...args: Array) => void; 6 | declare type DecorateFn = (args: Array) => Array; 7 | 8 | declare module.exports: { 9 | action: Action, 10 | decorateAction(args: Array): Action; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/addon-knobs_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1d070c8c148bbd6cffdd01bd531ba221 2 | // flow-typed version: be6afbe662/@storybook/addon-knobs_v3.x.x/flow_vx.x.x 3 | 4 | declare module "@storybook/addon-knobs/react" { 5 | declare type Renderable = React$Element; 6 | declare type GroupId = string; 7 | 8 | declare function array(string, (Array | {}), ?string, ?GroupId): Array; 9 | declare function boolean(string, boolean, ?GroupId): boolean; 10 | declare function button(string, ((?{}) => void), ?GroupId): void; 11 | declare function color(string, string, ?GroupId): string; 12 | declare function date(string, Date, ?GroupId): Date; 13 | declare function number(string, number, ?{ range?: boolean, min?: number, max?: number, step?: number }, ?GroupId): number; 14 | declare function object(string, any, ?GroupId): any; 15 | declare function select(string, Array | { [T]: string }, T, ?GroupId): T; 16 | declare function selectV2(string, Array | { [string]: T }, T, ?GroupId): T; 17 | declare function text(string, string, ?GroupId): string; 18 | declare function withKnobs(() => Renderable, { kind: string, story: string }): Renderable; 19 | } 20 | -------------------------------------------------------------------------------- /flow-typed/npm/@storybook/react_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c2e1b132d2729c977d6b3e54e0134de5 2 | // flow-typed version: 1709d3212d/@storybook/react_v3.x.x/flow_>=v0.28.x 3 | 4 | type NodeModule = typeof module; 5 | 6 | declare module '@storybook/react' { 7 | declare type Renderable = React$Element; 8 | declare type RenderFunction = () => Renderable; 9 | 10 | declare type StoryDecorator = ( 11 | story: RenderFunction, 12 | context: { kind: string, story: string } 13 | ) => Renderable | null; 14 | 15 | declare interface Story { 16 | add(storyName: string, callback: RenderFunction): Story, 17 | addDecorator(decorator: StoryDecorator): Story, 18 | } 19 | 20 | declare interface StoryObject { 21 | name: string, 22 | render: RenderFunction, 23 | } 24 | 25 | declare interface StoryBucket { 26 | kind: string, 27 | stories: Array, 28 | } 29 | 30 | declare function addDecorator(decorator: StoryDecorator): void; 31 | declare function configure(fn: () => void, module: NodeModule): void; 32 | declare function setAddon(addon: Object): void; 33 | declare function storiesOf(name: string, module: NodeModule): Story; 34 | declare function storiesOf(name: string, module: NodeModule): Story & T; 35 | 36 | declare function getStorybook(): Array; 37 | } 38 | -------------------------------------------------------------------------------- /flow-typed/npm/autosize_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8777ba63a978f18aa373d297421012d1 2 | // flow-typed version: <>/autosize_v3.0.21/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'autosize' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'autosize' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'autosize/dist/autosize' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'autosize/dist/autosize.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'autosize/src/autosize' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'autosize/dist/autosize.js' { 39 | declare module.exports: $Exports<'autosize/dist/autosize'>; 40 | } 41 | declare module 'autosize/dist/autosize.min.js' { 42 | declare module.exports: $Exports<'autosize/dist/autosize.min'>; 43 | } 44 | declare module 'autosize/src/autosize.js' { 45 | declare module.exports: $Exports<'autosize/src/autosize'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c880c47173584f435c1412e4babd6ac1 2 | // flow-typed version: <>/babel-jest_v23.4.2/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-react-intl_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d99adc710547ada3b6f808d1a6d01bc8 2 | // flow-typed version: <>/babel-plugin-react-intl_v2.3.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-react-intl' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-react-intl' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-react-intl/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-react-intl/lib/print-icu-message' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-react-intl/lib/index.js' { 35 | declare module.exports: $Exports<'babel-plugin-react-intl/lib/index'>; 36 | } 37 | declare module 'babel-plugin-react-intl/lib/print-icu-message.js' { 38 | declare module.exports: $Exports<'babel-plugin-react-intl/lib/print-icu-message'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1196524df10fd93c6d26eed35417a975 2 | // flow-typed version: <>/babel-plugin-transform-class-properties_v6.24.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 3befa6518a03bf5215a77d4b0dd33c2d 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v6.22.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-es2015_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f6122ac89f5b5091478b3566552a74b1 2 | // flow-typed version: <>/babel-preset-es2015_v6.24.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-es2015' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-es2015' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-es2015/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-es2015/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-es2015/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-flow_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b456a4b4ed851bbfaf006fab26aea1b7 2 | // flow-typed version: <>/babel-preset-flow_v6.23.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-flow' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-flow' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-flow/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-flow/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-flow/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b4023626de00b4ea48ed31d8c1f3cfa9 2 | // flow-typed version: <>/babel-preset-react_v6.24.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-stage-2_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 087c26838ec8039b19299fdf8ac676fc 2 | // flow-typed version: <>/babel-preset-stage-2_v6.24.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-stage-2' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-stage-2' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-stage-2/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-stage-2/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-stage-2/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-register_v6.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d39f8c42e21629554940dda3bcbe90e6 2 | // flow-typed version: b80967946f/babel-register_v6.x.x/flow_>=v0.30.x 3 | 4 | declare module 'babel-register' { 5 | declare type Options = {| 6 | ast?: boolean, 7 | auxiliaryCommentAfter?: ?string, 8 | auxiliaryCommentBefore?: ?string, 9 | babelrc?: boolean, 10 | code?: boolean, 11 | comments?: boolean, 12 | compact?: 'auto' | boolean, 13 | env?: Object, 14 | extends?: ?string, 15 | filename?: string, 16 | filenameRelative?: string, 17 | generatorOpts?: Object, 18 | getModuleId?: void | null | (moduleName: string) => string, 19 | highlightCode?: boolean, 20 | ignore?: boolean | string | RegExp | (filename: string) => boolean, 21 | inputSourceMap?: Object, 22 | minified?: boolean, 23 | moduleId?: string, 24 | moduleIds?: boolean, 25 | moduleRoot?: string, 26 | only?: RegExp, 27 | parserOpts?: Object, 28 | plugins?: Array<[string, Object] | string>, 29 | presets?: Array, 30 | retainLines?: boolean, 31 | resolveModuleSource?: null | (source: string, filename: string) => boolean, 32 | shouldPrintComment?: null | (commentContents: string) => string, 33 | sourceFileName?: string, 34 | sourceMaps?: boolean | 'inline' | 'both', 35 | sourceMapTarget?: string, 36 | sourceRoot?: string, 37 | sourceType?: 'script' | 'module' | 'unambiguous', 38 | wrapPluginVisitorMethod?: null | (pluginAlias: string, visitorType: string, callback: Function) => boolean, 39 | extensions?: Array, 40 | cache?: boolean, 41 | |}; 42 | 43 | declare module.exports: (options?: Options) => void; 44 | } 45 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-register_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b894da58885f01ea526bf66ef6cb411f 2 | // flow-typed version: <>/babel-register_v6.24.1/flow_v0.74.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-register' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-register' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-register/lib/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-register/lib/cache' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-register/lib/node' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'babel-register/lib/browser.js' { 39 | declare module.exports: $Exports<'babel-register/lib/browser'>; 40 | } 41 | declare module 'babel-register/lib/cache.js' { 42 | declare module.exports: $Exports<'babel-register/lib/cache'>; 43 | } 44 | declare module 'babel-register/lib/node.js' { 45 | declare module.exports: $Exports<'babel-register/lib/node'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/classnames_v2.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: cf86673cc32d185bdab1d2ea90578d37 2 | // flow-typed version: 614bf49aa8/classnames_v2.x.x/flow_>=v0.25.x 3 | 4 | type $npm$classnames$Classes = 5 | | string 6 | | { [className: string]: * } 7 | | false 8 | | void 9 | | null; 10 | 11 | declare module "classnames" { 12 | declare module.exports: ( 13 | ...classes: Array<$npm$classnames$Classes | $npm$classnames$Classes[]> 14 | ) => string; 15 | } 16 | 17 | declare module "classnames/bind" { 18 | declare module.exports: $Exports<"classnames">; 19 | } 20 | 21 | declare module "classnames/dedupe" { 22 | declare module.exports: $Exports<"classnames">; 23 | } 24 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-import-resolver-webpack_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1f513b8b49fd584e76d740ea6154e310 2 | // flow-typed version: <>/eslint-import-resolver-webpack_v0.10.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-import-resolver-webpack' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-import-resolver-webpack' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-import-resolver-webpack/config' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'eslint-import-resolver-webpack/config.js' { 31 | declare module.exports: $Exports<'eslint-import-resolver-webpack/config'>; 32 | } 33 | declare module 'eslint-import-resolver-webpack/index' { 34 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 35 | } 36 | declare module 'eslint-import-resolver-webpack/index.js' { 37 | declare module.exports: $Exports<'eslint-import-resolver-webpack'>; 38 | } 39 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d92166a7bbf7934aa572327b22cbd1f8 2 | // flow-typed version: <>/eslint-loader_v2.1.2/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-loader/index' { 29 | declare module.exports: $Exports<'eslint-loader'>; 30 | } 31 | declare module 'eslint-loader/index.js' { 32 | declare module.exports: $Exports<'eslint-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-meetup_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 17b5486d1f33cd9b6f6fc1242bab7d7c 2 | // flow-typed version: <>/eslint-plugin-meetup_v1.0.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-meetup' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-meetup' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-meetup/lib/rules/trn' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-meetup/tests/lib/rules/trn' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'eslint-plugin-meetup/index' { 35 | declare module.exports: $Exports<'eslint-plugin-meetup'>; 36 | } 37 | declare module 'eslint-plugin-meetup/index.js' { 38 | declare module.exports: $Exports<'eslint-plugin-meetup'>; 39 | } 40 | declare module 'eslint-plugin-meetup/lib/rules/trn.js' { 41 | declare module.exports: $Exports<'eslint-plugin-meetup/lib/rules/trn'>; 42 | } 43 | declare module 'eslint-plugin-meetup/tests/lib/rules/trn.js' { 44 | declare module.exports: $Exports<'eslint-plugin-meetup/tests/lib/rules/trn'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/file-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 13baa6359b79ee5bd20fab5e5d74fd5b 2 | // flow-typed version: <>/file-loader_v1.1.11/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'file-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'file-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'file-loader/dist/cjs' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'file-loader/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'file-loader/dist/cjs.js' { 35 | declare module.exports: $Exports<'file-loader/dist/cjs'>; 36 | } 37 | declare module 'file-loader/dist/index.js' { 38 | declare module.exports: $Exports<'file-loader/dist/index'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/prop-types_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d9a983bb1ac458a256c31c139047bdbb 2 | // flow-typed version: 927687984d/prop-types_v15.x.x/flow_>=v0.41.x 3 | 4 | type $npm$propTypes$ReactPropsCheckType = ( 5 | props: any, 6 | propName: string, 7 | componentName: string, 8 | href?: string) => ?Error; 9 | 10 | declare module 'prop-types' { 11 | declare var array: React$PropType$Primitive>; 12 | declare var bool: React$PropType$Primitive; 13 | declare var func: React$PropType$Primitive; 14 | declare var number: React$PropType$Primitive; 15 | declare var object: React$PropType$Primitive; 16 | declare var string: React$PropType$Primitive; 17 | declare var symbol: React$PropType$Primitive; 18 | declare var any: React$PropType$Primitive; 19 | declare var arrayOf: React$PropType$ArrayOf; 20 | declare var element: React$PropType$Primitive; /* TODO */ 21 | declare var instanceOf: React$PropType$InstanceOf; 22 | declare var node: React$PropType$Primitive; /* TODO */ 23 | declare var objectOf: React$PropType$ObjectOf; 24 | declare var oneOf: React$PropType$OneOf; 25 | declare var oneOfType: React$PropType$OneOfType; 26 | declare var shape: React$PropType$Shape; 27 | 28 | declare function checkPropTypes( 29 | propTypes: $Subtype<{[_: $Keys]: $npm$propTypes$ReactPropsCheckType}>, 30 | values: V, 31 | location: string, 32 | componentName: string, 33 | getStack: ?(() => ?string) 34 | ) : void; 35 | } 36 | -------------------------------------------------------------------------------- /flow-typed/npm/raf-schd_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b77d5a7eb759add07179547ff6fa7a2a 2 | // flow-typed version: <>/raf-schd_v2.1.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'raf-schd' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'raf-schd' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'raf-schd/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'raf-schd/lib/index.js' { 31 | declare module.exports: $Exports<'raf-schd/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/raf_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f8a5495565a54ffd316e54faf4c358ed 2 | // flow-typed version: <>/raf_v3.4.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'raf' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'raf' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'raf/polyfill' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'raf/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'raf/window' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'raf/index' { 39 | declare module.exports: $Exports<'raf'>; 40 | } 41 | declare module 'raf/index.js' { 42 | declare module.exports: $Exports<'raf'>; 43 | } 44 | declare module 'raf/polyfill.js' { 45 | declare module.exports: $Exports<'raf/polyfill'>; 46 | } 47 | declare module 'raf/test.js' { 48 | declare module.exports: $Exports<'raf/test'>; 49 | } 50 | declare module 'raf/window.js' { 51 | declare module.exports: $Exports<'raf/window'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/raw-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7f4451cbef40910ee211379135fa8c22 2 | // flow-typed version: <>/raw-loader_v0.5.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'raw-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'raw-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'raw-loader/index' { 29 | declare module.exports: $Exports<'raw-loader'>; 30 | } 31 | declare module 'raw-loader/index.js' { 32 | declare module.exports: $Exports<'raw-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/react-flatpickr_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 92e39d5169cbe963ceef76b96fceec6f 2 | // flow-typed version: <>/react-flatpickr_v3.6.4/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-flatpickr' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-flatpickr' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-flatpickr/build/example' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-flatpickr/build/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-flatpickr/lib/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'react-flatpickr/build/example.js' { 39 | declare module.exports: $Exports<'react-flatpickr/build/example'>; 40 | } 41 | declare module 'react-flatpickr/build/index.js' { 42 | declare module.exports: $Exports<'react-flatpickr/build/index'>; 43 | } 44 | declare module 'react-flatpickr/lib/index.js' { 45 | declare module.exports: $Exports<'react-flatpickr/lib/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/react-helmet_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: afa3502910d5b2aef93707cc683f52b8 2 | // flow-typed version: 492c298a82/react-helmet_v5.x.x/flow_>=v0.53.x 3 | 4 | declare module 'react-helmet' { 5 | declare type Props = { 6 | base?: Object, 7 | bodyAttributes?: Object, 8 | children?: React$Node, 9 | defaultTitle?: string, 10 | defer?: boolean, 11 | encodeSpecialCharacters?: boolean, 12 | htmlAttributes?: Object, 13 | link?: Array, 14 | meta?: Array, 15 | noscript?: Array, 16 | onChangeClientState?: ( 17 | newState?: Object, 18 | addedTags?: Object, 19 | removeTags?: Object 20 | ) => any, 21 | script?: Array, 22 | style?: Array, 23 | title?: string, 24 | titleAttributes?: Object, 25 | titleTemplate?: string, 26 | } 27 | 28 | declare interface TagMethods { 29 | toString(): string; 30 | toComponent(): [React$Element<*>] | React$Element<*> | Array; 31 | } 32 | 33 | declare interface AttributeTagMethods { 34 | toString(): string; 35 | toComponent(): {[string]: *}; 36 | } 37 | 38 | declare interface StateOnServer { 39 | base: TagMethods; 40 | bodyAttributes: AttributeTagMethods, 41 | htmlAttributes: AttributeTagMethods; 42 | link: TagMethods; 43 | meta: TagMethods; 44 | noscript: TagMethods; 45 | script: TagMethods; 46 | style: TagMethods; 47 | title: TagMethods; 48 | } 49 | 50 | declare class Helmet extends React$Component { 51 | static rewind(): StateOnServer; 52 | static renderStatic(): StateOnServer; 53 | static canUseDom(canUseDOM: boolean): void; 54 | } 55 | 56 | declare export default typeof Helmet 57 | declare export var Helmet: typeof Helmet 58 | } 59 | 60 | -------------------------------------------------------------------------------- /flow-typed/npm/react-portal_v4.1.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 288bf61535247baaec569a9566b1aa60 2 | // flow-typed version: 5e634ef02e/react-portal_v4.1.x/flow_>=v0.53.x 3 | 4 | declare module 'react-portal' { 5 | declare type PortalProps = { 6 | children: React$Node, 7 | node?: Element | null, 8 | }; 9 | 10 | declare class Portal extends React$Component {} 11 | 12 | declare type RenderFunctionParams = { 13 | openPortal: (event?: SyntheticEvent<>) => void, 14 | closePortal: () => void, 15 | portal: (children: React$Node) => React$Element, 16 | isOpen: boolean, 17 | }; 18 | 19 | declare type PortalWithStateProps = { 20 | children: (params: RenderFunctionParams) => React$Node, 21 | node?: Element | null, 22 | defaultOpen?: boolean, 23 | closeOnEsc?: boolean, 24 | closeOnOutsideClick?: boolean, 25 | onOpen?: () => void, 26 | onClose?: () => void, 27 | }; 28 | 29 | declare class PortalWithState extends React$Component {} 30 | 31 | declare module.exports: { 32 | Portal: typeof Portal, 33 | PortalWithState: typeof PortalWithState, 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /flow-typed/npm/storybook-react-router_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 8d57a9fdb289639c587c80488eb35577 2 | // flow-typed version: <>/storybook-react-router_v1.0.1/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'storybook-react-router' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'storybook-react-router' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'storybook-react-router/dist/react' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'storybook-react-router/react' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'storybook-react-router/dist/react.js' { 35 | declare module.exports: $Exports<'storybook-react-router/dist/react'>; 36 | } 37 | declare module 'storybook-react-router/react.js' { 38 | declare module.exports: $Exports<'storybook-react-router/react'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/stylelint-config-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 66b6d0aa915e5e88763315c3b1e8489d 2 | // flow-typed version: <>/stylelint-config-prettier_v3.3.0/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'stylelint-config-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'stylelint-config-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'stylelint-config-prettier/bin/check' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'stylelint-config-prettier/src/checker' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'stylelint-config-prettier/src/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'stylelint-config-prettier/bin/check.js' { 39 | declare module.exports: $Exports<'stylelint-config-prettier/bin/check'>; 40 | } 41 | declare module 'stylelint-config-prettier/src/checker.js' { 42 | declare module.exports: $Exports<'stylelint-config-prettier/src/checker'>; 43 | } 44 | declare module 'stylelint-config-prettier/src/index.js' { 45 | declare module.exports: $Exports<'stylelint-config-prettier/src/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/swarm-sasstools_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: aa96d350cd2749b23927140ff60a572a 2 | // flow-typed version: <>/swarm-sasstools_v^5.0.425/flow_v0.76.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'swarm-sasstools' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'swarm-sasstools' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'swarm-sasstools/docs/templates/assets/pushy.min' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'swarm-sasstools/Gruntfile' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'swarm-sasstools/webpack.config' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'swarm-sasstools/docs/templates/assets/pushy.min.js' { 39 | declare module.exports: $Exports<'swarm-sasstools/docs/templates/assets/pushy.min'>; 40 | } 41 | declare module 'swarm-sasstools/Gruntfile.js' { 42 | declare module.exports: $Exports<'swarm-sasstools/Gruntfile'>; 43 | } 44 | declare module 'swarm-sasstools/webpack.config.js' { 45 | declare module.exports: $Exports<'swarm-sasstools/webpack.config'>; 46 | } 47 | -------------------------------------------------------------------------------- /jest.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "collectCoverageFrom": [ 3 | "src/**/*.{js,jsx}", 4 | "!**/{node_modules,lib,coverage,assets,utils}/**", 5 | "!**/*.story.{js,jsx}" 6 | ], 7 | "coverageDirectory": "/coverage", 8 | "setupFiles": [ 9 | "/util/setupTest.js" 10 | ], 11 | "moduleFileExtensions": [ 12 | "js", 13 | "jsx" 14 | ], 15 | "moduleNameMapper": { 16 | "\\.(ico|inc|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/emptyString.js" 17 | }, 18 | "testRegex": "src/.*\\.test\\.jsx?$", 19 | "transformIgnorePatterns": [ 20 | "node_modules(?!\/meetup-web-components)" 21 | ], 22 | "snapshotSerializers": [ 23 | "/node_modules/enzyme-to-json/serializer" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /src/AccentHeader.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import cx from 'classnames'; 4 | 5 | export const ALIGN_VALUES = ['left', 'right', 'center']; 6 | 7 | const AccentHeader = ({ align, headingTag, children, className, ...other }) => { 8 | const HeadingTagEl = headingTag; 9 | return ( 10 |
11 | 20 | {children} 21 | 22 |
23 | ); 24 | }; 25 | 26 | AccentHeader.defaultProps = { 27 | align: 'left', 28 | headingTag: 'h2', 29 | }; 30 | 31 | AccentHeader.propTypes = { 32 | /** Controls text alignment */ 33 | align: PropTypes.oneOf(ALIGN_VALUES), 34 | 35 | /** Which level of HTML heading tag to use */ 36 | headingTag: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']), 37 | }; 38 | 39 | export default AccentHeader; 40 | -------------------------------------------------------------------------------- /src/AccentHeader.story.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { decorateWithInfo } from './utils/decorators'; 3 | import { storiesOf } from '@storybook/react'; 4 | 5 | import AccentHeader from './AccentHeader'; 6 | 7 | storiesOf('Uncategorized/AccentHeader', module) 8 | .addDecorator(decorateWithInfo) 9 | .add('default', () => ( 10 |
11 | I have something to say 12 |

This text is evenly spaced from the border

13 |
14 | )) 15 | .add('right-aligned', () => ( 16 |
17 | I have something to say 18 |

This text is evenly spaced from the border

19 |
20 | )) 21 | .add('center-aligned', () => ( 22 |
23 | I have something to say 24 |

This text is evenly spaced from the border

25 |
26 | )) 27 | .add('custom heading tag', () => ( 28 |
29 | I'm wrapped in h1 30 |

This text is evenly spaced from the border

31 |
32 | )); 33 | -------------------------------------------------------------------------------- /src/Hscroll.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import React from 'react'; 3 | import cx from 'classnames'; 4 | import rafSchedule from 'raf-schd'; 5 | 6 | export const HIDE_GRADIENT_CLASSNAME = 'hscrollGradient--hidden'; 7 | 8 | export const VALID_BREAKPOINTS = { 9 | medium: 'atMedium', 10 | large: 'atLarge', 11 | }; 12 | 13 | /** 14 | * Horizontal Scroll 15 | * @module Hscroll 16 | */ 17 | class Hscroll extends React.PureComponent { 18 | constructor(props) { 19 | super(props); 20 | this.onScroll = this.onScroll.bind(this); 21 | 22 | this.state = { 23 | isScrolled: false, 24 | }; 25 | } 26 | 27 | onScroll(e) { 28 | const { scrollLeft } = e.target; 29 | rafSchedule(this.setState(() => ({ isScrolled: Boolean(scrollLeft) }))); 30 | } 31 | 32 | render() { 33 | const { hasGradient, unclipAt, className, children, ...other } = this.props; 34 | 35 | const wrapClassNames = cx( 36 | 'hscrollContainer', 37 | { 38 | hscrollGradientWrap: hasGradient && !unclipAt, 39 | [HIDE_GRADIENT_CLASSNAME]: !this.state.isScrolled, 40 | }, 41 | className 42 | ); 43 | 44 | const hscrollClassNames = cx('hscroll', { 45 | [`${VALID_BREAKPOINTS[unclipAt]}_hscroll--unclip`]: !!unclipAt, 46 | }); 47 | 48 | return ( 49 |
50 |
51 |
{children}
52 |
53 |
54 | ); 55 | } 56 | } 57 | 58 | Hscroll.propTypes = { 59 | /** Whether the beginning and end of the scrolling element disappears into a gradient instead of being abruptly cut off */ 60 | hasGradient: PropTypes.bool, 61 | 62 | /** Breakpoint at which to render the items without a horizontal scroll */ 63 | unclipAt: PropTypes.oneOf(Object.keys(VALID_BREAKPOINTS)), 64 | }; 65 | 66 | export default Hscroll; 67 | -------------------------------------------------------------------------------- /src/SignupModal.test.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import { SignupModal } from './SignupModal'; 5 | import { signupOptions } from './signupModal.story'; 6 | 7 | describe('SignupModal', () => { 8 | const MOCK_PROPS = { 9 | signupOptions, 10 | onDismiss: jest.fn(), 11 | }; 12 | const getWrapper = (props = {}) => 13 | shallow(); 14 | 15 | it('should match the snapshot', () => { 16 | expect(getWrapper()).toMatchSnapshot(); 17 | }); 18 | 19 | describe('apple signin', () => { 20 | describe('if apple.shouldRender is false', () => { 21 | it('should not show apple signin', () => { 22 | const props = { 23 | ...MOCK_PROPS, 24 | signupOptions: { 25 | ...MOCK_PROPS.signupOptions, 26 | apple: { ...MOCK_PROPS.signupOptions.apple, shouldRender: false }, 27 | }, 28 | }; 29 | const wrapper = getWrapper(props); 30 | const appleUrl = wrapper.find({ 'data-testid': 'apple' }); 31 | expect(appleUrl.length).toBe(0); 32 | }); 33 | }); 34 | describe('if apple.shouldRender is true', () => { 35 | it('should show apple signin', () => { 36 | const props = { 37 | ...MOCK_PROPS, 38 | signupOptions: { 39 | ...MOCK_PROPS.signupOptions, 40 | apple: { ...MOCK_PROPS.signupOptions.apple, shouldRender: true }, 41 | }, 42 | }; 43 | const wrapper = getWrapper(props); 44 | const appleUrl = wrapper.find({ 'data-testid': 'apple' }); 45 | expect(appleUrl.length).toBe(1); 46 | }); 47 | }); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /src/__snapshots__/accentHeader.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`AccentHeader exists 1`] = ` 4 |
7 |

13 | Test 14 |

15 |
16 | `; 17 | -------------------------------------------------------------------------------- /src/__snapshots__/hscroll.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Default Hscroll exists 1`] = ` 4 |
8 |
11 |
14 |
17 | item 18 |
19 |
22 | item 23 |
24 |
27 | item 28 |
29 |
32 | item 33 |
34 |
37 | item 38 |
39 |
42 | item 43 |
44 |
47 | item 48 |
49 |
52 | item 53 |
54 |
57 | item 58 |
59 |
60 |
61 |
62 | `; 63 | -------------------------------------------------------------------------------- /src/accentHeader.test.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | 4 | import AccentHeader, { ALIGN_VALUES } from './AccentHeader'; 5 | 6 | describe('AccentHeader', () => { 7 | const accentHeaderComponent = shallow(Test); 8 | 9 | it('exists', () => { 10 | expect(accentHeaderComponent).toMatchSnapshot(); 11 | }); 12 | 13 | it('applies correct alignment className to dropdown content', () => { 14 | ALIGN_VALUES.forEach(alignment => { 15 | const accentHeaderComponent = shallow( 16 | Test 17 | ); 18 | expect(accentHeaderComponent.find('h2').prop('className')).toContain( 19 | `accentHeader--${alignment}` 20 | ); 21 | }); 22 | }); 23 | 24 | it('renders with whatever HTML tag is passed in', () => { 25 | const accentHeaderComponent = shallow( 26 | Test 27 | ); 28 | expect(accentHeaderComponent.find('h1').length).toBe(1); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /src/forms/CharCounter.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import React from 'react'; 3 | import cx from 'classnames'; 4 | import DeprecationWarning from '../utils/components/DeprecationWarning'; 5 | 6 | export const CharCounter = ({ maxLength, valueLength }) => { 7 | const remainingChars = maxLength - valueLength; 8 | 9 | const classNames = cx('text--tiny', 'text--secondary', 'align--right', 'charCount', { 10 | 'text--error': remainingChars < 0, 11 | }); 12 | 13 | return ( 14 |

15 | {remainingChars} 16 |

17 | ); 18 | }; 19 | 20 | CharCounter.propTypes = { 21 | maxLength: PropTypes.number.isRequired, 22 | valueLength: PropTypes.number.isRequired, 23 | }; 24 | 25 | export default DeprecationWarning(CharCounter); 26 | -------------------------------------------------------------------------------- /src/forms/ErrorList.jsx: -------------------------------------------------------------------------------- 1 | import PropTypes from 'prop-types'; 2 | import React from 'react'; 3 | import cx from 'classnames'; 4 | 5 | const ERROR_CLASSNAME = 'text--error text--small'; 6 | 7 | /** 8 | * ErrorList 9 | * 10 | * Accessible list of errors for a form input. 11 | * 12 | * Currently supports only a single error due to a 13 | * limitation with `redux-form`. 14 | */ 15 | const ErrorList = props => { 16 | const { errorId, error, ...other } = props; 17 | 18 | if (errorId) { 19 | other.id = errorId; 20 | } 21 | 22 | return ( 23 |
    24 | {error &&
  • {error}
  • } 25 |
26 | ); 27 | }; 28 | ErrorList.propTypes = { 29 | /** Unique identifier for the errors - used to associate form field with error */ 30 | errorId: PropTypes.string, 31 | 32 | /** Error content to render */ 33 | error: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.bool]), 34 | }; 35 | 36 | export default ErrorList; 37 | -------------------------------------------------------------------------------- /src/forms/LockedBadge.story.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { storiesOf } from '@storybook/react'; 3 | import { action } from '@storybook/addon-actions'; 4 | import { decorateWithBasics, decorateWithInfo } from '../utils/decorators'; 5 | 6 | import LockedBadge from './LockedBadge'; 7 | 8 | const callbackAction = () => action('Click event'); 9 | 10 | storiesOf('Forms/LockedBadge', module) 11 | .addDecorator(decorateWithBasics) 12 | .addDecorator(decorateWithInfo) 13 | .add('Default', () => ) 14 | .add('Neutral', () => ( 15 | 16 | )); 17 | -------------------------------------------------------------------------------- /src/forms/LockedBadge.test.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { shallow } from 'enzyme'; 3 | import LockedBadge from './LockedBadge'; 4 | 5 | describe('LockedBadge', function() { 6 | const onClickCallbackMock = jest.fn(); 7 | 8 | const MOCK_PROPS = { 9 | label: 'Default label', 10 | onClick: onClickCallbackMock, 11 | }; 12 | 13 | const render = (props = MOCK_PROPS) => { 14 | const wrapper = shallow(); 15 | 16 | return wrapper; 17 | }; 18 | 19 | afterEach(() => { 20 | onClickCallbackMock.mockClear(); 21 | }); 22 | 23 | it('renders locked badge with default styles', () => { 24 | expect(render()).toMatchSnapshot(); 25 | }); 26 | it('renders locked badge with neutral styles', () => { 27 | expect(render({ ...MOCK_PROPS, variant: 'neutral' })).toMatchSnapshot(); 28 | }); 29 | it('calls onClickCallback when user clicks on badge', () => { 30 | const badge = render(); 31 | expect(onClickCallbackMock).not.toHaveBeenCalled(); 32 | badge.simulate('click'); 33 | expect(onClickCallbackMock).toHaveBeenCalledTimes(1); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/forms/NumberInput.jsx: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { 4 | NumericalInput as SwarmNumeric, 5 | FieldHelper, 6 | FieldLabel, 7 | } from '@meetup/swarm-components'; 8 | import withErrorList from '../utils/components/withErrorList'; 9 | import DeprecationWarning from '../utils/components/DeprecationWarning'; 10 | 11 | export const DECREMENT_BTN_CLASS = 'decrementButton'; 12 | export const FAUX_INPUT_CLASS = 'fauxInput'; 13 | export const FOCUSED_INPUT_CLASS = 'focused'; 14 | export const INCREMENT_BTN_CLASS = 'incrementButton'; 15 | 16 | type Value = number | null; 17 | type Props = { 18 | className?: string, 19 | children?: React$Node, 20 | disabled?: boolean, 21 | error?: React$Node, 22 | fauxInputClassName?: string, 23 | helperText?: string | React$Node, 24 | id: string, 25 | label?: React$Node, 26 | labelClassName?: string, 27 | max?: number, 28 | min?: number, 29 | name: string, 30 | onChange: Value => void, 31 | onBlur: (SyntheticInputEvent) => void, 32 | required?: boolean, 33 | requiredText?: string | React$Node, 34 | step: number, 35 | value: Value, 36 | }; 37 | 38 | export class NumberInput extends React.PureComponent { 39 | static defaultProps = { 40 | requiredText: '*', 41 | }; 42 | 43 | render() { 44 | const { id, helperText, label, required, requiredText, ...other } = this.props; 45 | 46 | return ( 47 | 48 | {label && ( 49 | 50 | {label} 51 | 52 | )} 53 | {helperText && {helperText}} 54 | 55 | 56 | ); 57 | } 58 | } 59 | 60 | export default withErrorList(DeprecationWarning(NumberInput)); 61 | -------------------------------------------------------------------------------- /src/forms/RadioButton.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import cx from 'classnames'; 3 | import PropTypes from 'prop-types'; 4 | 5 | export class RadioButton extends React.PureComponent { 6 | componentDidCatch(error, info) { 7 | console.log(`${error}: \n ${info.componentStack}`); 8 | } 9 | 10 | render() { 11 | const { 12 | checked, 13 | label, 14 | id, 15 | disabled, 16 | value, 17 | children, 18 | name, 19 | ...other 20 | } = this.props; 21 | 22 | return ( 23 | 44 | ); 45 | } 46 | } 47 | 48 | RadioButton.displayName = 'RadioButton'; 49 | 50 | RadioButton.propTypes = { 51 | /** What we render into the input's `