@stackoverflow/stacks 2.7.3 → 2.7.4

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 (83) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +158 -180
  3. package/dist/css/stacks.css +6 -0
  4. package/dist/js/stacks.min.js +1 -1
  5. package/lib/atomic/border.less +139 -139
  6. package/lib/atomic/color.less +36 -36
  7. package/lib/atomic/flex.less +426 -426
  8. package/lib/atomic/gap.less +44 -44
  9. package/lib/atomic/grid.less +139 -139
  10. package/lib/atomic/misc.less +374 -374
  11. package/lib/atomic/spacing.less +98 -98
  12. package/lib/atomic/typography.less +266 -264
  13. package/lib/atomic/width-height.less +194 -194
  14. package/lib/base/body.less +44 -44
  15. package/lib/base/configuration-static.less +61 -61
  16. package/lib/base/fieldset.less +5 -5
  17. package/lib/base/icon.less +11 -11
  18. package/lib/base/internal.less +220 -220
  19. package/lib/base/reset-meyer.less +64 -64
  20. package/lib/base/reset-normalize.less +449 -449
  21. package/lib/base/reset.less +20 -20
  22. package/lib/components/activity-indicator/activity-indicator.less +53 -53
  23. package/lib/components/avatar/avatar.less +108 -108
  24. package/lib/components/award-bling/award-bling.less +31 -31
  25. package/lib/components/banner/banner.less +44 -44
  26. package/lib/components/banner/banner.ts +149 -149
  27. package/lib/components/block-link/block-link.less +82 -82
  28. package/lib/components/breadcrumbs/breadcrumbs.less +41 -41
  29. package/lib/components/button-group/button-group.less +82 -82
  30. package/lib/components/card/card.less +37 -37
  31. package/lib/components/check-control/check-control.less +17 -17
  32. package/lib/components/check-group/check-group.less +19 -19
  33. package/lib/components/checkbox_radio/checkbox_radio.less +159 -159
  34. package/lib/components/code-block/code-block.fixtures.ts +88 -88
  35. package/lib/components/code-block/code-block.less +116 -116
  36. package/lib/components/description/description.less +9 -9
  37. package/lib/components/empty-state/empty-state.less +16 -16
  38. package/lib/components/expandable/expandable.less +118 -118
  39. package/lib/components/input-fill/input-fill.less +35 -35
  40. package/lib/components/input-icon/input-icon.less +45 -45
  41. package/lib/components/input-message/input-message.less +49 -49
  42. package/lib/components/label/label.less +110 -110
  43. package/lib/components/link-preview/link-preview.less +148 -148
  44. package/lib/components/menu/menu.less +41 -41
  45. package/lib/components/modal/modal.less +118 -118
  46. package/lib/components/modal/modal.ts +383 -383
  47. package/lib/components/navigation/navigation.less +136 -136
  48. package/lib/components/navigation/navigation.ts +128 -128
  49. package/lib/components/page-title/page-title.less +51 -51
  50. package/lib/components/popover/popover.less +159 -159
  51. package/lib/components/popover/popover.ts +651 -651
  52. package/lib/components/post-summary/post-summary.less +457 -457
  53. package/lib/components/progress-bar/progress-bar.less +291 -291
  54. package/lib/components/prose/prose.less +452 -452
  55. package/lib/components/select/select.less +138 -138
  56. package/lib/components/spinner/spinner.less +103 -103
  57. package/lib/components/table/table.ts +296 -296
  58. package/lib/components/table-container/table-container.less +4 -4
  59. package/lib/components/tag/tag.less +186 -186
  60. package/lib/components/toast/toast.less +35 -35
  61. package/lib/components/toast/toast.ts +357 -357
  62. package/lib/components/toggle-switch/toggle-switch.less +104 -104
  63. package/lib/components/topbar/topbar.less +553 -553
  64. package/lib/components/uploader/uploader.less +205 -205
  65. package/lib/components/user-card/user-card.less +129 -129
  66. package/lib/controllers.ts +33 -33
  67. package/lib/exports/color-mixins.less +283 -283
  68. package/lib/exports/constants-helpers.less +108 -108
  69. package/lib/exports/constants-type.less +155 -155
  70. package/lib/exports/exports.less +15 -15
  71. package/lib/exports/mixins.less +334 -333
  72. package/lib/exports/spacing-mixins.less +67 -67
  73. package/lib/index.ts +32 -32
  74. package/lib/input-utils.less +41 -41
  75. package/lib/stacks-dynamic.less +24 -24
  76. package/lib/stacks-static.less +93 -93
  77. package/lib/stacks.less +13 -13
  78. package/lib/test/assertions.ts +36 -36
  79. package/lib/test/less-test-utils.ts +28 -28
  80. package/lib/test/open-wc-testing-patch.d.ts +26 -26
  81. package/lib/tsconfig.build.json +4 -4
  82. package/lib/tsconfig.json +17 -17
  83. package/package.json +26 -22
