@penskemediacorp/larva-patterns 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ c_input_type_attr: 'text',
3
+ c_input_id_attr: 'inputExample',
4
+ c_input_label_class: 'lrv-a-screen-reader-only',
5
+ c_input_label_text: 'Input Example',
6
+ c_input_class: '',
7
+ c_input_name: 'input_example',
8
+ c_input_placeholder_attr: 'Enter text.',
9
+ };
@@ -0,0 +1,13 @@
1
+ <label class="c-input" for="{{ id_attr }}">
2
+ <span class="{{ c_input_label_class }}">{{ c_input_label_text }}</span>
3
+ <input
4
+ type="{{ c_input_type_attr }}"
5
+ class="{{ c_input_class }}"
6
+ name="{{ c_input_name }}"
7
+ placeholder="{{ c_input_placeholder_attr }}"
8
+ aria-invalid="{{ c_input_aria_invalid_attr }}"
9
+ data-error="{{ c_input_error_attr }}"
10
+ size="{{ c_input_size_attr }}"
11
+ maxlength="{{ c_input_maxlength_attr }}"
12
+ />
13
+ </label>
@@ -2,7 +2,7 @@ const clonedeep = require('lodash.clonedeep');
2
2
 
3
3
  const c_svg = clonedeep(require('@penskemediacorp/larva-patterns/components/c-svg/c-svg.prototype'));
4
4
  const c_heading = clonedeep(require('@penskemediacorp/larva-patterns/components/c-heading/c-heading.prototype'));
5
- const o_text_input_group = clonedeep(require('@penskemediacorp/larva-patterns/objects/o-text-input-group/o-text-input-group.prototype'));
5
+ const o_input_group = clonedeep(require('@penskemediacorp/larva-patterns/objects/o-input-group/o-input-group.prototype'));
6
6
  const c_button = clonedeep(require('@penskemediacorp/larva-patterns/components/c-button/c-button.prototype'));
7
7
  const c_dek = clonedeep(require('@penskemediacorp/larva-patterns/components/c-dek/c-dek.prototype'));
8
8
 
@@ -12,24 +12,24 @@ c_svg.c_svg_classes = 'lrv-u-width-150 lrv-u-margin-lr-auto lrv-u-margin-b-2';
12
12
  c_heading.c_heading_classes += ' lrv-u-margin-b-2';
13
13
  c_heading.c_heading_text = 'You must be 21 to enter.';
14
14
 
15
- o_text_input_group.o_text_input_group_classes = 'lrv-u-margin-b-2';
16
- o_text_input_item = clonedeep( o_text_input_group.o_text_input_group_items[0] );
17
- o_text_input_item.c_text_input_classes = 'lrv-u-font-size-32 lrv-u-color-white lrv-u-background-color-grey-darkest lrv-u-padding-lr-050 lrv-u-padding-tb-150 lrv-u-width-100 lrv-u-text-align-center';
18
- o_text_input_item.c_text_input_size = 2;
19
- o_text_input_item.c_text_input_maxlength = 4;
15
+ o_input_group.o_input_group_class = 'lrv-u-margin-b-2';
16
+ o_input_group_item = clonedeep( o_input_group.o_input_group_items[0] );
17
+ o_input_group_item.c_input_class = 'lrv-u-font-size-32 lrv-u-color-white lrv-u-background-color-grey-darkest lrv-u-padding-lr-050 lrv-u-padding-tb-150 lrv-u-width-100 lrv-u-text-align-center';
18
+ o_input_group_item.c_input_size_attr = 2;
19
+ o_input_group_item.c_input_maxlength_attr = 4;
20
20
 
21
- o_text_input_day = clonedeep( o_text_input_item );
22
- o_text_input_month = clonedeep( o_text_input_item );
23
- o_text_input_year = clonedeep( o_text_input_item );
21
+ o_input_day_item = clonedeep( o_input_group_item );
22
+ o_input_month_item = clonedeep( o_input_group_item );
23
+ o_input_year_item = clonedeep( o_input_group_item );
24
24
 
