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.
Files changed (93) hide show
  1. package/dist/Components/Button/Button.d.ts +2 -2
  2. package/dist/Components/Button/Button.js +3 -3
  3. package/dist/Components/Button/Button.styles.js +29 -3
  4. package/dist/Components/Button/ButtonProps.d.ts +6 -1
  5. package/dist/Components/Card/Card.d.ts +1 -1
  6. package/dist/Components/Card/Card.js +2 -2
  7. package/dist/Components/Card/CardProps.d.ts +0 -1
  8. package/dist/Components/Checkbox/Checkbox.js +1 -1
  9. package/dist/Components/FileUpload/FileUpload.js +3 -2
  10. package/dist/Components/FileUpload/FileUploadProps.d.ts +3 -1
  11. package/dist/Components/FileUpload/constants.js +1 -0
  12. package/dist/Components/FilterSidebar/FilterSidebar.js +2 -2
  13. package/dist/Components/Input/TextInput.styles.js +0 -1
  14. package/dist/Components/InputTextArea/InputTextArea.style.js +0 -1
  15. package/dist/Components/NoteTextArea/NoteTextArea.js +0 -2
  16. package/dist/Components/NumberInput/NumberInput.js +3 -1
  17. package/dist/Components/NumberInput/NumberInput.styles.js +0 -1
  18. package/dist/Components/Primitives/Primitives.d.ts +6 -0
  19. package/dist/Components/Primitives/Primitives.js +113 -0
  20. package/dist/Components/RadioButton/RadioButton.js +1 -1
  21. package/dist/Components/Search/Search.js +2 -2
  22. package/dist/Components/Select/Select.d.ts +1 -1
  23. package/dist/Components/Select/Select.js +4 -2
  24. package/dist/Components/Select/Select.styles.js +0 -1
  25. package/dist/Components/Select/SelectProps.d.ts +3 -0
  26. package/dist/Components/SelectV2/SelectV2.js +1 -1
  27. package/dist/Components/SideBar/SideBar.js +1 -1
  28. package/dist/Components/Table/Table.d.ts +1 -1
  29. package/dist/Components/Table/Table.js +8 -4
  30. package/dist/Components/Table/TableProps.d.ts +4 -0
  31. package/dist/Components/Table/components/Pagination.js +1 -1
  32. package/dist/Components/Table/components/TableBody.js +40 -11
  33. package/dist/Components/Table/components/TableHeader.js +21 -8
  34. package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
  35. package/dist/Components/Table/variants/TableVariantContext.js +17 -0
  36. package/dist/Components/Table/variants/classic.d.ts +6 -0
  37. package/dist/Components/Table/variants/classic.js +47 -0
  38. package/dist/Components/Table/variants/index.d.ts +7 -0
  39. package/dist/Components/Table/variants/index.js +27 -0
  40. package/dist/Components/Table/variants/pillInk.d.ts +6 -0
  41. package/dist/Components/Table/variants/pillInk.js +21 -0
  42. package/dist/Components/Table/variants/studio.d.ts +6 -0
  43. package/dist/Components/Table/variants/studio.js +50 -0
  44. package/dist/Components/Table/variants/tokens.d.ts +49 -0
  45. package/dist/Components/Table/variants/tokens.js +2 -0
  46. package/dist/Theme/chakra/Menu.styles.d.ts +3 -1
  47. package/dist/Theme/chakra/Menu.styles.js +5 -3
  48. package/dist/Theme/chakra/Popover.styles.d.ts +3 -1
  49. package/dist/Theme/chakra/Popover.styles.js +4 -2
  50. package/dist/Theme/chakra/componentStyles.d.ts +8 -4
  51. package/dist/Theme/tokens/builders/outlineRung.d.ts +27 -3
  52. package/dist/Theme/tokens/builders/outlineRung.js +55 -5
  53. package/dist/Theme/tokens/builders/placeholderInk.d.ts +5 -5
  54. package/dist/Theme/tokens/builders/placeholderInk.js +8 -6
  55. package/dist/Theme/tokens/builders/surfaceRungs.js +12 -1
  56. package/dist/esm/Components/Button/Button.js +4 -4
  57. package/dist/esm/Components/Button/Button.styles.js +29 -3
  58. package/dist/esm/Components/Card/Card.js +2 -2
  59. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  60. package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
  61. package/dist/esm/Components/FileUpload/constants.js +1 -0
  62. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +2 -2
  63. package/dist/esm/Components/Input/TextInput.styles.js +0 -1
  64. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +0 -1
  65. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +0 -2
  66. package/dist/esm/Components/NumberInput/NumberInput.js +4 -2
  67. package/dist/esm/Components/NumberInput/NumberInput.styles.js +0 -1
  68. package/dist/esm/Components/Primitives/Primitives.js +6 -0
  69. package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
  70. package/dist/esm/Components/Search/Search.js +2 -2
  71. package/dist/esm/Components/Select/Select.js +5 -3
  72. package/dist/esm/Components/Select/Select.styles.js +0 -1
  73. package/dist/esm/Components/SelectV2/SelectV2.js +1 -1
  74. package/dist/esm/Components/SideBar/SideBar.js +1 -1
  75. package/dist/esm/Components/Table/Table.js +8 -4
  76. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  77. package/dist/esm/Components/Table/components/TableBody.js +41 -12
  78. package/dist/esm/Components/Table/components/TableHeader.js +21 -8
  79. package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
  80. package/dist/esm/Components/Table/variants/classic.js +43 -0
  81. package/dist/esm/Components/Table/variants/index.js +9 -0
  82. package/dist/esm/Components/Table/variants/pillInk.js +18 -0
  83. package/dist/esm/Components/Table/variants/studio.js +46 -0
  84. package/dist/esm/Components/Table/variants/tokens.js +1 -0
  85. package/dist/esm/Theme/chakra/Menu.styles.js +5 -3
  86. package/dist/esm/Theme/chakra/Popover.styles.js +4 -2
  87. package/dist/esm/Theme/tokens/builders/outlineRung.js +52 -4
  88. package/dist/esm/Theme/tokens/builders/placeholderInk.js +9 -7
  89. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +13 -2
  90. package/dist/esm/index.js +1 -0
  91. package/dist/index.d.ts +2 -1
  92. package/dist/index.js +4 -0
  93. 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 rung the brand authored, guaranteed to clear `PLACEHOLDER_TEXT`
6
- * on every surface a field can land on.
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
- * It does not walk the rung toward AA in either direction. Lifting it to 4.5 made an empty field
9
- * read as one already typed into; softening it back down again undershot on the next surface.
10
- * The published library ships this rung untouched and that is the look being matched.
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 liftToContrast(rung, hardest, PLACEHOLDER_TEXT);
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
- boxborder: { ...palette.boxborder, 500: lift(palette.boxborder[500], AA_NON_TEXT) },
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.4.2-beta.9",
3
+ "version": "2.4.2",
4
4
  "description": "React component library for Pixelize apps: themeable Chakra-based components, design tokens and light/dark brand theming.",
5
5
  "keywords": [
6
6
  "react",