@@ -1,110 +1,110 @@
1
- .s-label {
2
- --_la-fs: var(--fs-body2);
3
-
4
- // CONTEXTUAL STYLES
5
- &[for] {
6
- cursor: pointer;
7
- }
8
-
9
- fieldset[disabled] &,
10
- .is-disabled & {
11
- .s-description {
12
- opacity: unset;
13
- }
14
-
15
- cursor: not-allowed;
16
- opacity: var(--_o-disabled-static);
17
- }
18
-
19
- .is-readonly & {
20
- cursor: not-allowed;
21
- }
22
-
23
- // MODIFIERS
24
- // Sizes
25
- &&__sm {
26
- .size-styles(sm; la; @styles: fs);
27
- }
28
-
29
- &&__md {
30
- .size-styles(md; la; @styles: fs);
31
- }
32
-
33
- &&__lg {
34
- .size-styles(lg; la; @styles: fs);
35
- }
36
-
37
- &&__xl {
38
- .size-styles(xl; la; @styles: fs);
39
- }
40
-
41
- // CHILD ELEMENTS
42
- // Label status flag
43
- // Is this form item required or optional? Flag the status for users.
44
- // Default styling is optional.
45
- &--status { // TODO convert to require parent class for styling [1]
46
- --_la-status-b: none;
47
- --_la-status-bg: var(--black-150);
48
- --_la-status-fc: var(--fc-medium);
49
-
50
- .highcontrast-mode({
51
- --_la-status-b: var(--su-static1) solid currentColor;
52
- });
53
-
54
- // TODO: include child component class (without variant) on selector
55
- &__beta {
56
- --_la-status-bg: var(--blue-200);
57
- --_la-status-fc: var(--blue-500);
58
- }
59
-
60
- &__new {
61
- --_la-status-bg: var(--green-200);
62
- --_la-status-fc: var(--green-500);
63
- }
64
-
65
- &__required {
66
- --_la-status-bg: var(--red-200);
67
- --_la-status-fc: var(--red-500);
68
- }
69
-
70
- background-color: var(--_la-status-bg);
71
- border: var(--_la-status-b);
72
- color: var(--_la-status-fc);
73
-
74
- border-radius: 1000px;
75
- font-size: var(--fs-caption);
76
- font-weight: 400;
77
- margin-left: var(--su4);
78
- padding: var(--su2) var(--su8);
79
- vertical-align: text-bottom;
80
- }
81
-
82
- // TODO we shouldn't support descriptions and messages within labels
83
- .s-description,
84
- .s-input-message {
85
- font-weight: normal;
86
- margin-bottom: 0;
87
- margin-top: var(--su4);
88
- padding: 0;
89
- }
90
-
91
- font-size: var(--_la-fs);
92
-
93
- color: var(--fc-medium);
94
- font-family: inherit;
95
- font-weight: 700;
96
- padding: 0 var(--su2); // Helps the label visually line up with inputs
97
- }
98
-
99
- .s-required-symbol {
100
- color: var(--red-400);
101
- font-size: 125%;
102
- font-weight: normal;
103
- line-height: 0;
104
- text-decoration: none !important;
105
- }
106
-
107
- // [1] In Core, we have *many* instances of `.s-label--status` used without the `.s-label` parent.
108
- // While I'd prefer to enforce the requirement of the parent class, it's too much of a lift at this moment.
109
- // We'll come back to it, hopefully when we have a pill component to replace the current usage of `.s-label--status`
110
- // without the base label class.
1
+ .s-label {
2
+ --_la-fs: var(--fs-body2);
3
+
4
+ // CONTEXTUAL STYLES
5
+ &[for] {
6
+ cursor: pointer;
7
+ }
8
+
9
+ fieldset[disabled] &,
10
+ .is-disabled & {
11
+ .s-description {
12
+ opacity: unset;
13
+ }
14
+
15
+ cursor: not-allowed;
16
+ opacity: var(--_o-disabled-static);
17
+ }
18
+
19
+ .is-readonly & {
20
+ cursor: not-allowed;
21
+ }
22
+
23
+ // MODIFIERS
24
+ // Sizes
25
+ &&__sm {
26
+ .size-styles(sm; la; @styles: fs);
27
+ }
28
+
29
+ &&__md {
30
+ .size-styles(md; la; @styles: fs);
31
+ }
32
+
33
+ &&__lg {
34
+ .size-styles(lg; la; @styles: fs);
35
+ }
36
+
37
+ &&__xl {
38
+ .size-styles(xl; la; @styles: fs);
39
+ }
40
+
41
+ // CHILD ELEMENTS
42
+ // Label status flag
43
+ // Is this form item required or optional? Flag the status for users.
44
+ // Default styling is optional.
45
+ &--status { // TODO convert to require parent class for styling [1]
46
+ --_la-status-b: none;
47
+ --_la-status-bg: var(--black-150);
48
+ --_la-status-fc: var(--fc-medium);
49
+
50
+ .highcontrast-mode({
51
+ --_la-status-b: var(--su-static1) solid currentColor;
52
+ });
53
+
54
+ // TODO: include child component class (without variant) on selector
55
+ &__beta {
56
+ --_la-status-bg: var(--blue-200);
57
+ --_la-status-fc: var(--blue-500);
58
+ }
59
+
60
+ &__new {
61
+ --_la-status-bg: var(--green-200);
62
+ --_la-status-fc: var(--green-500);
63
+ }
64
+
65
+ &__required {
66
+ --_la-status-bg: var(--red-200);
67
+ --_la-status-fc: var(--red-500);
68
+ }
69
+
70
+ background-color: var(--_la-status-bg);
71
+ border: var(--_la-status-b);
72
+ color: var(--_la-status-fc);
73
+
74
+ border-radius: 1000px;
75
+ font-size: var(--fs-caption);
76
+ font-weight: 400;
77
+ margin-left: var(--su4);
78
+ padding: var(--su2) var(--su8);
79
+ vertical-align: text-bottom;
80
+ }
81
+
82
+ // TODO we shouldn't support descriptions and messages within labels
83
+ .s-description,
84
+ .s-input-message {
85
+ font-weight: normal;
86
+ margin-bottom: 0;
87
+ margin-top: var(--su4);
88
+ padding: 0;
89
+ }
90
+
91
+ font-size: var(--_la-fs);
92
+
93
+ color: var(--fc-medium);
94
+ font-family: inherit;
95
+ font-weight: 700;
96
+ padding: 0 var(--su2); // Helps the label visually line up with inputs
97
+ }
98
+
99
+ .s-required-symbol {
100
+ color: var(--red-400);
101
+ font-size: 125%;
102
+ font-weight: normal;
103
+ line-height: 0;
104
+ text-decoration: none !important;
105
+ }
106
+
107
+ // [1] In Core, we have *many* instances of `.s-label--status` used without the `.s-label` parent.
108
+ // While I'd prefer to enforce the requirement of the parent class, it's too much of a lift at this moment.
109
+ // We'll come back to it, hopefully when we have a pill component to replace the current usage of `.s-label--status`
110
+ // without the base label class.
@@ -1,148 +1,148 @@
1
- .s-link-preview {
2
- --_lp-details-fc: var(--black-400);
3
- --_lp-details-mt: var(--su2);
4
- --_lp-footer-bg: var(--black-100);
5
- --_lp-footer-fd: unset;
6
- --_lp-header-bg: var(--black-100);
7
- --_lp-misc-pl: var(--su4);
8
- --_lp-misc-pt: unset;
9
-
10
- // CONTEXTUAL STYLES
11
- #stacks-internals #screen-sm({
12
- --_lp-details-mt: var(--su4);
13
- --_lp-footer-fd: column;
14
- --_lp-misc-pl: 0;
15
- --_lp-misc-pt: var(--su2);
16
- });
17
-
18
- .highcontrast-mode({
19
- --_lp-details-fc: var(--black-600);
20
- --_lp-footer-bg: var(--black-050);
21
- --_lp-header-bg: var(--black-050);
22
- });
23
-
24
- // CHILD ELEMENTS
25
- & &--details,
26
- & &--footer {
27
- a {
28
- &:hover,
29
- &:active,
30
- &:focus,
31
- &:visited {
32
- color: var(--black-500);
33
- }
34
-
35
- color: var(--black-600);
36
- cursor: pointer;
37
- text-decoration: none;
38
- }
39
- }
40
-
41
- & &--body {
42
- *:last-child {
43
- margin-bottom: 0;
44
- }
45
-
46
- font-size: var(--fs-body2);
47
- padding: var(--su12);
48
- }
49
-
50
- & &--code {
51
- pre {
52
- border-radius: 0 !important;
53
- margin: 0;
54
- max-height: 400px;
55
- }
56
- }
57
-
58
- & &--details {
59
- color: var(--_lp-details-fc);
60
- margin-top: var(--_lp-details-mt);
61
-
62
- font-size: var(--fs-caption);
63
- }
64
-
65
- & &--footer {
66
- background: var(--_lp-footer-bg);
67
- flex-direction: var(--_lp-footer-fd);
68
-
69
- border-bottom-left-radius: var(--br-sm);
70
- border-bottom-right-radius: var(--br-sm);
71
- border-top: var(--su-static1) solid var(--bc-medium);
72
- display: flex;
73
- font-size: var(--fs-caption);
74
- justify-content: space-between;
75
- padding: var(--su12);
76
- }
77
-
78
- & &--header {
79
- background: var(--_lp-header-bg);
80
- border-bottom: var(--su-static1) solid var(--bc-medium);
81
- border-top-left-radius: var(--br-sm);
82
- border-top-right-radius: var(--br-sm);
83
- display: flex;
84
- padding: var(--su12) var(--su8);
85
- }
86
-
87
- & &--icon {
88
- color: var(--black-600); // Set the default color of the integration's icon. Most likely this will be overridden by the integration icon's native colors.
89
- margin-right: var(--su8);
90
- }
91
-
92
- & &--misc {
93
- padding-left: var(--_lp-misc-pl);
94
- padding-top: var(--_lp-misc-pt);
95
-
96
- color: var(--black-400);
97
- }
98
-
99
- & &--title {
100
- color: var(--black-600);
101
- font-size: var(--fs-body3);
102
- font-weight: bold;
103
- }
104
-
105
- & a&--title {
106
- &:active,
107
- &:hover {
108
- color: var(--theme-link-color-hover, var(--theme-secondary-500));
109
- }
110
-
111
- &:active,
112
- &:hover,
113
- &.s-link__visited:active,
114
- &.s-link__visited:hover,
115
- &.s-link__visited:visited {
116
- .highcontrast-mode({
117
- text-decoration: underline;
118
- });
119
-
120
- text-decoration: none;
121
- }
122
-
123
- &:visited,
124
- &.s-link__visited {
125
- &:hover {
126
- color: var(--theme-link-color, var(--purple-600));
127
- }
128
-
129
- color: var(--theme-link-color, var(--purple-500));
130
- }
131
-
132
- color: var(--theme-link-color, var(--theme-secondary-400));
133
- cursor: pointer;
134
- text-decoration: none;
135
- }
136
-
137
- & &--url {
138
- max-width: 100%;
139
- overflow: hidden;
140
- text-overflow: ellipsis !important;
141
- white-space: nowrap;
142
- }
143
-
144
- border: var(--su-static1) solid var(--bc-medium);
145
- border-radius: var(--br-sm);
146
- box-shadow: var(--bs-sm);
147
- text-align: left;
148
- }
1
+ .s-link-preview {
2
+ --_lp-details-fc: var(--black-400);
3
+ --_lp-details-mt: var(--su2);
4
+ --_lp-footer-bg: var(--black-100);
5
+ --_lp-footer-fd: unset;
6
+ --_lp-header-bg: var(--black-100);
7
+ --_lp-misc-pl: var(--su4);
8
+ --_lp-misc-pt: unset;
9
+
10
+ // CONTEXTUAL STYLES
11
+ #stacks-internals #screen-sm({
12
+ --_lp-details-mt: var(--su4);
13
+ --_lp-footer-fd: column;
14
+ --_lp-misc-pl: 0;
15
+ --_lp-misc-pt: var(--su2);
16
+ });
17
+
18
+ .highcontrast-mode({
19
+ --_lp-details-fc: var(--black-600);
20
+ --_lp-footer-bg: var(--black-050);
21
+ --_lp-header-bg: var(--black-050);
22
+ });
23
+
24
+ // CHILD ELEMENTS
25
+ & &--details,
26
+ & &--footer {
27
+ a {
28
+ &:hover,
29
+ &:active,
30
+ &:focus,
31
+ &:visited {
32
+ color: var(--black-500);
33
+ }
34
+
35
+ color: var(--black-600);
36
+ cursor: pointer;
37
+ text-decoration: none;
38
+ }
39
+ }
40
+
41
+ & &--body {
42
+ *:last-child {
43
+ margin-bottom: 0;
44
+ }
45
+
46
+ font-size: var(--fs-body2);
47
+ padding: var(--su12);
48
+ }
49
+
50
+ & &--code {
51
+ pre {
52
+ border-radius: 0 !important;
53
+ margin: 0;
54
+ max-height: 400px;
55
+ }
56
+ }
57
+
58
+ & &--details {
59
+ color: var(--_lp-details-fc);
60
+ margin-top: var(--_lp-details-mt);
61
+
62
+ font-size: var(--fs-caption);
63
+ }
64
+
65
+ & &--footer {
66
+ background: var(--_lp-footer-bg);
67
+ flex-direction: var(--_lp-footer-fd);
68
+
69
+ border-bottom-left-radius: var(--br-sm);
70
+ border-bottom-right-radius: var(--br-sm);
71
+ border-top: var(--su-static1) solid var(--bc-medium);
72
+ display: flex;
73
+ font-size: var(--fs-caption);
74
+ justify-content: space-between;
75
+ padding: var(--su12);
76
+ }
77
+
78
+ & &--header {
79
+ background: var(--_lp-header-bg);
80
+ border-bottom: var(--su-static1) solid var(--bc-medium);
81
+ border-top-left-radius: var(--br-sm);
82
+ border-top-right-radius: var(--br-sm);
83
+ display: flex;
84
+ padding: var(--su12) var(--su8);
85
+ }
86
+
87
+ & &--icon {
88
+ color: var(--black-600); // Set the default color of the integration's icon. Most likely this will be overridden by the integration icon's native colors.
89
+ margin-right: var(--su8);
90
+ }
91
+
92
+ & &--misc {
93
+ padding-left: var(--_lp-misc-pl);
94
+ padding-top: var(--_lp-misc-pt);
95
+
96
+ color: var(--black-400);
97
+ }
98
+
99
+ & &--title {
100
+ color: var(--black-600);
101
+ font-size: var(--fs-body3);
102
+ font-weight: bold;
103
+ }
104
+
105
+ & a&--title {
106
+ &:active,
107
+ &:hover {
108
+ color: var(--theme-link-color-hover, var(--theme-secondary-500));
109
+ }
110
+
111
+ &:active,
112
+ &:hover,
113
+ &.s-link__visited:active,
114
+ &.s-link__visited:hover,
115
+ &.s-link__visited:visited {
116
+ .highcontrast-mode({
117
+ text-decoration: underline;
118
+ });
119
+
120
+ text-decoration: none;
121
+ }
122
+
123
+ &:visited,
124
+ &.s-link__visited {
125
+ &:hover {
126
+ color: var(--theme-link-color, var(--purple-600));
127
+ }
128
+
129
+ color: var(--theme-link-color, var(--purple-500));
130
+ }
131
+
132
+ color: var(--theme-link-color, var(--theme-secondary-400));
133
+ cursor: pointer;
134
+ text-decoration: none;
135
+ }
136
+
137
+ & &--url {
138
+ max-width: 100%;
139
+ overflow: hidden;
140
+ text-overflow: ellipsis !important;
141
+ white-space: nowrap;
142
+ }
143
+
144
+ border: var(--su-static1) solid var(--bc-medium);
145
+ border-radius: var(--br-sm);
146
+ box-shadow: var(--bs-sm);
147
+ text-align: left;
148
+ }
@@ -1,41 +1,41 @@
1
- .s-menu {
2
- --_me-divider-bg: var(--bc-light);
3
- --_me-label-btc: var(--bc-light);
4
- --_me-label-cursor: pointer;
5
-
6
- // CONTEXTUAL STYLES
7
- .dark-mode({
8
- --_me-divider-bg: var(--bc-light);
9
- --_me-label-btc: var(--bc-light);
10
- });
11
-
12
- // CHILD ELEMENTS
13
- & &--divider {
14
- background-color: var(--_me-divider-bg);
15
- height: var(--su-static1);
16
- margin: var(--su8) 0;
17
- }
18
-
19
- & &--label {
20
- &.is-disabled {
21
- --_me-label-cursor: not-allowed;
22
- }
23
-
24
- border-top: var(--su-static1) solid var(--_me-label-btc);
25
- cursor: var(--_me-label-cursor);
26
- padding: var(--su12);
27
- }
28
-
29
- & &--title {
30
- color: var(--black-500);
31
- font-size: var(--fs-fine);
32
- padding: var(--su8) var(--su12);
33
- text-transform: uppercase;
34
- }
35
-
36
- & li + &--title {
37
- margin-top: var(--su12);
38
- }
39
-
40
- .list-reset;
41
- }
1
+ .s-menu {
2
+ --_me-divider-bg: var(--bc-light);
3
+ --_me-label-btc: var(--bc-light);
4
+ --_me-label-cursor: pointer;
5
+
6
+ // CONTEXTUAL STYLES
7
+ .dark-mode({
8
+ --_me-divider-bg: var(--bc-light);
9
+ --_me-label-btc: var(--bc-light);
10
+ });
11
+
12
+ // CHILD ELEMENTS
13
+ & &--divider {
14
+ background-color: var(--_me-divider-bg);
15
+ height: var(--su-static1);
16
+ margin: var(--su8) 0;
17
+ }
18
+
19
+ & &--label {
20
+ &.is-disabled {
21
+ --_me-label-cursor: not-allowed;
22
+ }
23
+
24
+ border-top: var(--su-static1) solid var(--_me-label-btc);
25
+ cursor: var(--_me-label-cursor);
26
+ padding: var(--su12);
27
+ }
28
+
29
+ & &--title {
30
+ color: var(--black-500);
31
+ font-size: var(--fs-fine);
32
+ padding: var(--su8) var(--su12);
33
+ text-transform: uppercase;
34
+ }
35
+
36
+ & li + &--title {
37
+ margin-top: var(--su12);
38
+ }
39
+
40
+ .list-reset;
41
+ }