@crisp-ui-kit/crisp 0.7.2 → 0.7.4

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 (58) hide show
  1. package/dist/cjs/components/avatar/avatar.recipe.js +0 -7
  2. package/dist/cjs/components/badge/badge.recipe.js +0 -8
  3. package/dist/cjs/components/button/button.recipe.js +0 -10
  4. package/dist/cjs/components/checkbox/checkbox.recipe.js +0 -6
  5. package/dist/cjs/components/datepicker/datepicker.recipe.js +22 -20
  6. package/dist/cjs/components/input/input.recipe.js +0 -1
  7. package/dist/cjs/components/kbd/kbd.recipe.js +0 -7
  8. package/dist/cjs/components/switch/switch.recipe.js +0 -1
  9. package/dist/cjs/components/wheelpicker/wheelpicker.recipe.js +0 -1
  10. package/dist/cjs/product/appshell/appshell.recipe.js +0 -1
  11. package/dist/cjs/product/command/command.recipe.js +0 -6
  12. package/dist/cjs/product/navitem/navitem.recipe.js +0 -8
  13. package/dist/cjs/product/recordpanel/recordpanel.recipe.js +0 -1
  14. package/dist/cjs/product/recordstable/recordstable.recipe.js +12 -8
  15. package/dist/cjs/product/sidebar/sidebar.recipe.js +0 -5
  16. package/dist/cjs/tokens/scale.js +6 -2
  17. package/dist/datepicker.css +17 -17
  18. package/dist/esm/components/avatar/avatar.recipe.js +0 -7
  19. package/dist/esm/components/badge/badge.recipe.js +0 -8
  20. package/dist/esm/components/button/button.recipe.js +0 -10
  21. package/dist/esm/components/checkbox/checkbox.recipe.js +0 -6
  22. package/dist/esm/components/datepicker/datepicker.recipe.js +22 -20
  23. package/dist/esm/components/input/input.recipe.js +0 -1
  24. package/dist/esm/components/kbd/kbd.recipe.js +0 -7
  25. package/dist/esm/components/switch/switch.recipe.js +0 -1
  26. package/dist/esm/components/wheelpicker/wheelpicker.recipe.js +0 -1
  27. package/dist/esm/product/appshell/appshell.recipe.js +0 -1
  28. package/dist/esm/product/command/command.recipe.js +0 -6
  29. package/dist/esm/product/navitem/navitem.recipe.js +0 -8
  30. package/dist/esm/product/recordpanel/recordpanel.recipe.js +0 -1
  31. package/dist/esm/product/recordstable/recordstable.recipe.js +12 -8
  32. package/dist/esm/product/sidebar/sidebar.recipe.js +0 -5
  33. package/dist/esm/tokens/scale.js +6 -2
  34. package/dist/native/tokens.js +2 -2
  35. package/dist/recordstable.css +12 -2
  36. package/dist/styles.css +1648 -1638
  37. package/dist/tokens.css +2 -2
  38. package/dist/tokens.json +2 -2
  39. package/dist/types/components/avatar/avatar.d.ts +0 -7
  40. package/dist/types/components/avatar/avatar.recipe.d.ts +0 -7
  41. package/dist/types/components/badge/badge.d.ts +0 -8
  42. package/dist/types/components/badge/badge.recipe.d.ts +0 -8
  43. package/dist/types/components/button/button.d.ts +0 -10
  44. package/dist/types/components/button/button.recipe.d.ts +0 -10
  45. package/dist/types/components/checkbox/checkbox.recipe.d.ts +0 -6
  46. package/dist/types/components/input/input.d.ts +0 -7
  47. package/dist/types/components/input/input.recipe.d.ts +0 -7
  48. package/dist/types/components/kbd/kbd.recipe.d.ts +0 -7
  49. package/dist/types/components/switch/switch.recipe.d.ts +0 -9
  50. package/dist/types/components/wheelpicker/wheelpicker.recipe.d.ts +0 -6
  51. package/dist/types/product/appshell/appshell.recipe.d.ts +0 -5
  52. package/dist/types/product/command/command.recipe.d.ts +0 -6
  53. package/dist/types/product/navitem/navitem.recipe.d.ts +0 -8
  54. package/dist/types/product/recordpanel/recordpanel.recipe.d.ts +0 -5
  55. package/dist/types/product/recordstable/recordstable.recipe.d.ts +0 -6
  56. package/dist/types/product/sidebar/sidebar.recipe.d.ts +0 -5
  57. package/dist/types/tokens/scale.d.ts +2 -2
  58. package/package.json +2 -1
@@ -31,12 +31,5 @@ const config = (0, core_1.defineRecipe)({
31
31
  });
32
32
  exports.avatarRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
33
33
  config,
34
- meta: {
35
- lg: {
36
- height: "24px",
37
- fontSize: "12px",
38
- fontWeight: "600",
39
- },
40
- },
41
34
  });
