@wwtdev/bsds-css 0.2.0 → 1.0.0

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.
Files changed (32) hide show
  1. package/dist/components/_badge.scss +67 -0
  2. package/dist/components/_buttons.scss +193 -0
  3. package/dist/components/_form-booleans.scss +158 -0
  4. package/dist/components/_form-character-count.scss +20 -0
  5. package/dist/components/_form-elements.scss +118 -0
  6. package/dist/components/_form-field-details.scss +19 -0
  7. package/dist/components/_form-hints.scss +14 -0
  8. package/dist/components/_form-labels.scss +22 -0
  9. package/dist/components/_form-switches.scss +137 -0
  10. package/dist/components/_pills.scss +191 -0
  11. package/dist/components/_profile-details.scss +18 -0
  12. package/dist/components/_profile-img.scss +71 -0
  13. package/dist/components/_profile-layout.scss +33 -0
  14. package/dist/components/_tables.scss +84 -0
  15. package/dist/components/badge.css +63 -0
  16. package/dist/components/buttons.css +189 -0
  17. package/dist/components/form-booleans.css +154 -0
  18. package/dist/components/form-character-count.css +16 -0
  19. package/dist/components/form-elements.css +114 -0
  20. package/dist/components/form-field-details.css +15 -0
  21. package/dist/components/form-hints.css +10 -0
  22. package/dist/components/form-labels.css +18 -0
  23. package/dist/components/form-switches.css +133 -0
  24. package/dist/components/pills.css +187 -0
  25. package/dist/components/profile-details.css +14 -0
  26. package/dist/components/profile-img.css +67 -0
  27. package/dist/components/profile-layout.css +29 -0
  28. package/dist/components/tables.css +80 -0
  29. package/dist/wwt-bsds-wc-base.css +5 -0
  30. package/dist/wwt-bsds.css +310 -147
  31. package/dist/wwt-bsds.min.css +1 -1
  32. package/package.json +3 -3
