pixelize-design-library 2.4.2-beta.9 → 2.4.2
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/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +3 -3
- package/dist/Components/Button/Button.styles.js +29 -3
- package/dist/Components/Button/ButtonProps.d.ts +6 -1
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +0 -1
- package/dist/Components/Checkbox/Checkbox.js +1 -1
- package/dist/Components/FileUpload/FileUpload.js +3 -2
- package/dist/Components/FileUpload/FileUploadProps.d.ts +3 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +2 -2
- package/dist/Components/Input/TextInput.styles.js +0 -1
- package/dist/Components/InputTextArea/InputTextArea.style.js +0 -1
- package/dist/Components/NoteTextArea/NoteTextArea.js +0 -2
- package/dist/Components/NumberInput/NumberInput.js +3 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +0 -1
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/RadioButton/RadioButton.js +1 -1
- package/dist/Components/Search/Search.js +2 -2
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +4 -2
- package/dist/Components/Select/Select.styles.js +0 -1
- package/dist/Components/Select/SelectProps.d.ts +3 -0
- package/dist/Components/SelectV2/SelectV2.js +1 -1
- package/dist/Components/SideBar/SideBar.js +1 -1
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Table/Table.js +8 -4
- package/dist/Components/Table/TableProps.d.ts +4 -0
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableBody.js +40 -11
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Theme/chakra/Menu.styles.d.ts +3 -1
- package/dist/Theme/chakra/Menu.styles.js +5 -3
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -1
- package/dist/Theme/chakra/Popover.styles.js +4 -2
- package/dist/Theme/chakra/componentStyles.d.ts +8 -4
- package/dist/Theme/tokens/builders/outlineRung.d.ts +27 -3
- package/dist/Theme/tokens/builders/outlineRung.js +55 -5
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +5 -5
- package/dist/Theme/tokens/builders/placeholderInk.js +8 -6
- package/dist/Theme/tokens/builders/surfaceRungs.js +12 -1
- package/dist/esm/Components/Button/Button.js +4 -4
- package/dist/esm/Components/Button/Button.styles.js +29 -3
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +2 -2
- package/dist/esm/Components/Input/TextInput.styles.js +0 -1
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +0 -1
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +0 -2
- package/dist/esm/Components/NumberInput/NumberInput.js +4 -2
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +0 -1
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
- package/dist/esm/Components/Search/Search.js +2 -2
- package/dist/esm/Components/Select/Select.js +5 -3
- package/dist/esm/Components/Select/Select.styles.js +0 -1
- package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
- package/dist/esm/Components/SideBar/SideBar.js +1 -1
- package/dist/esm/Components/Table/Table.js +8 -4
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableBody.js +41 -12
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Theme/chakra/Menu.styles.js +5 -3
- package/dist/esm/Theme/chakra/Popover.styles.js +4 -2
- package/dist/esm/Theme/tokens/builders/outlineRung.js +52 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +9 -7
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +13 -2
- package/dist/esm/index.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { contrastRatio } from "./color.js";
|
|
2
|
-
import { liftToContrast } from "./outlineRung.js";
|
|
2
|
+
import { liftToContrast, softenToContrast } from "./outlineRung.js";
|
|
3
3
|
import { PLACEHOLDER_TEXT } from "./surfaceRungs.js";
|
|
4
4
|
/**
|
|
5
|
-
* The hint ink for a field: the
|
|
6
|
-
*
|
|
5
|
+
* The hint ink for a field: the brand's authored rung settled onto `PLACEHOLDER_TEXT` against the
|
|
6
|
+
* hardest surface a field can land on — lifted when it falls short, softened when it overshoots.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Settled rather than floored because the authored rungs measured 3.96-7.73:1 across the brands,
|
|
9
|
+
* and anything much past the floor reads as a field already typed into. The floor is the look:
|
|
10
|
+
* one hint weight for every brand in both modes, instead of a per-brand accident.
|
|
11
11
|
*/
|
|
12
12
|
export const placeholderInkOn = (palette, surfaces) => {
|
|
13
13
|
const rung = palette.placeholder[500];
|
|
14
14
|
const hardest = surfaces.reduce((worst, s) => contrastRatio(rung, s) < contrastRatio(rung, worst) ? s : worst);
|
|
15
|
-
return
|
|
15
|
+
return contrastRatio(rung, hardest) > PLACEHOLDER_TEXT
|
|
16
|
+
? softenToContrast(rung, hardest, PLACEHOLDER_TEXT)
|
|
17
|
+
: liftToContrast(rung, hardest, PLACEHOLDER_TEXT);
|
|
16
18
|
};
|
|
17
19
|
/**
|
|
18
20
|
* Every surface an ENABLED field renders on. Disabled fields are deliberately absent — 1.4.3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { contrastRatio } from "./color.js";
|
|
2
|
-
import { liftToContrast, AA_NON_TEXT } from "./outlineRung.js";
|
|
2
|
+
import { liftToContrast, settleAcross, ruleInk, AA_NON_TEXT, CHROME_BORDER, CHROME_RULE } from "./outlineRung.js";
|
|
3
3
|
import { AA_NORMAL_TEXT, pickAccentText } from "./accentText.js";
|
|
4
4
|
import { SEMANTIC_TONES } from "./semanticText.js";
|
|
5
5
|
/**
|
|
@@ -18,6 +18,8 @@ export const hardestSurface = (ink, surfaces) => surfaces.reduce((worst, s) => c
|
|
|
18
18
|
export function withSurfaceRungs(palette) {
|
|
19
19
|
const surfaces = namedSurfaces(palette);
|
|
20
20
|
const lift = (ink, target) => liftToContrast(ink, hardestSurface(ink, surfaces), target);
|
|
21
|
+
const settle = (ink, target) => settleAcross(ink, surfaces, target);
|
|
22
|
+
const rule = (ink) => ruleInk(ink, [palette.backgroundColor.main, palette.background[50]], CHROME_RULE);
|
|
21
23
|
const semanticText = SEMANTIC_TONES.reduce((acc, tone) => {
|
|
22
24
|
acc[tone] = lift(palette.semanticText[tone], AA_NORMAL_TEXT);
|
|
23
25
|
return acc;
|
|
@@ -32,6 +34,15 @@ export function withSurfaceRungs(palette) {
|
|
|
32
34
|
// `placeholder` is deliberately absent: the brand authors that rung and the published
|
|
33
35
|
// library ships it untouched. Its floor is enforced in `placeholderInk`, against the
|
|
34
36
|
// surfaces a FIELD renders on — not `table.hover`, which no field sits on.
|
|
35
|
-
|
|
37
|
+
// Settled, not lifted: this rung already passed through `withOutlineRung`, and lifting it
|
|
38
|
+
// again here to AA_NON_TEXT is what shipped 3.85-4.95:1 outlines. See CHROME_BORDER.
|
|
39
|
+
boxborder: {
|
|
40
|
+
...palette.boxborder,
|
|
41
|
+
200: rule(palette.boxborder[200]),
|
|
42
|
+
500: settle(palette.boxborder[500], CHROME_BORDER),
|
|
43
|
+
},
|
|
44
|
+
// The 200 rung of both ramps is the same job under two names; settle them together or an
|
|
45
|
+
// app picking `border` gets a heavier rule than one picking `boxborder`.
|
|
46
|
+
border: { ...palette.border, 200: rule(palette.border[200]) },
|
|
36
47
|
};
|
|
37
48
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -139,3 +139,4 @@ export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexTo
|
|
|
139
139
|
export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar.js";
|
|
140
140
|
export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk.js";
|
|
141
141
|
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk.js";
|
|
142
|
+
export * from "./Components/Primitives/Primitives.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export type { PlanBadgeInput, PlanBadgeResult } from "./Utils/planBadge";
|
|
|
124
124
|
export type { PlanExpiryInput } from "./Utils/planExpiry";
|
|
125
125
|
export type { LimitReachedModalProps, LimitKind, } from "./Components/LimitReachedModal/LimitReachedModalProps";
|
|
126
126
|
export type { AccountHandoffConfig, AccountHandoff, AccountHandoffLinkOptions, AccountHandoffUsersOptions, ResolveReturnUrlOptions, } from "./Utils/accountHandoff";
|
|
127
|
-
export type { TableProps, TableHeaderProps, TableColumnType, TableDensity, TableEmptyState, TableRenderGroup, HeaderActionsProps, ColumnSortingProps, ExportOption, DataObject, FilterValues, } from "./Components/Table/TableProps";
|
|
127
|
+
export type { TableProps, TableHeaderProps, TableColumnType, TableDensity, TableVariant, TableEmptyState, TableRenderGroup, HeaderActionsProps, ColumnSortingProps, ExportOption, DataObject, FilterValues, } from "./Components/Table/TableProps";
|
|
128
128
|
export type { ButtonProps } from "./Components/Button/ButtonProps";
|
|
129
129
|
export type { CardProps } from "./Components/Card/CardProps";
|
|
130
130
|
export type { ProfileCardProps, ProfileCardVariant, ProfileCardVariantLegacy, } from "./Components/ProfileCard/ProfileCardProps";
|
|
@@ -164,3 +164,4 @@ export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/
|
|
|
164
164
|
export type { FieldSurfaces } from "./Theme/tokens/builders/placeholderInk";
|
|
165
165
|
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk";
|
|
166
166
|
export type { Gradient, ResolvedGradient, } from "./Theme/tokens/builders/gradientInk";
|
|
167
|
+
export * from "./Components/Primitives/Primitives";
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
return result;
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
+
};
|
|
36
39
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
40
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
41
|
};
|
|
@@ -338,3 +341,4 @@ var gradientInk_1 = require("./Theme/tokens/builders/gradientInk");
|
|
|
338
341
|
Object.defineProperty(exports, "resolveGradient", { enumerable: true, get: function () { return gradientInk_1.resolveGradient; } });
|
|
339
342
|
Object.defineProperty(exports, "gradientCss", { enumerable: true, get: function () { return gradientInk_1.gradientCss; } });
|
|
340
343
|
Object.defineProperty(exports, "inkSafeGradientToken", { enumerable: true, get: function () { return gradientInk_1.inkSafeGradient; } });
|
|
344
|
+
__exportStar(require("./Components/Primitives/Primitives"), exports);
|
package/package.json
CHANGED