42
35
  exports.default = config;
@@ -56,13 +56,5 @@ const config = (0, core_1.defineRecipe)({
56
56
  });
57
57
  exports.badgeRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
58
58
  config,
59
- meta: {
60
- medium: {
61
- height: "20px",
62
- borderRadius: "6px",
63
- fontSize: "12px",
64
- fontWeight: "500",
65
- },
66
- },
67
59
  });
68
60
  exports.default = config;
@@ -44,15 +44,5 @@ const config = (0, core_1.defineRecipe)({
44
44
  });
45
45
  exports.buttonRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
46
46
  config,
47
- meta: {
48
- primary: {
49
- height: "28px",
50
- borderRadius: "8px",
51
- fontWeight: "500",
52
- fontSize: "14px",
53
- background: "rgb(38, 109, 240)",
54
- color: "rgb(255, 255, 255)",
55
- },
56
- },
57
47
  });
58
48
  exports.default = config;
@@ -24,11 +24,5 @@ const config = (0, core_1.defineRecipe)({
24
24
  });
25
25
  exports.checkboxRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
26
26
  config,
27
- meta: {
28
- box: {
29
- size: "16px",
30
- borderRadius: "6px",
31
- },
32
- },
33
27
  });
34
28
  exports.default = config;
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.datepickerRecipe = void 0;
4
4
  const core_1 = require("../../core");
5
5
  const tokens_1 = require("../../tokens");
6
- // seed-design's calendar, measured from @seed-design/css. The geometry is a
7
- // 48px rhythm: header, weekday row, month label and every date cell are all
8
- // x12 tall, and the 42px pill inside a cell is inset 3px from its top.
6
+ // seed-design's calendar structure on Attio's measured scale. The behaviour,
7
+ // markup and range model are seed's; every visual value is measured from Attio's
8
+ // own date picker (app.attio.com, task due-date field): a 32px day on a 34px
9
+ // pitch, an 8px-radius highlight rather than a circle, 14/20 medium numerals and
10
+ // the brand blue for the selection.
9
11
  //
10
12
  // The pill and the range bridge are ::before layers behind the numeral
11
13
  // (`isolation: isolate` on the cell keeps their z-index local), which is what
