@muraldevkit/ds-foundation 1.1.0 → 1.2.0
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.
package/dist/ios-swift/Mrl.swift
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@muraldevkit/ds-foundation","version":"1.
|
|
1
|
+
{"name":"@muraldevkit/ds-foundation","version":"1.2.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"]}}}
|
package/src/styles/focus.scss
CHANGED
|
@@ -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' {
|
|
@@ -55,8 +57,11 @@
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
@if $style == 'element' {
|
|
60
|
+
// Since we use a pseudo element to show the focus indicator we want to hide the default outline
|
|
61
|
+
outline: none;
|
|
62
|
+
|
|
58
63
|
&::#{string.unquote($pseudo-element)} {
|
|
59
|
-
@include mrl-focus-pseudo-element($element-radius, $color-token);
|
|
64
|
+
@include mrl-focus-pseudo-element($element-radius, $color-token, $border-width);
|
|
60
65
|
}
|
|
61
66
|
}
|
|
62
67
|
}
|
|
@@ -69,7 +74,7 @@
|
|
|
69
74
|
/// Should be set to a CSS token. Default is var(--mrl-border-radius-functional).
|
|
70
75
|
/// @param {String} $color-token - Suffix applied to the color token to change it to the inverse color if needed.
|
|
71
76
|
/// Default is '' which uses the default focus color. To change to the inverse base '-inverse'
|
|
72
|
-
/// @param {String} $border-width -
|
|
77
|
+
/// @param {String} $border-width - The border width of the element having focus applied to ensure the offset
|
|
73
78
|
/// is correct. Default is '0px'
|
|
74
79
|
///
|
|
75
80
|
/// @example :host(:focus-visible)::after { @include mrl-focus-shadow(); } // Generates the default version
|