@techfides/ui-library-design 0.1.0 → 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.
- package/README.md +2 -0
- package/css/theme.css +14 -1
- package/dist/cn.js +3 -0
- package/dist/cn.js.map +1 -1
- package/dist/czech.d.ts +6 -0
- package/dist/czech.js +100 -0
- package/dist/czech.js.map +1 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +6 -5
- package/dist/parts/rule.js +11 -8
- package/dist/parts/rule.js.map +1 -1
- package/dist/parts/surface.js +4 -4
- package/dist/parts/surface.js.map +1 -1
- package/dist/recipes/field.d.ts +1 -0
- package/dist/recipes/field.js +15 -6
- package/dist/recipes/field.js.map +1 -1
- package/dist/recipes/heading.d.ts +4 -3
- package/dist/recipes/heading.js +5 -2
- package/dist/recipes/heading.js.map +1 -1
- package/dist/recipes/metaRow.d.ts +5 -4
- package/dist/recipes/metaRow.js +8 -2
- package/dist/recipes/metaRow.js.map +1 -1
- package/dist/recipes/nebula.d.ts +9 -2
- package/dist/recipes/nebula.js +32 -3
- package/dist/recipes/nebula.js.map +1 -1
- package/dist/recipes/paper.d.ts +14 -6
- package/dist/recipes/paper.js +60 -19
- package/dist/recipes/paper.js.map +1 -1
- package/dist/recipes/sectionHeader.d.ts +10 -4
- package/dist/recipes/sectionHeader.js +23 -3
- package/dist/recipes/sectionHeader.js.map +1 -1
- package/dist/recipes/separator.d.ts +4 -1
- package/dist/recipes/separator.js +40 -13
- package/dist/recipes/separator.js.map +1 -1
- package/dist/recipes/slider.d.ts +3 -1
- package/dist/recipes/slider.js +8 -2
- package/dist/recipes/slider.js.map +1 -1
- package/dist/recipes/text.d.ts +1 -1
- package/dist/words.js +90 -87
- package/dist/words.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.js","names":[],"sources":["../../src/recipes/heading.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\ntype HeadingLevel = 'display' | 'h2' | 'h3' | 'h4'\n\nconst defaultHeadingLevel = 'h3' satisfies HeadingLevel\n\nconst headingLevels = ['display'
|
|
1
|
+
{"version":3,"file":"heading.js","names":[],"sources":["../../src/recipes/heading.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\ntype HeadingLevel = 'numeral' | 'display' | 'h2' | 'h3' | 'h4'\n\nconst defaultHeadingLevel = 'h3' satisfies HeadingLevel\n\nconst headingLevels = [\n 'numeral',\n 'display',\n 'h2',\n 'h3',\n 'h4',\n] as const satisfies readonly HeadingLevel[]\n\nconst headingRecipe = cva(['font-tf-display font-bold tracking-tf-tight text-tf-fg'], {\n defaultVariants: { level: defaultHeadingLevel, tabular: false },\n variants: {\n level: {\n display: 'text-tf-display',\n h2: 'text-tf-h2',\n h3: 'text-tf-h3',\n h4: 'text-tf-h4',\n numeral: 'text-tf-numeral',\n } satisfies Record<HeadingLevel, string>,\n tabular: { false: '', true: 'tabular-nums' },\n },\n})\n\nconst HEADING_DEFAULT_TAG = {\n display: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h3',\n numeral: 'p',\n} satisfies Record<HeadingLevel, string>\n\nexport { type HeadingLevel, HEADING_DEFAULT_TAG, defaultHeadingLevel, headingLevels, headingRecipe }\n"],"mappings":";;AAIA,MAAM,sBAAsB;AAE5B,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB,IAAI,CAAC,wDAAwD,GAAG;CACpF,iBAAiB;EAAE,OAAA;EAA4B,SAAS;CAAM;CAC9D,UAAU;EACR,OAAO;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,SAAS;EACX;EACA,SAAS;GAAE,OAAO;GAAI,MAAM;EAAe;CAC7C;AACF,CAAC;AAED,MAAM,sBAAsB;CAC1B,SAAS;CACT,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,SAAS;AACX"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
//#region src/recipes/metaRow.d.ts
|
|
2
|
-
type MetaRowLayout = 'justify' | 'inline';
|
|
2
|
+
type MetaRowLayout = 'justify' | 'inline' | 'note';
|
|
3
|
+
type MetaRowPairedLayout = Exclude<MetaRowLayout, 'note'>;
|
|
3
4
|
type MetaRowEmphasis = 'normal' | 'strong';
|
|
4
5
|
declare const defaultMetaRowLayout = "justify";
|
|
5
6
|
declare const defaultMetaRowEmphasis = "normal";
|
|
6
|
-
declare const metaRowLayouts: readonly ["justify", "inline"];
|
|
7
|
+
declare const metaRowLayouts: readonly ["justify", "inline", "note"];
|
|
7
8
|
declare const metaRowEmphases: readonly ["normal", "strong"];
|
|
8
9
|
declare const metaRowTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
9
10
|
declare const metaRowRecipe: (props?: ({
|
|
10
|
-
layout?: "inline" | "justify" | null | undefined;
|
|
11
|
+
layout?: "inline" | "justify" | "note" | null | undefined;
|
|
11
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
13
|
//#endregion
|
|
13
|
-
export { type MetaRowEmphasis, type MetaRowLayout, defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
14
|
+
export { type MetaRowEmphasis, type MetaRowLayout, type MetaRowPairedLayout, defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
14
15
|
//# sourceMappingURL=metaRow.d.ts.map
|
package/dist/recipes/metaRow.js
CHANGED
|
@@ -3,14 +3,20 @@ import { cva } from "class-variance-authority";
|
|
|
3
3
|
//#region src/recipes/metaRow.ts
|
|
4
4
|
const defaultMetaRowLayout = "justify";
|
|
5
5
|
const defaultMetaRowEmphasis = "normal";
|
|
6
|
-
const metaRowLayouts = [
|
|
6
|
+
const metaRowLayouts = [
|
|
7
|
+
"justify",
|
|
8
|
+
"inline",
|
|
9
|
+
"note"
|
|
10
|
+
];
|
|
7
11
|
const metaRowEmphases = ["normal", "strong"];
|
|
8
12
|
const metaRowTones = tones;
|
|
13
|
+
const NOTE = ["items-center text-tf-muted", "[&_svg]:size-tf-icon-sm"].join(" ");
|
|
9
14
|
const metaRowRecipe = cva("flex items-baseline gap-2 tf-icons", {
|
|
10
15
|
defaultVariants: { layout: defaultMetaRowLayout },
|
|
11
16
|
variants: { layout: {
|
|
12
17
|
inline: "",
|
|
13
|
-
justify: "justify-between gap-4"
|
|
18
|
+
justify: "justify-between gap-4",
|
|
19
|
+
note: NOTE
|
|
14
20
|
} }
|
|
15
21
|
});
|
|
16
22
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metaRow.js","names":[],"sources":["../../src/recipes/metaRow.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { tones } from '#parts/tone'\n\ntype MetaRowLayout = 'justify' | 'inline'\n\ntype MetaRowEmphasis = 'normal' | 'strong'\n\nconst defaultMetaRowLayout = 'justify' satisfies MetaRowLayout\n\nconst defaultMetaRowEmphasis = 'normal' satisfies MetaRowEmphasis\n\nconst metaRowLayouts = ['justify', 'inline'] as const satisfies readonly MetaRowLayout[]\n\nconst metaRowEmphases = ['normal', 'strong'] as const satisfies readonly MetaRowEmphasis[]\n\nconst metaRowTones = tones\n\nconst metaRowRecipe = cva('flex items-baseline gap-2 tf-icons', {\n defaultVariants: { layout: defaultMetaRowLayout },\n variants: {\n layout: {\n inline: '',\n justify: 'justify-between gap-4',\n } satisfies Record<MetaRowLayout, string>,\n },\n})\n\nexport {\n type MetaRowEmphasis,\n type MetaRowLayout,\n defaultMetaRowEmphasis,\n defaultMetaRowLayout,\n metaRowEmphases,\n metaRowLayouts,\n metaRowRecipe,\n metaRowTones,\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"metaRow.js","names":[],"sources":["../../src/recipes/metaRow.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { tones } from '#parts/tone'\n\ntype MetaRowLayout = 'justify' | 'inline' | 'note'\n\ntype MetaRowPairedLayout = Exclude<MetaRowLayout, 'note'>\n\ntype MetaRowEmphasis = 'normal' | 'strong'\n\nconst defaultMetaRowLayout = 'justify' satisfies MetaRowLayout\n\nconst defaultMetaRowEmphasis = 'normal' satisfies MetaRowEmphasis\n\nconst metaRowLayouts = ['justify', 'inline', 'note'] as const satisfies readonly MetaRowLayout[]\n\nconst metaRowEmphases = ['normal', 'strong'] as const satisfies readonly MetaRowEmphasis[]\n\nconst metaRowTones = tones\n\nconst NOTE = ['items-center text-tf-muted', '[&_svg]:size-tf-icon-sm'].join(' ')\n\nconst metaRowRecipe = cva('flex items-baseline gap-2 tf-icons', {\n defaultVariants: { layout: defaultMetaRowLayout },\n variants: {\n layout: {\n inline: '',\n justify: 'justify-between gap-4',\n note: NOTE,\n } satisfies Record<MetaRowLayout, string>,\n },\n})\n\nexport {\n type MetaRowEmphasis,\n type MetaRowLayout,\n type MetaRowPairedLayout,\n defaultMetaRowEmphasis,\n defaultMetaRowLayout,\n metaRowEmphases,\n metaRowLayouts,\n metaRowRecipe,\n metaRowTones,\n}\n"],"mappings":";;;AAUA,MAAM,uBAAuB;AAE7B,MAAM,yBAAyB;AAE/B,MAAM,iBAAiB;CAAC;CAAW;CAAU;AAAM;AAEnD,MAAM,kBAAkB,CAAC,UAAU,QAAQ;AAE3C,MAAM,eAAe;AAErB,MAAM,OAAO,CAAC,8BAA8B,yBAAyB,CAAC,CAAC,KAAK,GAAG;AAE/E,MAAM,gBAAgB,IAAI,sCAAsC;CAC9D,iBAAiB,EAAE,QAAQ,qBAAqB;CAChD,UAAU,EACR,QAAQ;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACR,EACF;AACF,CAAC"}
|
package/dist/recipes/nebula.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
//#region src/recipes/nebula.d.ts
|
|
2
|
-
|
|
2
|
+
type NebulaOrigin = 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left' | 'top-left';
|
|
3
|
+
declare const defaultNebulaTone = "accent";
|
|
4
|
+
declare const nebulaTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
5
|
+
declare const nebulaOrigins: readonly ["top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left"];
|
|
6
|
+
declare const nebulaRecipe: (props?: ({
|
|
7
|
+
origin?: "top" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left" | "left" | "top-left" | null | undefined;
|
|
8
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
3
10
|
declare const nebulaVeilRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
4
11
|
declare const nebulaCloudRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
12
|
declare const nebulaCloudLowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
13
|
declare const nebulaCloudWideRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
14
|
//#endregion
|
|
8
|
-
export { nebulaCloudLowRecipe, nebulaCloudRecipe, nebulaCloudWideRecipe, nebulaRecipe, nebulaVeilRecipe };
|
|
15
|
+
export { type NebulaOrigin, defaultNebulaTone, nebulaCloudLowRecipe, nebulaCloudRecipe, nebulaCloudWideRecipe, nebulaOrigins, nebulaRecipe, nebulaTones, nebulaVeilRecipe };
|
|
9
16
|
//# sourceMappingURL=nebula.d.ts.map
|
package/dist/recipes/nebula.js
CHANGED
|
@@ -1,15 +1,44 @@
|
|
|
1
|
+
import { toneBlend } from "../tone.js";
|
|
2
|
+
import { defaultTone, tones } from "../parts/tone.js";
|
|
1
3
|
import { cva } from "class-variance-authority";
|
|
2
4
|
//#region src/recipes/nebula.ts
|
|
5
|
+
const defaultNebulaTone = defaultTone;
|
|
6
|
+
const nebulaTones = tones;
|
|
7
|
+
const nebulaOrigins = [
|
|
8
|
+
"top",
|
|
9
|
+
"top-right",
|
|
10
|
+
"right",
|
|
11
|
+
"bottom-right",
|
|
12
|
+
"bottom",
|
|
13
|
+
"bottom-left",
|
|
14
|
+
"left",
|
|
15
|
+
"top-left"
|
|
16
|
+
];
|
|
3
17
|
const nebulaRecipe = cva([
|
|
4
18
|
"pointer-events-none absolute -inset-1/2",
|
|
5
|
-
"tf-turning tf-nebula
|
|
19
|
+
"tf-turning tf-nebula",
|
|
6
20
|
"[animation-duration:calc(var(--tf-sweep-duration)*30)]"
|
|
7
|
-
]
|
|
21
|
+
], {
|
|
22
|
+
defaultVariants: { tone: defaultNebulaTone },
|
|
23
|
+
variants: {
|
|
24
|
+
origin: {
|
|
25
|
+
bottom: "[animation-delay:calc(var(--tf-sweep-duration)*-7.5)] motion-reduce:[--tf-sweep:90deg]",
|
|
26
|
+
"bottom-left": "[animation-delay:calc(var(--tf-sweep-duration)*-11.25)] motion-reduce:[--tf-sweep:135deg]",
|
|
27
|
+
"bottom-right": "[animation-delay:calc(var(--tf-sweep-duration)*-3.75)] motion-reduce:[--tf-sweep:45deg]",
|
|
28
|
+
left: "[animation-delay:calc(var(--tf-sweep-duration)*-15)] motion-reduce:[--tf-sweep:180deg]",
|
|
29
|
+
right: "[animation-delay:0s] motion-reduce:[--tf-sweep:0deg]",
|
|
30
|
+
top: "[animation-delay:calc(var(--tf-sweep-duration)*-22.5)] motion-reduce:[--tf-sweep:270deg]",
|
|
31
|
+
"top-left": "[animation-delay:calc(var(--tf-sweep-duration)*-18.75)] motion-reduce:[--tf-sweep:225deg]",
|
|
32
|
+
"top-right": "[animation-delay:calc(var(--tf-sweep-duration)*-26.25)] motion-reduce:[--tf-sweep:315deg]"
|
|
33
|
+
},
|
|
34
|
+
tone: toneBlend
|
|
35
|
+
}
|
|
36
|
+
});
|
|
8
37
|
const nebulaVeilRecipe = cva("tf-nebula-veil");
|
|
9
38
|
const nebulaCloudRecipe = cva("tf-nebula-cloud");
|
|
10
39
|
const nebulaCloudLowRecipe = cva("tf-nebula-cloud tf-cloud-low");
|
|
11
40
|
const nebulaCloudWideRecipe = cva("tf-nebula-cloud tf-cloud-wide");
|
|
12
41
|
//#endregion
|
|
13
|
-
export { nebulaCloudLowRecipe, nebulaCloudRecipe, nebulaCloudWideRecipe, nebulaRecipe, nebulaVeilRecipe };
|
|
42
|
+
export { defaultNebulaTone, nebulaCloudLowRecipe, nebulaCloudRecipe, nebulaCloudWideRecipe, nebulaOrigins, nebulaRecipe, nebulaTones, nebulaVeilRecipe };
|
|
14
43
|
|
|
15
44
|
//# sourceMappingURL=nebula.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nebula.js","names":[],"sources":["../../src/recipes/nebula.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst nebulaRecipe = cva([\n
|
|
1
|
+
{"version":3,"file":"nebula.js","names":[],"sources":["../../src/recipes/nebula.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\ntype NebulaOrigin =\n | 'top'\n | 'top-right'\n | 'right'\n | 'bottom-right'\n | 'bottom'\n | 'bottom-left'\n | 'left'\n | 'top-left'\n\nconst defaultNebulaTone = defaultTone\n\nconst nebulaTones = tones\n\nconst nebulaOrigins = [\n 'top',\n 'top-right',\n 'right',\n 'bottom-right',\n 'bottom',\n 'bottom-left',\n 'left',\n 'top-left',\n] as const satisfies readonly NebulaOrigin[]\n\nconst NEBULA_STARTS = {\n bottom: '[animation-delay:calc(var(--tf-sweep-duration)*-7.5)] motion-reduce:[--tf-sweep:90deg]',\n 'bottom-left':\n '[animation-delay:calc(var(--tf-sweep-duration)*-11.25)] motion-reduce:[--tf-sweep:135deg]',\n 'bottom-right':\n '[animation-delay:calc(var(--tf-sweep-duration)*-3.75)] motion-reduce:[--tf-sweep:45deg]',\n left: '[animation-delay:calc(var(--tf-sweep-duration)*-15)] motion-reduce:[--tf-sweep:180deg]',\n right: '[animation-delay:0s] motion-reduce:[--tf-sweep:0deg]',\n top: '[animation-delay:calc(var(--tf-sweep-duration)*-22.5)] motion-reduce:[--tf-sweep:270deg]',\n 'top-left':\n '[animation-delay:calc(var(--tf-sweep-duration)*-18.75)] motion-reduce:[--tf-sweep:225deg]',\n 'top-right':\n '[animation-delay:calc(var(--tf-sweep-duration)*-26.25)] motion-reduce:[--tf-sweep:315deg]',\n} satisfies Record<NebulaOrigin, string>\n\nconst nebulaRecipe = cva(\n [\n 'pointer-events-none absolute -inset-1/2',\n 'tf-turning tf-nebula',\n '[animation-duration:calc(var(--tf-sweep-duration)*30)]',\n ],\n {\n defaultVariants: { tone: defaultNebulaTone },\n variants: {\n origin: NEBULA_STARTS,\n tone: toneBlend satisfies Record<Tone, string>,\n },\n },\n)\n\nconst nebulaVeilRecipe = cva('tf-nebula-veil')\n\nconst nebulaCloudRecipe = cva('tf-nebula-cloud')\n\nconst nebulaCloudLowRecipe = cva('tf-nebula-cloud tf-cloud-low')\n\nconst nebulaCloudWideRecipe = cva('tf-nebula-cloud tf-cloud-wide')\n\nexport {\n type NebulaOrigin,\n defaultNebulaTone,\n nebulaCloudLowRecipe,\n nebulaCloudRecipe,\n nebulaCloudWideRecipe,\n nebulaOrigins,\n nebulaRecipe,\n nebulaTones,\n nebulaVeilRecipe,\n}\n"],"mappings":";;;;AAgBA,MAAM,oBAAoB;AAE1B,MAAM,cAAc;AAEpB,MAAM,gBAAgB;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAiBA,MAAM,eAAe,IACnB;CACE;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,MAAM,kBAAkB;CAC3C,UAAU;EACR,QAAQ;GAvBZ,QAAQ;GACR,eACE;GACF,gBACE;GACF,MAAM;GACN,OAAO;GACP,KAAK;GACL,YACE;GACF,aACE;EAYsB;EACpB,MAAM;CACR;AACF,CACF;AAEA,MAAM,mBAAmB,IAAI,gBAAgB;AAE7C,MAAM,oBAAoB,IAAI,iBAAiB;AAE/C,MAAM,uBAAuB,IAAI,8BAA8B;AAE/D,MAAM,wBAAwB,IAAI,+BAA+B"}
|
package/dist/recipes/paper.d.ts
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
//#region src/recipes/paper.d.ts
|
|
2
2
|
type PaperVariant = 'plain' | 'elevated';
|
|
3
|
-
type PaperInset = 'padded' | 'flush';
|
|
3
|
+
type PaperInset = 'padded' | 'flush' | 'roomy';
|
|
4
4
|
declare const defaultPaperVariant = "plain";
|
|
5
5
|
declare const defaultPaperInset = "padded";
|
|
6
|
+
declare const defaultPaperTone = "accent";
|
|
6
7
|
declare const paperRecipe: (props?: ({
|
|
8
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
7
9
|
variant?: "plain" | "elevated" | null | undefined;
|
|
8
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
11
|
declare const paperBodyRecipe: (props?: ({
|
|
10
|
-
inset?: "padded" | "flush" | null | undefined;
|
|
12
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
declare const paperHeaderRecipe: (props?: ({
|
|
15
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
declare const paperRuleRecipe: (props?: ({
|
|
18
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
11
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
-
declare const paperHeaderRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
|
-
declare const paperRuleRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
20
|
declare const paperBadgeRecipe: (props?: ({
|
|
15
21
|
headed?: boolean | null | undefined;
|
|
22
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
16
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
24
|
declare const paperActionRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
18
25
|
declare const paperVariants: readonly ["plain", "elevated"];
|
|
19
|
-
declare const
|
|
26
|
+
declare const paperTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
27
|
+
declare const paperInsets: readonly ["padded", "flush", "roomy"];
|
|
20
28
|
//#endregion
|
|
21
|
-
export { type PaperInset, type PaperVariant, defaultPaperInset, defaultPaperVariant, paperActionRecipe, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe, paperVariants };
|
|
29
|
+
export { type PaperInset, type PaperVariant, defaultPaperInset, defaultPaperTone, defaultPaperVariant, paperActionRecipe, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe, paperTones, paperVariants };
|
|
22
30
|
//# sourceMappingURL=paper.d.ts.map
|
package/dist/recipes/paper.js
CHANGED
|
@@ -1,42 +1,83 @@
|
|
|
1
|
+
import { toneBlend } from "../tone.js";
|
|
1
2
|
import { ruleFading } from "../parts/rule.js";
|
|
2
|
-
import {
|
|
3
|
+
import { defaultTone, tones } from "../parts/tone.js";
|
|
4
|
+
import { surfaceLifted, surfaceSkin } from "../parts/surface.js";
|
|
3
5
|
import { cva } from "class-variance-authority";
|
|
4
6
|
//#region src/recipes/paper.ts
|
|
5
7
|
const defaultPaperVariant = "plain";
|
|
6
8
|
const defaultPaperInset = "padded";
|
|
9
|
+
const defaultPaperTone = defaultTone;
|
|
7
10
|
const paperBase = [
|
|
8
11
|
"@container relative w-full",
|
|
9
|
-
...
|
|
12
|
+
...surfaceSkin,
|
|
10
13
|
"font-tf-body text-tf-body-sm font-medium text-tf-fg"
|
|
11
14
|
];
|
|
12
15
|
const paperRecipe = cva(paperBase, {
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
defaultVariants: {
|
|
17
|
+
tone: defaultPaperTone,
|
|
18
|
+
variant: defaultPaperVariant
|
|
19
|
+
},
|
|
20
|
+
variants: {
|
|
21
|
+
tone: toneBlend,
|
|
22
|
+
variant: {
|
|
23
|
+
elevated: surfaceLifted.join(" "),
|
|
24
|
+
plain: ""
|
|
25
|
+
}
|
|
26
|
+
}
|
|
18
27
|
});
|
|
19
28
|
const GUTTER = "px-4 @tf-panel:px-8";
|
|
20
|
-
const
|
|
29
|
+
const ROOMY_GUTTER = "px-6 @tf-panel:px-14";
|
|
30
|
+
const RIBS = "py-6 @tf-panel:py-8";
|
|
31
|
+
const paperBodyRecipe = cva("", {
|
|
21
32
|
defaultVariants: { inset: defaultPaperInset },
|
|
22
33
|
variants: { inset: {
|
|
23
|
-
flush:
|
|
24
|
-
padded: GUTTER
|
|
34
|
+
flush: RIBS,
|
|
35
|
+
padded: `${RIBS} ${GUTTER}`,
|
|
36
|
+
roomy: `py-8 @tf-panel:py-14 ${ROOMY_GUTTER}`
|
|
25
37
|
} }
|
|
26
38
|
});
|
|
27
|
-
const paperHeaderRecipe = cva([`relative flex flex-wrap items-center justify-between gap-4 py-5
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
true: "top-10 -translate-y-1/2"
|
|
39
|
+
const paperHeaderRecipe = cva([`relative flex flex-wrap items-center justify-between gap-4 py-5`, "min-h-[calc(var(--spacing-tf-control-sm)+var(--spacing)*10)]"], {
|
|
40
|
+
defaultVariants: { inset: defaultPaperInset },
|
|
41
|
+
variants: { inset: {
|
|
42
|
+
flush: GUTTER,
|
|
43
|
+
padded: GUTTER,
|
|
44
|
+
roomy: ROOMY_GUTTER
|
|
34
45
|
} }
|
|
35
46
|
});
|
|
47
|
+
const paperRuleRecipe = cva(`absolute bottom-0 ${ruleFading}`, {
|
|
48
|
+
defaultVariants: { inset: defaultPaperInset },
|
|
49
|
+
variants: { inset: {
|
|
50
|
+
flush: "inset-x-4 @tf-panel:inset-x-8",
|
|
51
|
+
padded: "inset-x-4 @tf-panel:inset-x-8",
|
|
52
|
+
roomy: "inset-x-6 @tf-panel:inset-x-14"
|
|
53
|
+
} }
|
|
54
|
+
});
|
|
55
|
+
const paperBadgeRecipe = cva("absolute", {
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
headed: false,
|
|
58
|
+
inset: defaultPaperInset
|
|
59
|
+
},
|
|
60
|
+
variants: {
|
|
61
|
+
headed: {
|
|
62
|
+
false: "top-4",
|
|
63
|
+
true: "top-10 -translate-y-1/2"
|
|
64
|
+
},
|
|
65
|
+
inset: {
|
|
66
|
+
flush: "right-4 @tf-panel:right-8",
|
|
67
|
+
padded: "right-4 @tf-panel:right-8",
|
|
68
|
+
roomy: "right-6 @tf-panel:right-14"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
36
72
|
const paperActionRecipe = cva("-mr-3 flex min-w-0 flex-initial flex-wrap items-center justify-end gap-4");
|
|
37
73
|
const paperVariants = ["plain", "elevated"];
|
|
38
|
-
const
|
|
74
|
+
const paperTones = tones;
|
|
75
|
+
const paperInsets = [
|
|
76
|
+
"padded",
|
|
77
|
+
"flush",
|
|
78
|
+
"roomy"
|
|
79
|
+
];
|
|
39
80
|
//#endregion
|
|
40
|
-
export { defaultPaperInset, defaultPaperVariant, paperActionRecipe, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe, paperVariants };
|
|
81
|
+
export { defaultPaperInset, defaultPaperTone, defaultPaperVariant, paperActionRecipe, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe, paperTones, paperVariants };
|
|
41
82
|
|
|
42
83
|
//# sourceMappingURL=paper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paper.js","names":[],"sources":["../../src/recipes/paper.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { ruleFading } from '#parts/rule'\nimport { surfaceLifted,
|
|
1
|
+
{"version":3,"file":"paper.js","names":[],"sources":["../../src/recipes/paper.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { ruleFading } from '#parts/rule'\nimport { surfaceLifted, surfaceSkin } from '#parts/surface'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\ntype PaperVariant = 'plain' | 'elevated'\n\ntype PaperInset = 'padded' | 'flush' | 'roomy'\n\nconst defaultPaperVariant = 'plain' satisfies PaperVariant\n\nconst defaultPaperInset = 'padded' satisfies PaperInset\n\nconst defaultPaperTone = defaultTone\n\nconst paperBase = [\n '@container relative w-full',\n ...surfaceSkin,\n 'font-tf-body text-tf-body-sm font-medium text-tf-fg',\n]\n\nconst paperRecipe = cva(paperBase, {\n defaultVariants: { tone: defaultPaperTone, variant: defaultPaperVariant },\n variants: {\n tone: toneBlend satisfies Record<Tone, string>,\n variant: {\n elevated: surfaceLifted.join(' '),\n plain: '',\n } satisfies Record<PaperVariant, string>,\n },\n})\n\nconst GUTTER = 'px-4 @tf-panel:px-8'\n\nconst ROOMY_GUTTER = 'px-6 @tf-panel:px-14'\n\nconst RIBS = 'py-6 @tf-panel:py-8'\n\nconst ROOMY_RIBS = 'py-8 @tf-panel:py-14'\n\nconst paperBodyRecipe = cva('', {\n defaultVariants: { inset: defaultPaperInset },\n variants: {\n inset: {\n flush: RIBS,\n padded: `${RIBS} ${GUTTER}`,\n roomy: `${ROOMY_RIBS} ${ROOMY_GUTTER}`,\n } satisfies Record<PaperInset, string>,\n },\n})\n\nconst HEAD_ROW = 'min-h-[calc(var(--spacing-tf-control-sm)+var(--spacing)*10)]'\n\nconst paperHeaderRecipe = cva(\n [`relative flex flex-wrap items-center justify-between gap-4 py-5`, HEAD_ROW],\n {\n defaultVariants: { inset: defaultPaperInset },\n variants: {\n inset: {\n flush: GUTTER,\n padded: GUTTER,\n roomy: ROOMY_GUTTER,\n } satisfies Record<PaperInset, string>,\n },\n },\n)\n\nconst paperRuleRecipe = cva(`absolute bottom-0 ${ruleFading}`, {\n defaultVariants: { inset: defaultPaperInset },\n variants: {\n inset: {\n flush: 'inset-x-4 @tf-panel:inset-x-8',\n padded: 'inset-x-4 @tf-panel:inset-x-8',\n roomy: 'inset-x-6 @tf-panel:inset-x-14',\n } satisfies Record<PaperInset, string>,\n },\n})\n\nconst paperBadgeRecipe = cva('absolute', {\n defaultVariants: { headed: false, inset: defaultPaperInset },\n variants: {\n headed: { false: 'top-4', true: 'top-10 -translate-y-1/2' },\n inset: {\n flush: 'right-4 @tf-panel:right-8',\n padded: 'right-4 @tf-panel:right-8',\n roomy: 'right-6 @tf-panel:right-14',\n } satisfies Record<PaperInset, string>,\n },\n})\n\nconst paperActionRecipe = cva(\n '-mr-3 flex min-w-0 flex-initial flex-wrap items-center justify-end gap-4',\n)\n\nconst paperVariants = ['plain', 'elevated'] as const satisfies readonly PaperVariant[]\n\nconst paperTones = tones\n\nconst paperInsets = ['padded', 'flush', 'roomy'] as const satisfies readonly PaperInset[]\n\nexport {\n type PaperInset,\n type PaperVariant,\n defaultPaperInset,\n defaultPaperTone,\n defaultPaperVariant,\n paperActionRecipe,\n paperBadgeRecipe,\n paperBodyRecipe,\n paperHeaderRecipe,\n paperInsets,\n paperRecipe,\n paperRuleRecipe,\n paperTones,\n paperVariants,\n}\n"],"mappings":";;;;;;AAYA,MAAM,sBAAsB;AAE5B,MAAM,oBAAoB;AAE1B,MAAM,mBAAmB;AAEzB,MAAM,YAAY;CAChB;CACA,GAAG;CACH;AACF;AAEA,MAAM,cAAc,IAAI,WAAW;CACjC,iBAAiB;EAAE,MAAM;EAAkB,SAAS;CAAoB;CACxE,UAAU;EACR,MAAM;EACN,SAAS;GACP,UAAU,cAAc,KAAK,GAAG;GAChC,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAM,SAAS;AAEf,MAAM,eAAe;AAErB,MAAM,OAAO;AAIb,MAAM,kBAAkB,IAAI,IAAI;CAC9B,iBAAiB,EAAE,OAAO,kBAAkB;CAC5C,UAAU,EACR,OAAO;EACL,OAAO;EACP,QAAQ,GAAG,KAAK,GAAG;EACnB,OAAO,wBAAiB;CAC1B,EACF;AACF,CAAC;AAID,MAAM,oBAAoB,IACxB,CAAC,mEAAmE,8DAAQ,GAC5E;CACE,iBAAiB,EAAE,OAAO,kBAAkB;CAC5C,UAAU,EACR,OAAO;EACL,OAAO;EACP,QAAQ;EACR,OAAO;CACT,EACF;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,qBAAqB,cAAc;CAC7D,iBAAiB,EAAE,OAAO,kBAAkB;CAC5C,UAAU,EACR,OAAO;EACL,OAAO;EACP,QAAQ;EACR,OAAO;CACT,EACF;AACF,CAAC;AAED,MAAM,mBAAmB,IAAI,YAAY;CACvC,iBAAiB;EAAE,QAAQ;EAAO,OAAO;CAAkB;CAC3D,UAAU;EACR,QAAQ;GAAE,OAAO;GAAS,MAAM;EAA0B;EAC1D,OAAO;GACL,OAAO;GACP,QAAQ;GACR,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAM,oBAAoB,IACxB,0EACF;AAEA,MAAM,gBAAgB,CAAC,SAAS,UAAU;AAE1C,MAAM,aAAa;AAEnB,MAAM,cAAc;CAAC;CAAU;CAAS;AAAO"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
//#region src/recipes/sectionHeader.d.ts
|
|
2
|
-
type SectionHeaderSize = 'section' | 'hero';
|
|
2
|
+
type SectionHeaderSize = 'section' | 'hero' | 'panel';
|
|
3
|
+
type SectionHeaderEyebrow = 'lead' | 'quiet';
|
|
3
4
|
declare const defaultSectionHeaderSize = "section";
|
|
4
|
-
declare const sectionHeaderSizes: readonly ["section", "hero"];
|
|
5
|
+
declare const sectionHeaderSizes: readonly ["section", "hero", "panel"];
|
|
6
|
+
declare const sectionHeaderEyebrows: readonly ["lead", "quiet"];
|
|
7
|
+
declare const sectionHeaderTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
8
|
+
declare const restingEyebrow: (size: SectionHeaderSize) => SectionHeaderEyebrow;
|
|
5
9
|
declare const sectionHeaderRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
|
-
declare const sectionHeaderLabelStackRecipe: (props?:
|
|
10
|
+
declare const sectionHeaderLabelStackRecipe: (props?: ({
|
|
11
|
+
size?: "panel" | "section" | "hero" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
13
|
//#endregion
|
|
8
|
-
export { type SectionHeaderSize, defaultSectionHeaderSize, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes };
|
|
14
|
+
export { type SectionHeaderEyebrow, type SectionHeaderSize, defaultSectionHeaderSize, restingEyebrow, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes, sectionHeaderTones };
|
|
9
15
|
//# sourceMappingURL=sectionHeader.d.ts.map
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
+
import { tones } from "../parts/tone.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/recipes/sectionHeader.ts
|
|
3
4
|
const defaultSectionHeaderSize = "section";
|
|
4
|
-
const sectionHeaderSizes = [
|
|
5
|
+
const sectionHeaderSizes = [
|
|
6
|
+
"section",
|
|
7
|
+
"hero",
|
|
8
|
+
"panel"
|
|
9
|
+
];
|
|
10
|
+
const sectionHeaderEyebrows = ["lead", "quiet"];
|
|
11
|
+
const sectionHeaderTones = tones;
|
|
12
|
+
const RESTING_EYEBROW = {
|
|
13
|
+
hero: "lead",
|
|
14
|
+
panel: "quiet",
|
|
15
|
+
section: "quiet"
|
|
16
|
+
};
|
|
17
|
+
const restingEyebrow = (size) => RESTING_EYEBROW[size];
|
|
5
18
|
const sectionHeaderRecipe = cva("flex flex-col gap-6");
|
|
6
|
-
const sectionHeaderLabelStackRecipe = cva("flex flex-col
|
|
19
|
+
const sectionHeaderLabelStackRecipe = cva("flex flex-col", {
|
|
20
|
+
defaultVariants: { size: defaultSectionHeaderSize },
|
|
21
|
+
variants: { size: {
|
|
22
|
+
hero: "gap-4",
|
|
23
|
+
panel: "gap-2",
|
|
24
|
+
section: "gap-4"
|
|
25
|
+
} }
|
|
26
|
+
});
|
|
7
27
|
//#endregion
|
|
8
|
-
export { defaultSectionHeaderSize, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes };
|
|
28
|
+
export { defaultSectionHeaderSize, restingEyebrow, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes, sectionHeaderTones };
|
|
9
29
|
|
|
10
30
|
//# sourceMappingURL=sectionHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sectionHeader.js","names":[],"sources":["../../src/recipes/sectionHeader.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\ntype SectionHeaderSize = 'section' | 'hero'\n\nconst defaultSectionHeaderSize = 'section' satisfies SectionHeaderSize\n\nconst sectionHeaderSizes = ['section', '
|
|
1
|
+
{"version":3,"file":"sectionHeader.js","names":[],"sources":["../../src/recipes/sectionHeader.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { tones } from '#parts/tone'\n\ntype SectionHeaderSize = 'section' | 'hero' | 'panel'\n\ntype SectionHeaderEyebrow = 'lead' | 'quiet'\n\nconst defaultSectionHeaderSize = 'section' satisfies SectionHeaderSize\n\nconst sectionHeaderSizes = [\n 'section',\n 'hero',\n 'panel',\n] as const satisfies readonly SectionHeaderSize[]\n\nconst sectionHeaderEyebrows = ['lead', 'quiet'] as const satisfies readonly SectionHeaderEyebrow[]\n\nconst sectionHeaderTones = tones\n\nconst RESTING_EYEBROW = {\n hero: 'lead',\n panel: 'quiet',\n section: 'quiet',\n} satisfies Record<SectionHeaderSize, SectionHeaderEyebrow>\n\nconst restingEyebrow = (size: SectionHeaderSize): SectionHeaderEyebrow => RESTING_EYEBROW[size]\n\nconst sectionHeaderRecipe = cva('flex flex-col gap-6')\n\nconst sectionHeaderLabelStackRecipe = cva('flex flex-col', {\n defaultVariants: { size: defaultSectionHeaderSize },\n variants: {\n size: {\n hero: 'gap-4',\n panel: 'gap-2',\n section: 'gap-4',\n } satisfies Record<SectionHeaderSize, string>,\n },\n})\n\nexport {\n type SectionHeaderEyebrow,\n type SectionHeaderSize,\n defaultSectionHeaderSize,\n restingEyebrow,\n sectionHeaderEyebrows,\n sectionHeaderLabelStackRecipe,\n sectionHeaderRecipe,\n sectionHeaderSizes,\n sectionHeaderTones,\n}\n"],"mappings":";;;AAQA,MAAM,2BAA2B;AAEjC,MAAM,qBAAqB;CACzB;CACA;CACA;AACF;AAEA,MAAM,wBAAwB,CAAC,QAAQ,OAAO;AAE9C,MAAM,qBAAqB;AAE3B,MAAM,kBAAkB;CACtB,MAAM;CACN,OAAO;CACP,SAAS;AACX;AAEA,MAAM,kBAAkB,SAAkD,gBAAgB;AAE1F,MAAM,sBAAsB,IAAI,qBAAqB;AAErD,MAAM,gCAAgC,IAAI,iBAAiB;CACzD,iBAAiB,EAAE,MAAM,yBAAyB;CAClD,UAAU,EACR,MAAM;EACJ,MAAM;EACN,OAAO;EACP,SAAS;CACX,EACF;AACF,CAAC"}
|
|
@@ -3,12 +3,15 @@ type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
|
3
3
|
type SeparatorVariant = 'fade' | 'filled' | 'quiet';
|
|
4
4
|
declare const defaultSeparatorOrientation = "horizontal";
|
|
5
5
|
declare const defaultSeparatorVariant = "filled";
|
|
6
|
+
declare const defaultSeparatorTone = "accent";
|
|
6
7
|
declare const separatorRecipe: (props?: ({
|
|
7
8
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
9
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
8
10
|
variant?: "quiet" | "filled" | "fade" | null | undefined;
|
|
9
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
12
|
declare const separatorOrientations: readonly ["horizontal", "vertical"];
|
|
11
13
|
declare const separatorVariants: readonly ["fade", "filled", "quiet"];
|
|
14
|
+
declare const separatorTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
12
15
|
//#endregion
|
|
13
|
-
export { type SeparatorOrientation, type SeparatorVariant, defaultSeparatorOrientation, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorVariants };
|
|
16
|
+
export { type SeparatorOrientation, type SeparatorVariant, defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
14
17
|
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -1,38 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { toneBlend } from "../tone.js";
|
|
2
|
+
import { fadingDownOf, fadingOf, filledDownOf, filledOf, ruleQuiet, ruleQuietDown } from "../parts/rule.js";
|
|
3
|
+
import { defaultTone, tones } from "../parts/tone.js";
|
|
2
4
|
import { cva } from "class-variance-authority";
|
|
3
5
|
//#region src/recipes/separator.ts
|
|
4
6
|
const defaultSeparatorOrientation = "horizontal";
|
|
5
7
|
const defaultSeparatorVariant = "filled";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
+
const defaultSeparatorTone = defaultTone;
|
|
9
|
+
const tonedRules = tones.flatMap((tone) => {
|
|
10
|
+
const blend = toneBlend[tone];
|
|
11
|
+
return [
|
|
8
12
|
{
|
|
9
|
-
class:
|
|
13
|
+
class: fadingOf(blend),
|
|
10
14
|
orientation: "horizontal",
|
|
15
|
+
tone,
|
|
11
16
|
variant: "fade"
|
|
12
17
|
},
|
|
13
18
|
{
|
|
14
|
-
class:
|
|
15
|
-
orientation: "horizontal",
|
|
16
|
-
variant: "quiet"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
class: ruleFilled,
|
|
19
|
+
class: filledOf(blend),
|
|
20
20
|
orientation: "horizontal",
|
|
21
|
+
tone,
|
|
21
22
|
variant: "filled"
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
class:
|
|
25
|
+
class: fadingDownOf(blend),
|
|
25
26
|
orientation: "vertical",
|
|
27
|
+
tone,
|
|
26
28
|
variant: "fade"
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
|
-
class:
|
|
31
|
+
class: filledDownOf(blend),
|
|
30
32
|
orientation: "vertical",
|
|
33
|
+
tone,
|
|
31
34
|
variant: "filled"
|
|
32
35
|
}
|
|
36
|
+
];
|
|
37
|
+
});
|
|
38
|
+
const separatorRecipe = cva("shrink-0", {
|
|
39
|
+
compoundVariants: [
|
|
40
|
+
{
|
|
41
|
+
class: ruleQuiet,
|
|
42
|
+
orientation: "horizontal",
|
|
43
|
+
variant: "quiet"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
class: ruleQuietDown,
|
|
47
|
+
orientation: "vertical",
|
|
48
|
+
variant: "quiet"
|
|
49
|
+
},
|
|
50
|
+
...tonedRules
|
|
33
51
|
],
|
|
34
52
|
defaultVariants: {
|
|
35
53
|
orientation: defaultSeparatorOrientation,
|
|
54
|
+
tone: defaultSeparatorTone,
|
|
36
55
|
variant: defaultSeparatorVariant
|
|
37
56
|
},
|
|
38
57
|
variants: {
|
|
@@ -40,6 +59,13 @@ const separatorRecipe = cva("shrink-0", {
|
|
|
40
59
|
horizontal: "w-full",
|
|
41
60
|
vertical: "self-stretch"
|
|
42
61
|
},
|
|
62
|
+
tone: {
|
|
63
|
+
accent: "",
|
|
64
|
+
danger: "",
|
|
65
|
+
info: "",
|
|
66
|
+
success: "",
|
|
67
|
+
warning: ""
|
|
68
|
+
},
|
|
43
69
|
variant: {
|
|
44
70
|
fade: "",
|
|
45
71
|
filled: "",
|
|
@@ -53,7 +79,8 @@ const separatorVariants = [
|
|
|
53
79
|
"filled",
|
|
54
80
|
"quiet"
|
|
55
81
|
];
|
|
82
|
+
const separatorTones = tones;
|
|
56
83
|
//#endregion
|
|
57
|
-
export { defaultSeparatorOrientation, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorVariants };
|
|
84
|
+
export { defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
58
85
|
|
|
59
86
|
//# sourceMappingURL=separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","names":[],"sources":["../../src/recipes/separator.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport {
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../src/recipes/separator.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport {\n fadingDownOf,\n fadingOf,\n filledDownOf,\n filledOf,\n ruleQuiet,\n ruleQuietDown,\n} from '#parts/rule'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\ntype SeparatorOrientation = 'horizontal' | 'vertical'\n\ntype SeparatorVariant = 'fade' | 'filled' | 'quiet'\n\nconst defaultSeparatorOrientation = 'horizontal' satisfies SeparatorOrientation\n\nconst defaultSeparatorVariant = 'filled' satisfies SeparatorVariant\n\nconst defaultSeparatorTone = defaultTone\n\ninterface TonedRule {\n class: string\n orientation: SeparatorOrientation\n tone: Tone\n variant: SeparatorVariant\n}\n\nconst tonedRules: TonedRule[] = tones.flatMap((tone) => {\n const blend = toneBlend[tone]\n\n return [\n { class: fadingOf(blend), orientation: 'horizontal', tone, variant: 'fade' },\n { class: filledOf(blend), orientation: 'horizontal', tone, variant: 'filled' },\n { class: fadingDownOf(blend), orientation: 'vertical', tone, variant: 'fade' },\n { class: filledDownOf(blend), orientation: 'vertical', tone, variant: 'filled' },\n ]\n})\n\nconst separatorRecipe = cva('shrink-0', {\n compoundVariants: [\n { class: ruleQuiet, orientation: 'horizontal', variant: 'quiet' },\n { class: ruleQuietDown, orientation: 'vertical', variant: 'quiet' },\n ...tonedRules,\n ],\n defaultVariants: {\n orientation: defaultSeparatorOrientation,\n tone: defaultSeparatorTone,\n variant: defaultSeparatorVariant,\n },\n variants: {\n orientation: {\n horizontal: 'w-full',\n vertical: 'self-stretch',\n } satisfies Record<SeparatorOrientation, string>,\n tone: {\n accent: '',\n danger: '',\n info: '',\n success: '',\n warning: '',\n } satisfies Record<Tone, string>,\n variant: {\n fade: '',\n filled: '',\n quiet: '',\n } satisfies Record<SeparatorVariant, string>,\n },\n})\n\nconst separatorOrientations = [\n 'horizontal',\n 'vertical',\n] as const satisfies readonly SeparatorOrientation[]\n\nconst separatorVariants = ['fade', 'filled', 'quiet'] as const satisfies readonly SeparatorVariant[]\n\nconst separatorTones = tones\n\nexport {\n type SeparatorOrientation,\n type SeparatorVariant,\n defaultSeparatorOrientation,\n defaultSeparatorTone,\n defaultSeparatorVariant,\n separatorOrientations,\n separatorRecipe,\n separatorTones,\n separatorVariants,\n}\n"],"mappings":";;;;;AAkBA,MAAM,8BAA8B;AAEpC,MAAM,0BAA0B;AAEhC,MAAM,uBAAuB;AAS7B,MAAM,aAA0B,MAAM,SAAS,SAAS;CACtD,MAAM,QAAQ,UAAU;CAExB,OAAO;EACL;GAAE,OAAO,SAAS,KAAK;GAAG,aAAa;GAAc;GAAM,SAAS;EAAO;EAC3E;GAAE,OAAO,SAAS,KAAK;GAAG,aAAa;GAAc;GAAM,SAAS;EAAS;EAC7E;GAAE,OAAO,aAAa,KAAK;GAAG,aAAa;GAAY;GAAM,SAAS;EAAO;EAC7E;GAAE,OAAO,aAAa,KAAK;GAAG,aAAa;GAAY;GAAM,SAAS;EAAS;CACjF;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,YAAY;CACtC,kBAAkB;EAChB;GAAE,OAAO;GAAW,aAAa;GAAc,SAAS;EAAQ;EAChE;GAAE,OAAO;GAAe,aAAa;GAAY,SAAS;EAAQ;EAClE,GAAG;CACL;CACA,iBAAiB;EACf,aAAa;EACb,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,aAAa;GACX,YAAY;GACZ,UAAU;EACZ;EACA,MAAM;GACJ,QAAQ;GACR,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,QAAQ;GACR,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAM,wBAAwB,CAC5B,cACA,UACF;AAEA,MAAM,oBAAoB;CAAC;CAAQ;CAAU;AAAO;AAEpD,MAAM,iBAAiB"}
|
package/dist/recipes/slider.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
//#region src/recipes/slider.d.ts
|
|
2
2
|
declare const sliderKnobSize = 20;
|
|
3
|
-
declare const sliderRecipe: (props?:
|
|
3
|
+
declare const sliderRecipe: (props?: ({
|
|
4
|
+
fullWidth?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
4
6
|
declare const sliderHeadRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
5
7
|
declare const sliderLabelRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
6
8
|
declare const sliderValueRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
package/dist/recipes/slider.js
CHANGED
|
@@ -4,11 +4,17 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
//#region src/recipes/slider.ts
|
|
5
5
|
const sliderKnobSize = 20;
|
|
6
6
|
const sliderRecipe = cva([
|
|
7
|
-
"flex w-full
|
|
7
|
+
"flex w-full flex-col gap-2",
|
|
8
8
|
"font-tf-body",
|
|
9
9
|
"data-disabled:cursor-not-allowed",
|
|
10
10
|
"data-disabled:**:data-[part=value-text]:text-tf-muted"
|
|
11
|
-
]
|
|
11
|
+
], {
|
|
12
|
+
defaultVariants: { fullWidth: false },
|
|
13
|
+
variants: { fullWidth: {
|
|
14
|
+
false: "max-w-tf-panel",
|
|
15
|
+
true: ""
|
|
16
|
+
} }
|
|
17
|
+
});
|
|
12
18
|
const sliderHeadRecipe = cva("flex items-baseline justify-between gap-4");
|
|
13
19
|
const sliderLabelRecipe = cva("text-tf-body text-tf-fg data-disabled:text-tf-muted");
|
|
14
20
|
const sliderValueRecipe = cva([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","names":[],"sources":["../../src/recipes/slider.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlReach } from '#parts/control'\nimport { markKnob } from '#parts/mark'\n\nconst sliderKnobSize = 20\n\nconst sliderRecipe = cva([\n
|
|
1
|
+
{"version":3,"file":"slider.js","names":[],"sources":["../../src/recipes/slider.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlReach } from '#parts/control'\nimport { markKnob } from '#parts/mark'\n\nconst sliderKnobSize = 20\n\nconst sliderRecipe = cva(\n [\n 'flex w-full flex-col gap-2',\n 'font-tf-body',\n 'data-disabled:cursor-not-allowed',\n 'data-disabled:**:data-[part=value-text]:text-tf-muted',\n ],\n {\n defaultVariants: { fullWidth: false },\n variants: {\n fullWidth: { false: 'max-w-tf-panel', true: '' },\n },\n },\n)\n\nconst sliderHeadRecipe = cva('flex items-baseline justify-between gap-4')\n\nconst sliderLabelRecipe = cva('text-tf-body text-tf-fg data-disabled:text-tf-muted')\n\nconst sliderValueRecipe = cva([\n 'font-tf-display text-tf-h4 font-bold tracking-tf-tight tabular-nums',\n 'text-tf-fg in-data-dragging:text-tf-accent-hi in-data-focus:text-tf-accent-hi',\n 'tf-transition motion-reduce:transition-none',\n])\n\nconst sliderControlRecipe = cva([\n 'relative flex min-h-tf-target w-full items-center',\n 'not-data-readonly:interactive:cursor-pointer',\n 'data-readonly:cursor-default',\n])\n\nconst sliderTrackRecipe = cva([\n 'h-tf-mark-track w-full overflow-hidden rounded-tf-inline bg-tf-line',\n 'data-disabled:opacity-50',\n])\n\nconst sliderRangeRecipe = cva([\n 'h-tf-mark-track',\n 'bg-tf-blend-rise blend-tf-accent',\n 'data-invalid:blend-tf-danger',\n 'tf-transition not-data-dragging:tf-travels motion-reduce:transition-none',\n])\n\nconst sliderNotchesRecipe = cva('pointer-events-none absolute inset-0')\n\nconst sliderNotchRecipe = cva([\n 'h-full w-tf-hairline',\n 'data-[state=over-value]:bg-tf-line-hi data-[state=under-value]:bg-tf-shade-under',\n 'tf-transition motion-reduce:transition-none',\n])\n\nconst sliderThumbRecipe = cva([\n ...markKnob,\n 'size-tf-icon-solo-sm blend-tf-accent',\n 'inset-ring inset-ring-tf-line-hi',\n 'in-data-invalid:inset-ring-tf-danger-hi',\n 'tf-glow tf-fill-scale tf-settled-quiet',\n 'interactive:hovered:tf-raised',\n 'not-data-dragging:tf-travels',\n 'data-dragging:bg-tf-fg-held data-dragging:tf-raised',\n 'motion-safe:data-dragging:scale-112',\n 'data-disabled:opacity-50',\n ...controlReach,\n])\n\nconst sliderFootRecipe = cva('flex items-baseline justify-between gap-4')\n\nconst sliderHintRecipe = cva('text-tf-caption font-medium', {\n defaultVariants: { invalid: false },\n variants: {\n invalid: { false: 'text-tf-muted', true: 'text-tf-danger-hi tf-arrives' },\n },\n})\n\nconst sliderBoundsRecipe = cva(\n 'ms-auto shrink-0 text-tf-caption font-medium text-tf-muted tabular-nums',\n)\n\nexport {\n sliderBoundsRecipe,\n sliderControlRecipe,\n sliderFootRecipe,\n sliderHeadRecipe,\n sliderHintRecipe,\n sliderKnobSize,\n sliderLabelRecipe,\n sliderNotchRecipe,\n sliderNotchesRecipe,\n sliderRangeRecipe,\n sliderRecipe,\n sliderThumbRecipe,\n sliderTrackRecipe,\n sliderValueRecipe,\n}\n"],"mappings":";;;;AAKA,MAAM,iBAAiB;AAEvB,MAAM,eAAe,IACnB;CACE;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,WAAW,MAAM;CACpC,UAAU,EACR,WAAW;EAAE,OAAO;EAAkB,MAAM;CAAG,EACjD;AACF,CACF;AAEA,MAAM,mBAAmB,IAAI,2CAA2C;AAExE,MAAM,oBAAoB,IAAI,qDAAqD;AAEnF,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI;CAC9B;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,CAC5B,uEACA,0BACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI,sCAAsC;AAEtE,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,mBAAmB,IAAI,2CAA2C;AAExE,MAAM,mBAAmB,IAAI,+BAA+B;CAC1D,iBAAiB,EAAE,SAAS,MAAM;CAClC,UAAU,EACR,SAAS;EAAE,OAAO;EAAiB,MAAM;CAA+B,EAC1E;AACF,CAAC;AAED,MAAM,qBAAqB,IACzB,yEACF"}
|
package/dist/recipes/text.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const textFamilies: readonly ["sans", "mono", "display"];
|
|
|
14
14
|
declare const restingWeight: (size: TextSize, uppercase?: boolean) => TextWeight;
|
|
15
15
|
declare const textRecipe: (props?: ({
|
|
16
16
|
family?: "display" | "sans" | "mono" | null | undefined;
|
|
17
|
-
size?: "caption-sm" | "caption" | "body-sm" | "body" |
|
|
17
|
+
size?: "lead" | "caption-sm" | "caption" | "body-sm" | "body" | null | undefined;
|
|
18
18
|
tabular?: boolean | null | undefined;
|
|
19
19
|
tone?: "accent" | "success" | "warning" | "info" | "danger" | "fg" | "muted" | null | undefined;
|
|
20
20
|
uppercase?: boolean | null | undefined;
|