@@ -20,18 +22,18 @@ const config = (0, core_1.defineRecipe)({
20
22
  name: "datepicker",
21
23
  base: `
22
24
  position: relative; box-sizing: border-box; width: 100%; min-width: 0;
23
- font-family: ${tokens_1.contract.font.sans}; color: ${tokens_1.contract.fgNeutralMuted}; background: ${tokens_1.contract.bgSurface};
25
+ font-family: ${tokens_1.contract.font.sans}; color: ${tokens_1.contract.fgPrimary}; background: ${tokens_1.contract.bgSurface};
24
26
 
25
27
  & .datepicker-header {
26
28
  display: flex; align-items: center; justify-content: space-between;
27
- height: ${tokens_1.contract.size.calendarCell};
29
+ height: ${tokens_1.contract.size.menuRow};
28
30
  }
29
31
  & .datepicker-header-label {
30
32
  display: inline-flex; align-items: center; gap: ${tokens_1.contract.space["1"]};
31
33
  height: 100%; min-width: 0; border: 0; padding: 0 ${tokens_1.contract.space["1"]};
32
34
  border-radius: ${tokens_1.contract.radius.md}; background: transparent; cursor: pointer;
33
35
  color: ${tokens_1.contract.fgPrimary}; font-family: inherit;
34
- font-size: ${tokens_1.contract.text.xl}; line-height: 22px; font-weight: ${tokens_1.contract.weight.bold};
36
+ font-size: ${tokens_1.contract.text.lg}; line-height: 20px; font-weight: ${tokens_1.contract.weight.medium};
35
37
  white-space: nowrap;
36
38
  outline: 2px solid transparent; outline-offset: -2px;
37
39
  transition: outline-color .2s ease;
@@ -60,16 +62,16 @@ const config = (0, core_1.defineRecipe)({
60
62
  & .datepicker-weekday {
61
63
  display: flex; align-items: center; justify-content: center;
62
64
  height: ${tokens_1.contract.size.calendarCell}; color: ${tokens_1.contract.fgNeutralSubtle};
63
- font-size: ${tokens_1.contract.text.lg}; line-height: 19px; font-weight: ${tokens_1.contract.weight.medium};
65
+ font-size: ${tokens_1.contract.text.sm}; line-height: 16px; font-weight: ${tokens_1.contract.weight.medium};
64
66
  }
65
67
 
66
68
  & .datepicker-months { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
67
69
  & .datepicker-months[data-wheel-open] { visibility: hidden; }
68
70
  & .datepicker-month { min-width: 0; }
69
71
  & .datepicker-month-label {
70
- display: flex; align-items: center; height: ${tokens_1.contract.size.calendarCell};
71
- color: ${tokens_1.contract.fgPrimary}; font-size: ${tokens_1.contract.text.xl}; line-height: 22px;
72
- font-weight: ${tokens_1.contract.weight.bold};
72
+ display: flex; align-items: center; height: 24px;
73
+ color: ${tokens_1.contract.fgPrimary}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px;
74
+ font-weight: ${tokens_1.contract.weight.medium};
73
75
  }
74
76
 
75
77
  & .datepicker-grid { display: grid; min-width: 0; }
@@ -108,27 +110,27 @@ const config = (0, core_1.defineRecipe)({
108
110
  min-height: ${tokens_1.contract.size.calendarCell}; min-width: 0;
109
111
  align-items: flex-start; justify-content: center;
110
112
  border: 0; padding: 0; background: transparent; cursor: pointer;
111
- color: ${tokens_1.contract.fgNeutralMuted}; font: inherit; outline: none;
113
+ color: ${tokens_1.contract.fgPrimary}; font: inherit; outline: none;
112
114
  isolation: isolate;
113
115
  }
114
116
  /* the round day highlight, behind the numeral */
115
117
  & .datepicker-date::before {
116
118
  content: ""; position: absolute; z-index: -1; top: ${pillInset}; left: 50%;
117
119
  width: ${tokens_1.contract.size.calendarPill}; height: ${tokens_1.contract.size.calendarPill};
118
- border-radius: ${tokens_1.contract.radius.full};
120
+ border-radius: ${tokens_1.contract.radius.md};
119
121
  background: transparent; transform: translateX(-50%);
120
122
  }
121
123
  & .datepicker-date[data-today]::before { background: ${tokens_1.contract.bgNeutralWeak}; }
122
- & .datepicker-date[data-selected]::before { background: ${tokens_1.contract.bgNeutralInverted}; }
123
- & .datepicker-date[data-selected] { color: ${tokens_1.contract.fgOnNeutralInverted}; }
124
- & .datepicker-date[data-in-range] { color: ${tokens_1.contract.fgNeutralMuted}; }
124
+ & .datepicker-date[data-selected]::before { background: ${tokens_1.contract.bgBrandSolid}; }
125
+ & .datepicker-date[data-selected] { color: ${tokens_1.contract.fgOnBrand}; }
126
+ & .datepicker-date[data-in-range] { color: ${tokens_1.contract.fgPrimary}; }
125
127
  & .datepicker-date[data-in-range]::before { background: transparent; }
126
128
  & .datepicker-date[data-unavailable] { color: ${tokens_1.contract.fgDisabled}; }
127
129
  & .datepicker-date:disabled { color: ${tokens_1.contract.fgDisabled}; cursor: not-allowed; }
128
130
  & .datepicker-date:focus-visible::after {
129
131
  content: ""; position: absolute; top: ${pillInset}; left: 50%;
130
132
  width: ${tokens_1.contract.size.calendarPill}; height: ${tokens_1.contract.size.calendarPill};
131
- transform: translateX(-50%); border-radius: ${tokens_1.contract.radius.full};
133
+ transform: translateX(-50%); border-radius: ${tokens_1.contract.radius.md};
132
134
  outline: 2px solid ${tokens_1.contract.strokeFocusRing}; outline-offset: -2px;
133
135
  }
134
136
 
@@ -137,7 +139,7 @@ const config = (0, core_1.defineRecipe)({
137
139
  min-height: ${tokens_1.contract.size.calendarCell}; min-width: 0; box-sizing: border-box;
138
140
  flex-direction: column; align-items: center; gap: 3px;
139
141
  padding-top: ${pillInset}; color: inherit;
140
- font-size: ${tokens_1.contract.text.xl}; line-height: 22px; font-weight: ${tokens_1.contract.weight.medium};
142
+ font-size: ${tokens_1.contract.text.lg}; line-height: 20px; font-weight: ${tokens_1.contract.weight.medium};
141
143
  font-variant-numeric: tabular-nums;
142
144
  }
143
145
  /* The numeral is its own 42px flex box so it centres on the 42px pill.
@@ -152,7 +154,7 @@ const config = (0, core_1.defineRecipe)({
152
154
  /* the year/month wheel, laid over the grid it replaces */
153
155
  & .datepicker-wheel-container {
154
156
  position: absolute; z-index: 1; inset-inline: 0;
155
- top: ${tokens_1.contract.size.calendarCell}; bottom: 0;
157
+ top: ${tokens_1.contract.size.menuRow}; bottom: 0;
156
158
  display: flex; align-items: center; overflow: hidden;
157
159
  background: ${tokens_1.contract.bgSurface};
158
160
  }
@@ -175,8 +177,8 @@ const config = (0, core_1.defineRecipe)({
175
177
  visibleRange: {
176
178
  month: ``,
177
179
  twoMonths: `& .datepicker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: ${tokens_1.contract.space["6"]}; }
178
- & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: ${tokens_1.contract.size.calendarCell}; }
179
- & .datepicker-two-month-label { color: ${tokens_1.contract.fgPrimary}; font-size: ${tokens_1.contract.text.xl}; line-height: 22px; font-weight: ${tokens_1.contract.weight.bold}; }`,
180
+ & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: ${tokens_1.contract.size.menuRow}; }
181
+ & .datepicker-two-month-label { color: ${tokens_1.contract.fgPrimary}; font-size: ${tokens_1.contract.text.lg}; line-height: 20px; font-weight: ${tokens_1.contract.weight.medium}; }`,
180
182
  week: ``,
