@geoffcox/sterling-svelte-themes 2.0.14 → 2.0.16

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/README.md CHANGED
@@ -22,6 +22,16 @@ https://github.com/GeoffCox/sterling-svelte-themes
22
22
 
23
23
  ## Change Log
24
24
 
25
+ ### 2.0.16
26
+
27
+ - Added style support for Dialog not having a form element that wraps content.
28
+ - CSS style fix: content: '' => content: ""
29
+
30
+ ### 2.0.15
31
+
32
+ - Fixed issue with checkbox and radio button styles to ensure hidden input
33
+ fills button area and can be clicked.
34
+
25
35
  ### 2.0.13/2.0.14
26
36
 
27
37
  - Removed spurious min-width on slider
@@ -83,7 +83,7 @@ The checkmark is a rotated L centered in the box.
83
83
  border-style: solid;
84
84
  border-width: 0 3px 3px 0;
85
85
  box-sizing: border-box;
86
- content: '';
86
+ content: "";
87
87
  height: 14px;
88
88
  left: 50%;
89
89
  position: absolute;
@@ -91,8 +91,8 @@ The checkmark is a rotated L centered in the box.
91
91
  transform: translate(-50%, -50%) rotate(45deg);
92
92
  transform-origin: center;
93
93
  transition:
94
- border-color 250ms,
95
- opacity 150ms;
94
+ border-color 250ms,
95
+ opacity 150ms;
96
96
  width: 7px;
97
97
  opacity: 0;
98
98
  }
@@ -1,21 +1,45 @@
1
1
  .sterling-checkbox.button {
2
- display: grid;
3
- grid-template-columns: 1fr;
4
- grid-template-rows: 1fr;
2
+ align-content: center;
3
+ align-items: center;
4
+ appearance: none;
5
+ background-color: transparent;
6
+ border-color: transparent;
7
+ border-style: solid;
8
+ border-width: var(--stsv-button__border-width);
9
+ box-sizing: border-box;
10
+ color: var(--stsv-button__color);
11
+ cursor: pointer;
12
+ display: inline-flex;
13
+ flex-direction: row;
14
+ font: inherit;
5
15
  justify-content: center;
6
16
  justify-items: center;
7
- border: 1px solid transparent;
17
+ column-gap: 0.25em;
18
+ overflow: hidden;
19
+ padding: 0.5em 1em;
20
+ /* position:relative contains the input since container is removed from layout */
21
+ position: relative;
22
+ text-decoration: none;
23
+ text-overflow: ellipsis;
24
+ transition:
25
+ background-color 250ms,
26
+ color 250ms,
27
+ border-color 250ms;
28
+ white-space: nowrap;
29
+ user-select: none;
8
30
  }
9
31
 
10
32
  .sterling-checkbox.button:not(.disabled):hover {
11
33
  background-color: var(--stsv-button__background-color--hover);
34
+ border-color: transparent;
12
35
  }
13
36
 
