@phila/phila-ui-core 1.0.10 → 1.0.12

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,135 @@
1
+ .font-sizes {
2
+ &.is-small {
3
+ font-size: $size-small;
4
+ }
5
+
6
+ &.is-medium, &.is-normal {
7
+ font-size: $size-medium;
8
+ }
9
+
10
+ &.is-large {
11
+ font-size: $size-large;
12
+ }
13
+ }
14
+
15
+ .button {
16
+ border-width: 0.25rem;
17
+ font-weight: $weight-semibold;
18
+ border-color: transparent;
19
+
20
+ &:focus {
21
+ &:not(:active) {
22
+ box-shadow: 0 0 0 0.25em $electric-blue !important;
23
+ }
24
+ }
25
+
26
+ &.is-primary, &.is-secondary, &.is-danger, &.is-cta {
27
+ &:hover {
28
+ background-color: $grey-dark;
29
+ border-color: $grey-dark;
30
+ color: $white;
31
+ }
32
+ &:active {
33
+ background-color: $black;
34
+ border-color: $black;
35
+ color: $white;
36
+ }
37
+ &:disabled {
38
+ background-color: $sidewalk-grey;
39
+ border-color: $sidewalk-grey;
40
+ color: $white;
41
+ }
42
+ }
43
+
44
+ &.is-secondary {
45
+ @extend .is-primary;
46
+ @extend .is-outlined;
47
+ border-width: 0.125rem;
48
+ color: $ben-franklin-blue;
49
+ border-color: $ben-franklin-blue;
50
+ &:focus:not(:active) {
51
+ background-color: $white;
52
+ color: $ben-franklin-blue;
53
+ border-color: $ben-franklin-blue;
54
+ }
55
+ &:disabled {
56
+ background-color: $white !important;
57
+ border-color: $sidewalk-grey !important;
58
+ color: $sidewalk-grey !important;
59
+ border-width: 0.125rem !important;
60
+ }
61
+ }
62
+
63
+ &.is-tertiary {
64
+ border: 0 !important;
65
+ color: $primary;
66
+ &:focus {
67
+ &:not(:active) {
68
+ border-color: transparent !important;
69
+ border-width: 0;
70
+ box-shadow: 0 0 0 0.25em $grey-dark !important;
71
+ }
72
+ }
73
+ &:hover {
74
+ background-color: $grey-dark;
75
+ border-color: $ben-franklin-blue;
76
+ color: $white !important;
77
+ }
78
+ &:active {
79
+ background-color: $black;
80
+ border-color: $grey-dark;
81
+ color: $white;
82
+ }
83
+ &:disabled {
84
+ color: $sidewalk-grey;
85
+ &:hover {
86
+ background-color: $white;
87
+ color: $sidewalk-grey !important;
88
+ }
89
+ }
90
+ }
91
+
92
+ &.is-cta, input[type='submit'] {
93
+ font-family: $family-secondary;
94
+ font-weight: $weight-bold;
95
+ text-transform: uppercase;
96
+ padding: 1rem 2.5rem;
97
+ color: $ben-franklin-blue-dark;
98
+ border-color: $ben-franklin-blue-dark;
99
+ background-color: transparent;
100
+ &:not(.is-tertiary):not(.is-secondary) {
101
+ &:hover {
102
+ background-color: $grey-dark;
103
+ }
104
+ &:active {
105
+ background-color: $black;
106
+ }
107
+ background-color: $ben-franklin-blue-dark;
108
+ border-color: transparent;
109
+ color: $white;
110
+ &:disabled {
111
+ background-color: $sidewalk-grey;
112
+ }
113
+ }
114
+ &:disabled {
115
+ background-color: transparent;
116
+ color: $sidewalk-grey;
117
+ }
118
+ }
119
+
120
+ @extend .font-sizes;
121
+
122
+ &.is-small {
123
+ padding: 0.5rem 1rem;
124
+ border-radius: 0;
125
+ }
126
+
127
+ &.is-medium, &.is-normal {
128
+ padding: 0.75rem 1.5em;
129
+ }
130
+
131
+ &.is-large {
132
+ padding: 1rem 2rem;
133
+ }
134
+
135
+ }
@@ -0,0 +1,3 @@
1
+ .content {
2
+ padding: 1.5rem;
3
+ }
@@ -0,0 +1,112 @@
1
+ @mixin deprecated-title-sizes {
2
+ &.is-size-1,
3
+ &.is-1 {
4
+ font-size: $size-1;
5
+ line-height: $size-1;
6
+ }
7
+ &.is-size-2,
8
+ &.is-2 {
9
+ font-size: $size-2;
10
+ line-height: $size-2;
11
+ }
12
+ &.is-size-3,
13
+ &.is-3 {
14
+ font-size: $size-3;
15
+ line-height: $size-3;
16
+ }
17
+ &.is-size-4,
18
+ &.is-4 {
19
+ font-size: $size-4;
20
+ line-height: $size-4;
21
+ }
22
+
23
+ &.is-size-5,
24
+ &.is-size-6,
25
+ &.is-5,
26
+ &.is-6 {
27
+ font-size: $size-small;
28
+ line-height: $size-small;
29
+ }
30
+ }
31
+
32
+ @mixin deprecated-subtitle-sizes {
33
+ &.is-1 {
34
+ font-size: 1.5rem;
35
+ line-height: 1.33rem;
36
+ }
37
+ &.is-2 {
38
+ font-size: 1.25rem;
39
+ line-height: 1.2rem;
40
+ }
41
+ &.is-3 {
42
+ font-size: 1rem;
43
+ line-height: 1.5rem;
44
+ }
45
+ &.is-4,
46
+ &.is-5,
47
+ &.is-6 {
48
+ font-size: 0.875rem;
49
+ line-height: 1.29rem;
50
+ }
51
+ }
52
+
53
+ .content {
54
+ h1,
55
+ h2,
56
+ h3,
57
+ h4,
58
+ h5,
59
+ h6 {
60
+ font-family: $family-secondary;
61
+ font-weight: $weight-normal;
62
+ margin-bottom: 0;
63
+ line-height: 1.25;
64
+ &:not(:first-child) {
65
+ margin-top: 0 !important;
66
+ }
67
+ &.heading-with-background {
68
+ margin-bottom: 1rem;
69
+ padding-left: 1rem;
70
+ padding-right: 1rem;
71
+ background-color: $ghost-grey;
72
+ font-size: $size-3;
73
+ }
74
+ &.heading-with-contrast {
75
+ margin-bottom: 0.5rem;
76
+ border-bottom: 10px solid $ben-franklin-blue;
77
+ font-size: $size-2;
78
+ }
79
+
80
+ &.title {
81
+ @include deprecated-title-sizes;
82
+ font-weight: $weight-normal;
83
+ margin-bottom: 1rem;
84
+ }
85
+
86
+ &.title + .subtitle {
87
+ margin-top: -1rem !important;
88
+ margin-bottom: 1rem !important;
89
+ }
90
+
91
+ &.title:not(.is-spaced) + .subtitle {
92
+ margin-top: 1rem;
93
+ }
94
+ }
95
+
96
+ div {
97
+ &.subtitle {
98
+ font-family: $family-sans-serif;
99
+ font-weight: $weight-normal;
100
+ @include deprecated-subtitle-sizes;
101
+ }
102
+ &.subtitle {
103
+ margin-bottom: 0;
104
+ }
105
+ &.subtitle + .title {
106
+ margin-bottom: 1rem !important;
107
+ }
108
+ &.subtitle:not(.is-spaced) + .title {
109
+ margin-top: 0;
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,32 @@
1
+ @import "../mixins.scss";
2
+
3
+ .is-link {
4
+ @include font-sizes;
5
+ font-weight: $weight-semibold;
6
+ border: 0;
7
+ color: $primary;
8
+ &:focus {
9
+ border-color: transparent;
10
+ outline-width: 0;
11
+ &:not(:active) {
12
+ border-color: transparent !important;
13
+ border-width: 0;
14
+ border-radius: 0;
15
+ box-shadow: 0 0 0 0.25em $electric-blue !important;
16
+ }
17
+ }
18
+ &:hover {
19
+ background-color: $ben-franklin-blue;
20
+ border-color: $ben-franklin-blue;
21
+ color: $white !important;
22
+ }
23
+ &:active {
24
+ background-color: $grey-dark;
25
+ border-color: $grey-dark;
26
+ color: $white;
27
+ }
28
+ .icon {
29
+ padding-left: 0.625rem;
30
+ padding-right: 0.625rem;
31
+ }
32
+ }
@@ -0,0 +1,15 @@
1
+ /** Custom Styles **/
2
+ .table-responsive {
3
+ width: 100%;
4
+ overflow: hidden;
5
+ overflow-x: auto;
6
+ }
7
+
8
+ table {
9
+ &.is-align-middle {
10
+ td,
11
+ th {
12
+ vertical-align: middle;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,14 @@
1
+ .tabs {
2
+ & + .fix-margin {
3
+ margin-top: -1.5rem;
4
+ padding-top: 1.5rem;
5
+ }
6
+ &.is-boxed + .tabs-container {
7
+ border: 1px solid $tabs-border-bottom-color;
8
+ border-top: 0;
9
+ }
10
+ }
11
+
12
+ .tabs-container {
13
+ padding: $tabs-link-padding;
14
+ }
@@ -0,0 +1,14 @@
1
+ $custom-colors: (
2
+ "ben-franklin-blue-light": ($ben-franklin-blue-light, $ben-franklin-blue),
3
+ "ben-franklin-blue": ($ben-franklin-blue, $white, $white, $ben-franklin-blue-dark),
4
+ "ben-franklin-blue-dark": ($ben-franklin-blue-dark, $white),
5
+ "electric-blue": ($electric-blue, $grey-dark),
6
+ "bell-yellow-light": ($bell-yellow-light, $grey-dark),
7
+ "bell-yellow": ($bell-yellow, $grey-dark, $bell-yellow-light),
8
+ "phanatic-green-light": ($phanatic-green-light, $phanatic-green),
9
+ "phanatic-green": ($phanatic-green, $white, $phanatic-green-light),
10
+ "phanatic-green-dark": ($phanatic-green-dark, $white),
11
+ "love-park-red-light": ($love-park-red-light, $love-park-red-dark),
12
+ "love-park-red": ($love-park-red, $white, $love-park-red-light, $love-park-red-dark),
13
+ "love-park-red-dark": ($love-park-red-dark, $white)
14
+ ) !default;
@@ -0,0 +1,71 @@
1
+ @font-face {
2
+ font-family: 'Montserrat';
3
+ src: local('Montserrat Regular'), local('Montserrat-Regular'),
4
+ url('https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff2') format('woff2'),
5
+ url('https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Regular.woff') format('woff');
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ }
9
+
10
+ @font-face {
11
+ font-family: 'Open Sans';
12
+ src: local('Open Sans Italic'), local('OpenSans-Italic'),
13
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff2') format('woff2'),
14
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Italic.woff') format('woff');
15
+ font-weight: normal;
16
+ font-style: italic;
17
+ }
18
+
19
+ @font-face {
20
+ font-family: 'Open Sans';
21
+ src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'),
22
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff2') format('woff2'),
23
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-BoldItalic.woff') format('woff');
24
+ font-weight: bold;
25
+ font-style: italic;
26
+ }
27
+
28
+ @font-face {
29
+ font-family: 'Montserrat';
30
+ src: local('Montserrat Bold'), local('Montserrat-Bold'),
31
+ url('https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff2') format('woff2'),
32
+ url('https://www.phila.gov/assets/fonts/Montserrat/Montserrat-Bold.woff') format('woff');
33
+ font-weight: bold;
34
+ font-style: normal;
35
+ }
36
+
37
+ @font-face {
38
+ font-family: 'Open Sans';
39
+ src: local('Open Sans Bold'), local('OpenSans-Bold'),
40
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff2') format('woff2'),
41
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Bold.woff') format('woff');
42
+ font-weight: bold;
43
+ font-style: normal;
44
+ }
45
+
46
+ @font-face {
47
+ font-family: 'Open Sans';
48
+ src: local('Open Sans SemiBold Italic'), local('OpenSans-SemiBoldItalic'),
49
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff2') format('woff2'),
50
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBoldItalic.woff') format('woff');
51
+ font-weight: 600;
52
+ font-style: italic;
53
+ }
54
+
55
+ @font-face {
56
+ font-family: 'Open Sans';
57
+ src: local('Open Sans SemiBold'), local('OpenSans-SemiBold'),
58
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff2') format('woff2'),
59
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-SemiBold.woff') format('woff');
60
+ font-weight: 600;
61
+ font-style: normal;
62
+ }
63
+
64
+ @font-face {
65
+ font-family: 'Open Sans';
66
+ src: local('Open Sans Regular'), local('OpenSans-Regular'),
67
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff2') format('woff2'),
68
+ url('https://www.phila.gov/assets/fonts/OpenSans/OpenSans-Regular.woff') format('woff');
69
+ font-weight: normal;
70
+ font-style: normal;
71
+ }
@@ -0,0 +1,57 @@
1
+ // Foundation for Sites by ZURB
2
+ // foundation.zurb.com
3
+ // Licensed under MIT Open Source
4
+
5
+ ////
6
+ /// @group functions
7
+ ////
8
+
9
+ @use 'sass:math';
10
+
11
+ $global-font-size: 100% !default;
12
+
13
+ /// Removes the unit (e.g. px, em, rem) from a value, returning the number only.
14
+ ///
15
+ /// @param {Number} $num - Number to strip unit from.
16
+ ///
17
+ /// @returns {Number} The same number, sans unit.
18
+ @function strip-unit($num) {
19
+ @return $num / ($num * 0 + 1);
20
+ }
21
+
22
+ /// Converts one or more pixel values into matching rem values.
23
+ ///
24
+ /// @param {Number|List} $values - One or more values to convert. Be sure to separate them with spaces and not commas. If you need to convert a comma-separated list, wrap the list in parentheses.
25
+ /// @param {Number} $base [null] - The base value to use when calculating the `rem`. If you're using Foundation out of the box, this is 16px. If this parameter is `null`, the function will reference the `$global-font-size` variable as the base.
26
+ ///
27
+ /// @returns {List} A list of converted values.
28
+ @function rem-calc($values, $base: null) {
29
+ $rem-values: ();
30
+ $count: length($values);
31
+
32
+ // If no base is defined, defer to the global font size
33
+ @if $base == null {
34
+ $base: $global-font-size;
35
+ }
36
+
37
+ // If the base font size is a %, then multiply it by 16px
38
+ // This is because 100% font size = 16px in most all browsers
39
+ @if unit($base) == "%" {
40
+ $base: math.div($base, 100%) * 16px;
41
+ }
42
+
43
+ // Using rem as base allows correct scaling
44
+ @if unit($base) == "rem" {
45
+ $base: strip-unit($base) * 16px;
46
+ }
47
+
48
+ @if $count == 1 {
49
+ @return -zf-to-rem($values, $base);
50
+ }
51
+
52
+ @for $i from 1 through $count {
53
+ $rem-values: append($rem-values, -zf-to-rem(nth($values, $i), $base));
54
+ }
55
+
56
+ @return $rem-values;
57
+ }
@@ -0,0 +1,10 @@
1
+ @import "mixins";
2
+
3
+ h1,
4
+ h2,
5
+ h3,
6
+ h4,
7
+ h5,
8
+ h6 {
9
+ @include headings-set-sizes;
10
+ }
@@ -0,0 +1,4 @@
1
+ @import 'variables.scss';
2
+ @import 'mixins.scss';
3
+ @import 'colors.scss';
4
+ @import 'functions.scss';