@mitcsutt/kiln-ui 0.2.2 → 0.3.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 (58) hide show
  1. package/README.md +6 -6
  2. package/dist/assets/fonts/archivo-latin-ext-wdth-italic.woff2 +0 -0
  3. package/dist/assets/fonts/archivo-latin-ext-wdth-normal.woff2 +0 -0
  4. package/dist/assets/fonts/archivo-latin-wdth-italic.woff2 +0 -0
  5. package/dist/assets/fonts/archivo-latin-wdth-normal.woff2 +0 -0
  6. package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-ext-wght-italic.woff2 +0 -0
  7. package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-ext-wght-normal.woff2 +0 -0
  8. package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-wght-italic.woff2 +0 -0
  9. package/dist/assets/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2 +0 -0
  10. package/dist/assets/fonts/b612-latin-400-italic.woff2 +0 -0
  11. package/dist/assets/fonts/b612-latin-400-normal.woff2 +0 -0
  12. package/dist/assets/fonts/b612-latin-700-italic.woff2 +0 -0
  13. package/dist/assets/fonts/b612-latin-700-normal.woff2 +0 -0
  14. package/dist/assets/fonts/b612-mono-latin-400-italic.woff2 +0 -0
  15. package/dist/assets/fonts/b612-mono-latin-400-normal.woff2 +0 -0
  16. package/dist/assets/fonts/b612-mono-latin-700-italic.woff2 +0 -0
  17. package/dist/assets/fonts/b612-mono-latin-700-normal.woff2 +0 -0
  18. package/dist/assets/fonts/golos-text-latin-ext-wght-normal.woff2 +0 -0
  19. package/dist/assets/fonts/golos-text-latin-wght-normal.woff2 +0 -0
  20. package/dist/assets/fonts/licenses/archivo.txt +93 -0
  21. package/dist/assets/fonts/licenses/atkinson-hyperlegible-mono.txt +93 -0
  22. package/dist/assets/fonts/licenses/b612-mono.txt +93 -0
  23. package/dist/assets/fonts/licenses/b612.txt +93 -0
  24. package/dist/assets/fonts/licenses/golos-text.txt +93 -0
  25. package/dist/assets/fonts/licenses/shantell-sans.txt +93 -0
  26. package/dist/assets/fonts/shantell-sans-latin-ext-full-italic.woff2 +0 -0
  27. package/dist/assets/fonts/shantell-sans-latin-ext-full-normal.woff2 +0 -0
  28. package/dist/assets/fonts/shantell-sans-latin-full-italic.woff2 +0 -0
  29. package/dist/assets/fonts/shantell-sans-latin-full-normal.woff2 +0 -0
  30. package/dist/components/display/Avatar/Avatar.d.ts +3 -3
  31. package/dist/components/display/Avatar/Avatar.js.map +1 -1
  32. package/dist/icons/Icon.d.ts +1 -1
  33. package/dist/icons/Icon.js.map +1 -1
  34. package/dist/styles.css +1 -1
  35. package/dist/theme/ThemeProvider.d.ts +4 -4
  36. package/dist/theme/ThemeProvider.js.map +1 -1
  37. package/dist/theme/themes.d.ts +1 -1
  38. package/dist/theme/themes.js +15 -3
  39. package/dist/theme/themes.js.map +1 -1
  40. package/dist/themes/fiesta.css +1 -1
  41. package/dist/themes/flightdeck.css +1 -0
  42. package/dist/themes/ledger.css +1 -1
  43. package/dist/themes/monograph.css +1 -1
  44. package/dist/themes/riso.css +1 -0
  45. package/package.json +4 -2
  46. package/skills/custom-theme/SKILL.md +45 -43
  47. package/skills/custom-theme/references/colour.md +1 -1
  48. package/skills/custom-theme/references/motion.md +2 -2
  49. package/skills/custom-theme/references/tokens.md +42 -42
  50. package/skills/custom-theme/references/type.md +13 -10
  51. package/skills/design-rules/SKILL.md +31 -3
  52. package/skills/setup-and-theming/SKILL.md +10 -6
  53. package/skills/setup-and-theming/references/fiesta.md +3 -1
  54. package/skills/setup-and-theming/references/flightdeck.md +39 -0
  55. package/skills/setup-and-theming/references/ledger.md +7 -7
  56. package/skills/setup-and-theming/references/monograph.md +4 -0
  57. package/skills/setup-and-theming/references/paper.md +7 -7
  58. package/skills/setup-and-theming/references/riso.md +32 -0