14
- .sterling-checkbox.button:not(.disabled):not(.checked):active {
37
+ .sterling-checkbox.button:not(.checked):not(.disabled):active {
15
38
  background-color: var(--stsv-button__background-color--active);
39
+ border-color: transparent;
16
40
  }
17
41
 
18
- .sterling-checkbox.button:not(.disabled).checked {
42
+ .sterling-checkbox.button.checked:not(.disabled) {
19
43
  background-color: var(--stsv-input__background-color--selected);
20
44
  }
21
45
 
@@ -26,17 +50,9 @@
26
50
  outline-width: 2px;
27
51
  }
28
52
 
29
- .sterling-checkbox.button .container,
30
- .sterling-radio.button label {
31
- grid-row: 1 / span 1;
32
- grid-column: 1 / span 1;
33
- }
34
-
53
+ /* Remove the container from layout */
35
54
  .sterling-checkbox.button .container {
36
- display: block;
37
- justify-self: stretch;
38
- align-self: stretch;
39
- margin-right: unset;
55
+ display: contents;
40
56
  }
41
57
 
42
58
  .sterling-checkbox.button input {
@@ -56,8 +72,21 @@
56
72
  display: none;
57
73
  }
58
74
 
59
- .sterling-checkbox.button.disabled {
60
- background-color: var(--stsv-input__background-color--disabled);
75
+ .sterling-checkbox.button.disabled,
76
+ .sterling-checkbox.button.disabled:hover,
77
+ .sterling-checkbox.button.disabled:active,
78
+ .sterling-checkbox.button.disabled:focus-visible {
79
+ cursor: not-allowed;
80
+ background-color: var(--stsv-button__background-color--disabled);
81
+ border-color: var(--stsv-button__border-color--disabled);
82
+ color: var(--stsv-button__color--disabled);
83
+ }
84
+
85
+ .sterling-checkbox.button.checked.disabled,
86
+ .sterling-checkbox.button.checked.disabled:hover,
87
+ .sterling-checkbox.button.checked.disabled:active,
88
+ .sterling-checkbox.button.checked.disabled:focus-visible {
89
+ background-color: var(--stsv-input__background-color--selected);
61
90
  }
62
91
 
63
92
  .sterling-checkbox.button.disabled label {
@@ -22,6 +22,7 @@
22
22
  opacity: 0;
23
23
  }
24
24
 
25
+ .sterling-dialog > .content,
25
26
  .sterling-dialog > form > .content {
26
27
  background-color: var(--stsv-common__background-color);
27
28
  border-color: var(--stsv-common__border-color);
@@ -40,14 +41,17 @@
40
41
  opacity: 0;
41
42
  }
42
43
 
44
+ .sterling-dialog.open > .content,
43
45
  .sterling-dialog.open > form > .content {
44
46
  opacity: 1;
45
47
  }
46
48
 
49
+ .sterling-dialog.closing > .content,
47
50
  .sterling-dialog.closing > form > .content {
48
51
  opacity: 0;
49
52
  }
50
53
 
54
+ .sterling-dialog > .content > .header,
51
55
  .sterling-dialog > form > .content > .header {
52
56
  background-color: var(--stsv-common__background-color--secondary);
53
57
  display: grid;
@@ -59,23 +63,28 @@
59
63
  column-gap: 1em;
60
64
  }
61
65
 
66
+ .sterling-dialog > .content > .header > .title,
62
67
  .sterling-dialog > form > .content > .header > .title {
63
68
  font-size: 1.4em;
64
69
  }
65
70
 
71
+ .sterling-dialog > .content > .header > .close,
66
72
  .sterling-dialog > form > .content > .header > .close {
67
73
  justify-self: flex-end;
68
74
  }
69
75
 
76
+ .sterling-dialog > .content > .header > .close .close-x,
70
77
  .sterling-dialog > form > .content > .header > .close .close-x {
71
78
  width: 1em;
72
79
  height: 1em;
73
80
  position: relative;
74
81
  }
75
82
 
83
+ .sterling-dialog > .content > .header > .close .close-x::before,
84
+ .sterling-dialog > .content > .header > .close .close-x::after,
76
85
  .sterling-dialog > form > .content > .header > .close .close-x::before,
77
86
  .sterling-dialog > form > .content > .header > .close .close-x::after {
78
- content: '';
87
+ content: "";
79
88
  position: absolute;
80
89
  width: 0.75em;
81
90
  height: 0.125em;
@@ -83,26 +92,31 @@
83
92
  top: 0.45em;
84
93
  }
85
94
 
95
+ .sterling-dialog > .content > .header > .close .close-x::before,
86
96
  .sterling-dialog > form > .content > .header > .close .close-x::before {
87
97
  transform: rotate(45deg);
88
98
  left: 0.125em;
89
99
  }
90
100
 
101
+ .sterling-dialog > .content > .header > .close .close-x::after,
91
102
  .sterling-dialog > form > .content > .header > .close .close-x::after {
92
103
  transform: rotate(-45deg);
93
104
  right: 0.125em;
94
105
  }
95
106
 
107
+ .sterling-dialog > .content > .body,
96
108
  .sterling-dialog > form > .content > .body {
97
109
  padding: 1em;
98
110
  }
99
111
 
112
+ .sterling-dialog > .content > .separator,
100
113
  .sterling-dialog > form > .content > .separator {
101
114
  background-color: var(--stsv-common__background-color--secondary);
102
115
  height: var(--stsv-common__border-width);
103
116
  margin: 0 0.25em;
104
117
  }
105
118
 
119
+ .sterling-dialog > .content > .footer,
106
120
  .sterling-dialog > form > .content > .footer {
107
121
  padding: 0.5em 1em;
108
122
  gap: 5px;
@@ -110,6 +124,7 @@
110
124
 
111
125
  @media (prefers-reduced-motion) {
112
126
  .sterling-dialog::backdrop,
127
+ .sterling-dialog > .content,
113
128
  .sterling-dialog > form > .content {
114
129
  transition: none;
115
130
  }
@@ -59,7 +59,7 @@
59
59
 
60
60
  .sterling-dropdown .chevron::after {
61
61
  position: absolute;
62
- content: '';
62
+ content: "";
63
63
  top: 50%;
64
64
  left: 50%;
65
65
  width: 7px;
@@ -80,7 +80,7 @@
80
80
  .sterling-radio .indicator::after {
81
81
  background-color: transparent;
82
82
  border-radius: 10000px;
83
- content: '';
83
+ content: "";
84
84
  height: 9px;
85
85
  left: 50%;
86
86
  position: absolute;
@@ -5,6 +5,8 @@
5
5
  justify-content: center;
6
6
  justify-items: center;
7
7
  border: 1px solid transparent;
8
+ /* position:relative contains the input since container is removed from layout */
9
+ position: relative;
8
10
  }
9
11
 
10
12
  .sterling-radio.button:not(.disabled):hover {
@@ -12,35 +14,23 @@
12
14
  }
13
15
 
14
16
  .sterling-radio.button:not(.disabled):not(.checked):active {
15
- background-color: var(--stsv-button__background-color--active);
16
- }
17
-
18
- .sterling-radio.button:not(.disabled).checked {
19
- background-color: var(--stsv-input__background-color--selected);
20
- }
21
-
22
- .sterling-radio.button.using-keyboard:focus-within {
23
- outline-color: var(--stsv-common__outline-color);
24
- outline-offset: 0;
25
- outline-style: solid;
26
- outline-width: 2px;
27
- }
17
+ background-color: var(--stsv-button__background-color--active);
18
+ }
28
19
 
29
- .sterling-radio.button .container,
30
- .sterling-radio.button label {
31
- grid-row: 1 / span 1;
32
- grid-column: 1 / span 1;
20
+ .sterling-radio.button:not(.disabled).checked {
21
+ background-color: var(--stsv-input__background-color--selected);
33
22
  }
34
23
 
35
- .sterling-radio.button .container {
36
- display: block;
37
- justify-self: stretch;
38
- align-self: stretch;
39
- margin-right: unset;
24
+ .sterling-radio.button.using-keyboard:focus-within {
25
+ outline-color: var(--stsv-common__outline-color);
26
+ outline-offset: 0;
27
+ outline-style: solid;
28
+ outline-width: 2px;
40
29
  }
41
30
 
42
- .sterling-radio.button label {
43
- display: block;
31
+ /* Remove the container from layout */
32
+ .sterling-radio.button .container {
33
+ display: contents;
44
34
  }
45
35
 
46
36
  .sterling-radio.button input {
@@ -52,11 +42,14 @@
52
42
  height: unset;
53
43
  }
54
44
 
45
+ .sterling-radio.button label {
46
+ display: block;
47
+ }
48
+
55
49
  .sterling-radio.button .indicator {
56
50
  display: none;
57
51
  }
58
52
 
59
-
60
53
  .sterling-radio.button.disabled {
61
54
  background-color: var(--stsv-input__background-color--disabled);
62
55
  }
@@ -54,7 +54,7 @@
54
54
 
55
55
  .sterling-select .chevron::after {
56
56
  position: absolute;
57
- content: '';
57
+ content: "";
58
58
  top: 50%;
59
59
  left: 50%;
60
60
  width: 7px;
@@ -9,7 +9,7 @@
9
9
 
10
10
  .sterling-tree-chevron::after {
11
11
  position: absolute;
12
- content: '';
12
+ content: "";
13
13
  top: 50%;
14
14
  left: 50%;
15
15
  width: 7px;
@@ -62,7 +62,7 @@
62
62
 
63
63
  .sterling-tree-chevron.leaf::after {
64
64
  animation: none;
65
- content: '';
65
+ content: "";
66
66
  position: absolute;
67
67
  font: inherit;
68
68
  left: 50%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte-themes",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern theme for the sterling-svelte component library.",
6
6
  "license": "MIT",