@coolon/angular-ui-powerups 12.4.5 → 12.4.8

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,80 @@
1
+ @use "~@angular/material" as mat;
2
+ @use "sass:map";
3
+ @use "input-activities";
4
+
5
+ @mixin apply-theme($color-config, $typography-config) {
6
+
7
+ :root {
8
+ --aup-activity-padding: var(--default-padding);
9
+ --aup-activity-dialog-padding: 18px;
10
+ }
11
+
12
+ // Extract the palettes you need from the theme definition.
13
+ $primary-palette: map-get($color-config, primary);
14
+ $accent-palette: map-get($color-config, accent);
15
+ $warn-palette: map-get($color-config, warn);
16
+
17
+ .dialog-interaction-context {
18
+ --aup-activity-padding: var(--aup-activity-dialog-padding);
19
+ }
20
+
21
+ aup-activity-title {
22
+ display: block;
23
+ font-family: mat.font-family($typography-config);
24
+ font-size: mat.font-size($typography-config, title);
25
+ line-height: mat.line-height($typography-config, title);
26
+ letter-spacing: mat.letter-spacing($typography-config, title);
27
+ padding: var(--aup-activity-padding);
28
+
29
+ &:not(.transparent-background) {
30
+ padding: calc(var(--aup-activity-padding) / 2) var(--aup-activity-padding);
31
+ }
32
+
33
+ &[color=primary] {
34
+ $palette: $primary-palette;
35
+ color: mat.get-color-from-palette($palette, default-contrast);
36
+ background-color: mat.get-color-from-palette($palette, default);
37
+ }
38
+
39
+ &[color=accent] {
40
+ $palette: $accent-palette;
41
+ color: mat.get-color-from-palette($palette, default-contrast);
42
+ background-color: mat.get-color-from-palette($palette, default);
43
+ }
44
+
45
+ &[color=warn] {
46
+ $palette: $warn-palette;
47
+ color: mat.get-color-from-palette($palette, default-contrast);
48
+ background-color: mat.get-color-from-palette($palette, default);
49
+ }
50
+ }
51
+
52
+ aup-activity-body {
53
+ display: block;
54
+
55
+ padding-top: var(--aup-activity-padding-top, var(--aup-activity-padding));
56
+ padding-bottom: var(--aup-activity-padding-bottom, var(--aup-activity-padding));
57
+
58
+ &:not(.full-width) {
59
+ padding-left: var(--aup-activity-padding-left, var(--aup-activity-padding));
60
+ padding-right: var(--aup-activity-padding-right, var(--aup-activity-padding));
61
+ }
62
+ }
63
+
64
+ aup-activity-title.transparent-background + aup-activity-body {
65
+ padding-top: 0;//var(--aup-activity-padding-top, var(--aup-activity-padding));
66
+ }
67
+
68
+ aup-activity-actions {
69
+ display: block;
70
+ padding-top: var(--aup-activity-padding-top, var(--aup-activity-padding));
71
+ padding-left: var(--aup-activity-padding-left, var(--aup-activity-padding));
72
+ padding-bottom: var(--aup-activity-padding-bottom, var(--aup-activity-padding));
73
+ padding-right: var(--aup-activity-padding-right, var(--aup-activity-padding));
74
+ }
75
+
76
+ @include input-activities.apply-theme($color-config, $typography-config)
77
+
78
+ }
79
+
80
+
@@ -0,0 +1,36 @@
1
+
2
+ @mixin apply-theme($color-config, $typography-config) {
3
+
4
+ .aup-input-activity {
5
+
6
+ padding-left: var(--aup-activity-padding-left, 0);
7
+ padding-right: var(--aup-activity-padding-right, 0);
8
+ padding-top: var(--aup-activity-padding-top, 0);
9
+ padding-bottom: var(--aup-activity-padding-bottom, 0);
10
+
11
+ //&[layout=block] {
12
+ //}
13
+
14
+ // used for inline editors
15
+ &[layout=inline] {
16
+ display: flex;
17
+ flex-direction: row;
18
+ }
19
+
20
+ aup-activity-actions {
21
+ padding: 0 0 0 0.5em;
22
+ }
23
+
24
+ }
25
+
26
+ .aup-popup-interaction-panel .aup-input-activity {
27
+ padding-left: var(--aup-activity-padding-left, var(--aup-activity-padding));
28
+ padding-right: var(--aup-activity-padding-right, var(--aup-activity-padding));
29
+
30
+ &[layout=block] {
31
+ padding-bottom: var(--aup-activity-padding-bottom, var(--aup-activity-padding));
32
+ }
33
+ }
34
+
35
+
36
+ }
@@ -0,0 +1,17 @@
1
+ @use "~@angular/material" as mat;
2
+ @use "sass:map";
3
+
4
+ :root {
5
+ --aup-card-container-default-background-color: #fcfcfb;
6
+ }
7
+
8
+ @mixin apply-theme($color-config, $typography-config) {
9
+ aup-add-card-activity {
10
+ aup-command-face {
11
+ // this isn't working... need to dig deeper
12
+ //@include mat.button-typography($typography-config);
13
+ //@include mat.button-theme($color-config);
14
+ //color: black;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,3 @@
1
+ :root {
2
+ --aup-command-face-icon-gap: 8px;
3
+ }
@@ -0,0 +1,11 @@
1
+ aup-empty-state {
2
+ // Convenience to keep the padding nice when using p tags.
3
+ .container {
4
+ > p:first-child {
5
+ margin-top: 0;
6
+ }
7
+ > p:last-child {
8
+ margin-bottom: 0;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,100 @@
1
+ @use "~@angular/material/theming";
2
+
3
+ .aup-input-component {
4
+
5
+ display: block;
6
+
7
+ mat-form-field, input {
8
+ width: 100%;
9
+
10
+ mat-hint.faux-error {
11
+ // TODO: move this out into theming...
12
+ color: theming.mat-color(theming.mat-palette(theming.$mat-red));
13
+ }
14
+ }
15
+
16
+ mat-form-field {
17
+ // matPrefix/Suffix alignment is a bit shit..
18
+ // Icons float much higher than the text, button icons don't center.
19
+ .mat-form-field-prefix {
20
+ display: inline-flex;
21
+ flex-direction: row;
22
+ height: 35px; // same as the mat-button height which will center our icon with any clear button icon.
23
+ align-self: flex-end; // sit on the bottom of the line
24
+ align-items: center; // and center our internal content.
25
+ }
26
+
27
+ .mat-form-field-infix {
28
+ width: auto;
29
+ }
30
+
31
+
32
+ .mat-form-field-suffix {
33
+ .mat-icon-button {
34
+ line-height: 2.5em; // fix centering of aup-icons within the button.
35
+ }
36
+ }
37
+
38
+ }
39
+
40
+
41
+ &.dense {
42
+ mat-form-field {
43
+ .mat-form-field-infix {
44
+ border-top: none;
45
+ }
46
+
47
+ .mat-form-field-flex {
48
+ padding-top: 0;
49
+ }
50
+
51
+ .mat-form-field-wrapper {
52
+ padding-bottom: 0;
53
+ border-bottom: 0;
54
+ }
55
+
56
+ .mat-form-field-underline {
57
+ bottom: 0
58
+ }
59
+
60
+ &.mat-form-field-can-float.mat-form-field-should-float {
61
+ .mat-form-field-label-wrapper {
62
+ display: none;
63
+ }
64
+ }
65
+
66
+ &.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper {
67
+ transform: translateY(0); // stop the arrow moving up to center with the input and the now missing label.
68
+ }
69
+
70
+ }
71
+ }
72
+ }
73
+
74
+
75
+ aup-table-cell-renderer > .aup-input-component {
76
+
77
+ // TODO: enter/exit animations for the editor size.
78
+
79
+ .mat-form-field-flex {
80
+ padding-top: 0;
81
+ }
82
+
83
+ .mat-form-field-infix {
84
+ width: 0; // ensure it doesn't expand the cell.
85
+ //border-top: none; // remove label space
86
+ }
87
+
88
+ .mat-form-field-label-wrapper { // hide the label
89
+ display: none;
90
+ }
91
+
92
+ .mat-form-field-subscript-wrapper {
93
+
94
+ }
95
+ }
96
+
97
+
98
+
99
+
100
+
@@ -0,0 +1,6 @@
1
+ @mixin floating-label-style() {
2
+ font-weight: 400;
3
+ font-size: calc(1em * .75);
4
+ color: rgba(0, 0, 0, 0.57);
5
+ white-space: nowrap;
6
+ }
@@ -0,0 +1,30 @@
1
+ :root {
2
+ --aup-icon-width: 24px;
3
+ --aup-fa-icon-width: 18px;
4
+ }
5
+
6
+
7
+ aup-icon {
8
+ // egregious hackery to get the font awesome icons positioning correctly
9
+ --fa-icon-offset: calc((var(--aup-icon-width) - var(--aup-fa-icon-width)) / 2);
10
+
11
+ position: relative;
12
+ fa-icon {
13
+ .svg-inline--fa {
14
+ position: absolute;
15
+ top: var(--fa-icon-offset);
16
+ left: var(--fa-icon-offset);
17
+ width: var(--aup-fa-icon-width) !important;
18
+ height: var(--aup-fa-icon-width) !important;
19
+ }
20
+ }
21
+ }
22
+
23
+ // egregious hackery to get the icon to display the same as a mat-icon inside a mat-menu
24
+ .mat-menu-panel {
25
+ aup-icon {
26
+ .svg-inline--fa {
27
+ opacity: 0.54;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,54 @@
1
+ @use "../../forms/mixins";
2
+ @use "~@angular/material/theming";
3
+
4
+ @mixin apply-theme($color-config, $typography-config) {
5
+
6
+ aup-inline-string-editor {
7
+ display: block;
8
+
9
+ --aup-activity-padding-top: var(--aup-inline-editor-padding-top, 0);
10
+ --aup-activity-padding-left: var(--aup-inline-editor-padding-left, 0);
11
+ --aup-activity-padding-bottom: var(--aup-inline-editor-padding-bottom, 0);
12
+ --aup-activity-padding-right: var(--aup-inline-editor-padding-right, 0);
13
+
14
+ .container {
15
+ padding-top: var(--aup-activity-padding-top);
16
+ padding-left: var(--aup-activity-padding-left);
17
+ padding-bottom: var(--aup-activity-padding-bottom);
18
+ padding-right: var(--aup-activity-padding-right);
19
+
20
+ display: flex;
21
+ flex-direction: row;
22
+ align-items: center;
23
+
24
+ mat-form-field {
25
+ flex:1;
26
+ &:not(.empty) {
27
+ input {
28
+ color: currentColor;
29
+ //color: theming.mat-color($color-config, text);
30
+ }
31
+ }
32
+ &.editable {
33
+ .mat-form-field-flex, input {
34
+ cursor: pointer;
35
+ }
36
+ }
37
+ .mat-form-field-infix {
38
+ width: auto;
39
+ }
40
+ .mat-form-field-underline {
41
+ //opacity: 0; // hide the underline...
42
+ }
43
+ }
44
+ }
45
+
46
+ aup-string-input {
47
+ flex: 1;
48
+ }
49
+
50
+ }
51
+ }
52
+
53
+
54
+
@@ -0,0 +1,32 @@
1
+ @use "~@angular/material" as mat;
2
+
3
+ @use "./interaction/editor/inline-string-editor";
4
+
5
+ @mixin apply-theme($color-config, $typography-config) {
6
+ @include inline-string-editor.apply-theme($color-config, $typography-config)
7
+ }
8
+
9
+
10
+ .dialog-interaction-context {
11
+ max-width: 95vw !important;
12
+ max-height: 95vh !important;
13
+
14
+ mat-dialog-container {
15
+ max-width: 95vw !important;
16
+ max-height: 95vh !important;
17
+ padding: 0;
18
+ }
19
+ }
20
+
21
+ .activity-outlet-wrapper {
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: stretch;
25
+ }
26
+
27
+ .aup-popup-interaction-panel {
28
+ background: var(--aup-default-background, white);
29
+ @include mat.elevation(1);
30
+ @include mat.elevation-transition;
31
+ }
32
+
@@ -0,0 +1,10 @@
1
+ aup-markdown {
2
+ p {
3
+ margin: 0;
4
+ line-height: 1.2em;
5
+ }
6
+
7
+ > *:not(:first-child) {
8
+ margin-top: 0.5em;
9
+ }
10
+ }
@@ -0,0 +1,27 @@
1
+ @use "~@angular/material" as mat;
2
+ @use "~@angular/material/theming" as theme;
3
+
4
+ @mixin elevate-on-hover($height:2) {
5
+ @include mat.elevation-transition();
6
+ &:hover {
7
+ @include mat.elevation($height);
8
+ }
9
+ }
10
+
11
+ @mixin aup-card-container-new-card-style($color: rgba(0,0,0,0.54), $background-color: rgba(255,255,255,0.8), $hover-color: $color, $background-hover-color: white) {
12
+ @include elevate-on-hover();
13
+ box-sizing: border-box;
14
+ border: 2px dashed rgba(0, 0, 0, 0.1);
15
+ border-radius: 6px;
16
+ font-weight: 300;
17
+ cursor: pointer;
18
+ color: $color;
19
+ background-color: $background-color;
20
+
21
+ &:hover {
22
+ border-color: transparent;
23
+ background-color: $background-hover-color;
24
+ color: $hover-color;
25
+ }
26
+ }
27
+
@@ -0,0 +1,45 @@
1
+ @use '~@angular/material/index' as mat;
2
+
3
+ @mixin pill-defaults($padding: 0.1em 0.4em) {
4
+ display: inline-block;
5
+ border-radius: 4px;
6
+ padding: $padding;
7
+ margin: 1px 0;
8
+ }
9
+
10
+
11
+ @mixin apply-theme($color-config, $typography-config) {
12
+
13
+ // Extract the palettes you need from the theme definition.
14
+ $primary-palette: map-get($color-config, primary);
15
+ $accent-palette: map-get($color-config, accent);
16
+ $warn-palette: map-get($color-config, warn);
17
+ $background: map-get($color-config, background);
18
+
19
+ .aup-pill {
20
+ @include pill-defaults();
21
+ color: currentColor;
22
+ background-color: mat.get-color-from-palette($background, app-bar) // hmmm, should probably defined my own..
23
+ }
24
+
25
+ .aup-pill-primary {
26
+ @extend .aup-pill;
27
+ color: mat.get-color-from-palette($background, background);
28
+ background-color: mat.get-color-from-palette($primary-palette);
29
+ }
30
+
31
+ .aup-pill-accent {
32
+ @extend .aup-pill;
33
+ color: mat.get-color-from-palette($background, background); // stolen from mat checkbox checkmark color logic
34
+ background-color: mat.get-color-from-palette($accent-palette)
35
+ }
36
+
37
+ .aup-pill-warn {
38
+ @extend .aup-pill;
39
+ color: mat.get-color-from-palette($background, background);
40
+ background-color: mat.get-color-from-palette($warn-palette)
41
+ }
42
+
43
+ }
44
+
45
+
@@ -0,0 +1,9 @@
1
+ .router-outlet-container {
2
+ > * {
3
+ position: absolute;
4
+ top: 0;
5
+ left: 0;
6
+ bottom: 0;
7
+ right: 0;
8
+ }
9
+ }
@@ -0,0 +1,30 @@
1
+ @use "~@angular/material" as mat;
2
+
3
+ @use "./mixins";
4
+ @use "./activities/activities";
5
+ @use "./cards";
6
+ @use "./router";
7
+ @use "./tabs";
8
+ @use "./interaction";
9
+ @use "./form";
10
+ @use "./table";
11
+ @use "./commands";
12
+ @use "./icons";
13
+ @use "./empty-state";
14
+ @use "./pills";
15
+ @use "./markdown";
16
+
17
+ @mixin apply-light-theme($theme, $typography) {
18
+
19
+ $color-config: mat.get-color-config($theme);
20
+
21
+ @include interaction.apply-theme($color-config, $typography);
22
+ @include cards.apply-theme($color-config, $typography);
23
+ @include activities.apply-theme($color-config, $typography);
24
+ @include pills.apply-theme($color-config, $typography);
25
+
26
+ :root {
27
+ --aup-default-padding: var(--default-padding, 16px);
28
+ --aup-default-background: white;
29
+ }
30
+ }
@@ -0,0 +1,93 @@
1
+ .aup-table-component {
2
+ --resolved-column-gap: var(--column-gap, var(--aup-table-column-gap, 24px)); // material design table column padding
3
+ --resolved-row-selected-background-color: var(--row-selected-background-color, var(--aup-table-row-selected-background-color, rgba(0, 0, 255, 0.04)));
4
+ --resolved-row-hover-background-color: var(--row-hover-background-color, var(--aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)));
5
+ --resolved-first-column-padding-left: var(--first-column-padding-left, var(--aup-table-first-column-padding-left, var(--resolved-column-gap)));
6
+ --resolved-last-column-padding-right: var(--last-column-padding-right, var(--aup-table-last-column-padding-right, var(--resolved-column-gap)));
7
+
8
+ &.hide-header {
9
+ .mat-table thead {
10
+ display: none;
11
+ }
12
+ }
13
+
14
+ .mat-table {
15
+ td, th {
16
+ &.hide {
17
+ display: none;
18
+ }
19
+ }
20
+
21
+ th.mat-header-cell:first-of-type,
22
+ td.mat-cell:first-of-type,
23
+ td.mat-footer-cell:first-of-type {
24
+ padding-left: 0;
25
+ }
26
+
27
+ th.mat-header-cell:last-of-type,
28
+ td.mat-cell:last-of-type,
29
+ td.mat-footer-cell:last-of-type {
30
+ padding-right: 0;
31
+ }
32
+
33
+ tr {
34
+ &.enable-hover:hover {
35
+ background-color: var(--resolved-row-hover-background-color);
36
+ }
37
+
38
+ &.aup-row-selected, &.aup-row-selected.enable-hover:hover {
39
+ background-color: var(--resolved-row-selected-background-color);
40
+ }
41
+ }
42
+
43
+ td.enable-cursor {
44
+ cursor: pointer;
45
+ }
46
+
47
+ //TODO: think about this a bit more. Table with acts a bit like flex:
48
+ // - columns for which the width is 0 (or not defined) will expand equally to fill the table.
49
+ // - columns with an explicit with will try to remain that width, but will expand to fit their content.
50
+ // - extra space will be allocated to columns that have the same width... e.g. setting all columns to 1px results
51
+ // in the same scenario as not specifying the width.
52
+ .mat-cell, .mat-header-cell {
53
+ &:not(.flex) {
54
+ width: 1px;
55
+ white-space: nowrap;
56
+ }
57
+ }
58
+
59
+ }
60
+
61
+ aup-table-cell-renderer, aup-table-header-cell-renderer {
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: stretch;
65
+ justify-content: center;
66
+ height: 100%;
67
+ min-height: 47px; // same as mat table row height - border bottom.
68
+
69
+ padding-left: var(--resolved-column-gap);
70
+
71
+ &.first-visible-column {
72
+ padding-left: var(--resolved-first-column-padding-left);
73
+ }
74
+
75
+ &.last-visible-column {
76
+ padding-right: var(--resolved-last-column-padding-right);
77
+ }
78
+ }
79
+
80
+ aup-table-cell-renderer {
81
+ &.fillCell {
82
+ justify-content: stretch;
83
+ padding-left: 0 !important;
84
+ }
85
+
86
+ &.padChild {
87
+ > *:first-child {
88
+ padding-left: var(--resolved-column-gap);
89
+ flex: 1;
90
+ }
91
+ }
92
+ }
93
+ }
@@ -0,0 +1,17 @@
1
+ [no-tab-header] {
2
+ > mat-tab-header {
3
+ display: none;
4
+ }
5
+ }
6
+
7
+ [full-height-tabs], mat-tab-group.full-height-tabs {
8
+ .mat-tab-body-wrapper {
9
+ flex: 1;
10
+ mat-tab-body, .mat-tab-body-content {
11
+ display: flex;
12
+ flex-direction: column;
13
+ justify-content: stretch;
14
+ }
15
+ }
16
+ }
17
+
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="64" viewBox="0 0 24 64">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <g transform="translate(2 22)">
4
+ <rect width="10" height="2" x="5" y="9" fill="currentColor" transform="rotate(90 10 10)"/>
5
+ <rect width="16" height="16" x="2" y="2" stroke="currentColor" rx="3"/>
6
+ <rect width="10" height="2" x="5" y="9" fill="currentColor"/>
7
+ </g>
8
+ <rect width="4" height="1" y="32" fill="currentColor"/>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="64" viewBox="0 0 24 64">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="1" height="24" x="11" y="40" fill="currentColor"/>
4
+ <rect width="4" height="1" y="32" fill="currentColor"/>
5
+ <g transform="translate(2 22)">
6
+ <rect width="16" height="16" x="2" y="2" stroke="currentColor" rx="3"/>
7
+ <rect width="10" height="2" x="5" y="9" fill="currentColor"/>
8
+ </g>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="64" viewBox="0 0 24 64">
2
+ <rect width="4" height="1" y="32" fill="currentColor" fill-rule="evenodd"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="64" viewBox="0 0 18 64">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="1" height="24" x="8.5" y="40" fill="currentColor"/>
4
+ <g transform="translate(-1 22)">
5
+ <rect width="10" height="2" x="5" y="9" fill="currentColor" transform="rotate(90 10 10)"/>
6
+ <rect width="17" height="17" x="1.5" y="1.5" stroke="currentColor" rx="8"/>
7
+ <rect width="10" height="2" x="5" y="9" fill="currentColor"/>
8
+ </g>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="64" viewBox="0 0 24 64">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="1" height="32.5" x="11.5" fill="currentColor"/>
4
+ <rect width="1" height="32.5" x="11.5" y="31.5" fill="currentColor"/>
5
+ <rect width="12" height="1" x="12" y="31.5" fill="currentColor"/>
6
+ <rect width="12" height="1" y="31.5" fill="currentColor"/>
7
+ </g>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="64" viewBox="0 0 24 64">
2
+ <rect width="1" height="32" x="11" y="32" fill="currentColor" fill-rule="evenodd"/>
3
+ </svg>
@@ -0,0 +1,7 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="64" viewBox="0 0 18 64">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="1" height="32.5" x="8.5" fill="currentColor"/>
4
+ <rect width="1" height="32" x="8.5" y="32" fill="currentColor"/>
5
+ <rect width="9" height="1" x="9" y="31.5" fill="currentColor"/>
6
+ </g>
7
+ </svg>