@payfit/unity-themes 2.68.15 → 2.68.16
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/css/unity.css +84 -556
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/scripts/actions/compose-multi-theme.d.ts +4 -4
- package/dist/esm/scripts/style-dictionary-config.d.ts +1 -1
- package/dist/esm/types.d.ts +2 -0
- package/package.json +1 -2
- package/skills/unity-themes/SKILL.md +2 -2
- package/src/agent-references/tokens-catalog.json +691 -4719
- package/tokens/compact/spacings.json +55 -0
- package/dist/esm/components/unity-theme-provider.d.ts +0 -25
- package/dist/esm/components/unity-theme-provider.js +0 -30
- package/dist/esm/components/unity-theme-provider.test.d.ts +0 -1
- package/tokens/legacy/colors.json +0 -1400
- package/tokens/legacy/text.json +0 -14
- package/tokens/legacy/typography.json +0 -329
- package/tokens/rebrand/gradients.json +0 -22
- package/tokens/rebrand/radii.json +0 -21
- package/tokens/rebrand/shadows.json +0 -81
- /package/tokens/{rebrand → default}/colors.json +0 -0
- /package/tokens/{legacy → default}/gradients.json +0 -0
- /package/tokens/{legacy → default}/radii.json +0 -0
- /package/tokens/{legacy → default}/shadows.json +0 -0
- /package/tokens/{rebrand → default}/text.json +0 -0
- /package/tokens/{rebrand → default}/typography.json +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spacing": {
|
|
3
|
+
"$type": "dimension",
|
|
4
|
+
"$description": "Compact spacing scale for dense tooling surfaces",
|
|
5
|
+
"base": {
|
|
6
|
+
"$value": "6px",
|
|
7
|
+
"$description": "Compact base spacing value"
|
|
8
|
+
},
|
|
9
|
+
"0": {
|
|
10
|
+
"$value": 0
|
|
11
|
+
},
|
|
12
|
+
"25": {
|
|
13
|
+
"$value": "1.5px"
|
|
14
|
+
},
|
|
15
|
+
"50": {
|
|
16
|
+
"$value": "3px"
|
|
17
|
+
},
|
|
18
|
+
"75": {
|
|
19
|
+
"$value": "4.5px"
|
|
20
|
+
},
|
|
21
|
+
"100": {
|
|
22
|
+
"$value": "6px"
|
|
23
|
+
},
|
|
24
|
+
"125": {
|
|
25
|
+
"$value": "7.5px"
|
|
26
|
+
},
|
|
27
|
+
"150": {
|
|
28
|
+
"$value": "9px"
|
|
29
|
+
},
|
|
30
|
+
"200": {
|
|
31
|
+
"$value": "12px"
|
|
32
|
+
},
|
|
33
|
+
"250": {
|
|
34
|
+
"$value": "15px"
|
|
35
|
+
},
|
|
36
|
+
"300": {
|
|
37
|
+
"$value": "18px"
|
|
38
|
+
},
|
|
39
|
+
"400": {
|
|
40
|
+
"$value": "24px"
|
|
41
|
+
},
|
|
42
|
+
"500": {
|
|
43
|
+
"$value": "30px"
|
|
44
|
+
},
|
|
45
|
+
"600": {
|
|
46
|
+
"$value": "36px"
|
|
47
|
+
},
|
|
48
|
+
"800": {
|
|
49
|
+
"$value": "48px"
|
|
50
|
+
},
|
|
51
|
+
"1000": {
|
|
52
|
+
"$value": "60px"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, RefObject } from 'react';
|
|
2
|
-
export type UnityTheme = 'legacy' | 'rebrand';
|
|
3
|
-
interface UnityThemeContextValue {
|
|
4
|
-
theme: UnityTheme;
|
|
5
|
-
setTheme: (theme: UnityTheme) => void;
|
|
6
|
-
}
|
|
7
|
-
export interface UnityThemeProviderProps {
|
|
8
|
-
/** Initial theme. Can be changed at runtime via `useUnityTheme().setTheme`. */
|
|
9
|
-
theme?: UnityTheme;
|
|
10
|
-
/**
|
|
11
|
-
* Element on which `data-uy-theme` is set.
|
|
12
|
-
* - `undefined` (default): uses `document.documentElement` (`<html>`)
|
|
13
|
-
* - A React ref: uses the referenced element
|
|
14
|
-
* - A CSS selector string: uses `document.querySelector(selector)`
|
|
15
|
-
* @default document.documentElement
|
|
16
|
-
*/
|
|
17
|
-
target?: RefObject<HTMLElement | null> | string;
|
|
18
|
-
}
|
|
19
|
-
export declare function UnityThemeProvider({ theme: initialTheme, target, children, }: PropsWithChildren<UnityThemeProviderProps>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
/**
|
|
21
|
-
* Returns the current theme and a setter to change it at runtime.
|
|
22
|
-
* Returns `"legacy"` with a no-op setter when used outside a provider.
|
|
23
|
-
*/
|
|
24
|
-
export declare function useUnityTheme(): UnityThemeContextValue;
|
|
25
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createContext as e, useContext as t, useEffect as n, useState as r } from "react";
|
|
2
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
//#region src/components/unity-theme-provider.tsx
|
|
4
|
-
var a = e({
|
|
5
|
-
theme: "legacy",
|
|
6
|
-
setTheme: () => {}
|
|
7
|
-
});
|
|
8
|
-
function o(e) {
|
|
9
|
-
return e === void 0 ? document.documentElement : typeof e == "string" ? document.querySelector(e) : e.current;
|
|
10
|
-
}
|
|
11
|
-
function s({ theme: e = "legacy", target: t, children: s }) {
|
|
12
|
-
let [c, l] = r(e);
|
|
13
|
-
return n(() => {
|
|
14
|
-
let e = o(t);
|
|
15
|
-
if (e) return e.dataset.uyTheme = c, () => {
|
|
16
|
-
delete e.dataset.uyTheme;
|
|
17
|
-
};
|
|
18
|
-
}, [c, t]), /* @__PURE__ */ i(a.Provider, {
|
|
19
|
-
value: {
|
|
20
|
-
theme: c,
|
|
21
|
-
setTheme: l
|
|
22
|
-
},
|
|
23
|
-
children: s
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function c() {
|
|
27
|
-
return t(a);
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
export { s as UnityThemeProvider, c as useUnityTheme };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|