@stackoverflow/stacks 2.7.3 → 2.7.5

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