@@ -26,12 +26,12 @@ export interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'colo
26
26
  * @remarks
27
27
  * `Avatar` shows a picture when there is one and falls back to initials when there isn't (or when
28
28
  * the image fails to load). The fallback colour comes from the name, so the same person gets the
29
- * same colour on every screen. Its shape is the theme's `--radius-avatar`: round in Paper and
30
- * Fiesta, a rounded square in Monograph.
29
+ * same colour on every screen. Its shape is the theme's `--radius-avatar`: round in Paper, Fiesta
30
+ * and Riso, a rounded square in Monograph and Ledger, and nearly square in Flightdeck.
31
31
  *
32
32
  * @privateRemarks
33
33
  * A person or entity. Image with an initials fallback on a deterministic categorical
34
34
  * colour. Shape comes from `--radius-avatar` (rounded square in Monograph/Ledger, round in
35
- * Fiesta).
35
+ * Paper/Fiesta/Riso, nearly square in Flightdeck).
36
36
  */
37
37
  export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":["Avatar","AvatarPrimitive","styles","Avatar_module_default","Avatar$1","forwardRef","rest","groupSize","useContext","AvatarSizeContext","label","alt","name","decorative","text","initials","getInitials","glyphs","Avatar","cx","className","size","color","avatarColor","ring","src"],"sources":["../../../../src/components/display/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, useContext, type HTMLAttributes } from 'react'\nimport { Avatar as AvatarPrimitive } from 'radix-ui'\nimport { cx } from '#utils/cx'\nimport { AvatarSizeContext } from './AvatarContext'\nimport { avatarColor, getInitials } from './avatarUtils'\nimport type { AvatarColor, AvatarSize } from './avatarUtils'\nimport styles from './Avatar.module.css'\n\nexport interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Image URL. While loading, or if it fails, the initials fallback shows. */\n src?: string\n /** Accessible name. Defaults to `name`. Pass `\"\"` when a visible label sits beside it. */\n alt?: string\n /** Person or thing. Drives the initials and the fallback colour. */\n name: string\n /** Default `md`, or the enclosing `AvatarGroup`'s size. */\n size?: AvatarSize\n /** Override the name-derived fallback colour (e.g. a member's assigned colour). */\n color?: AvatarColor\n /** A highlight ring — marks \"you\" in a leaderboard or roster. */\n ring?: boolean\n /**\n * Replace the derived initials — a company's short code (\"NWS\"), a logo's letters. Up to three\n * characters; three are set smaller so they fit the frame.\n */\n initials?: string\n}\n\n/**\n * A person or organisation, as an image with an initials fallback on a colour that's always the\n * same for that name.\n *\n * @remarks\n * `Avatar` shows a picture when there is one and falls back to initials when there isn't (or when\n * the image fails to load). The fallback colour comes from the name, so the same person gets the\n * same colour on every screen. Its shape is the theme's `--radius-avatar`: round in Paper and\n * Fiesta, a rounded square in Monograph.\n *\n * @privateRemarks\n * A person or entity. Image with an initials fallback on a deterministic categorical\n * colour. Shape comes from `--radius-avatar` (rounded square in Monograph/Ledger, round in\n * Fiesta).\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { src, alt, name, size, color, ring = false, initials, className, ...rest },\n ref,\n) {\n const groupSize = useContext(AvatarSizeContext)\n const label = alt ?? name\n const decorative = label === ''\n const text = initials?.trim() ? initials.trim().toLocaleUpperCase() : getInitials(name)\n const glyphs = Array.from(text).length\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={cx(styles.avatar, className)}\n data-size={size ?? groupSize ?? 'md'}\n data-color={color ?? avatarColor(name)}\n data-ring={ring || undefined}\n {...rest}\n >\n {src ? <AvatarPrimitive.Image className={styles.image} src={src} alt={label} /> : null}\n <AvatarPrimitive.Fallback\n className={styles.fallback}\n role={decorative ? undefined : 'img'}\n aria-label={decorative ? undefined : label}\n aria-hidden={decorative || undefined}\n delayMs={src ? 300 : undefined}\n data-glyphs={glyphs > 2 ? 'many' : undefined}\n >\n <span aria-hidden=\"true\">{text}</span>\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n )\n})\n"],"mappings":";;;;;;;;AA2CA,IAAaA,IAASK,EAAyC,SAC7D,EAAE,QAAK,QAAK,SAAM,SAAM,UAAO,UAAO,IAAO,aAAU,cAAW,GAAGC,KACrE,GACA;CACA,IAAMC,IAAYC,EAAWC,CAAiB,GACxCC,IAAQC,KAAOC,GACfC,IAAaH,MAAU,IACvBI,IAAOC,GAAU,KAAK,IAAIA,EAAS,KAAK,CAAC,CAAC,kBAAkB,IAAIC,EAAYJ,CAAI,GAChFK,IAAS,MAAM,KAAKH,CAAI,CAAC,CAAC;CAChC,OACE,kBAACb,EAAgB,MAAjB;EACO;EACL,WAAWkB,EAAGjB,EAAO,QAAQkB,CAAS;EACtC,aAAWC,KAAQd,KAAa;EAChC,cAAYe,KAASC,EAAYX,CAAI;EACrC,aAAWY,KAAQ,KAAA;EACnB,GAAIlB;EANN,UAAA,CAQGmB,IAAM,kBAACxB,EAAgB,OAAjB;GAAuB,WAAWC,EAAO;GAAY;GAAK,KAAKQ;EAAQ,CAAA,IAAI,MAClF,kBAACT,EAAgB,UAAjB;GACE,WAAWC,EAAO;GAClB,MAAMW,IAAa,KAAA,IAAY;GAC/B,cAAYA,IAAa,KAAA,IAAYH;GACrC,eAAaG,KAAc,KAAA;GAC3B,SAASY,IAAM,MAAM,KAAA;GACrB,eAAaR,IAAS,IAAI,SAAS,KAAA;GAEnC,UAAA,kBAAC,QAAD;IAAM,eAAY;IAAQ,UAAAH;GAAW,CAAA;EACb,CAAA,CACN;;AAE1B,CAAC"}
1
+ {"version":3,"file":"Avatar.js","names":["Avatar","AvatarPrimitive","styles","Avatar_module_default","Avatar$1","forwardRef","rest","groupSize","useContext","AvatarSizeContext","label","alt","name","decorative","text","initials","getInitials","glyphs","Avatar","cx","className","size","color","avatarColor","ring","src"],"sources":["../../../../src/components/display/Avatar/Avatar.tsx"],"sourcesContent":["import { forwardRef, useContext, type HTMLAttributes } from 'react'\nimport { Avatar as AvatarPrimitive } from 'radix-ui'\nimport { cx } from '#utils/cx'\nimport { AvatarSizeContext } from './AvatarContext'\nimport { avatarColor, getInitials } from './avatarUtils'\nimport type { AvatarColor, AvatarSize } from './avatarUtils'\nimport styles from './Avatar.module.css'\n\nexport interface AvatarProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'> {\n /** Image URL. While loading, or if it fails, the initials fallback shows. */\n src?: string\n /** Accessible name. Defaults to `name`. Pass `\"\"` when a visible label sits beside it. */\n alt?: string\n /** Person or thing. Drives the initials and the fallback colour. */\n name: string\n /** Default `md`, or the enclosing `AvatarGroup`'s size. */\n size?: AvatarSize\n /** Override the name-derived fallback colour (e.g. a member's assigned colour). */\n color?: AvatarColor\n /** A highlight ring — marks \"you\" in a leaderboard or roster. */\n ring?: boolean\n /**\n * Replace the derived initials — a company's short code (\"NWS\"), a logo's letters. Up to three\n * characters; three are set smaller so they fit the frame.\n */\n initials?: string\n}\n\n/**\n * A person or organisation, as an image with an initials fallback on a colour that's always the\n * same for that name.\n *\n * @remarks\n * `Avatar` shows a picture when there is one and falls back to initials when there isn't (or when\n * the image fails to load). The fallback colour comes from the name, so the same person gets the\n * same colour on every screen. Its shape is the theme's `--radius-avatar`: round in Paper, Fiesta\n * and Riso, a rounded square in Monograph and Ledger, and nearly square in Flightdeck.\n *\n * @privateRemarks\n * A person or entity. Image with an initials fallback on a deterministic categorical\n * colour. Shape comes from `--radius-avatar` (rounded square in Monograph/Ledger, round in\n * Paper/Fiesta/Riso, nearly square in Flightdeck).\n */\nexport const Avatar = forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(\n { src, alt, name, size, color, ring = false, initials, className, ...rest },\n ref,\n) {\n const groupSize = useContext(AvatarSizeContext)\n const label = alt ?? name\n const decorative = label === ''\n const text = initials?.trim() ? initials.trim().toLocaleUpperCase() : getInitials(name)\n const glyphs = Array.from(text).length\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={cx(styles.avatar, className)}\n data-size={size ?? groupSize ?? 'md'}\n data-color={color ?? avatarColor(name)}\n data-ring={ring || undefined}\n {...rest}\n >\n {src ? <AvatarPrimitive.Image className={styles.image} src={src} alt={label} /> : null}\n <AvatarPrimitive.Fallback\n className={styles.fallback}\n role={decorative ? undefined : 'img'}\n aria-label={decorative ? undefined : label}\n aria-hidden={decorative || undefined}\n delayMs={src ? 300 : undefined}\n data-glyphs={glyphs > 2 ? 'many' : undefined}\n >\n <span aria-hidden=\"true\">{text}</span>\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n )\n})\n"],"mappings":";;;;;;;;AA2CA,IAAaA,IAASK,EAAyC,SAC7D,EAAE,QAAK,QAAK,SAAM,SAAM,UAAO,UAAO,IAAO,aAAU,cAAW,GAAGC,KACrE,GACA;CACA,IAAMC,IAAYC,EAAWC,CAAiB,GACxCC,IAAQC,KAAOC,GACfC,IAAaH,MAAU,IACvBI,IAAOC,GAAU,KAAK,IAAIA,EAAS,KAAK,CAAC,CAAC,kBAAkB,IAAIC,EAAYJ,CAAI,GAChFK,IAAS,MAAM,KAAKH,CAAI,CAAC,CAAC;CAChC,OACE,kBAACb,EAAgB,MAAjB;EACO;EACL,WAAWkB,EAAGjB,EAAO,QAAQkB,CAAS;EACtC,aAAWC,KAAQd,KAAa;EAChC,cAAYe,KAASC,EAAYX,CAAI;EACrC,aAAWY,KAAQ,KAAA;EACnB,GAAIlB;EANN,UAAA,CAQGmB,IAAM,kBAACxB,EAAgB,OAAjB;GAAuB,WAAWC,EAAO;GAAY;GAAK,KAAKQ;EAAQ,CAAA,IAAI,MAClF,kBAACT,EAAgB,UAAjB;GACE,WAAWC,EAAO;GAClB,MAAMW,IAAa,KAAA,IAAY;GAC/B,cAAYA,IAAa,KAAA,IAAYH;GACrC,eAAaG,KAAc,KAAA;GAC3B,SAASY,IAAM,MAAM,KAAA;GACrB,eAAaR,IAAS,IAAI,SAAS,KAAA;GAEnC,UAAA,kBAAC,QAAD;IAAM,eAAY;IAAQ,UAAAH;GAAW,CAAA;EACb,CAAA,CACN;;AAE1B,CAAC"}
@@ -8,7 +8,7 @@ export interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
8
8
  }
