@assure-one/design-system 1.38.0 → 1.39.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 +15 -0
- package/codemods/README.md +54 -20
- package/codemods/lib/entry-map.mjs +315 -0
- package/codemods/lib/registry.mjs +1 -0
- package/codemods/transforms/cm-01-entry-imports.mjs +202 -0
- package/dist/brand-theme-B6rem2II.d.ts +59 -0
- package/dist/css/components.css +1 -1
- package/dist/css/tokens.css +6 -6
- package/dist/design-system-provider-BM_F1C13.d.ts +143 -0
- package/dist/icons/index.d.ts +441 -3
- package/dist/icons/index.js.map +1 -1
- package/dist/index-BAAuIQqP.d.ts +2579 -0
- package/dist/index-DxBjmBBp.d.ts +1038 -0
- package/dist/index.d.ts +48 -3476
- package/dist/index.js +5997 -5899
- package/dist/index.js.map +1 -1
- package/dist/legacy/index.d.ts +9 -0
- package/dist/legacy/index.js +3 -0
- package/dist/legacy/index.js.map +1 -0
- package/dist/next/index.d.ts +2 -1
- package/dist/reference-BkDbrPIB.d.ts +310 -0
- package/dist/styles.css +1 -1
- package/dist/suite/index.d.ts +4 -0
- package/dist/suite/index.js +3 -0
- package/dist/suite/index.js.map +1 -0
- package/dist/{system-CyAVbHhM.d.ts → system-DfJIVBlJ.d.ts} +1 -310
- package/dist/tokens/index.d.ts +3 -61
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/index.js.map +1 -1
- package/dist/{design-system-provider-B5MbvbRc.d.ts → types-k_kjwipx.d.ts} +9 -142
- package/dist/vocab-DornLJbW.d.ts +76 -0
- package/docs/components.md +27 -25
- package/docs/components.registry.json +16 -2
- package/package.json +14 -3
- package/public/brand/assure-audit-mark.svg +6 -0
- package/public/brand/assure-audit.svg +8 -0
- package/public/brand/assure-books-mark.svg +6 -0
- package/public/brand/assure-books.svg +8 -0
- package/public/brand/assure-pro-mark.svg +6 -0
- package/public/brand/assure-pro.svg +8 -0
- package/public/brand/assure-tax-mark.svg +6 -0
- package/public/brand/assure-tax.svg +8 -0
- package/public/brand/mycpe-teams-mark.svg +36 -0
- package/public/brand/mycpe-teams.svg +66 -0
- package/dist/index-vztxMSfl.d.ts +0 -512
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The seed a host supplies per tenant.
|
|
3
|
+
*
|
|
4
|
+
* @experimental Gated by decision D7.
|
|
5
|
+
*/
|
|
6
|
+
interface BrandThemeSeed {
|
|
7
|
+
/**
|
|
8
|
+
* The brand fill, as `#rgb` or `#rrggbb`. Drives the `action.brand` family,
|
|
9
|
+
* the focus ring and the brand gradient.
|
|
10
|
+
*/
|
|
11
|
+
brand: string;
|
|
12
|
+
/**
|
|
13
|
+
* An optional second hue for the `action.accent` family, as `#rgb` or
|
|
14
|
+
* `#rrggbb`. `undefined` or `null` means "the same as `brand`", which is what
|
|
15
|
+
* the built-in `[data-ds-brand]` scopes do.
|
|
16
|
+
*/
|
|
17
|
+
accent?: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** Every custom property `createBrandTheme()` sets, in output order. */
|
|
20
|
+
declare const BRAND_THEME_PROPERTIES: readonly ["--ds-color-action-brand-bg", "--ds-color-action-brand-bg-hover", "--ds-color-action-brand-bg-active", "--ds-color-action-brand-bg-disabled", "--ds-color-action-brand-subtle-bg", "--ds-color-action-brand-subtle-bg-hover", "--ds-color-action-brand-subtle-bg-active", "--ds-color-action-brand-border", "--ds-color-action-brand-ring", "--ds-color-action-brand-fg", "--ds-color-action-accent-bg", "--ds-color-action-accent-bg-strong", "--ds-color-action-accent-bg-hover", "--ds-color-action-accent-bg-active", "--ds-color-action-accent-subtle-bg", "--ds-color-action-accent-ring", "--ds-color-action-accent-fg", "--ds-color-border-focus", "--ds-focus-ring-color", "--ds-focus-ring-border", "--ds-gradient-brand", "--ds-compat-color-brand-soft", "--ds-compat-color-brand-soft-foreground"];
|
|
21
|
+
/** One of the custom properties `createBrandTheme()` sets. */
|
|
22
|
+
type BrandThemeProperty = (typeof BRAND_THEME_PROPERTIES)[number];
|
|
23
|
+
/**
|
|
24
|
+
* The style object `createBrandTheme()` returns: every property of
|
|
25
|
+
* {@link BRAND_THEME_PROPERTIES} with a CSS value.
|
|
26
|
+
*
|
|
27
|
+
* React types `style` as `CSSProperties`, which has no index signature for
|
|
28
|
+
* custom properties, so spread it or cast it at the call site:
|
|
29
|
+
* `style={{ ...createBrandTheme(seed) }}`.
|
|
30
|
+
*
|
|
31
|
+
* @experimental Gated by decision D7.
|
|
32
|
+
*/
|
|
33
|
+
type BrandTheme = {
|
|
34
|
+
readonly [P in BrandThemeProperty]: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Turn a tenant's colours into the design system's brand and accent tokens.
|
|
38
|
+
*
|
|
39
|
+
* ```tsx
|
|
40
|
+
* const theme = createBrandTheme({ brand: firm.primaryColor, accent: firm.accentColor });
|
|
41
|
+
* return <div style={{ ...theme }}>{children}</div>;
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* Apply it to the element that scopes the brand — `<body>` for a whole-tenant
|
|
45
|
+
* theme, a wrapper for a preview. The properties are the same ones a built-in
|
|
46
|
+
* `[data-ds-brand]` scope declares, so anything reading them (every design
|
|
47
|
+
* system component, and any application CSS reading `--ds-*`) follows.
|
|
48
|
+
*
|
|
49
|
+
* @param seed - `brand`, and optionally `accent` (decision D7).
|
|
50
|
+
* @returns A frozen object of custom property names to CSS values.
|
|
51
|
+
* @throws TypeError when the seed is not an object, carries an unknown key, or
|
|
52
|
+
* a colour is missing or not `#rgb`/`#rrggbb`.
|
|
53
|
+
*
|
|
54
|
+
* @experimental Gated by decision D7. The property set may grow, and the seed
|
|
55
|
+
* shape may change, until D7 is resolved.
|
|
56
|
+
*/
|
|
57
|
+
declare function createBrandTheme(seed: BrandThemeSeed): BrandTheme;
|
|
58
|
+
|
|
59
|
+
export { BRAND_THEME_PROPERTIES as B, type BrandTheme as a, type BrandThemeProperty as b, type BrandThemeSeed as c, createBrandTheme as d };
|