@korzun/design 0.0.5 → 0.1.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.
Files changed (48) hide show
  1. package/AGENTS.md +5 -1
  2. package/dist/component/card/style.d.ts.map +1 -1
  3. package/dist/component/card/style.js +3 -1
  4. package/dist/component/card/style.js.map +1 -1
  5. package/dist/component/card-row/style.js +1 -1
  6. package/dist/component/card-row/style.js.map +1 -1
  7. package/dist/component/tag/index.d.ts +1 -1
  8. package/dist/component/tag/index.d.ts.map +1 -1
  9. package/dist/component/tag/index.js.map +1 -1
  10. package/dist/component/tag/style.d.ts +1 -1
  11. package/dist/component/tag/style.d.ts.map +1 -1
  12. package/dist/control/index.d.ts +1 -1
  13. package/dist/control/index.d.ts.map +1 -1
  14. package/dist/control/index.js +1 -1
  15. package/dist/control/index.js.map +1 -1
  16. package/dist/control/popover/index.d.ts +24 -8
  17. package/dist/control/popover/index.d.ts.map +1 -1
  18. package/dist/control/popover/index.js +60 -15
  19. package/dist/control/popover/index.js.map +1 -1
  20. package/dist/control/popover/position.d.ts +47 -0
  21. package/dist/control/popover/position.d.ts.map +1 -0
  22. package/dist/control/popover/position.js +29 -0
  23. package/dist/control/popover/position.js.map +1 -0
  24. package/dist/control/switch/style.d.ts.map +1 -1
  25. package/dist/control/switch/style.js +1 -3
  26. package/dist/control/switch/style.js.map +1 -1
  27. package/dist/theme/theme.d.ts +26 -0
  28. package/dist/theme/theme.d.ts.map +1 -1
  29. package/dist/theme/theme.js +41 -0
  30. package/dist/theme/theme.js.map +1 -1
  31. package/docs/component/card-row.md +11 -12
  32. package/docs/component/card.md +3 -3
  33. package/docs/component/metadata-list.md +1 -1
  34. package/docs/component/tag.md +26 -6
  35. package/docs/control/popover.md +41 -10
  36. package/docs/corners.md +4 -4
  37. package/docs/philosophy.md +1 -1
  38. package/docs/theme.md +5 -2
  39. package/docs/tokens.md +4 -3
  40. package/package.json +1 -1
  41. package/src/component/card/style.ts +3 -1
  42. package/src/component/card-row/style.ts +1 -1
  43. package/src/component/tag/index.tsx +1 -1
  44. package/src/control/index.ts +6 -1
  45. package/src/control/popover/index.tsx +77 -19
  46. package/src/control/popover/position.ts +66 -0
  47. package/src/control/switch/style.ts +1 -3
  48. package/src/theme/theme.ts +52 -0
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAGzC,QAAA,MAAM,IAAI;aACR,EAAE,EAAE,SAAS;aACb,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,MAAM;CACH,CAAC;AAEX,QAAA,MAAM,IAAI;aACR,EAAE,EAAE,SAAS;aACb,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;CACN,CAAC;AAEX,QAAA,MAAM,GAAG;aACP,EAAE,EAAE,SAAS;aACb,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;aACd,GAAG,EAAE,SAAS;CACN,CAAC;AAKX,KAAK,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAG1D,MAAM,WAAW,KAAK;IACpB,WAAW,EAAE,SAAS,CAAC;IACvB,KAAK,EAAE;QACL,IAAI,EAAE,OAAO,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MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,cAAc,EAAE,MAAM,CAAC;QACvB,4FAA4F;QAC5F,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;QACF,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;CACH;AA+fD,eAAO,MAAM,UAAU,EAAE,KAA2B,CAAC;AACrD,eAAO,MAAM,SAAS,EAAE,KAA0B,CAAC;AACnD,eAAO,MAAM,YAAY,EAAE,KAAkB,CAAC"}
@@ -83,6 +83,8 @@ function buildTheme(mode) {
83
83
  section: '#E6E6E9',
84
84
  },
85
85
  success: '#16a34a',
86
+ warning: '#ca8a04',
87
+ info: blue[500],
86
88
  brand: {
87
89
  default: blue[500],
88
90
  hover: blue[400],
@@ -123,6 +125,22 @@ function buildTheme(mode) {
123
125
  bg: applyTransparency(gray[600], 0.08),
124
126
  border: applyTransparency(gray[600], 0.22),
125
127
  },
128
+ success: {
129
+ text: '#15803d',
130
+ bg: applyTransparency('#16a34a', 0.08),
131
+ border: applyTransparency('#16a34a', 0.22),
132
+ },
133
+ warning: { text: '#854d0e', bg: 'rgba(234,179,8,0.16)', border: 'rgba(202,138,4,0.40)' },
134
+ danger: {
135
+ text: red[700],
136
+ bg: applyTransparency(red[500], 0.08),
137
+ border: applyTransparency(red[500], 0.22),
138
+ },
139
+ info: {
140
+ text: blue[700],
141
+ bg: applyTransparency(blue[500], 0.08),
142
+ border: applyTransparency(blue[500], 0.24),
143
+ },
126
144
  },
127
145
  };
128
146
  const darkMuted = '#9CA1AB';
@@ -174,6 +192,8 @@ function buildTheme(mode) {
174
192
  section: '#2B2C30',
175
193
  },
176
194
  success: '#22C55E',
195
+ warning: '#EAB308',
196
+ info: blue[400],
177
197
  brand: {
178
198
  default: blue[400],
179
199
  hover: blue[300],
@@ -215,6 +235,22 @@ function buildTheme(mode) {
215
235
  bg: applyTransparency(darkMuted, 0.16),
216
236
  border: applyTransparency(darkMuted, 0.3),
217
237
  },
238
+ success: {
239
+ text: '#86EFAC',
240
+ bg: applyTransparency('#22C55E', 0.16),
241
+ border: applyTransparency('#22C55E', 0.3),
242
+ },
243
+ warning: { text: '#FDE047', bg: 'rgba(234,179,8,0.20)', border: 'rgba(234,179,8,0.42)' },
244
+ danger: {
245
+ text: red[400],
246
+ bg: applyTransparency(red[500], 0.16),
247
+ border: applyTransparency(red[500], 0.3),
248
+ },
249
+ info: {
250
+ text: blue[300],
251
+ bg: applyTransparency(blue[400], 0.18),
252
+ border: applyTransparency(blue[400], 0.36),
253
+ },
218
254
  },
219
255
  };
220
256
  const color = mode === 'dark' ? darkColor : lightColor;
@@ -375,6 +411,11 @@ function buildTheme(mode) {
375
411
  borderColor: color.border.glassActive,
376
412
  boxShadow: shadow.glassActive,
377
413
  },