181
183
  continuous: `& .datepicker-weekday-row { position: sticky; top: 0; }`,
182
184
  },
@@ -54,6 +54,5 @@ const config = (0, core_1.defineRecipe)({
54
54
  });
55
55
  exports.inputRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
56
56
  config,
57
- meta: { medium: { height: "32px", borderRadius: "8px", fontSize: "14px" } },
58
57
  });
59
58
  exports.default = config;
@@ -12,12 +12,5 @@ const config = (0, core_1.defineRecipe)({
12
12
  });
13
13
  exports.kbdRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
14
14
  config,
15
- meta: {
16
- chip: {
17
- height: "20px",
18
- borderRadius: "6px",
19
- fontSize: "11px",
20
- },
21
- },
22
15
  });
23
16
  exports.default = config;
@@ -24,6 +24,5 @@ const config = (0, core_1.defineRecipe)({
24
24
  });
25
25
  exports.switchRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
26
26
  config,
27
- meta: { track: { width: "24px", height: "16px" }, thumb: { size: "12px" } },
28
27
  });
29
28
  exports.default = config;
@@ -90,6 +90,5 @@ const config = (0, core_1.defineRecipe)({
90
90
  });
91
91
  exports.wheelpickerRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
92
92
  config,
93
- meta: { medium: { height: "220px", itemHeight: "44px" } },
94
93
  });
95
94
  exports.default = config;
@@ -25,6 +25,5 @@ const config = (0, core_1.defineRecipe)({
25
25
  });
26
26
  exports.appshellRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
27
27
  config,
28
- meta: { sidebar: { defaultWidth: "275px" } },
29
28
  });
30
29
  exports.default = config;
@@ -37,11 +37,5 @@ const config = (0, core_1.defineRecipe)({
37
37
  });
38
38
  exports.commandRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
39
39
  config,
40
- meta: {
41
- content: {
42
- maxWidth: "720px",
43
- borderRadius: "16px",
44
- },
45
- },
46
40
  });
47
41
  exports.default = config;
@@ -24,13 +24,5 @@ const config = (0, core_1.defineRecipe)({
24
24
  });
25
25
  exports.navitemRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
26
26
  config,
27
- meta: {
28
- row: {
29
- height: "28px",
30
- borderRadius: "9px",
31
- fontSize: "14px",
32
- fontWeight: "500",
33
- },
34
- },
35
27
  });
36
28
  exports.default = config;
@@ -46,6 +46,5 @@ const config = (0, core_1.defineRecipe)({
46
46
  });
47
47
  exports.recordpanelRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
48
48
  config,
49
- meta: { panel: { width: "420px" } },
50
49
  });
51
50
  exports.default = config;
@@ -97,11 +97,21 @@ ${(0, tabletoolbar_chrome_1.toolbarChromeBody)("recordstable")}
97
97
  & .recordstable-col-check { width: 40px; min-width: 40px; padding: 0; }
98
98
  & .recordstable-check-inner { display: flex; align-items: center; justify-content: center; height: 100%; }
99
99
  & .recordstable-col-check, & .recordstable-col-entity { position: sticky; z-index: 3; background: ${tokens_1.contract.bgSurface}; }
100
- & .recordstable-col-check { left: 0; }
101
- & .recordstable-col-entity { left: 40px; clip-path: inset(0 -38px 0 0); transition: box-shadow .2s ease; }
100
+ /* The sticky pin is a LOGICAL offset: with physical \`left\` these columns
101
+ were not pinned at all under RTL -- scrolled, they left the viewport
102
+ entirely (measured: viewport 13..773, check column at x=1333). Nothing in
103
+ JS measures these, so converting them is safe; the two properties below
104
+ that have no logical form get an explicit RTL rule rather than being
105
+ left to point the wrong way. */
106
+ & .recordstable-col-check { inset-inline-start: 0; }
107
+ & .recordstable-col-entity { inset-inline-start: 40px; clip-path: inset(0 -38px 0 0); transition: box-shadow .2s ease; }
108
+ [dir="rtl"] & .recordstable-col-entity { clip-path: inset(0 0 0 -38px); }
102
109
  & thead .recordstable-col-check, & thead .recordstable-col-entity { z-index: 4; }
103
110
  /* soft shadow on the sticky column edge once the grid is scrolled horizontally */
