@zukhruf/shadcn 0.8.58 → 0.8.60

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 (3) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/styles.css +22 -0
package/README.md CHANGED
@@ -127,7 +127,7 @@ The stylesheet has eight patches:
127
127
 
128
128
  - **A select popup sits on its trigger.** With `alignItemWithTrigger`, the default of `SelectContent`, Base UI lines up the text of the selected item with the text of the trigger. The trigger's text starts after a 1px border and `ps-2.5`, 11px; the popup draws its edge with `ring-1`, a shadow, so the item's text started at 10px. Thus the popup sat 1px off the trigger: in Meddit at 1280px, 769–1169 for a trigger at 768–1168, and the label under the popup showed at its edge. The patch sets `padding-inline: 1px` on `[data-slot="select-content"]`, in `@layer components`. The popup then has the trigger's edges in both directions, and a popup opened without `alignItemWithTrigger` lines up its text with the trigger's text too.
129
129
 
130
- - **The controls take their height and background from the theme.** `--control-height` sets the height of `Input`, `SelectTrigger` at `data-size="default"`, `InputGroup` and `Button` at the default size, and the minimum height of `Textarea` and `ComboboxChips`. `--control-height-sm` sets the height of `Button` at `size="sm"`. The button rules are keyed on the `group/button` class of `buttonVariants()`, so a link with the classes of a button takes them too. `--control-background` sets the background of `Input`, `Textarea`, `SelectTrigger`, `InputGroup` and `ComboboxChips`. Without a value, each rule falls back to nova: 32px (64px for `Textarea`), 28px, and `transparent` (`input/30` under `.dark`). Each rule is keyed on the nova class that it replaces, for example `[data-slot='input'].h-8`, so a class of the app that tailwind-merge swaps in for that class turns the rule off. A disabled control, an `InputGroup` with a textarea or a block-aligned addon, a hovered dark `SelectTrigger` and a button of an `InputGroup` keep their nova styles. The patch is in `@layer utilities`. See [ADR 0006](./docs/adr/0006-a-host-gets-its-looks-through-theme-tokens-and-data-attribute-patches.md).
130
+ - **The controls take their height and background from the theme.** `--control-height` sets the height of `Input`, `SelectTrigger` at `data-size="default"`, `InputGroup` and `Button` at the default size, and the minimum height of `Textarea` and `ComboboxChips`. `--control-height-sm` sets the height of `Button` at `size="sm"`. The button rules are keyed on the `group/button` class of `buttonVariants()`, so a link with the classes of a button takes them too. `--control-background` sets the background of `Input`, `Textarea`, `SelectTrigger`, `InputGroup`, `ComboboxChips` and a `PopoverTrigger` rendered as an outline `Button`, the trigger of a date picker. A `Button` of another variant, and an outline `Button` that opens no popover, keep their nova background. Without a value, each rule falls back to nova: 32px (64px for `Textarea`), 28px, and `transparent` (`background` for the `PopoverTrigger`, `input/30` under `.dark`). Each rule is keyed on the nova class that it replaces, for example `[data-slot='input'].h-8`, so a class of the app that tailwind-merge swaps in for that class turns the rule off. A disabled control, an `InputGroup` with a textarea or a block-aligned addon, a hovered dark `SelectTrigger`, a hovered or open `PopoverTrigger` and a button of an `InputGroup` keep their nova styles. The patch is in `@layer utilities`. See [ADR 0006](./docs/adr/0006-a-host-gets-its-looks-through-theme-tokens-and-data-attribute-patches.md).
131
131
 
132
132
  - **The field labels take their colour and size from the theme.** `FieldLabel` and `FieldTitle` both write `data-slot="field-label"`. `--field-label-foreground` sets their colour and `--field-label-font-size` their size. Without a value, a label inherits its colour and keeps nova's `text-sm`, 14px. A label in a `Field` with `data-invalid="true"` keeps the `text-destructive` it inherits from the `Field`. The size rule is keyed on `text-sm`; nova gives a label no colour class, so the colour rule has no specificity and any `text-*` class of the app wins over it. The patch is in `@layer utilities`. See [ADR 0006](./docs/adr/0006-a-host-gets-its-looks-through-theme-tokens-and-data-attribute-patches.md).
133
133
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zukhruf/shadcn",
3
- "version": "0.8.58",
3
+ "version": "0.8.60",
4
4
  "description": "Each shadcn/ui component for Base UI with the nova preset, in one package. An app imports the components from one entry and the styles from one stylesheet. The shadcn CLI writes the source, and nobody edits it by hand.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/styles.css CHANGED
@@ -133,6 +133,28 @@
133
133
  color-mix(in oklab, var(--input) 30%, transparent)
134
134
  );
135
135
  }
136
+
137
+ /*
138
+ * a date picker's trigger is a PopoverTrigger rendered as an outline Button,
139
+ * a field like a SelectTrigger, so it takes the token too; only the outline
140
+ * variant carries bg-background and dark:bg-input/30, so a ghost or default
141
+ * Button as a trigger keeps its look, and so does an outline Button that
142
+ * opens no popover; a hovered or open trigger keeps its nova muted background
143
+ */
144
+ [data-slot='popover-trigger'].group\/button.bg-background:not(:hover):not(
145
+ [aria-expanded='true']
146
+ ) {
147
+ background-color: var(--control-background, var(--background));
148
+ }
149
+
150
+ [data-slot='popover-trigger'].group\/button.dark\:bg-input\/30:not(
151
+ :hover
152
+ ):not([aria-expanded='true']):is(.dark, .dark *) {
153
+ background-color: var(
154
+ --control-background,
155
+ color-mix(in oklab, var(--input) 30%, transparent)
156
+ );
157
+ }
136
158
  }
137
159
 
138
160
  /*