@geoffcox/sterling-svelte-themes 2.0.6 → 2.0.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.
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.8
26
+
27
+ - Added styles for checkbox button variant
28
+ - Added styles for radio button variant
29
+ - Cleaned up disabled styles for checkbox and radio
30
+
31
+ ### 2.0.7
32
+
33
+ - Added styles for new Splitter component
34
+
25
35
  ### 2.0.6
26
36
 
27
37
  - Fixed a few of invalid CSS declarations for background and border colors
@@ -115,6 +115,25 @@ The checkmark is a rotated L centered in the box.
115
115
  font: inherit;
116
116
  }
117
117
 
118
+ .sterling-checkbox.disabled,
119
+ .sterling-checkbox.disabled input,
120
+ .sterling-checkbox.disabled > label {
121
+ cursor: not-allowed;
122
+ }
123
+
124
+ .sterling-checkbox.disabled .indicator {
125
+ background-color: var(--stsv-input__background-color--disabled);
126
+ border-color: var(--stsv-input__border-color--disabled);
127
+ }
128
+
129
+ .sterling-checkbox.disabled .indicator::after {
130
+ border-color: var(--stsv-input__color--disabled);
131
+ }
132
+
133
+ .sterling-checkbox.disabled > label {
134
+ color: var(--stsv-common__color--disabled);
135
+ }
136
+
118
137
  @media (prefers-reduced-motion) {
119
138
  .sterling-checkbox .indicator,
120
139
  .sterling-checkbox .indicator::after,
@@ -0,0 +1,69 @@
1
+ .sterling-checkbox.button {
2
+ display: grid;
3
+ grid-template-columns: 1fr;
4
+ grid-template-rows: 1fr;
5
+ justify-content: center;
6
+ justify-items: center;
7
+ }
8
+
9
+ .sterling-checkbox.button:not(.disabled):hover {
10
+ background-color: var(--stsv-button__background-color--hover);
11
+ }
12
+
13
+ .sterling-checkbox.button:not(.disabled):not(.checked):active {
14
+ background-color: var(--stsv-button__background-color--active);
15
+ border-color: transparent;
16
+ }
17
+
18
+ .sterling-checkbox.button:not(.disabled).checked {
19
+ background-color: var(--stsv-input__background-color--selected);
20
+ border-color: transparent;
21
+ }
22
+
23
+ .sterling-checkbox.button.using-keyboard:focus-within {
24
+ border-color: var(--stsv-button__border-color--focus);
25
+ outline-color: var(--stsv-common__outline-color);
26
+ outline-offset: 0;
27
+ outline-style: solid;
28
+ outline-width: 2px;
29
+ }
30
+
31
+ .sterling-checkbox.button .container,
32
+ .sterling-radio.button label {
33
+ grid-row: 1 / span 1;
34
+ grid-column: 1 / span 1;
35
+ }
36
+
37
+ .sterling-checkbox.button .container {
38
+ justify-self: stretch;
39
+ align-self: stretch;
40
+ margin-right: unset;
41
+ }
42
+
43
+ .sterling-checkbox.button input {
44
+ appearance: initial;
45
+ display: block;
46
+ box-sizing: border-box;
47
+ opacity: 0;
48
+ width:100%;
49
+ height: 100%;
50
+ position: relative;
51
+ justify-self: stretch;
52
+ align-self: stretch;
53
+ }
54
+
55
+ .sterling-checkbox.button .indicator {
56
+ display: none;
57
+ }
58
+
59
+
60
+ .sterling-checkbox.button.disabled {
61
+ background-color: var(--stsv-input__background-color--disabled);
62
+ border-color: transparent;
63
+ }
64
+
65
+ .sterling-radio.button.disabled > label {
66
+ color: var(--stsv-common__color--disabled);
67
+ }
68
+
69
+
@@ -1,2 +1,2 @@
1
1
  @import url('./Checkbox.base.css');
2
- @import url('./Checkbox.disabled.css');
2
+ @import url('./Checkbox.button.css');
@@ -100,6 +100,25 @@
100
100
  font: inherit;
101
101
  }
102
102
 