104
111
  & .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: 6px 0 16px 4px rgba(0,0,0,0.12); }
112
+ /* box-shadow has no logical form either: the bleed follows the scrolled
113
+ content, which is the opposite side under RTL. */
114
+ [dir="rtl"] & .recordstable-scroll[data-scrolled] .recordstable-col-entity { box-shadow: -6px 0 16px 4px rgba(0,0,0,0.12); }
105
115
  /* AI-enriched values carry a purple wash. Measured from Attio:
106
116
  a full-bleed overlay at #9b69ff 4% (== bgPurple), composited OVER
107
117
  whatever row-state background the cell already has, which is why it
@@ -142,11 +152,5 @@ ${(0, tabletoolbar_chrome_1.toolbarChromeBody)("recordstable")}
142
152
  });
143
153
  exports.recordstableRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
144
154
  config,
145
- meta: {
146
- row: {
147
- height: "36px",
148
- gridLine: "1px",
149
- },
150
- },
151
155
  });
152
156
  exports.default = config;
@@ -37,10 +37,5 @@ const config = (0, core_1.defineRecipe)({
37
37
  });
38
38
  exports.sidebarRecipe = Object.assign((0, core_1.resolveRecipe)(config), {
39
39
  config,
40
- meta: {
41
- container: {
42
- width: "275px",
43
- },
44
- },
45
40
  });
46
41
  exports.default = config;
@@ -46,8 +46,12 @@ exports.size = {
46
46
  tableRow: "36px", // data-grid row height
47
47
  tableHeader: "40px", // data-grid header row height
48
48
  header: "48px", // workspace-switcher header height
49
- calendarCell: "48px", // calendar day cell / header rhythm (seed x12)
50
- calendarPill: "42px", // round day highlight inside a calendar cell
49
+ // Attio's date picker, measured: a 32px day with a 2px gap on both axes, so
50
+ // the pitch is 34. The gap is expressed as the cell being 2px taller than the
51
+ // highlight rather than as a grid gap, because crisp's range bridge spans
52
+ // whole cells and a column gap would cut it.
53
+ calendarCell: "34px", // calendar day pitch (32px day + 2px gap)
54
+ calendarPill: "32px", // the day highlight itself
51
55
  };
52
56
  // Typography — Attio's UI runs entirely on Inter. Sizes measured in the sidebar
53
57
  // collapse onto 11/12/13/14/16 (lg = 14px is the default body/label size);
@@ -1,18 +1,18 @@
1
1
  .datepicker {
2
2
 
3
3
  position: relative; box-sizing: border-box; width: 100%; min-width: 0;
4
- font-family: var(--font-sans); color: var(--fg-neutral-muted); background: var(--bg-surface);
4
+ font-family: var(--font-sans); color: var(--fg-primary); background: var(--bg-surface);
5
5
 
6
6
  & .datepicker-header {
7
7
  display: flex; align-items: center; justify-content: space-between;
8
- height: var(--size-calendarCell);
8
+ height: var(--size-menuRow);
9
9
  }
10
10
  & .datepicker-header-label {
11
11
  display: inline-flex; align-items: center; gap: var(--space-1);
12
12
  height: 100%; min-width: 0; border: 0; padding: 0 var(--space-1);
13
13
  border-radius: var(--radius-md); background: transparent; cursor: pointer;
14
14
  color: var(--fg-primary); font-family: inherit;
15
- font-size: var(--text-xl); line-height: 22px; font-weight: var(--weight-bold);
15
+ font-size: var(--text-lg); line-height: 20px; font-weight: var(--weight-medium);
16
16
  white-space: nowrap;
17
17
  outline: 2px solid transparent; outline-offset: -2px;
18
18
  transition: outline-color .2s ease;
@@ -41,16 +41,16 @@
41
41
  & .datepicker-weekday {
42
42
  display: flex; align-items: center; justify-content: center;
43
43
  height: var(--size-calendarCell); color: var(--fg-neutral-subtle);
44
- font-size: var(--text-lg); line-height: 19px; font-weight: var(--weight-medium);
44
+ font-size: var(--text-sm); line-height: 16px; font-weight: var(--weight-medium);
45
45
  }
46
46
 
47
47
  & .datepicker-months { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
48
48
  & .datepicker-months[data-wheel-open] { visibility: hidden; }
49
49
  & .datepicker-month { min-width: 0; }
50
50
  & .datepicker-month-label {
51
- display: flex; align-items: center; height: var(--size-calendarCell);
52
- color: var(--fg-primary); font-size: var(--text-xl); line-height: 22px;
53
- font-weight: var(--weight-bold);
51
+ display: flex; align-items: center; height: 24px;
52
+ color: var(--fg-primary); font-size: var(--text-lg); line-height: 20px;
53
+ font-weight: var(--weight-medium);
54
54
  }
55
55
 
56
56
  & .datepicker-grid { display: grid; min-width: 0; }
@@ -89,27 +89,27 @@
89
89
  min-height: var(--size-calendarCell); min-width: 0;
90
90
  align-items: flex-start; justify-content: center;
91
91
  border: 0; padding: 0; background: transparent; cursor: pointer;
92
- color: var(--fg-neutral-muted); font: inherit; outline: none;
92
+ color: var(--fg-primary); font: inherit; outline: none;
93
93
  isolation: isolate;
94
94
  }
95
95
  /* the round day highlight, behind the numeral */
