@classic-homes/theme-react 0.2.0 → 0.2.2
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.
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +20 -3
- package/dist/index.mjs +20 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -198,9 +198,12 @@ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<React$1.
|
|
|
198
198
|
* - Optional subtitle with branded styling
|
|
199
199
|
* - Optional actions slot for CTA buttons
|
|
200
200
|
* - Consistent typography using design tokens: `default` and `centered`
|
|
201
|
-
*
|
|
202
|
-
* 500 italic
|
|
203
|
-
*
|
|
201
|
+
* set the theme heading scale for the rendered level explicitly (h1 =
|
|
202
|
+
* Spectral 500 italic via `text-h1`, h2-h6 = Figtree 600 via `text-h2`..
|
|
203
|
+
* `text-h6`). They do not lean on the bare-element styles: Tailwind
|
|
204
|
+
* preflight outranks the theme's `@layer` heading rules in consumer apps,
|
|
205
|
+
* which left the title at body size. `hero` and `form` are display styles
|
|
206
|
+
* with their own scale.
|
|
204
207
|
*/
|
|
205
208
|
declare const pageHeaderContainerVariants: (props?: ({
|
|
206
209
|
variant?: "default" | "form" | "hero" | "centered" | null | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -198,9 +198,12 @@ declare const DialogDescription: React$1.ForwardRefExoticComponent<Omit<React$1.
|
|
|
198
198
|
* - Optional subtitle with branded styling
|
|
199
199
|
* - Optional actions slot for CTA buttons
|
|
200
200
|
* - Consistent typography using design tokens: `default` and `centered`
|
|
201
|
-
*
|
|
202
|
-
* 500 italic
|
|
203
|
-
*
|
|
201
|
+
* set the theme heading scale for the rendered level explicitly (h1 =
|
|
202
|
+
* Spectral 500 italic via `text-h1`, h2-h6 = Figtree 600 via `text-h2`..
|
|
203
|
+
* `text-h6`). They do not lean on the bare-element styles: Tailwind
|
|
204
|
+
* preflight outranks the theme's `@layer` heading rules in consumer apps,
|
|
205
|
+
* which left the title at body size. `hero` and `form` are display styles
|
|
206
|
+
* with their own scale.
|
|
204
207
|
*/
|
|
205
208
|
declare const pageHeaderContainerVariants: (props?: ({
|
|
206
209
|
variant?: "default" | "form" | "hero" | "centered" | null | undefined;
|
package/dist/index.js
CHANGED
|
@@ -213,7 +213,7 @@ var Input = React3.forwardRef(
|
|
|
213
213
|
"aria-describedby": ariaDescribedBy,
|
|
214
214
|
required,
|
|
215
215
|
className: cn(
|
|
216
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
216
|
+
"flex h-10 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
217
217
|
ariaInvalid === true || ariaInvalid === "true" ? "border-destructive focus-visible:ring-destructive" : "",
|
|
218
218
|
className
|
|
219
219
|
),
|
|
@@ -351,7 +351,7 @@ var PasswordInput = React5.forwardRef(
|
|
|
351
351
|
"aria-label": ariaLabel,
|
|
352
352
|
"aria-labelledby": ariaLabelledBy,
|
|
353
353
|
className: cn(
|
|
354
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
354
|
+
"flex h-10 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 pr-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
355
355
|
className
|
|
356
356
|
),
|
|
357
357
|
disabled,
|
|
@@ -713,6 +713,14 @@ var pageHeaderSubtitleVariants = (0, import_class_variance_authority4.cva)("text
|
|
|
713
713
|
variant: "default"
|
|
714
714
|
}
|
|
715
715
|
});
|
|
716
|
+
var levelTypeClass = {
|
|
717
|
+
h1: "font-serif italic text-h1",
|
|
718
|
+
h2: "font-sans not-italic text-h2",
|
|
719
|
+
h3: "font-sans not-italic text-h3",
|
|
720
|
+
h4: "font-sans not-italic text-h4",
|
|
721
|
+
h5: "font-sans not-italic text-h5",
|
|
722
|
+
h6: "font-sans not-italic text-h6"
|
|
723
|
+
};
|
|
716
724
|
var pageHeaderActionsVariants = (0, import_class_variance_authority4.cva)("flex gap-4", {
|
|
717
725
|
variants: {
|
|
718
726
|
variant: {
|
|
@@ -742,7 +750,16 @@ var PageHeader = React12.forwardRef(
|
|
|
742
750
|
className: cn(pageHeaderContainerVariants({ variant }), className),
|
|
743
751
|
...props,
|
|
744
752
|
children: [
|
|
745
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
754
|
+
Heading,
|
|
755
|
+
{
|
|
756
|
+
className: cn(
|
|
757
|
+
pageHeaderTitleVariants({ variant }),
|
|
758
|
+
variant === "default" || variant === "centered" || variant == null ? levelTypeClass[Heading] : void 0
|
|
759
|
+
),
|
|
760
|
+
children: title
|
|
761
|
+
}
|
|
762
|
+
),
|
|
746
763
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: pageHeaderSubtitleVariants({ variant }), children: subtitle }),
|
|
747
764
|
actions && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: pageHeaderActionsVariants({ variant }), children: actions })
|
|
748
765
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -118,7 +118,7 @@ var Input = React3.forwardRef(
|
|
|
118
118
|
"aria-describedby": ariaDescribedBy,
|
|
119
119
|
required,
|
|
120
120
|
className: cn(
|
|
121
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
121
|
+
"flex h-10 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
122
122
|
ariaInvalid === true || ariaInvalid === "true" ? "border-destructive focus-visible:ring-destructive" : "",
|
|
123
123
|
className
|
|
124
124
|
),
|
|
@@ -256,7 +256,7 @@ var PasswordInput = React5.forwardRef(
|
|
|
256
256
|
"aria-label": ariaLabel,
|
|
257
257
|
"aria-labelledby": ariaLabelledBy,
|
|
258
258
|
className: cn(
|
|
259
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
259
|
+
"flex h-10 w-full rounded-md border border-input bg-background text-foreground px-3 py-2 pr-10 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
260
260
|
className
|
|
261
261
|
),
|
|
262
262
|
disabled,
|
|
@@ -618,6 +618,14 @@ var pageHeaderSubtitleVariants = cva4("text-muted-foreground", {
|
|
|
618
618
|
variant: "default"
|
|
619
619
|
}
|
|
620
620
|
});
|
|
621
|
+
var levelTypeClass = {
|
|
622
|
+
h1: "font-serif italic text-h1",
|
|
623
|
+
h2: "font-sans not-italic text-h2",
|
|
624
|
+
h3: "font-sans not-italic text-h3",
|
|
625
|
+
h4: "font-sans not-italic text-h4",
|
|
626
|
+
h5: "font-sans not-italic text-h5",
|
|
627
|
+
h6: "font-sans not-italic text-h6"
|
|
628
|
+
};
|
|
621
629
|
var pageHeaderActionsVariants = cva4("flex gap-4", {
|
|
622
630
|
variants: {
|
|
623
631
|
variant: {
|
|
@@ -647,7 +655,16 @@ var PageHeader = React12.forwardRef(
|
|
|
647
655
|
className: cn(pageHeaderContainerVariants({ variant }), className),
|
|
648
656
|
...props,
|
|
649
657
|
children: [
|
|
650
|
-
/* @__PURE__ */ jsx11(
|
|
658
|
+
/* @__PURE__ */ jsx11(
|
|
659
|
+
Heading,
|
|
660
|
+
{
|
|
661
|
+
className: cn(
|
|
662
|
+
pageHeaderTitleVariants({ variant }),
|
|
663
|
+
variant === "default" || variant === "centered" || variant == null ? levelTypeClass[Heading] : void 0
|
|
664
|
+
),
|
|
665
|
+
children: title
|
|
666
|
+
}
|
|
667
|
+
),
|
|
651
668
|
subtitle && /* @__PURE__ */ jsx11("p", { className: pageHeaderSubtitleVariants({ variant }), children: subtitle }),
|
|
652
669
|
actions && /* @__PURE__ */ jsx11("div", { className: pageHeaderActionsVariants({ variant }), children: actions })
|
|
653
670
|
]
|