414
+ row: {
415
+ backgroundColor: color.bg.cardHeader,
416
+ borderRadius: radius.md,
417
+ padding: `${space.md} ${space.lg} ${space.md} ${space.sm}`,
418
+ },
378
419
  modal: {
379
420
  dialog: {
380
421
  cursor: 'default',
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,6BAA6B;AAC7B,MAAM,IAAI,GAAG;IACX,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAA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EAAE;gBACvB,WAAW,EAAE,KAAK,CAAC,EAAE;gBACrB,YAAY,EAAE,KAAK,CAAC,EAAE;aACvB;SACF;KACF,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,IAAI;QACjB,KAAK;QACL,KAAK;QACL,MAAM;QACN,IAAI;QACJ,MAAM;QACN,QAAQ;QACR,UAAU;QACV,UAAU;QACV,UAAU;QACV,MAAM;QACN,UAAU;QACV,MAAM;QACN,UAAU;QACV,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAU,UAAU,CAAC,OAAO,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,SAAS,GAAU,UAAU,CAAC,MAAM,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,YAAY,GAAU,UAAU,CAAC","sourcesContent":["import { applyTransparency } from '../utils.js';\n\nexport type ThemeMode = 'light' | 'dark';\n\n// ─── Primitive palettes ───\nconst gray = {\n 50: '#FCFCFC',\n 100: '#EEEEEE',\n 150: '#e5e7eb',\n 200: '#DDDDDD',\n 300: '#D9D9D9',\n 400: '#D0D0D0',\n 500: '#9ca3af',\n 600: '#6E6E6E',\n 700: '#5A6375',\n 900: '#111',\n} as const;\n\nconst blue = {\n 50: '#EFF6FF',\n 100: '#dbeafe',\n 200: '#91CAFF',\n 300: '#87BAFF',\n 400: '#3696fe',\n 500: '#1777FF',\n 600: '#1D4ED8',\n 700: '#0758d9',\n 800: '#083FBC',\n} as const;\n\nconst red = {\n 50: '#fff1f0',\n 100: '#FFA8A6',\n 300: '#ff7874',\n 400: '#FF8E8E',\n 500: '#FF4D4F',\n 600: '#e98182',\n 700: '#D9373e',\n} as const;\n\n// JSS-spreadable style fragment. Loose by design: recipes nest pseudo-selectors\n// (`&:hover`) and string/number CSS values, which a stricter type can't capture\n// without inviting more friction than safety it would provide.\ntype Recipe = { [key: string]: Recipe | string | number };\n\n// ─── Theme interface ───\nexport interface Theme {\n colorScheme: ThemeMode;\n color: {\n gray: typeof gray;\n blue: typeof blue;\n red: typeof red;\n text: {\n primary: string;\n secondary: string;\n muted: string;\n faint: string;\n onPrimary: string;\n onDanger: string;\n description: string;\n };\n bg: {\n page: string;\n card: string;\n cardHeader: string;\n /**\n * The rail behind a segmented control's sliding lens. Its own token, not\n * `cardHeader`, because it must read against BOTH `page` and `card` — and\n * in dark mode those sit on either side of `cardHeader`, which left the\n * rail invisible on the page.\n */\n track: string;\n input: string;\n footer: string;\n glass: string;\n glassFallback: string;\n glassActive: string;\n selected: string;\n hover: string;\n success: string;\n placeholder: string;\n };\n border: {\n default: string;\n strong: string;\n light: string;\n focus: string;\n hover: string;\n danger: string;\n glass: string;\n glassActive: string;\n faint: string;\n loading: string;\n success: string;\n section: string;\n };\n success: string;\n brand: {\n default: string;\n hover: string;\n active: string;\n light: string;\n outline: string;\n loading: string;\n loadingHover: string;\n loadingActive: string;\n linkHover: string;\n };\n danger: {\n default: string;\n hover: string;\n active: string;\n light: string;\n outline: string;\n loading: string;\n loadingHover: string;\n loadingActive: string;\n };\n overlay: { backdrop: string };\n chip: {\n status: { text: string; bg: string; border: string };\n author: { text: string; bg: string; border: string };\n series: { text: string; bg: string; border: string };\n subject: { text: string; bg: string; border: string };\n book: { text: string; bg: string; border: string };\n entryType: { text: string; bg: string; border: string };\n user: { text: string; bg: string; border: string };\n rating: { text: string; bg: string; border: string };\n // Quiet grey for states that carry no category (e.g. \"no change\"), built\n // from the mode's muted text colour.\n neutral: { text: string; bg: string; border: string };\n };\n };\n space: {\n xxxs: string;\n xxs: string;\n xs: string;\n sm: string;\n md: string;\n lg: string;\n xl: string;\n xxl: string;\n xxxl: string;\n xxxxl: string;\n xxxxxl: string;\n };\n radius: { sm: string; md: string; lg: string; circle: string; pill: string };\n size: { metadataValue: string };\n // Intrinsic sizes of chrome that other elements must lay out around. These are\n // measured, not derived (the element's real height comes from its content), so\n // they need on-device tuning — keep the single source of truth here.\n // `floatingControlTopBase` is the odd one out: a POSITION, not a size — see\n // its definition below.\n layout: {\n navHeightMobile: string;\n modalWidth: string;\n controlHeight: string;\n floatingControlTopBase: string;\n };\n fontSize: {\n xxs: string;\n xs: string;\n sm: string;\n md: string;\n lg: string;\n xl: string;\n xxl: string;\n };\n fontFamily: { body: string; mono: string };\n fontWeight: { medium: number; semibold: number; bold: number; extrabold: number };\n lineHeight: { tight: number; body: number };\n shadow: {\n card: string;\n cardStack: string;\n hoverLift: string;\n dangerStack: string;\n brandStack: string;\n glass: string;\n glassActive: string;\n };\n transition: { fast: string; medium: string; slide: string; slow: string; spring: string };\n zIndex: {\n behind: number;\n base: number;\n stack: { lo: number; md: number; hi: number };\n header: number;\n sticky: number;\n toast: number;\n };\n breakpoint: {\n mobile: string;\n normal: string;\n };\n\n // Recipes are JSS-spreadable fragments. Loose typing lets them include\n // pseudo-selectors (`&:hover`) and nested rules without fighting JSS's TS surface.\n recipe: {\n input: Recipe;\n focusRing: Recipe;\n label: Recipe;\n spinner: Recipe;\n glass: Recipe;\n glassHighlight: Recipe;\n modal: {\n dialog: Recipe;\n header: Recipe;\n footer: Recipe;\n };\n card: {\n shell: Recipe;\n header: Recipe;\n footer: Recipe;\n };\n };\n}\n\n// ─── Build defaults ───\nfunction buildTheme(mode: ThemeMode): Theme {\n const lightColor: Theme['color'] = {\n gray,\n blue,\n red,\n text: {\n primary: gray[900],\n secondary: gray[700],\n muted: gray[600],\n faint: gray[500],\n onPrimary: '#FFFFFF',\n onDanger: '#FFFFFF',\n description: '#585863',\n },\n bg: {\n page: '#F6F6F9',\n card: gray[50],\n cardHeader: gray[100],\n // Unchanged from the `cardHeader` this used to borrow: in light mode the\n // track was already a step darker than the page, so light renders as before.\n track: gray[100],\n input: '#FFFFFF',\n footer: gray[100],\n glass: applyTransparency('#FFFFFF', 0.6),\n glassFallback: applyTransparency('#FFFFFF', 0.92),\n glassActive: applyTransparency('#FFFFFF', 0.55),\n selected: blue[100],\n // A translucent scrim, not an opaque grey: hover has to read on whatever\n // surface it lands on. The old '#f0f0f0' was lighter than the modal\n // footer (gray[100]) it was painted over, so hovering a text button\n // there produced no visible change at all.\n hover: applyTransparency('#000000', 0.07),\n success: '#f0fdf4',\n placeholder: '#d1d5db',\n },\n border: {\n default: gray[300],\n strong: gray[200],\n light: gray[150],\n focus: blue[700],\n hover: blue[200],\n danger: red[500],\n glass: applyTransparency('#000', 0.08),\n glassActive: applyTransparency('#FFFFFF', 0.7),\n faint: gray[500],\n loading: '#e6e6e6',\n success: '#bbf7d0',\n section: '#E6E6E9',\n },\n success: '#16a34a',\n brand: {\n default: blue[500],\n hover: blue[400],\n active: blue[700],\n light: blue[50],\n outline: blue[200],\n loading: '#73A6FF',\n loadingHover: blue[300],\n loadingActive: '#6893e7',\n linkHover: blue[300],\n },\n danger: {\n default: red[500],\n hover: red[300],\n active: red[700],\n light: red[50],\n outline: applyTransparency(red[300], 0.5),\n loading: red[400],\n loadingHover: red[100],\n loadingActive: red[600],\n },\n overlay: { backdrop: applyTransparency('#000', 0.7) },\n chip: {\n status: { text: '#6d3fc0', bg: 'rgba(109,63,192,0.08)', border: 'rgba(109,63,192,0.22)' },\n author: { text: '#1a7a52', bg: 'rgba(26,122,82,0.08)', border: 'rgba(26,122,82,0.22)' },\n series: { text: '#1a5fa8', bg: 'rgba(26,95,168,0.08)', border: 'rgba(26,95,168,0.22)' },\n subject: { text: '#8a5e00', bg: 'rgba(138,94,0,0.08)', border: 'rgba(138,94,0,0.22)' },\n book: { text: '#0e6b7d', bg: 'rgba(14, 107, 125, 0.08)', border: 'rgba(14, 107, 125, 0.22)' },\n entryType: {\n text: '#c0415e',\n bg: 'rgba(192, 65, 94, 0.08)',\n border: 'rgba(192, 65, 94, 0.22)',\n },\n user: { text: '#a23a95', bg: 'rgba(162,58,149,0.08)', border: 'rgba(162,58,149,0.22)' },\n rating: { text: '#b5451b', bg: 'rgba(181,69,27,0.08)', border: 'rgba(181,69,27,0.22)' },\n neutral: {\n text: gray[600],\n bg: applyTransparency(gray[600], 0.08),\n border: applyTransparency(gray[600], 0.22),\n },\n },\n };\n\n const darkMuted = '#9CA1AB';\n const darkColor: Theme['color'] = {\n gray,\n blue,\n red,\n text: {\n primary: '#F5F5F7',\n secondary: '#C8CBD2',\n muted: darkMuted,\n faint: '#6E7480',\n onPrimary: '#FFFFFF',\n onDanger: '#FFFFFF',\n description: '#A8ADB6',\n },\n bg: {\n page: '#242527',\n card: '#1A1B1E',\n cardHeader: '#232427',\n // A step LIGHTER than the page, not darker. This palette puts `page`\n // (#242527) above `card`/`input` (#1A1B1E), so the light-mode move —\n // recess the track below the surface — has nowhere to go in dark without\n // colliding with the lens. Raising it instead keeps the same ~8-per-channel\n // separation light mode has, in the only direction that is still free.\n track: '#2C2D31',\n input: '#1A1B1E',\n footer: '#232427',\n glass: applyTransparency('#1C1C1E', 0.6),\n glassFallback: applyTransparency('#1C1C1E', 0.92),\n glassActive: applyTransparency('#2C2C2E', 0.55),\n selected: applyTransparency(blue[500], 0.24),\n hover: applyTransparency('#FFFFFF', 0.12),\n success: applyTransparency('#22C55E', 0.14),\n placeholder: '#2A2B2F',\n },\n border: {\n default: '#3A3B40',\n strong: '#48494F',\n light: '#2B2C30',\n faint: '#3A3B40',\n focus: blue[400],\n hover: blue[600],\n danger: red[500],\n glass: applyTransparency('#FFFFFF', 0.12),\n glassActive: applyTransparency('#FFFFFF', 0.18),\n loading: '#34353A',\n success: applyTransparency('#22C55E', 0.4),\n section: '#2B2C30',\n },\n success: '#22C55E',\n brand: {\n default: blue[400],\n hover: blue[300],\n active: blue[200],\n light: applyTransparency(blue[500], 0.2),\n outline: applyTransparency(blue[400], 0.45),\n linkHover: blue[200],\n loading: '#3E5A8A',\n loadingHover: blue[600],\n loadingActive: '#33507F',\n },\n danger: {\n default: red[500],\n hover: red[400],\n active: red[700],\n light: applyTransparency(red[500], 0.18),\n outline: applyTransparency(red[300], 0.5),\n loading: red[400],\n loadingHover: red[600],\n loadingActive: red[700],\n },\n overlay: { backdrop: applyTransparency('#000', 0.7) },\n chip: {\n status: { text: '#C9B0F2', bg: 'rgba(167,139,250,0.16)', border: 'rgba(167,139,250,0.30)' },\n author: { text: '#7EE6B4', bg: 'rgba(52,211,153,0.16)', border: 'rgba(52,211,153,0.30)' },\n series: { text: '#8EC3F5', bg: 'rgba(96,165,250,0.16)', border: 'rgba(96,165,250,0.30)' },\n subject: { text: '#E8C879', bg: 'rgba(217,168,67,0.16)', border: 'rgba(217,168,67,0.30)' },\n book: { text: '#7FD0DE', bg: 'rgba(45, 170, 190, 0.18)', border: 'rgba(45, 170, 190, 0.32)' },\n entryType: {\n text: '#E89BAC',\n bg: 'rgba(192, 65, 94, 0.18)',\n border: 'rgba(192, 65, 94, 0.32)',\n },\n user: { text: '#E7A6DA', bg: 'rgba(162,58,149,0.16)', border: 'rgba(162,58,149,0.30)' },\n rating: { text: '#F2A07B', bg: 'rgba(181,69,27,0.18)', border: 'rgba(181,69,27,0.32)' },\n // Dark chips run stronger alphas (0.16 / 0.30) than light (0.08 / 0.22).\n neutral: {\n text: darkMuted,\n bg: applyTransparency(darkMuted, 0.16),\n border: applyTransparency(darkMuted, 0.3),\n },\n },\n };\n\n const color: Theme['color'] = mode === 'dark' ? darkColor : lightColor;\n\n const space: Theme['space'] = {\n xxxs: '0.1rem',\n xxs: '0.125rem',\n xs: '0.25rem',\n sm: '0.375rem',\n md: '0.5rem',\n lg: '0.625rem',\n xl: '0.75rem',\n xxl: '1rem',\n xxxl: '1.25rem',\n xxxxl: '1.5rem',\n xxxxxl: '2rem',\n };\n\n const radius: Theme['radius'] = {\n sm: '4px',\n md: '8px',\n lg: '16px',\n circle: '50%',\n pill: '999px',\n };\n const size: Theme['size'] = { metadataValue: '15rem' };\n // The floating mobile nav capsule is ~96px tall on-device (content + padding +\n // the min bottom floor). Tune against the measured height during on-device\n // verification; page padding and bottom-docked toasts both clear it via this token.\n // modalWidth: one width for every dialog so modals read as a single system.\n // controlHeight: the shared single-line height for inputs/select/chips (~33px)\n // so form controls line up on one row. Single source of truth.\n // Where the mobile controls (back button, page actions menu) pin once the page\n // has scrolled them up to it — the `top` of the sticky row `component/page`\n // holds them in. One rule, both contexts (no iOS-unreliable display-mode\n // query): a browser tab has no top safe-area inset, so env() ~ 0 and this\n // resolves to the fixed floor (room for the frosted shadow); in standalone the\n // notch inset dominates and pins the controls below the status bar — by\n // `space.xxxxl`, not the `space.lg` it used to be: `TopFade` blurs across the\n // inset there and a control resting `space.lg` under it read as caught in the\n // blur, so the controls (and the admin picker, which keeps the same gap —\n // `router/nav-layout-style`) rest a clear step below where it ends.\n const floatingControlTopBase = `max(${space.xxxl}, calc(env(safe-area-inset-top) + ${space.xxxxl}))`;\n const layout: Theme['layout'] = {\n navHeightMobile: '96px',\n modalWidth: '500px',\n controlHeight: '2.0625rem',\n floatingControlTopBase,\n };\n const fontSize: Theme['fontSize'] = {\n xxs: '0.6rem',\n xs: '0.7rem',\n sm: '0.75rem',\n md: '0.875rem',\n lg: '1rem',\n xl: '1.25rem',\n xxl: '1.75rem',\n };\n const fontFamily: Theme['fontFamily'] = {\n body: 'system-ui, sans-serif',\n mono: \"'Cascadia Code', 'Fira Code', monospace\",\n };\n const fontWeight: Theme['fontWeight'] = { medium: 500, semibold: 600, bold: 700, extrabold: 800 };\n const lineHeight: Theme['lineHeight'] = { tight: 1, body: 1.3 };\n\n const lightShadow: Theme['shadow'] = {\n card: '0 1px 3px rgba(0,0,0,0.07)',\n cardStack: `0px 2px 0px ${applyTransparency('#D9D9D9', 0.2)}`,\n hoverLift: '0 2px 8px rgba(0,0,0,0.15)',\n dangerStack: `0px 2px 0px ${applyTransparency('#FF4D4F', 0.1)}`,\n brandStack: `0px 2px 0px ${applyTransparency('#1777FF', 0.2)}`,\n glass: `0 8px 32px ${applyTransparency('#000', 0.12)}`,\n glassActive: `0 2px 6px ${applyTransparency('#000', 0.12)}`,\n };\n\n const darkShadow: Theme['shadow'] = {\n card: '0 1px 3px rgba(0,0,0,0.5)',\n cardStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n hoverLift: '0 2px 8px rgba(0,0,0,0.6)',\n dangerStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n brandStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n glass: `0 8px 32px ${applyTransparency('#000', 0.5)}`,\n glassActive: `0 2px 6px ${applyTransparency('#000', 0.5)}`,\n };\n\n const shadow: Theme['shadow'] = mode === 'dark' ? darkShadow : lightShadow;\n\n const transition: Theme['transition'] = {\n fast: '0.1s ease-in',\n medium: '0.2s ease-in',\n slide: '0.2s ease-out',\n slow: '0.3s linear',\n spring: '0.35s cubic-bezier(0.4, 0, 0.2, 1)',\n };\n\n const zIndex: Theme['zIndex'] = {\n behind: -1,\n base: 1,\n stack: { lo: 1, md: 2, hi: 3 },\n header: 10,\n sticky: 1000,\n toast: 9999,\n };\n\n const breakpoint: Theme['breakpoint'] = {\n mobile: '@media (max-width: 640px)',\n normal: '@media (min-width: 641px)',\n };\n\n const recipe: Theme['recipe'] = {\n input: {\n fontFamily: fontFamily.body,\n // Match the select controls (0.80rem); without this, inputs fall back to the\n // smaller browser default and look inconsistent next to selects/chips.\n fontSize: '0.80rem',\n // Restore the 16px floor on mobile: this class-level font-size otherwise\n // out-specifies the global `input` rule and would let iOS auto-zoom on\n // focus. See global-styles.ts.\n [breakpoint.mobile]: { fontSize: '16px' },\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n backgroundColor: color.bg.input,\n borderColor: color.border.default,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderRadius: radius.md,\n padding: space.md,\n '-webkit-appearance': 'none',\n '&:hover': { borderColor: color.border.hover },\n '&:focus': { borderColor: color.border.focus },\n '&$danger': { borderColor: color.border.danger },\n },\n focusRing: {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n label: {\n fontWeight: fontWeight.semibold,\n fontSize: fontSize.md,\n color: color.text.muted,\n display: 'block',\n '&$danger': { color: color.danger.default },\n },\n spinner: {\n animation: 'theme-rotation 1s infinite linear',\n height: '1em',\n width: '1em',\n },\n glass: {\n backgroundColor: color.bg.glass,\n backdropFilter: 'blur(20px) saturate(180%)',\n '-webkit-backdrop-filter': 'blur(20px) saturate(180%)',\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.glass,\n boxShadow: shadow.glass,\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: color.bg.glassFallback,\n },\n },\n glassHighlight: {\n backgroundColor: color.bg.glassActive,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.glassActive,\n boxShadow: shadow.glassActive,\n },\n modal: {\n dialog: {\n cursor: 'default',\n fontFamily: fontFamily.body,\n fontSize: fontSize.lg,\n fontStyle: 'normal',\n letterSpacing: 'normal',\n lineHeight: lineHeight.body,\n textTransform: 'none',\n wordBreak: 'normal',\n overflowWrap: 'break-word',\n borderRadius: radius.lg,\n border: 'none',\n padding: 0,\n overflow: 'hidden',\n // One shared width for every modal; the maxWidth keeps it inside a\n // narrow viewport (the auto side-margins then center it).\n width: layout.modalWidth,\n maxWidth: `calc(100vw - ${space.xxl} * 2)`,\n marginTop: '100px',\n marginLeft: 'auto',\n marginRight: 'auto',\n marginBottom: '50px',\n outline: 'none',\n '&::backdrop': {\n backgroundColor: color.overlay.backdrop,\n backdropFilter: 'blur(2px) saturate(0%)',\n },\n [breakpoint.mobile]: {\n marginTop: `calc(${space.xxxxxl} + env(safe-area-inset-top))`,\n marginBottom: `calc(${space.xxxxxl} + env(safe-area-inset-bottom))`,\n maxHeight: `calc(100dvh - ${space.xxxxxl} * 2 - env(safe-area-inset-top) - env(safe-area-inset-bottom))`,\n overflowY: 'auto',\n },\n },\n header: {\n fontWeight: fontWeight.semibold,\n fontSize: fontSize.xl,\n padding: space.xxl,\n },\n footer: {\n backgroundColor: color.bg.footer,\n borderTopStyle: 'solid',\n borderTopColor: color.border.strong,\n borderTopWidth: '1px',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'end',\n gap: space.md,\n paddingTop: space.xl,\n paddingBottom: space.xl,\n paddingLeft: space.xl,\n paddingRight: space.xl,\n },\n },\n card: {\n shell: {\n backgroundColor: color.bg.card,\n borderRadius: radius.lg,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.strong,\n overflow: 'hidden',\n boxShadow: shadow.cardStack,\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: `${space.md} ${space.xl}`,\n backgroundColor: color.bg.cardHeader,\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n borderBottomColor: color.border.strong,\n userSelect: 'none',\n '-webkit-user-select': 'none',\n },\n footer: {\n backgroundColor: color.bg.footer,\n borderTopStyle: 'solid',\n borderTopColor: color.border.strong,\n borderTopWidth: '1px',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'end',\n gap: space.md,\n paddingTop: space.xl,\n paddingBottom: space.xl,\n paddingLeft: space.xl,\n paddingRight: space.xl,\n },\n },\n };\n\n return {\n colorScheme: mode,\n color,\n space,\n radius,\n size,\n layout,\n fontSize,\n fontFamily,\n fontWeight,\n lineHeight,\n shadow,\n transition,\n zIndex,\n breakpoint,\n recipe,\n };\n}\n\nexport const lightTheme: Theme = buildTheme('light');\nexport const darkTheme: Theme = buildTheme('dark');\nexport const defaultTheme: Theme = lightTheme;\n"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/theme/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIhD,6BAA6B;AAC7B,MAAM,IAAI,GAAG;IACX,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,SAAS;IACd,GA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AE,KAAK,CAAC,MAAM,CAAC,MAAM;gBACtC,UAAU,EAAE,MAAM;gBAClB,qBAAqB,EAAE,MAAM;aAC9B;YACD,MAAM,EAAE;gBACN,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM;gBAChC,cAAc,EAAE,OAAO;gBACvB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM;gBACnC,cAAc,EAAE,KAAK;gBACrB,OAAO,EAAE,MAAM;gBACf,aAAa,EAAE,KAAK;gBACpB,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,KAAK;gBACrB,GAAG,EAAE,KAAK,CAAC,EAAE;gBACb,UAAU,EAAE,KAAK,CAAC,EAAE;gBACpB,aAAa,EAAE,KAAK,CAAC,EAAE;gBACvB,WAAW,EAAE,KAAK,CAAC,EAAE;gBACrB,YAAY,EAAE,KAAK,CAAC,EAAE;aACvB;SACF;KACF,CAAC;IAEF,OAAO;QACL,WAAW,EAAE,IAAI;QACjB,KAAK;QACL,KAAK;QACL,MAAM;QACN,IAAI;QACJ,MAAM;QACN,QAAQ;QACR,UAAU;QACV,UAAU;QACV,UAAU;QACV,MAAM;QACN,UAAU;QACV,MAAM;QACN,UAAU;QACV,MAAM;KACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAU,UAAU,CAAC,OAAO,CAAC,CAAC;AACrD,MAAM,CAAC,MAAM,SAAS,GAAU,UAAU,CAAC,MAAM,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,YAAY,GAAU,UAAU,CAAC","sourcesContent":["import { applyTransparency } from '../utils.js';\n\nexport type ThemeMode = 'light' | 'dark';\n\n// ─── Primitive palettes ───\nconst gray = {\n 50: '#FCFCFC',\n 100: '#EEEEEE',\n 150: '#e5e7eb',\n 200: '#DDDDDD',\n 300: '#D9D9D9',\n 400: '#D0D0D0',\n 500: '#9ca3af',\n 600: '#6E6E6E',\n 700: '#5A6375',\n 900: '#111',\n} as const;\n\nconst blue = {\n 50: '#EFF6FF',\n 100: '#dbeafe',\n 200: '#91CAFF',\n 300: '#87BAFF',\n 400: '#3696fe',\n 500: '#1777FF',\n 600: '#1D4ED8',\n 700: '#0758d9',\n 800: '#083FBC',\n} as const;\n\nconst red = {\n 50: '#fff1f0',\n 100: '#FFA8A6',\n 300: '#ff7874',\n 400: '#FF8E8E',\n 500: '#FF4D4F',\n 600: '#e98182',\n 700: '#D9373e',\n} as const;\n\n// JSS-spreadable style fragment. Loose by design: recipes nest pseudo-selectors\n// (`&:hover`) and string/number CSS values, which a stricter type can't capture\n// without inviting more friction than safety it would provide.\ntype Recipe = { [key: string]: Recipe | string | number };\n\n// ─── Theme interface ───\nexport interface Theme {\n colorScheme: ThemeMode;\n color: {\n gray: typeof gray;\n blue: typeof blue;\n red: typeof red;\n text: {\n primary: string;\n secondary: string;\n muted: string;\n faint: string;\n onPrimary: string;\n onDanger: string;\n description: string;\n };\n bg: {\n page: string;\n card: string;\n cardHeader: string;\n /**\n * The rail behind a segmented control's sliding lens. Its own token, not\n * `cardHeader`, because it must read against BOTH `page` and `card` — and\n * in dark mode those sit on either side of `cardHeader`, which left the\n * rail invisible on the page.\n */\n track: string;\n input: string;\n footer: string;\n glass: string;\n glassFallback: string;\n glassActive: string;\n selected: string;\n hover: string;\n success: string;\n placeholder: string;\n };\n border: {\n default: string;\n strong: string;\n light: string;\n focus: string;\n hover: string;\n danger: string;\n glass: string;\n glassActive: string;\n faint: string;\n loading: string;\n success: string;\n section: string;\n };\n success: string;\n /** Solid warning colour for icons and accents. */\n warning: string;\n /** Solid info colour for icons and accents. */\n info: string;\n brand: {\n default: string;\n hover: string;\n active: string;\n light: string;\n outline: string;\n loading: string;\n loadingHover: string;\n loadingActive: string;\n linkHover: string;\n };\n danger: {\n default: string;\n hover: string;\n active: string;\n light: string;\n outline: string;\n loading: string;\n loadingHover: string;\n loadingActive: string;\n };\n overlay: { backdrop: string };\n chip: {\n status: { text: string; bg: string; border: string };\n author: { text: string; bg: string; border: string };\n series: { text: string; bg: string; border: string };\n subject: { text: string; bg: string; border: string };\n book: { text: string; bg: string; border: string };\n entryType: { text: string; bg: string; border: string };\n user: { text: string; bg: string; border: string };\n rating: { text: string; bg: string; border: string };\n // Quiet grey for states that carry no category (e.g. \"no change\"), built\n // from the mode's muted text colour.\n neutral: { text: string; bg: string; border: string };\n // Status tones for state, as opposed to the label tones above.\n success: { text: string; bg: string; border: string };\n warning: { text: string; bg: string; border: string };\n danger: { text: string; bg: string; border: string };\n info: { text: string; bg: string; border: string };\n };\n };\n space: {\n xxxs: string;\n xxs: string;\n xs: string;\n sm: string;\n md: string;\n lg: string;\n xl: string;\n xxl: string;\n xxxl: string;\n xxxxl: string;\n xxxxxl: string;\n };\n radius: { sm: string; md: string; lg: string; circle: string; pill: string };\n size: { metadataValue: string };\n // Intrinsic sizes of chrome that other elements must lay out around. These are\n // measured, not derived (the element's real height comes from its content), so\n // they need on-device tuning — keep the single source of truth here.\n // `floatingControlTopBase` is the odd one out: a POSITION, not a size — see\n // its definition below.\n layout: {\n navHeightMobile: string;\n modalWidth: string;\n controlHeight: string;\n floatingControlTopBase: string;\n };\n fontSize: {\n xxs: string;\n xs: string;\n sm: string;\n md: string;\n lg: string;\n xl: string;\n xxl: string;\n };\n fontFamily: { body: string; mono: string };\n fontWeight: { medium: number; semibold: number; bold: number; extrabold: number };\n lineHeight: { tight: number; body: number };\n shadow: {\n card: string;\n cardStack: string;\n hoverLift: string;\n dangerStack: string;\n brandStack: string;\n glass: string;\n glassActive: string;\n };\n transition: { fast: string; medium: string; slide: string; slow: string; spring: string };\n zIndex: {\n behind: number;\n base: number;\n stack: { lo: number; md: number; hi: number };\n header: number;\n sticky: number;\n toast: number;\n };\n breakpoint: {\n mobile: string;\n normal: string;\n };\n\n // Recipes are JSS-spreadable fragments. Loose typing lets them include\n // pseudo-selectors (`&:hover`) and nested rules without fighting JSS's TS surface.\n recipe: {\n input: Recipe;\n focusRing: Recipe;\n label: Recipe;\n spinner: Recipe;\n glass: Recipe;\n glassHighlight: Recipe;\n /** The shaded field row (`bg.cardHeader`, `md` corners) a control sits in inside a card. */\n row: Recipe;\n modal: {\n dialog: Recipe;\n header: Recipe;\n footer: Recipe;\n };\n card: {\n shell: Recipe;\n header: Recipe;\n footer: Recipe;\n };\n };\n}\n\n// ─── Build defaults ───\nfunction buildTheme(mode: ThemeMode): Theme {\n const lightColor: Theme['color'] = {\n gray,\n blue,\n red,\n text: {\n primary: gray[900],\n secondary: gray[700],\n muted: gray[600],\n faint: gray[500],\n onPrimary: '#FFFFFF',\n onDanger: '#FFFFFF',\n description: '#585863',\n },\n bg: {\n page: '#F6F6F9',\n card: gray[50],\n cardHeader: gray[100],\n // Unchanged from the `cardHeader` this used to borrow: in light mode the\n // track was already a step darker than the page, so light renders as before.\n track: gray[100],\n input: '#FFFFFF',\n footer: gray[100],\n glass: applyTransparency('#FFFFFF', 0.6),\n glassFallback: applyTransparency('#FFFFFF', 0.92),\n glassActive: applyTransparency('#FFFFFF', 0.55),\n selected: blue[100],\n // A translucent scrim, not an opaque grey: hover has to read on whatever\n // surface it lands on. The old '#f0f0f0' was lighter than the modal\n // footer (gray[100]) it was painted over, so hovering a text button\n // there produced no visible change at all.\n hover: applyTransparency('#000000', 0.07),\n success: '#f0fdf4',\n placeholder: '#d1d5db',\n },\n border: {\n default: gray[300],\n strong: gray[200],\n light: gray[150],\n focus: blue[700],\n hover: blue[200],\n danger: red[500],\n glass: applyTransparency('#000', 0.08),\n glassActive: applyTransparency('#FFFFFF', 0.7),\n faint: gray[500],\n loading: '#e6e6e6',\n success: '#bbf7d0',\n section: '#E6E6E9',\n },\n success: '#16a34a',\n warning: '#ca8a04',\n info: blue[500],\n brand: {\n default: blue[500],\n hover: blue[400],\n active: blue[700],\n light: blue[50],\n outline: blue[200],\n loading: '#73A6FF',\n loadingHover: blue[300],\n loadingActive: '#6893e7',\n linkHover: blue[300],\n },\n danger: {\n default: red[500],\n hover: red[300],\n active: red[700],\n light: red[50],\n outline: applyTransparency(red[300], 0.5),\n loading: red[400],\n loadingHover: red[100],\n loadingActive: red[600],\n },\n overlay: { backdrop: applyTransparency('#000', 0.7) },\n chip: {\n status: { text: '#6d3fc0', bg: 'rgba(109,63,192,0.08)', border: 'rgba(109,63,192,0.22)' },\n author: { text: '#1a7a52', bg: 'rgba(26,122,82,0.08)', border: 'rgba(26,122,82,0.22)' },\n series: { text: '#1a5fa8', bg: 'rgba(26,95,168,0.08)', border: 'rgba(26,95,168,0.22)' },\n subject: { text: '#8a5e00', bg: 'rgba(138,94,0,0.08)', border: 'rgba(138,94,0,0.22)' },\n book: { text: '#0e6b7d', bg: 'rgba(14, 107, 125, 0.08)', border: 'rgba(14, 107, 125, 0.22)' },\n entryType: {\n text: '#c0415e',\n bg: 'rgba(192, 65, 94, 0.08)',\n border: 'rgba(192, 65, 94, 0.22)',\n },\n user: { text: '#a23a95', bg: 'rgba(162,58,149,0.08)', border: 'rgba(162,58,149,0.22)' },\n rating: { text: '#b5451b', bg: 'rgba(181,69,27,0.08)', border: 'rgba(181,69,27,0.22)' },\n neutral: {\n text: gray[600],\n bg: applyTransparency(gray[600], 0.08),\n border: applyTransparency(gray[600], 0.22),\n },\n success: {\n text: '#15803d',\n bg: applyTransparency('#16a34a', 0.08),\n border: applyTransparency('#16a34a', 0.22),\n },\n warning: { text: '#854d0e', bg: 'rgba(234,179,8,0.16)', border: 'rgba(202,138,4,0.40)' },\n danger: {\n text: red[700],\n bg: applyTransparency(red[500], 0.08),\n border: applyTransparency(red[500], 0.22),\n },\n info: {\n text: blue[700],\n bg: applyTransparency(blue[500], 0.08),\n border: applyTransparency(blue[500], 0.24),\n },\n },\n };\n\n const darkMuted = '#9CA1AB';\n const darkColor: Theme['color'] = {\n gray,\n blue,\n red,\n text: {\n primary: '#F5F5F7',\n secondary: '#C8CBD2',\n muted: darkMuted,\n faint: '#6E7480',\n onPrimary: '#FFFFFF',\n onDanger: '#FFFFFF',\n description: '#A8ADB6',\n },\n bg: {\n page: '#242527',\n card: '#1A1B1E',\n cardHeader: '#232427',\n // A step LIGHTER than the page, not darker. This palette puts `page`\n // (#242527) above `card`/`input` (#1A1B1E), so the light-mode move —\n // recess the track below the surface — has nowhere to go in dark without\n // colliding with the lens. Raising it instead keeps the same ~8-per-channel\n // separation light mode has, in the only direction that is still free.\n track: '#2C2D31',\n input: '#1A1B1E',\n footer: '#232427',\n glass: applyTransparency('#1C1C1E', 0.6),\n glassFallback: applyTransparency('#1C1C1E', 0.92),\n glassActive: applyTransparency('#2C2C2E', 0.55),\n selected: applyTransparency(blue[500], 0.24),\n hover: applyTransparency('#FFFFFF', 0.12),\n success: applyTransparency('#22C55E', 0.14),\n placeholder: '#2A2B2F',\n },\n border: {\n default: '#3A3B40',\n strong: '#48494F',\n light: '#2B2C30',\n faint: '#3A3B40',\n focus: blue[400],\n hover: blue[600],\n danger: red[500],\n glass: applyTransparency('#FFFFFF', 0.12),\n glassActive: applyTransparency('#FFFFFF', 0.18),\n loading: '#34353A',\n success: applyTransparency('#22C55E', 0.4),\n section: '#2B2C30',\n },\n success: '#22C55E',\n warning: '#EAB308',\n info: blue[400],\n brand: {\n default: blue[400],\n hover: blue[300],\n active: blue[200],\n light: applyTransparency(blue[500], 0.2),\n outline: applyTransparency(blue[400], 0.45),\n linkHover: blue[200],\n loading: '#3E5A8A',\n loadingHover: blue[600],\n loadingActive: '#33507F',\n },\n danger: {\n default: red[500],\n hover: red[400],\n active: red[700],\n light: applyTransparency(red[500], 0.18),\n outline: applyTransparency(red[300], 0.5),\n loading: red[400],\n loadingHover: red[600],\n loadingActive: red[700],\n },\n overlay: { backdrop: applyTransparency('#000', 0.7) },\n chip: {\n status: { text: '#C9B0F2', bg: 'rgba(167,139,250,0.16)', border: 'rgba(167,139,250,0.30)' },\n author: { text: '#7EE6B4', bg: 'rgba(52,211,153,0.16)', border: 'rgba(52,211,153,0.30)' },\n series: { text: '#8EC3F5', bg: 'rgba(96,165,250,0.16)', border: 'rgba(96,165,250,0.30)' },\n subject: { text: '#E8C879', bg: 'rgba(217,168,67,0.16)', border: 'rgba(217,168,67,0.30)' },\n book: { text: '#7FD0DE', bg: 'rgba(45, 170, 190, 0.18)', border: 'rgba(45, 170, 190, 0.32)' },\n entryType: {\n text: '#E89BAC',\n bg: 'rgba(192, 65, 94, 0.18)',\n border: 'rgba(192, 65, 94, 0.32)',\n },\n user: { text: '#E7A6DA', bg: 'rgba(162,58,149,0.16)', border: 'rgba(162,58,149,0.30)' },\n rating: { text: '#F2A07B', bg: 'rgba(181,69,27,0.18)', border: 'rgba(181,69,27,0.32)' },\n // Dark chips run stronger alphas (0.16 / 0.30) than light (0.08 / 0.22).\n neutral: {\n text: darkMuted,\n bg: applyTransparency(darkMuted, 0.16),\n border: applyTransparency(darkMuted, 0.3),\n },\n success: {\n text: '#86EFAC',\n bg: applyTransparency('#22C55E', 0.16),\n border: applyTransparency('#22C55E', 0.3),\n },\n warning: { text: '#FDE047', bg: 'rgba(234,179,8,0.20)', border: 'rgba(234,179,8,0.42)' },\n danger: {\n text: red[400],\n bg: applyTransparency(red[500], 0.16),\n border: applyTransparency(red[500], 0.3),\n },\n info: {\n text: blue[300],\n bg: applyTransparency(blue[400], 0.18),\n border: applyTransparency(blue[400], 0.36),\n },\n },\n };\n\n const color: Theme['color'] = mode === 'dark' ? darkColor : lightColor;\n\n const space: Theme['space'] = {\n xxxs: '0.1rem',\n xxs: '0.125rem',\n xs: '0.25rem',\n sm: '0.375rem',\n md: '0.5rem',\n lg: '0.625rem',\n xl: '0.75rem',\n xxl: '1rem',\n xxxl: '1.25rem',\n xxxxl: '1.5rem',\n xxxxxl: '2rem',\n };\n\n const radius: Theme['radius'] = {\n sm: '4px',\n md: '8px',\n lg: '16px',\n circle: '50%',\n pill: '999px',\n };\n const size: Theme['size'] = { metadataValue: '15rem' };\n // The floating mobile nav capsule is ~96px tall on-device (content + padding +\n // the min bottom floor). Tune against the measured height during on-device\n // verification; page padding and bottom-docked toasts both clear it via this token.\n // modalWidth: one width for every dialog so modals read as a single system.\n // controlHeight: the shared single-line height for inputs/select/chips (~33px)\n // so form controls line up on one row. Single source of truth.\n // Where the mobile controls (back button, page actions menu) pin once the page\n // has scrolled them up to it — the `top` of the sticky row `component/page`\n // holds them in. One rule, both contexts (no iOS-unreliable display-mode\n // query): a browser tab has no top safe-area inset, so env() ~ 0 and this\n // resolves to the fixed floor (room for the frosted shadow); in standalone the\n // notch inset dominates and pins the controls below the status bar — by\n // `space.xxxxl`, not the `space.lg` it used to be: `TopFade` blurs across the\n // inset there and a control resting `space.lg` under it read as caught in the\n // blur, so the controls (and the admin picker, which keeps the same gap —\n // `router/nav-layout-style`) rest a clear step below where it ends.\n const floatingControlTopBase = `max(${space.xxxl}, calc(env(safe-area-inset-top) + ${space.xxxxl}))`;\n const layout: Theme['layout'] = {\n navHeightMobile: '96px',\n modalWidth: '500px',\n controlHeight: '2.0625rem',\n floatingControlTopBase,\n };\n const fontSize: Theme['fontSize'] = {\n xxs: '0.6rem',\n xs: '0.7rem',\n sm: '0.75rem',\n md: '0.875rem',\n lg: '1rem',\n xl: '1.25rem',\n xxl: '1.75rem',\n };\n const fontFamily: Theme['fontFamily'] = {\n body: 'system-ui, sans-serif',\n mono: \"'Cascadia Code', 'Fira Code', monospace\",\n };\n const fontWeight: Theme['fontWeight'] = { medium: 500, semibold: 600, bold: 700, extrabold: 800 };\n const lineHeight: Theme['lineHeight'] = { tight: 1, body: 1.3 };\n\n const lightShadow: Theme['shadow'] = {\n card: '0 1px 3px rgba(0,0,0,0.07)',\n cardStack: `0px 2px 0px ${applyTransparency('#D9D9D9', 0.2)}`,\n hoverLift: '0 2px 8px rgba(0,0,0,0.15)',\n dangerStack: `0px 2px 0px ${applyTransparency('#FF4D4F', 0.1)}`,\n brandStack: `0px 2px 0px ${applyTransparency('#1777FF', 0.2)}`,\n glass: `0 8px 32px ${applyTransparency('#000', 0.12)}`,\n glassActive: `0 2px 6px ${applyTransparency('#000', 0.12)}`,\n };\n\n const darkShadow: Theme['shadow'] = {\n card: '0 1px 3px rgba(0,0,0,0.5)',\n cardStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n hoverLift: '0 2px 8px rgba(0,0,0,0.6)',\n dangerStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n brandStack: `0px 2px 0px ${applyTransparency('#000', 0.4)}`,\n glass: `0 8px 32px ${applyTransparency('#000', 0.5)}`,\n glassActive: `0 2px 6px ${applyTransparency('#000', 0.5)}`,\n };\n\n const shadow: Theme['shadow'] = mode === 'dark' ? darkShadow : lightShadow;\n\n const transition: Theme['transition'] = {\n fast: '0.1s ease-in',\n medium: '0.2s ease-in',\n slide: '0.2s ease-out',\n slow: '0.3s linear',\n spring: '0.35s cubic-bezier(0.4, 0, 0.2, 1)',\n };\n\n const zIndex: Theme['zIndex'] = {\n behind: -1,\n base: 1,\n stack: { lo: 1, md: 2, hi: 3 },\n header: 10,\n sticky: 1000,\n toast: 9999,\n };\n\n const breakpoint: Theme['breakpoint'] = {\n mobile: '@media (max-width: 640px)',\n normal: '@media (min-width: 641px)',\n };\n\n const recipe: Theme['recipe'] = {\n input: {\n fontFamily: fontFamily.body,\n // Match the select controls (0.80rem); without this, inputs fall back to the\n // smaller browser default and look inconsistent next to selects/chips.\n fontSize: '0.80rem',\n // Restore the 16px floor on mobile: this class-level font-size otherwise\n // out-specifies the global `input` rule and would let iOS auto-zoom on\n // focus. See global-styles.ts.\n [breakpoint.mobile]: { fontSize: '16px' },\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n backgroundColor: color.bg.input,\n borderColor: color.border.default,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderRadius: radius.md,\n padding: space.md,\n '-webkit-appearance': 'none',\n '&:hover': { borderColor: color.border.hover },\n '&:focus': { borderColor: color.border.focus },\n '&$danger': { borderColor: color.border.danger },\n },\n focusRing: {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n label: {\n fontWeight: fontWeight.semibold,\n fontSize: fontSize.md,\n color: color.text.muted,\n display: 'block',\n '&$danger': { color: color.danger.default },\n },\n spinner: {\n animation: 'theme-rotation 1s infinite linear',\n height: '1em',\n width: '1em',\n },\n glass: {\n backgroundColor: color.bg.glass,\n backdropFilter: 'blur(20px) saturate(180%)',\n '-webkit-backdrop-filter': 'blur(20px) saturate(180%)',\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.glass,\n boxShadow: shadow.glass,\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: color.bg.glassFallback,\n },\n },\n glassHighlight: {\n backgroundColor: color.bg.glassActive,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.glassActive,\n boxShadow: shadow.glassActive,\n },\n row: {\n backgroundColor: color.bg.cardHeader,\n borderRadius: radius.md,\n padding: `${space.md} ${space.lg} ${space.md} ${space.sm}`,\n },\n modal: {\n dialog: {\n cursor: 'default',\n fontFamily: fontFamily.body,\n fontSize: fontSize.lg,\n fontStyle: 'normal',\n letterSpacing: 'normal',\n lineHeight: lineHeight.body,\n textTransform: 'none',\n wordBreak: 'normal',\n overflowWrap: 'break-word',\n borderRadius: radius.lg,\n border: 'none',\n padding: 0,\n overflow: 'hidden',\n // One shared width for every modal; the maxWidth keeps it inside a\n // narrow viewport (the auto side-margins then center it).\n width: layout.modalWidth,\n maxWidth: `calc(100vw - ${space.xxl} * 2)`,\n marginTop: '100px',\n marginLeft: 'auto',\n marginRight: 'auto',\n marginBottom: '50px',\n outline: 'none',\n '&::backdrop': {\n backgroundColor: color.overlay.backdrop,\n backdropFilter: 'blur(2px) saturate(0%)',\n },\n [breakpoint.mobile]: {\n marginTop: `calc(${space.xxxxxl} + env(safe-area-inset-top))`,\n marginBottom: `calc(${space.xxxxxl} + env(safe-area-inset-bottom))`,\n maxHeight: `calc(100dvh - ${space.xxxxxl} * 2 - env(safe-area-inset-top) - env(safe-area-inset-bottom))`,\n overflowY: 'auto',\n },\n },\n header: {\n fontWeight: fontWeight.semibold,\n fontSize: fontSize.xl,\n padding: space.xxl,\n },\n footer: {\n backgroundColor: color.bg.footer,\n borderTopStyle: 'solid',\n borderTopColor: color.border.strong,\n borderTopWidth: '1px',\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'end',\n gap: space.md,\n paddingTop: space.xl,\n paddingBottom: space.xl,\n paddingLeft: space.xl,\n paddingRight: space.xl,\n },\n },\n card: {\n shell: {\n backgroundColor: color.bg.card,\n borderRadius: radius.lg,\n borderStyle: 'solid',\n borderWidth: '1px',\n borderColor: color.border.strong,\n overflow: 'hidden',\n boxShadow: shadow.cardStack,\n },\n header: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n padding: `${space.md} ${space.xl}`,\n backgroundColor: color.bg.cardHeader,\n borderBottomStyle: 'solid',\n borderBottomWidth: '1px',\n borderBottomColor: color.border.strong,\n userSelect: 'none',\n '-webkit-user-select': 'none',\n },\n footer: {\n backgroundColor: color.bg.footer,\n borderTopStyle: 'solid',\n borderTopColor: color.border.strong,\n borderTopWidth: '1px',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'end',\n gap: space.md,\n paddingTop: space.xl,\n paddingBottom: space.xl,\n paddingLeft: space.xl,\n paddingRight: space.xl,\n },\n },\n };\n\n return {\n colorScheme: mode,\n color,\n space,\n radius,\n size,\n layout,\n fontSize,\n fontFamily,\n fontWeight,\n lineHeight,\n shadow,\n transition,\n zIndex,\n breakpoint,\n recipe,\n };\n}\n\nexport const lightTheme: Theme = buildTheme('light');\nexport const darkTheme: Theme = buildTheme('dark');\nexport const defaultTheme: Theme = lightTheme;\n"]}
@@ -2,12 +2,13 @@
2
2
 
3
3
  `import { CardRow, type CardRowProps } from '@korzun/design/component'`
4
4
 
5
- A compact bordered row (card background, 6px padding) for stacking items inside
6
- a `Card` body. Optionally clickable.
5
+ A compact card-shell row (card background, border, stacked shadow, 6px
6
+ padding) that sits on the page background, for a stack of list items. Optionally
7
+ clickable.
7
8
 
8
- Use something else for: a list of rows each sitting on the page background
9
- (Bookplate uses `<Card size="small" onClick>` per row), a section split
10
- (`CardDivider`), a key/value line (`MetadataList`).
9
+ Use something else for: rows inside a `Card` body (a shaded row built on
10
+ `theme.recipe.row`), a section split (`CardDivider`), a key/value line
11
+ (`MetadataList`). Bookplate itself lists items with `<Card size="small" onClick>`.
11
12
 
12
13
  ## Props
13
14
 
@@ -30,20 +31,19 @@ No `className`, no `ariaLabel`, no `role`.
30
31
 
31
32
  ## Corners
32
33
 
33
- Hard-codes `borderRadius: '12px'` (its own source comment says "10px"), off
34
- the radius scale. By the [corner rule](../corners.md) a row inside a card
35
- should be `radius.md`. Known inconsistency, don't copy the value.
34
+ `radius.lg` from `recipe.card.shell`: a row sits on the page background. Content
35
+ inside it steps down to `md`. See [corners](../corners.md).
36
36
 
37
37
  ## Examples
38
38
 
39
39
  ```tsx
40
- <Card title="Recent uploads">
40
+ <Page documentTitle="Uploads">
41
41
  {uploads.map((u) => (
42
42
  <CardRow key={u.id} onClick={() => open(u.id)}>
43
43
  {u.fileName}
44
44
  </CardRow>
45
45
  ))}
46
- </Card>
46
+ </Page>
47
47
 
48
48
  // Accessible alternative: the action is a real control.
49
49
  <CardRow>
@@ -53,6 +53,5 @@ should be `radius.md`. Known inconsistency, don't copy the value.
53
53
 
54
54
  ## Do / don't
55
55
 
56
- - Do use it only inside a `Card` body.
56
+ - Do place it on the page background, not inside a `Card`.
57
57
  - Don't rely on `onClick` as the only way to reach an action from the keyboard.
58
- - Don't copy its 12px radius into your own styles; use `theme.radius.md`.
@@ -20,7 +20,7 @@ a disclosure section with no card chrome (`CollapsibleSection`), a modal
20
20
  | `subTitle` | `string` | | Small faint text after the title. |
21
21
  | `headerAction` | `ReactNode \| ReactElement[]` | | Right side of the header. Clicks and keys here do **not** bubble to `onClick` / the collapse toggle. |
22
22
  | `footer` | `ReactNode` | | Grey footer bar, children right-aligned. Clicks do not bubble to `onClick`. Hidden while a collapsible card is collapsed. |
23
- | `size` | `'small' \| 'large'` | `'large'` | `large`: body padding `space.xl`. `small`: body padding `1px` and a 9px corner (see below). |
23
+ | `size` | `'small' \| 'large'` | `'large'` | `large`: body padding `space.xl`. `small`: body padding `1px` and a `calc(md + 1px)` corner (see below). |
24
24
  | `isCollapsible` | `boolean` | `false` | Header becomes a `role="button"` toggle (Enter/Space) with a rotating chevron before the title. |
25
25
  | `defaultCollapsed` | `boolean` | **`true`** | **A collapsible card starts collapsed unless you pass `defaultCollapsed={false}`.** Uncontrolled; there is no `open` prop. |
26
26
  | `onClick` | `() => void` | | Whole-card click; adds a pointer cursor. See the keyboard caveat below. |
@@ -44,8 +44,8 @@ The header renders only if one of `title`, `subTitle`, `headerAction`,
44
44
 
45
45
  The shell uses `radius.lg`: a Card sits on the page background. Buttons inside
46
46
  (body or footer) take `radius="card"`. See [corners](../corners.md).
47
- `size="small"` hard-codes `borderRadius: '9px'`, off the radius scale: known
48
- inconsistency, don't copy the value.
47
+ `size="small"` insets its body by only 1px, so its corner is `calc(radius.md + 1px)`
48
+ (9px): concentric with the `md`-cornered covers and rows flush inside it.
49
49
 
50
50
  ## Examples
51
51
 
@@ -46,7 +46,7 @@ No `className`.
46
46
  { title: 'Slug', value: device.slug },
47
47
  { title: 'Cover size', value: `${device.coverWidth}×${device.coverHeight}` },
48
48
  { title: 'Grayscale cover', value: device.bwCover ? 'Yes' : 'No' },
49
- { title: 'Status', value: <Tag size="sm" tone="status">Active</Tag> },
49
+ { title: 'Status', value: <Tag size="sm" tone="success">Active</Tag> },
50
50
  ]}
51
51
  />
52
52
  </Card>
@@ -23,12 +23,26 @@ No `className`, no `ariaLabel`.
23
23
 
24
24
  ## Choosing a tone
25
25
 
26
- `TagTone` is `keyof Theme['color']['chip']`, so the tones are **domain names**,
27
- not colour names. Pick by what the tag *is*:
26
+ `TagTone` is `keyof Theme['color']['chip']`. There are two groups: label tones
27
+ are **domain names** (what kind of thing the tag names) and status tones are
28
+ **meanings** (what state it reports). Neither group is a set of colour names:
29
+ never pick a tone for its colour. Pick by what the tag *is*:
30
+
31
+ Status tones report a state:
32
+
33
+ | Tone | Use for |
34
+ |---|---|
35
+ | `success` | Something went well (Published, Paid). |
36
+ | `warning` | Needs attention soon (Overdue, Expiring). |
37
+ | `danger` | Something failed or is blocked (Failed, Rejected). |
38
+ | `info` | Neutral news (Scheduled, New). |
39
+ | `neutral` | A state with no category ("no change"): quiet grey. |
40
+
41
+ Label tones name a kind of thing:
28
42
 
29
43
  | Tone | Use for |
30
44
  |---|---|
31
- | `status` | A state (Pending, Active, Read only). |
45
+ | `status` | Legacy; kept for Bookplate's existing chips. Don't pick it for new state tags. |
32
46
  | `author` | A person who wrote something. |
33
47
  | `series` | A series name. |
34
48
  | `subject` | A subject / genre / keyword. The default. |
@@ -36,7 +50,8 @@ not colour names. Pick by what the tag *is*:
36
50
  | `entryType` | The kind of an entry or record. |
37
51
  | `user` | An app user / account. |
38
52
  | `rating` | A rating value. |
39
- | `neutral` | A state with no category ("no change"): quiet grey. |
53
+
54
+ Note the name clash: `status` is a legacy label tone despite its name; for a state use `success`/`warning`/`danger`/`info`, or `neutral` when it carries no meaning.
40
55
 
41
56
  Each tone has its own `text`, `bg`, and `border` in both light and dark themes.
42
57
  A consumer's theme can't add tones; the list is fixed by the `Theme` type.
@@ -52,8 +67,8 @@ A consumer's theme can't add tones; the list is fixed by the `Theme` type.
52
67
  // Compact chips in a review row (inside a card).
53
68
  {fix.toChips.map((c) => <Tag key={c} size="sm">{c}</Tag>)}
54
69
 
55
- // A status, in neutral or status tone.
56
- <Tag size="sm" tone="status">{write ? 'Read & write' : 'Read only'}</Tag>
70
+ // A state with no meaning to signal: neutral.
71
+ <Tag size="sm" tone="neutral">{write ? 'Read & write' : 'Read only'}</Tag>
57
72
 
58
73
  // A clickable author chip that filters the list.
59
74
  <Tag tone="author" onClick={() => setFilter({ author: name })}>{name}</Tag>
@@ -63,7 +78,12 @@ A consumer's theme can't add tones; the list is fixed by the `Theme` type.
63
78
 
64
79
  - Do choose `tone` by meaning, so the same kind of thing is the same colour
65
80
  everywhere.
81
+ - Do use `tone="warning"` for "Overdue".
66
82
  - Do use `size="sm"` inside text rows and lists.
67
83
  - Don't use `neutral` just to make a tag grey when it has a category.
84
+ - Don't use `subject` or `author` to mean warning or success.
85
+ - Don't use `info` to look like a link (it shares a hue with links; use
86
+ `Button type="link"` for actions).
87
+ - Don't use `status` for a new state tag; it is a legacy label tone.
68
88
  - Don't nest a clickable Tag inside another clickable element (Button, a
69
89
  clickable Card); both would fire.
@@ -3,7 +3,7 @@
3
3
  `import { Popover } from '@korzun/design/control'`
4
4
 
5
5
  A positioning primitive: renders `children` in a portal on `document.body`,
6
- `position: fixed` directly beneath an anchor element, so a dropdown can escape
6
+ `position: fixed` below or above an anchor element, so a dropdown can escape
7
7
  ancestors that clip overflow (rounded cards). It paints **nothing** itself: no
8
8
  background, border, shadow, or radius. `Select` and `ChipsInput` build their
9
9
  dropdowns on it.
@@ -15,24 +15,53 @@ Use something else for: a modal (`useModalDialog`), page action menus
15
15
 
16
16
  | Prop | Type | Default | Notes |
17
17
  |---|---|---|---|
18
- | `anchorRef` | `RefObject<HTMLElement \| null>` | (required) | Element to sit under. Left edges align. |
18
+ | `anchorRef` | `RefObject<HTMLElement \| null>` | (required) | Element to place against. |
19
19
  | `open` | `boolean` | (required) | When `false`, renders nothing. Fully controlled. |
20
20
  | `children` | `ReactNode` | (required) | Your surface: give it its own background, border, radius. |
21
- | `gap` | `number` | `4` | Pixels between the anchor's bottom and the popover. |
21
+ | `side` | `'bottom' \| 'top'` | `'bottom'` | Preferred side; flips to the other side when this one has no room. |
22
+ | `align` | `'start' \| 'center' \| 'end'` | `'start'` | Horizontal alignment to the anchor's left edge, centre, or right edge. |
23
+ | `gap` | `number` | `4` | Pixels between the anchor and the popover; also the margin kept from the viewport's left and right edges when `matchWidth` is false. |
22
24
  | `matchWidth` | `boolean` | `true` | Width = anchor width. `false` lets content size itself. |
23
- | `onClose` | `() => void` | | Called on a mousedown outside both anchor and content. Omit to opt out. Receives no event. |
25
+ | `onClose` | `() => void` | | Called on a mousedown outside both anchor and content, and on Escape (see below). Omit to opt out of both. Receives no event. |
24
26
  | `className` | `string` | | Applied to the fixed wrapper. Override with `'&&'`, never `!important`. |
25
27
 
26
28
  ## Behaviour to know
27
29
 
28
- - **No Escape handling and no focus management.** Add your own keydown handler
29
- if Escape should close it.
30
- - Always opens below the anchor; it does not flip up or clamp to the viewport.
31
- It repositions on window resize and on any scroll (capture phase).
32
- - First paint is skipped until the anchor is measured, so it never flashes at 0,0.
30
+ - **Flip.** It opens on `side`. If the content does not fit on that side and
31
+ the other side has more room, it opens on the other side. When neither side
32
+ fits it keeps whichever has more room.
33
+ - **Clamp.** Only when `matchWidth` is false: `left` is clamped so the
34
+ content stays `gap` pixels inside the viewport's left and right edges;
35
+ content wider than the viewport pins to `gap`. With `matchWidth` (the
36
+ default) it lines up with the anchor exactly, edge margin or not. There is
37
+ no vertical clamp.
38
+ - **Top side is anchored by its bottom edge** (CSS `bottom`), so a popover
39
+ above its anchor stays attached when its content grows or shrinks.
40
+ - **`data-side`.** The wrapper carries `data-side="bottom"` or `"top"`: the side
41
+ actually used after flipping. Style against it (an arrow, an animation
42
+ origin) rather than against the `side` prop.
43
+ - It re-measures, flip decision included, on window resize, on any scroll
44
+ (capture phase), and when its content resizes (`ResizeObserver`, where the
45
+ browser has it), so it stays attached to a scrolled anchor and to content
46
+ that changes size.
47
+ - Its first render is transparent (`opacity: 0`) and is measured in a layout
48
+ effect before paint, so it never flashes at 0,0 or on the wrong side. It is
49
+ not `visibility: hidden`, so an `autoFocus` child takes focus on mount.
50
+ - **Escape.** With `onClose`, an Escape keydown anywhere in the document calls
51
+ `onClose`, unless the event is already `defaultPrevented` (a control such as
52
+ `Select` handled it first). It calls `preventDefault()` on the key, so an
53
+ enclosing native `<dialog>` does not also fire `cancel` and close.
54
+ - **Nested popovers.** Each open popover listens on the document, so with
55
+ nested popovers Escape is taken by the one opened first (the outermost),
56
+ not the innermost. A proper layer stack comes with `Menu`.
57
+ - **No focus management.** Focus stays where it was; return it yourself if
58
+ closing should move it.
33
59
  - z-index is `theme.zIndex.sticky` (1000). Inside a modal `<dialog>` opened with
34
60
  `showModal()`, a body portal sits outside the dialog's top layer, so it is
35
61
  likely hidden behind the dialog and inert. Test before using it there.
62
+ The reverse also bites: an open popover left behind a `showModal()` dialog
63
+ still takes Escape first, so the dialog does not close. Close popovers
64
+ before opening a dialog.
36
65
  - Clicking the anchor does not count as "outside", so a toggle button on the
37
66
  anchor works without racing `onClose`.
38
67
 
@@ -71,4 +100,6 @@ const [open, setOpen] = useState(false);
71
100
 
72
101
  - Do wrap a `Button` in a `<div ref>` to anchor it; `Button` takes no ref.
73
102
  - Do give the content its own surface and radius; the wrapper is transparent.
74
- - Don't expect it to close on Escape or on selection; that is your code.
103
+ - Do call `preventDefault()` in your own Escape handler if you close the
104
+ popover yourself, so `onClose` is not called a second time.
105
+ - Don't expect it to close on selection; that is your code.
package/docs/corners.md CHANGED
@@ -21,7 +21,7 @@ Find where the element sits, then read its radius from this table:
21
21
  | Where the element sits | Radius | Examples |
22
22
  |---|---|---|
23
23
  | On the page background | `lg` | `Card`, modal dialog (`recipe.modal.dialog`), a standalone `Button` (default `radius`), `<Select surface="page">` |
24
- | Inside a card or modal | `md` | inputs (`recipe.input`), `Button radius="card"` / `"modal"`, `Tag`, shaded rows, inset boxes |
24
+ | Inside a card or modal | `md` | inputs (`recipe.input`), `Button radius="card"` / `"modal"`, `Tag`, shaded rows (`recipe.row`), inset boxes |
25
25
  | Inside one of those | `sm` | a chip inside an input, `Button radius="inset"` inside an inset box, a menu item, a Switch track in a shaded row |
26
26
  | Flush with its parent (zero inset, edges touch) | the parent's radius | an unlabelled Select's trigger, an input filling its row |
27
27
  | Inset 4px or less from its parent | `calc(parent − inset)` | a Switch thumb 2px inside a 4px track is 2px |
@@ -63,6 +63,6 @@ const useStyles = createUseStyles((theme: Theme) => ({
63
63
  ```
64
64
 
65
65
  - Never write a literal `borderRadius` (`'12px'`, `'50%'`). The only
66
- non-token form allowed is `calc(theme.radius.X - Npx)` for tight insets.
67
- - Known off-scale values in the library (don't copy them): `CardRow` uses
68
- `12px`, and `Card size="small"` uses `9px`.
66
+ non-token form allowed is `calc(theme.radius.X ± Npx)` for tight insets.
67
+ - A 1px inset works the other way too: `Card size="small"` is
68
+ `calc(radius.md + 1px)` so its flush `md` children stay concentric.
@@ -42,7 +42,7 @@ These are the rules the code already enforces, extracted from the source comment
42
42
 
43
43
  **Rule:** Express shared styling as a `Recipe` object that styles spread (`...theme.recipe.glass`), not as a component.
44
44
 
45
- **Why:** `src/theme/theme.ts`: "Recipes are JSS-spreadable fragments. Loose typing lets them include pseudo-selectors (`&:hover`) and nested rules without fighting JSS's TS surface." The `Recipe` type is deliberately loose for the same reason. `recipe.input`, `focusRing`, `label`, `spinner`, `glass`, `glassHighlight`, `modal.*` and `card.*` are all plain objects, and consumers such as `src/control/button/style.ts` spread them (`...theme.recipe.focusRing`).
45
+ **Why:** `src/theme/theme.ts`: "Recipes are JSS-spreadable fragments. Loose typing lets them include pseudo-selectors (`&:hover`) and nested rules without fighting JSS's TS surface." The `Recipe` type is deliberately loose for the same reason. `recipe.input`, `focusRing`, `label`, `spinner`, `glass`, `glassHighlight`, `row`, `modal.*` and `card.*` are all plain objects, and consumers such as `src/control/button/style.ts` spread them (`...theme.recipe.focusRing`).
46
46
 
47
47
  ## Measured layout numbers live in tokens
48
48
 
package/docs/theme.md CHANGED
@@ -61,8 +61,10 @@ export const useStyle = createUseStyles((theme: Theme) => ({
61
61
  | `color.border` | `default`, `strong`, `light`, `focus`, `hover`, `danger`, `glass`, `glassActive`, `faint`, `loading`, `success`, `section` | Cards and dividers use `strong`; inputs use `default` |
62
62
  | `color.brand` | `default`, `hover`, `active`, `light`, `outline`, `loading*`, `linkHover` | The primary action colour |
63
63
  | `color.danger` | `default`, `hover`, `active`, `light`, `outline`, `loading*` | Destructive actions and errors |
64
- | `color.success` | (a string) | There are no warning or info colours yet |
65
- | `color.chip.<tone>` | `{ text, bg, border }` for `status`, `author`, `series`, `subject`, `book`, `entryType`, `user`, `rating`, `neutral` | Used by `Tag` |
64
+ | `color.success` | (a string) | Solid green |
65
+ | `color.warning` | (a string) | Solid amber |
66
+ | `color.info` | (a string) | Solid blue, the mode's `brand.default` |
67
+ | `color.chip.<tone>` | `{ text, bg, border }` for 13 tones. Status tones: `success`, `warning`, `danger`, `info`, `neutral`. Label tones: `status`, `author`, `series`, `subject`, `book`, `entryType`, `user`, `rating` | Used by `Tag` |
66
68
  | `color.overlay` | `backdrop` | Modal backdrop |
67
69
  | `color.gray` / `blue` / `red` | primitive scales | Don't use these in app code; use the semantic tokens above |
68
70
  | `space` | `xxxs` 0.1rem, `xxs` 0.125, `xs` 0.25, `sm` 0.375, `md` 0.5, `lg` 0.625, `xl` 0.75, `xxl` 1, `xxxl` 1.25, `xxxxl` 1.5, `xxxxxl` 2rem | `md` is the default gap between stacked fields |
@@ -89,6 +91,7 @@ Recipes are style fragments that you spread into a rule: `{ ...theme.recipe.inpu
89
91
  | `recipe.focusRing` | Transparent 2px outline; set `outlineColor: theme.color.brand.outline` on `'&:focus'` |
90
92
  | `recipe.spinner` | 1em rotating box; apply to `SpinnerIcon` |
91
93
  | `recipe.glass` / `glassHighlight` | Frosted translucent surface (floating chrome) and its active state |
94
+ | `recipe.row` | The shaded field row a control sits in inside a card: `bg.cardHeader`, `md` corners, padding `md lg md sm`. Use it for custom rows next to form fields |
92
95
  | `recipe.card.shell` / `header` / `footer` | The Card surface (`lg`), its header bar, and its footer bar |
93
96
  | `recipe.modal.dialog` / `header` / `footer` | A `<dialog>` surface (`lg`, shared width, backdrop), its title, and its button bar |
94
97
 
package/docs/tokens.md CHANGED
@@ -14,11 +14,11 @@ Surfaces, text, borders and state colours, mode-aware. Keys are grouped as follo
14
14
  - `color.text`: `primary secondary muted faint onPrimary onDanger description`
15
15
  - `color.bg`: `page card cardHeader track input footer glass glassFallback glassActive selected hover success placeholder`. `track` must read against both `page` and `card`; `hover` is a translucent scrim; `glass*` feed `recipe.glass`.
16
16
  - `color.border`: `default strong light focus hover danger glass glassActive faint loading success section`
17
- - `color.success`: a single value.
17
+ - `color.success`, `color.warning`, `color.info`: a single value each.
18
18
  - `color.brand`: `default hover active light outline loading loadingHover loadingActive linkHover`
19
19
  - `color.danger`: `default hover active light outline loading loadingHover loadingActive`
20
20
  - `color.overlay`: `backdrop`
21
- - `color.chip`: eight tinted label colourways, each `{ text, bg, border }`: `status author series subject book entryType user rating`. See Slated for curation.
21
+ - `color.chip`: thirteen tinted colourways, each `{ text, bg, border }`. Status tones: `success warning danger info neutral`. Label tones: `status author series subject book entryType user rating` (the `status` label tone is not a status tone). See Slated for curation.
22
22
 
23
23
  ## space
24
24
 
@@ -78,6 +78,7 @@ JSS-spreadable style fragments (`...theme.recipe.x`), not components.
78
78
  - `recipe.spinner`: a 1em rotating indicator using the `theme-rotation` keyframes.
79
79
  - `recipe.glass`: frosted, blurred chrome with a solid fallback where backdrop blur is unsupported.
80
80
  - `recipe.glassHighlight`: the active or pressed fill that sits on top of glass.
81
+ - `recipe.row`: the shaded field row (`bg.cardHeader` fill, `radius.md`, padding `space.md space.lg space.md space.sm`) that `Switch`'s horizontal layout uses; spread it for any custom row that sits beside form fields in a card.
81
82
  - `recipe.modal.dialog`: the shared dialog shell (one width, backdrop, mobile margins and safe-area insets).
82
83
  - `recipe.modal.header`: dialog title row.
83
84
  - `recipe.modal.footer`: dialog action row.
@@ -89,7 +90,7 @@ JSS-spreadable style fragments (`...theme.recipe.x`), not components.
89
90
 
90
91
  Both groups below move into the package byte-for-byte in 0.0.1 and are due for a decision before the API settles.
91
92
 
92
- - `color.chip.*`: eight colourways (`status author series subject book entryType user rating`) named after Bookplate's metadata chips, not after a general role.
93
+ - `color.chip.*`: the eight label colourways (`status author series subject book entryType user rating`) are named after Bookplate's metadata chips, not after a general role.
93
94
  - `size.metadataValue`: `15rem`, a width named after Bookplate's metadata display.
94
95
 
95
96
  No other token name or comment in `src/theme/theme.ts` is clearly Bookplate-specific. Two comments mention app internals (`floatingControlTopBase` refers to the admin picker and `router/nav-layout-style`), but the tokens themselves are generic.