96
96
  & .datepicker-date::before {
97
97
  content: ""; position: absolute; z-index: -1; top: calc((var(--size-calendarCell) - var(--size-calendarPill)) / 2); left: 50%;
98
98
  width: var(--size-calendarPill); height: var(--size-calendarPill);
99
- border-radius: var(--radius-full);
99
+ border-radius: var(--radius-md);
100
100
  background: transparent; transform: translateX(-50%);
101
101
  }
102
102
  & .datepicker-date[data-today]::before { background: var(--bg-neutral-weak); }
103
- & .datepicker-date[data-selected]::before { background: var(--bg-neutral-inverted); }
104
- & .datepicker-date[data-selected] { color: var(--fg-on-neutral-inverted); }
105
- & .datepicker-date[data-in-range] { color: var(--fg-neutral-muted); }
103
+ & .datepicker-date[data-selected]::before { background: var(--bg-brand-solid); }
104
+ & .datepicker-date[data-selected] { color: var(--fg-on-brand); }
105
+ & .datepicker-date[data-in-range] { color: var(--fg-primary); }
106
106
  & .datepicker-date[data-in-range]::before { background: transparent; }
107
107
  & .datepicker-date[data-unavailable] { color: var(--fg-disabled); }
108
108
  & .datepicker-date:disabled { color: var(--fg-disabled); cursor: not-allowed; }
109
109
  & .datepicker-date:focus-visible::after {
110
110
  content: ""; position: absolute; top: calc((var(--size-calendarCell) - var(--size-calendarPill)) / 2); left: 50%;
111
111
  width: var(--size-calendarPill); height: var(--size-calendarPill);
112
- transform: translateX(-50%); border-radius: var(--radius-full);
112
+ transform: translateX(-50%); border-radius: var(--radius-md);
113
113
  outline: 2px solid var(--stroke-focus-ring); outline-offset: -2px;
114
114
  }
115
115
 
@@ -118,7 +118,7 @@
118
118
  min-height: var(--size-calendarCell); min-width: 0; box-sizing: border-box;
119
119
  flex-direction: column; align-items: center; gap: 3px;
120
120
  padding-top: calc((var(--size-calendarCell) - var(--size-calendarPill)) / 2); color: inherit;
121
- font-size: var(--text-xl); line-height: 22px; font-weight: var(--weight-medium);
121
+ font-size: var(--text-lg); line-height: 20px; font-weight: var(--weight-medium);
122
122
  font-variant-numeric: tabular-nums;
123
123
  }
124
124
  /* The numeral is its own 42px flex box so it centres on the 42px pill.
@@ -133,7 +133,7 @@
133
133
  /* the year/month wheel, laid over the grid it replaces */
134
134
  & .datepicker-wheel-container {
135
135
  position: absolute; z-index: 1; inset-inline: 0;
136
- top: var(--size-calendarCell); bottom: 0;
136
+ top: var(--size-menuRow); bottom: 0;
137
137
  display: flex; align-items: center; overflow: hidden;
138
138
  background: var(--bg-surface);
139
139
  }
@@ -158,8 +158,8 @@
158
158
  }
159
159
  .datepicker--visibleRange_twoMonths {
160
160
  & .datepicker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); }
161
- & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: var(--size-calendarCell); }
162
- & .datepicker-two-month-label { color: var(--fg-primary); font-size: var(--text-xl); line-height: 22px; font-weight: var(--weight-bold); }
161
+ & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: var(--size-menuRow); }
162
+ & .datepicker-two-month-label { color: var(--fg-primary); font-size: var(--text-lg); line-height: 20px; font-weight: var(--weight-medium); }
163
163
  }
