@muraldevkit/ds-foundation 1.1.0 → 1.2.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!--
4
4
  Do not edit directly
5
- Generated on Mon, 03 Apr 2023 16:23:25 GMT
5
+ Generated on Tue, 04 Apr 2023 21:08:21 GMT
6
6
  -->
7
7
  <resources>
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!--
4
4
  Do not edit directly
5
- Generated on Mon, 03 Apr 2023 16:23:25 GMT
5
+ Generated on Tue, 04 Apr 2023 21:08:21 GMT
6
6
  -->
7
7
  <resources>
8
8
 
@@ -4,7 +4,7 @@
4
4
  //
5
5
 
6
6
  // Do not edit directly
7
- // Generated on Mon, 03 Apr 2023 16:23:25 GMT
7
+ // Generated on Tue, 04 Apr 2023 21:08:21 GMT
8
8
 
9
9
 
10
10
  import UIKit
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@muraldevkit/ds-foundation","version":"1.1.0","description":"Mural's design system's Foundation package containing our design language features used across all components","license":"https://www.mural.co/terms/developer-addendum","scripts":{"copy":"npm run copy:json","copy:json":"cpy src/tokens/*.json dist/tokens/ --flat","build:minify":"npm run build:fonts:min && npm run build:foundation:min","build:transpile":"npm run build:fonts && npm run build:foundation","build:foundation":"sass src/styles/index.scss dist/foundation.css","build:foundation:min":"sass src/styles/index.scss dist/foundation.min.css --style compressed","build:fonts":"sass src/styles/fonts.scss dist/fonts.css","build:fonts:min":"sass src/styles/fonts.scss dist/fonts.min.css --style compressed","build:tokens":"style-dictionary build --config ../../node_modules/@muraldevkit/ds-utilities/lib/configs/style-dictionary.json","build:styles":"npm run build:transpile && npm run build:minify","build":"npm run clean && npm run build:tokens && npm run build:styles","postbuild":"npm run copy","clean":"rimraf dist && rimraf src/styles/_global.scss","watch":"sass src/styles/index.scss dist/foundation.css --watch","release":"npx semantic-release"},"files":["dist/","src/styles/","assets/fonts"],"publishConfig":{"access":"public"},"packageConfig":{"status":"integration-ready"},"devDependencies":{"@muraldevkit/ds-semrel-config":"1.0.0","@muraldevkit/ds-semrel-manager":"1.0.0","@muraldevkit/ds-semrel-stencil-exports":"1.0.1","@muraldevkit/ds-utilities":"1.0.0","cpy-cli":"4.2.0","rimraf":"3.0.2","sass":"1.56.2","semantic-release-monorepo":"7.0.5","style-dictionary":"3.7.1"},"release":{"extends":["semantic-release-monorepo","./config/release.config"]},"nx":{"targets":{"build":{"dependsOn":["^build"]},"inputs":["{projectRoot}/src/**/*"],"outputs":["{projectRoot}/dist"]}}}
1
+ {"name":"@muraldevkit/ds-foundation","version":"1.2.1","description":"Mural's design system's Foundation package containing our design language features used across all components","license":"https://www.mural.co/terms/developer-addendum","scripts":{"copy":"npm run copy:json","copy:json":"cpy src/tokens/*.json dist/tokens/ --flat","build:minify":"npm run build:fonts:min && npm run build:foundation:min","build:transpile":"npm run build:fonts && npm run build:foundation","build:foundation":"sass src/styles/index.scss dist/foundation.css","build:foundation:min":"sass src/styles/index.scss dist/foundation.min.css --style compressed","build:fonts":"sass src/styles/fonts.scss dist/fonts.css","build:fonts:min":"sass src/styles/fonts.scss dist/fonts.min.css --style compressed","build:tokens":"style-dictionary build --config ../../node_modules/@muraldevkit/ds-utilities/lib/configs/style-dictionary.json","build:styles":"npm run build:transpile && npm run build:minify","build":"npm run clean && npm run build:tokens && npm run build:styles","postbuild":"npm run copy","clean":"rimraf dist && rimraf src/styles/_global.scss","watch":"sass src/styles/index.scss dist/foundation.css --watch","release":"npx semantic-release"},"files":["dist/","src/styles/","assets/fonts"],"publishConfig":{"access":"public"},"packageConfig":{"status":"integration-ready"},"devDependencies":{"@muraldevkit/ds-semrel-config":"1.0.0","@muraldevkit/ds-semrel-manager":"1.0.0","@muraldevkit/ds-semrel-stencil-exports":"1.0.1","@muraldevkit/ds-utilities":"1.0.0","cpy-cli":"4.2.0","rimraf":"3.0.2","sass":"1.56.2","semantic-release-monorepo":"7.0.5","style-dictionary":"3.7.1"},"release":{"extends":["semantic-release-monorepo","./config/release.config"]},"nx":{"targets":{"build":{"dependsOn":["^build"]},"inputs":["{projectRoot}/src/**/*"],"outputs":["{projectRoot}/dist"]}}}
@@ -20,12 +20,14 @@
20
20
  /// as an example. Available options are "true", "false" (default)
