@tryghost/shade 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
@@ -10,11 +10,11 @@ var ComboboxTrigger = React$1.forwardRef(({ children, className, ...props }, ref
10
10
  asChild: true,
11
11
  children: /* @__PURE__ */ jsxs("button", {
12
12
  ref,
13
- className: cn(inputSurface("self"), inputSurfaceClasses.disabledFieldSelf, "flex h-(--control-height) w-full min-w-0 items-center justify-between px-3 text-control hover:bg-button-hover", className),
13
+ className: cn(inputSurface("self"), inputSurfaceClasses.disabledFieldSelf, "flex h-(--control-height) w-full min-w-0 items-center justify-between pr-2 pl-3 text-control hover:bg-button-hover", className),
14
14
  role: "combobox",
15
15
  ...props,
16
16
  type: "button",
17
- children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "ml-2 size-4 shrink-0 opacity-50" })]
17
+ children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "-mr-0.5 ml-2 size-4 shrink-0 opacity-50" })]
18
18
  })
19
19
  }));
20
20
  ComboboxTrigger.displayName = "ComboboxTrigger";
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","names":[],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDown } from 'lucide-react';\n\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { inputSurface, inputSurfaceClasses } from '@/components/ui/input-surface';\nimport { cn } from '@/lib/utils';\n\nconst Combobox = Popover;\n\nconst ComboboxTrigger = React.forwardRef<\n HTMLButtonElement,\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'>\n>(({ children, className, ...props }, ref) => (\n <PopoverTrigger asChild>\n <button\n ref={ref}\n className={cn(\n inputSurface('self'),\n inputSurfaceClasses.disabledFieldSelf,\n 'flex h-(--control-height) w-full min-w-0 items-center justify-between px-3 text-control hover:bg-button-hover',\n className,\n )}\n role=\"combobox\"\n {...props}\n type=\"button\"\n >\n {children}\n <ChevronDown className=\"ml-2 size-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n));\nComboboxTrigger.displayName = 'ComboboxTrigger';\n\ninterface ComboboxValueProps extends React.HTMLAttributes<HTMLSpanElement> {\n placeholder?: boolean;\n}\n\nconst ComboboxValue = React.forwardRef<HTMLSpanElement, ComboboxValueProps>(\n ({ className, placeholder = false, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n 'min-w-0 flex-1 truncate text-left',\n placeholder && 'text-muted-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\nComboboxValue.displayName = 'ComboboxValue';\n\nconst ComboboxContent = React.forwardRef<\n React.ElementRef<typeof PopoverContent>,\n React.ComponentPropsWithoutRef<typeof PopoverContent>\n>(({ align = 'start', className, ...props }, ref) => (\n <PopoverContent\n ref={ref}\n align={align}\n className={cn('z-[9999] w-(--radix-popover-trigger-width) p-0', className)}\n {...props}\n />\n));\nComboboxContent.displayName = 'ComboboxContent';\n\nexport { Combobox, ComboboxContent, ComboboxTrigger, ComboboxValue };\n"],"mappings":";;;;;;;AAOA,IAAM,WAAW;AAEjB,IAAM,kBAAkB,QAAM,YAG3B,EAAE,UAAU,WAAW,GAAG,SAAS,QACpC,oBAAC,gBAAD;CAAgB,SAAA;WACd,qBAAC,UAAD;EACO;EACL,WAAW,GACT,aAAa,MAAM,GACnB,oBAAoB,mBACpB,iHACA,SACF;EACA,MAAK;EACL,GAAI;EACJ,MAAK;YAVP,CAYG,UACD,oBAAC,aAAD,EAAa,WAAU,kCAAmC,CAAA,CACpD;;AACM,CAAA,CACjB;AACD,gBAAgB,cAAc;AAM9B,IAAM,gBAAgB,QAAM,YACzB,EAAE,WAAW,cAAc,OAAO,GAAG,SAAS,QAC7C,oBAAC,QAAD;CACO;CACL,WAAW,GACT,qCACA,eAAe,yBACf,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,cAAc,cAAc;AAE5B,IAAM,kBAAkB,QAAM,YAG3B,EAAE,QAAQ,SAAS,WAAW,GAAG,SAAS,QAC3C,oBAAC,gBAAD;CACO;CACE;CACP,WAAW,GAAG,kDAAkD,SAAS;CACzE,GAAI;AACL,CAAA,CACF;AACD,gBAAgB,cAAc"}
1
+ {"version":3,"file":"combobox.js","names":[],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDown } from 'lucide-react';\n\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { inputSurface, inputSurfaceClasses } from '@/components/ui/input-surface';\nimport { cn } from '@/lib/utils';\n\nconst Combobox = Popover;\n\nconst ComboboxTrigger = React.forwardRef<\n HTMLButtonElement,\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'>\n>(({ children, className, ...props }, ref) => (\n <PopoverTrigger asChild>\n <button\n ref={ref}\n className={cn(\n inputSurface('self'),\n inputSurfaceClasses.disabledFieldSelf,\n // Chevron position matches SelectTrigger.\n 'flex h-(--control-height) w-full min-w-0 items-center justify-between pr-2 pl-3 text-control hover:bg-button-hover',\n className,\n )}\n role=\"combobox\"\n {...props}\n type=\"button\"\n >\n {children}\n <ChevronDown className=\"-mr-0.5 ml-2 size-4 shrink-0 opacity-50\" />\n </button>\n </PopoverTrigger>\n));\nComboboxTrigger.displayName = 'ComboboxTrigger';\n\ninterface ComboboxValueProps extends React.HTMLAttributes<HTMLSpanElement> {\n placeholder?: boolean;\n}\n\nconst ComboboxValue = React.forwardRef<HTMLSpanElement, ComboboxValueProps>(\n ({ className, placeholder = false, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(\n 'min-w-0 flex-1 truncate text-left',\n placeholder && 'text-muted-foreground',\n className,\n )}\n {...props}\n />\n ),\n);\nComboboxValue.displayName = 'ComboboxValue';\n\nconst ComboboxContent = React.forwardRef<\n React.ElementRef<typeof PopoverContent>,\n React.ComponentPropsWithoutRef<typeof PopoverContent>\n>(({ align = 'start', className, ...props }, ref) => (\n <PopoverContent\n ref={ref}\n align={align}\n className={cn('z-[9999] w-(--radix-popover-trigger-width) p-0', className)}\n {...props}\n />\n));\nComboboxContent.displayName = 'ComboboxContent';\n\nexport { Combobox, ComboboxContent, ComboboxTrigger, ComboboxValue };\n"],"mappings":";;;;;;;AAOA,IAAM,WAAW;AAEjB,IAAM,kBAAkB,QAAM,YAG3B,EAAE,UAAU,WAAW,GAAG,SAAS,QACpC,oBAAC,gBAAD;CAAgB,SAAA;WACd,qBAAC,UAAD;EACO;EACL,WAAW,GACT,aAAa,MAAM,GACnB,oBAAoB,mBAEpB,sHACA,SACF;EACA,MAAK;EACL,GAAI;EACJ,MAAK;YAXP,CAaG,UACD,oBAAC,aAAD,EAAa,WAAU,0CAA2C,CAAA,CAC5D;;AACM,CAAA,CACjB;AACD,gBAAgB,cAAc;AAM9B,IAAM,gBAAgB,QAAM,YACzB,EAAE,WAAW,cAAc,OAAO,GAAG,SAAS,QAC7C,oBAAC,QAAD;CACO;CACL,WAAW,GACT,qCACA,eAAe,yBACf,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,cAAc,cAAc;AAE5B,IAAM,kBAAkB,QAAM,YAG3B,EAAE,QAAQ,SAAS,WAAW,GAAG,SAAS,QAC3C,oBAAC,gBAAD;CACO;CACE;CACP,WAAW,GAAG,kDAAkD,SAAS;CACzE,GAAI;AACL,CAAA,CACF;AACD,gBAAgB,cAAc"}
@@ -5,8 +5,8 @@ import { inputSurface } from "./input-surface.js";
5
5
  var tokenFieldClasses = {
6
6
  field: cn(inputSurface("within"), "relative flex min-h-(--control-height) w-full cursor-text flex-wrap items-center gap-1 p-0.75 text-control"),
7
7
  input: "min-w-20 flex-1 bg-transparent px-2 text-control outline-hidden placeholder:text-muted-foreground",
8
- chip: "h-6 max-w-full cursor-pointer gap-1 rounded-full border-transparent px-2 pr-1.5 text-sm",
9
- chevron: "pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2)] right-3 size-4 text-muted-foreground"
8
+ chip: "h-auto min-h-6 max-w-full cursor-pointer gap-1 rounded-xl border-transparent px-2 py-0.75 pr-1.5 text-left text-sm leading-4 whitespace-normal",
9
+ chevron: "pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2-1px)] right-1.5 size-4 text-muted-foreground"
10
10
  };
