@stackoverflow/stacks 1.8.0 → 1.9.1

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 (137) hide show
  1. package/README.md +161 -153
  2. package/dist/{controllers/s-banner.d.ts → components/banner/banner.d.ts} +1 -1
  3. package/dist/{controllers/s-expandable-control.d.ts → components/expandable/expandable.d.ts} +1 -1
  4. package/dist/{controllers/s-modal.d.ts → components/modal/modal.d.ts} +1 -1
  5. package/dist/{controllers/s-navigation-tablist.d.ts → components/navigation/navigation.d.ts} +1 -1
  6. package/dist/{controllers/s-popover.d.ts → components/popover/popover.d.ts} +1 -1
  7. package/dist/{controllers/s-tooltip.d.ts → components/popover/tooltip.d.ts} +1 -1
  8. package/dist/components/table/table.d.ts +30 -0
  9. package/dist/{controllers/s-toast.d.ts → components/toast/toast.d.ts} +1 -1
  10. package/dist/{controllers/s-uploader.d.ts → components/uploader/uploader.d.ts} +1 -1
  11. package/dist/controllers.d.ts +9 -0
  12. package/dist/css/stacks.css +2063 -1994
  13. package/dist/css/stacks.min.css +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/js/stacks.js +1465 -1436
  16. package/dist/js/stacks.min.js +1 -1
  17. package/lib/{css/atomic/borders.less → atomic/border.less} +397 -379
  18. package/lib/{css/atomic/colors.less → atomic/color.less} +210 -210
  19. package/lib/{css/atomic → atomic}/flex.less +426 -426
  20. package/lib/{css/atomic → atomic}/gap.less +44 -44
  21. package/lib/{css/atomic → atomic}/grid.less +139 -139
  22. package/lib/{css/atomic → atomic}/misc.less +343 -343
  23. package/lib/{css/atomic → atomic}/spacing.less +342 -342
  24. package/lib/{css/atomic → atomic}/typography.less +267 -267
  25. package/lib/{css/atomic → atomic}/width-height.less +194 -194
  26. package/lib/{css/base → base}/body.less +44 -44
  27. package/lib/{css/base → base}/configuration-static.less +61 -61
  28. package/lib/{css/base → base}/fieldset.less +5 -5
  29. package/lib/{css/base/icons.less → base/icon.less} +11 -20
  30. package/lib/{css/base/internals.less → base/internal.less} +220 -220
  31. package/lib/{css/base → base}/reset-meyer.less +64 -64
  32. package/lib/{css/base → base}/reset-normalize.less +449 -449
  33. package/lib/{css/base → base}/reset.less +20 -20
  34. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +21 -0
  35. package/lib/{css/components → components/activity-indicator}/activity-indicator.less +40 -40
  36. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +23 -0
  37. package/lib/{css/components/anchors.less → components/anchor/anchor.less} +61 -61
  38. package/lib/components/avatar/avatar.a11y.test.ts +36 -0
  39. package/lib/{css/components/avatars.less → components/avatar/avatar.less} +108 -108
  40. package/lib/components/avatar/avatar.visual.test.ts +54 -0
  41. package/lib/components/award-bling/award-bling.a11y.test.ts +17 -0
  42. package/lib/{css/components → components/award-bling}/award-bling.less +31 -31
  43. package/lib/components/award-bling/award-bling.visual.test.ts +26 -0
  44. package/lib/{css/components/badges.less → components/badge/badge.less} +251 -251
  45. package/lib/components/banner/banner.a11y.test.ts +37 -0
  46. package/lib/components/banner/banner.less +51 -0
  47. package/lib/{test/s-banner.test.ts → components/banner/banner.test.ts} +73 -73
  48. package/lib/{ts/controllers/s-banner.ts → components/banner/banner.ts} +149 -149
  49. package/lib/components/banner/banner.visual.test.ts +37 -0
  50. package/lib/components/block-link/block-link.a11y.test.ts +68 -0
  51. package/lib/{css/components → components/block-link}/block-link.less +80 -80
  52. package/lib/components/block-link/block-link.visual.test.ts +61 -0
  53. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +37 -0
  54. package/lib/{css/components → components/breadcrumbs}/breadcrumbs.less +41 -41
  55. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +37 -0
  56. package/lib/components/button/button.a11y.test.ts +32 -0
  57. package/lib/{css/components/buttons.less → components/button/button.less} +502 -501
  58. package/lib/components/button/button.visual.test.ts +52 -0
  59. package/lib/{css/components/button-groups.less → components/button-group/button-group.less} +83 -83
  60. package/lib/components/card/card.a11y.test.ts +13 -0
  61. package/lib/{css/components/cards.less → components/card/card.less} +29 -29
  62. package/lib/components/card/card.visual.test.ts +54 -0
  63. package/lib/components/check-control/check-control.less +17 -0
  64. package/lib/components/check-group/check-group.less +19 -0
  65. package/lib/{css/components/checkboxes-radios.less → components/checkbox_radio/checkbox_radio.less} +158 -158
  66. package/lib/{css/components/code-blocks.less → components/code-block/code-block.less} +116 -116
  67. package/lib/{css/components → components/description}/description.less +9 -9
  68. package/lib/{css/components/empty-states.less → components/empty-state/empty-state.less} +16 -16
  69. package/lib/{css/components → components/expandable}/expandable.less +118 -115
  70. package/lib/components/expandable/expandable.test.ts +51 -0
  71. package/lib/{ts/controllers/s-expandable-control.ts → components/expandable/expandable.ts} +238 -238
  72. package/lib/components/input-fill/input-fill.less +35 -0
  73. package/lib/components/input-icon/input-icon.less +45 -0
  74. package/lib/components/input-message/input-message.less +48 -0
  75. package/lib/{css/components/inputs.less → components/input_textarea/input_textarea.less} +166 -297
  76. package/lib/{css/components/labels.less → components/label/label.less} +111 -111
  77. package/lib/{css/components → components/link}/link.less +119 -119
  78. package/lib/{css/components/link-previews.less → components/link-preview/link-preview.less} +139 -139
  79. package/lib/{css/components → components/menu}/menu.less +41 -41
  80. package/lib/{css/components/modals.less → components/modal/modal.less} +113 -113
  81. package/lib/{ts/controllers/s-modal.ts → components/modal/modal.ts} +379 -379
  82. package/lib/{css/components → components/navigation}/navigation.less +134 -134
  83. package/lib/{ts/controllers/s-navigation-tablist.ts → components/navigation/navigation.ts} +128 -128
  84. package/lib/{css/components/notices.less → components/notice/notice.less} +203 -292
  85. package/lib/{css/components/page-titles.less → components/page-title/page-title.less} +51 -51
  86. package/lib/{css/components → components/pagination}/pagination.less +52 -52
  87. package/lib/{css/components/popovers.less → components/popover/popover.less} +148 -147
  88. package/lib/{ts/controllers/s-popover.ts → components/popover/popover.ts} +651 -651
  89. package/lib/{test/s-tooltip.test.ts → components/popover/tooltip.test.ts} +62 -62
  90. package/lib/{ts/controllers/s-tooltip.ts → components/popover/tooltip.ts} +343 -343
  91. package/lib/{test/s-tooltip.visual.test.ts → components/popover/tooltip.visual.test.ts} +31 -31
  92. package/lib/{css/components → components/post-summary}/post-summary.less +415 -415
  93. package/lib/{css/components/progress-bars.less → components/progress-bar/progress-bar.less} +291 -291
  94. package/lib/{css/components → components/prose}/prose.less +452 -452
  95. package/lib/{css/components → components/select}/select.less +148 -148
  96. package/lib/{css/components/sidebar-widgets.less → components/sidebar-widget/sidebar-widget.less} +257 -259
  97. package/lib/{css/components → components/spinner}/spinner.less +103 -103
  98. package/lib/{css/components → components/table}/table.less +307 -297
  99. package/lib/components/table/table.test.ts +366 -0
  100. package/lib/{ts/controllers/s-table.ts → components/table/table.ts} +296 -263
  101. package/lib/components/table-container/table-container.less +4 -0
  102. package/lib/{css/components/tags.less → components/tag/tag.less} +213 -213
  103. package/lib/components/toast/toast.less +35 -0
  104. package/lib/{test/s-toast.test.ts → components/toast/toast.test.ts} +63 -63
  105. package/lib/{ts/controllers/s-toast.ts → components/toast/toast.ts} +357 -357
  106. package/lib/components/toast/toast.visual.test.ts +27 -0
  107. package/lib/{css/components/toggle-switches.less → components/toggle-switch/toggle-switch.less} +110 -110
  108. package/lib/{css/components → components/topbar}/topbar.less +436 -435
  109. package/lib/{css/components → components/uploader}/uploader.less +195 -195
  110. package/lib/{ts/controllers/s-uploader.ts → components/uploader/uploader.ts} +205 -205
  111. package/lib/{css/components/user-cards.less → components/user-card/user-card.less} +129 -129
  112. package/lib/controllers.ts +33 -0
  113. package/lib/{css/exports → exports}/constants-colors.less +1112 -1111
  114. package/lib/{css/exports → exports}/constants-helpers.less +108 -108
  115. package/lib/{css/exports → exports}/constants-type.less +153 -153
  116. package/lib/{css/exports → exports}/exports.less +15 -15
  117. package/lib/{css/exports → exports}/mixins.less +299 -299
  118. package/lib/{ts/index.ts → index.ts} +32 -32
  119. package/lib/{css/input-utils.less → input-utils.less} +44 -44
  120. package/lib/{css/stacks-dynamic.less → stacks-dynamic.less} +24 -25
  121. package/lib/stacks-static.less +93 -0
  122. package/lib/{css/stacks.less → stacks.less} +13 -13
  123. package/lib/{ts/stacks.ts → stacks.ts} +113 -113
  124. package/lib/test/open-wc-testing-patch.d.ts +26 -0
  125. package/lib/test/test-utils.ts +466 -0
  126. package/lib/tsconfig.build.json +4 -0
  127. package/lib/tsconfig.json +16 -13
  128. package/package.json +106 -105
  129. package/dist/controllers/index.d.ts +0 -9
  130. package/dist/controllers/s-table.d.ts +0 -8
  131. package/lib/css/stacks-static.less +0 -87
  132. package/lib/test/s-avatar.a11y.test.ts +0 -77
  133. package/lib/test/s-banner.visual.test.ts +0 -61
  134. package/lib/test/s-btn.a11y.test.ts +0 -123
  135. package/lib/test/s-btn.visual.test.ts +0 -16
  136. package/lib/test/s-toast.visual.test.ts +0 -48
  137. package/lib/ts/controllers/index.ts +0 -17
