@dialpad/dialtone-tokens 1.36.3 → 1.36.4

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 (36) hide show
  1. package/README.md +1 -1
  2. package/dist/doc.json +12145 -12145
  3. package/dist/postcss/rem-to-px.cjs +1 -1
  4. package/dist/postcss/rem-to-px.js +7 -12
  5. package/dist/postcss/root-to-host.cjs +1 -0
  6. package/dist/postcss/root-to-host.js +12 -0
  7. package/dist/themes/config.cjs +1 -1
  8. package/dist/themes/config.js +9 -9
  9. package/dist/types/postcss/constants.d.cts +44 -0
  10. package/dist/types/postcss/constants.d.cts.map +1 -0
  11. package/dist/types/postcss/dialtone-tokens.d.cts +3 -0
  12. package/dist/types/postcss/dialtone-tokens.d.cts.map +1 -0
  13. package/dist/types/themes/config.d.ts +2 -0
  14. package/dist/{themes/types → types}/themes/config.d.ts.map +1 -1
  15. package/dist/{themes/types → types}/themes/dp-dark.d.ts.map +1 -1
  16. package/dist/{themes/types → types}/themes/dp-light.d.ts.map +1 -1
  17. package/dist/types/themes/expressive-dark.d.ts.map +1 -0
  18. package/dist/types/themes/expressive-light.d.ts.map +1 -0
  19. package/dist/types/themes/expressive-sm-dark.d.ts.map +1 -0
  20. package/dist/types/themes/expressive-sm-light.d.ts.map +1 -0
  21. package/dist/{themes/types → types}/themes/tmo-dark.d.ts.map +1 -1
  22. package/dist/{themes/types → types}/themes/tmo-light.d.ts.map +1 -1
  23. package/package.json +17 -7
  24. package/dist/themes/types/themes/config.d.ts +0 -2
  25. package/dist/themes/types/themes/expressive-dark.d.ts.map +0 -1
  26. package/dist/themes/types/themes/expressive-light.d.ts.map +0 -1
  27. package/dist/themes/types/themes/expressive-sm-dark.d.ts.map +0 -1
  28. package/dist/themes/types/themes/expressive-sm-light.d.ts.map +0 -1
  29. /package/dist/{themes/types → types}/themes/dp-dark.d.ts +0 -0
  30. /package/dist/{themes/types → types}/themes/dp-light.d.ts +0 -0
  31. /package/dist/{themes/types → types}/themes/expressive-dark.d.ts +0 -0
  32. /package/dist/{themes/types → types}/themes/expressive-light.d.ts +0 -0
  33. /package/dist/{themes/types → types}/themes/expressive-sm-dark.d.ts +0 -0
  34. /package/dist/{themes/types → types}/themes/expressive-sm-light.d.ts +0 -0
  35. /package/dist/{themes/types → types}/themes/tmo-dark.d.ts +0 -0
  36. /package/dist/{themes/types → types}/themes/tmo-light.d.ts +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t={exports:{}};t.exports=()=>({postcssPlugin:"postcss-dialtone-rem-to-px",Declaration(e){if(e.value.includes("rem")){const s=parseFloat(e.value)*10;e.assign({value:`${s}px`})}}});var r=t.exports.postcss=!0,u=t.exports;const a=o(u);exports.default=a;exports.postcss=r;
