barbican-reset 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div :class="$style.container">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script type="text/javascript">
8
+ export default {
9
+ name: 'FormSection',
10
+ }
11
+ </script>
12
+
13
+ <style lang="scss" module>
14
+
15
+ .container {
16
+ padding: 0.875rem 0.75rem 0.625rem 0.75rem;
17
+ border-left: 0.25rem solid;
18
+ background: $c-grey-alpine;
19
+ margin-bottom: 1rem;
20
+ font-weight: 700;
21
+ }
22
+
23
+ </style>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div :class="$style.container">
3
+ <div :class="$style.input"><slot /></div>
4
+ <b-button class="btn-update" @click.prevent="$emit('update')">update</b-button>
5
+ </div>
6
+ </template>
7
+
8
+ <script type="text/javascript">
9
+ export default {
10
+ name: 'FormUpdate',
11
+ }
12
+ </script>
13
+
14
+ <style lang="scss" module>
15
+
16
+ .container {
17
+ grid-template-columns: auto 6rem;
18
+ column-gap: 0.5rem;
19
+ display: grid;
20
+
21
+ @include media-breakpoint-up(sm) {
22
+ column-gap: 1rem;
23
+ }
24
+ }
25
+
26
+ .input {
27
+ @include all-text-inputs;
28
+ user-select: none;
29
+ overflow: hidden;
30
+ }
31
+
32
+ </style>
@@ -1,5 +1,5 @@
1
1
 