package/README.md CHANGED
@@ -1,153 +1,161 @@
1
- # Stacks
2
-
3
- [![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]
4
-
5
- Stacks is Stack Overflow’s design system. It includes the resources needed to create consistent, predictable interfaces and workflows that conform to Stack Overflow’s principles, design language, and best practices.
6
-
7
- Our documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.
8
-
9
- The Stacks website documents:
10
-
11
- ### Product
12
- - Semantic and accessible component markup
13
- - Cross-browser compatible Less / CSS
14
- - An [icon library](https://github.com/StackExchange/Stacks-Icons)
15
-
16
- ### Email
17
- - Email templates & components
18
-
19
- Stacks documentation can be found at https://stackoverflow.design/
20
-
21
- ## Table of contents
22
-
23
- - [Using Stacks](#using-stacks)
24
- - [Building Stacks](#building-stacks)
25
- - [Linting Stacks](#linting-stacks)
26
- - [Testing Stacks](#testing-stacks)
27
- - [Releasing Stacks](#releasing-a-new-version-of-stacks)
28
- - [Bugs and feature requests](#bugs-and-feature-requests)
29
- - [Contributing](#contributing)
30
- - [License](#license)
31
-
32
- ## Using Stacks
33
- Using Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/guidelines/using-stacks).
34
-
35
- ## Building Stacks
36
- To contribute to Stacks documentation or its CSS library, you’ll need to build Stacks locally. View our [building guidelines](https://stackoverflow.design/product/guidelines/building).
37
-
38
- Having trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.
39
-
40
- ## Linting Stacks
41
-
42
- Run all lint suites by running:
43
- ```sh
44
- npm run lint
45
- ```
46
-
47
- Lint the styles (stylelint) by running:
48
- ```sh
49
- npm run lint:css
50
- ```
51
- Lint the typescript source code (eslint) via running:
52
- ```sh
53
- npm run lint:ts
54
- ```
55
- Lint the source code format (prettier) via running:
56
- ```sh
57
- npm run lint:format
58
- ```
59
-
60
- ## Testing Stacks
61
-
62
- Run all test suites by running:
63
- ```sh
64
- npm test
65
- ```
66
- ### Unit/Component Tests
67
-
68
- Unit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
69
- Please follow the library's principles and documentation to write tests.
70
-
71
- Stacks uses [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) and [Playwright](https://modern-web.dev/docs/test-runner/browser-launchers/playwright/) to run tests in a real browser context.
72
-
73
- Execute the unit/component tests suite by running:
74
- ```sh
75
- npm run test:unit
76
- ```
77
- or if you prefer watch mode run:
78
- ```sh
79
- npm run test:unit:watch
80
- ```
81
-
82
- ### Visual Regression Tests
83
-
84
- **Prerequisite:**
85
- In order to pull and upload baseline images you need to have `git lfs` installed in your local machine. Please follow [this guide](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) to install that.
86
-
87
-
88
- This [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests. [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
89
- Visual regression tests end with this suffix `*.visual.test.ts`.
90
-
91
- Execute the visual regression tests suite by running:
92
- ```sh
93
- npm run test:visual
94
- ```
95
-
96
- Update the visual baseline via:
97
- ```sh
98
- npm run test:visual:update
99
- ```
100
-
101
- Failing tests (including diffs) can be found under `screenshots/[browser]/failed/` folders.
102
-
103
- ## Releasing a new version of Stacks
104
- Stacks uses [Semantic Versioning](https://semver.org/), is distributed via [npm](https://www.npmjs.com/package/@stackoverflow/stacks), and publishes [release notes on Github](https://github.com/StackExchange/Stacks/releases). Follow the steps below to release a new version of Stacks.
105
-
106
- ### Bump the version number
107
- ```sh
108
- npm version [major | minor | patch]
109
- ```
110
-
111
- ### Push the new tag
112
- ```sh
113
- git push && git push --tags
114
- ```
115
-
116
- ### Create release notes [on Github](https://github.com/StackExchange/Stacks/releases/new)
117
-
118
- 1. Visit https://github.com/StackExchange/Stacks/releases/new
119
- 1. Choose your new version from the "Choose a tag" dropdown
120
- 1. Click "Generate release notes"
121
- 1. Cleanup and complete the release notes
122
- - Prominently mention any breaking changes, if applicable
123
- - Include a "What's Changed" section in the release notes
124
- - Mention significant bug fixes
125
- - Mention new features
126
- - Mention significant under-the-hood changes that could impact consumers
127
-
128
- ### Ship your newly created version to [npm](https://www.npmjs.com/package/@stackoverflow/stacks)
129
- ```sh
130
- npm publish
131
- ```
132
-
133
- ### Merge `develop` into `production` and push
134
- ```sh
135
- git checkout production && git merge develop && git push
136
- ```
137
-
138
- ### Push the updated docs site
139
- Head to [Netlify](https://app.netlify.com), navigate to the Stacks overview, click on "Production deploys", and select "Deploy site" from the "Trigger deploy" dropdown.
140
-
141
- ## Bugs and feature requests
142
- Have a bug or feature request? First search existing or closed issues to make sure the issue hasn’t been noted yet. If not, review our [issue guidelines](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).
143
-
144
- ## Contributing
145
- If you’d like to contribute to Stacks, please read through our [contribution guidelines](/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
146
-
147
- ## License
148
- Code and documentation copyright 2017-2022 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).
149
-
150
- [gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml
151
- [gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml/badge.svg?branch=develop
152
- [npm-url]: https://npmjs.org/package/@stackoverflow/stacks
153
- [npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg
1
+ # Stacks
2
+
3
+ [![ci status][gh-action-badge]][gh-action-url] [![npm version][npm-badge]][npm-url]
4
+
5
+ Stacks is Stack Overflow’s design system. It includes the resources needed to create consistent, predictable interfaces and workflows that conform to Stack Overflow’s principles, design language, and best practices.
6
+
7
+ Our documentation is built with Stacks itself, using its [immutable, atomic classes](http://johnpolacek.com/rethinking/) and components.
8
+
9
+ The Stacks website documents:
10
+
11
+ ### Product
12
+ - Semantic and accessible component markup
13
+ - Cross-browser compatible Less / CSS
14
+ - An [icon library](https://github.com/StackExchange/Stacks-Icons)
15
+
16
+ ### Email
17
+ - Email templates & components
18
+
19
+ Stacks documentation can be found at https://stackoverflow.design/
20
+
21
+ ## Table of contents
22
+
23
+ - [Using Stacks](#using-stacks)
24
+ - [Building Stacks](#building-stacks)
25
+ - [Format Stacks](#format-stacks)
26
+ - [Linting Stacks](#linting-stacks)
27
+ - [Testing Stacks](#testing-stacks)
28
+ - [Releasing Stacks](#releasing-a-new-version-of-stacks)
29
+ - [Bugs and feature requests](#bugs-and-feature-requests)
30
+ - [Contributing](#contributing)
31
+ - [License](#license)
32
+
33
+ ## Using Stacks
34
+ Using Stacks is outlined in our [usage guidelines](https://stackoverflow.design/product/guidelines/using-stacks).
35
+
36
+ ## Building Stacks
37
+ To contribute to Stacks documentation or its CSS library, you’ll need to build Stacks locally. View our [building guidelines](https://stackoverflow.design/product/guidelines/building).
38
+
39
+ Having trouble getting these steps to work? Open [an issue](https://github.com/StackExchange/Stacks/issues/new) with a `setup` label.
40
+
41
+ ## Format Stacks
42
+
43
+ Format the source code with prettier via running:
44
+ ```sh
45
+ npm run format
46
+ ```
47
+
48
+ ## Linting Stacks
49
+
50
+ Run all lint suites by running:
51
+ ```sh
52
+ npm run lint
53
+ ```
54
+
55
+ Lint the styles (stylelint) by running:
56
+ ```sh
57
+ npm run lint:css
58
+ ```
59
+ Lint the typescript source code (eslint) via running:
60
+ ```sh
61
+ npm run lint:ts
62
+ ```
63
+ Lint the source code format (prettier) via running:
64
+ ```sh
65
+ npm run lint:format
66
+ ```
67
+
68
+ ## Testing Stacks
69
+
70
+ Run all test suites by running:
71
+ ```sh
72
+ npm test
73
+ ```
74
+ ### Unit/Component Tests
75
+
76
+ Unit/Component tests are written with [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
77
+ Please follow the library's principles and documentation to write tests.
78
+
79
+ Stacks uses [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/) and [Playwright](https://modern-web.dev/docs/test-runner/browser-launchers/playwright/) to run tests in a real browser context.
80
+
81
+ Execute the unit/component tests suite by running:
82
+ ```sh
83
+ npm run test:unit
84
+ ```
85
+ or if you prefer watch mode run:
86
+ ```sh
87
+ npm run test:unit:watch
88
+ ```
89
+
90
+ ### Visual Regression Tests
91
+
92
+ **Prerequisite:**
93
+ In order to pull and upload baseline images you need to have `git lfs` installed in your local machine. Please follow [this guide](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) to install that.
94
+
95
+
96
+ This [Web Test Runner plugin](https://www.npmjs.com/package/@web/test-runner-visual-regression) is used to run visual regression tests. [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro).
97
+ Visual regression tests end with this suffix `*.visual.test.ts`.
98
+
99
+ Execute the visual regression tests suite by running:
100
+ ```sh
101
+ npm run test:visual
102
+ ```
103
+
104
+ Update the visual baseline via:
105
+ ```sh
106
+ npm run test:visual:update
107
+ ```
108
+
109
+ Failing tests (including diffs) can be found under `screenshots/[browser]/failed/` folders.
110
+
111
+ ## Releasing a new version of Stacks
112
+ Stacks uses [Semantic Versioning](https://semver.org/), is distributed via [npm](https://www.npmjs.com/package/@stackoverflow/stacks), and publishes [release notes on Github](https://github.com/StackExchange/Stacks/releases). Follow the steps below to release a new version of Stacks.
113
+
114
+ ### Bump the version number
115
+ ```sh
116
+ npm version [major | minor | patch]
117
+ ```
118
+
119
+ ### Push the new tag
120
+ ```sh
121
+ git push && git push --tags
122
+ ```
123
+
124
+ ### Create release notes [on Github](https://github.com/StackExchange/Stacks/releases/new)
125
+
126
+ 1. Visit https://github.com/StackExchange/Stacks/releases/new
127
+ 1. Choose your new version from the "Choose a tag" dropdown
128
+ 1. Click "Generate release notes"
129
+ 1. Cleanup and complete the release notes
130
+ - Prominently mention any breaking changes, if applicable
131
+ - Include a "What's Changed" section in the release notes
132
+ - Mention significant bug fixes
133
+ - Mention new features
134
+ - Mention significant under-the-hood changes that could impact consumers
135
+
136
+ ### Ship your newly created version to [npm](https://www.npmjs.com/package/@stackoverflow/stacks)
137
+ ```sh
138
+ npm publish
139
+ ```
140
+
141
+ ### Merge `develop` into `production` and push
142
+ ```sh
143
+ git checkout production && git merge develop && git push
144
+ ```
145
+
146
+ ### Push the updated docs site
147
+ Head to [Netlify](https://app.netlify.com), navigate to the Stacks overview, click on "Production deploys", and select "Deploy site" from the "Trigger deploy" dropdown.
148
+
149
+ ## Bugs and feature requests
150
+ Have a bug or feature request? First search existing or closed issues to make sure the issue hasn’t been noted yet. If not, review our [issue guidelines](/CONTRIBUTING.md#open-an-issue) for submitting [a bug report](/CONTRIBUTING.md#reporting-bugs) or [feature request](/CONTRIBUTING.md#feature-requests).
151
+
152
+ ## Contributing
153
+ If you’d like to contribute to Stacks, please read through our [contribution guidelines](/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
154
+
155
+ ## License
156
+ Code and documentation copyright 2017-2022 Stack Exchange, Inc and released under the [MIT License](/LICENSE.MD).
157
+
158
+ [gh-action-url]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml
159
+ [gh-action-badge]: https://github.com/StackExchange/Stacks/actions/workflows/main.yml/badge.svg?branch=develop
160
+ [npm-url]: https://npmjs.org/package/@stackoverflow/stacks
161
+ [npm-badge]: https://img.shields.io/npm/v/@stackoverflow/stacks.svg
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class BannerController extends Stacks.StacksController {
3
3
  static targets: string[];
4
4
  readonly bannerTarget: HTMLElement;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class ExpandableController extends Stacks.StacksController {
3
3
  private isCollapsed;
4
4
  private events;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class ModalController extends Stacks.StacksController {
3
3
  static targets: string[];
4
4
  private modalTarget;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class TabListController extends Stacks.StacksController {
3
3
  private boundSelectTab;
4
4
  private boundHandleKeydown;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare abstract class BasePopoverController extends Stacks.StacksController {
3
3
  private popper;
4
4
  protected popoverElement: HTMLElement;
@@ -1,4 +1,4 @@
1
- import { BasePopoverController } from "./s-popover";
1
+ import { BasePopoverController } from "./popover";
2
2
  export interface TooltipOptions {
3
3
  placement: string;
4
4
  }
@@ -0,0 +1,30 @@
1
+ import * as Stacks from "../../stacks";
2
+ /**
3
+ * The string values of these enumerations should correspond with `aria-sort` valid values.
4
+ *
5
+ * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-sort#values
6
+ */
7
+ export declare enum SortOrder {
8
+ Ascending = "ascending",
9
+ Descending = "descending",
10
+ None = "none"
11
+ }
12
+ export declare class TableController extends Stacks.StacksController {
13
+ columnTarget: HTMLTableCellElement;
14
+ columnTargets: HTMLTableCellElement[];
15
+ static targets: string[];
16
+ sort(evt: PointerEvent): void;
17
+ private updateSortedColumnStyles;
18
+ }
19
+ /**
20
+ * @internal This function is exported for testing purposes but is not a part of our public API
21
+ *
22
+ * @param section
23
+ */
24
+ export declare function buildIndex(section: HTMLTableSectionElement): HTMLTableCellElement[][];
25
+ /**
26
+ * @internal This function is exported for testing purposes but is not a part of our public API
27
+ *
28
+ * @param cell
29
+ */
30
+ export declare function getCellSlot(cell: HTMLTableCellElement): number;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class ToastController extends Stacks.StacksController {
3
3
  static targets: string[];
4
4
  readonly toastTarget: HTMLElement;
@@ -1,4 +1,4 @@
1
- import * as Stacks from "../stacks";
1
+ import * as Stacks from "../../stacks";
2
2
  export declare class UploaderController extends Stacks.StacksController {
3
3
  static targets: string[];
4
4
  private inputTarget;
@@ -0,0 +1,9 @@
1
+ export { BannerController, hideBanner, showBanner, } from "./components/banner/banner";
2
+ export { ExpandableController } from "./components/expandable/expandable";
3
+ export { ModalController, hideModal, showModal, } from "./components/modal/modal";
4
+ export { TabListController } from "./components/navigation/navigation";
5
+ export { attachPopover, detachPopover, hidePopover, BasePopoverController, PopoverController, showPopover, } from "./components/popover/popover";
6
+ export { TableController } from "./components/table/table";
7
+ export { ToastController, hideToast, showToast, } from "./components/toast/toast";
8
+ export { setTooltipHtml, setTooltipText, TooltipController, } from "./components/popover/tooltip";
9
+ export { UploaderController } from "./components/uploader/uploader";