@propelinc/citrus-ui 0.5.1-dev.1 → 0.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propelinc/citrus-ui",
3
- "version": "0.5.1-dev.1",
3
+ "version": "0.5.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/propelinc/citrus-ui"
@@ -137,7 +137,7 @@ export default class CButton extends Vue {
137
137
  .button__icon {
138
138
  font-size: $font-size-x-large;
139
139
  height: 24px;
140
- left: 0;
140
+ left: -8px;
141
141
  position: absolute;
142
142
  top: 50%;
143
143
  transform: translateY(-50%);
@@ -49,7 +49,6 @@ export default class CNotification extends Vue {
49
49
  /** Makes the background red, etc. */
50
50
  @Prop(Boolean) alert?: boolean;
51
51
 
52
- @Prop({ type: String, default: '' }) oneTimeMessageName!: string;
53
52
  @Prop(Boolean) dismissible?: boolean;
54
53
 
55
54
  @Prop(String) title?: string;
@@ -49,13 +49,16 @@ $border-radius: 8px;
49
49
  $font-family-object-sans: objectsans;
50
50
  $font-family-blitz: blitz;
51
51
 
52
+ $font-family-base: $font-family-object-sans, sans-serif;
53
+ $font-family-script: $font-family-blitz, script;
54
+
52
55
  $font-weight-thin: 100;
53
- $font-weight-light: 300; // Currently unused, but holding its place in case we add it.
56
+ $font-weight-light: 300;
54
57
  $font-weight-normal: 400;
55
58
  $font-weight-medium: 500; // Currently unused, but holding its place in case we add it.
56
59
  $font-weight-bold: 700;
57
60
  $font-weight-heavy: 800;
58
- $font-weight-black: 900;
61
+ $font-weight-black: 900; // Currently unused, but holding its place in case we add it.
59
62
 
60
63
  $font-size-3x-large: 48px;
61
64
  $font-size-2x-large: 35px;
@@ -64,81 +67,125 @@ $font-size-large: 21px;
64
67
  $font-size-medium: 15px;
65
68
  $font-size-small: 12px;
66
69
 
67
- $line-height-balance: 100%;
68
- $line-height-large-headline: 130%;
69
- $line-height-large-headline-script: 85%;
70
- $line-height-headline: 130%;
71
- $line-height-subheadline: 150%;
72
- $line-height-body: 150%;
73
- $line-height-statement: 100%;
74
- $line-height-caption: 130%;
75
- $line-height-overline: 100%;
76
-
77
- $letter-spacing-overline: 0.5px;
70
+ $balance: (
71
+ "size": $font-size-2x-large,
72
+ "weight": $font-weight-thin,
73
+ "line-height": 100%,
74
+ "letter-spacing": normal,
75
+ );
76
+
77
+ $balance-dollar: (
78
+ "size": $font-size-x-large,
79
+ "weight": $font-weight-light,
80
+ "line-height": 100%,
81
+ "letter-spacing": normal,
82
+ );
83
+
84
+ $large-headline: (
85
+ "size": $font-size-x-large,
86
+ "weight": $font-weight-bold,
87
+ "line-height": 130%,
88
+ "letter-spacing": normal,
89
+ );
90
+
91
+ $large-headline-script: (
92
+ "size": $font-size-2x-large,
93
+ "weight": $font-weight-normal,
94
+ "line-height": 85%,
95
+ "letter-spacing": normal,
96
+ "font-family": $font-family-script,
97
+ );
98
+
99
+ $headline: (
100
+ "size": $font-size-large,
101
+ "weight": $font-weight-bold,
102
+ "line-height": 130%,
103
+ "letter-spacing": normal,
104
+ );
105
+
106
+ $subheadline: (
107
+ "size": $font-size-medium,
108
+ "weight": $font-weight-bold,
109
+ "line-height": 150%,
110
+ "letter-spacing": normal,
111
+ );
112
+
113
+ $body: (
114
+ "size": $font-size-medium,
115
+ "weight": $font-weight-normal,
116
+ "line-height": 150%,
117
+ "letter-spacing": normal,
118
+ );
119
+
120
+ $statement: map-merge(
121
+ $body,
122
+ (
123
+ "line-height": 100%,
124
+ )
125
+ );
126
+
127
+ $caption: (
128
+ "size": $font-size-small,
129
+ "weight": $font-weight-normal,
130
+ "line-height": 130%,
131
+ "letter-spacing": normal,
132
+ );
133
+
134
+ $overline: (
135
+ "size": $font-size-small,
136
+ "weight": $font-weight-heavy,
137
+ "line-height": 100%,
138
+ "letter-spacing": 0.5px,
139
+ "text-transform": uppercase,
140
+ );
141
+
142
+ @mixin create-type-mixin($type-style) {
143
+ font-family: map-get($type-style, "font-family");
144
+ font-size: map-get($type-style, "size");
145
+ font-weight: map-get($type-style, "weight");
146
+ letter-spacing: map-get($type-style, "letter-spacing");
147
+ line-height: map-get($type-style, "line-height");
148
+ text-transform: map-get($type-style, "text-transform");
149
+ }
78
150
 
79
151
  @mixin balance {
80
- font-family: $font-family-object-sans;
81
- font-size: $font-size-2x-large;
82
- font-weight: $font-weight-thin;
83
- line-height: $line-height-balance;
152
+ @include create-type-mixin($balance);
153
+ }
154
+
155
+ @mixin balance-dollar {
156
+ @include create-type-mixin($balance-dollar);
84
157
  }
85
158
 
86
159
  @mixin large-headline {
87
- font-family: $font-family-object-sans;
88
- font-size: $font-size-x-large;
89
- font-weight: $font-weight-bold;
90
- line-height: $line-height-large-headline;
160
+ @include create-type-mixin($large-headline);
91
161
  }
92
162
 
93
163
  @mixin large-headline-script {
94
- font-family: $font-family-blitz !important;
95
- font-size: $font-size-2x-large !important;
96
- font-weight: $font-weight-normal;
97
- line-height: $line-height-large-headline-script;
164
+ @include create-type-mixin($large-headline-script);
98
165
  }
99
166
 
100
167
  @mixin headline {
101
- font-family: $font-family-object-sans;
102
- font-size: $font-size-large;
103
- font-weight: $font-weight-bold;
104
- line-height: $line-height-headline;
168
+ @include create-type-mixin($headline);
105
169
  }
106
170
 
107
171
  @mixin subheadline {
108
- font-family: $font-family-object-sans;
109
- font-size: $font-size-medium;
110
- font-weight: $font-weight-medium;
111
- line-height: $line-height-subheadline;
172
+ @include create-type-mixin($subheadline);
112
173
  }
113
174
 
114
- @mixin body() {
115
- font-family: $font-family-object-sans;
116
- font-size: $font-size-medium;
117
- font-weight: $font-weight-normal;
118
- line-height: $line-height-body;
175
+ @mixin body {
176
+ @include create-type-mixin($body);
119
177
  }
120
178
 
121
- @mixin statement() {
122
- @include body();
123
-
124
- line-height: $line-height-statement;
179
+ @mixin statement {
180
+ @include create-type-mixin($statement);
125
181
  }
126
182
 
127
- @mixin caption() {
128
- font-family: $font-family-object-sans;
129
- font-size: $font-size-small;
130
- font-weight: $font-weight-normal;
131
- letter-spacing: 0;
132
- line-height: $line-height-caption;
183
+ @mixin caption {
184
+ @include create-type-mixin($caption);
133
185
  }
134
186
 
135
- @mixin overline() {
136
- font-family: $font-family-object-sans;
137
- font-size: $font-size-small ;
138
- font-weight: $font-weight-heavy;
139
- letter-spacing: $letter-spacing-overline;
140
- line-height: $line-height-overline;
141
- text-transform: uppercase;
187
+ @mixin overline {
188
+ @include create-type-mixin($overline);
142
189
  }
143
190
 
144
191
  // ICONS
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  @include object-sans($font-weight-thin, 'ObjectSans-Thin', 'ObjectSans-ThinSlanted');
20
+ @include object-sans($font-weight-light, 'ObjectSans-Light', 'ObjectSans-LightSlanted');
20
21
  @include object-sans($font-weight-normal, 'ObjectSans-Regular', 'ObjectSans-Slanted');
21
- @include object-sans($font-weight-medium, 'ObjectSans-Medium', 'ObjectSans-MediumSlanted');
22
22
  @include object-sans($font-weight-bold, 'ObjectSans-Bold', 'ObjectSans-BoldSlanted');
23
23
  @include object-sans($font-weight-heavy, 'ObjectSans-Heavy', 'ObjectSans-HeavySlanted');
@@ -1,36 +1,39 @@
1
1
  @import "./core.scss";
2
2
 
3
- .providers.providers-theme {
4
- .balance {
5
- @include balance;
6
- }
7
-
8
- .large-headline {
9
- @include large-headline;
10
- }
11
-
12
- .large-headline-script {
13
- @include large-headline-script;
14
- }
15
-
16
- .headline {
17
- @include headline;
18
- }
19
-
20
- .subheadline {
21
- @include subheadline;
22
- }
23
-
24
- p,
25
- .body {
26
- @include body;
27
- }
28
-
29
- .statement {
30
- @include statement;
31
- }
32
-
33
- .font-family-blitz {
34
- font-family: $font-family-blitz;
35
- }
3
+ // NOTE(mohan): The overline and caption classes are generated by Vuetify.
4
+ .balance {
5
+ @include balance;
36
6
  }
7
+
8
+ .balance-dollar {
9
+ @include balance-dollar;
10
+ }
11
+
12
+ .large-headline {
13
+ @include large-headline;
14
+ }
15
+
16
+ .large-headline-script {
17
+ @include large-headline-script;
18
+ }
19
+
20
+ .headline {
21
+ @include headline;
22
+ }
23
+
24
+ .subheadline {
25
+ @include subheadline;
26
+ }
27
+
28
+ .body {
29
+ @include body;
30
+ }
31
+
32
+ .statement {
33
+ @include statement;
34
+ }
35
+
36
+ .font-family-blitz {
37
+ font-family: $font-family-blitz;
38
+ }
39
+
@@ -14,8 +14,8 @@
14
14
  // ****************************************************************************
15
15
  $font-size-root: 15px;
16
16
 
17
- $body-font-family: $font-family-object-sans;
18
- $heading-font-family: $font-family-object-sans;
17
+ $body-font-family: $font-family-base;
18
+ $heading-font-family: $font-family-base;
19
19
 
20
20
  $font-weights: (
21
21
  "thin": $font-weight-thin,
@@ -25,46 +25,18 @@ $font-weights: (
25
25
  "heavy": $font-weight-heavy,
26
26
  );
27
27
 
28
- $body: (
29
- "size": $font-size-medium,
30
- "weight": $font-weight-normal,
31
- "line-height": $line-height-body,
32
- "letter-spacing": normal
33
- );
34
-
35
28
  $headings: (
36
- "h1": (
37
- "size": $font-size-x-large,
38
- "weight": $font-weight-bold,
39
- "line-height": $line-height-large-headline,
40
- "letter-spacing": normal
41
- ),
42
- "h2": (
43
- "size": $font-size-large,
44
- "weight": $font-weight-bold,
45
- "line-height": $line-height-headline,
46
- "letter-spacing": normal
47
- ),
48
- "h3": (
49
- "size": $font-size-medium,
50
- "weight": $font-weight-medium,
51
- "line-height": $line-height-subheadline,
52
- "letter-spacing": normal
53
- ),
29
+ "h1": $large-headline,
30
+ "h2": $headline,
31
+ "h3": $subheadline,
32
+ // NOTE(mohan): Vuetify generates a `headline` class using these styles.
33
+ // This class has a tendency to override our own headline styles.
34
+ // Remove after upgrading to 2.3.0, since `headline` is renamed to `h5` in that update.
35
+ "h5": $headline,
54
36
  "body-1": $body,
55
37
  "body-2": $body,
56
- "caption": (
57
- "size": $font-size-small,
58
- "weight": $font-weight-normal,
59
- "line-height": $line-height-caption,
60
- "letter-spacing": normal
61
- ),
62
- "overline": (
63
- "size": $font-size-small,
64
- "weight": $font-weight-heavy,
65
- "line-height": $line-height-overline,
66
- "letter-spacing": $letter-spacing-overline,
67
- )
38
+ "caption": $caption,
39
+ "overline": $overline
68
40
  );
69
41
 
70
42
  $border-radius-root: 8px;
@@ -83,7 +55,7 @@ $material-light: (
83
55
  // ACCORDION
84
56
  // ****************************************************************************
85
57
  $expansion-panel-active-margin: 0;
86
- $expansion-panel-header-font-size: 1rem;
58
+ $expansion-panel-header-font-size: map-get($subheadline, "size");
87
59
  $expansion-panel-header-padding: 16px;
88
60
  $expansion-panel-content-padding: 0 16px 16px;
89
61
  $expansion-panel-header-min-height: 0;
@@ -95,13 +67,14 @@ $expansion-panel-active-header-min-height: 0;
95
67
  $snackbar-left: 16px;
96
68
  $snackbar-right: 16px;
97
69
  $snackbar-top: 24px;
98
- $snackbar-content-font-size: $font-size-medium;
70
+ $snackbar-content-font-size: map-get($body, "size");
99
71
  $snackbar-content-padding: 12px 16px;
72
+ $snackbar-font-size: map-get($body, "size");
100
73
 
101
74
  // ****************************************************************************
102
75
  // BUTTON
103
76
  // ****************************************************************************
104
- $btn-font-weight: $font-weight-heavy;
77
+ $btn-font-weight: $font-weight-bold;
105
78
  $btn-text-transform: none;
106
79
  $btn-letter-spacing: normal;
107
80
  $btn-font-sizes: (
@@ -120,20 +93,20 @@ $card-actions-padding: 0 $card-h-spacing 12px;
120
93
  $card-border-radius: $border-radius;
121
94
  $card-outlined-border-width: $border-width;
122
95
  $card-subtitle-padding: $card-v-spacing $card-h-spacing;
123
- $card-text-font-size: $font-size-medium;
124
- $card-text-line-height: $line-height-body;
96
+ $card-text-font-size: map-get($body, "size");
97
+ $card-text-line-height: map-get($body, "line-height");
125
98
  $card-text-letter-spacing: normal;
126
- $card-title-font-size: $font-size-medium;
127
- $card-title-font-weight: $font-weight-bold;
128
- $card-title-letter-spacing: normal;
129
- $card-title-line-height: 1;
99
+ $card-title-font-size: map-get($subheadline, "size");
100
+ $card-title-font-weight: map-get($subheadline, "weight");
101
+ $card-title-letter-spacing: map-get($subheadline, "letter-spacing");
102
+ $card-title-line-height: 100%;
130
103
  $card-title-word-break: break-word;
131
104
  $card-btn-margin-x: 0;
132
105
 
133
106
  // ****************************************************************************
134
107
  // CHECKBOX
135
108
  // ****************************************************************************
136
- $label-font-size: $font-size-medium;
109
+ $label-font-size: map-get($body, "size");
137
110
 
138
111
  // ****************************************************************************
139
112
  // LISTS
@@ -143,14 +116,14 @@ $list-item-action-margin: 16px 0;
143
116
  $list-item-child-min-width: 0;
144
117
  $list-item-content-padding: 16px 0 12px;
145
118
  $list-item-padding: 0 12px 0 16px;
146
- $list-item-title-subtitle-line-height: $line-height-body;
119
+ $list-item-title-subtitle-line-height: map-get($body, "line-height");
147
120
 
148
121
  // ****************************************************************************
149
122
  // FORM FIELDS
150
123
  // (Text fields, text areas, and selects)
151
124
  // Source: https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/components/VTextField/_variables.scss
152
125
  // ****************************************************************************
153
- $input-font-size: $font-size-medium;
126
+ $input-font-size: map-get($body, "size");
154
127
 
155
128
  $text-field-border-radius: $border-radius;
156
129
  $text-field-enclosed-details-padding: 0 16px;
@@ -158,7 +131,7 @@ $text-field-enclosed-details-padding: 0 16px;
158
131
  // ****************************************************************************
159
132
  // MODALS
160
133
  // ****************************************************************************
161
- $dialog-card-title-font-size: $font-size-large;
162
- $dialog-card-title-font-weight: $font-weight-bold;
163
- $dialog-card-title-letter-spacing: normal;
134
+ $dialog-card-title-font-size: map-get($headline, "size");
135
+ $dialog-card-title-font-weight: map-get($headline, "weight");
136
+ $dialog-card-title-letter-spacing: map-get($headline, "letter-spacing");
164
137
  $dialog-card-text-padding: 0 24px 16px;