21
21
  /// @param {String} $focus-selector - Allows overwriting the default ":focus-visible" CSS selector for when to apply the styles.
22
22
  /// Typical use includes ":focus" or ":focus-within"
23
+ /// @param {String} $border-width - The border width of the element having focus applied to ensure the offset
24
+ /// is correct. Default is '0px'
23
25
  ///
24
26
  /// @example @include mrl-focus; // Generates the default outline version
25
27
  /// @example @include mrl-focus($is-inverse: 'true'); // Generates an inverse outline
26
28
  /// Generate the element version in the default color on a control element that has a border using the after pseudo element
27
29
  /// @example @include mrl-focus('element', 'false', 'var(--mrl-border-radius-control)', 'after');
28
- @mixin mrl-focus($style: 'element', $is-inverse: 'false', $element-radius: 'var(--mrl-border-radius-functional)', $pseudo-element: 'after', $is-inline-element: 'false', $focus-selector: ':focus-visible') {
30
+ @mixin mrl-focus($style: 'element', $is-inverse: 'false', $element-radius: 'var(--mrl-border-radius-functional)', $pseudo-element: 'after', $is-inline-element: 'false', $focus-selector: ':focus-visible', $border-width: '0px') {
29
31
  $color-token: '';
30
32
 
31
33
  @if $is-inverse == 'true' {
@@ -34,14 +36,6 @@
34
36
 
35
37
  @if $is-inline-element == 'true' {
36
38
  $focus-selector: ':focus-visible + .mrl-u-focus-indicator';
37
-
38
- + .mrl-u-focus-indicator {
39
- display: block;
40
- height: 100%;
41
- left: 0;
42
- top: 0;
43
- width: 100%;
44
- }
45
39
  }
46
40
 
47
41
  @if $style == 'element' {
@@ -55,8 +49,11 @@
55
49
  }
56
50
 
57
51
  @if $style == 'element' {
52
+ // Since we use a pseudo element to show the focus indicator we want to hide the default outline
53
+ outline: none;
54
+
58
55
  &::#{string.unquote($pseudo-element)} {
59
- @include mrl-focus-pseudo-element($element-radius, $color-token);
56
+ @include mrl-focus-pseudo-element($element-radius, $color-token, $border-width);
60
57
  }
61
58
  }
62
59
  }
@@ -69,7 +66,7 @@
69
66
  /// Should be set to a CSS token. Default is var(--mrl-border-radius-functional).
70
67
  /// @param {String} $color-token - Suffix applied to the color token to change it to the inverse color if needed.
71
68
  /// Default is '' which uses the default focus color. To change to the inverse base '-inverse'
72
- /// @param {String} $border-width - the border width of the element having focus applied to ensure the offset
69
+ /// @param {String} $border-width - The border width of the element having focus applied to ensure the offset
73
70
  /// is correct. Default is '0px'
74
71
  ///
75
72
  /// @example :host(:focus-visible)::after { @include mrl-focus-shadow(); } // Generates the default version