164
164
  .datepicker--visibleRange_week {
165
165
 
@@ -28,12 +28,5 @@ const config = defineRecipe({
28
28
  });
29
29
  export const avatarRecipe = Object.assign(resolveRecipe(config), {
30
30
  config,
31
- meta: {
32
- lg: {
33
- height: "24px",
34
- fontSize: "12px",
35
- fontWeight: "600",
36
- },
37
- },
38
31
  });
39
32
  export default config;
@@ -53,13 +53,5 @@ const config = defineRecipe({
53
53
  });
54
54
  export const badgeRecipe = Object.assign(resolveRecipe(config), {
55
55
  config,
56
- meta: {
57
- medium: {
58
- height: "20px",
59
- borderRadius: "6px",
60
- fontSize: "12px",
61
- fontWeight: "500",
62
- },
63
- },
64
56
  });
65
57
  export default config;
@@ -41,15 +41,5 @@ const config = defineRecipe({
41
41
  });
42
42
  export const buttonRecipe = Object.assign(resolveRecipe(config), {
43
43
  config,
44
- meta: {
45
- primary: {
46
- height: "28px",
47
- borderRadius: "8px",
48
- fontWeight: "500",
49
- fontSize: "14px",
50
- background: "rgb(38, 109, 240)",
51
- color: "rgb(255, 255, 255)",
52
- },
53
- },
54
44
  });
55
45
  export default config;
@@ -21,11 +21,5 @@ const config = defineRecipe({
21
21
  });
22
22
  export const checkboxRecipe = Object.assign(resolveRecipe(config), {
23
23
  config,
24
- meta: {
25
- box: {
26
- size: "16px",
27
- borderRadius: "6px",
28
- },
29
- },
30
24
  });
31
25
  export default config;
@@ -1,8 +1,10 @@
1
1
  import { defineRecipe, resolveRecipe } from "../../core/index.js";
2
2
  import { contract as c } from "../../tokens/index.js";
3
- // seed-design's calendar, measured from @seed-design/css. The geometry is a
4
- // 48px rhythm: header, weekday row, month label and every date cell are all
5
- // x12 tall, and the 42px pill inside a cell is inset 3px from its top.
3
+ // seed-design's calendar structure on Attio's measured scale. The behaviour,
4
+ // markup and range model are seed's; every visual value is measured from Attio's
5
+ // own date picker (app.attio.com, task due-date field): a 32px day on a 34px
6
+ // pitch, an 8px-radius highlight rather than a circle, 14/20 medium numerals and
7
+ // the brand blue for the selection.
6
8
  //
7
9
  // The pill and the range bridge are ::before layers behind the numeral
8
10
  // (`isolation: isolate` on the cell keeps their z-index local), which is what
@@ -17,18 +19,18 @@ const config = defineRecipe({
17
19
  name: "datepicker",
18
20
  base: `
19
21
  position: relative; box-sizing: border-box; width: 100%; min-width: 0;
20
- font-family: ${c.font.sans}; color: ${c.fgNeutralMuted}; background: ${c.bgSurface};
22
+ font-family: ${c.font.sans}; color: ${c.fgPrimary}; background: ${c.bgSurface};
21
23
 
22
24
  & .datepicker-header {
23
25
  display: flex; align-items: center; justify-content: space-between;
24
- height: ${c.size.calendarCell};
26
+ height: ${c.size.menuRow};
25
27
  }
26
28
  & .datepicker-header-label {
27
29
  display: inline-flex; align-items: center; gap: ${c.space["1"]};
28
30
  height: 100%; min-width: 0; border: 0; padding: 0 ${c.space["1"]};
29
31
  border-radius: ${c.radius.md}; background: transparent; cursor: pointer;
30
32
  color: ${c.fgPrimary}; font-family: inherit;
31
- font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.bold};
33
+ font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium};
32
34
  white-space: nowrap;
33
35
  outline: 2px solid transparent; outline-offset: -2px;
34
36
  transition: outline-color .2s ease;
@@ -57,16 +59,16 @@ const config = defineRecipe({
57
59
  & .datepicker-weekday {
58
60
  display: flex; align-items: center; justify-content: center;
59
61
  height: ${c.size.calendarCell}; color: ${c.fgNeutralSubtle};
60
- font-size: ${c.text.lg}; line-height: 19px; font-weight: ${c.weight.medium};
62
+ font-size: ${c.text.sm}; line-height: 16px; font-weight: ${c.weight.medium};
61
63
  }
62
64
 
63
65
  & .datepicker-months { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
64
66
  & .datepicker-months[data-wheel-open] { visibility: hidden; }
65
67
  & .datepicker-month { min-width: 0; }
66
68
  & .datepicker-month-label {
67
- display: flex; align-items: center; height: ${c.size.calendarCell};
68
- color: ${c.fgPrimary}; font-size: ${c.text.xl}; line-height: 22px;
69
- font-weight: ${c.weight.bold};
69
+ display: flex; align-items: center; height: 24px;
70
+ color: ${c.fgPrimary}; font-size: ${c.text.lg}; line-height: 20px;
71
+ font-weight: ${c.weight.medium};
70
72
  }
71
73
 
72
74
  & .datepicker-grid { display: grid; min-width: 0; }
@@ -105,27 +107,27 @@ const config = defineRecipe({
105
107
  min-height: ${c.size.calendarCell}; min-width: 0;
106
108
  align-items: flex-start; justify-content: center;
107
109
  border: 0; padding: 0; background: transparent; cursor: pointer;
108
- color: ${c.fgNeutralMuted}; font: inherit; outline: none;
110
+ color: ${c.fgPrimary}; font: inherit; outline: none;
109
111
  isolation: isolate;
110
112
  }
111
113
  /* the round day highlight, behind the numeral */
112
114
  & .datepicker-date::before {
113
115
  content: ""; position: absolute; z-index: -1; top: ${pillInset}; left: 50%;
114
116
  width: ${c.size.calendarPill}; height: ${c.size.calendarPill};
115
- border-radius: ${c.radius.full};
117
+ border-radius: ${c.radius.md};
116
118
  background: transparent; transform: translateX(-50%);
117
119
  }
118
120
  & .datepicker-date[data-today]::before { background: ${c.bgNeutralWeak}; }
119
- & .datepicker-date[data-selected]::before { background: ${c.bgNeutralInverted}; }
120
- & .datepicker-date[data-selected] { color: ${c.fgOnNeutralInverted}; }
121
- & .datepicker-date[data-in-range] { color: ${c.fgNeutralMuted}; }
121
+ & .datepicker-date[data-selected]::before { background: ${c.bgBrandSolid}; }
122
+ & .datepicker-date[data-selected] { color: ${c.fgOnBrand}; }
123
+ & .datepicker-date[data-in-range] { color: ${c.fgPrimary}; }
122
124
  & .datepicker-date[data-in-range]::before { background: transparent; }
123
125
  & .datepicker-date[data-unavailable] { color: ${c.fgDisabled}; }
124
126
  & .datepicker-date:disabled { color: ${c.fgDisabled}; cursor: not-allowed; }
125
127
  & .datepicker-date:focus-visible::after {
126
128
  content: ""; position: absolute; top: ${pillInset}; left: 50%;
127
129
  width: ${c.size.calendarPill}; height: ${c.size.calendarPill};
128
- transform: translateX(-50%); border-radius: ${c.radius.full};
130
+ transform: translateX(-50%); border-radius: ${c.radius.md};
129
131
  outline: 2px solid ${c.strokeFocusRing}; outline-offset: -2px;
130
132
  }
131
133
 
@@ -134,7 +136,7 @@ const config = defineRecipe({
134
136
  min-height: ${c.size.calendarCell}; min-width: 0; box-sizing: border-box;
135
137
  flex-direction: column; align-items: center; gap: 3px;
136
138
  padding-top: ${pillInset}; color: inherit;
137
- font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.medium};
139
+ font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium};
138
140
  font-variant-numeric: tabular-nums;
139
141
  }
140
142
  /* The numeral is its own 42px flex box so it centres on the 42px pill.
@@ -149,7 +151,7 @@ const config = defineRecipe({
149
151
  /* the year/month wheel, laid over the grid it replaces */
150
152
  & .datepicker-wheel-container {
151
153
  position: absolute; z-index: 1; inset-inline: 0;
152
- top: ${c.size.calendarCell}; bottom: 0;
154
+ top: ${c.size.menuRow}; bottom: 0;
153
155
  display: flex; align-items: center; overflow: hidden;
154
156
  background: ${c.bgSurface};
155
157
  }
@@ -172,8 +174,8 @@ const config = defineRecipe({
172
174
  visibleRange: {
173
175
  month: ``,
174
176
  twoMonths: `& .datepicker-months { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: ${c.space["6"]}; }
175
- & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: ${c.size.calendarCell}; }
176
- & .datepicker-two-month-label { color: ${c.fgPrimary}; font-size: ${c.text.xl}; line-height: 22px; font-weight: ${c.weight.bold}; }`,
177
+ & .datepicker-two-month-header { display: flex; align-items: center; justify-content: space-between; height: ${c.size.menuRow}; }
178
+ & .datepicker-two-month-label { color: ${c.fgPrimary}; font-size: ${c.text.lg}; line-height: 20px; font-weight: ${c.weight.medium}; }`,
177
179
  week: ``,
178
180
  continuous: `& .datepicker-weekday-row { position: sticky; top: 0; }`,
179
181
  },
@@ -51,6 +51,5 @@ const config = defineRecipe({
51
51
  });
52
52
  export const inputRecipe = Object.assign(resolveRecipe(config), {
53
53
  config,
54
- meta: { medium: { height: "32px", borderRadius: "8px", fontSize: "14px" } },
55
54
  });
56
55
  export default config;
@@ -9,12 +9,5 @@ const config = defineRecipe({
9
9
  });
10
10
  export const kbdRecipe = Object.assign(resolveRecipe(config), {
11
11
  config,
12
- meta: {
13
- chip: {
14
- height: "20px",
15
- borderRadius: "6px",
16
- fontSize: "11px",
17
- },
18
- },
19
12
  });
20
13
  export default config;
@@ -21,6 +21,5 @@ const config = defineRecipe({
21
21
  });
22
22
  export const switchRecipe = Object.assign(resolveRecipe(config), {
23
23
  config,
24
- meta: { track: { width: "24px", height: "16px" }, thumb: { size: "12px" } },
25
24
  });
26
25
  export default config;