@open-dcp/vue-styles 0.0.0-stage → 0.2.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,107 @@
1
+ @use '@open-dcp/styles/src/abstracts/variables' as *;
2
+
3
+ .dcp-modal {
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ background-color: rgba(0, 0, 0, 0.32); // Modal backdrop
13
+ z-index: 1050;
14
+ opacity: 0;
15
+ visibility: hidden;
16
+ transition: opacity $transition-fast, visibility $transition-fast;
17
+
18
+ &.dcp-modal--active {
19
+ opacity: 1;
20
+ visibility: visible;
21
+ }
22
+
23
+ .dcp-modal__dialog {
24
+ background-color: #fff;
25
+ border-radius: $modal-border-radius;
26
+ width: 100%;
27
+ margin: $spacer;
28
+ padding: $spacer;
29
+ box-shadow: 0 8px 10px -5px rgba(0, 0, 0, 0.2), 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12);
30
+ transform: translateY(-50%);
31
+ animation: slide-in 0.2s ease forwards;
32
+ max-width: 500px;
33
+ position: relative;
34
+ }
35
+
36
+ // Small size
37
+ &.dcp-modal--small .dcp-modal__dialog {
38
+ max-width: 300px;
39
+ }
40
+
41
+ // Large size
42
+ &.dcp-modal--large .dcp-modal__dialog {
43
+ max-width: 800px;
44
+ }
45
+
46
+ // Extra-large size
47
+ &.dcp-modal--xlarge .dcp-modal__dialog {
48
+ max-width: 1200px;
49
+ }
50
+
51
+ .dcp-modal__header {
52
+ margin: 0 0 $spacer-half 0;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: space-between;
56
+ }
57
+
58
+ .dcp-modal__footer {
59
+ margin: $spacer-half 0 0 0;
60
+ }
61
+
62
+ .dcp-modal__title {
63
+ font-size: $font-size-base * 1.25;
64
+ font-weight: bold;
65
+ margin: 0;
66
+ }
67
+
68
+ .dcp-modal__content {
69
+ margin: $spacer-half 0;
70
+ line-height: $line-height-base;
71
+ }
72
+
73
+ .dcp-modal__close {
74
+ position: absolute;
75
+ top: $spacer;
76
+ right: $spacer;
77
+ background: none;
78
+ border: none;
79
+ font-size: $font-size-base * 1.5;
80
+ cursor: pointer;
81
+ color: $secondary-color;
82
+ padding: 0;
83
+ width: 24px;
84
+ height: 24px;
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ border-radius: 4px;
89
+ transition: background-color 0.2s ease;
90
+ flex-shrink: 0;
91
+
92
+ &:hover {
93
+ color: var(--dcp-branding-primary-color, #{$primary-color});
94
+ background-color: rgba(0, 0, 0, 0.04);
95
+ }
96
+ }
97
+ }
98
+
99
+ // Animations
100
+ @keyframes slide-in {
101
+ from {
102
+ transform: translateY(-100%);
103
+ }
104
+ to {
105
+ transform: translateY(0);
106
+ }
107
+ }
@@ -0,0 +1,119 @@
1
+ @use '@open-dcp/styles/src/abstracts/variables' as *;
2
+
3
+ .paper-content {
4
+ background: $white;
5
+ border-radius: 5px;
6
+ margin-right: 0;
7
+ margin-left: 0;
8
+
9
+ &_title {
10
+ color: $button-disabled-color;
11
+ font-size: $font-size-base * 1.25;
12
+ font-weight: 500;
13
+ text-transform: uppercase;
14
+ letter-spacing: 0.93px;
15
+ }
16
+
17
+ &--ng-content:empty {
18
+ display: none;
19
+ }
20
+ }
21
+
22
+
23
+ .dc-content {
24
+
25
+ --header-height: 80px;
26
+ --side-menu-min-width: 80px;
27
+
28
+ --main-padding: 100px;
29
+
30
+
31
+ &.page-editor {
32
+ --bottom-bar-height: 60px;
33
+
34
+ &--with-bottom-bar {
35
+ padding-bottom: calc(var(--bottom-bar-height) + 3rem) !important;
36
+ }
37
+
38
+ .page-editor_bottom-bar {
39
+ position: fixed !important;
40
+ bottom: 0;
41
+ left: 0;
42
+ width: 100% !important;
43
+ height: var(--bottom-bar-height) !important;
44
+ background: #fff !important;
45
+ z-index: 2;
46
+ }
47
+
48
+ .page-editor_button {
49
+ &-back {
50
+ color: color-mix(in srgb, var(--dcp-branding-primary-color, #{$branding-primary-color}) 55%, white) !important;
51
+ }
52
+ }
53
+ }
54
+
55
+ position: relative;
56
+ height: calc(100vh - var(--header-height));
57
+ width: calc(100vw - var(--side-menu-min-width));
58
+ overflow-y: auto;
59
+ padding-left: calc(var(--main-padding) + 3rem);
60
+ padding-right: calc(var(--main-padding) + 3rem);
61
+ padding-bottom: $spacer * 3;
62
+ padding-top: $spacer * 1.5;
63
+
64
+ &--loading {
65
+ overflow-y: hidden;
66
+
67
+ &:after {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ right: 0;
72
+ bottom: 0;
73
+ content: '';
74
+ cursor: wait;
75
+ z-index: 20000;
76
+ }
77
+ }
78
+
79
+ &_header {
80
+ padding-bottom: $spacer * 1.5;
81
+ display: flex;
82
+ align-items: center;
83
+ flex-wrap: wrap;
84
+ }
85
+
86
+ &_title {
87
+ margin-bottom: 0;
88
+ font-size: $font-size-base * 1.5;
89
+ font-weight: 300;
90
+ color: $text-color-dark;
91
+ }
92
+
93
+ &_footer {
94
+ padding-left: calc(var(--main-padding) + 3rem) !important;
95
+ padding-right: calc(var(--main-padding) + 3rem) !important;
96
+ }
97
+ }
98
+
99
+ .page-create-menu {
100
+ display: flex;
101
+ flex-direction: row;
102
+ &_buttons {
103
+ display: flex;
104
+ flex-direction: row;
105
+ margin-right: 10px;
106
+ gap: 10px;
107
+ }
108
+ &_button {
109
+ &-show-extra {
110
+ padding: 0;
111
+ width: 36px;
112
+ min-width: 36px;
113
+ height: 36px;
114
+ font-size: 14px;
115
+ line-height: 36px;
116
+ font-weight: bold;
117
+ }
118
+ }
119
+ }
@@ -0,0 +1,22 @@
1
+ @use '@open-dcp/styles/src/abstracts/variables' as *;
2
+
3
+ .v-switch {
4
+ .v-selection-control__input::before {
5
+ display: none;
6
+ }
7
+ .v-ripple__container {
8
+ opacity: .1;
9
+ }
10
+ .v-switch__thumb {
11
+ background: $gxp-red;
12
+ }
13
+ input[checked] ~ .v-switch__thumb {
14
+ background: $gxp-green;
15
+ }
16
+ .v-switch__track {
17
+ background: rgba($gxp-red, .5);
18
+ }
19
+ .v-switch__track:has( + .v-selection-control__input input[checked]) {
20
+ background: rgba($gxp-green, .5);
21
+ }
22
+ }
@@ -0,0 +1,53 @@
1
+ // Import variables
2
+ @use '@open-dcp/styles/src/abstracts/variables' as *;
3
+ @use 'sass:color';
4
+
5
+ // Table Container
6
+ .dcp-table-container {
7
+ height: 400px;
8
+ overflow-y: auto;
9
+
10
+ table {
11
+ width: 100%;
12
+ table-layout: fixed;
13
+ margin: 0;
14
+ max-width: none;
15
+ border-width: 0;
16
+ border-color: inherit;
17
+ border-collapse: separate;
18
+ border-spacing: 0;
19
+ empty-cells: show;
20
+ outline: 0;
21
+
22
+ td,
23
+ th {
24
+ padding: 8px;
25
+ text-align: left;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ }
30
+
31
+ th {
32
+ font-weight: bold;
33
+ border-bottom: 1px solid color-mix(in srgb, var(--dcp-branding-primary-color, #{$branding-primary-color}) 55%, white);
34
+
35
+ i {
36
+ color: $text-color-light;
37
+ }
38
+ }
39
+
40
+ td {
41
+ border-bottom: 1px solid color-mix(in srgb, var(--dcp-branding-primary-color, #{$branding-primary-color}) 55%, white);
42
+ }
43
+
44
+ tr.firstRow > td,
45
+ tr.lastRow > td {
46
+ padding: 0;
47
+ }
48
+
49
+ tr.lastRow > td {
50
+ border: 0;
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,81 @@
1
+ @use '@open-dcp/styles/src/abstracts/variables' as *;
2
+
3
+ .dcp-textarea {
4
+ position: relative;
5
+
6
+ // Textarea field
7
+ textarea {
8
+ width: 100%;
9
+ padding: 10px 12px 5px 0;
10
+ font-size: $font-size-base;
11
+ border: none; // Remove border
12
+ border-radius: 0;
13
+ outline: none;
14
+ border-bottom-width: 1px;
15
+ border-bottom-style: solid;
16
+ border-bottom-color: var(--dcp-branding-primary-color, #{$branding-primary-color});
17
+ transition: box-shadow 0.2s ease, background-color 0.2s ease;
18
+ resize: vertical; // Allow vertical resizing of the textarea
19
+
20
+ &:focus,
21
+ &:active {
22
+ background-color: $white; // White background on focus/active
23
+ box-shadow: none; // Highlight with a subtle focus ring
24
+ }
25
+
26
+ &:focus+label,
27
+ &:not(:placeholder-shown)+label {
28
+ transform: translateY(-20px);
29
+ font-size: $font-size-sm;
30
+ }
31
+
32
+ &:disabled {
33
+ background-color: $disabled-color; // Light gray for disabled
34
+ cursor: not-allowed;
35
+ box-shadow: none; // Remove focus ring
36
+ }
37
+
38
+ &.error {
39
+ border-bottom-color: $danger-color;
40
+ }
41
+ }
42
+
43
+ // Label
44
+ label {
45
+ position: absolute;
46
+ top: $spacer-half;
47
+ left: 0;
48
+ font-size: $font-size-base;
49
+ color: var(--dcp-branding-primary-color, #{$branding-primary-color});
50
+ pointer-events: none;
51
+ transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
52
+ text-transform: uppercase;
53
+
54
+ &.disabled {
55
+ color: $text-color-disabled; // Dimmed color for disabled state
56
+ }
57
+
58
+ &.error {
59
+ color: $danger-color;
60
+ }
61
+ }
62
+
63
+ // Error message
64
+ .dcp-textarea__error-message {
65
+ font-size: $font-size-sm;
66
+ color: $danger-color;
67
+ margin-top: $spacer-half;
68
+ }
69
+
70
+ // Disabled state
71
+ &.disabled {
72
+ textarea {
73
+ background-color: $disabled-color;
74
+ cursor: not-allowed;
75
+ }
76
+
77
+ label {
78
+ color: $text-color-disabled;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,25 @@
1
+ .three-dots {
2
+ &_button {
3
+ width: 30px !important;
4
+ height: 30px !important;
5
+ background: transparent !important;
6
+ color: black !important;
7
+ }
8
+
9
+ &_list {
10
+ letter-spacing: normal;
11
+ text-transform: none;
12
+ padding: 0;
13
+ min-width: 100px;
14
+
15
+ .v-list-item__overlay {
16
+ display: none;
17
+ }
18
+
19
+ .v-divider {
20
+ margin: 0;
21
+ border-top: 1px solid rgba(0, 0, 0, 0.12);
22
+ opacity: 1;
23
+ }
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ @forward './_button';
@@ -0,0 +1 @@
1
+ @forward './_dropdown';
@@ -0,0 +1,2 @@
1
+ @forward './_form-array';
2
+
@@ -0,0 +1,5 @@
1
+ // Form Generator composite: combines all form-related styles
2
+ @forward './_input';
3
+ @forward './_form-group';
4
+ @forward './_form-array';
5
+
@@ -0,0 +1,2 @@
1
+ @forward './_form-group';
2
+
@@ -0,0 +1 @@
1
+ @forward './_gxp-status';
@@ -0,0 +1 @@
1
+ @forward './_input';
package/src/index.scss ADDED
@@ -0,0 +1,17 @@
1
+ @forward './components/_button';
2
+ @forward './components/_card';
3
+ @forward './components/_dropdown';
4
+ @forward './components/_modal';
5
+ @forward './components/_input';
6
+ @forward './components/_autocomplete';
7
+ @forward './components/_textarea';
8
+ @forward './components/_slide-toggle';
9
+ @forward './components/_chip';
10
+ @forward './components/_three-dots-menu';
11
+ @forward './components/_table';
12
+ @forward './components/_gxp-status';
13
+ @forward './components/_page';
14
+ @forward './components/_form-group';
15
+ @forward './components/_form-array';
16
+ @forward './components/form-generator';
17
+