voom-presenters 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +54 -0
- data/.ruby-version +1 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +104 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +45 -0
- data/ROADMAP.md +21 -0
- data/Rakefile +6 -0
- data/app/demo/component_status.pom +76 -0
- data/app/demo/components.pom +19 -0
- data/app/demo/components/badges.pom +25 -0
- data/app/demo/components/buttons.pom +51 -0
- data/app/demo/components/cards.pom +79 -0
- data/app/demo/components/chips.pom +91 -0
- data/app/demo/components/dialogs.pom +27 -0
- data/app/demo/components/drawers.pom +34 -0
- data/app/demo/components/expansion_panels.pom +21 -0
- data/app/demo/components/fabs-mini.pom +18 -0
- data/app/demo/components/fabs.pom +16 -0
- data/app/demo/components/footers.pom +36 -0
- data/app/demo/components/forms.pom +30 -0
- data/app/demo/components/headers.pom +37 -0
- data/app/demo/components/hidden_fields.pom +20 -0
- data/app/demo/components/icons.pom +94 -0
- data/app/demo/components/layouts.pom +44 -0
- data/app/demo/components/lists.pom +124 -0
- data/app/demo/components/menus.pom +43 -0
- data/app/demo/components/nav/drawer.pom +5 -0
- data/app/demo/components/nav/menu.pom +15 -0
- data/app/demo/components/selects.pom +30 -0
- data/app/demo/components/snackbar.pom +24 -0
- data/app/demo/components/snackbar_attached.pom +6 -0
- data/app/demo/components/tables.pom +39 -0
- data/app/demo/components/text_areas.pom +19 -0
- data/app/demo/components/text_fields.pom +57 -0
- data/app/demo/components/toggles.pom +29 -0
- data/app/demo/components/tooltips.pom +120 -0
- data/app/demo/event/actions.rb +86 -0
- data/app/demo/event/actions/dialog/show_dialog.pom +9 -0
- data/app/demo/event/actions/dialog/trigger.pom +86 -0
- data/app/demo/event/actions/nav/drawer.pom +5 -0
- data/app/demo/event/actions/nav/menu.pom +19 -0
- data/app/demo/event/autocomplete.pom +27 -0
- data/app/demo/event/field_level.pom +22 -0
- data/app/demo/event/form_level.pom +26 -0
- data/app/demo/event/nav/drawer.pom +5 -0
- data/app/demo/event/nav/menu.pom +14 -0
- data/app/demo/event/new_text.pom +6 -0
- data/app/demo/events.pom +98 -0
- data/app/demo/helpers/indented_grid.rb +14 -0
- data/app/demo/index.pom +19 -0
- data/app/demo/markdown.pom +73 -0
- data/app/demo/nav/top_nav.pom +42 -0
- data/app/demo/shared/code.pom +20 -0
- data/app/demo/shared/context_list.pom +29 -0
- data/app/demo/shared/debug.pom +17 -0
- data/app/demo/styles.pom +26 -0
- data/bin/console +22 -0
- data/bin/setup +8 -0
- data/component-status.yml +219 -0
- data/config.ru +21 -0
- data/lib/voom-presenters.rb +9 -0
- data/lib/voom/container_methods.rb +40 -0
- data/lib/voom/logger_methods.rb +11 -0
- data/lib/voom/parameters.rb +73 -0
- data/lib/voom/presenters-engine.rb +40 -0
- data/lib/voom/presenters.rb +13 -0
- data/lib/voom/presenters/api/app.rb +53 -0
- data/lib/voom/presenters/api/router.rb +94 -0
- data/lib/voom/presenters/app.rb +55 -0
- data/lib/voom/presenters/container_item.rb +16 -0
- data/lib/voom/presenters/demo/echo.rb +29 -0
- data/lib/voom/presenters/demo/search-terms.yml +50 -0
- data/lib/voom/presenters/demo/search.rb +29 -0
- data/lib/voom/presenters/dsl.rb +60 -0
- data/lib/voom/presenters/dsl/components/action.rb +35 -0
- data/lib/voom/presenters/dsl/components/avatar.rb +27 -0
- data/lib/voom/presenters/dsl/components/badge.rb +21 -0
- data/lib/voom/presenters/dsl/components/base.rb +78 -0
- data/lib/voom/presenters/dsl/components/button.rb +49 -0
- data/lib/voom/presenters/dsl/components/card.rb +119 -0
- data/lib/voom/presenters/dsl/components/checkbox.rb +16 -0
- data/lib/voom/presenters/dsl/components/chip.rb +48 -0
- data/lib/voom/presenters/dsl/components/content.rb +33 -0
- data/lib/voom/presenters/dsl/components/date_time.rb +17 -0
- data/lib/voom/presenters/dsl/components/dialog.rb +50 -0
- data/lib/voom/presenters/dsl/components/drawer.rb +40 -0
- data/lib/voom/presenters/dsl/components/event.rb +101 -0
- data/lib/voom/presenters/dsl/components/event_base.rb +20 -0
- data/lib/voom/presenters/dsl/components/expansion_panel.rb +46 -0
- data/lib/voom/presenters/dsl/components/footer.rb +25 -0
- data/lib/voom/presenters/dsl/components/form.rb +42 -0
- data/lib/voom/presenters/dsl/components/grid.rb +64 -0
- data/lib/voom/presenters/dsl/components/header.rb +33 -0
- data/lib/voom/presenters/dsl/components/hidden_field.rb +25 -0
- data/lib/voom/presenters/dsl/components/icon.rb +21 -0
- data/lib/voom/presenters/dsl/components/icon_base.rb +24 -0
- data/lib/voom/presenters/dsl/components/icon_toggle.rb +21 -0
- data/lib/voom/presenters/dsl/components/image.rb +36 -0
- data/lib/voom/presenters/dsl/components/input.rb +19 -0
- data/lib/voom/presenters/dsl/components/list.rb +39 -0
- data/lib/voom/presenters/dsl/components/lists/action.rb +72 -0
- data/lib/voom/presenters/dsl/components/lists/line.rb +83 -0
- data/lib/voom/presenters/dsl/components/lists/separator.rb +16 -0
- data/lib/voom/presenters/dsl/components/menu.rb +66 -0
- data/lib/voom/presenters/dsl/components/mixins/append.rb +20 -0
- data/lib/voom/presenters/dsl/components/mixins/attaches.rb +18 -0
- data/lib/voom/presenters/dsl/components/mixins/avatar.rb +18 -0
- data/lib/voom/presenters/dsl/components/mixins/buttons.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/chips.rb +21 -0
- data/lib/voom/presenters/dsl/components/mixins/common.rb +50 -0
- data/lib/voom/presenters/dsl/components/mixins/content.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/dialogs.rb +19 -0
- data/lib/voom/presenters/dsl/components/mixins/event.rb +19 -0
- data/lib/voom/presenters/dsl/components/mixins/expansion_panels.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/grids.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/helpers.rb +20 -0
- data/lib/voom/presenters/dsl/components/mixins/icons.rb +17 -0
- data/lib/voom/presenters/dsl/components/mixins/images.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/menus.rb +15 -0
- data/lib/voom/presenters/dsl/components/mixins/selects.rb +17 -0
- data/lib/voom/presenters/dsl/components/mixins/snackbars.rb +18 -0
- data/lib/voom/presenters/dsl/components/mixins/text_fields.rb +35 -0
- data/lib/voom/presenters/dsl/components/mixins/toggles.rb +40 -0
- data/lib/voom/presenters/dsl/components/mixins/tooltips.rb +18 -0
- data/lib/voom/presenters/dsl/components/mixins/typography.rb +37 -0
- data/lib/voom/presenters/dsl/components/page.rb +29 -0
- data/lib/voom/presenters/dsl/components/radio_button.rb +14 -0
- data/lib/voom/presenters/dsl/components/select.rb +64 -0
- data/lib/voom/presenters/dsl/components/snackbar.rb +32 -0
- data/lib/voom/presenters/dsl/components/switch.rb +14 -0
- data/lib/voom/presenters/dsl/components/table.rb +102 -0
- data/lib/voom/presenters/dsl/components/text_area.rb +20 -0
- data/lib/voom/presenters/dsl/components/text_field.rb +74 -0
- data/lib/voom/presenters/dsl/components/toggle_base.rb +26 -0
- data/lib/voom/presenters/dsl/components/tooltip.rb +25 -0
- data/lib/voom/presenters/dsl/components/typography.rb +25 -0
- data/lib/voom/presenters/dsl/definer.rb +13 -0
- data/lib/voom/presenters/dsl/definition.rb +31 -0
- data/lib/voom/presenters/dsl/invalid_presenter.rb +8 -0
- data/lib/voom/presenters/dsl/lockable.rb +15 -0
- data/lib/voom/presenters/dsl/user_interface.rb +135 -0
- data/lib/voom/presenters/errors/parameter_validation.rb +10 -0
- data/lib/voom/presenters/errors/unprocessable.rb +8 -0
- data/lib/voom/presenters/helpers.rb +18 -0
- data/lib/voom/presenters/helpers/currency.rb +14 -0
- data/lib/voom/presenters/helpers/date.rb +22 -0
- data/lib/voom/presenters/helpers/errors.rb +11 -0
- data/lib/voom/presenters/helpers/inflector.rb +16 -0
- data/lib/voom/presenters/helpers/rails.rb +60 -0
- data/lib/voom/presenters/helpers/route.rb +11 -0
- data/lib/voom/presenters/helpers/time.rb +27 -0
- data/lib/voom/presenters/settings.rb +35 -0
- data/lib/voom/presenters/version.rb +5 -0
- data/lib/voom/presenters/web_client/app.rb +128 -0
- data/lib/voom/presenters/web_client/markdown_render.rb +16 -0
- data/lib/voom/presenters/web_client/router.rb +96 -0
- data/lib/voom/serializer.rb +43 -0
- data/lib/voom/symbol/to_str.rb +29 -0
- data/lib/voom/trace.rb +19 -0
- data/presenters.gemspec +37 -0
- data/public/.gitignore +2 -0
- data/public/bundle.css +11413 -0
- data/public/bundle.js +16456 -0
- data/public/dialog-polyfill.js +738 -0
- data/public/favicon.ico +0 -0
- data/public/img/demo/dog.png +0 -0
- data/public/img/demo/image_card.jpg +0 -0
- data/public/img/demo/rx.png +0 -0
- data/public/img/demo/welcome_card.jpg +0 -0
- data/public/img/settings/blue.png +0 -0
- data/public/img/settings/green.png +0 -0
- data/public/img/settings/orange.png +0 -0
- data/public/img/settings/purple.png +0 -0
- data/public/img/settings/red.png +0 -0
- data/public/img/settings/teal.png +0 -0
- data/public/img/settings/white.png +0 -0
- data/public/img/settings/yellow.png +0 -0
- data/public/scripts.js +289 -0
- data/public/style-bundle.js +73 -0
- data/public/styles.css +16 -0
- data/views/mdc/.gitignore +1 -0
- data/views/mdc/assets/js/app.js +10 -0
- data/views/mdc/assets/js/components/base-component.js +5 -0
- data/views/mdc/assets/js/components/button.js +15 -0
- data/views/mdc/assets/js/components/cards.js +3 -0
- data/views/mdc/assets/js/components/checkboxes.js +15 -0
- data/views/mdc/assets/js/components/chips.js +12 -0
- data/views/mdc/assets/js/components/date-time.js +6 -0
- data/views/mdc/assets/js/components/dialogs.js +32 -0
- data/views/mdc/assets/js/components/events.js +151 -0
- data/views/mdc/assets/js/components/events/autocomplete.js +96 -0
- data/views/mdc/assets/js/components/events/base.js +41 -0
- data/views/mdc/assets/js/components/events/dialog.js +25 -0
- data/views/mdc/assets/js/components/events/errors.js +142 -0
- data/views/mdc/assets/js/components/events/loads.js +22 -0
- data/views/mdc/assets/js/components/events/navigates.js +17 -0
- data/views/mdc/assets/js/components/events/posts.js +99 -0
- data/views/mdc/assets/js/components/events/replaces.js +82 -0
- data/views/mdc/assets/js/components/events/selects.js +28 -0
- data/views/mdc/assets/js/components/events/snackbar.js +23 -0
- data/views/mdc/assets/js/components/events/toggle_visiblity.js +19 -0
- data/views/mdc/assets/js/components/forms.js +57 -0
- data/views/mdc/assets/js/components/icon-toggles.js +21 -0
- data/views/mdc/assets/js/components/initialize.js +34 -0
- data/views/mdc/assets/js/components/lists.js +4 -0
- data/views/mdc/assets/js/components/menus.js +31 -0
- data/views/mdc/assets/js/components/mixins/event-handler.js +13 -0
- data/views/mdc/assets/js/components/selects.js +45 -0
- data/views/mdc/assets/js/components/snackbar.js +32 -0
- data/views/mdc/assets/js/components/text-fields.js +77 -0
- data/views/mdc/assets/js/dialog-polyfill.js +738 -0
- data/views/mdc/assets/js/material.js +3996 -0
- data/views/mdc/assets/js/utils/urls.js +54 -0
- data/views/mdc/assets/scss/app.scss +31 -0
- data/views/mdc/assets/scss/components/avatar.scss +41 -0
- data/views/mdc/assets/scss/components/button.scss +47 -0
- data/views/mdc/assets/scss/components/card.scss +54 -0
- data/views/mdc/assets/scss/components/checkbox.scss +5 -0
- data/views/mdc/assets/scss/components/chip.scss +30 -0
- data/views/mdc/assets/scss/components/datetime.scss +0 -0
- data/views/mdc/assets/scss/components/dialog.scss +3 -0
- data/views/mdc/assets/scss/components/expansion-panel.scss +153 -0
- data/views/mdc/assets/scss/components/fab.scss +8 -0
- data/views/mdc/assets/scss/components/grid.scss +10 -0
- data/views/mdc/assets/scss/components/icon-toggles.scss +9 -0
- data/views/mdc/assets/scss/components/icon.scss +34 -0
- data/views/mdc/assets/scss/components/image.scss +24 -0
- data/views/mdc/assets/scss/components/list.scss +9 -0
- data/views/mdc/assets/scss/components/menu.scss +17 -0
- data/views/mdc/assets/scss/components/select.scss +16 -0
- data/views/mdc/assets/scss/components/snackbar.scss +5 -0
- data/views/mdc/assets/scss/components/switch.scss +6 -0
- data/views/mdc/assets/scss/components/table-pagination.scss +65 -0
- data/views/mdc/assets/scss/components/textfield.scss +1 -0
- data/views/mdc/assets/scss/components/typography.scss +25 -0
- data/views/mdc/assets/scss/material.blue_grey-orange.min.css +8 -0
- data/views/mdc/assets/scss/styles.scss +11 -0
- data/views/mdc/assets/scss/theme.scss +5 -0
- data/views/mdc/body/drawer.erb +18 -0
- data/views/mdc/body/drawers/menu.erb +25 -0
- data/views/mdc/body/footer.erb +1 -0
- data/views/mdc/body/footers/large.erb +27 -0
- data/views/mdc/body/footers/menu_item.erb +6 -0
- data/views/mdc/body/footers/small.erb +14 -0
- data/views/mdc/body/header.erb +25 -0
- data/views/mdc/body/snackbar.erb +10 -0
- data/views/mdc/components/avatar.erb +24 -0
- data/views/mdc/components/badge.erb +2 -0
- data/views/mdc/components/body.erb +2 -0
- data/views/mdc/components/button.erb +17 -0
- data/views/mdc/components/buttons/button.erb +20 -0
- data/views/mdc/components/buttons/fab.erb +22 -0
- data/views/mdc/components/buttons/icon.erb +24 -0
- data/views/mdc/components/card.erb +49 -0
- data/views/mdc/components/checkbox.erb +22 -0
- data/views/mdc/components/chip.erb +31 -0
- data/views/mdc/components/content.erb +11 -0
- data/views/mdc/components/date_time.erb +30 -0
- data/views/mdc/components/dialog.erb +27 -0
- data/views/mdc/components/display.erb +2 -0
- data/views/mdc/components/event.erb +18 -0
- data/views/mdc/components/expansion_panel.erb +11 -0
- data/views/mdc/components/form.erb +15 -0
- data/views/mdc/components/grid.erb +24 -0
- data/views/mdc/components/headline.erb +2 -0
- data/views/mdc/components/hidden_field.erb +1 -0
- data/views/mdc/components/icon.erb +30 -0
- data/views/mdc/components/icon_toggle.erb +15 -0
- data/views/mdc/components/image.erb +7 -0
- data/views/mdc/components/link.erb +14 -0
- data/views/mdc/components/list.erb +14 -0
- data/views/mdc/components/list/actions.erb +6 -0
- data/views/mdc/components/list/actions/button.erb +1 -0
- data/views/mdc/components/list/actions/checkbox.erb +1 -0
- data/views/mdc/components/list/actions/icon.erb +1 -0
- data/views/mdc/components/list/actions/icon_toggle.erb +1 -0
- data/views/mdc/components/list/actions/radio_button.erb +1 -0
- data/views/mdc/components/list/actions/switch.erb +1 -0
- data/views/mdc/components/list/avatar.erb +5 -0
- data/views/mdc/components/list/checkbox.erb +5 -0
- data/views/mdc/components/list/icon.erb +5 -0
- data/views/mdc/components/list/info.erb +1 -0
- data/views/mdc/components/list/line.erb +34 -0
- data/views/mdc/components/list/menu.erb +23 -0
- data/views/mdc/components/list/separator.erb +1 -0
- data/views/mdc/components/menu.erb +29 -0
- data/views/mdc/components/modal.erb +15 -0
- data/views/mdc/components/radio_button.erb +11 -0
- data/views/mdc/components/render.erb +4 -0
- data/views/mdc/components/select.erb +22 -0
- data/views/mdc/components/snackbar.erb +17 -0
- data/views/mdc/components/static.erb +7 -0
- data/views/mdc/components/subheading.erb +2 -0
- data/views/mdc/components/switch.erb +13 -0
- data/views/mdc/components/table.erb +13 -0
- data/views/mdc/components/table/header.erb +7 -0
- data/views/mdc/components/table/pagination.erb +24 -0
- data/views/mdc/components/table/row.erb +14 -0
- data/views/mdc/components/text_area.erb +8 -0
- data/views/mdc/components/text_field.erb +27 -0
- data/views/mdc/components/title.erb +4 -0
- data/views/mdc/components/tooltip.erb +5 -0
- data/views/mdc/components/typography.erb +13 -0
- data/views/mdc/init-depends.sh +2 -0
- data/views/mdc/layout.erb +50 -0
- data/views/mdc/package-lock.json +11524 -0
- data/views/mdc/package.json +39 -0
- data/views/mdc/web.erb +1 -0
- data/views/mdc/webpack.config.js +47 -0
- metadata +539 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aea3eb243aa5f86d7aa71a53c7d684eb683e647ab9b17af3e32301e2881e8de0
|
4
|
+
data.tar.gz: 84252fbeda896a5932596f7b01d52e0cdd7d2bb65ec2bd2d17626ceb8baa7d64
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1cadf5dd2065b5a3b373136966d9572909d42cfcfefc3c52e4b3d0a0f6b31ab2dc524548fa998234418e2cb6b1eb61c0322f3073c2227a0462a01668d843131e
|
7
|
+
data.tar.gz: 0ef8a6e7201f2ab172f34179eff871f03152925fc35a49aff307da50f987c4f92bf22b93480224a8c84abc478bb626ade9aa05da4cdd5b08bc755cc0933d5189
|
data/.gitignore
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
# Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
51
|
+
|
52
|
+
/.idea/
|
53
|
+
.DS_Store
|
54
|
+
.env
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.5.0
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
voom-presenters (0.1.0)
|
5
|
+
dry-configurable (~> 0.7)
|
6
|
+
dry-container (~> 0.6)
|
7
|
+
dry-inflector (~> 0.1)
|
8
|
+
ice_nine (~> 0.11)
|
9
|
+
redcarpet (~> 3.4)
|
10
|
+
sinatra (~> 2.0)
|
11
|
+
tzinfo (~> 1.2)
|
12
|
+
tzinfo-data (~> 1.2018)
|
13
|
+
|
14
|
+
GEM
|
15
|
+
remote: https://rubygems.org/
|
16
|
+
specs:
|
17
|
+
childprocess (0.9.0)
|
18
|
+
ffi (~> 1.0, >= 1.0.11)
|
19
|
+
coderay (1.1.1)
|
20
|
+
concurrent-ruby (1.0.5)
|
21
|
+
diff-lcs (1.2.5)
|
22
|
+
dry-configurable (0.7.0)
|
23
|
+
concurrent-ruby (~> 1.0)
|
24
|
+
dry-container (0.6.0)
|
25
|
+
concurrent-ruby (~> 1.0)
|
26
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
27
|
+
dry-inflector (0.1.2)
|
28
|
+
ffi (1.9.23)
|
29
|
+
ice_nine (0.11.2)
|
30
|
+
method_source (0.8.2)
|
31
|
+
mini_portile2 (2.3.0)
|
32
|
+
mustermann (1.0.2)
|
33
|
+
nokogiri (1.8.2)
|
34
|
+
mini_portile2 (~> 2.3.0)
|
35
|
+
pry (0.10.4)
|
36
|
+
coderay (~> 1.1.0)
|
37
|
+
method_source (~> 0.8.1)
|
38
|
+
slop (~> 3.4)
|
39
|
+
rack (2.0.4)
|
40
|
+
rack-protection (2.0.1)
|
41
|
+
rack
|
42
|
+
rack-test (0.8.2)
|
43
|
+
rack (>= 1.0, < 3)
|
44
|
+
rake (11.3.0)
|
45
|
+
redcarpet (3.4.0)
|
46
|
+
rspec (3.5.0)
|
47
|
+
rspec-core (~> 3.5.0)
|
48
|
+
rspec-expectations (~> 3.5.0)
|
49
|
+
rspec-mocks (~> 3.5.0)
|
50
|
+
rspec-core (3.5.4)
|
51
|
+
rspec-support (~> 3.5.0)
|
52
|
+
rspec-expectations (3.5.0)
|
53
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
54
|
+
rspec-support (~> 3.5.0)
|
55
|
+
rspec-html-matchers (0.9.1)
|
56
|
+
nokogiri (~> 1)
|
57
|
+
rspec (>= 3.0.0.a, < 4)
|
58
|
+
rspec-mocks (3.5.0)
|
59
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
60
|
+
rspec-support (~> 3.5.0)
|
61
|
+
rspec-support (3.5.0)
|
62
|
+
rubyzip (1.2.1)
|
63
|
+
selenium-webdriver (3.11.0)
|
64
|
+
childprocess (~> 0.5)
|
65
|
+
rubyzip (~> 1.2)
|
66
|
+
sinatra (2.0.1)
|
67
|
+
mustermann (~> 1.0)
|
68
|
+
rack (~> 2.0)
|
69
|
+
rack-protection (= 2.0.1)
|
70
|
+
tilt (~> 2.0)
|
71
|
+
slop (3.6.0)
|
72
|
+
thread_safe (0.3.6)
|
73
|
+
tilt (2.0.8)
|
74
|
+
tzinfo (1.2.5)
|
75
|
+
thread_safe (~> 0.1)
|
76
|
+
tzinfo-data (1.2018.5)
|
77
|
+
tzinfo (>= 1.0.0)
|
78
|
+
watir (6.10.3)
|
79
|
+
selenium-webdriver (~> 3.4, >= 3.4.1)
|
80
|
+
watir-rspec (3.0.0)
|
81
|
+
rspec (~> 3.0)
|
82
|
+
watir (>= 6.0.0.beta4)
|
83
|
+
webdrivers (3.2.4)
|
84
|
+
nokogiri (~> 1.6)
|
85
|
+
rubyzip (~> 1.0)
|
86
|
+
selenium-webdriver (~> 3.0)
|
87
|
+
|
88
|
+
PLATFORMS
|
89
|
+
ruby
|
90
|
+
|
91
|
+
DEPENDENCIES
|
92
|
+
bundler (~> 1.13)
|
93
|
+
pry (~> 0.10)
|
94
|
+
rack-test (~> 0.8)
|
95
|
+
rake (~> 11.3)
|
96
|
+
rspec (~> 3.0)
|
97
|
+
rspec-html-matchers
|
98
|
+
voom-presenters!
|
99
|
+
watir (~> 6.10.3)
|
100
|
+
watir-rspec
|
101
|
+
webdrivers (~> 3.0)
|
102
|
+
|
103
|
+
BUNDLED WITH
|
104
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Russell Edens
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Russell Edens
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Voom::Presenters
|
2
|
+
|
3
|
+
A Ruby DSL for describing user interfaces.
|
4
|
+
The semantics are adopted from [Material Design](https://material.io/).
|
5
|
+
|
6
|
+
A presenter generates a Presenter Object Model (POM).
|
7
|
+
A POM fully describes a user interface.
|
8
|
+
A POM client can fully render user interface from POM.
|
9
|
+
|
10
|
+
## Demo
|
11
|
+
|
12
|
+
git clone git@github.com:rx/presenters.git
|
13
|
+
cd presenters/
|
14
|
+
bundle install
|
15
|
+
rackup
|
16
|
+
|
17
|
+
open htt://localhost:9292
|
18
|
+
|
19
|
+
To see the POM:
|
20
|
+
|
21
|
+
open htt://localhost:9292/pom
|
22
|
+
|
23
|
+
|
24
|
+
## User Interface Engine
|
25
|
+
|
26
|
+
The POM + A POM Client is an interface engine.
|
27
|
+
|
28
|
+
This example downloads the POM of the index page.
|
29
|
+
Then posts it to the reference web client.
|
30
|
+
That result is then saved to a file and opened up with a browser.
|
31
|
+
|
32
|
+
curl localhost:9292/pom/index > $TMPDIR/index.json && curl -d "@$TMPDIR/index.json" -X POST localhost:9292/index > $TMPDIR/index.html && open $TMPDIR/index.html
|
33
|
+
|
34
|
+
## Usage
|
35
|
+
|
36
|
+
TODO: Write usage instructions here
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/rx/presenters.
|
41
|
+
|
42
|
+
## License
|
43
|
+
|
44
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
45
|
+
|
data/ROADMAP.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Voom::Presenters Roadmap
|
2
|
+
|
3
|
+
This is the roadmap for the presenters. It outlines the development direction.
|
4
|
+
|
5
|
+
## Components
|
6
|
+
* Tabs
|
7
|
+
* Chips
|
8
|
+
* Linear Progress
|
9
|
+
* Stepper - https://github.com/ahlechandre/mdl-stepper
|
10
|
+
* Table
|
11
|
+
* Select Events
|
12
|
+
* Paging
|
13
|
+
* Sorting
|
14
|
+
* Filtering
|
15
|
+
|
16
|
+
## Other
|
17
|
+
* Conditional presentation based on client capabilities
|
18
|
+
* For example, use a table on desktop and a list/card on mobile
|
19
|
+
|
20
|
+
## Web-Client
|
21
|
+
* Conversion to MDC for existing MDL components
|
data/Rakefile
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require_relative 'helpers/indented_grid'
|
3
|
+
|
4
|
+
Voom::Presenters.define(:component_status) do
|
5
|
+
helpers Voom::Presenters::Helpers::Inflector
|
6
|
+
helpers Demo::Helpers::IndentedGrid
|
7
|
+
|
8
|
+
attach 'top_nav'
|
9
|
+
attach 'component_drawer'
|
10
|
+
helpers do
|
11
|
+
def status
|
12
|
+
@status ||= YAML::load_file(File.join(__dir__, '../../component-status.yml'))
|
13
|
+
end
|
14
|
+
|
15
|
+
def item_color(item)
|
16
|
+
trace {item.inspect}
|
17
|
+
case item
|
18
|
+
when ->(i) {['low', 'not planned'].include?(i['Priority'])}
|
19
|
+
:lightgray
|
20
|
+
when ->(i) {(i.fetch('Completeness')||0) > 1}
|
21
|
+
:DarkSeaGreen
|
22
|
+
when ->(i) {(i.fetch('Completeness')||0)==1}
|
23
|
+
:LightYellow
|
24
|
+
when ->(i) {['medium', 'high'].include?(i['Priority']) && i['MDC']=='N' && i['MDL']=='N'}
|
25
|
+
:lightcoral
|
26
|
+
when ->(i) {i['Priority']=='medium'}
|
27
|
+
:coral
|
28
|
+
when ->(i) {i['Priority']=='now'}
|
29
|
+
:CornflowerBlue
|
30
|
+
else
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def key
|
36
|
+
items = [{'Completeness' => 2, text: 'Available'},
|
37
|
+
{'Priority' => 'high', 'Completeness'=>1, 'MDC' => nil, 'MDL' => nil, text: 'Available with caveats'},
|
38
|
+
{'Priority' => 'now', 'Completeness'=>0, 'MDC' => nil, 'MDL' => nil, text: 'In progress'},
|
39
|
+
{'Priority' => 'medium', 'Completeness'=>0, 'MDC' => nil, 'MDL' => nil, text: 'Up Next'},
|
40
|
+
{'Priority' => 'medium', 'Completeness'=>0, 'MDC' => 'N', 'MDL' => 'N', text: 'Implementation needed'},
|
41
|
+
{'Priority' => 'low', 'Completeness'=>0, 'MDC' => 'N', 'MDL' => 'N', text: 'Not Planned'},
|
42
|
+
|
43
|
+
]
|
44
|
+
table do
|
45
|
+
row do
|
46
|
+
items.each do |item|
|
47
|
+
column color: item_color(item)
|
48
|
+
column item[:text]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
indented_grid do
|
56
|
+
display 'Component Status'
|
57
|
+
key
|
58
|
+
table do
|
59
|
+
header do
|
60
|
+
status.first.keys.each do |heading|
|
61
|
+
column inflector.humanize(heading)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
status.each do |item|
|
66
|
+
row do
|
67
|
+
status.first.keys.each_with_index do |heading, index|
|
68
|
+
value = item[heading]
|
69
|
+
color = index ==0 ? item_color(item) : nil
|
70
|
+
column value, color: color
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require_relative 'helpers/indented_grid'
|
2
|
+
|
3
|
+
Voom::Presenters.define('components') do
|
4
|
+
helpers Demo::Helpers::IndentedGrid
|
5
|
+
attach 'top_nav'
|
6
|
+
attach 'component_drawer'
|
7
|
+
|
8
|
+
indented_grid do
|
9
|
+
display 'Components'
|
10
|
+
grid do
|
11
|
+
column 12 do
|
12
|
+
icon 'fa-hand-point-left', position: :left
|
13
|
+
subheading 'Select a component'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
attach :code, file: __FILE__
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../helpers/indented_grid'
|
2
|
+
|
3
|
+
Voom::Presenters.define(:badges) do
|
4
|
+
helpers Demo::Helpers::IndentedGrid
|
5
|
+
|
6
|
+
attach :top_nav
|
7
|
+
attach :component_drawer
|
8
|
+
indented_grid do
|
9
|
+
display 'Badges'
|
10
|
+
|
11
|
+
headline 'Number'
|
12
|
+
badge 1, icon: :account_box
|
13
|
+
|
14
|
+
headline 'Icon'
|
15
|
+
badge '♥', icon: :account_box
|
16
|
+
|
17
|
+
headline 'Number'
|
18
|
+
badge 1, text: 'Inbox'
|
19
|
+
|
20
|
+
headline 'Icon'
|
21
|
+
badge '♥', text: 'Mood'
|
22
|
+
|
23
|
+
attach :code, file: __FILE__
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative '../helpers/indented_grid'
|
2
|
+
|
3
|
+
Voom::Presenters.define(:buttons) do
|
4
|
+
helpers Demo::Helpers::IndentedGrid
|
5
|
+
attach :top_nav
|
6
|
+
attach :component_drawer
|
7
|
+
|
8
|
+
indented_grid do
|
9
|
+
display 'Buttons'
|
10
|
+
|
11
|
+
# Raised buttons
|
12
|
+
headline 'Raised Button'
|
13
|
+
button 'Button', type: :raised
|
14
|
+
|
15
|
+
subheading 'Disabled'
|
16
|
+
button 'Button', type: :raised, disabled: true
|
17
|
+
|
18
|
+
subheading ' Accent colored'
|
19
|
+
button 'Button', type: :raised, color: :secondary
|
20
|
+
|
21
|
+
headline 'Flat button'
|
22
|
+
button 'Button'
|
23
|
+
|
24
|
+
subheading 'Disabled'
|
25
|
+
button 'Button', type: :flat, disabled: true
|
26
|
+
|
27
|
+
subheading 'Accent colored flat'
|
28
|
+
button 'Button', type: :flat, color: :secondary
|
29
|
+
|
30
|
+
subheading 'Aligned'
|
31
|
+
grid do
|
32
|
+
column 3 do
|
33
|
+
button 'Not Aligned'
|
34
|
+
button 'Right', position: :right
|
35
|
+
button 'Left', position: :left
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Icon Buttons
|
40
|
+
headline 'Icon button'
|
41
|
+
button icon: :mood
|
42
|
+
subheading 'Colored'
|
43
|
+
button icon: :mood, color: :primary
|
44
|
+
button icon: :mood, color: :secondary
|
45
|
+
|
46
|
+
subheading 'with text'
|
47
|
+
button "I'm happy", icon: :mood
|
48
|
+
|
49
|
+
attach :code, file: __FILE__
|
50
|
+
end
|
51
|
+
end
|