2
- @mixin button_setup {
2
+ @mixin button-setup {
3
3
  -webkit-font-smoothing: antialiased;
4
4
  -moz-osx-font-smoothing: grayscale;
5
5
  border-radius: $border-radius-lg;
@@ -11,7 +11,7 @@
11
11
  padding: 1em;
12
12
  }
13
13
 
14
- @mixin button_display($display:'ib',$gap:1rem) {
14
+ @mixin button-display($display:'ib',$gap:1rem) {
15
15
  @if $display == 'ib' {
16
16
  vertical-align: middle;
17
17
  display: inline-block;
@@ -28,7 +28,7 @@
28
28
  }
29
29
  }
30
30
 
31
- @mixin button_solid(
31
+ @mixin button-solid(
32
32
  $background: $c-brand-orange,
33
33
  $color: $white,
34
34
  $border: 1px,
@@ -40,7 +40,7 @@
40
40
  padding: $padding;
41
41
  color: $color;
42
42
 
43
- @if $display { @include button_display($display, $padding * 0.625); }
43
+ @if $display { @include button-display($display, $padding * 0.625); }
44
44
  @if $line { line-height: $line; }
45
45
 
46
46
  @include focus {
@@ -51,7 +51,7 @@
51
51
  }
52
52
  }
53
53
 
54
- @mixin button_outline(
54
+ @mixin button-outline(
55
55
  $color: $c-brand-orange,
56
56
  $background: $white,
57
57
  $border: 1px,
@@ -63,7 +63,7 @@
63
63
  padding: $padding;
64
64
  color: $color;
65
65
 
66
- @if $display { @include button_display($display, $padding * 0.625); }
66
+ @if $display { @include button-display($display, $padding * 0.625); }
67
67
  @if $line { line-height: $line; }
68
68
 
69
69
  @include focus {
@@ -73,7 +73,7 @@
73
73
  }
74
74
  }
75
75
 
76
- @mixin button_link(
76
+ @mixin button-link(
77
77
  $color: inherit,
78
78
  $background: transparent,
79
79
  $padding: 0,
@@ -93,7 +93,7 @@
93
93
  }
94
94
 
95
95
  @mixin btn-outline-header {
96
- @include button_outline(
96
+ @include button-outline(
97
97
  $color: $white,
98
98
  $background: $c-brand-orange,
99
99
  $border: 0.125rem,
@@ -101,46 +101,47 @@
101
101
  }
102
102
 
103
103
  @mixin btn-primary {
104
- @include button_solid;
104
+ @include button-solid;
105
+ min-width: 8rem;
105
106
  }
106
107
 
107
108
  @mixin btn-outline-primary {
108
- @include button_outline;
109
+ @include button-outline;
109
110
  }
110
111
 
111
112
  @mixin btn-secondary {
112
- @include button_solid($c-grey-night);
113
+ @include button-solid($c-grey-night);
113
114
  }
114
115
 
115
116
  @mixin btn-outline-secondary {
116
- @include button_outline($c-grey-night);
117
+ @include button-outline($c-grey-night);
117
118
  }
118
119
 
119
120
  @mixin btn-cinema {
120
- @include button_solid($c-brand-cinema);
121
+ @include button-solid($c-brand-cinema);
121
122
  }
122
123
 
123
124
  @mixin btn-power {
124
- @include button_solid($c-power-blue);
125
+ @include button-solid($c-power-blue);
125
126
  }
126
127
 
127
128
  @mixin btn-info {
128
- @include button_solid($c-status-neutral);
129
+ @include button-solid($c-status-neutral);
129
130
  }
130
131
 
131
132
  @mixin btn-outline-cinema {
132
- @include button_outline($c-brand-cinema);
133
+ @include button-outline($c-brand-cinema);
133
134
  }
134
135
 
135
136
  @mixin btn-remove {
136
- @include button_solid(
137
+ @include button-solid(
137
138
  $background: $c-grey-night,
138
139
  $padding: 0.625rem,
139
140
  $line: 1.375);
140
141
  }
141
142
 
142
143
  @mixin btn-link {
143
- @include button_link {
144
+ @include button-link {
144
145
  @include single-box($c-grey-night);
145
146
  background-color: $c-grey-night;
146
147
  color: $white;
@@ -148,7 +149,7 @@
148
149
  }
149
150
 
150
151
  @mixin btn-exit {
151
- @include button_link {
152
+ @include button-link {
152
153
  @include single-box($c-grey-night);
153
154
  background-color: $white;
154
155
  border-radius: 50%;
@@ -174,14 +175,14 @@
174
175
  }
175
176
 
176
177
  @mixin btn-membership-card {
177
- @include button_outline(
178
+ @include button-outline(
178
179
  $color: $white,
179
180
  $background: transparent
180
181
  );
181
182
  }
182
183
 
183
184
  @mixin btn-video-login {
184
- @include button_solid(
185
+ @include button-solid(
185
186
  $background: $white,
186
187
  $color: $c-splash-videos
187
188
  );
@@ -32,18 +32,6 @@
32
32
  }
33
33
  }
34
34
 
35
- // @mixin all-text-inputs {
36
- // border: solid $border-width $c-border-strong;
37
- // $background: lighten($c-grey-alpine, 1%);
38
- // border-radius: $border-radius-sm;
39
- // background-color: $background;
40
- // // padding: 0.8rem 0.8rem 0.6rem;
41
-
42
- // &:focus {
43
- // background-color: $background;
44
- // }
45
- // }
46
-
47
35
  @mixin card-container {
48
36
  border-radius: $border-radius-lg;
49
37
  background-color: $white;
@@ -8,4 +8,11 @@
8
8
  -webkit-font-smoothing: subpixel-antialiased;
9
9
  -moz-osx-font-smoothing: auto;
10
10
  }
11
+ }
12
+
13
+ @mixin all-text-inputs {
14
+ border: solid $border-width $c-border-strong;
15
+ padding: 0.875rem 0.875rem 0.75rem;
16
+ background-color: $c-grey-alpine;
17
+ border-radius: $border-radius-lg;
11
18
  }
package/index.js CHANGED
@@ -6,7 +6,6 @@ import EventSummary from './components/event_summary'
6
6
  import AccountCard from './components/account_card'
7
7
  import AccountTitle from './components/account_title'
8
8
  import Wrap from './components/wrap'
9
- import FormRow from './components/form_row'
10
9
  import TableRow from './components/table_row'
11
10
  import Banner from './components/banner'
12
11
  import Notification from './components/notification'
@@ -16,6 +15,8 @@ import TypeText from './components/type_text'
16
15
  import Placeholder from './components/placeholder'
17
16
  import Carousel from './components/carousel'
18
17
  import CardDeck from './components/card_deck'
18
+ import FormSection from './components/form_section'
19
+ import FormUpdate from './components/form_update'
19
20
 
20
21
  export {
21
22
  LoadingAnimation,
@@ -30,7 +31,8 @@ export {
30
31
  AccountCard,
31
32
  AccountTitle,
32
33
  Placeholder,
33
- FormRow,
34
+ FormSection,
35
+ FormUpdate,
34
36
  TableRow,
35
37
  Block,
36
38
  EventSummary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "A collection of useful scss imports and js scripts, that provide consistent styling and functionality across barbican projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/scss/_btn.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  .btn {
2
- @include button_setup;
2
+ @include button-setup;
3
3
 
4
4
  &.btn-primary {
5
5
  // solid orange
@@ -75,4 +75,8 @@
75
75
  }
76
76
  }
77
77
  }
78
+ }
79
+
80
+ .custom-checkbox label {
81
+ font-weight: 400;
78
82
  }
@@ -0,0 +1,59 @@
1
+
2
+ form > .form-group {
3
+ @include media-breakpoint-up(sm) {
4
+ grid-template-columns: 33fr 67fr;
5
+ align-items: center;
6
+ gap: $gap-account;
7
+ display: grid;
8
+ }
9
+
10
+ > div:first-child {
11
+ @include media-breakpoint-up(sm) {
12
+ grid-column: 2 / 3;
13
+ }
14
+ }
15
+ }
16
+
17
+ .form-group {
18
+ &:not(:last-of-type) {
19
+ margin-bottom: 1rem;
20
+ }
21
+
22
+ legend {
23
+ padding: 0 !important;
24
+ font-weight: 700;
25
+
26
+ @include media-breakpoint-down(sm) {
27
+ margin-bottom: 0.5rem;
28
+ }
29
+ }
30
+ }
31
+
32
+ .form-group[submit] {
33
+ text-align: right;
34
+
35
+ @include media-breakpoint-down(sm) {
36
+ button {
37
+ width: 100%;
38
+ }
39
+ }
40
+ }
41
+
42
+ @mixin label-status($content: '(required)') {
43
+ margin-left: 0.375rem;
44
+ display: inline-block;
45
+ content: $content;
46
+ font-weight: 400;
47
+ }
48
+
49
+ .form-group[required] {
50
+ legend::after {
51
+ @include label-status;
52
+ }
53
+ }
54
+
55
+ .form-group[optional] {
56
+ legend::after {
57
+ @include label-status('(optional)');
58
+ }
59
+ }
package/scss/_input.scss CHANGED
@@ -34,8 +34,5 @@ input[type=submit] {
34
34
  }
35
35
 
36
36
  #{$all-text-inputs} {
37
- border: solid $border-width $c-border-strong;
38
- padding: 0.875rem 0.875rem 0.75rem;
39
- background-color: $c-grey-alpine;
40
- border-radius: $border-radius-lg;
37
+ @include all-text-inputs;
41
38
  }
@@ -0,0 +1,4 @@
1
+
2
+ .custom-radio label {
3
+ font-weight: 400;
4
+ }
@@ -25,6 +25,10 @@
25
25
  margin: 0;
26
26
  }
27
27
 
28
+ .card-body {
29
+ padding: 1.5rem;
30
+ }
31
+
28
32
  .card-img {
29
33
  border: 1px solid $c-grey-concrete;
30
34
  margin-bottom: 1rem;
package/scss/index.scss CHANGED
@@ -17,9 +17,11 @@
17
17
  @import "checkbox.scss";
18
18
  @import "checkbox-group.scss";
19
19
  @import "form.scss";
20
+ @import "form-group.scss";
20
21
  @import "list.scss";
21
22
  @import "input.scss";
22
23
  @import "radio-group.scss";
24
+ @import "radio.scss";
23
25
 
24
26
  // atomic helper styles
25
27
  @import "atomic.scss";
@@ -1,91 +0,0 @@
1
- <template>
2
- <div :class="$style.container">
3
- <label v-if="label" :for="id">
4
- <strong>{{ label }}</strong> <span v-if="label && required">(required)</span><span v-if="label && optional">(optional)</span>
5
- </label>
6
- <div :class="styleContent">
7
- <slot />
8
- </div>
9
- </div>
10
- </template>
11
-
12
- <script type="text/javascript">
13
- export default {
14
- name: 'FormRow',
15
- props: {
16
- label: {
17
- type: String
18
- },
19
- id: {
20
- type: String
21
- },
22
- required: {
23
- type: Boolean
24
- },
25
- optional: {
26
- type: Boolean
27
- },
28
- submit: {
29
- type: Boolean
30
- }
31
- },
32
- computed: {
33
- styleContent() {
34
- const style = this.$style;
35
- let output = [style.content];
36
- if (!this.label) { output.push(style.no_label); }
37
- if (this.submit) { output.push(style.submit); }
38
- return output;
39
- }
40
- }
41
- }
42
- </script>
43
-
44
- <style lang="scss" module>
45
-
46
- .container {
47
-
48
- &:not(:last-of-type) {
49
- margin-bottom: 1rem;
50
- }
51
-
52
- @include media-breakpoint-up(sm) {
53
- grid-template-columns: 33fr 67fr;
54
- align-items: center;
55
- gap: $gap-account;
56
- display: grid;
57
- }
58
-
59
- label {
60
- font-weight: normal;
61
-
62
- @include media-breakpoint-down(sm) {
63
- margin-bottom: 0.5rem;
64
- }
65
- }
66
-
67
- input {
68
- margin: 0;
69
- }
70
- }
71
-
72
- .content {
73
-
74
- &.no_label {
75
- @include media-breakpoint-up(sm) {
76
- grid-column: 2 / 3;
77
- }
78
- }
79
-
80
- &.submit {
81
- text-align: right;
82
-
83
- @include media-breakpoint-down(sm) {
84
- > button {
85
- width: 100%;
86
- }
87
- }
88
- }
89
- }
90
-
91
- </style>