9
9
  /**
10
10
  * Base for the library's own glyphs. 20×20 grid, stroke weight is a theme token
11
- * (`--icon-stroke`), so Fiesta icons are chunky and Monograph icons are fine-lined.
11
+ * (`--icon-stroke`), so Fiesta icons are chunky and Flightdeck icons are fine-lined.
12
12
  * Consumers may pass any SVG/icon node where a component accepts `icon` props.
13
13
  */
14
14
  export declare function createIcon(displayName: string, paths: React.ReactNode): import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","names":["styles","Icon_module_default","createIcon","Component","forwardRef","rest","cx","className","size","label","paths","displayName"],"sources":["../../src/icons/Icon.tsx"],"sourcesContent":["import { forwardRef, type SVGProps } from 'react'\nimport { cx } from '#utils/cx'\nimport styles from './Icon.module.css'\n\nexport type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'inherit'\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {\n /** `inherit` (default) sizes to the surrounding font-size (1em). */\n size?: IconSize\n /** Accessible name. Omit for decorative icons (the default) — they're aria-hidden. */\n label?: string\n}\n\n/**\n * Base for the library's own glyphs. 20×20 grid, stroke weight is a theme token\n * (`--icon-stroke`), so Fiesta icons are chunky and Monograph icons are fine-lined.\n * Consumers may pass any SVG/icon node where a component accepts `icon` props.\n */\nexport function createIcon(displayName: string, paths: React.ReactNode) {\n const Component = forwardRef<SVGSVGElement, IconProps>(function Icon(\n { size = 'inherit', label, className, ...rest },\n ref,\n ) {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cx(styles.icon, className)}\n data-size={size}\n aria-hidden={label ? undefined : true}\n aria-label={label}\n role={label ? 'img' : undefined}\n focusable=\"false\"\n {...rest}\n >\n {paths}\n </svg>\n )\n })\n Component.displayName = displayName\n return Component\n}\n"],"mappings":";;;;;AAkBA,SAAgBE,EAAW,GAAqB,GAAwB;CACtE,IAAMC,IAAYC,EAAqC,SACrD,EAAE,UAAO,WAAW,UAAO,cAAW,GAAGC,KACzC,GACA;EACA,OACE,kBAAC,OAAD;GACO;GACL,SAAQ;GACR,MAAK;GACL,QAAO;GACP,eAAc;GACd,gBAAe;GACf,WAAWC,EAAGN,EAAO,MAAMO,CAAS;GACpC,aAAWC;GACX,eAAa,MAAQ,KAAA;GACrB,cAAYC;GACZ,MAAMA,IAAQ,QAAQ,KAAA;GACtB,WAAU;GACV,GAAIJ;GAEH,UAAAK;EACE,CAAA;CAET,CAAC;CAED,OADA,EAAU,cAAcC,GACjBR;AACT"}
