@brightspace-ui/core 3.270.0 → 3.270.2

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.
@@ -0,0 +1,24 @@
1
+ import { css } from 'lit';
2
+ import { getFlag } from '../../helpers/flags.js';
3
+
4
+ const OffSCREEN_SIZELESS = getFlag('d2l-offscreen-sizeless', true);
5
+ const HAS_DOCUMENT = globalThis.document !== undefined;
6
+
7
+ /**
8
+ * A private helper declarations that should not be used by general consumers
9
+ */
10
+ export const _offscreenStyleDeclarations = css`
11
+ direction: var(--d2l-document-direction, ${ !HAS_DOCUMENT ? css`unset` : (document.dir === 'rtl' ? css`rtl` : css`ltr`)}); /* stylelint-disable-line @stylistic/string-quotes */
12
+ height: ${HAS_DOCUMENT && OffSCREEN_SIZELESS ? 0 : 1}px; /* The HAS_DOCUMENT check can be removed once the d2l-offscreen-sizeless flag is removed and set to 0px */
13
+ inset-inline-start: -10000px;
14
+ overflow: hidden;
15
+ position: absolute !important;
16
+ white-space: nowrap;
17
+ width: ${HAS_DOCUMENT && OffSCREEN_SIZELESS ? 0 : 1}px; /* The HAS_DOCUMENT check can be removed once the d2l-offscreen-sizeless flag is removed and set to 0px */
18
+ `;
19
+
20
+ export const offscreenStyles = css`
21
+ .d2l-offscreen {
22
+ ${_offscreenStyleDeclarations}
23
+ }
24
+ `;
@@ -1,27 +1,7 @@
1
+ import { _offscreenStyleDeclarations, offscreenStyles } from './offscreen-styles.js';
1
2
  import { css, html, LitElement } from 'lit';
2
- import { getFlag } from '../../helpers/flags.js';
3
3
 
4
- const OffSCREEN_SIZELESS = getFlag('d2l-offscreen-sizeless', true);
5
-
6
- /**
7
- * A private helper declarations that should not be used by general consumers
8
- */
9
- export const _offscreenStyleDeclarations = css`
10
- direction: var(--d2l-document-direction, ${document.dir === 'rtl' ? css`rtl` : css`ltr`}); /* stylelint-disable-line @stylistic/string-quotes */
11
- height: ${OffSCREEN_SIZELESS ? 0 : 1}px;
12
- inset-inline-start: -10000px;
13
- overflow: hidden;
14
- position: absolute !important;
15
- white-space: nowrap;
16
- width: ${OffSCREEN_SIZELESS ? 0 : 1}px;
17
- ${document.dir === 'rtl' ? css`right` : css`left`}: -10000px;
18
- `;
19
-
20
- export const offscreenStyles = css`
21
- .d2l-offscreen {
22
- ${_offscreenStyleDeclarations}
23
- }
24
- `;
4
+ export { _offscreenStyleDeclarations, offscreenStyles };
25
5
 
26
6
  /**
27
7
  * A component for positioning content offscreen to only be visible to screen readers.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.270.0",
3
+ "version": "3.270.2",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",