103
+ .sterling-radio.disabled,
104
+ .sterling-radio.disabled input,
105
+ .sterling-radio.disabled > label {
106
+ cursor: not-allowed;
107
+ }
108
+
109
+ .sterling-radio.disabled .indicator {
110
+ background-color: var(--stsv-input__background-color--disabled);
111
+ border-color: var(--stsv-input__border-color--disabled);
112
+ }
113
+
114
+ .sterling-radio.disabled .indicator::after {
115
+ border-color: var(--stsv-input__color--disabled);
116
+ }
117
+
118
+ .sterling-radio.disabled > label {
119
+ color: var(--stsv-common__color--disabled);
120
+ }
121
+
103
122
  @media (prefers-reduced-motion) {
104
123
  .sterling-radio .indicator,
105
124
  .sterling-radio .indicator::after,
@@ -0,0 +1,67 @@
1
+ .sterling-radio.button {
2
+ display: grid;
3
+ grid-template-columns: 1fr;
4
+ grid-template-rows: 1fr;
5
+ justify-content: center;
6
+ justify-items: center;
7
+ }
8
+
9
+ .sterling-radio.button:not(.disabled):hover {
10
+ background-color: var(--stsv-button__background-color--hover);
11
+ }
12
+
13
+ .sterling-radio.button:not(.disabled):not(.checked):active {
14
+ background-color: var(--stsv-button__background-color--active);
15
+ border-color: transparent;
16
+ }
17
+
18
+ .sterling-radio.button.checked {
19
+ background-color: var(--stsv-input__background-color--selected);
20
+ border-color: transparent;
21
+ }
22
+
23
+ .sterling-radio.button.using-keyboard:focus-within {
24
+ border-color: var(--stsv-button__border-color--focus);
25
+ outline-color: var(--stsv-common__outline-color);
26
+ outline-offset: 0;
27
+ outline-style: solid;
28
+ outline-width: 2px;
29
+ }
30
+
31
+ .sterling-radio.button .container,
32
+ .sterling-radio.button label {
33
+ grid-row: 1 / span 1;
34
+ grid-column: 1 / span 1;
35
+ }
36
+
37
+ .sterling-radio.button .container {
38
+ justify-self: stretch;
39
+ align-self: stretch;
40
+ margin-right: unset;
41
+ }
42
+
43
+ .sterling-radio.button input {
44
+ appearance: initial;
45
+ display: block;
46
+ box-sizing: border-box;
47
+ opacity: 0;
48
+ width:100%;
49
+ height: 100%;
50
+ position: relative;
51
+ justify-self: stretch;
52
+ align-self: stretch;
53
+ }
54
+
55
+ .sterling-radio.button .indicator {
56
+ display: none;
57
+ }
58
+
59
+
60
+ .sterling-radio.button.disabled {
61
+ background-color: var(--stsv-input__background-color--disabled);
62
+ border-color: transparent;
63
+ }
64
+
65
+ .sterling-radio.button.disabled > label {
66
+ color: var(--stsv-common__color--disabled);
67
+ }
@@ -1,2 +1,2 @@
1
1
  @import url('./Radio.base.css');
2
- @import url('./Radio.disabled.css');
2
+ @import url('./Radio.button.css');
@@ -0,0 +1,124 @@
1
+ /* ----- Splitter ----- */
2
+ .sterling-splitter {
3
+ width: 100%;
4
+ height: 100%;
5
+ box-sizing: border-box;
6
+ outline: none;
7
+ overflow: hidden;
8
+ display: grid;
9
+ }
10
+
11
+ .sterling-splitter.horizontal {
12
+ grid-template-columns: 1fr;
13
+ grid-template-rows: minmax(var(--min-primary-size, 0), var(--primary-size)) auto minmax(var(--min-secondary-size, 0), 1fr);
14
+ grid-template-areas: "primary" "split" "secondary";
15
+ }
16
+
17
+ .sterling-splitter.vertical {
18
+ grid-template-columns: minmax(var(--min-primary-size, 0), var(--primary-size)) auto minmax(var(--min-secondary-size, 0), 1fr);
19
+ grid-template-rows: 1fr;
20
+ grid-template-areas: "primary split secondary";
21
+ }
22
+
23
+ /* ----- Panes ----- */
24
+
25
+ .sterling-splitter > .primary,
26
+ .sterling-splitter > .split,
27
+ .sterling-splitter > .secondary {
28
+ box-sizing: border-box;
29
+ outline: none;
30
+ overflow: hidden;
31
+ }
32
+
33
+ /* ----- Primary ----- */
34
+
35
+ .sterling-splitter > .primary {
36
+ grid-area: primary;
37
+ }
38
+
39
+ .sterling-splitter.horizontal > .primary {
40
+ width: 100%;
41
+ }
42
+
43
+ .sterling-splitter.vertical > .primary {
44
+ height: 100%;
45
+ }
46
+
47
+ /* ----- Split ----- */
48
+
49
+ .sterling-splitter > .split {
50
+ display: flex;
51
+ grid-area: split;
52
+ height: 100%;
53
+ width: 100%;
54
+ box-sizing: border-box;
55
+ outline: none;
56
+ overflow: hidden;
57
+ user-select: none;
58
+ transition: background-color 300ms;
59
+ }
60
+
61
+ .sterling-splitter.horizontal > .split {
62
+ cursor: row-resize;
63
+ width: 100%;
64
+ }
65
+
66
+ .sterling-splitter.vertical > .split {
67
+ flex-direction: column;
68
+ cursor: col-resize;
69
+ height: 100%;
70
+ }
71
+
72
+ /* ----- Secondary ----- */
73
+
74
+ .sterling-splitter > .secondary {
75
+ grid-area: secondary;
76
+ }
77
+
78
+ .sterling-splitter.horizontal > .secondary {
79
+ width: 100%;
80
+ }
81
+
82
+ .sterling-splitter.vertical > .secondary {
83
+ height: 100%;
84
+ }
85
+
86
+ /* ----- Default Split ----- */
87
+
88
+ .sterling-splitter > .split > .default-split-line {
89
+ box-sizing: border-box;
90
+ outline: none;
91
+ user-select: none;
92
+ border: none;
93
+ background-color: var(--stsv-button__border-color);
94
+
95
+ transition: background-color 300ms;
96
+ }
97
+
98
+ .sterling-splitter.horizontal > .split > .default-split-line {
99
+ width: 100%;
100
+ height: 1px;
101
+ margin: 2px 0;
102
+ align-self: center;
103
+ }
104
+
105
+ .sterling-splitter.vertical > .split > .default-split-line {
106
+ width: 1px;
107
+ height: 100%;
108
+ margin: 0 2px;
109
+ align-self: center;
110
+ }
111
+
112
+ .sterling-splitter > .split:hover > .default-split-line {
113
+ background-color: var(--stsv-button__border-color--hover);
114
+ }
115
+
116
+ .sterling-splitter.horizontal > .split:hover > .default-split-line {
117
+ height: 3px;
118
+ margin: 1px 0;
119
+ }
120
+
121
+ .sterling-splitter.vertical > .split:hover > .default-split-line {
122
+ width: 3px;
123
+ margin: 0 1px;
124
+ }
@@ -0,0 +1 @@
1
+ @import url('./Splitter.base.css');
package/css/sterling.css CHANGED
@@ -22,6 +22,7 @@
22
22
  @import url("./sterling/Radio.css");
23
23
  @import url("./sterling/Select.css");
24
24
  @import url("./sterling/Slider.css");
25
+ @import url("./sterling/Splitter.css");
25
26
  @import url("./sterling/Switch.css");
26
27
  @import url("./sterling/Tab.css");
27
28
  @import url("./sterling/TabList.css");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoffcox/sterling-svelte-themes",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "author": "Geoff Cox",
5
5
  "description": "A modern theme for the sterling-svelte component library.",
6
6
  "license": "MIT",
@@ -1,18 +0,0 @@
1
- .sterling-checkbox.disabled,
2
- .sterling-checkbox.disabled input,
3
- .sterling-checkbox.disabled > label {
4
- cursor: not-allowed;
5
- }
6
-
7
- .sterling-checkbox.disabled .indicator {
8
- background-color: var(--stsv-input__background-color--disabled);
9
- border-color: var(--stsv-input__border-color--disabled);
10
- }
11
-
12
- .sterling-checkbox.disabled .indicator::after {
13
- border-color: var(--stsv-input__color--disabled);
14
- }
15
-
16
- .sterling-checkbox.disabled > label {
17
- color: var(--stsv-common__color--disabled);
18
- }
@@ -1,18 +0,0 @@
1
- .sterling-radio.disabled,
2
- .sterling-radio.disabled input,
3
- .sterling-radio.disabled > label {
4
- cursor: not-allowed;
5
- }
6
-
7
- .sterling-radio.disabled .indicator {
8
- background-color: var(--stsv-input__background-color--disabled);
9
- border-color: var(--stsv-input__border-color--disabled);
10
- }
11
-
12
- .sterling-radio.disabled .indicator::after {
13
- border-color: var(--stsv-input__color--disabled);
14
- }
15
-
16
- .sterling-radio.disabled > label {
17
- color: var(--stsv-common__color--disabled);
18
- }