11
11
  //#endregion
12
12
  export { tokenFieldClasses };
@@ -1 +1 @@
1
- {"version":3,"file":"token-field.js","names":[],"sources":["../../../src/components/ui/token-field.ts"],"sourcesContent":["import { inputSurface } from '@/components/ui/input-surface';\nimport { cn } from '@/lib/utils';\n\n/** Shared chip density for token inputs such as labels, tags and authors. */\nexport const tokenFieldClasses = {\n field: cn(\n inputSurface('within'),\n 'relative flex min-h-(--control-height) w-full cursor-text flex-wrap items-center gap-1 p-0.75 text-control',\n ),\n input:\n 'min-w-20 flex-1 bg-transparent px-2 text-control outline-hidden placeholder:text-muted-foreground',\n chip: 'h-6 max-w-full cursor-pointer gap-1 rounded-full border-transparent px-2 pr-1.5 text-sm',\n chevron:\n 'pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2)] right-3 size-4 text-muted-foreground',\n} as const;\n"],"mappings":";;;;AAIA,IAAa,oBAAoB;CAC/B,OAAO,GACL,aAAa,QAAQ,GACrB,4GACF;CACA,OACE;CACF,MAAM;CACN,SACE;AACJ"}
1
+ {"version":3,"file":"token-field.js","names":[],"sources":["../../../src/components/ui/token-field.ts"],"sourcesContent":["import { inputSurface } from '@/components/ui/input-surface';\nimport { cn } from '@/lib/utils';\n\n/** Shared chip density for token inputs such as labels, tags and authors. */\nexport const tokenFieldClasses = {\n field: cn(\n inputSurface('within'),\n 'relative flex min-h-(--control-height) w-full cursor-text flex-wrap items-center gap-1 p-0.75 text-control',\n ),\n input:\n 'min-w-20 flex-1 bg-transparent px-2 text-control outline-hidden placeholder:text-muted-foreground',\n // 24px on one line; long names wrap.\n chip: 'h-auto min-h-6 max-w-full cursor-pointer gap-1 rounded-xl border-transparent px-2 py-0.75 pr-1.5 text-left text-sm leading-4 whitespace-normal',\n // Matches Select's chevron; offsets start inside the 1px border.\n chevron:\n 'pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2-1px)] right-1.5 size-4 text-muted-foreground',\n} as const;\n"],"mappings":";;;;AAIA,IAAa,oBAAoB;CAC/B,OAAO,GACL,aAAa,QAAQ,GACrB,4GACF;CACA,OACE;CAEF,MAAM;CAEN,SACE;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/shade",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "Ghost design system for React apps",
5
5
  "license": "MIT",
6
6
  "author": "Ghost Foundation",
package/styles.css CHANGED
@@ -241,6 +241,12 @@ html.theme-switching *::after {
241
241
  border-bottom-width: 0;
242
242
  }
243
243
 
244
+ /* Once the header has stuck, its solid background is the edge on its own.
245
+ Transparent rather than gone, so the header doesn't shift as it sticks. */
246
+ [data-large-title-header][data-condensed] [data-page-header='page-header'] {
247
+ border-bottom-color: transparent;
248
+ }
249
+
244
250
  [data-large-title-header] [data-page-header='page-header'] ~ * {
245
251
  margin-top: 24px;
246
252
  }
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,QAAA,MAAM,QAAQ,0DAAU,CAAC;AAEzB,QAAA,MAAM,eAAe,uIAqBnB,CAAC;AAGH,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACxE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,aAAa,4FAYlB,CAAC;AAGF,QAAA,MAAM,eAAe,oOAUnB,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,QAAA,MAAM,QAAQ,0DAAU,CAAC;AAEzB,QAAA,MAAM,eAAe,uIAsBnB,CAAC;AAGH,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACxE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,aAAa,4FAYlB,CAAC;AAGF,QAAA,MAAM,eAAe,oOAUnB,CAAC;AAGH,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  export declare const tokenFieldClasses: {
3
3
  readonly field: string;
4
4
  readonly input: 'min-w-20 flex-1 bg-transparent px-2 text-control outline-hidden placeholder:text-muted-foreground';
5
- readonly chip: 'h-6 max-w-full cursor-pointer gap-1 rounded-full border-transparent px-2 pr-1.5 text-sm';
6
- readonly chevron: 'pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2)] right-3 size-4 text-muted-foreground';
5
+ readonly chip: 'h-auto min-h-6 max-w-full cursor-pointer gap-1 rounded-xl border-transparent px-2 py-0.75 pr-1.5 text-left text-sm leading-4 whitespace-normal';
6
+ readonly chevron: 'pointer-events-none absolute top-[calc((var(--control-height)-var(--spacing)*4)/2-1px)] right-1.5 size-4 text-muted-foreground';
7
7
  };
8
8
  //# sourceMappingURL=token-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"token-field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/token-field.ts"],"names":[],"mappings":"AAGA,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB;aAC5B,KAAK;aAIL,KAAK,EACH,mGAAmG;aACrG,IAAI,EAAE,yFAAyF;aAC/F,OAAO,EACL,0HAA0H;CACpH,CAAC"}
1
+ {"version":3,"file":"token-field.d.ts","sourceRoot":"","sources":["../../../src/components/ui/token-field.ts"],"names":[],"mappings":"AAGA,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB;aAC5B,KAAK;aAIL,KAAK,EACH,mGAAmG;aAErG,IAAI,EAAE,gJAAgJ;aAEtJ,OAAO,EACL,gIAAgI;CAC1H,CAAC"}