1
+ "use strict";const t=()=>({postcssPlugin:"postcss-dialtone-rem-to-px",Declaration(s){const e=s.root();if(/.*?\/css\/tokens-.*?/.test(e.source.input.file)&&s.value.includes("rem")){const o=parseFloat(s.value)*10;s.assign({value:`${o}px`})}}});t.postcss=!0;module.exports=t;
@@ -1,19 +1,14 @@
1
- function s(e) {
2
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
3
- }
4
- var t = { exports: {} };
5
- t.exports = () => ({
1
+ const o = () => ({
6
2
  postcssPlugin: "postcss-dialtone-rem-to-px",
7
3
  Declaration(e) {
8
- if (e.value.includes("rem")) {
9
- const r = parseFloat(e.value) * 10;
10
- e.assign({ value: `${r}px` });
4
+ const s = e.root();
5
+ if (/.*?\/css\/tokens-.*?/.test(s.source.input.file) && e.value.includes("rem")) {
6
+ const t = parseFloat(e.value) * 10;
7
+ e.assign({ value: `${t}px` });
11
8
  }
12
9
  }
13
10
  });
14
- var u = t.exports.postcss = !0, o = t.exports;
15
- const p = /* @__PURE__ */ s(o);
11
+ o.postcss = !0;
16
12
  export {
17
- p as default,
18
- u as postcss
13
+ o as default
19
14
  };
@@ -0,0 +1 @@
1
+ "use strict";const t=()=>({postcssPlugin:"postcss-dialtone-root-to-host",Once(s){if(!/.*?\/css\/tokens-.*?/.test(s.source.input.file))return;const e=s.last;e.selector=":host"}});t.postcss=!0;module.exports=t;
@@ -0,0 +1,12 @@
1
+ const e = () => ({
2
+ postcssPlugin: "postcss-dialtone-root-to-host",
3
+ Once(t) {
4
+ if (!/.*?\/css\/tokens-.*?/.test(t.source.input.file)) return;
5
+ const s = t.last;
6
+ s.selector = ":host";
7
+ }
8
+ });
9
+ e.postcss = !0;
10
+ export {
11
+ e as default
12
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(e){s("dialtone-css-theme",e.base.css),s("dialtone-css-brand",e.brand.css),a(e.base.name,e.brand.name)}function s(e,t){if(document.getElementById(e))document.getElementById(e).innerHTML=t;else{const n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id",e),n.innerHTML=t,document.head.appendChild(n)}}function a(e,t){document.documentElement.setAttribute("data-dt-theme",e),document.documentElement.setAttribute("data-dt-brand",t)}exports.setTheme=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(t,e=document.documentElement){c(t.base.name,t.brand.name,e),e!=null&&e.shadowRoot&&(e=e.shadowRoot),a("dialtone-css-theme",t.base.css,e),a("dialtone-css-brand",t.brand.css,e)}function a(t,e,s){if(s.querySelector("#"+t))s.querySelector("#"+t).innerHTML=e;else{const n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id",t),n.innerHTML=e,s.querySelector("head")?s.querySelector("head").appendChild(n):s.appendChild(n)}}function c(t,e,s){s.setAttribute("data-dt-theme",t),s.setAttribute("data-dt-brand",e)}exports.setTheme=i;
@@ -1,17 +1,17 @@
1
- function a(e) {
2
- s("dialtone-css-theme", e.base.css), s("dialtone-css-brand", e.brand.css), d(e.base.name, e.brand.name);
1
+ function i(t, e = document.documentElement) {
2
+ c(t.base.name, t.brand.name, e), e != null && e.shadowRoot && (e = e.shadowRoot), a("dialtone-css-theme", t.base.css, e), a("dialtone-css-brand", t.brand.css, e);
3
3
  }
4
- function s(e, t) {
5
- if (document.getElementById(e))
6
- document.getElementById(e).innerHTML = t;
4
+ function a(t, e, s) {
5
+ if (s.querySelector("#" + t))
6
+ s.querySelector("#" + t).innerHTML = e;
7
7
  else {
8
8
  const n = document.createElement("style");
9
- n.setAttribute("type", "text/css"), n.setAttribute("id", e), n.innerHTML = t, document.head.appendChild(n);
9
+ n.setAttribute("type", "text/css"), n.setAttribute("id", t), n.innerHTML = e, s.querySelector("head") ? s.querySelector("head").appendChild(n) : s.appendChild(n);
10
10
  }
11
11
  }
12
- function d(e, t) {
13
- document.documentElement.setAttribute("data-dt-theme", e), document.documentElement.setAttribute("data-dt-brand", t);
12
+ function c(t, e, s) {
13
+ s.setAttribute("data-dt-theme", t), s.setAttribute("data-dt-brand", e);
14
14
  }
15
15
  export {
16
- a as setTheme
16
+ i as setTheme
17
17
  };
@@ -0,0 +1,44 @@
1
+ export let IS_COLOR_REGEX: RegExp;
2
+ export let IS_THEME_COLOR_REGEX: RegExp;
3
+ export let IS_SHADOW_REGEX: RegExp;
4
+ export let IS_TYPOGRAPHY_REGEX: RegExp;
5
+ export namespace REGEX_OPTIONS {
6
+ let SHADOW_VARIABLES: string;
7
+ let TYPOGRAPHY_VARIABLES: string;
8
+ let TYPOGRAPHY_TYPE: string;
9
+ let TYPOGRAPHY_SIZES: string;
10
+ }
11
+ export let PLATFORM_FONT_SIZES: {
12
+ '100-mobile': string;
13
+ '200-mobile': string;
14
+ '300-mobile': string;
15
+ '400-mobile': string;
16
+ '500-mobile': string;
17
+ '100-tc8': string;
18
+ '200-tc8': string;
19
+ '300-tc8': string;
20
+ '400-tc8': string;
21
+ '500-tc8': string;
22
+ '100-tv': string;
23
+ '200-tv': string;
24
+ '300-tv': string;
25
+ '400-tv': string;
26
+ '500-tv': string;
27
+ };
28
+ export let Z_INDEX: {
29
+ hide: number;
30
+ base: number;
31
+ base1: number;
32
+ selected: number;
33
+ active: number;
34
+ navigation: number;
35
+ 'navigation-fixed': number;
36
+ dropdown: number;
37
+ popover: number;
38
+ tooltip: number;
39
+ drawer: number;
40
+ modal: number;
41
+ 'modal-element': number;
42
+ notification: number;
43
+ };
44
+ //# sourceMappingURL=constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../../postcss/constants.cjs"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ declare const _exports: import('postcss').PluginCreator<any>;
2
+ export = _exports;
3
+ //# sourceMappingURL=dialtone-tokens.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialtone-tokens.d.cts","sourceRoot":"","sources":["../../../postcss/dialtone-tokens.cjs"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export function setTheme(theme: any, rootNode?: HTMLElement): void;
2
+ //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../themes/config.js"],"names":[],"mappings":"AAIA,2CAKC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../themes/config.js"],"names":[],"mappings":"AAMA,mEAQC"}
@@ -1 +1 @@
1
- {"version":3,"file":"dp-dark.d.ts","sourceRoot":"","sources":["../../../../themes/dp-dark.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dp-dark.d.ts","sourceRoot":"","sources":["../../../themes/dp-dark.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"dp-light.d.ts","sourceRoot":"","sources":["../../../../themes/dp-light.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dp-light.d.ts","sourceRoot":"","sources":["../../../themes/dp-light.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expressive-dark.d.ts","sourceRoot":"","sources":["../../../themes/expressive-dark.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expressive-light.d.ts","sourceRoot":"","sources":["../../../themes/expressive-light.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expressive-sm-dark.d.ts","sourceRoot":"","sources":["../../../themes/expressive-sm-dark.js"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expressive-sm-light.d.ts","sourceRoot":"","sources":["../../../themes/expressive-sm-light.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"tmo-dark.d.ts","sourceRoot":"","sources":["../../../../themes/tmo-dark.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"tmo-dark.d.ts","sourceRoot":"","sources":["../../../themes/tmo-dark.js"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"tmo-light.d.ts","sourceRoot":"","sources":["../../../../themes/tmo-light.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"tmo-light.d.ts","sourceRoot":"","sources":["../../../themes/tmo-light.js"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,11 +1,26 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-tokens",
3
- "version": "1.36.3",
3
+ "version": "1.36.4",
4
4
  "description": "Design tokens for Dialtone.",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
+ "exports": {
10
+ "./*.css": "./dist/css/*.css",
11
+ "./*.less": "./dist/less/*.less",
12
+ "./postcss/*": {
13
+ "types": "./dist/types/postcss/*.d.ts",
14
+ "import": "./dist/postcss/*.js",
15
+ "require": "./dist/postcss/*.cjs"
16
+ },
17
+ "./themes/*": {
18
+ "types": "./dist/types/themes/*.d.ts",
19
+ "import": "./dist/themes/*.js",
20
+ "require": "./dist/themes/*.cjs"
21
+ },
22
+ "./*": "./*"
23
+ },
9
24
  "license": "MIT",
10
25
  "bugs": {
11
26
  "url": "https://github.com/dialpad/dialtone-tokens/issues"
@@ -22,10 +37,7 @@
22
37
  "postcss": "8.4.39",
23
38
  "postcss-cli": "11.0.0",
24
39
  "style-dictionary": "^4.1.0",
25
- "tinycolor2": "^1.6.0",
26
- "tsx": "^4.19.0",
27
- "typescript": "^5.1.6",
28
- "vite-plugin-dts": "^4.0.3"
40
+ "tsx": "^4.19.0"
29
41
  },
30
42
  "contributors": [
31
43
  {
@@ -55,8 +67,6 @@
55
67
  }
56
68
  ],
57
69
  "scripts": {
58
- "build": "node ./build.js && vite build",
59
- "publish:external-packages": "pnpm run publish:android-package && pnpm run publish:ios-package",
60
70
  "publish:android-package": "cp ./AndroidManifest.xml dist/android && ./gradlew publishToMavenLocal -Pversion=$npm_package_version",
61
71
  "publish:ios-package": "./build-ios.js",
62
72
  "sync:tokens-to-figma": "tsx sync-scripts/sync_tokens_to_figma.ts",
@@ -1,2 +0,0 @@
1
- export function setTheme(theme: any): void;
2
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"expressive-dark.d.ts","sourceRoot":"","sources":["../../../../themes/expressive-dark.js"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"expressive-light.d.ts","sourceRoot":"","sources":["../../../../themes/expressive-light.js"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"expressive-sm-dark.d.ts","sourceRoot":"","sources":["../../../../themes/expressive-sm-dark.js"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"expressive-sm-light.d.ts","sourceRoot":"","sources":["../../../../themes/expressive-sm-light.js"],"names":[],"mappings":""}