@unifiedsoftware/styles 1.0.8 → 1.0.9

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": "@unifiedsoftware/styles",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "index.scss",
@@ -22,6 +22,32 @@ $spacers: (
22
22
  );
23
23
 
24
24
  $utilities: (
25
+ 'width': (
26
+ properties: width,
27
+ class: 'w',
28
+ values: (
29
+ full: 100%,
30
+ screen: 100vh,
31
+ ),
32
+ ),
33
+ 'height': (
34
+ properties: height,
35
+ class: 'h',
36
+ values: (
37
+ full: 100%,
38
+ screen: 100dvh,
39
+ ),
40
+ responsive: true,
41
+ ),
42
+ 'overflow': (
43
+ properties: overflow,
44
+ class: 'overflow',
45
+ values: (
46
+ auto: auto,
47
+ hidden: hidden,
48
+ ),
49
+ responsive: true,
50
+ ),
25
51
  'display': (
26
52
  properties: display,
27
53
  class: 'd',
@@ -58,7 +84,7 @@ $utilities: (
58
84
  ),
59
85
  'flex-grow': (
60
86
  properties: flex-grow,
61
- class: 'flex-grow',
87
+ class: 'grow',
62
88
  values: (
63
89
  0: 0,
64
90
  1: 1,
@@ -67,13 +93,38 @@ $utilities: (
67
93
  ),
68
94
  'flex-shrink': (
69
95
  properties: flex-shrink,
70
- class: 'flex-shrink',
96
+ class: 'shrink',
71
97
  values: (
72
98
  0: 0,
73
99
  1: 1,
74
100
  ),
75
101
  responsive: true,
76
102
  ),
103
+ 'justify-content': (
104
+ properties: justify-content,
105
+ class: 'justify',
106
+ values: (
107
+ start: flex-start,
108
+ end: flex-end,
109
+ center: center,
110
+ between: space-between,
111
+ around: space-around,
112
+ evenly: space-evenly,
113
+ ),
114
+ responsive: true,
115
+ ),
116
+ 'align-items': (
117
+ properties: align-items,
118
+ class: 'items',
119
+ values: (
120
+ start: flex-start,
121
+ end: flex-end,
122
+ center: center,
123
+ stretch: stretch,
124
+ baseline: baseline,
125
+ ),
126
+ responsive: true,
127
+ ),
77
128
  'gap': (
78
129
  properties: gap,
79
130
  class: 'gap',
@@ -0,0 +1,42 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}accordion {
4
+ &-item {
5
+ border-bottom: 1px solid #e6e6e6;
6
+
7
+ &:last-child {
8
+ border-bottom: none;
9
+ }
10
+ }
11
+
12
+ &-header {
13
+ padding: 0.75rem 1rem;
14
+ cursor: pointer;
15
+ display: flex;
16
+ align-items: center;
17
+ gap: 1rem;
18
+
19
+ &__content {
20
+ flex-grow: 1;
21
+ }
22
+
23
+ &__start-content,
24
+ &__end-content {
25
+ flex-shrink: 0;
26
+ }
27
+
28
+ &__title {
29
+ font-size: 0.875rem;
30
+ font-weight: 500;
31
+ }
32
+
33
+ &__subtitle {
34
+ font-size: 0.75rem;
35
+ opacity: 0.75;
36
+ }
37
+ }
38
+
39
+ &-panel {
40
+ padding: 1rem;
41
+ }
42
+ }
@@ -16,6 +16,7 @@
16
16
  color: var(--#{$prefix}button-color);
17
17
  background-color: var(--#{$prefix}button-background);
18
18
  display: inline-flex;
19
+ justify-content: center;
19
20
  align-items: center;
20
21
  gap: var(--#{$prefix}button-gap);
21
22
  user-select: none;
@@ -28,6 +29,10 @@
28
29
  @include overlay();
29
30
  @include outline();
30
31
 
32
+ &--block {
33
+ width: 100%;
34
+ }
35
+
31
36
  &--disabled {
32
37
  opacity: 0.6;
33
38
  pointer-events: none;
@@ -0,0 +1,34 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}card {
4
+ border: var(--#{$prefix}card-border-width) var(--#{$prefix}card-border-style) var(--#{$prefix}card-border-color);
5
+ border-radius: var(--#{$prefix}card-border-radius);
6
+
7
+ &-header {
8
+ padding: var(--#{$prefix}card-header-padding-y) var(--#{$prefix}card-header-padding-x);
9
+ display: flex;
10
+ align-items: center;
11
+ gap: var(--#{$prefix}card-header-gap);
12
+
13
+ &__start-content,
14
+ &__end-content {
15
+ flex-shrink: 0;
16
+ }
17
+
18
+ &__content {
19
+ flex-grow: 1;
20
+ }
21
+
22
+ &__title {
23
+ font-size: var(--#{$prefix}card-header-title-font-size);
24
+ font-weight: var(--#{$prefix}card-header-title-font-weight);
25
+ line-height: var(--#{$prefix}card-header-title-line-height);
26
+ }
27
+
28
+ &__subtitle {
29
+ font-size: var(--#{$prefix}card-header-subtitle-font-size);
30
+ font-weight: var(--#{$prefix}card-header-subtitle-font-weight);
31
+ line-height: var(--#{$prefix}card-header-subtitle-line-height);
32
+ }
33
+ }
34
+ }
@@ -8,9 +8,15 @@
8
8
  @use 'chip';
9
9
  @use 'button';
10
10
 
11
+ @use 'scroll-area';
12
+
11
13
  @use 'backdrop';
12
14
  @use 'drawer';
13
15
 
16
+ @use 'accordion';
17
+ @use 'list';
14
18
  @use 'menu';
15
19
  @use 'divider';
16
20
  @use 'tabs';
21
+
22
+ @use 'card';
@@ -0,0 +1,119 @@
1
+ @use '../variables' as *;
2
+ @use '../mixins/overlay' as *;
3
+
4
+ .#{$prefix}list {
5
+ margin: 0;
6
+ padding: var(--#{$prefix}list-padding-y) var(--#{$prefix}list-padding-x);
7
+ color: var(--#{$prefix}list-color);
8
+ background-color: var(--#{$prefix}list-background);
9
+
10
+ &-item {
11
+ position: relative;
12
+ height: var(--#{$prefix}list-item-height);
13
+ padding: var(--#{$prefix}list-item-padding-y) var(--#{$prefix}list-item-padding-x);
14
+ font-size: var(--#{$prefix}list-item-font-size);
15
+ font-weight: var(--#{$prefix}list-item-font-weight);
16
+ border-radius: var(--#{$prefix}list-item-border-radius);
17
+ text-decoration: none;
18
+ display: flex;
19
+ align-items: center;
20
+ color: var(--#{$prefix}list-item-color);
21
+ background-color: var(--#{$prefix}list-item-background);
22
+ -webkit-tap-highlight-color: transparent;
23
+ gap: var(--#{$prefix}list-item-gap);
24
+
25
+ &:hover {
26
+ text-decoration: none;
27
+ }
28
+
29
+ @include overlay();
30
+
31
+ &--hoverable {
32
+ cursor: pointer;
33
+ user-select: none;
34
+ }
35
+
36
+ &--disabled {
37
+ opacity: 0.6;
38
+ pointer-events: none;
39
+ }
40
+
41
+ &__start-content,
42
+ &__end-content {
43
+ flex-shrink: 0;
44
+ z-index: 1;
45
+ display: flex;
46
+ justify-content: center;
47
+ align-items: center;
48
+ gap: calc(var(--#{$prefix}list-item-gap) * 0.5);
49
+ }
50
+
51
+ &__start-content .#{$prefix}icon,
52
+ &__end-content .#{$prefix}icon {
53
+ --#{$prefix}icon-font-size: var(--#{$prefix}list-item-icon-font-size);
54
+ --#{$prefix}icon-color: var(--#{$prefix}list-item-icon-color);
55
+ }
56
+
57
+ &__content {
58
+ flex-grow: 1;
59
+ z-index: 1;
60
+ display: grid;
61
+ overflow: hidden;
62
+ }
63
+
64
+ &__title {
65
+ overflow: hidden;
66
+ display: -webkit-box;
67
+ -webkit-box-orient: vertical;
68
+ -webkit-line-clamp: 1;
69
+ }
70
+ }
71
+
72
+ &-subheader {
73
+ position: relative;
74
+ height: var(--#{$prefix}list-subheader-height);
75
+ padding: var(--#{$prefix}list-subheader-padding-y) var(--#{$prefix}list-subheader-padding-x);
76
+ font-size: var(--#{$prefix}list-subheader-font-size);
77
+ font-weight: var(--#{$prefix}list-subheader-font-weight);
78
+ text-decoration: none;
79
+ border-bottom: var(--#{$prefix}list-subheader-border-width) solid var(--#{$prefix}list-subheader-border-color);
80
+ border-radius: var(--#{$prefix}list-subheader-border-radius);
81
+ display: flex;
82
+ align-items: center;
83
+ color: var(--#{$prefix}list-subheader-color);
84
+ background-color: var(--#{$prefix}list-subheader-background);
85
+ gap: var(--#{$prefix}list-subheader-gap);
86
+
87
+ &:hover {
88
+ text-decoration: none;
89
+ }
90
+
91
+ @include overlay();
92
+
93
+ &__icon {
94
+ flex-shrink: 0;
95
+ z-index: 1;
96
+ display: flex;
97
+ justify-content: center;
98
+ align-items: center;
99
+ }
100
+
101
+ &__content {
102
+ flex-grow: 1;
103
+ z-index: 1;
104
+ display: grid;
105
+ overflow: hidden;
106
+ }
107
+
108
+ &__title {
109
+ overflow: hidden;
110
+ display: -webkit-box;
111
+ -webkit-box-orient: vertical;
112
+ -webkit-line-clamp: 1;
113
+ }
114
+ }
115
+
116
+ &-group & {
117
+ --#{$prefix}list-background: var(--#{$prefix}list-group-background);
118
+ }
119
+ }
@@ -0,0 +1,21 @@
1
+ @use '../variables' as *;
2
+
3
+ .#{$prefix}scroll-area {
4
+ &::-webkit-scrollbar {
5
+ width: 12px;
6
+ }
7
+
8
+ &::-webkit-scrollbar-track {
9
+ box-shadow: inset 0 0 0px 2px #fff;
10
+ }
11
+
12
+ &::-webkit-scrollbar-thumb {
13
+ background-color: #ccd2d9;
14
+ box-shadow: inset 0 0 0px 2px #fff;
15
+ border-radius: 6px;
16
+ }
17
+
18
+ &--vertical {
19
+ overflow-y: auto;
20
+ }
21
+ }
@@ -9,15 +9,12 @@
9
9
  color: var(--#{$prefix}overlay-color);
10
10
  opacity: var(--#{$prefix}overlay-opacity);
11
11
  background-color: currentColor;
12
- transition:
13
- opacity 15ms linear,
14
- background-color 15ms linear;
12
+ transition: all 0.1s cubic-bezier(0.215, 0.61, 0.355, 1);
15
13
  }
16
14
 
17
15
  &:hover > .#{$prefix}overlay {
18
16
  color: var(--#{$prefix}_hover-overlay-color, var(--#{$prefix}overlay-color));
19
17
  opacity: var(--#{$prefix}_hover-overlay-opacity, var(--#{$prefix}overlay-opacity));
20
- transition: opacity 30ms linear;
21
18
  }
22
19
 
23
20
  &:active > .#{$prefix}overlay {
@@ -135,8 +135,35 @@
135
135
  --#{$prefix}button-color: var(--#{$prefix}danger-color);
136
136
  }
137
137
 
138
- // &--text {
139
- // }
138
+ &--flat {
139
+ --#{$prefix}overlay-opacity: 0.08;
140
+ --#{$prefix}_hover-overlay-opacity: 0.12;
141
+ --#{$prefix}_active-overlay-opacity: 0.24;
142
+ }
143
+
144
+ &--flat#{&}--primary {
145
+ --#{$prefix}button-color: var(--#{$prefix}primary-color);
146
+ }
147
+
148
+ &--flat#{&}--secondary {
149
+ --#{$prefix}button-color: var(--#{$prefix}black-color);
150
+ }
151
+
152
+ &--flat#{&}--success {
153
+ --#{$prefix}button-color: var(--#{$prefix}success-color);
154
+ }
155
+
156
+ &--flat#{&}--info {
157
+ --#{$prefix}button-color: var(--#{$prefix}info-color);
158
+ }
159
+
160
+ &--flat#{&}--warning {
161
+ --#{$prefix}button-color: var(--#{$prefix}warning-color);
162
+ }
163
+
164
+ &--flat#{&}--danger {
165
+ --#{$prefix}button-color: var(--#{$prefix}danger-color);
166
+ }
140
167
 
141
168
  &--text#{&}--primary {
142
169
  --#{$prefix}button-color: var(--#{$prefix}primary-color);
@@ -0,0 +1,20 @@
1
+ @use '../../../variables' as *;
2
+
3
+ .#{$prefix}card {
4
+ --#{$prefix}card-border-width: 1px;
5
+ --#{$prefix}card-border-style: solid;
6
+ --#{$prefix}card-border-color: rgba(9, 30, 66, 0.14);
7
+ --#{$prefix}card-border-radius: 8px;
8
+
9
+ &-header {
10
+ --#{$prefix}card-header-padding-y: 1rem;
11
+ --#{$prefix}card-header-padding-x: 1rem;
12
+ --#{$prefix}card-header-gap: 1rem;
13
+
14
+ &__title {
15
+ --#{$prefix}card-header-title-font-size: 0.75rem;
16
+ --#{$prefix}card-header-title-font-weight: 600;
17
+ --#{$prefix}card-header-title-line-height: 24px;
18
+ }
19
+ }
20
+ }
@@ -8,5 +8,8 @@
8
8
 
9
9
  @use 'drawer';
10
10
 
11
+ @use 'list';
11
12
  @use 'menu';
12
13
  @use 'tabs';
14
+
15
+ @use 'card';
@@ -0,0 +1,62 @@
1
+ @use '../../../variables' as *;
2
+
3
+ .#{$prefix}list {
4
+ --#{$prefix}list-padding-y: 0;
5
+ --#{$prefix}list-padding-x: 0;
6
+ --#{$prefix}list-color: #343a40;
7
+ --#{$prefix}list-background: #fff;
8
+
9
+ &-item {
10
+ --#{$prefix}list-item-height: 40px;
11
+ --#{$prefix}list-item-padding-y: 0;
12
+ --#{$prefix}list-item-padding-x: 1rem;
13
+ --#{$prefix}list-item-padding-level: 1.25rem;
14
+ --#{$prefix}list-item-font-size: 12px;
15
+ --#{$prefix}list-item-font-weight: 500;
16
+ --#{$prefix}list-item-border-radius: 0;
17
+ --#{$prefix}list-item-gap: 1rem;
18
+
19
+ & > .#{$prefix}overlay {
20
+ --#{$prefix}overlay-color: inherit;
21
+ --#{$prefix}overlay-opacity: 0;
22
+ --#{$prefix}_hover-overlay-color: inherit;
23
+ --#{$prefix}_hover-overlay-opacity: 0.04;
24
+ --#{$prefix}_active-overlay-opacity: 0.08;
25
+ }
26
+
27
+ & .#{$prefix}icon {
28
+ --#{$prefix}icon-font-size: 16px;
29
+ --#{$prefix}icon-color: var(--#{$prefix}primary-color);
30
+ }
31
+
32
+ &--selected {
33
+ --#{$prefix}list-item-color: var(--#{$prefix}primary-color);
34
+ }
35
+
36
+ &--selected > .#{$prefix}overlay {
37
+ --#{$prefix}overlay-color: var(--#{$prefix}primary-color);
38
+ --#{$prefix}overlay-opacity: 0.08;
39
+ --#{$prefix}_hover-overlay-opacity: 0.12;
40
+ --#{$prefix}_active-overlay-opacity: 0.16;
41
+ }
42
+ }
43
+
44
+ &-subheader {
45
+ --#{$prefix}list-subheader-height: 40px;
46
+ --#{$prefix}list-subheader-padding-y: 0;
47
+ --#{$prefix}list-subheader-padding-x: 1rem;
48
+ --#{$prefix}list-subheader-padding-level: 2rem;
49
+ --#{$prefix}list-subheader-font-size: 12px;
50
+ --#{$prefix}list-subheader-font-weight: 700;
51
+ --#{$prefix}list-subheader-border-radius: 0;
52
+ --#{$prefix}list-subheader-gap: 1rem;
53
+ --#{$prefix}list-subheader-border-width: 1px;
54
+ --#{$prefix}list-subheader-border-color: #dee2e6;
55
+ }
56
+
57
+ &-group > &-item--selected > .#{$prefix}overlay {
58
+ --#{$prefix}overlay-opacity: 0;
59
+ --#{$prefix}_hover-overlay-opacity: 0;
60
+ --#{$prefix}_active-overlay-opacity: 0;
61
+ }
62
+ }