1
+ {"version":3,"file":"Icon.js","names":["styles","Icon_module_default","createIcon","Component","forwardRef","rest","cx","className","size","label","paths","displayName"],"sources":["../../src/icons/Icon.tsx"],"sourcesContent":["import { forwardRef, type SVGProps } from 'react'\nimport { cx } from '#utils/cx'\nimport styles from './Icon.module.css'\n\nexport type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'inherit'\n\nexport interface IconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {\n /** `inherit` (default) sizes to the surrounding font-size (1em). */\n size?: IconSize\n /** Accessible name. Omit for decorative icons (the default) — they're aria-hidden. */\n label?: string\n}\n\n/**\n * Base for the library's own glyphs. 20×20 grid, stroke weight is a theme token\n * (`--icon-stroke`), so Fiesta icons are chunky and Flightdeck icons are fine-lined.\n * Consumers may pass any SVG/icon node where a component accepts `icon` props.\n */\nexport function createIcon(displayName: string, paths: React.ReactNode) {\n const Component = forwardRef<SVGSVGElement, IconProps>(function Icon(\n { size = 'inherit', label, className, ...rest },\n ref,\n ) {\n return (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cx(styles.icon, className)}\n data-size={size}\n aria-hidden={label ? undefined : true}\n aria-label={label}\n role={label ? 'img' : undefined}\n focusable=\"false\"\n {...rest}\n >\n {paths}\n </svg>\n )\n })\n Component.displayName = displayName\n return Component\n}\n"],"mappings":";;;;;AAkBA,SAAgBE,EAAW,GAAqB,GAAwB;CACtE,IAAMC,IAAYC,EAAqC,SACrD,EAAE,UAAO,WAAW,UAAO,cAAW,GAAGC,KACzC,GACA;EACA,OACE,kBAAC,OAAD;GACO;GACL,SAAQ;GACR,MAAK;GACL,QAAO;GACP,eAAc;GACd,gBAAe;GACf,WAAWC,EAAGN,EAAO,MAAMO,CAAS;GACpC,aAAWC;GACX,eAAa,MAAQ,KAAA;GACrB,cAAYC;GACZ,MAAMA,IAAQ,QAAQ,KAAA;GACtB,WAAU;GACV,GAAIJ;GAEH,UAAAK;EACE,CAAA;CAET,CAAC;CAED,OADA,EAAU,cAAcC,GACjBR;AACT"}