@veevarts/design-system 1.17.0-beta.6 → 1.17.0-beta.7
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/index.cjs +10 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4393 -4015
- package/dist/patterns/AdminTable/AdminTable.d.ts +42 -0
- package/dist/patterns/AdminTable/index.d.ts +3 -0
- package/dist/patterns/AdminTable/styles.d.ts +34 -0
- package/dist/patterns/AdminTextField/AdminTextField.d.ts +39 -0
- package/dist/patterns/AdminTextField/index.d.ts +3 -0
- package/dist/patterns/AdminTextField/styles.d.ts +35 -0
- package/dist/patterns/AdminToolbar/AdminToolbar.d.ts +18 -0
- package/dist/patterns/AdminToolbar/index.d.ts +2 -0
- package/dist/patterns/DimensionChip/index.d.ts +13 -2
- package/dist/patterns/InstallmentFundAssignment/InstallmentFundAssignment.d.ts +1 -1
- package/dist/patterns/InstallmentFundAssignment/types.d.ts +1 -0
- package/dist/patterns/InstallmentSchedule/InstallmentTable.d.ts +1 -1
- package/dist/patterns/InstallmentSchedule/types.d.ts +12 -0
- package/dist/patterns/{DimensionChip/DimensionChip.d.ts → KeyValueChip/KeyValueChip.d.ts} +4 -4
- package/dist/patterns/KeyValueChip/index.d.ts +2 -0
- package/dist/patterns/PaginationSummary/PaginationSummary.d.ts +26 -0
- package/dist/patterns/PaginationSummary/index.d.ts +3 -0
- package/dist/patterns/PaginationSummary/page-range.d.ts +19 -0
- package/dist/patterns/PickerRow/PickerRow.d.ts +27 -0
- package/dist/patterns/PickerRow/index.d.ts +2 -0
- package/dist/patterns/RowActions/RowActions.d.ts +17 -0
- package/dist/patterns/RowActions/index.d.ts +2 -0
- package/dist/patterns/TableSkeleton/TableSkeleton.d.ts +32 -0
- package/dist/patterns/TableSkeleton/index.d.ts +2 -0
- package/dist/patterns/UnderlineTabs/UnderlineTabs.d.ts +18 -0
- package/dist/patterns/UnderlineTabs/index.d.ts +2 -0
- package/dist/patterns/grid-columns.d.ts +1 -1
- package/dist/patterns/index.d.ts +18 -2
- package/dist/tailwind/index.d.ts +4 -0
- package/dist/tailwind/index.js +68 -1
- package/dist/tokens/admin-surface.d.ts +58 -0
- package/dist/tokens/index.d.ts +2 -0
- package/package.json +1 -1
- package/dist/patterns/CheckboxCardGroup/CheckboxCardGroup.d.ts +0 -53
- package/dist/patterns/CheckboxCardGroup/index.d.ts +0 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The admin-surface palette, as CSS custom properties.
|
|
3
|
+
*
|
|
4
|
+
* WHY A SECOND OUTPUT FORMAT. The rest of the Design System reaches its colours
|
|
5
|
+
* through Tailwind utilities, which only works when the consuming app scans the
|
|
6
|
+
* DS `dist` in its Tailwind `content` globs. The domain packages that render
|
|
7
|
+
* back-office screens cannot rely on that: `@veevart/accounting` is absent from
|
|
8
|
+
* the portal's globs, so any utility class written there is purged from the
|
|
9
|
+
* bundle, and the Salesforce Canvas embed builds its CSS separately again. Those
|
|
10
|
+
* surfaces therefore style through inline styles over a scoped `<style>` block,
|
|
11
|
+
* and what they need from us is custom properties, not classes.
|
|
12
|
+
*
|
|
13
|
+
* The values come from `colors` — the same object that feeds the Tailwind
|
|
14
|
+
* preset. That is the whole point: before this existed, the admin palette lived
|
|
15
|
+
* inside `@veevart/accounting` as a hand-written block, got copied to a second
|
|
16
|
+
* screen, then a third and a fourth, and had already lost a token in one copy
|
|
17
|
+
* and forked `warning` away from ours. A palette owned by a domain package is a
|
|
18
|
+
* palette that forks.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* <style dangerouslySetInnerHTML={{ __html: adminSurfaceCss() }} />
|
|
22
|
+
* <div className="acct">…</div>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
/** Token name → value. Exported so tests and tooling can assert on it directly. */
|
|
26
|
+
export declare const adminSurfaceTokens: Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Pairs whose contrast is NOT yet at WCAG AA, with the reason each is tolerated.
|
|
29
|
+
*
|
|
30
|
+
* `--info` on its tint measures 4.45:1 against the 4.5 threshold. It predates
|
|
31
|
+
* this module and no one has agreed to change it; raising the text to the
|
|
32
|
+
* scale's 700 would fix it the same way `--warn` was fixed, but that is a
|
|
33
|
+
* separate design call on a separate set of screens. Listed here rather than
|
|
34
|
+
* left to be rediscovered, so the guard below stays meaningful for the rest.
|
|
35
|
+
*/
|
|
36
|
+
export declare const KNOWN_CONTRAST_DEBT: readonly ["--info"];
|
|
37
|
+
/**
|
|
38
|
+
* The same palette as a Tailwind colour scale, namespaced under `acct`.
|
|
39
|
+
*
|
|
40
|
+
* This is what the admin primitives actually style with — `text-acct-ink`,
|
|
41
|
+
* `bg-acct-surface`, `border-acct-hair`. Feeding it into the preset from the
|
|
42
|
+
* same object as {@link adminSurfaceTokens} is what keeps the utility and the
|
|
43
|
+
* custom property from ever disagreeing.
|
|
44
|
+
*
|
|
45
|
+
* Namespaced deliberately. Several of these names (`border`, `page`, `info`)
|
|
46
|
+
* would collide with Tailwind's own utility grammar unprefixed: a colour
|
|
47
|
+
* literally called `border` produces `border-border`, and `text-info` would
|
|
48
|
+
* read as a size to anyone skimming.
|
|
49
|
+
*/
|
|
50
|
+
export declare const adminSurfaceTailwindColors: Record<string, string>;
|
|
51
|
+
export interface AdminSurfaceCssOptions {
|
|
52
|
+
/** Class the properties are scoped to. Defaults to `.acct`. */
|
|
53
|
+
scope?: string;
|
|
54
|
+
/** Base font stack for the surface. Pass `false` to leave typography alone. */
|
|
55
|
+
fontFamily?: string | false;
|
|
56
|
+
}
|
|
57
|
+
/** The palette as a `<style>`-ready rule. */
|
|
58
|
+
export declare function adminSurfaceCss({ scope, fontFamily, }?: AdminSurfaceCssOptions): string;
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { colors } from './colors';
|
|
2
2
|
export { spacing } from './spacing';
|
|
3
3
|
export { typography } from './typography';
|
|
4
|
+
export { adminSurfaceCss, adminSurfaceTokens } from './admin-surface';
|
|
4
5
|
export type { ColorToken } from './colors';
|
|
6
|
+
export type { AdminSurfaceCssOptions } from './admin-surface';
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export interface CheckboxCardOption {
|
|
3
|
-
/** Stable identifier surfaced through `onChange`. */
|
|
4
|
-
key: string;
|
|
5
|
-
/** Visible label. */
|
|
6
|
-
label: string;
|
|
7
|
-
/** Optional secondary line under the label. */
|
|
8
|
-
description?: string;
|
|
9
|
-
/** Iconify name (`'solar:ticket-outline'`) or a custom node. */
|
|
10
|
-
icon?: string | React.ReactNode;
|
|
11
|
-
/** Disable just this card. */
|
|
12
|
-
isDisabled?: boolean;
|
|
13
|
-
/** Override per-card test id; defaults to `${dataTestId}-${key}`. */
|
|
14
|
-
'data-testid'?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface CheckboxCardGroupClassNames {
|
|
17
|
-
base?: string;
|
|
18
|
-
grid?: string;
|
|
19
|
-
card?: string;
|
|
20
|
-
hint?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface CheckboxCardGroupProps {
|
|
23
|
-
/** Options to render in order. */
|
|
24
|
-
options: readonly CheckboxCardOption[];
|
|
25
|
-
/** Currently selected option keys. */
|
|
26
|
-
selectedKeys: readonly string[];
|
|
27
|
-
/** Fires with the next full selection whenever a card is toggled. Keys are emitted in the original option order (not selection order); any selected key not present in `options` is preserved. */
|
|
28
|
-
onChange: (keys: string[]) => void;
|
|
29
|
-
/** Optional heading rendered above the grid (labels the group). */
|
|
30
|
-
heading?: string;
|
|
31
|
-
/** `aria-label` for the group when `heading` is omitted. Default `'Select options'`. */
|
|
32
|
-
ariaLabel?: string;
|
|
33
|
-
/** Grid columns on >= sm. Default `2`. */
|
|
34
|
-
columnsDesktop?: 2 | 3 | 4;
|
|
35
|
-
/** Grid columns on mobile. Default `1`. */
|
|
36
|
-
columnsMobile?: 1 | 2;
|
|
37
|
-
/**
|
|
38
|
-
* Minimum number of selections. When set, the group auto-derives its
|
|
39
|
-
* invalid state (`selectedKeys.length < minSelected`) and a default hint,
|
|
40
|
-
* unless `isInvalid` / `hint` are explicitly supplied.
|
|
41
|
-
*/
|
|
42
|
-
minSelected?: number;
|
|
43
|
-
/** Helper text under the grid. Overrides the `minSelected` default hint. */
|
|
44
|
-
hint?: React.ReactNode;
|
|
45
|
-
/** Error styling + `aria-invalid`. Overrides the `minSelected`-derived state. */
|
|
46
|
-
isInvalid?: boolean;
|
|
47
|
-
/** Disable every card. */
|
|
48
|
-
isDisabled?: boolean;
|
|
49
|
-
className?: string;
|
|
50
|
-
classNames?: CheckboxCardGroupClassNames;
|
|
51
|
-
'data-testid'?: string;
|
|
52
|
-
}
|
|
53
|
-
export declare const CheckboxCardGroup: React.FC<CheckboxCardGroupProps>;
|