playbook_ui 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +316 -0
- data/Rakefile +32 -0
- data/app/assets/config/playbook_manifest.js +2 -0
- data/app/assets/images/clark.jpg +0 -0
- data/app/assets/images/giant.jpg +0 -0
- data/app/assets/images/pb-caret.svg +1 -0
- data/app/assets/images/pb-check.svg +11 -0
- data/app/controllers/playbook/application_controller.rb +10 -0
- data/app/controllers/playbook/guides_controller.rb +8 -0
- data/app/controllers/playbook/pages_controller.rb +50 -0
- data/app/helpers/playbook/application_helper.rb +19 -0
- data/app/helpers/playbook/layout_helper.rb +7 -0
- data/app/helpers/playbook/pb_doc_helper.rb +68 -0
- data/app/helpers/playbook/pb_kit_helper.rb +45 -0
- data/app/helpers/playbook/redcarpet_helper.rb +154 -0
- data/app/pb_kits/playbook/config/_kit_example.html.slim +5 -0
- data/app/pb_kits/playbook/config/_kit_ui.html.slim +24 -0
- data/app/pb_kits/playbook/config/_pb_kit_api.html.erb +18 -0
- data/app/pb_kits/playbook/packs/application.js +12 -0
- data/app/pb_kits/playbook/packs/examples.js +37 -0
- data/app/pb_kits/playbook/packs/kits.js +11 -0
- data/app/pb_kits/playbook/packs/main.scss +9 -0
- data/app/pb_kits/playbook/packs/pb_avatar.js +4 -0
- data/app/pb_kits/playbook/packs/pb_body.js +4 -0
- data/app/pb_kits/playbook/packs/pb_button.js +4 -0
- data/app/pb_kits/playbook/packs/pb_caption.js +4 -0
- data/app/pb_kits/playbook/packs/pb_card.js +4 -0
- data/app/pb_kits/playbook/packs/pb_image.js +6 -0
- data/app/pb_kits/playbook/packs/pb_input.js +4 -0
- data/app/pb_kits/playbook/packs/pb_layout.js +4 -0
- data/app/pb_kits/playbook/packs/pb_list.js +4 -0
- data/app/pb_kits/playbook/packs/pb_table.js +16 -0
- data/app/pb_kits/playbook/packs/pb_title.js +4 -0
- data/app/pb_kits/playbook/packs/pb_vertical_nav.js +4 -0
- data/app/pb_kits/playbook/packs/site_styles/_kit_style_index.scss +13 -0
- data/app/pb_kits/playbook/packs/site_styles/_scaffold.scss +43 -0
- data/app/pb_kits/playbook/packs/site_styles/_site-style.scss +72 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_all.scss +8 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_code_snippet.scss +531 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_color_utilities.scss +90 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +173 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_kits_examples.scss +22 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +82 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_spacing_tokens.scss +72 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.html.erb +8 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +62 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +49 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +82 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.html.erb +5 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +16 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_monogram.html.erb +5 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_monogram.jsx +16 -0
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_avatar/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_body/_body.html.erb +4 -0
- data/app/pb_kits/playbook/pb_body/_body.jsx +36 -0
- data/app/pb_kits/playbook/pb_body/_body.scss +37 -0
- data/app/pb_kits/playbook/pb_body/body.rb +76 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_dark.html.erb +3 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_dark.jsx +14 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_light.html.erb +3 -0
- data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +14 -0
- data/app/pb_kits/playbook/pb_body/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_body/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_button/_button.html.erb +9 -0
- data/app/pb_kits/playbook/pb_button/_button.jsx +40 -0
- data/app/pb_kits/playbook/pb_button/_button.scss +53 -0
- data/app/pb_kits/playbook/pb_button/_variations.json +15 -0
- data/app/pb_kits/playbook/pb_button/button.rb +87 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_dark.html.erb +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_dark.jsx +14 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_light.html.erb +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_light.jsx +14 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_sizes.html.erb +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_sizes.jsx +14 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +9 -0
- data/app/pb_kits/playbook/pb_button/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_caption/_caption.html.erb +2 -0
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +39 -0
- data/app/pb_kits/playbook/pb_caption/_caption.scss +5 -0
- data/app/pb_kits/playbook/pb_caption/_caption_lg.scss +5 -0
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +23 -0
- data/app/pb_kits/playbook/pb_caption/caption.rb +78 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_dark.html.erb +2 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_dark.jsx +13 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_light.html.erb +2 -0
- data/app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx +13 -0
- data/app/pb_kits/playbook/pb_caption/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_caption/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_card/_card.html.erb +6 -0
- data/app/pb_kits/playbook/pb_card/_card.jsx +25 -0
- data/app/pb_kits/playbook/pb_card/_card.scss +14 -0
- data/app/pb_kits/playbook/pb_card/card.rb +37 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_light.html.erb +3 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_light.jsx +12 -0
- data/app/pb_kits/playbook/pb_card/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_card/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_image/_image.html.erb +5 -0
- data/app/pb_kits/playbook/pb_image/_image.jsx +32 -0
- data/app/pb_kits/playbook/pb_image/_image.scss +15 -0
- data/app/pb_kits/playbook/pb_image/docs/_default_image.html.erb +1 -0
- data/app/pb_kits/playbook/pb_image/docs/_default_image.jsx +12 -0
- data/app/pb_kits/playbook/pb_image/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_image/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_image/image.rb +53 -0
- data/app/pb_kits/playbook/pb_input/_input.html.erb +17 -0
- data/app/pb_kits/playbook/pb_input/_input.jsx +57 -0
- data/app/pb_kits/playbook/pb_input/_input.scss +58 -0
- data/app/pb_kits/playbook/pb_input/docs/_input_default.html.erb +5 -0
- data/app/pb_kits/playbook/pb_input/docs/_input_default.jsx +16 -0
- data/app/pb_kits/playbook/pb_input/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_input/input.rb +85 -0
- data/app/pb_kits/playbook/pb_kit/base.rb +38 -0
- data/app/pb_kits/playbook/pb_layout/_body.html.erb +6 -0
- data/app/pb_kits/playbook/pb_layout/_body.jsx +26 -0
- data/app/pb_kits/playbook/pb_layout/_layout.html.erb +6 -0
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +54 -0
- data/app/pb_kits/playbook/pb_layout/_layout.scss +87 -0
- data/app/pb_kits/playbook/pb_layout/_layout_mixin.scss +60 -0
- data/app/pb_kits/playbook/pb_layout/_sidebar.html.erb +6 -0
- data/app/pb_kits/playbook/pb_layout/_sidebar.jsx +26 -0
- data/app/pb_kits/playbook/pb_layout/body.rb +37 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_lg.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_lg_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_md.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_md_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_sm.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_sm_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_xl.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_xl_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_xs.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_xs.jsx +15 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_xs_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +14 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/layout.rb +109 -0
- data/app/pb_kits/playbook/pb_layout/sidebar.rb +37 -0
- data/app/pb_kits/playbook/pb_list/_item.html.erb +6 -0
- data/app/pb_kits/playbook/pb_list/_list.html.erb +9 -0
- data/app/pb_kits/playbook/pb_list/_list.jsx +56 -0
- data/app/pb_kits/playbook/pb_list/_list.scss +94 -0
- data/app/pb_kits/playbook/pb_list/_list_item.jsx +26 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_borderless.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_dark.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_dark_borderless.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_dark_lg.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_dark_ordered.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_dark_xpadding.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_default.jsx +16 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_lg.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_ordered.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_xpadding.html.erb +7 -0
- data/app/pb_kits/playbook/pb_list/docs/example.yml +14 -0
- data/app/pb_kits/playbook/pb_list/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_list/item.rb +41 -0
- data/app/pb_kits/playbook/pb_list/list.rb +114 -0
- data/app/pb_kits/playbook/pb_table/_table.html.erb +12 -0
- data/app/pb_kits/playbook/pb_table/_table.jsx +60 -0
- data/app/pb_kits/playbook/pb_table/_table.scss +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_container.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_container.jsx +45 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_container_dark.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_container_dark.jsx +46 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_dark.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_dark.jsx +45 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_disable_hover.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_disable_hover.jsx +45 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_lg.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_lg.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_md.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_md.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_multiline.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_multiline.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_single_line.html.erb +48 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_single_line.jsx +45 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sm.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sm.jsx +43 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +21 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +9 -0
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +14 -0
- data/app/pb_kits/playbook/pb_table/styles/_as-cards.scss +49 -0
- data/app/pb_kits/playbook/pb_table/styles/_content.scss +13 -0
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +17 -0
- data/app/pb_kits/playbook/pb_table/styles/_hover.scss +66 -0
- data/app/pb_kits/playbook/pb_table/styles/_mixins.scss +0 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +138 -0
- data/app/pb_kits/playbook/pb_table/styles/_reset.scss +17 -0
- data/app/pb_kits/playbook/pb_table/styles/_single-line.scss +35 -0
- data/app/pb_kits/playbook/pb_table/styles/_structure.scss +39 -0
- data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +88 -0
- data/app/pb_kits/playbook/pb_table/styles/_table-dark.scss +92 -0
- data/app/pb_kits/playbook/pb_table/styles/_variables.scss +23 -0
- data/app/pb_kits/playbook/pb_table/table.rb +95 -0
- data/app/pb_kits/playbook/pb_title/_title.html.erb +1 -0
- data/app/pb_kits/playbook/pb_title/_title.jsx +33 -0
- data/app/pb_kits/playbook/pb_title/_title.scss +32 -0
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +57 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_dark.html.erb +4 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_dark.jsx +15 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light.html.erb +4 -0
- data/app/pb_kits/playbook/pb_title/docs/_title_light.jsx +15 -0
- data/app/pb_kits/playbook/pb_title/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_title/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_title/title.rb +76 -0
- data/app/pb_kits/playbook/pb_vertical_nav/_item.html.erb +8 -0
- data/app/pb_kits/playbook/pb_vertical_nav/_item.jsx +34 -0
- data/app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.html.erb +13 -0
- data/app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.jsx +31 -0
- data/app/pb_kits/playbook/pb_vertical_nav/_vertical_nav.scss +73 -0
- data/app/pb_kits/playbook/pb_vertical_nav/docs/_default_nav.html.erb +5 -0
- data/app/pb_kits/playbook/pb_vertical_nav/docs/_default_nav.jsx +15 -0
- data/app/pb_kits/playbook/pb_vertical_nav/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_vertical_nav/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_vertical_nav/item.rb +65 -0
- data/app/pb_kits/playbook/pb_vertical_nav/vertical_nav.rb +59 -0
- data/app/pb_kits/playbook/tokens/_animation-curves.scss +37 -0
- data/app/pb_kits/playbook/tokens/_border_radius.sass +27 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +417 -0
- data/app/pb_kits/playbook/tokens/_fonts.scss +97 -0
- data/app/pb_kits/playbook/tokens/_line_height.scss +7 -0
- data/app/pb_kits/playbook/tokens/_opacity.scss +9 -0
- data/app/pb_kits/playbook/tokens/_positioning.scss +24 -0
- data/app/pb_kits/playbook/tokens/_screen_sizes.scss +30 -0
- data/app/pb_kits/playbook/tokens/_shadows.scss +8 -0
- data/app/pb_kits/playbook/tokens/_spacing.scss +27 -0
- data/app/pb_kits/playbook/tokens/_typography.sass +64 -0
- data/app/pb_kits/playbook/utilities/_background_colors.scss +21 -0
- data/app/pb_kits/playbook/utilities/_colors.scss +26 -0
- data/app/views/layouts/playbook/_nav.html.slim +3 -0
- data/app/views/layouts/playbook/_sidebar.html.slim +29 -0
- data/app/views/layouts/playbook/application.html.slim +18 -0
- data/app/views/layouts/playbook/fullscreen.html.slim +10 -0
- data/app/views/layouts/playbook/grid.html.slim +10 -0
- data/app/views/playbook/guides/create_kit.html.slim +16 -0
- data/app/views/playbook/guides/create_kit/_file_naming.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_generator.html.md +6 -0
- data/app/views/playbook/guides/create_kit/_kit_examples.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_kit_rails.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_kit_react.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_layout.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_view_objects.html.md +2 -0
- data/app/views/playbook/guides/create_kit/_writing_sass.md +10 -0
- data/app/views/playbook/guides/use_nitro.html.slim +6 -0
- data/app/views/playbook/guides/use_nitro/_local.html.md +2 -0
- data/app/views/playbook/guides/use_nitro/_nitro_components.html.md +2 -0
- data/app/views/playbook/guides/use_nitro/_versions.html.md +2 -0
- data/app/views/playbook/pages/fullscreen.html.slim +10 -0
- data/app/views/playbook/pages/grid.html.slim +2 -0
- data/app/views/playbook/pages/home.html.slim +4 -0
- data/app/views/playbook/pages/kit_show.html.slim +14 -0
- data/app/views/playbook/pages/kits.html.slim +10 -0
- data/app/views/playbook/pages/principals/_getting_started.html.md +12 -0
- data/app/views/playbook/pages/principles.html.slim +5 -0
- data/app/views/playbook/pages/tokens.html.slim +15 -0
- data/app/views/playbook/pages/tokens/_pb_doc_spacing.html.slim +16 -0
- data/app/views/playbook/pages/utilities.html.slim +89 -0
- data/app/views/playbook/pages/utilities/_pb_doc_color.html.slim +14 -0
- data/components/Avatar/Avatar.jsx +96 -0
- data/components/Avatar/AvatarStory.jsx +19 -0
- data/components/Avatar/styles.scss +54 -0
- data/components/Avatar/styles.scss.flow +14 -0
- data/components/Badge/Badge.jsx +40 -0
- data/components/Badge/BadgeStory.jsx +40 -0
- data/components/Badge/badges.scss +167 -0
- data/components/Badge/labels.scss +121 -0
- data/components/Badge/styles.scss +4 -0
- data/components/Badge/styles.scss.flow +38 -0
- data/components/Banner/Banner.jsx +54 -0
- data/components/Banner/BannerStory.jsx +22 -0
- data/components/Banner/styles.scss +75 -0
- data/components/Banner/styles.scss.flow +19 -0
- data/components/Button/Button.jsx +75 -0
- data/components/Button/ButtonStory.jsx +94 -0
- data/components/Capping/CappingStory.jsx +21 -0
- data/components/Card/Card.jsx +44 -0
- data/components/Card/CardStory.jsx +19 -0
- data/components/CircleButton/CircleButton.jsx +51 -0
- data/components/CircleButton/CircleButtonStory.jsx +25 -0
- data/components/CircleButton/styles.scss +33 -0
- data/components/CircleButton/styles.scss.flow +6 -0
- data/components/CollapsibleCard/CollapsibleCard.jsx +108 -0
- data/components/CollapsibleCard/CollapsibleCardStory.jsx +26 -0
- data/components/Color/Color.jsx +55 -0
- data/components/Color/ColorStory.jsx +16 -0
- data/components/Color/styles.scss +6 -0
- data/components/Color/styles.scss.flow +5 -0
- data/components/ColorPickerInput/ColorPickerInput.jsx +99 -0
- data/components/ColorPickerInput/ColorPickerInputStory.jsx +37 -0
- data/components/ColorPickerInput/colorPickerInput.scss +10 -0
- data/components/ColorPickerInput/colorPickerInput.scss.flow +6 -0
- data/components/DOBInput/index.jsx +35 -0
- data/components/DOBInput/story.jsx +20 -0
- data/components/DOBInput/styles.scss +11 -0
- data/components/DOBInput/styles.scss.flow +7 -0
- data/components/DatePicker/DatePicker.jsx +156 -0
- data/components/DatePicker/DatePickerStory.jsx +22 -0
- data/components/DatePicker/styles.scss +6 -0
- data/components/DatePicker/styles.scss.flow +5 -0
- data/components/DateTimePicker/DateTimePicker.jsx +109 -0
- data/components/DateTimePicker/DateTimePickerStory.jsx +31 -0
- data/components/DateTimePicker/story-styles.scss +3 -0
- data/components/DateTimePicker/story-styles.scss.flow +5 -0
- data/components/DateTimePicker/styles.scss +1 -0
- data/components/DateTimePicker/styles.scss.flow +5 -0
- data/components/Errors/Errors.jsx +38 -0
- data/components/FileCard/FileCard.jsx +183 -0
- data/components/FileCard/FileCardStory.jsx +62 -0
- data/components/FileCard/styles.scss +81 -0
- data/components/FileCard/styles.scss.flow +12 -0
- data/components/Flip/Flip.jsx +50 -0
- data/components/Flip/FlipStory.jsx +85 -0
- data/components/Flip/styles.scss +41 -0
- data/components/Flip/styles.scss.flow +11 -0
- data/components/FlyoutPanel/FlyoutPanel.jsx +34 -0
- data/components/FlyoutPanel/FlyoutPanelStory.jsx +36 -0
- data/components/FlyoutPanel/flyout_panel.scss +33 -0
- data/components/FlyoutPanel/flyout_panel.scss.flow +11 -0
- data/components/Grade/Grade.jsx +55 -0
- data/components/Grade/GradeStory.jsx +18 -0
- data/components/Grade/grade.scss +39 -0
- data/components/Grade/grade.scss.flow +6 -0
- data/components/Highlight/Highlight.jsx +39 -0
- data/components/Highlight/HighlightStory.jsx +22 -0
- data/components/Highlight/styles.scss +24 -0
- data/components/Highlight/styles.scss.flow +17 -0
- data/components/Icon/Icon.jsx +54 -0
- data/components/Icon/IconButtonStory.jsx +20 -0
- data/components/Icon/IconStory.jsx +25 -0
- data/components/IconToggle/IconToggle.jsx +56 -0
- data/components/IconToggle/IconToggleStory.jsx +24 -0
- data/components/Milestones/MilestoneItem.jsx +47 -0
- data/components/Milestones/MilestoneItemStory.jsx +25 -0
- data/components/Milestones/Milestones.jsx +51 -0
- data/components/Milestones/MilestonesStory.jsx +30 -0
- data/components/Milestones/milestones.scss +19 -0
- data/components/Milestones/milestones.scss.flow +7 -0
- data/components/Milestones/milestones_item.scss +157 -0
- data/components/Milestones/milestones_item.scss.flow +13 -0
- data/components/Milestones/milestones_variables.scss +11 -0
- data/components/Modal/ModalStory.jsx +29 -0
- data/components/MonogramAvatar/MonogramAvatar.jsx +91 -0
- data/components/MonogramAvatar/MonogramAvatarStory.jsx +21 -0
- data/components/MonogramAvatar/monogram_avatar.scss +54 -0
- data/components/MonogramAvatar/monogram_avatar.scss.flow +10 -0
- data/components/Panel/Panel.jsx +159 -0
- data/components/Panel/PanelStory.jsx +23 -0
- data/components/Panel/panel.scss +32 -0
- data/components/Panel/panel.scss.flow +12 -0
- data/components/PanelGroup/PanelGroup.jsx +121 -0
- data/components/PanelGroup/PanelGroup.scss +96 -0
- data/components/PanelGroup/PanelGroup.scss.flow +6 -0
- data/components/PanelGroup/PanelGroupStory.jsx +112 -0
- data/components/SearchCollectionSelect/SearchCollectionSelect.jsx +29 -0
- data/components/SearchCollectionSelect/SearchCollectionSelectStory.jsx +48 -0
- data/components/SearchCollectionSelect/searchCollectionSelect.scss +0 -0
- data/components/SideModal/SideModalStory.jsx +31 -0
- data/components/Spinner/Spinner.jsx +80 -0
- data/components/Spinner/SpinnerStory.jsx +21 -0
- data/components/Spinner/spinner.scss +6 -0
- data/components/Spinner/spinner.scss.flow +5 -0
- data/components/StepMeter/StepMeter.jsx +75 -0
- data/components/StepMeter/StepMeterStory.jsx +25 -0
- data/components/StepMeter/step_meter.scss +120 -0
- data/components/StepMeter/step_meter.scss.flow +9 -0
- data/components/Survey/Survey.jsx +190 -0
- data/components/Survey/SurveyStory.jsx +125 -0
- data/components/Survey/survey.scss +75 -0
- data/components/Survey/survey.scss.flow +11 -0
- data/components/Tab/Tab.jsx +70 -0
- data/components/Tab/tab.scss +25 -0
- data/components/Tab/tab.scss.flow +6 -0
- data/components/TabList/TabList.jsx +35 -0
- data/components/TabList/TabListStory.jsx +31 -0
- data/components/TabList/tabList.scss +5 -0
- data/components/TabList/tabList.scss.flow +5 -0
- data/components/Text/Text.jsx +53 -0
- data/components/Text/TextStory.jsx +23 -0
- data/components/Text/styles.scss +3 -0
- data/components/Text/styles.scss.flow +123 -0
- data/components/Text/text.scss +35 -0
- data/components/TextInput/TextInput.jsx +95 -0
- data/components/TextInput/TextInputStory.jsx +23 -0
- data/components/TextInput/form-control.scss +96 -0
- data/components/TextInput/styles.scss +3 -0
- data/components/TextInput/styles.scss.flow +7 -0
- data/components/TimePicker/TimePicker.jsx +218 -0
- data/components/TimePicker/TimePickerStory.jsx +22 -0
- data/components/TimePicker/styles.scss +1 -0
- data/components/TimePicker/styles.scss.flow +5 -0
- data/components/ToggleButton/ToggleButton.jsx +68 -0
- data/components/ToggleButton/ToggleButtonStory.jsx +46 -0
- data/components/ToggleButton/toggleButton.scss +70 -0
- data/components/ToggleButton/toggleButton.scss.flow +14 -0
- data/components/UserStamp/UserStamp.jsx +40 -0
- data/components/UserStamp/UserStampStory.jsx +22 -0
- data/components/UserStamp/styles.scss +6 -0
- data/components/UserStamp/styles.scss.flow +7 -0
- data/components/Wip/Wip.jsx +34 -0
- data/components/index.js +33 -0
- data/components/types.js +21 -0
- data/db/migrate/20171025045845_devise_create_users.rb +42 -0
- data/db/migrate/20171025050917_create_sections.rb +9 -0
- data/db/migrate/20171025050923_create_categories.rb +10 -0
- data/db/migrate/20171025050930_create_pages.rb +12 -0
- data/db/migrate/20171025050935_create_tags.rb +9 -0
- data/db/migrate/20171025050941_create_types.rb +10 -0
- data/db/migrate/20171025051118_create_page_tags.rb +8 -0
- data/db/migrate/20171025051848_add_user_ref_to_pages.rb +5 -0
- data/db/migrate/20171025051853_add_type_ref_to_pages.rb +5 -0
- data/db/migrate/20171025051859_add_page_ref_to_page_tags.rb +5 -0
- data/db/migrate/20171025051904_add_tag_ref_to_page_tags.rb +5 -0
- data/db/migrate/20171025052205_add_section_ref_to_categories.rb +5 -0
- data/db/migrate/20171025052211_add_category_ref_to_pages.rb +5 -0
- data/db/migrate/20180327194658_add_nitro_id_to_user.rb +14 -0
- data/db/migrate/20180327195455_create_friendly_id_slugs.rb +15 -0
- data/db/migrate/20180328142634_drop_types.rb +5 -0
- data/db/migrate/20180328145054_remove_type_id_from_pages.rb +5 -0
- data/db/migrate/20180328145144_drop_friendly_id_slugs.rb +6 -0
- data/db/migrate/20180518133907_add_page_ref_to_pages.rb +5 -0
- data/db/seeds.rb +7 -0
- data/fonts/fontawesome.js +1978 -0
- data/fonts/regular.js +1217 -0
- data/lib/generators/kit/USAGE +32 -0
- data/lib/generators/kit/kit_generator.rb +86 -0
- data/lib/generators/kit/templates/html.erb +3 -0
- data/lib/generators/kit/templates/javascript.erb +4 -0
- data/lib/generators/kit/templates/jsx.erb +31 -0
- data/lib/generators/kit/templates/logo.txt +28 -0
- data/lib/generators/kit/templates/ruby.erb +48 -0
- data/lib/generators/kit/templates/scss.erb +0 -0
- data/lib/generators/kit/templates/storyrails.erb +2 -0
- data/lib/generators/kit/templates/storyreact.erb +2 -0
- data/lib/generators/kit/templates/variations.erb +10 -0
- data/lib/playbook.rb +32 -0
- data/lib/playbook/engine.rb +34 -0
- data/lib/playbook/version.rb +3 -0
- data/lib/playbook_ui.rb +3 -0
- data/lib/tasks/db.rake +8 -0
- data/lib/tasks/playbook_tasks.rake +24 -0
- data/stories/basic.js +18 -0
- data/stories/complex.js +15 -0
- data/stories/form.js +2 -0
- data/stories/index.js +29 -0
- metadata +832 -0
@@ -0,0 +1,120 @@
|
|
1
|
+
@import "base-variables/_colors.scss";
|
2
|
+
@import "base-variables/_spacing.sass";
|
3
|
+
@import "base-variables/_border-radius.sass";
|
4
|
+
@import "base-variables/_typography.sass";
|
5
|
+
|
6
|
+
$step-size-sm: 10px;
|
7
|
+
|
8
|
+
.step-meter {
|
9
|
+
list-style-type: none;
|
10
|
+
padding: 0 $space-base;
|
11
|
+
margin: 0;
|
12
|
+
|
13
|
+
li {
|
14
|
+
background: $sky;
|
15
|
+
border-radius: $border-rad-heavy*2;
|
16
|
+
color: $ink-light;
|
17
|
+
font-size: $font-smallest - 1;
|
18
|
+
font-weight: 400;
|
19
|
+
display: inline-block;
|
20
|
+
height: 18px;
|
21
|
+
line-height: 20px;
|
22
|
+
margin: 0 $space-small;
|
23
|
+
min-width: 75px;
|
24
|
+
padding: 0 $space-smallest;
|
25
|
+
position: relative;
|
26
|
+
text-align: center;
|
27
|
+
text-transform: uppercase;
|
28
|
+
|
29
|
+
&::before {
|
30
|
+
content: '';
|
31
|
+
background: $sky;
|
32
|
+
position: absolute;
|
33
|
+
height: 4px;
|
34
|
+
left: -14px;
|
35
|
+
right: 0;
|
36
|
+
top: calc(50% - 2px);
|
37
|
+
width: 14px;
|
38
|
+
}
|
39
|
+
|
40
|
+
&:first-child {
|
41
|
+
&::before {
|
42
|
+
display: none;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
&.done,
|
47
|
+
&.done::before {
|
48
|
+
background: $power-blue;
|
49
|
+
}
|
50
|
+
&.started,
|
51
|
+
&.started::before {
|
52
|
+
background: $power-blue;
|
53
|
+
}
|
54
|
+
&.error,
|
55
|
+
&.error::before {
|
56
|
+
background: $power-red;
|
57
|
+
}
|
58
|
+
|
59
|
+
&.done,
|
60
|
+
&.started,
|
61
|
+
&.error {
|
62
|
+
color: white;
|
63
|
+
}
|
64
|
+
|
65
|
+
span {
|
66
|
+
&:first-child {
|
67
|
+
margin-right: $space-smallest/2;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
&.type-simple {
|
73
|
+
width: 100%;
|
74
|
+
display: flex;
|
75
|
+
|
76
|
+
li {
|
77
|
+
min-width: auto;
|
78
|
+
height: 10px;
|
79
|
+
line-height: 10px;
|
80
|
+
flex-grow: 1;
|
81
|
+
margin: 0;
|
82
|
+
background: transparent !important;
|
83
|
+
|
84
|
+
span {
|
85
|
+
display: none;
|
86
|
+
}
|
87
|
+
|
88
|
+
&::before {
|
89
|
+
height: 2px;
|
90
|
+
top: calc(50% - 1px);
|
91
|
+
left: calc(-50% + 5px);
|
92
|
+
width: calc(100% - 10px);
|
93
|
+
}
|
94
|
+
&::after {
|
95
|
+
content: '';
|
96
|
+
position: absolute;
|
97
|
+
top: 0;
|
98
|
+
left: calc(50% - 5px);
|
99
|
+
width: $step-size-sm;
|
100
|
+
height: $step-size-sm;
|
101
|
+
border-radius: $step-size-sm/2;
|
102
|
+
background-color: $sky;
|
103
|
+
border: 2px solid $sky;
|
104
|
+
}
|
105
|
+
|
106
|
+
&.done::after, &.done::before {
|
107
|
+
background: $online-green;
|
108
|
+
border-color: $online-green;
|
109
|
+
}
|
110
|
+
&.error::after, &.error::before {
|
111
|
+
background: $power-red;
|
112
|
+
border-color: $power-red;
|
113
|
+
}
|
114
|
+
&.started::after {
|
115
|
+
background: transparent;
|
116
|
+
border-color: $power-blue;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
}
|
@@ -0,0 +1,190 @@
|
|
1
|
+
/* @flow */
|
2
|
+
|
3
|
+
import React from 'react'
|
4
|
+
|
5
|
+
import classnames from 'classnames'
|
6
|
+
import styles from './survey.scss'
|
7
|
+
|
8
|
+
import {
|
9
|
+
Errors,
|
10
|
+
Spinner,
|
11
|
+
} from '..'
|
12
|
+
|
13
|
+
import { SurveyQuestions } from '../types'
|
14
|
+
|
15
|
+
import {
|
16
|
+
Button,
|
17
|
+
Icon,
|
18
|
+
Panel,
|
19
|
+
} from '../index'
|
20
|
+
|
21
|
+
type Props = {
|
22
|
+
canSubmit?: boolean,
|
23
|
+
dismissable?: boolean,
|
24
|
+
errors: Array<string>,
|
25
|
+
loading?: boolean,
|
26
|
+
onChange: () => mixed,
|
27
|
+
onDismiss: () => mixed,
|
28
|
+
onSubmit: () => mixed,
|
29
|
+
questions: SurveyQuestions,
|
30
|
+
submitting: boolean,
|
31
|
+
}
|
32
|
+
|
33
|
+
export default class Survey extends React.Component<Props> {
|
34
|
+
static defaultProps = {
|
35
|
+
canSubmit: true,
|
36
|
+
dismissable: true,
|
37
|
+
errors: [],
|
38
|
+
loading: false,
|
39
|
+
modal: false,
|
40
|
+
onChange: function(){},
|
41
|
+
onDismiss: function(){},
|
42
|
+
onSubmit: function(){},
|
43
|
+
questions: [],
|
44
|
+
submitting: false,
|
45
|
+
}
|
46
|
+
props: Props
|
47
|
+
|
48
|
+
handleOnSubmit = (e) => {
|
49
|
+
e.preventDefault();
|
50
|
+
this.props.onSubmit();
|
51
|
+
}
|
52
|
+
|
53
|
+
handleOnChange(qaIdx) {
|
54
|
+
this.props.onChange(...qaIdx)
|
55
|
+
}
|
56
|
+
|
57
|
+
renderHeader() {
|
58
|
+
const {
|
59
|
+
errors,
|
60
|
+
} = this.props
|
61
|
+
return (
|
62
|
+
<div>
|
63
|
+
<If condition={errors && errors.length}>
|
64
|
+
<Errors messages={errors} />
|
65
|
+
</If>
|
66
|
+
</div>
|
67
|
+
)
|
68
|
+
}
|
69
|
+
renderBody() {
|
70
|
+
const {
|
71
|
+
questions,
|
72
|
+
submitting,
|
73
|
+
} = this.props
|
74
|
+
const css = classnames([
|
75
|
+
'panel-default',
|
76
|
+
styles.surveyQuestion,
|
77
|
+
])
|
78
|
+
|
79
|
+
if(!questions.length) return null
|
80
|
+
|
81
|
+
return (
|
82
|
+
<ol className={styles['survey-question-list']}>
|
83
|
+
{questions.map((q, i) =>
|
84
|
+
(
|
85
|
+
<li
|
86
|
+
className={styles['survey-question']}
|
87
|
+
key={`question-li-${i}`}
|
88
|
+
>
|
89
|
+
<Panel
|
90
|
+
className={css}
|
91
|
+
flush
|
92
|
+
key={`question-${i}`}
|
93
|
+
title={q.question}
|
94
|
+
>
|
95
|
+
<ul className={styles['survey-question-answer-list']}>
|
96
|
+
{q.answers.map((answer, x) => {
|
97
|
+
let otherProps = {
|
98
|
+
onChange: this.handleOnChange.bind(this, [i, x]),
|
99
|
+
}
|
100
|
+
if(submitting) otherProps.disabled = true
|
101
|
+
if(answer.selected) otherProps.checked = true
|
102
|
+
|
103
|
+
return (
|
104
|
+
<li
|
105
|
+
className={styles['survey-question-answer']}
|
106
|
+
key={`question-${i}-answer-${x}-li`}
|
107
|
+
>
|
108
|
+
<label>
|
109
|
+
<input
|
110
|
+
name={`question-${i}-answer`}
|
111
|
+
type="radio"
|
112
|
+
defaultValue={answer.value}
|
113
|
+
{...otherProps}
|
114
|
+
/>
|
115
|
+
<span>
|
116
|
+
{answer.label}
|
117
|
+
</span>
|
118
|
+
</label>
|
119
|
+
</li>
|
120
|
+
)
|
121
|
+
})}
|
122
|
+
</ul>
|
123
|
+
</Panel>
|
124
|
+
</li>
|
125
|
+
)
|
126
|
+
)}
|
127
|
+
</ol>
|
128
|
+
)
|
129
|
+
}
|
130
|
+
renderFooter() {
|
131
|
+
const {
|
132
|
+
canSubmit,
|
133
|
+
submitting,
|
134
|
+
} = this.props
|
135
|
+
|
136
|
+
let props = {
|
137
|
+
text: submitting ? "Submitting Answers" : "Submit Answers",
|
138
|
+
type: submitting ? "" : "submit",
|
139
|
+
}
|
140
|
+
if(!canSubmit || submitting) props.disabled = true
|
141
|
+
props.className = classnames([
|
142
|
+
"btn-primary",
|
143
|
+
styles.submit,
|
144
|
+
])
|
145
|
+
if(submitting) {
|
146
|
+
props.icon = (
|
147
|
+
<Icon
|
148
|
+
className="mr-3 fa-spin"
|
149
|
+
name="spinner"
|
150
|
+
spin
|
151
|
+
/>
|
152
|
+
)
|
153
|
+
}
|
154
|
+
|
155
|
+
return (
|
156
|
+
<Button {...props} />
|
157
|
+
)
|
158
|
+
}
|
159
|
+
renderLoading() {
|
160
|
+
return (
|
161
|
+
<div className={styles.overlay}>
|
162
|
+
<Spinner
|
163
|
+
position="centered"
|
164
|
+
/>
|
165
|
+
</div>
|
166
|
+
)
|
167
|
+
}
|
168
|
+
render() {
|
169
|
+
const {
|
170
|
+
loading,
|
171
|
+
questions,
|
172
|
+
} = this.props
|
173
|
+
|
174
|
+
return (
|
175
|
+
<form
|
176
|
+
className={styles.survey}
|
177
|
+
onSubmit={this.handleOnSubmit}
|
178
|
+
>
|
179
|
+
<div>
|
180
|
+
<If condition={loading}>{this.renderLoading()}</If>
|
181
|
+
{this.renderHeader()}
|
182
|
+
<If condition={questions.length > 0}>
|
183
|
+
{this.renderBody()}
|
184
|
+
{this.renderFooter()}
|
185
|
+
</If>
|
186
|
+
</div>
|
187
|
+
</form>
|
188
|
+
)
|
189
|
+
}
|
190
|
+
}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import Wip from '../Wip/Wip'
|
3
|
+
import Survey from './Survey'
|
4
|
+
|
5
|
+
import { boolean } from "@storybook/addon-knobs"
|
6
|
+
|
7
|
+
class SurveyContainer extends React.Component {
|
8
|
+
state = {
|
9
|
+
loading: false,
|
10
|
+
questions: [
|
11
|
+
{
|
12
|
+
question: 'Do you like food?',
|
13
|
+
answers: [
|
14
|
+
{
|
15
|
+
label: 'Yes, I do!',
|
16
|
+
selected: true,
|
17
|
+
value: 1,
|
18
|
+
},
|
19
|
+
{
|
20
|
+
label: 'No, I don\'t!',
|
21
|
+
selected: false,
|
22
|
+
value: 0,
|
23
|
+
},
|
24
|
+
{
|
25
|
+
label: 'Kinda..',
|
26
|
+
selected: false,
|
27
|
+
value: 2,
|
28
|
+
}
|
29
|
+
],
|
30
|
+
},
|
31
|
+
{
|
32
|
+
question: 'Do you like work?',
|
33
|
+
answers: [
|
34
|
+
{
|
35
|
+
label: 'Yes, I do!',
|
36
|
+
selected: true,
|
37
|
+
value: 1,
|
38
|
+
},
|
39
|
+
{
|
40
|
+
label: 'No, I don\'t!',
|
41
|
+
selected: false,
|
42
|
+
value: 0,
|
43
|
+
},
|
44
|
+
{
|
45
|
+
label: 'Kinda..',
|
46
|
+
selected: false,
|
47
|
+
value: 2,
|
48
|
+
}
|
49
|
+
],
|
50
|
+
}
|
51
|
+
],
|
52
|
+
submitting: false,
|
53
|
+
}
|
54
|
+
componentWillMount() {
|
55
|
+
this.setState({
|
56
|
+
canSubmit: false,
|
57
|
+
loading: true,
|
58
|
+
})
|
59
|
+
setTimeout(() => {
|
60
|
+
this.setState({
|
61
|
+
canSubmit: true,
|
62
|
+
loading: false,
|
63
|
+
})
|
64
|
+
}, 1500)
|
65
|
+
}
|
66
|
+
handleOnChange = (qIdx, aIdx) => {
|
67
|
+
const { questions } = this.state
|
68
|
+
for(let answer of questions[qIdx].answers) {
|
69
|
+
answer.selected = false
|
70
|
+
}
|
71
|
+
questions[qIdx].answers[aIdx].selected = true
|
72
|
+
this.setState({ questions })
|
73
|
+
}
|
74
|
+
handleOnSubmit = () => {
|
75
|
+
this.setState({
|
76
|
+
showErrors: false,
|
77
|
+
submitting: true,
|
78
|
+
})
|
79
|
+
setTimeout(() => {
|
80
|
+
this.setState({
|
81
|
+
showErrors: true,
|
82
|
+
submitting: false,
|
83
|
+
})
|
84
|
+
}, 1500)
|
85
|
+
}
|
86
|
+
render() {
|
87
|
+
const {
|
88
|
+
canSubmit,
|
89
|
+
loading,
|
90
|
+
questions,
|
91
|
+
submitting,
|
92
|
+
} = this.state
|
93
|
+
|
94
|
+
const showErrors = boolean("show errors", this.state.showErrors || false)
|
95
|
+
|
96
|
+
const props = {
|
97
|
+
canSubmit: boolean("canSubmit", canSubmit || true),
|
98
|
+
errors: showErrors ? ["Something wrong", "Something else not right"] : [],
|
99
|
+
loading: boolean("loading", loading || false),
|
100
|
+
onChange: this.handleOnChange,
|
101
|
+
onSubmit: this.handleOnSubmit,
|
102
|
+
questions,
|
103
|
+
submitting: boolean("submitting", submitting || false),
|
104
|
+
}
|
105
|
+
const child = React.cloneElement(this.props.children, props)
|
106
|
+
return (
|
107
|
+
<Wip
|
108
|
+
branch="feature/survey-modal"
|
109
|
+
prNumber={7}
|
110
|
+
>
|
111
|
+
{child}
|
112
|
+
</Wip>
|
113
|
+
)
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
export default function SurveyStory(stories) {
|
118
|
+
stories.add("Survey", () => {
|
119
|
+
return (
|
120
|
+
<SurveyContainer>
|
121
|
+
<Survey />
|
122
|
+
</SurveyContainer>
|
123
|
+
)
|
124
|
+
})
|
125
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
@import "base-variables/_spacing.sass";
|
2
|
+
@import "base-variables/_colors.scss";
|
3
|
+
@import "base-variables/_typography.sass";
|
4
|
+
|
5
|
+
.overlay {
|
6
|
+
background: transparent;
|
7
|
+
position: absolute;
|
8
|
+
left: 0;
|
9
|
+
right: 0;
|
10
|
+
bottom: 0;
|
11
|
+
top: 0;
|
12
|
+
z-index: 10;
|
13
|
+
& > div {
|
14
|
+
& > span {
|
15
|
+
background: transparent;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
.survey {
|
21
|
+
position: relative;
|
22
|
+
padding: $space-larger;
|
23
|
+
background: transparent;
|
24
|
+
&-question {
|
25
|
+
list-style: none;
|
26
|
+
counter-increment: step-counter;
|
27
|
+
display: flex;
|
28
|
+
flex: 5;
|
29
|
+
& > div {
|
30
|
+
flex: 20;
|
31
|
+
}
|
32
|
+
&::before {
|
33
|
+
content: counter(step-counter);
|
34
|
+
font-size: $font-largest;
|
35
|
+
flex: 1;
|
36
|
+
margin-top: $space-base;
|
37
|
+
}
|
38
|
+
&-answer {
|
39
|
+
list-style-type: none;
|
40
|
+
border-bottom: 1px solid $gray-2;
|
41
|
+
padding: $space-smaller $space-large 0 $space-large;
|
42
|
+
&:last-child {
|
43
|
+
border: none;
|
44
|
+
}
|
45
|
+
&-list {
|
46
|
+
margin: 0;
|
47
|
+
padding: 0;
|
48
|
+
}
|
49
|
+
label {
|
50
|
+
cursor: pointer;
|
51
|
+
}
|
52
|
+
input[type='radio'] {
|
53
|
+
& + span {
|
54
|
+
font-weight: $regular;
|
55
|
+
color: $ink-lightest;
|
56
|
+
}
|
57
|
+
&:checked {
|
58
|
+
& + span {
|
59
|
+
color: $ink;
|
60
|
+
font-weight: $bold;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
margin-right: $space-base;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
&-list {
|
67
|
+
margin: 0;
|
68
|
+
padding: 0;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
.submit {
|
74
|
+
margin-left: 5%;
|
75
|
+
}
|