@techfides/ui-library-design 0.5.0 → 0.7.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.
- package/dist/anatomies.d.ts +1586 -0
- package/dist/anatomies.js +107 -0
- package/dist/anatomies.js.map +1 -0
- package/dist/anatomy.d.ts +13 -0
- package/dist/anatomy.js +6 -0
- package/dist/anatomy.js.map +1 -0
- package/dist/control.d.ts +1 -2
- package/dist/control.js +1 -2
- package/dist/control.js.map +1 -1
- package/dist/index.d.ts +55 -52
- package/dist/index.js +59 -56
- package/dist/recipes/accordion.d.ts +28 -1
- package/dist/recipes/accordion.js +29 -1
- package/dist/recipes/accordion.js.map +1 -1
- package/dist/recipes/alert.d.ts +45 -1
- package/dist/recipes/alert.js +45 -1
- package/dist/recipes/alert.js.map +1 -1
- package/dist/recipes/band.d.ts +11 -1
- package/dist/recipes/band.js +7 -1
- package/dist/recipes/band.js.map +1 -1
- package/dist/recipes/bars.d.ts +60 -1
- package/dist/recipes/bars.js +59 -1
- package/dist/recipes/bars.js.map +1 -1
- package/dist/recipes/brandMark.d.ts +8 -1
- package/dist/recipes/brandMark.js +7 -1
- package/dist/recipes/brandMark.js.map +1 -1
- package/dist/recipes/button.d.ts +41 -4
- package/dist/recipes/button.js +31 -2
- package/dist/recipes/button.js.map +1 -1
- package/dist/recipes/cardHeader.d.ts +18 -1
- package/dist/recipes/cardHeader.js +19 -1
- package/dist/recipes/cardHeader.js.map +1 -1
- package/dist/recipes/checkbox.d.ts +16 -1
- package/dist/recipes/checkbox.js +16 -3
- package/dist/recipes/checkbox.js.map +1 -1
- package/dist/recipes/chip.d.ts +41 -2
- package/dist/recipes/chip.js +34 -1
- package/dist/recipes/chip.js.map +1 -1
- package/dist/recipes/codeEditor.d.ts +8 -1
- package/dist/recipes/codeEditor.js +7 -1
- package/dist/recipes/codeEditor.js.map +1 -1
- package/dist/recipes/datePicker.d.ts +62 -1
- package/dist/recipes/datePicker.js +56 -3
- package/dist/recipes/datePicker.js.map +1 -1
- package/dist/recipes/dialog.d.ts +49 -1
- package/dist/recipes/dialog.js +40 -1
- package/dist/recipes/dialog.js.map +1 -1
- package/dist/recipes/feature.d.ts +30 -1
- package/dist/recipes/feature.js +30 -2
- package/dist/recipes/feature.js.map +1 -1
- package/dist/recipes/field.js +1 -1
- package/dist/recipes/findings.d.ts +33 -1
- package/dist/recipes/findings.js +34 -1
- package/dist/recipes/findings.js.map +1 -1
- package/dist/recipes/heading.d.ts +12 -2
- package/dist/recipes/heading.js +7 -1
- package/dist/recipes/heading.js.map +1 -1
- package/dist/recipes/heartbeat.d.ts +52 -2
- package/dist/recipes/heartbeat.js +51 -4
- package/dist/recipes/heartbeat.js.map +1 -1
- package/dist/recipes/ink.d.ts +11 -0
- package/dist/recipes/ink.js +13 -0
- package/dist/recipes/ink.js.map +1 -0
- package/dist/recipes/input.d.ts +55 -1
- package/dist/recipes/input.js +52 -2
- package/dist/recipes/input.js.map +1 -1
- package/dist/recipes/listItem.d.ts +18 -1
- package/dist/recipes/listItem.js +20 -1
- package/dist/recipes/listItem.js.map +1 -1
- package/dist/recipes/listbox.d.ts +22 -2
- package/dist/recipes/listbox.js +19 -1
- package/dist/recipes/listbox.js.map +1 -1
- package/dist/recipes/marquee.d.ts +26 -2
- package/dist/recipes/marquee.js +24 -1
- package/dist/recipes/marquee.js.map +1 -1
- package/dist/recipes/menu.d.ts +33 -1
- package/dist/recipes/menu.js +29 -1
- package/dist/recipes/menu.js.map +1 -1
- package/dist/recipes/metaRow.d.ts +11 -2
- package/dist/recipes/metaRow.js +7 -1
- package/dist/recipes/metaRow.js.map +1 -1
- package/dist/recipes/meter.d.ts +36 -2
- package/dist/recipes/meter.js +34 -1
- package/dist/recipes/meter.js.map +1 -1
- package/dist/recipes/motion.d.ts +9 -1
- package/dist/recipes/nebula.js +1 -1
- package/dist/recipes/numberRange.d.ts +44 -1
- package/dist/recipes/numberRange.js +36 -1
- package/dist/recipes/numberRange.js.map +1 -1
- package/dist/recipes/paper.d.ts +55 -2
- package/dist/recipes/paper.js +47 -4
- package/dist/recipes/paper.js.map +1 -1
- package/dist/recipes/progressBar.d.ts +8 -1
- package/dist/recipes/progressBar.js +7 -1
- package/dist/recipes/progressBar.js.map +1 -1
- package/dist/recipes/queue.d.ts +33 -1
- package/dist/recipes/queue.js +35 -1
- package/dist/recipes/queue.js.map +1 -1
- package/dist/recipes/radioGroup.d.ts +18 -1
- package/dist/recipes/radioGroup.js +21 -3
- package/dist/recipes/radioGroup.js.map +1 -1
- package/dist/recipes/scopeSwitcher.d.ts +38 -1
- package/dist/recipes/scopeSwitcher.js +40 -1
- package/dist/recipes/scopeSwitcher.js.map +1 -1
- package/dist/recipes/scrollArea.d.ts +12 -3
- package/dist/recipes/scrollArea.js +7 -1
- package/dist/recipes/scrollArea.js.map +1 -1
- package/dist/recipes/searchPalette.d.ts +48 -1
- package/dist/recipes/searchPalette.js +49 -1
- package/dist/recipes/searchPalette.js.map +1 -1
- package/dist/recipes/sectionHeader.d.ts +20 -2
- package/dist/recipes/sectionHeader.js +20 -3
- package/dist/recipes/sectionHeader.js.map +1 -1
- package/dist/recipes/segmentedControl.d.ts +8 -1
- package/dist/recipes/segmentedControl.js +7 -1
- package/dist/recipes/segmentedControl.js.map +1 -1
- package/dist/recipes/select.d.ts +57 -1
- package/dist/recipes/select.js +51 -1
- package/dist/recipes/select.js.map +1 -1
- package/dist/recipes/separator.d.ts +13 -2
- package/dist/recipes/separator.js +8 -2
- package/dist/recipes/separator.js.map +1 -1
- package/dist/recipes/sidebar.d.ts +128 -2
- package/dist/recipes/sidebar.js +125 -2
- package/dist/recipes/sidebar.js.map +1 -1
- package/dist/recipes/sky.d.ts +31 -1
- package/dist/recipes/sky.js +30 -1
- package/dist/recipes/sky.js.map +1 -1
- package/dist/recipes/slider.d.ts +15 -1
- package/dist/recipes/slider.js +14 -1
- package/dist/recipes/slider.js.map +1 -1
- package/dist/recipes/stat.d.ts +71 -1
- package/dist/recipes/stat.js +73 -3
- package/dist/recipes/stat.js.map +1 -1
- package/dist/recipes/switch.d.ts +10 -1
- package/dist/recipes/switch.js +9 -3
- package/dist/recipes/switch.js.map +1 -1
- package/dist/recipes/table.d.ts +63 -3
- package/dist/recipes/table.js +56 -2
- package/dist/recipes/table.js.map +1 -1
- package/dist/recipes/tail.d.ts +40 -5
- package/dist/recipes/tail.js +37 -5
- package/dist/recipes/tail.js.map +1 -1
- package/dist/recipes/text.d.ts +16 -3
- package/dist/recipes/text.js +8 -3
- package/dist/recipes/text.js.map +1 -1
- package/dist/recipes/textarea.d.ts +46 -1
- package/dist/recipes/textarea.js +41 -1
- package/dist/recipes/textarea.js.map +1 -1
- package/dist/recipes/tile.d.ts +23 -1
- package/dist/recipes/tile.js +19 -1
- package/dist/recipes/tile.js.map +1 -1
- package/dist/recipes/tooltip.d.ts +8 -1
- package/dist/recipes/tooltip.js +7 -1
- package/dist/recipes/tooltip.js.map +1 -1
- package/dist/recipes/topBar.d.ts +43 -1
- package/dist/recipes/topBar.js +44 -1
- package/dist/recipes/topBar.js.map +1 -1
- package/dist/recipes/trail.d.ts +55 -5
- package/dist/recipes/trail.js +47 -5
- package/dist/recipes/trail.js.map +1 -1
- package/dist/recipes/userMenu.d.ts +23 -1
- package/dist/recipes/userMenu.js +24 -1
- package/dist/recipes/userMenu.js.map +1 -1
- package/package.json +1 -1
package/dist/recipes/tail.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/recipes/tail.ts
|
|
3
4
|
const tailSeverities = [
|
|
@@ -7,11 +8,10 @@ const tailSeverities = [
|
|
|
7
8
|
"danger",
|
|
8
9
|
"success"
|
|
9
10
|
];
|
|
10
|
-
const defaultTailSeverity = "plain";
|
|
11
11
|
const tailRecipe = cva(["overflow-hidden rounded-tf-block bg-tf-sunken-quiet", "shadow-[inset_0_0_0_var(--spacing-tf-hairline)_var(--color-tf-line-2)]"]);
|
|
12
12
|
const tailScrollRecipe = cva("tf-scroll-thin overflow-x-auto overflow-y-auto");
|
|
13
13
|
const tailLineRecipe = cva("grid min-w-max grid-cols-[3px_6.5rem_1fr] items-center gap-x-3 py-0.5", {
|
|
14
|
-
defaultVariants: { severity:
|
|
14
|
+
defaultVariants: { severity: "plain" },
|
|
15
15
|
variants: { severity: {
|
|
16
16
|
danger: "bg-tf-danger-wash",
|
|
17
17
|
plain: "",
|
|
@@ -21,7 +21,7 @@ const tailLineRecipe = cva("grid min-w-max grid-cols-[3px_6.5rem_1fr] items-cent
|
|
|
21
21
|
} }
|
|
22
22
|
});
|
|
23
23
|
const tailGutterRecipe = cva("h-full", {
|
|
24
|
-
defaultVariants: { severity:
|
|
24
|
+
defaultVariants: { severity: "plain" },
|
|
25
25
|
variants: { severity: {
|
|
26
26
|
danger: "bg-tf-danger-hi",
|
|
27
27
|
plain: "bg-transparent",
|
|
@@ -32,7 +32,7 @@ const tailGutterRecipe = cva("h-full", {
|
|
|
32
32
|
});
|
|
33
33
|
const tailAtRecipe = cva("py-0.5 pl-3 font-mono text-tf-caption-sm text-tf-muted");
|
|
34
34
|
const tailTextRecipe = cva("py-0.5 pr-3 font-mono text-tf-caption-sm whitespace-nowrap", {
|
|
35
|
-
defaultVariants: { severity:
|
|
35
|
+
defaultVariants: { severity: "plain" },
|
|
36
36
|
variants: { severity: {
|
|
37
37
|
danger: "text-tf-danger-hi",
|
|
38
38
|
plain: "text-tf-fg",
|
|
@@ -42,7 +42,39 @@ const tailTextRecipe = cva("py-0.5 pr-3 font-mono text-tf-caption-sm whitespace-
|
|
|
42
42
|
} }
|
|
43
43
|
});
|
|
44
44
|
const tailEmptyRecipe = cva("p-5 text-center text-tf-caption font-medium text-tf-muted");
|
|
45
|
+
const tailAnatomy = anatomy({
|
|
46
|
+
at: {
|
|
47
|
+
part: "at",
|
|
48
|
+
recipe: tailAtRecipe,
|
|
49
|
+
required: false
|
|
50
|
+
},
|
|
51
|
+
empty: {
|
|
52
|
+
part: "empty",
|
|
53
|
+
recipe: tailEmptyRecipe,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
line: {
|
|
57
|
+
part: "line",
|
|
58
|
+
recipe: tailLineRecipe,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
61
|
+
root: {
|
|
62
|
+
part: "tail",
|
|
63
|
+
recipe: tailRecipe,
|
|
64
|
+
required: true
|
|
65
|
+
},
|
|
66
|
+
scroll: {
|
|
67
|
+
part: "scroll",
|
|
68
|
+
recipe: tailScrollRecipe,
|
|
69
|
+
required: true
|
|
70
|
+
},
|
|
71
|
+
text: {
|
|
72
|
+
part: "text",
|
|
73
|
+
recipe: tailTextRecipe,
|
|
74
|
+
required: false
|
|
75
|
+
}
|
|
76
|
+
});
|
|
45
77
|
//#endregion
|
|
46
|
-
export {
|
|
78
|
+
export { tailAnatomy, tailAtRecipe, tailEmptyRecipe, tailGutterRecipe, tailLineRecipe, tailRecipe, tailScrollRecipe, tailSeverities, tailTextRecipe };
|
|
47
79
|
|
|
48
80
|
//# sourceMappingURL=tail.js.map
|
package/dist/recipes/tail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tail.js","names":[],"sources":["../../src/recipes/tail.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst tailSeverities = ['quiet', 'plain', 'warning', 'danger', 'success'] as const\n\ntype TailSeverity = (typeof tailSeverities)[number]\n\nconst
|
|
1
|
+
{"version":3,"file":"tail.js","names":[],"sources":["../../src/recipes/tail.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nconst tailSeverities = ['quiet', 'plain', 'warning', 'danger', 'success'] as const\n\ntype TailSeverity = (typeof tailSeverities)[number]\n\nconst tailRecipe = cva([\n 'overflow-hidden rounded-tf-block bg-tf-sunken-quiet',\n 'shadow-[inset_0_0_0_var(--spacing-tf-hairline)_var(--color-tf-line-2)]',\n])\n\nconst tailScrollRecipe = cva('tf-scroll-thin overflow-x-auto overflow-y-auto')\n\nconst tailLineRecipe = cva(\n 'grid min-w-max grid-cols-[3px_6.5rem_1fr] items-center gap-x-3 py-0.5',\n {\n defaultVariants: { severity: 'plain' },\n variants: {\n severity: {\n danger: 'bg-tf-danger-wash',\n plain: '',\n quiet: '',\n success: 'bg-tf-success-tint',\n warning: 'bg-tf-warning-tint',\n } satisfies Record<TailSeverity, string>,\n },\n },\n)\n\nconst tailGutterRecipe = cva('h-full', {\n defaultVariants: { severity: 'plain' },\n variants: {\n severity: {\n danger: 'bg-tf-danger-hi',\n plain: 'bg-transparent',\n quiet: 'bg-transparent',\n success: 'bg-tf-success-hi',\n warning: 'bg-tf-warning-hi',\n } satisfies Record<TailSeverity, string>,\n },\n})\n\nconst tailAtRecipe = cva('py-0.5 pl-3 font-mono text-tf-caption-sm text-tf-muted')\n\nconst tailTextRecipe = cva('py-0.5 pr-3 font-mono text-tf-caption-sm whitespace-nowrap', {\n defaultVariants: { severity: 'plain' },\n variants: {\n severity: {\n danger: 'text-tf-danger-hi',\n plain: 'text-tf-fg',\n quiet: 'text-tf-muted',\n success: 'text-tf-success-hi',\n warning: 'text-tf-warning-hi',\n } satisfies Record<TailSeverity, string>,\n },\n})\n\nconst tailEmptyRecipe = cva('p-5 text-center text-tf-caption font-medium text-tf-muted')\n\nconst tailAnatomy = anatomy({\n at: { part: 'at', recipe: tailAtRecipe, required: false },\n empty: { part: 'empty', recipe: tailEmptyRecipe, required: false },\n line: { part: 'line', recipe: tailLineRecipe, required: false },\n root: { part: 'tail', recipe: tailRecipe, required: true },\n scroll: { part: 'scroll', recipe: tailScrollRecipe, required: true },\n text: { part: 'text', recipe: tailTextRecipe, required: false },\n})\n\nexport {\n type TailSeverity,\n tailAnatomy,\n tailAtRecipe,\n tailEmptyRecipe,\n tailGutterRecipe,\n tailLineRecipe,\n tailRecipe,\n tailScrollRecipe,\n tailSeverities,\n tailTextRecipe,\n}\n"],"mappings":";;;AAIA,MAAM,iBAAiB;CAAC;CAAS;CAAS;CAAW;CAAU;AAAS;AAIxE,MAAM,aAAa,IAAI,CACrB,uDACA,wEACF,CAAC;AAED,MAAM,mBAAmB,IAAI,gDAAgD;AAE7E,MAAM,iBAAiB,IACrB,yEACA;CACE,iBAAiB,EAAE,UAAU,QAAQ;CACrC,UAAU,EACR,UAAU;EACR,QAAQ;EACR,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;CACX,EACF;AACF,CACF;AAEA,MAAM,mBAAmB,IAAI,UAAU;CACrC,iBAAiB,EAAE,UAAU,QAAQ;CACrC,UAAU,EACR,UAAU;EACR,QAAQ;EACR,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;CACX,EACF;AACF,CAAC;AAED,MAAM,eAAe,IAAI,wDAAwD;AAEjF,MAAM,iBAAiB,IAAI,8DAA8D;CACvF,iBAAiB,EAAE,UAAU,QAAQ;CACrC,UAAU,EACR,UAAU;EACR,QAAQ;EACR,OAAO;EACP,OAAO;EACP,SAAS;EACT,SAAS;CACX,EACF;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,2DAA2D;AAEvF,MAAM,cAAc,QAAQ;CAC1B,IAAI;EAAE,MAAM;EAAM,QAAQ;EAAc,UAAU;CAAM;CACxD,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAiB,UAAU;CAAM;CACjE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAM;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAY,UAAU;CAAK;CACzD,QAAQ;EAAE,MAAM;EAAU,QAAQ;EAAkB,UAAU;CAAK;CACnE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAM;AAChE,CAAC"}
|
package/dist/recipes/text.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ type TextWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
|
5
5
|
type TextFamily = 'sans' | 'mono' | 'display';
|
|
6
6
|
declare const defaultTextSize = "body";
|
|
7
7
|
declare const defaultTextTone = "fg";
|
|
8
|
-
declare const defaultTextWeight = "normal";
|
|
9
8
|
declare const defaultTextFamily = "sans";
|
|
10
9
|
declare const textSizes: readonly ["caption-sm", "caption", "body-sm", "body", "lead"];
|
|
11
10
|
declare const textTones: readonly ["fg", "muted", "accent", "danger", "info", "success", "warning"];
|
|
@@ -14,12 +13,26 @@ declare const textFamilies: readonly ["sans", "mono", "display"];
|
|
|
14
13
|
declare const restingWeight: (size: TextSize, uppercase?: boolean) => TextWeight;
|
|
15
14
|
declare const textRecipe: (props?: ({
|
|
16
15
|
family?: "display" | "sans" | "mono" | null | undefined;
|
|
17
|
-
size?: "
|
|
16
|
+
size?: "body" | "caption" | "lead" | "caption-sm" | "body-sm" | null | undefined;
|
|
18
17
|
tabular?: boolean | null | undefined;
|
|
19
18
|
tone?: "accent" | "success" | "warning" | "info" | "danger" | "fg" | "muted" | null | undefined;
|
|
20
19
|
uppercase?: boolean | null | undefined;
|
|
21
20
|
weight?: "normal" | "medium" | "semibold" | "bold" | null | undefined;
|
|
22
21
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
declare const textAnatomy: {
|
|
23
|
+
readonly root: {
|
|
24
|
+
readonly part: "text";
|
|
25
|
+
readonly recipe: (props?: ({
|
|
26
|
+
family?: "display" | "sans" | "mono" | null | undefined;
|
|
27
|
+
size?: "body" | "caption" | "lead" | "caption-sm" | "body-sm" | null | undefined;
|
|
28
|
+
tabular?: boolean | null | undefined;
|
|
29
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | "fg" | "muted" | null | undefined;
|
|
30
|
+
uppercase?: boolean | null | undefined;
|
|
31
|
+
weight?: "normal" | "medium" | "semibold" | "bold" | null | undefined;
|
|
32
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
33
|
+
readonly required: true;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
23
36
|
//#endregion
|
|
24
|
-
export { type TextFamily, type TextSize, type TextTone, type TextWeight, defaultTextFamily, defaultTextSize, defaultTextTone,
|
|
37
|
+
export { type TextFamily, type TextSize, type TextTone, type TextWeight, defaultTextFamily, defaultTextSize, defaultTextTone, restingWeight, textAnatomy, textFamilies, textRecipe, textSizes, textTones, textWeights };
|
|
25
38
|
//# sourceMappingURL=text.d.ts.map
|
package/dist/recipes/text.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { toneText } from "../tone.js";
|
|
2
3
|
import { eyebrowType } from "../parts/eyebrow.js";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
4
5
|
//#region src/recipes/text.ts
|
|
5
6
|
const defaultTextSize = "body";
|
|
6
7
|
const defaultTextTone = "fg";
|
|
7
|
-
const defaultTextWeight = "normal";
|
|
8
8
|
const defaultTextFamily = "sans";
|
|
9
9
|
const textSizes = [
|
|
10
10
|
"caption-sm",
|
|
@@ -56,7 +56,7 @@ const textRecipe = cva("tf-transition motion-reduce:transition-none", {
|
|
|
56
56
|
tabular: false,
|
|
57
57
|
tone: "fg",
|
|
58
58
|
uppercase: false,
|
|
59
|
-
weight:
|
|
59
|
+
weight: "normal"
|
|
60
60
|
},
|
|
61
61
|
variants: {
|
|
62
62
|
family: {
|
|
@@ -88,7 +88,12 @@ const textRecipe = cva("tf-transition motion-reduce:transition-none", {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
+
const textAnatomy = anatomy({ root: {
|
|
92
|
+
part: "text",
|
|
93
|
+
recipe: textRecipe,
|
|
94
|
+
required: true
|
|
95
|
+
} });
|
|
91
96
|
//#endregion
|
|
92
|
-
export { defaultTextFamily, defaultTextSize, defaultTextTone,
|
|
97
|
+
export { defaultTextFamily, defaultTextSize, defaultTextTone, restingWeight, textAnatomy, textFamilies, textRecipe, textSizes, textTones, textWeights };
|
|
93
98
|
|
|
94
99
|
//# sourceMappingURL=text.js.map
|
package/dist/recipes/text.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","names":[],"sources":["../../src/recipes/text.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { eyebrowType } from '#parts/eyebrow'\nimport { toneText } from '#tone'\n\ntype TextSize = 'caption-sm' | 'caption' | 'body-sm' | 'body' | 'lead'\n\ntype TextTone = 'fg' | 'muted' | 'accent' | 'danger' | 'info' | 'success' | 'warning'\n\ntype TextWeight = 'normal' | 'medium' | 'semibold' | 'bold'\n\ntype TextFamily = 'sans' | 'mono' | 'display'\n\nconst defaultTextSize = 'body' satisfies TextSize\n\nconst defaultTextTone = 'fg' satisfies TextTone\n\nconst
|
|
1
|
+
{"version":3,"file":"text.js","names":[],"sources":["../../src/recipes/text.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { eyebrowType } from '#parts/eyebrow'\nimport { toneText } from '#tone'\n\ntype TextSize = 'caption-sm' | 'caption' | 'body-sm' | 'body' | 'lead'\n\ntype TextTone = 'fg' | 'muted' | 'accent' | 'danger' | 'info' | 'success' | 'warning'\n\ntype TextWeight = 'normal' | 'medium' | 'semibold' | 'bold'\n\ntype TextFamily = 'sans' | 'mono' | 'display'\n\nconst defaultTextSize = 'body' satisfies TextSize\n\nconst defaultTextTone = 'fg' satisfies TextTone\n\nconst defaultTextFamily = 'sans' satisfies TextFamily\n\nconst textSizes = [\n 'caption-sm',\n 'caption',\n 'body-sm',\n 'body',\n 'lead',\n] as const satisfies readonly TextSize[]\n\nconst textTones = [\n 'fg',\n 'muted',\n 'accent',\n 'danger',\n 'info',\n 'success',\n 'warning',\n] as const satisfies readonly TextTone[]\n\nconst textWeights = [\n 'normal',\n 'medium',\n 'semibold',\n 'bold',\n] as const satisfies readonly TextWeight[]\n\nconst textFamilies = ['sans', 'mono', 'display'] as const satisfies readonly TextFamily[]\n\nconst SIZE_WEIGHT = {\n body: 'normal',\n 'body-sm': 'medium',\n caption: 'medium',\n 'caption-sm': 'medium',\n lead: 'normal',\n} satisfies Record<TextSize, TextWeight>\n\nconst restingWeight = (size: TextSize, uppercase?: boolean): TextWeight => {\n if (uppercase === true) {\n return 'medium'\n }\n return SIZE_WEIGHT[size]\n}\n\nconst TONE_CLASS = {\n ...toneText,\n fg: 'text-tf-fg',\n muted: 'text-tf-muted',\n} satisfies Record<TextTone, string>\n\nconst textRecipe = cva('tf-transition motion-reduce:transition-none', {\n defaultVariants: {\n family: defaultTextFamily,\n size: defaultTextSize,\n tabular: false,\n tone: defaultTextTone,\n uppercase: false,\n weight: 'normal',\n },\n variants: {\n family: {\n display: 'font-tf-display',\n mono: 'font-mono',\n sans: 'font-tf-body',\n } satisfies Record<TextFamily, string>,\n size: {\n body: 'text-tf-body',\n 'body-sm': 'text-tf-body-sm',\n caption: 'text-tf-caption',\n 'caption-sm': 'text-tf-caption-sm',\n lead: 'max-w-tf-measure text-tf-lead',\n } satisfies Record<TextSize, string>,\n tabular: { false: '', true: 'tabular-nums' },\n tone: TONE_CLASS,\n uppercase: { false: '', true: eyebrowType },\n weight: {\n bold: 'font-bold',\n medium: 'font-medium',\n normal: 'font-normal',\n semibold: 'font-semibold',\n } satisfies Record<TextWeight, string>,\n },\n})\n\nconst textAnatomy = anatomy({\n root: { part: 'text', recipe: textRecipe, required: true },\n})\n\nexport {\n type TextFamily,\n type TextSize,\n type TextTone,\n type TextWeight,\n defaultTextFamily,\n defaultTextSize,\n defaultTextTone,\n restingWeight,\n textAnatomy,\n textFamilies,\n textRecipe,\n textSizes,\n textTones,\n textWeights,\n}\n"],"mappings":";;;;;AAcA,MAAM,kBAAkB;AAExB,MAAM,kBAAkB;AAExB,MAAM,oBAAoB;AAE1B,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,YAAY;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,cAAc;CAClB;CACA;CACA;CACA;AACF;AAEA,MAAM,eAAe;CAAC;CAAQ;CAAQ;AAAS;AAE/C,MAAM,cAAc;CAClB,MAAM;CACN,WAAW;CACX,SAAS;CACT,cAAc;CACd,MAAM;AACR;AAEA,MAAM,iBAAiB,MAAgB,cAAoC;CACzE,IAAI,cAAc,MAChB,OAAO;CAET,OAAO,YAAY;AACrB;AAEA,MAAM,aAAa;CACjB,GAAG;CACH,IAAI;CACJ,OAAO;AACT;AAEA,MAAM,aAAa,IAAI,+CAA+C;CACpE,iBAAiB;EACf,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAA;EACA,WAAW;EACX,QAAQ;CACV;CACA,UAAU;EACR,QAAQ;GACN,SAAS;GACT,MAAM;GACN,MAAM;EACR;EACA,MAAM;GACJ,MAAM;GACN,WAAW;GACX,SAAS;GACT,cAAc;GACd,MAAM;EACR;EACA,SAAS;GAAE,OAAO;GAAI,MAAM;EAAe;EAC3C,MAAM;EACN,WAAW;GAAE,OAAO;GAAI,MAAM;EAAY;EAC1C,QAAQ;GACN,MAAM;GACN,QAAQ;GACR,QAAQ;GACR,UAAU;EACZ;CACF;AACF,CAAC;AAED,MAAM,cAAc,QAAQ,EAC1B,MAAM;CAAE,MAAM;CAAQ,QAAQ;CAAY,UAAU;AAAK,EAC3D,CAAC"}
|
|
@@ -8,6 +8,51 @@ declare const textareaRecipe: (props?: import("class-variance-authority/types").
|
|
|
8
8
|
declare const textareaCountRecipe: (props?: ({
|
|
9
9
|
reach?: "clear" | "near" | "full" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
declare const textareaAnatomy: {
|
|
12
|
+
readonly cloud: {
|
|
13
|
+
readonly part: "cloud";
|
|
14
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
|
+
readonly required: true;
|
|
16
|
+
};
|
|
17
|
+
readonly count: {
|
|
18
|
+
readonly part: "count";
|
|
19
|
+
readonly recipe: (props?: ({
|
|
20
|
+
reach?: "clear" | "near" | "full" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
readonly required: false;
|
|
23
|
+
};
|
|
24
|
+
readonly foot: {
|
|
25
|
+
readonly part: "foot";
|
|
26
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
27
|
+
readonly required: true;
|
|
28
|
+
};
|
|
29
|
+
readonly nebula: {
|
|
30
|
+
readonly part: "nebula";
|
|
31
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
32
|
+
readonly required: true;
|
|
33
|
+
};
|
|
34
|
+
readonly root: {
|
|
35
|
+
readonly part: "textarea";
|
|
36
|
+
readonly recipe: (props?: ({
|
|
37
|
+
fullWidth?: boolean | null | undefined;
|
|
38
|
+
message?: boolean | null | undefined;
|
|
39
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
40
|
+
readonly required: true;
|
|
41
|
+
};
|
|
42
|
+
readonly row: {
|
|
43
|
+
readonly part: "row";
|
|
44
|
+
readonly recipe: (props?: ({
|
|
45
|
+
invalid?: boolean | null | undefined;
|
|
46
|
+
loading?: boolean | null | undefined;
|
|
47
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
48
|
+
readonly required: true;
|
|
49
|
+
};
|
|
50
|
+
readonly spoken: {
|
|
51
|
+
readonly part: "spoken";
|
|
52
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
11
56
|
//#endregion
|
|
12
|
-
export { type TextareaReach, textareaCountRecipe, textareaRecipe, textareaShellRecipe };
|
|
57
|
+
export { type TextareaReach, textareaAnatomy, textareaCountRecipe, textareaRecipe, textareaShellRecipe };
|
|
13
58
|
//# sourceMappingURL=textarea.d.ts.map
|
package/dist/recipes/textarea.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlBase, controlInert } from "../parts/control.js";
|
|
3
|
+
import { nebulaCloudLowRecipe, nebulaVeilRecipe } from "./nebula.js";
|
|
2
4
|
import { controlFailed, controlHealthy, controlShell } from "../parts/shell.js";
|
|
5
|
+
import { fieldFootRecipe, fieldRecipe } from "./field.js";
|
|
3
6
|
import { cva } from "class-variance-authority";
|
|
4
7
|
//#region src/recipes/textarea.ts
|
|
5
8
|
const shellSurface = [
|
|
@@ -42,7 +45,44 @@ const textareaCountRecipe = cva(["flex-none pt-2 font-mono text-tf-caption-sm ta
|
|
|
42
45
|
near: "text-tf-warning-hi"
|
|
43
46
|
} }
|
|
44
47
|
});
|
|
48
|
+
const textareaAnatomy = anatomy({
|
|
49
|
+
cloud: {
|
|
50
|
+
part: "cloud",
|
|
51
|
+
recipe: nebulaCloudLowRecipe,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
54
|
+
count: {
|
|
55
|
+
part: "count",
|
|
56
|
+
recipe: textareaCountRecipe,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
foot: {
|
|
60
|
+
part: "foot",
|
|
61
|
+
recipe: fieldFootRecipe,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
nebula: {
|
|
65
|
+
part: "nebula",
|
|
66
|
+
recipe: nebulaVeilRecipe,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
root: {
|
|
70
|
+
part: "textarea",
|
|
71
|
+
recipe: fieldRecipe,
|
|
72
|
+
required: true
|
|
73
|
+
},
|
|
74
|
+
row: {
|
|
75
|
+
part: "row",
|
|
76
|
+
recipe: textareaShellRecipe,
|
|
77
|
+
required: true
|
|
78
|
+
},
|
|
79
|
+
spoken: {
|
|
80
|
+
part: "spoken",
|
|
81
|
+
recipe: fieldFootRecipe,
|
|
82
|
+
required: false
|
|
83
|
+
}
|
|
84
|
+
});
|
|
45
85
|
//#endregion
|
|
46
|
-
export { textareaCountRecipe, textareaRecipe, textareaShellRecipe };
|
|
86
|
+
export { textareaAnatomy, textareaCountRecipe, textareaRecipe, textareaShellRecipe };
|
|
47
87
|
|
|
48
88
|
//# sourceMappingURL=textarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.js","names":[],"sources":["../../src/recipes/textarea.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlBase, controlInert } from '#parts/control'\nimport { controlFailed, controlHealthy, controlShell } from '#parts/shell'\n\ntype TextareaReach = 'clear' | 'near' | 'full'\n\nconst TEXTAREA_WAKES = [\n 'reached:[&_textarea]:placeholder:opacity-100',\n 'reached:[&_textarea]:placeholder:delay-(--tf-duration-1)',\n]\n\nconst LABEL_RESTS_BY_THE_FIRST_LINE = 'asleep:**:data-[part=label]:translate-y-2.5'\n\nconst shellSurface = [\n 'relative isolate w-full flex-col',\n 'rounded-tf-control font-tf-body',\n ...controlShell(TEXTAREA_WAKES, LABEL_RESTS_BY_THE_FIRST_LINE),\n]\n\nconst PENDING = [\n 'tf-edge-lit tf-pulsing tf-clouding',\n '**:data-[part=nebula]:tf-cloud-breathing',\n].join(' ')\n\nconst textareaShellRecipe = cva([...controlBase, ...shellSurface], {\n defaultVariants: { invalid: false, loading: false },\n variants: {\n invalid: { false: controlHealthy, true: controlFailed },\n loading: { false: '', true: PENDING },\n },\n})\n\nconst textareaRecipe = cva([\n 'max-h-59 min-h-29 w-full resize-none',\n 'tf-writes bg-transparent px-4 pt-6 pb-5',\n 'tf-scroll-faded [--tf-fade-foot:calc(var(--spacing)*5)] [--tf-fade-head:calc(var(--spacing)*6)]',\n 'text-tf-body text-tf-fg',\n 'placeholder:text-tf-muted placeholder:opacity-0',\n 'data-readonly:text-tf-muted',\n 'tf-scroll-thin outline-hidden',\n ...controlInert,\n])\n\nconst textareaCountRecipe = cva(\n [\n 'flex-none pt-2 font-mono text-tf-caption-sm tabular-nums',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { reach: 'clear' },\n variants: {\n reach: {\n clear: 'text-tf-muted',\n full: 'text-tf-danger-hi',\n near: 'text-tf-warning-hi',\n } satisfies Record<TextareaReach, string>,\n },\n },\n)\n\
|
|
1
|
+
{"version":3,"file":"textarea.js","names":[],"sources":["../../src/recipes/textarea.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlBase, controlInert } from '#parts/control'\nimport { controlFailed, controlHealthy, controlShell } from '#parts/shell'\n\nimport { fieldFootRecipe, fieldRecipe } from './field'\nimport { nebulaCloudLowRecipe, nebulaVeilRecipe } from './nebula'\n\ntype TextareaReach = 'clear' | 'near' | 'full'\n\nconst TEXTAREA_WAKES = [\n 'reached:[&_textarea]:placeholder:opacity-100',\n 'reached:[&_textarea]:placeholder:delay-(--tf-duration-1)',\n]\n\nconst LABEL_RESTS_BY_THE_FIRST_LINE = 'asleep:**:data-[part=label]:translate-y-2.5'\n\nconst shellSurface = [\n 'relative isolate w-full flex-col',\n 'rounded-tf-control font-tf-body',\n ...controlShell(TEXTAREA_WAKES, LABEL_RESTS_BY_THE_FIRST_LINE),\n]\n\nconst PENDING = [\n 'tf-edge-lit tf-pulsing tf-clouding',\n '**:data-[part=nebula]:tf-cloud-breathing',\n].join(' ')\n\nconst textareaShellRecipe = cva([...controlBase, ...shellSurface], {\n defaultVariants: { invalid: false, loading: false },\n variants: {\n invalid: { false: controlHealthy, true: controlFailed },\n loading: { false: '', true: PENDING },\n },\n})\n\nconst textareaRecipe = cva([\n 'max-h-59 min-h-29 w-full resize-none',\n 'tf-writes bg-transparent px-4 pt-6 pb-5',\n 'tf-scroll-faded [--tf-fade-foot:calc(var(--spacing)*5)] [--tf-fade-head:calc(var(--spacing)*6)]',\n 'text-tf-body text-tf-fg',\n 'placeholder:text-tf-muted placeholder:opacity-0',\n 'data-readonly:text-tf-muted',\n 'tf-scroll-thin outline-hidden',\n ...controlInert,\n])\n\nconst textareaCountRecipe = cva(\n [\n 'flex-none pt-2 font-mono text-tf-caption-sm tabular-nums',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { reach: 'clear' },\n variants: {\n reach: {\n clear: 'text-tf-muted',\n full: 'text-tf-danger-hi',\n near: 'text-tf-warning-hi',\n } satisfies Record<TextareaReach, string>,\n },\n },\n)\n\nconst textareaAnatomy = anatomy({\n cloud: { part: 'cloud', recipe: nebulaCloudLowRecipe, required: true },\n count: { part: 'count', recipe: textareaCountRecipe, required: false },\n foot: { part: 'foot', recipe: fieldFootRecipe, required: true },\n nebula: { part: 'nebula', recipe: nebulaVeilRecipe, required: true },\n root: { part: 'textarea', recipe: fieldRecipe, required: true },\n row: { part: 'row', recipe: textareaShellRecipe, required: true },\n spoken: { part: 'spoken', recipe: fieldFootRecipe, required: false },\n})\n\nexport {\n type TextareaReach,\n textareaAnatomy,\n textareaCountRecipe,\n textareaRecipe,\n textareaShellRecipe,\n}\n"],"mappings":";;;;;;;AAkBA,MAAM,eAAe;CACnB;CACA;CACA,GAAG,aAAa,CAThB,gDACA,0DAQ6B,GAAG,6CAA6B;AAC/D;AAEA,MAAM,UAAU,CACd,sCACA,0CACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,sBAAsB,IAAI,CAAC,GAAG,aAAa,GAAG,YAAY,GAAG;CACjE,iBAAiB;EAAE,SAAS;EAAO,SAAS;CAAM;CAClD,UAAU;EACR,SAAS;GAAE,OAAO;GAAgB,MAAM;EAAc;EACtD,SAAS;GAAE,OAAO;GAAI,MAAM;EAAQ;CACtC;AACF,CAAC;AAED,MAAM,iBAAiB,IAAI;CACzB;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,sBAAsB,IAC1B,CACE,4DACA,6CACF,GACA;CACE,iBAAiB,EAAE,OAAO,QAAQ;CAClC,UAAU,EACR,OAAO;EACL,OAAO;EACP,MAAM;EACN,MAAM;CACR,EACF;AACF,CACF;AAEA,MAAM,kBAAkB,QAAQ;CAC9B,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAsB,UAAU;CAAK;CACrE,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAqB,UAAU;CAAM;CACrE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAK;CAC9D,QAAQ;EAAE,MAAM;EAAU,QAAQ;EAAkB,UAAU;CAAK;CACnE,MAAM;EAAE,MAAM;EAAY,QAAQ;EAAa,UAAU;CAAK;CAC9D,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAqB,UAAU;CAAK;CAChE,QAAQ;EAAE,MAAM;EAAU,QAAQ;EAAiB,UAAU;CAAM;AACrE,CAAC"}
|
package/dist/recipes/tile.d.ts
CHANGED
|
@@ -13,6 +13,28 @@ declare const tileGlyphRecipe: (props?: ({
|
|
|
13
13
|
rest?: "quiet" | "filled" | "lit" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
declare const tileCloudRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
declare const tileAnatomy: {
|
|
17
|
+
readonly cloud: {
|
|
18
|
+
readonly part: "cloud";
|
|
19
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
20
|
+
readonly required: false;
|
|
21
|
+
};
|
|
22
|
+
readonly glyph: {
|
|
23
|
+
readonly part: "glyph";
|
|
24
|
+
readonly recipe: (props?: ({
|
|
25
|
+
rest?: "quiet" | "filled" | "lit" | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
|
+
readonly required: true;
|
|
28
|
+
};
|
|
29
|
+
readonly root: {
|
|
30
|
+
readonly part: "tile";
|
|
31
|
+
readonly recipe: (props?: ({
|
|
32
|
+
rest?: "quiet" | "filled" | "lit" | null | undefined;
|
|
33
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
34
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
35
|
+
readonly required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
16
38
|
//#endregion
|
|
17
|
-
export { type TileRest, type TileTone, defaultTileRest, defaultTileTone, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
39
|
+
export { type TileRest, type TileTone, defaultTileRest, defaultTileTone, tileAnatomy, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
18
40
|
//# sourceMappingURL=tile.d.ts.map
|
package/dist/recipes/tile.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/recipes/tile.ts
|
|
3
4
|
const tileTones = [
|
|
@@ -79,7 +80,24 @@ const tileGlyphRecipe = cva([
|
|
|
79
80
|
} }
|
|
80
81
|
});
|
|
81
82
|
const tileCloudRecipe = cva("tf-nebula-cloud tf-cloud-tight");
|
|
83
|
+
const tileAnatomy = anatomy({
|
|
84
|
+
cloud: {
|
|
85
|
+
part: "cloud",
|
|
86
|
+
recipe: tileCloudRecipe,
|
|
87
|
+
required: false
|
|
88
|
+
},
|
|
89
|
+
glyph: {
|
|
90
|
+
part: "glyph",
|
|
91
|
+
recipe: tileGlyphRecipe,
|
|
92
|
+
required: true
|
|
93
|
+
},
|
|
94
|
+
root: {
|
|
95
|
+
part: "tile",
|
|
96
|
+
recipe: tileRecipe,
|
|
97
|
+
required: true
|
|
98
|
+
}
|
|
99
|
+
});
|
|
82
100
|
//#endregion
|
|
83
|
-
export { defaultTileRest, defaultTileTone, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
101
|
+
export { defaultTileRest, defaultTileTone, tileAnatomy, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
84
102
|
|
|
85
103
|
//# sourceMappingURL=tile.js.map
|
package/dist/recipes/tile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile.js","names":[],"sources":["../../src/recipes/tile.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst tileTones = ['accent', 'success', 'warning', 'info', 'danger'] as const\n\ntype TileTone = (typeof tileTones)[number]\n\nconst defaultTileTone = 'accent' satisfies TileTone\n\nconst tileRests = ['lit', 'quiet', 'filled'] as const\n\ntype TileRest = (typeof tileRests)[number]\n\nconst defaultTileRest = 'lit' satisfies TileRest\n\nconst BLEND = {\n accent: 'blend-tf-accent',\n danger: 'blend-tf-danger',\n info: 'blend-tf-info',\n success: 'blend-tf-success',\n warning: 'blend-tf-warning',\n} satisfies Record<TileTone, string>\n\nconst INK = {\n accent: 'text-tf-accent-hi',\n danger: 'text-tf-danger-hi',\n info: 'text-tf-info-hi',\n success: 'text-tf-success-hi',\n warning: 'text-tf-warning-hi',\n} satisfies Record<TileTone, string>\n\nconst FILLED_INK = {\n accent: 'text-tf-on-accent',\n danger: 'text-tf-on-semantic',\n info: 'text-tf-on-semantic',\n success: 'text-tf-on-semantic',\n warning: 'text-tf-on-semantic',\n} satisfies Record<TileTone, string>\n\nconst LIT = 'tf-edge-sweep tf-swept tf-inner-lit tf-glass-plate stroke-tf-ink tf-icons-solo'\n\nconst QUIET = [\n 'bg-tf-panel-hi tf-ramp tf-cloud-brand tf-cloud-hidden',\n 'text-tf-fg tf-blend-drift tf-icons',\n].join(' ')\n\nconst FILLED = [\n 'bg-tf-blend tf-cloud-brand tf-clouded tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-inner-lit tf-icons-solo',\n].join(' ')\n\nconst tileRecipe = cva(\n [\n 'relative isolate flex size-tf-control-lg shrink-0 items-center justify-center',\n 'rounded-tf-card',\n 'tf-transition motion-reduce:transition-none',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n ],\n {\n compoundVariants: [\n ...tileTones.map((tone) => ({ class: INK[tone], rest: 'lit' as const, tone })),\n ...tileTones.map((tone) => ({ class: FILLED_INK[tone], rest: 'filled' as const, tone })),\n ],\n defaultVariants: { rest: defaultTileRest, tone: defaultTileTone },\n variants: {\n rest: { filled: FILLED, lit: LIT, quiet: QUIET } satisfies Record<TileRest, string>,\n tone: BLEND,\n },\n },\n)\n\nconst tileGlyphRecipe = cva(\n [\n 'inline-flex items-center justify-center',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n 'tf-moves-spring tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { rest: defaultTileRest },\n variants: {\n rest: {\n filled: 'motion-safe:tf-pops',\n lit: 'motion-safe:tf-pops',\n quiet: '',\n } satisfies Record<TileRest, string>,\n },\n },\n)\n\nconst tileCloudRecipe = cva('tf-nebula-cloud tf-cloud-tight')\n\nexport {\n type TileRest,\n type TileTone,\n defaultTileRest,\n defaultTileTone,\n tileCloudRecipe,\n tileGlyphRecipe,\n tileRecipe,\n tileRests,\n tileTones,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tile.js","names":[],"sources":["../../src/recipes/tile.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nconst tileTones = ['accent', 'success', 'warning', 'info', 'danger'] as const\n\ntype TileTone = (typeof tileTones)[number]\n\nconst defaultTileTone = 'accent' satisfies TileTone\n\nconst tileRests = ['lit', 'quiet', 'filled'] as const\n\ntype TileRest = (typeof tileRests)[number]\n\nconst defaultTileRest = 'lit' satisfies TileRest\n\nconst BLEND = {\n accent: 'blend-tf-accent',\n danger: 'blend-tf-danger',\n info: 'blend-tf-info',\n success: 'blend-tf-success',\n warning: 'blend-tf-warning',\n} satisfies Record<TileTone, string>\n\nconst INK = {\n accent: 'text-tf-accent-hi',\n danger: 'text-tf-danger-hi',\n info: 'text-tf-info-hi',\n success: 'text-tf-success-hi',\n warning: 'text-tf-warning-hi',\n} satisfies Record<TileTone, string>\n\nconst FILLED_INK = {\n accent: 'text-tf-on-accent',\n danger: 'text-tf-on-semantic',\n info: 'text-tf-on-semantic',\n success: 'text-tf-on-semantic',\n warning: 'text-tf-on-semantic',\n} satisfies Record<TileTone, string>\n\nconst LIT = 'tf-edge-sweep tf-swept tf-inner-lit tf-glass-plate stroke-tf-ink tf-icons-solo'\n\nconst QUIET = [\n 'bg-tf-panel-hi tf-ramp tf-cloud-brand tf-cloud-hidden',\n 'text-tf-fg tf-blend-drift tf-icons',\n].join(' ')\n\nconst FILLED = [\n 'bg-tf-blend tf-cloud-brand tf-clouded tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-inner-lit tf-icons-solo',\n].join(' ')\n\nconst tileRecipe = cva(\n [\n 'relative isolate flex size-tf-control-lg shrink-0 items-center justify-center',\n 'rounded-tf-card',\n 'tf-transition motion-reduce:transition-none',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n ],\n {\n compoundVariants: [\n ...tileTones.map((tone) => ({ class: INK[tone], rest: 'lit' as const, tone })),\n ...tileTones.map((tone) => ({ class: FILLED_INK[tone], rest: 'filled' as const, tone })),\n ],\n defaultVariants: { rest: defaultTileRest, tone: defaultTileTone },\n variants: {\n rest: { filled: FILLED, lit: LIT, quiet: QUIET } satisfies Record<TileRest, string>,\n tone: BLEND,\n },\n },\n)\n\nconst tileGlyphRecipe = cva(\n [\n 'inline-flex items-center justify-center',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n 'tf-moves-spring tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { rest: defaultTileRest },\n variants: {\n rest: {\n filled: 'motion-safe:tf-pops',\n lit: 'motion-safe:tf-pops',\n quiet: '',\n } satisfies Record<TileRest, string>,\n },\n },\n)\n\nconst tileCloudRecipe = cva('tf-nebula-cloud tf-cloud-tight')\n\nconst tileAnatomy = anatomy({\n cloud: { part: 'cloud', recipe: tileCloudRecipe, required: false },\n glyph: { part: 'glyph', recipe: tileGlyphRecipe, required: true },\n root: { part: 'tile', recipe: tileRecipe, required: true },\n})\n\nexport {\n type TileRest,\n type TileTone,\n defaultTileRest,\n defaultTileTone,\n tileAnatomy,\n tileCloudRecipe,\n tileGlyphRecipe,\n tileRecipe,\n tileRests,\n tileTones,\n}\n"],"mappings":";;;AAIA,MAAM,YAAY;CAAC;CAAU;CAAW;CAAW;CAAQ;AAAQ;AAInE,MAAM,kBAAkB;AAExB,MAAM,YAAY;CAAC;CAAO;CAAS;AAAQ;AAI3C,MAAM,kBAAkB;AAExB,MAAM,QAAQ;CACZ,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,MAAM;CACV,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,aAAa;CACjB,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,MAAM;AAEZ,MAAM,QAAQ,CACZ,yDACA,oCACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,SAAS,CACb,wDACA,mDACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,aAAa,IACjB;CACE;CACA;CACA;CACA;AACF,GACA;CACE,kBAAkB,CAChB,GAAG,UAAU,KAAK,UAAU;EAAE,OAAO,IAAI;EAAO,MAAM;EAAgB;CAAK,EAAE,GAC7E,GAAG,UAAU,KAAK,UAAU;EAAE,OAAO,WAAW;EAAO,MAAM;EAAmB;CAAK,EAAE,CACzF;CACA,iBAAiB;EAAE,MAAA;EAAuB,MAAM;CAAgB;CAChE,UAAU;EACR,MAAM;GAAE,QAAQ;GAAQ,KAAK;GAAK,OAAO;EAAM;EAC/C,MAAM;CACR;AACF,CACF;AAEA,MAAM,kBAAkB,IACtB;CACE;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,MAAA,MAAsB;CACzC,UAAU,EACR,MAAM;EACJ,QAAQ;EACR,KAAK;EACL,OAAO;CACT,EACF;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,gCAAgC;AAE5D,MAAM,cAAc,QAAQ;CAC1B,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAiB,UAAU;CAAM;CACjE,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAiB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAY,UAAU;CAAK;AAC3D,CAAC"}
|
|
@@ -7,6 +7,13 @@ declare const tooltipPlacements: readonly ["top", "right", "bottom", "left"];
|
|
|
7
7
|
declare const tooltipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
8
|
declare const tooltipArrowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
9
|
declare const tooltipArrowTipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
declare const tooltipAnatomy: {
|
|
11
|
+
readonly root: {
|
|
12
|
+
readonly part: "tooltip";
|
|
13
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
+
readonly required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
10
17
|
//#endregion
|
|
11
|
-
export { type TooltipPlacement, defaultTooltipPlacement, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
18
|
+
export { type TooltipPlacement, defaultTooltipPlacement, tooltipAnatomy, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
12
19
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/recipes/tooltip.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { arrivalMotion } from "./motion.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/tooltip.ts
|
|
@@ -20,7 +21,12 @@ const tooltipRecipe = cva([
|
|
|
20
21
|
]);
|
|
21
22
|
const tooltipArrowRecipe = cva(["[--arrow-size:0.5rem]", "[--arrow-background:var(--tf-glass-flat)]"]);
|
|
22
23
|
const tooltipArrowTipRecipe = cva("border-t border-l border-tf-line");
|
|
24
|
+
const tooltipAnatomy = anatomy({ root: {
|
|
25
|
+
part: "tooltip",
|
|
26
|
+
recipe: tooltipRecipe,
|
|
27
|
+
required: true
|
|
28
|
+
} });
|
|
23
29
|
//#endregion
|
|
24
|
-
export { defaultTooltipPlacement, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
30
|
+
export { defaultTooltipPlacement, tooltipAnatomy, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
25
31
|
|
|
26
32
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":[],"sources":["../../src/recipes/tooltip.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { arrivalMotion } from './motion'\n\ntype TooltipPlacement = 'top' | 'right' | 'bottom' | 'left'\n\nconst defaultTooltipPlacement = 'right' satisfies TooltipPlacement\n\nconst tooltipOpenToken = '--tf-duration-2'\n\nconst tooltipCloseToken = '--tf-duration-1'\n\nconst tooltipPlacements = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n] as const satisfies readonly TooltipPlacement[]\n\nconst tooltipRecipe = cva([\n 'z-tf-tooltip max-w-tf-panel rounded-tf-inline px-1.5 py-0.75',\n 'bg-tf-glass shadow-tf-float backdrop-blur-tf-glass',\n 'tf-edge-sweep tf-edge-plain',\n 'font-tf-body text-tf-caption-sm text-tf-fg',\n ...arrivalMotion,\n 'motion-reduce:animate-none',\n])\n\nconst tooltipArrowRecipe = cva([\n '[--arrow-size:0.5rem]',\n '[--arrow-background:var(--tf-glass-flat)]',\n])\n\nconst tooltipArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nexport {\n type TooltipPlacement,\n defaultTooltipPlacement,\n tooltipCloseToken,\n tooltipOpenToken,\n tooltipArrowRecipe,\n tooltipArrowTipRecipe,\n tooltipPlacements,\n tooltipRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../src/recipes/tooltip.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { arrivalMotion } from './motion'\n\ntype TooltipPlacement = 'top' | 'right' | 'bottom' | 'left'\n\nconst defaultTooltipPlacement = 'right' satisfies TooltipPlacement\n\nconst tooltipOpenToken = '--tf-duration-2'\n\nconst tooltipCloseToken = '--tf-duration-1'\n\nconst tooltipPlacements = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n] as const satisfies readonly TooltipPlacement[]\n\nconst tooltipRecipe = cva([\n 'z-tf-tooltip max-w-tf-panel rounded-tf-inline px-1.5 py-0.75',\n 'bg-tf-glass shadow-tf-float backdrop-blur-tf-glass',\n 'tf-edge-sweep tf-edge-plain',\n 'font-tf-body text-tf-caption-sm text-tf-fg',\n ...arrivalMotion,\n 'motion-reduce:animate-none',\n])\n\nconst tooltipArrowRecipe = cva([\n '[--arrow-size:0.5rem]',\n '[--arrow-background:var(--tf-glass-flat)]',\n])\n\nconst tooltipArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nconst tooltipAnatomy = anatomy({\n root: { part: 'tooltip', recipe: tooltipRecipe, required: true },\n})\n\nexport {\n type TooltipPlacement,\n defaultTooltipPlacement,\n tooltipAnatomy,\n tooltipCloseToken,\n tooltipOpenToken,\n tooltipArrowRecipe,\n tooltipArrowTipRecipe,\n tooltipPlacements,\n tooltipRecipe,\n}\n"],"mappings":";;;;AAQA,MAAM,0BAA0B;AAEhC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB,IAAI;CACxB;CACA;CACA;CACA;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAC7B,yBACA,2CACF,CAAC;AAED,MAAM,wBAAwB,IAAI,kCAAkC;AAEpE,MAAM,iBAAiB,QAAQ,EAC7B,MAAM;CAAE,MAAM;CAAW,QAAQ;CAAe,UAAU;AAAK,EACjE,CAAC"}
|
package/dist/recipes/topBar.d.ts
CHANGED
|
@@ -10,6 +10,48 @@ declare const topBarActionsRecipe: (props?: import("class-variance-authority/typ
|
|
|
10
10
|
declare const topBarLevels: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
11
11
|
type TopBarLevel = (typeof topBarLevels)[number];
|
|
12
12
|
declare const defaultTopBarLevel = "h1";
|
|
13
|
+
declare const topBarAnatomy: {
|
|
14
|
+
readonly actions: {
|
|
15
|
+
readonly part: "actions";
|
|
16
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
readonly required: false;
|
|
18
|
+
};
|
|
19
|
+
readonly content: {
|
|
20
|
+
readonly part: "content";
|
|
21
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
22
|
+
readonly required: true;
|
|
23
|
+
};
|
|
24
|
+
readonly edge: {
|
|
25
|
+
readonly part: "edge";
|
|
26
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
27
|
+
readonly required: true;
|
|
28
|
+
};
|
|
29
|
+
readonly eyebrow: {
|
|
30
|
+
readonly part: "eyebrow";
|
|
31
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
32
|
+
readonly required: false;
|
|
33
|
+
};
|
|
34
|
+
readonly headings: {
|
|
35
|
+
readonly part: "headings";
|
|
36
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
37
|
+
readonly required: true;
|
|
38
|
+
};
|
|
39
|
+
readonly root: {
|
|
40
|
+
readonly part: "top-bar";
|
|
41
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
42
|
+
readonly required: true;
|
|
43
|
+
};
|
|
44
|
+
readonly rule: {
|
|
45
|
+
readonly part: "rule";
|
|
46
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
47
|
+
readonly required: true;
|
|
48
|
+
};
|
|
49
|
+
readonly title: {
|
|
50
|
+
readonly part: "title";
|
|
51
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
52
|
+
readonly required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
13
55
|
//#endregion
|
|
14
|
-
export { type TopBarLevel, defaultTopBarLevel, topBarActionsRecipe, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
56
|
+
export { type TopBarLevel, defaultTopBarLevel, topBarActionsRecipe, topBarAnatomy, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
15
57
|
//# sourceMappingURL=topBar.d.ts.map
|
package/dist/recipes/topBar.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { ruleFading } from "../parts/rule.js";
|
|
2
3
|
import { eyebrowLead } from "../parts/eyebrow.js";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
@@ -29,7 +30,49 @@ const topBarLevels = [
|
|
|
29
30
|
"h6"
|
|
30
31
|
];
|
|
31
32
|
const defaultTopBarLevel = "h1";
|
|
33
|
+
const topBarAnatomy = anatomy({
|
|
34
|
+
actions: {
|
|
35
|
+
part: "actions",
|
|
36
|
+
recipe: topBarActionsRecipe,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
content: {
|
|
40
|
+
part: "content",
|
|
41
|
+
recipe: topBarContentRecipe,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
edge: {
|
|
45
|
+
part: "edge",
|
|
46
|
+
recipe: topBarEdgeRecipe,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
eyebrow: {
|
|
50
|
+
part: "eyebrow",
|
|
51
|
+
recipe: topBarEyebrowRecipe,
|
|
52
|
+
required: false
|
|
53
|
+
},
|
|
54
|
+
headings: {
|
|
55
|
+
part: "headings",
|
|
56
|
+
recipe: topBarHeadingsRecipe,
|
|
57
|
+
required: true
|
|
58
|
+
},
|
|
59
|
+
root: {
|
|
60
|
+
part: "top-bar",
|
|
61
|
+
recipe: topBarRecipe,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
rule: {
|
|
65
|
+
part: "rule",
|
|
66
|
+
recipe: topBarRuleRecipe,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
part: "title",
|
|
71
|
+
recipe: topBarTitleRecipe,
|
|
72
|
+
required: true
|
|
73
|
+
}
|
|
74
|
+
});
|
|
32
75
|
//#endregion
|
|
33
|
-
export { defaultTopBarLevel, topBarActionsRecipe, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
76
|
+
export { defaultTopBarLevel, topBarActionsRecipe, topBarAnatomy, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
34
77
|
|
|
35
78
|
//# sourceMappingURL=topBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topBar.js","names":[],"sources":["../../src/recipes/topBar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { ruleFading } from '#parts/rule'\n\nconst topBarRecipe = cva([\n 'sticky top-0 isolate z-tf-raised w-full',\n 'bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n 'tf-transition motion-reduce:transition-none',\n 'data-lifted:shadow-tf-float',\n])\n\nconst topBarContentRecipe = cva([\n 'mx-auto flex w-full max-w-tf-canvas flex-wrap items-center gap-4 px-6 py-4 sm:px-12',\n 'min-h-[calc(var(--spacing-tf-control-lg)+var(--spacing)*8)]',\n])\n\nconst topBarEdgeRecipe = cva('-mb-px block h-px w-full')\n\nconst topBarRuleRecipe = cva([\n `absolute inset-x-0 bottom-0 ${ruleFading}`,\n 'opacity-0 tf-transition motion-reduce:transition-none',\n 'in-data-lifted:opacity-100',\n])\n\nconst topBarHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-1')\n\nconst topBarEyebrowRecipe = cva(eyebrowLead)\n\nconst topBarTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h3 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst topBarActionsRecipe = cva('flex flex-wrap items-center gap-4')\n\nconst topBarLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\n\ntype TopBarLevel = (typeof topBarLevels)[number]\n\nconst defaultTopBarLevel = 'h1' satisfies TopBarLevel\n\nexport {\n type TopBarLevel,\n defaultTopBarLevel,\n topBarLevels,\n topBarRuleRecipe,\n topBarActionsRecipe,\n topBarContentRecipe,\n topBarEdgeRecipe,\n topBarEyebrowRecipe,\n topBarHeadingsRecipe,\n topBarRecipe,\n topBarTitleRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"topBar.js","names":[],"sources":["../../src/recipes/topBar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { ruleFading } from '#parts/rule'\n\nconst topBarRecipe = cva([\n 'sticky top-0 isolate z-tf-raised w-full',\n 'bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n 'tf-transition motion-reduce:transition-none',\n 'data-lifted:shadow-tf-float',\n])\n\nconst topBarContentRecipe = cva([\n 'mx-auto flex w-full max-w-tf-canvas flex-wrap items-center gap-4 px-6 py-4 sm:px-12',\n 'min-h-[calc(var(--spacing-tf-control-lg)+var(--spacing)*8)]',\n])\n\nconst topBarEdgeRecipe = cva('-mb-px block h-px w-full')\n\nconst topBarRuleRecipe = cva([\n `absolute inset-x-0 bottom-0 ${ruleFading}`,\n 'opacity-0 tf-transition motion-reduce:transition-none',\n 'in-data-lifted:opacity-100',\n])\n\nconst topBarHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-1')\n\nconst topBarEyebrowRecipe = cva(eyebrowLead)\n\nconst topBarTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h3 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst topBarActionsRecipe = cva('flex flex-wrap items-center gap-4')\n\nconst topBarLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\n\ntype TopBarLevel = (typeof topBarLevels)[number]\n\nconst defaultTopBarLevel = 'h1' satisfies TopBarLevel\n\nconst topBarAnatomy = anatomy({\n actions: { part: 'actions', recipe: topBarActionsRecipe, required: false },\n content: { part: 'content', recipe: topBarContentRecipe, required: true },\n edge: { part: 'edge', recipe: topBarEdgeRecipe, required: true },\n eyebrow: { part: 'eyebrow', recipe: topBarEyebrowRecipe, required: false },\n headings: { part: 'headings', recipe: topBarHeadingsRecipe, required: true },\n root: { part: 'top-bar', recipe: topBarRecipe, required: true },\n rule: { part: 'rule', recipe: topBarRuleRecipe, required: true },\n title: { part: 'title', recipe: topBarTitleRecipe, required: true },\n})\n\nexport {\n type TopBarLevel,\n defaultTopBarLevel,\n topBarAnatomy,\n topBarLevels,\n topBarRuleRecipe,\n topBarActionsRecipe,\n topBarContentRecipe,\n topBarEdgeRecipe,\n topBarEyebrowRecipe,\n topBarHeadingsRecipe,\n topBarRecipe,\n topBarTitleRecipe,\n}\n"],"mappings":";;;;;AAMA,MAAM,eAAe,IAAI;CACvB;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI,CAC9B,uFACA,6DACF,CAAC;AAED,MAAM,mBAAmB,IAAI,0BAA0B;AAEvD,MAAM,mBAAmB,IAAI;CAC3B,+BAA+B;CAC/B;CACA;AACF,CAAC;AAED,MAAM,uBAAuB,IAAI,oCAAoC;AAErE,MAAM,sBAAsB,IAAI,WAAW;AAE3C,MAAM,oBAAoB,IACxB,4EACF;AAEA,MAAM,sBAAsB,IAAI,mCAAmC;AAEnE,MAAM,eAAe;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;AAAI;AAIxD,MAAM,qBAAqB;AAE3B,MAAM,gBAAgB,QAAQ;CAC5B,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAM;CACzE,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAK;CACxE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAM;CACzE,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAsB,UAAU;CAAK;CAC3E,MAAM;EAAE,MAAM;EAAW,QAAQ;EAAc,UAAU;CAAK;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAmB,UAAU;CAAK;AACpE,CAAC"}
|