@dialpad/dialtone 9.16.0 → 9.17.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/README.md +12 -11
- package/dist/css/dialtone.css +2 -2
- package/dist/stylelint-plugin/index.js +6 -0
- package/dist/stylelint-plugin/rules/no-mixins.js +52 -0
- package/dist/tokens/android/java/tokens-dark.kt +1 -1
- package/dist/tokens/android/java/tokens-light.kt +1 -1
- package/dist/tokens/android/res/values/colors-dark.xml +1 -1
- package/dist/tokens/android/res/values/colors-light.xml +1 -1
- package/dist/tokens/android/res/values/dimens.xml +1 -1
- package/dist/tokens/css/variables-dark.css +1 -1
- package/dist/tokens/css/variables-light.css +1 -1
- package/dist/tokens/ios/tokens-dark.swift +1 -1
- package/dist/tokens/ios/tokens-light.swift +1 -1
- package/dist/tokens/less/variables-dark.less +1 -1
- package/dist/tokens/less/variables-light.less +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,17 +11,18 @@ apps (apps folder):
|
|
|
11
11
|
|
|
12
12
|
```text
|
|
13
13
|
dialtone/
|
|
14
|
-
|--- .github
|
|
15
|
-
|--- apps
|
|
16
|
-
|--- dialtone-documentation
|
|
17
|
-
|--- packages
|
|
18
|
-
|--- dialtone-css
|
|
19
|
-
|--- dialtone-vue2
|
|
20
|
-
|--- dialtone-vue3
|
|
21
|
-
|--- dialtone-icons
|
|
22
|
-
|--- dialtone-tokens
|
|
23
|
-
|--- eslint-plugin-dialtone
|
|
24
|
-
|---
|
|
14
|
+
|--- .github # Github configuration and workflows
|
|
15
|
+
|--- apps # Apps
|
|
16
|
+
|--- dialtone-documentation # Documentation site
|
|
17
|
+
|--- packages # NPM packages
|
|
18
|
+
|--- dialtone-css # CSS library
|
|
19
|
+
|--- dialtone-vue2 # Vue component library compatible with vue@2
|
|
20
|
+
|--- dialtone-vue3 # Vue component library compatible with vue@3
|
|
21
|
+
|--- dialtone-icons # SVG icons library
|
|
22
|
+
|--- dialtone-tokens # Tokens library
|
|
23
|
+
|--- eslint-plugin-dialtone # Custom ESLint rules for Dialtone users
|
|
24
|
+
|--- stylelint-plugin-dialtone # Custom Stylelint rules for Dialtone users
|
|
25
|
+
|--- scripts # Shared scripts
|
|
25
26
|
```
|
|
26
27
|
|
|
27
28
|
## Tooling
|
package/dist/css/dialtone.css
CHANGED
|
@@ -7464,7 +7464,7 @@ body {
|
|
|
7464
7464
|
}
|
|
7465
7465
|
/**
|
|
7466
7466
|
* Do not edit directly
|
|
7467
|
-
* Generated on
|
|
7467
|
+
* Generated on Thu, 07 Mar 2024 00:34:37 GMT
|
|
7468
7468
|
*/
|
|
7469
7469
|
|
|
7470
7470
|
.dialtone-theme-light {
|
|
@@ -8261,7 +8261,7 @@ body {
|
|
|
8261
8261
|
|
|
8262
8262
|
/**
|
|
8263
8263
|
* Do not edit directly
|
|
8264
|
-
* Generated on
|
|
8264
|
+
* Generated on Thu, 07 Mar 2024 00:34:37 GMT
|
|
8265
8265
|
*/
|
|
8266
8266
|
|
|
8267
8267
|
.dialtone-theme-dark {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const stylelint = require("stylelint");
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
createPlugin,
|
|
5
|
+
utils: { report, ruleMessages, validateOptions },
|
|
6
|
+
} = stylelint;
|
|
7
|
+
|
|
8
|
+
const ruleName = '@dialpad/stylelint-plugin-dialtone/no-mixins';
|
|
9
|
+
|
|
10
|
+
const messages = ruleMessages(ruleName, {
|
|
11
|
+
noMixinsRejected: (selector) => `Please avoid using LESS mixins "${selector}"`,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
url: "https://github.com/dialpad/dialtone/blob/staging/packages/stylelint-plugin-dialtone/docs/rules/no-mixins.md",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @type {import('stylelint').Rule} */
|
|
19
|
+
const ruleFunction = (primary) => {
|
|
20
|
+
return (root, result) => {
|
|
21
|
+
const validOptions = validateOptions(result, ruleName, {
|
|
22
|
+
actual: primary,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
if (!validOptions) return;
|
|
26
|
+
|
|
27
|
+
// This iterates through one selector at a time, so you don't have to worry about checking for nested selectors.
|
|
28
|
+
root.walkRules((ruleNode) => {
|
|
29
|
+
const { source } = ruleNode;
|
|
30
|
+
|
|
31
|
+
// any line that starts with a period and ends with a semicolon is a LESS mixin.
|
|
32
|
+
const regex = /\.[\S]+;/gm;
|
|
33
|
+
|
|
34
|
+
const matches = [...source.input.css.matchAll(regex)];
|
|
35
|
+
for (const match of matches) {
|
|
36
|
+
report({
|
|
37
|
+
result,
|
|
38
|
+
ruleName,
|
|
39
|
+
message: messages.noMixinsRejected(match[0]),
|
|
40
|
+
node: ruleNode,
|
|
41
|
+
word: match[0],
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
ruleFunction.ruleName = ruleName;
|
|
49
|
+
ruleFunction.messages = messages;
|
|
50
|
+
ruleFunction.meta = meta;
|
|
51
|
+
|
|
52
|
+
module.exports = createPlugin(ruleName, ruleFunction);
|