@@ -0,0 +1,187 @@
1
+ .bs-pill {
2
+ --pill-background: var(--bs-bg-subtle);
3
+ --pill-border: transparent;
4
+ --pill-text: var(--bs-royal-400);
5
+ --pill-gap: var(--bs-space-2);
6
+
7
+ align-items: center;
8
+ appearance: none;
9
+ background-color: var(--pill-background);
10
+ border: 1px solid var(--pill-border);
11
+ border-radius: 4px;
12
+ color: var(--pill-text);
13
+ display: inline-flex;
14
+ font-size: var(--bs-text-xs);
15
+ gap: var(--pill-gap);
16
+ line-height: 1.33;
17
+ padding: 4px 6px;
18
+ text-decoration: none;
19
+ vertical-align: middle;
20
+ }
21
+ :where(.dark) .bs-pill {
22
+ --pill-text: var(--bs-royal-100);
23
+ }
24
+ :where(.bs-pill > svg) {
25
+ height: 1rem;
26
+ }
27
+
28
+ /* ------------------------------ Button and Link Styles ------------------------------ */
29
+ :is(a, button).bs-pill {
30
+ color: var(--pill-text);
31
+ cursor: pointer;
32
+ transition: all 0.15s ease-in-out;
33
+ }
34
+ :is(a, button).bs-pill:is(:hover, :focus) {
35
+ --pill-border: var(--bs-royal-400);
36
+
37
+ color: var(--pill-text);
38
+ outline: transparent;
39
+ }
40
+ :where(.dark) :is(a, button).bs-pill:is(:hover, :focus) {
41
+ --pill-border: var(--bs-royal-200);
42
+ }
43
+
44
+ /* ------------------------------ Background Colors ------------------------------ */
45
+ :where(.box, [class*="bg-"]:not([class~="bg-white"])) .bs-pill:where(:not([data-variant^="live"], [data-active])) {
46
+ --pill-background: var(--bs-bg-base);
47
+ }
48
+ :where(.box[data-invert]) .bs-pill {
49
+ --pill-background: var(--bs-bg-invert-subtle);
50
+ --pill-text: var(--bs-gray-100);
51
+ }
52
+ :where(.box[data-invert]) :is(a, button).bs-pill:is(:hover, :focus) {
53
+ --pill-border: var(--bs-gray-100);
54
+ }
55
+ :where(.dark .box[data-invert]) .bs-pill {
56
+ --pill-text: var(--bs-royal-400);
57
+ }
58
+ :where(.dark .box[data-invert]) :is(a, button).bs-pill:is(:hover, :focus) {
59
+ --pill-border: var(--bs-royal-400);
60
+ }
61
+
62
+ /* ------------------------------ Status Styles ------------------------------ */
63
+ .bs-pill:where([data-status]) {
64
+ --status-color: var(--bs-blue-400);
65
+ }
66
+ .bs-pill:where([data-status])::before {
67
+ background-color: var(--status-color);
68
+ border-radius: 100%;
69
+ content: '';
70
+ height: 12px;
71
+ width: 12px;
72
+ }
73
+
74
+ /* ----- Status Colors ----- */
75
+ .bs-pill:where([data-status^="active"]) {
76
+ --status-color: var(--bs-blue-400);
77
+ }
78
+ .bs-pill:where([data-status^="complete"]) {
79
+ --status-color: var(--bs-purple-400);
80
+ }
81
+ .bs-pill:where([data-status^="inactive"]) {
82
+ --status-color: var(--bs-gray-300);
83
+ }
84
+ .bs-pill:where([data-status^="error"]) {
85
+ --status-color: var(--bs-red-400);
86
+ }
87
+ .bs-pill:where([data-status^="positive"]) {
88
+ --status-color: #16986D;
89
+ }
90
+ .bs-pill:where([data-status^="warning"]) {
91
+ --status-color: var(--bs-orange-warning);
92
+ }
93
+
94
+ /* ------------------------------ Filter Styles ------------------------------ */
95
+ .bs-pill:where([data-variant^="filter"]) {
96
+ --pill-background: var(--bs-bg-base);
97
+ --pill-border: var(--bs-border);
98
+ --pill-text: var(--bs-ink-base);
99
+ }
100
+ .bs-pill:where([data-variant^="filter"]):is(:hover, :focus) {
101
+ --pill-border: var(--bs-border);
102
+ }
103
+ :is(a, button).bs-pill:where([data-variant^="filter"]):is(:hover, :focus) {
104
+ --pill-border: var(--bs-ink-base);
105
+ }
106
+
107
+ /* ----- Filter Add Styles ----- */
108
+ /* Black + */
109
+ .bs-pill:where([data-variant^="filter"][data-variant*="add"])::after {
110
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.5 4.5V8h1V4.5H8v-1H4.5V0h-1v3.5H0v1h3.5Z' fill='%230A0B19'/%3E%3C/svg%3E");
111
+ }
112
+ /* White + */
113
+ :where(.dark) .bs-pill:where([data-variant^="filter"][data-variant*="add"]):not(:disabled, [aria-disabled="true"])::after{
114
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.5 4.5V8h1V4.5H8v-1H4.5V0h-1v3.5H0v1h3.5Z' fill='%23ffffff'/%3E%3C/svg%3E");
115
+ }
116
+
117
+
118
+ /* ----- Filter Remove Styles ----- */
119
+ /* Black X */
120
+ .bs-pill:where([data-variant^="filter"][data-variant*="remove"])::after {
121
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%230A0B19'/%3E%3C/svg%3E%0A");
122
+ }
123
+ /* White X */
124
+ :where(.dark) .bs-pill:where([data-variant^="filter"][data-variant*="remove"]):not(:disabled, [aria-disabled="true"])::after {
125
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%23ffffff'/%3E%3C/svg%3E%0A");
126
+ }
127
+ /* Dark Red X */
128
+ .bs-pill:where([data-variant^="filter"][data-variant*="remove"]):hover::after {
129
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%23D91214'/%3E%3C/svg%3E%0A");
130
+ }
131
+ /* Light Red X */
132
+ :where(.dark) .bs-pill:where([data-variant^="filter"][data-variant*="remove"]):hover::after {
133
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%23F15355'/%3E%3C/svg%3E%0A");
134
+ }
135
+
136
+ /* ----- Filter Active Styles ----- */
137
+ .bs-pill:where([data-variant^="filter"][data-active]) {
138
+ --pill-background: var(--bs-blue-400);
139
+ --pill-border: transparent;
140
+ --pill-text: var(--bs-white);
141
+ }
142
+ .bs-pill:where([data-variant^="filter"][data-active]):is(:hover, :focus) {
143
+ --pill-border: transparent;
144
+ }
145
+ :is(a, button).bs-pill:where([data-variant^="filter"][data-active]):is(:hover, :focus) {
146
+ --pill-background: var(--bs-blue-500);
147
+ --pill-border: transparent;
148
+ }
149
+ /* White X */
150
+ .bs-pill:where([data-variant^="filter"][data-active])::after {
151
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%23fff'/%3E%3C/svg%3E");
152
+ }
153
+ /* Black X */
154
+ .bs-pill:where([data-variant^="filter"][data-active]):where(:disabled, [aria-disabled="true"])::after {
155
+ content: url("data:image/svg+xml,%3Csvg width='8' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 .703 7.297 0 4 3.297.703 0 0 .703 3.297 4 0 7.297.703 8 4 4.703 7.297 8 8 7.297 4.703 4 8 .703Z' fill='%230A0B19'/%3E%3C/svg%3E%0A");
156
+ }
157
+
158
+ /* ------------------------------ Live Now Styles ------------------------------ */
159
+ .bs-pill:where([data-variant^="live"]) {
160
+ --pill-background: var(--bs-royal-400);
161
+ --pill-text: var(--bs-white);
162
+ --pill-gap: var(--bs-space-1);
163
+ text-transform: uppercase;
164
+ }
165
+ .bs-pill:where([data-variant^="live"]):hover {
166
+ --pill-border: transparent;
167
+ }
168
+ .bs-pill:where([data-variant^="live"])::before {
169
+ background-color: var(--bs-red-400);
170
+ border: 3px solid var(--bs-white);
171
+ border-radius: 100%;
172
+ content: '';
173
+ height: 12px;
174
+ width: 12px;
175
+ }
176
+
177
+ /* ----- Disabled Styles ----- */
178
+ .bs-pill:is(:disabled, [aria-disabled="true"]) {
179
+ pointer-events: none;
180
+ color: var(--bs-gray-400);
181
+ background-color: var(--bs-gray-200);
182
+ }
183
+
184
+ .bs-pill:where([data-variant^="filter"]):not([data-active]):is(:disabled, [aria-disabled="true"]) {
185
+ --pill-border: var(--bs-gray-400);
186
+ }
187
+
@@ -0,0 +1,14 @@
1
+ .bs-profile-details {
2
+ color: var(--bs-ink-light);
3
+ font-size: var(--bs-text-sm);
4
+ }
5
+
6
+ .bs-profile-details > :where(*) {
7
+ display: block;
8
+ }
9
+
10
+ .bs-profile-details > :where(*:first-child) {
11
+ --profile-name-color: var(--bs-ink-base);
12
+
13
+ color: var(--profile-name-color);
14
+ }
@@ -0,0 +1,67 @@
1
+ .bs-profile-img,
2
+ .bs-profile-img:where([data-img-size^='sm']) {
3
+ --profile-size: 2rem;
4
+ --profile-text: var(--bs-text-sm);
5
+
6
+ aspect-ratio: 1/1;
7
+ border-radius: 50%;
8
+ height: var(--profile-size);
9
+ overflow: hidden;
10
+ position: relative;
11
+ width: var(--profile-size);
12
+ }
13
+
14
+ .bs-profile-img :where(img) {
15
+ height: 100%;
16
+ object-fit: cover;
17
+ width: 100%;
18
+ }
19
+ .bs-profile-img:where([data-no-img]) img {
20
+ display: none;
21
+ }
22
+
23
+ .bs-profile-img::before,
24
+ .bs-profile-img::after {
25
+ border-radius: 50%;
26
+ border-collapse: collapse;
27
+ height: 100%;
28
+ inset: 0;
29
+ position: absolute;
30
+ width: 100%;
31
+ }
32
+ /* Shadow */
33
+ .bs-profile-img::before {
34
+ box-shadow: var(--bs-shadow-profilePhoto);
35
+ content: '';
36
+ }
37
+ .bs-profile-img:where([data-no-img])::before {
38
+ display: none;
39
+ }
40
+ /* Initials */
41
+ .bs-profile-img:where([data-no-img])::after {
42
+ border: 1px solid currentColor;
43
+ color: var(--bs-blue-500);
44
+ content: attr(data-initials);
45
+ font-size: var(--profile-text);
46
+ text-transform: uppercase;
47
+ display: grid;
48
+ place-items: center;
49
+ }
50
+
51
+ /* Profile Sizes */
52
+ .bs-profile-img:where([data-img-size^='xs']) {
53
+ --profile-size: 1.5rem;
54
+ --profile-text: var(--bs-text-xs);
55
+ }
56
+ .bs-profile-img:where([data-img-size^='md']) {
57
+ --profile-size: 3rem;
58
+ --profile-text: var(--bs-text-md);
59
+ }
60
+ .bs-profile-img:where([data-img-size^='lg']) {
61
+ --profile-size: 4rem;
62
+ --profile-text: var(--bs-text-lg);
63
+ }
64
+ .bs-profile-img:where([data-img-size^='xl']) {
65
+ --profile-size: 5.75rem;
66
+ --profile-text: var(--bs-text-xl);
67
+ }
@@ -0,0 +1,29 @@
1
+ /* Profile with User Details */
2
+ .bs-profile:where([data-layout]),
3
+ .bs-profile:where([data-layout^='vertical']) {
4
+ display: grid;
5
+ row-gap: 0.5rem;
6
+ }
7
+
8
+ .bs-profile:where([data-layout^='horizontal']) {
9
+ column-gap: 1rem;
10
+ grid-template-columns: auto 1fr;
11
+ align-items: center;
12
+ }
13
+
14
+ /* When wrapped in a link */
15
+ a.bs-profile:where([data-layout]) {
16
+ text-decoration: none;
17
+ }
18
+
19
+ a.bs-profile:where([data-layout]) .bs-profile-details > *:first-child {
20
+ --profile-name-color: var(--bs-blue-500);
21
+ }
22
+
23
+ a.bs-profile:where([data-layout]):hover .bs-profile-details > *:first-child {
24
+ text-decoration: underline;
25
+ }
26
+
27
+ .dark a.bs-profile:where([data-layout]) .bs-profile-details > *:first-child {
28
+ --profile-name-color: var(--bs-blue-200);
29
+ }
@@ -0,0 +1,80 @@
1
+ table {
2
+ border-collapse: collapse;
3
+ border-spacing: 0;
4
+ overflow-x: auto;
5
+ max-width: 100%;
6
+ width: 100%;
7
+ }
8
+ thead {
9
+ color: var(--bs-ink-base);
10
+ font-size: var(--bs-font-base);
11
+ font-weight: 600;
12
+ }
13
+ tbody {
14
+ color: var(--bs-ink-light);
15
+ }
16
+ th {
17
+ background: var(--bs-bg-base);
18
+ }
19
+ th, td {
20
+ border-bottom: 1px solid var(--bs-border);
21
+ min-width: fit-content;
22
+ padding: var(--bs-space-2);
23
+ text-align: left;
24
+ }
25
+
26
+ /* Table Borders */
27
+ table[data-borders^="none"] {
28
+ border: 0;
29
+ }
30
+ table[data-borders^="all"] :where(th, td) {
31
+ border-left: 1px solid var(--bs-border);
32
+ }
33
+ table[data-borders^="all"] :where(th, td):last-child {
34
+ border-right: 1px solid var(--bs-border);
35
+ }
36
+ table[data-borders^="all"] th {
37
+ border-top: 1px solid var(--bs-border);
38
+ }
39
+
40
+ /* Table Rows */
41
+ table:where([data-rows^="striped"]) tbody > tr:nth-child(even) {
42
+ background-color: var(--bs-bg-subtle);
43
+ }
44
+
45
+ /* Table Cells */
46
+ table[data-cells^="fixed"] {
47
+ table-layout: fixed;
48
+ }
49
+ table:where([data-cells^="height"]) td {
50
+ height: 4.5rem;
51
+ vertical-align: middle;
52
+ }
53
+
54
+ /* Sticky Header */
55
+ table:where([data-sticky]) {
56
+ isolation: isolate;
57
+ }
58
+ table:where([data-sticky^="top"]) td {
59
+ z-index: 1;
60
+ }
61
+ table:where([data-sticky^="top"]) {
62
+ border-collapse: separate;
63
+ overflow-y: unset; /* Will break sticky headers if removed */
64
+ position: relative;
65
+ }
66
+ table:where([data-sticky^="left"]) {
67
+ border-collapse: separate;
68
+ overflow-x: unset; /* Will break sticky headers if removed */
69
+ position: relative;
70
+ }
71
+ table:where([data-sticky^="top"]) th {
72
+ position: sticky;
73
+ top: var(--bs-content-top);
74
+ z-index: 2;
75
+ }
76
+ table:where([data-sticky^="left"]) :is(td:first-child, th:first-child) {
77
+ position: sticky;
78
+ left: 0;
79
+ z-index: 2;
80
+ }
@@ -655,6 +655,11 @@ body:where(.fluid) {
655
655
  justify-content: flex-start;
656
656
  }
657
657
 
658
+ :where(.cluster[data-variant^="brick"]) > * {
659
+ align-self: stretch;
660
+ flex-grow: 1;
661
+ }
662
+
658
663
  .cluster[data-gap="tight"] {
659
664
  gap: var(--cluster-space, var(--bs-space-2));
660
665
  }