25
- o_text_input_day.c_text_input_placeholder = 'DD';
26
- o_text_input_month.c_text_input_placeholder = 'MM';
27
- o_text_input_year.c_text_input_placeholder = 'YYYY';
25
+ o_input_day_item.c_input_placeholder_attr = 'DD';
26
+ o_input_month_item.c_input_placeholder_attr = 'MM';
27
+ o_input_year_item.c_input_placeholder_attr = 'YYYY';
28
28
 
29
- o_text_input_group.o_text_input_group_items = [
30
- o_text_input_day,
31
- o_text_input_month,
32
- o_text_input_year
29
+ o_input_group.o_input_group_items = [
30
+ o_input_day_item,
31
+ o_input_month_item,
32
+ o_input_year_item
33
33
  ];
34
34
 
35
35
  c_button.c_button_classes = ' lrv-u-color-white lrv-u-background-color-brand-primary lrv-u-padding-lr-2 lrv-u-padding-tb-075 lrv-u-margin-b-2 lrv-u-text-align-center lrv-u-text-transform-uppercase lrv-u-font-size-32 lrv-u-font-size-18@mobile-max';
@@ -37,15 +37,15 @@ c_button.c_button_classes = ' lrv-u-color-white lrv-u-background-color-brand-pri
37
37
  c_dek.c_dek_text = 'Legal text.'
38
38
 
39
39
  module.exports = {
40
- age_gate_classes: 'lrv-u-height-100p lrv-u-padding-t-2 lrv-u-background-color-black lrv-u-text-align-center lrv-u-color-white',
41
- age_gate_inner_classes: 'lrv-u-max-width-1000 lrv-u-margin-lr-auto',
42
- age_gate_form_classes: 'lrv-u-border-b-1',
43
- age_gate_error_classes: '',
44
- form_wrapper_classes: '',
45
- age_gate_footer_classes: 'lrv-u-border-t-1 lrv-u-margin-t-025',
40
+ age_gate_class: 'lrv-u-height-100p lrv-u-padding-t-2 lrv-u-background-color-black lrv-u-text-align-center lrv-u-color-white',
41
+ age_gate_inner_class: 'lrv-u-max-width-1000 lrv-u-margin-lr-auto',
42
+ age_gate_form_class: 'lrv-u-border-b-1',
43
+ age_gate_error_class: '',
44
+ form_wrapper_class: '',
45
+ age_gate_footer_class: 'lrv-u-border-t-1 lrv-u-margin-t-025',
46
46
  c_heading,
47
47
  c_svg,
48
- o_text_input_group,
48
+ o_input_group,
49
49
  c_button,
50
50
  c_dek
51
51
  };
@@ -1,23 +1,23 @@
1
- <div class="age-gate // js-AgeGate {{ age_gate_classes }}">
2
- <div class="age-gate-inner // {{ age_gate_inner_classes }}">
3
- <div class="age-gate-header // {{ age_gate_header_classes }}">
1
+ <div class="age-gate // js-AgeGate {{ age_gate_class }}">
2
+ <div class="age-gate-inner // {{ age_gate_inner_class }}">
3
+ <div class="age-gate-header // {{ age_gate_header_class }}">
4
4
  {% include "@larva/components/c-svg/c-svg.twig" with c_svg %}
5
5
  {% if c_heading %}
6
6
  {% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
7
7
  {% endif %}
8
8
  </div>
9
- <div class="age-gate-form // {{ age_gate_form_classes }}">
9
+ <div class="age-gate-form // {{ age_gate_form_class }}">
10
10
  <form class="js-AgeGateForm">
11
- {% if o_text_input_group %}
12
- {% include "@larva/objects/o-text-input-group/o-text-input-group.twig" with o_text_input_group %}
11
+ {% if o_input_group %}
12
+ {% include "@larva/objects/o-input-group/o-input-group.twig" with o_input_group %}
13
13
  {% endif %}
14
- <div class="age-gate-error // {{ age_gate_error_classes }}"></div>
14
+ <div class="age-gate-error // {{ age_gate_error_class }}"></div>
15
15
  <div class="age-gate-button-wrapper">
16
16
  {% include "@larva/components/c-button/c-button.twig" with c_button %}
17
17
  </div>
18
18
  </form>
19
19
  </div>
20
- <div class="age-gate-footer // {{ age_gate_footer_classes }}">
20
+ <div class="age-gate-footer // {{ age_gate_footer_class }}">
21
21
  {% if c_dek %}
22
22
  {% include "@larva/components/c-dek/c-dek.twig" with c_dek %}
23
23
  {% endif %}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Properties intentionally not prefixed with module name to avoid twig-to-php parser issues.
3
+ */
4
+ const clonedeep = require( 'lodash.clonedeep' );
5
+ const c_input = clonedeep(require('@penskemediacorp/larva-patterns/components/c-input/c-input.prototype'));
6
+
7
+ module.exports = {
8
+ o_input_group_class: '',
9
+ o_input_group_items: [
10
+ c_input,
11
+ c_input,
12
+ c_input
13
+ ]
14
+ };
@@ -0,0 +1,6 @@
1
+ {# Properties intentionally not prefixed with module name to avoid twig-to-php parser issues. #}
2
+ <div class="o-input-group {{ o_input_group_class }}">
3
+ {% for item in o_input_group_items %}
4
+ {% include "@larva/components/c-input/c-input.twig" with item %}
5
+ {% endfor %}
6
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@penskemediacorp/larva-patterns",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Larva markup patterns.",
5
5
  "author": "laras126 <laras126@gmail.com>",
6
6
  "homepage": "https://github.com/Penske-Media-Corp/pmc-larva/tree/master/packages/patterns#readme",
@@ -20,10 +20,10 @@
20
20
  "url": "https://github.com/Penske-Media-Corp/pmc-larva/issues"
21
21
  },
22
22
  "dependencies": {
23
- "@penskemediacorp/larva-css": "^0.7.0",
23
+ "@penskemediacorp/larva-css": "^0.7.1",
24
24
  "@penskemediacorp/larva-js": "^0.7.0",
25
25
  "@penskemediacorp/larva-svg": "^0.7.0",
26
26
  "lodash.clonedeep": "^4.5.0"
27
27
  },
28
- "gitHead": "4f647cfb574dcae8905f806957c7dfa75420dbbe"
28
+ "gitHead": "c67261fe638b9c40d03875515249d147221d0a08"
29
29
  }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- c_text_input_id: 'inputExample',
3
- c_text_input_label_classes: 'lrv-a-screen-reader-only',
4
- c_text_input_label_text: 'Input Example',
5
- c_text_input_classes: '',
6
- c_text_input_name: 'input_example',
7
- c_text_input_placeholder: 'Enter text.',
8
- };
@@ -1,13 +0,0 @@
1
- <label class="c-text-input" for="{{ c_text_input_id }}">
2
- <span class="{{ c_text_input_label_classes }}">{{ c_text_input_label_text }}</span>
3
- <input
4
- type="text"
5
- class="{{ c_text_input_classes }}"
6
- name="{{ c_text_input_name }}"
7
- placeholder="{{ c_text_input_placeholder }}"
8
- aria-invalid="{{ c_text_input_aria_invalid }}"
9
- data-error="{{ c_text_input_error }}"
10
- size="{{ c_text_input_size }}"
11
- maxlength="{{ c_text_input_maxlength }}"
12
- />
13
- </label>
@@ -1,11 +0,0 @@
1
- const clonedeep = require( 'lodash.clonedeep' );
2
- const c_text_input = clonedeep(require('@penskemediacorp/larva-patterns/components/c-text-input/c-text-input.prototype'));
3
-
4
- module.exports = {
5
- o_text_input_group_classes: '',
6
- o_text_input_group_items: [
7
- c_text_input,
8
- c_text_input,
9
- c_text_input
10
- ]
11
- };
@@ -1,5 +0,0 @@
1
- <div class="o-input-text-group {{ o_text_input_group_classes }}">
2
- {% for item in o_text_input_group_items %}
3
- {% include "@larva/components/c-text-input/c-text-input.twig" with item %}
4
- {% endfor %}
5
- </div>