@techfides/ui-library-design 0.5.0 → 0.8.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/cn.generated.js +217 -0
- package/dist/cn.generated.js.map +1 -0
- package/dist/cn.js +10 -166
- package/dist/cn.js.map +1 -1
- 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 +3 -2
package/dist/recipes/listbox.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert } from "../parts/control.js";
|
|
2
3
|
import { travelMarkBase } from "../parts/travel.js";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
@@ -23,7 +24,24 @@ const listboxMarkRecipe = cva([...travelMarkBase, "inset-x-0 h-(--tf-travel-heig
|
|
|
23
24
|
} }
|
|
24
25
|
});
|
|
25
26
|
const listboxEmptyRecipe = cva(["flex h-tf-control-lg flex-none items-center justify-center px-4", "text-tf-caption font-medium text-tf-muted"]);
|
|
27
|
+
const listboxAnatomy = anatomy({
|
|
28
|
+
held: {
|
|
29
|
+
part: "held",
|
|
30
|
+
recipe: listboxMarkRecipe,
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
mark: {
|
|
34
|
+
part: "mark",
|
|
35
|
+
recipe: listboxMarkRecipe,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
root: {
|
|
39
|
+
part: "listbox",
|
|
40
|
+
recipe: listboxRecipe,
|
|
41
|
+
required: true
|
|
42
|
+
}
|
|
43
|
+
});
|
|
26
44
|
//#endregion
|
|
27
|
-
export { listboxEmptyRecipe, listboxItemRecipe, listboxLabelRecipe, listboxMarkRecipe, listboxRecipe };
|
|
45
|
+
export { listboxAnatomy, listboxEmptyRecipe, listboxItemRecipe, listboxLabelRecipe, listboxMarkRecipe, listboxRecipe };
|
|
28
46
|
|
|
29
47
|
//# sourceMappingURL=listbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.js","names":[],"sources":["../../src/recipes/listbox.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert } from '#parts/control'\nimport { travelMarkBase } from '#parts/travel'\n\ntype ListboxMark = 'lit' | 'chosen'\n\nconst RAIL = [\n 'before:absolute before:inset-y-3 before:left-0 before:w-0.5',\n 'before:rounded-tf-pill before:bg-tf-accent-hi',\n \"before:content-['']\",\n].join(' ')\n\nconst listboxRecipe = cva([\n 'relative isolate flex min-w-0 flex-col gap-1',\n 'font-tf-body outline-hidden',\n])\n\nconst listboxLabelRecipe = cva('sr-only')\n\nconst listboxItemRecipe = cva([\n 'relative rounded-tf-control px-4 py-3',\n 'cursor-pointer select-none tf-transition motion-reduce:transition-none',\n 'data-selected:text-tf-fg',\n ...controlInert,\n])\n\nconst listboxMarkRecipe = cva([...travelMarkBase, 'inset-x-0 h-(--tf-travel-height) tf-rails'], {\n defaultVariants: { mark: 'lit' },\n variants: {\n mark: {\n chosen: `rounded-tf-control bg-tf-accent-tint ${RAIL}`,\n lit: 'rounded-tf-control bg-tf-panel-hi',\n } satisfies Record<ListboxMark, string>,\n },\n})\n\nconst listboxEmptyRecipe = cva([\n 'flex h-tf-control-lg flex-none items-center justify-center px-4',\n 'text-tf-caption font-medium text-tf-muted',\n])\n\
|
|
1
|
+
{"version":3,"file":"listbox.js","names":[],"sources":["../../src/recipes/listbox.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert } from '#parts/control'\nimport { travelMarkBase } from '#parts/travel'\n\ntype ListboxMark = 'lit' | 'chosen'\n\nconst RAIL = [\n 'before:absolute before:inset-y-3 before:left-0 before:w-0.5',\n 'before:rounded-tf-pill before:bg-tf-accent-hi',\n \"before:content-['']\",\n].join(' ')\n\nconst listboxRecipe = cva([\n 'relative isolate flex min-w-0 flex-col gap-1',\n 'font-tf-body outline-hidden',\n])\n\nconst listboxLabelRecipe = cva('sr-only')\n\nconst listboxItemRecipe = cva([\n 'relative rounded-tf-control px-4 py-3',\n 'cursor-pointer select-none tf-transition motion-reduce:transition-none',\n 'data-selected:text-tf-fg',\n ...controlInert,\n])\n\nconst listboxMarkRecipe = cva([...travelMarkBase, 'inset-x-0 h-(--tf-travel-height) tf-rails'], {\n defaultVariants: { mark: 'lit' },\n variants: {\n mark: {\n chosen: `rounded-tf-control bg-tf-accent-tint ${RAIL}`,\n lit: 'rounded-tf-control bg-tf-panel-hi',\n } satisfies Record<ListboxMark, string>,\n },\n})\n\nconst listboxEmptyRecipe = cva([\n 'flex h-tf-control-lg flex-none items-center justify-center px-4',\n 'text-tf-caption font-medium text-tf-muted',\n])\n\nconst listboxAnatomy = anatomy({\n held: { part: 'held', recipe: listboxMarkRecipe, required: true },\n mark: { part: 'mark', recipe: listboxMarkRecipe, required: true },\n root: { part: 'listbox', recipe: listboxRecipe, required: true },\n})\n\nexport {\n listboxAnatomy,\n listboxEmptyRecipe,\n listboxItemRecipe,\n listboxLabelRecipe,\n listboxMarkRecipe,\n listboxRecipe,\n}\n"],"mappings":";;;;;AAQA,MAAM,OAAO;CACX;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,gBAAgB,IAAI,CACxB,gDACA,6BACF,CAAC;AAED,MAAM,qBAAqB,IAAI,SAAS;AAExC,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,oBAAoB,IAAI,CAAC,GAAG,gBAAgB,2CAA2C,GAAG;CAC9F,iBAAiB,EAAE,MAAM,MAAM;CAC/B,UAAU,EACR,MAAM;EACJ,QAAQ,wCAAwC;EAChD,KAAK;CACP,EACF;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAC7B,mEACA,2CACF,CAAC;AAED,MAAM,iBAAiB,QAAQ;CAC7B,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAW,QAAQ;EAAe,UAAU;CAAK;AACjE,CAAC"}
|
|
@@ -5,7 +5,7 @@ interface MarqueeItem {
|
|
|
5
5
|
}
|
|
6
6
|
declare const marqueeRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
7
|
declare const marqueeRuleRecipe: (props?: ({
|
|
8
|
-
edge?: "
|
|
8
|
+
edge?: "foot" | "head" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare const marqueeStageRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
11
|
declare const marqueeViewportRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -14,6 +14,30 @@ declare const marqueeItemRecipe: (props?: import("class-variance-authority/types
|
|
|
14
14
|
declare const marqueeMarkRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
15
|
declare const marqueeNameRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
16
|
declare const marqueeSpacing = "3rem";
|
|
17
|
+
declare const marqueeAnatomy: {
|
|
18
|
+
readonly mark: {
|
|
19
|
+
readonly part: "mark";
|
|
20
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
21
|
+
readonly required: true;
|
|
22
|
+
};
|
|
23
|
+
readonly name: {
|
|
24
|
+
readonly part: "name";
|
|
25
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
26
|
+
readonly required: true;
|
|
27
|
+
};
|
|
28
|
+
readonly root: {
|
|
29
|
+
readonly part: "marquee";
|
|
30
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
33
|
+
readonly rule: {
|
|
34
|
+
readonly part: "rule";
|
|
35
|
+
readonly recipe: (props?: ({
|
|
36
|
+
edge?: "foot" | "head" | null | undefined;
|
|
37
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
|
+
readonly required: true;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
17
41
|
//#endregion
|
|
18
|
-
export { type MarqueeItem, marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
|
|
42
|
+
export { type MarqueeItem, marqueeAnatomy, marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
|
|
19
43
|
//# sourceMappingURL=marquee.d.ts.map
|
package/dist/recipes/marquee.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { ruleFading } from "../parts/rule.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/marquee.ts
|
|
@@ -30,7 +31,29 @@ const marqueeItemRecipe = cva([
|
|
|
30
31
|
const marqueeMarkRecipe = cva("block size-tf-icon-solo-lg bg-contain bg-center bg-no-repeat");
|
|
31
32
|
const marqueeNameRecipe = cva("font-tf-display text-tf-h4 font-bold whitespace-nowrap");
|
|
32
33
|
const marqueeSpacing = "3rem";
|
|
34
|
+
const marqueeAnatomy = anatomy({
|
|
35
|
+
mark: {
|
|
36
|
+
part: "mark",
|
|
37
|
+
recipe: marqueeMarkRecipe,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
name: {
|
|
41
|
+
part: "name",
|
|
42
|
+
recipe: marqueeNameRecipe,
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
root: {
|
|
46
|
+
part: "marquee",
|
|
47
|
+
recipe: marqueeRecipe,
|
|
48
|
+
required: true
|
|
49
|
+
},
|
|
50
|
+
rule: {
|
|
51
|
+
part: "rule",
|
|
52
|
+
recipe: marqueeRuleRecipe,
|
|
53
|
+
required: true
|
|
54
|
+
}
|
|
55
|
+
});
|
|
33
56
|
//#endregion
|
|
34
|
-
export { marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
|
|
57
|
+
export { marqueeAnatomy, marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
|
|
35
58
|
|
|
36
59
|
//# sourceMappingURL=marquee.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marquee.js","names":[],"sources":["../../src/recipes/marquee.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { ruleFading } from '#parts/rule'\n\ninterface MarqueeItem {\n name: string\n src: string\n}\n\nconst WRAPS = 'motion-reduce:w-full motion-reduce:flex-wrap motion-reduce:justify-center'\n\nconst marqueeRecipe = cva([\n 'relative isolate py-8',\n 'font-tf-body',\n 'tf-slows hovered:[--tf-marquee-rate:0]',\n])\n\nconst marqueeRuleRecipe = cva(`absolute inset-x-0 ${ruleFading}`, {\n defaultVariants: { edge: 'head' },\n variants: { edge: { foot: 'bottom-0', head: 'top-0' } },\n})\n\nconst marqueeStageRecipe = cva('w-full')\n\nconst marqueeViewportRecipe = cva([\n 'relative overflow-hidden',\n 'tf-faded-x motion-reduce:mask-none',\n])\n\nconst marqueeCopyRecipe = cva([\n 'tf-looping items-center',\n 'motion-reduce:gap-y-4 motion-reduce:data-clone:hidden',\n WRAPS,\n])\n\nconst marqueeItemRecipe = cva([\n 'flex flex-none items-center gap-3',\n 'cursor-default select-none',\n 'text-tf-muted hovered:text-tf-fg',\n 'tf-ink-glide tf-transition',\n])\n\nconst marqueeMarkRecipe = cva('block size-tf-icon-solo-lg bg-contain bg-center bg-no-repeat')\n\nconst marqueeNameRecipe = cva('font-tf-display text-tf-h4 font-bold whitespace-nowrap')\n\nconst marqueeSpacing = '3rem'\n\nexport {\n type MarqueeItem,\n marqueeCopyRecipe,\n marqueeItemRecipe,\n marqueeMarkRecipe,\n marqueeNameRecipe,\n marqueeRecipe,\n marqueeRuleRecipe,\n marqueeSpacing,\n marqueeStageRecipe,\n marqueeViewportRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"marquee.js","names":[],"sources":["../../src/recipes/marquee.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { ruleFading } from '#parts/rule'\n\ninterface MarqueeItem {\n name: string\n src: string\n}\n\nconst WRAPS = 'motion-reduce:w-full motion-reduce:flex-wrap motion-reduce:justify-center'\n\nconst marqueeRecipe = cva([\n 'relative isolate py-8',\n 'font-tf-body',\n 'tf-slows hovered:[--tf-marquee-rate:0]',\n])\n\nconst marqueeRuleRecipe = cva(`absolute inset-x-0 ${ruleFading}`, {\n defaultVariants: { edge: 'head' },\n variants: { edge: { foot: 'bottom-0', head: 'top-0' } },\n})\n\nconst marqueeStageRecipe = cva('w-full')\n\nconst marqueeViewportRecipe = cva([\n 'relative overflow-hidden',\n 'tf-faded-x motion-reduce:mask-none',\n])\n\nconst marqueeCopyRecipe = cva([\n 'tf-looping items-center',\n 'motion-reduce:gap-y-4 motion-reduce:data-clone:hidden',\n WRAPS,\n])\n\nconst marqueeItemRecipe = cva([\n 'flex flex-none items-center gap-3',\n 'cursor-default select-none',\n 'text-tf-muted hovered:text-tf-fg',\n 'tf-ink-glide tf-transition',\n])\n\nconst marqueeMarkRecipe = cva('block size-tf-icon-solo-lg bg-contain bg-center bg-no-repeat')\n\nconst marqueeNameRecipe = cva('font-tf-display text-tf-h4 font-bold whitespace-nowrap')\n\nconst marqueeSpacing = '3rem'\n\nconst marqueeAnatomy = anatomy({\n mark: { part: 'mark', recipe: marqueeMarkRecipe, required: true },\n name: { part: 'name', recipe: marqueeNameRecipe, required: true },\n root: { part: 'marquee', recipe: marqueeRecipe, required: true },\n rule: { part: 'rule', recipe: marqueeRuleRecipe, required: true },\n})\n\nexport {\n type MarqueeItem,\n marqueeAnatomy,\n marqueeCopyRecipe,\n marqueeItemRecipe,\n marqueeMarkRecipe,\n marqueeNameRecipe,\n marqueeRecipe,\n marqueeRuleRecipe,\n marqueeSpacing,\n marqueeStageRecipe,\n marqueeViewportRecipe,\n}\n"],"mappings":";;;;AAUA,MAAM,QAAQ;AAEd,MAAM,gBAAgB,IAAI;CACxB;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,sBAAsB,cAAc;CAChE,iBAAiB,EAAE,MAAM,OAAO;CAChC,UAAU,EAAE,MAAM;EAAE,MAAM;EAAY,MAAM;CAAQ,EAAE;AACxD,CAAC;AAED,MAAM,qBAAqB,IAAI,QAAQ;AAEvC,MAAM,wBAAwB,IAAI,CAChC,4BACA,oCACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,8DAA8D;AAE5F,MAAM,oBAAoB,IAAI,wDAAwD;AAEtF,MAAM,iBAAiB;AAEvB,MAAM,iBAAiB,QAAQ;CAC7B,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAW,QAAQ;EAAe,UAAU;CAAK;CAC/D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAK;AAClE,CAAC"}
|
package/dist/recipes/menu.d.ts
CHANGED
|
@@ -21,6 +21,38 @@ declare const menuShortcutRecipe: (props?: import("class-variance-authority/type
|
|
|
21
21
|
declare const menuSeparatorRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
22
22
|
declare const menuArrowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
23
23
|
declare const menuArrowTipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
24
|
+
declare const menuAnatomy: {
|
|
25
|
+
readonly item: {
|
|
26
|
+
readonly part: "item";
|
|
27
|
+
readonly recipe: (props?: ({
|
|
28
|
+
tone?: "danger" | "neutral" | null | undefined;
|
|
29
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
30
|
+
readonly required: false;
|
|
31
|
+
};
|
|
32
|
+
readonly list: {
|
|
33
|
+
readonly part: "list";
|
|
34
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
35
|
+
readonly required: true;
|
|
36
|
+
};
|
|
37
|
+
readonly mark: {
|
|
38
|
+
readonly part: "mark";
|
|
39
|
+
readonly recipe: (props?: ({
|
|
40
|
+
tone?: "danger" | "neutral" | "chosen" | null | undefined;
|
|
41
|
+
within?: "surface" | "list" | null | undefined;
|
|
42
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
};
|
|
45
|
+
readonly root: {
|
|
46
|
+
readonly part: "menu";
|
|
47
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
48
|
+
readonly required: false;
|
|
49
|
+
};
|
|
50
|
+
readonly shortcut: {
|
|
51
|
+
readonly part: "shortcut";
|
|
52
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
24
56
|
//#endregion
|
|
25
|
-
export { type MenuPlacement, type MenuTone, defaultMenuPlacement, defaultMenuTone, menuArrowRecipe, menuArrowTipRecipe, menuGroupRecipe, menuItemRecipe, menuLabelRecipe, menuListRecipe, menuMarkRecipe, menuPlacements, menuSeparatorRecipe, menuShortcutRecipe, menuSurfaceRecipe, menuTextRecipe, menuTones };
|
|
57
|
+
export { type MenuPlacement, type MenuTone, defaultMenuPlacement, defaultMenuTone, menuAnatomy, menuArrowRecipe, menuArrowTipRecipe, menuGroupRecipe, menuItemRecipe, menuLabelRecipe, menuListRecipe, menuMarkRecipe, menuPlacements, menuSeparatorRecipe, menuShortcutRecipe, menuSurfaceRecipe, menuTextRecipe, menuTones };
|
|
26
58
|
//# sourceMappingURL=menu.d.ts.map
|
package/dist/recipes/menu.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress, hitArea } from "../parts/control.js";
|
|
2
3
|
import { overlayMotion } from "./motion.js";
|
|
3
4
|
import { eyebrowQuiet } from "../parts/eyebrow.js";
|
|
@@ -80,7 +81,34 @@ const menuShortcutRecipe = cva("flex-none text-tf-caption-sm text-tf-muted tabul
|
|
|
80
81
|
const menuSeparatorRecipe = cva("my-2 flex-none border-0");
|
|
81
82
|
const menuArrowRecipe = cva(["[--arrow-size:0.5rem]", "[--arrow-background:var(--tf-glass-flat)]"]);
|
|
82
83
|
const menuArrowTipRecipe = cva("border-t border-l border-tf-line");
|
|
84
|
+
const menuAnatomy = anatomy({
|
|
85
|
+
item: {
|
|
86
|
+
part: "item",
|
|
87
|
+
recipe: menuItemRecipe,
|
|
88
|
+
required: false
|
|
89
|
+
},
|
|
90
|
+
list: {
|
|
91
|
+
part: "list",
|
|
92
|
+
recipe: menuListRecipe,
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
mark: {
|
|
96
|
+
part: "mark",
|
|
97
|
+
recipe: menuMarkRecipe,
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
root: {
|
|
101
|
+
part: "menu",
|
|
102
|
+
recipe: menuSurfaceRecipe,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
shortcut: {
|
|
106
|
+
part: "shortcut",
|
|
107
|
+
recipe: menuShortcutRecipe,
|
|
108
|
+
required: false
|
|
109
|
+
}
|
|
110
|
+
});
|
|
83
111
|
//#endregion
|
|
84
|
-
export { defaultMenuPlacement, defaultMenuTone, menuArrowRecipe, menuArrowTipRecipe, menuGroupRecipe, menuItemRecipe, menuLabelRecipe, menuListRecipe, menuMarkRecipe, menuPlacements, menuSeparatorRecipe, menuShortcutRecipe, menuSurfaceRecipe, menuTextRecipe, menuTones };
|
|
112
|
+
export { defaultMenuPlacement, defaultMenuTone, menuAnatomy, menuArrowRecipe, menuArrowTipRecipe, menuGroupRecipe, menuItemRecipe, menuLabelRecipe, menuListRecipe, menuMarkRecipe, menuPlacements, menuSeparatorRecipe, menuShortcutRecipe, menuSurfaceRecipe, menuTextRecipe, menuTones };
|
|
85
113
|
|
|
86
114
|
//# sourceMappingURL=menu.js.map
|
package/dist/recipes/menu.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","names":[],"sources":["../../src/recipes/menu.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress, hitArea } from '#parts/control'\nimport { eyebrowQuiet } from '#parts/eyebrow'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { overlayMotion } from './motion'\n\ntype MenuTone = 'neutral' | 'danger'\n\nconst defaultMenuTone = 'neutral' satisfies MenuTone\n\nconst menuTones = ['neutral', 'danger'] as const satisfies readonly MenuTone[]\n\ntype MenuPlacement =\n | 'bottom-start'\n | 'bottom-end'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end'\n\nconst defaultMenuPlacement = 'bottom-start' satisfies MenuPlacement\n\nconst menuPlacements = [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n] as const satisfies readonly MenuPlacement[]\n\nconst ROOM_FOR_A_FINGER = hitArea('after:h-[calc(var(--spacing-tf-row)+var(--spacing))]')\n\nconst GROWS_FROM_ITS_TRIGGER = [\n 'data-[placement^=bottom]:origin-top',\n 'data-[placement^=top]:origin-bottom',\n 'data-[placement^=left]:origin-right',\n 'data-[placement^=right]:origin-left',\n].join(' ')\n\ntype MenuMark = MenuTone | 'chosen'\n\nconst MARK = {\n chosen: 'bg-tf-accent-tint',\n danger: 'bg-tf-danger-wash',\n neutral: 'bg-tf-panel-hi',\n} satisfies Record<MenuMark, string>\n\nconst CHOSEN = 'data-[state=checked]:text-tf-accent-hi'\n\nconst menuSurfaceRecipe = cva([\n 'relative flex flex-col',\n 'tf-menu-width rounded-tf-card bg-tf-glass px-2 backdrop-blur-tf-glass',\n 'tf-edge-sweep font-tf-body text-tf-body-sm font-medium shadow-tf-float tf-edge-plain',\n 'z-tf-dropdown outline-hidden',\n GROWS_FROM_ITS_TRIGGER,\n ...overlayMotion,\n])\n\nconst menuListRecipe = cva([\n 'relative flex tf-scroll-thin min-h-0 flex-col gap-1 py-2 outline-hidden',\n 'max-h-[min(var(--available-height),var(--container-tf-list))] overflow-y-auto',\n 'font-tf-body text-tf-body-sm font-medium',\n])\n\nconst menuMarkRecipe = cva([...travelMarkBase, 'h-tf-row rounded-tf-inline'], {\n defaultVariants: { tone: defaultMenuTone, within: 'list' },\n variants: {\n tone: MARK,\n within: { list: 'inset-x-0', surface: 'inset-x-2' },\n },\n})\n\nconst menuGroupRecipe = cva('flex flex-col gap-1')\n\nconst menuItemRecipe = cva(\n [\n 'flex h-tf-row min-h-tf-row flex-none items-center gap-3',\n 'relative rounded-tf-inline px-3 text-left',\n ROOM_FOR_A_FINGER,\n CHOSEN,\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n 'tf-transition motion-reduce:transition-none',\n 'cursor-pointer select-none',\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { tone: defaultMenuTone },\n variants: {\n tone: { danger: 'text-tf-danger-hi', neutral: 'text-tf-fg' } satisfies Record<\n MenuTone,\n string\n >,\n },\n },\n)\n\nconst menuLabelRecipe = cva(['flex-none px-3 pt-3 pb-0', `text-tf-caption-sm ${eyebrowQuiet}`])\n\nconst menuTextRecipe = cva('min-w-0 flex-1 truncate')\n\nconst menuShortcutRecipe = cva('flex-none text-tf-caption-sm text-tf-muted tabular-nums')\n\nconst menuSeparatorRecipe = cva('my-2 flex-none border-0')\n\nconst menuArrowRecipe = cva(['[--arrow-size:0.5rem]', '[--arrow-background:var(--tf-glass-flat)]'])\n\nconst menuArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nexport {\n type MenuPlacement,\n type MenuTone,\n defaultMenuPlacement,\n defaultMenuTone,\n menuArrowRecipe,\n menuArrowTipRecipe,\n menuItemRecipe,\n menuLabelRecipe,\n menuGroupRecipe,\n menuListRecipe,\n menuMarkRecipe,\n menuPlacements,\n menuSeparatorRecipe,\n menuShortcutRecipe,\n menuSurfaceRecipe,\n menuTextRecipe,\n menuTones,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu.js","names":[],"sources":["../../src/recipes/menu.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress, hitArea } from '#parts/control'\nimport { eyebrowQuiet } from '#parts/eyebrow'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { overlayMotion } from './motion'\n\ntype MenuTone = 'neutral' | 'danger'\n\nconst defaultMenuTone = 'neutral' satisfies MenuTone\n\nconst menuTones = ['neutral', 'danger'] as const satisfies readonly MenuTone[]\n\ntype MenuPlacement =\n | 'bottom-start'\n | 'bottom-end'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end'\n\nconst defaultMenuPlacement = 'bottom-start' satisfies MenuPlacement\n\nconst menuPlacements = [\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n] as const satisfies readonly MenuPlacement[]\n\nconst ROOM_FOR_A_FINGER = hitArea('after:h-[calc(var(--spacing-tf-row)+var(--spacing))]')\n\nconst GROWS_FROM_ITS_TRIGGER = [\n 'data-[placement^=bottom]:origin-top',\n 'data-[placement^=top]:origin-bottom',\n 'data-[placement^=left]:origin-right',\n 'data-[placement^=right]:origin-left',\n].join(' ')\n\ntype MenuMark = MenuTone | 'chosen'\n\nconst MARK = {\n chosen: 'bg-tf-accent-tint',\n danger: 'bg-tf-danger-wash',\n neutral: 'bg-tf-panel-hi',\n} satisfies Record<MenuMark, string>\n\nconst CHOSEN = 'data-[state=checked]:text-tf-accent-hi'\n\nconst menuSurfaceRecipe = cva([\n 'relative flex flex-col',\n 'tf-menu-width rounded-tf-card bg-tf-glass px-2 backdrop-blur-tf-glass',\n 'tf-edge-sweep font-tf-body text-tf-body-sm font-medium shadow-tf-float tf-edge-plain',\n 'z-tf-dropdown outline-hidden',\n GROWS_FROM_ITS_TRIGGER,\n ...overlayMotion,\n])\n\nconst menuListRecipe = cva([\n 'relative flex tf-scroll-thin min-h-0 flex-col gap-1 py-2 outline-hidden',\n 'max-h-[min(var(--available-height),var(--container-tf-list))] overflow-y-auto',\n 'font-tf-body text-tf-body-sm font-medium',\n])\n\nconst menuMarkRecipe = cva([...travelMarkBase, 'h-tf-row rounded-tf-inline'], {\n defaultVariants: { tone: defaultMenuTone, within: 'list' },\n variants: {\n tone: MARK,\n within: { list: 'inset-x-0', surface: 'inset-x-2' },\n },\n})\n\nconst menuGroupRecipe = cva('flex flex-col gap-1')\n\nconst menuItemRecipe = cva(\n [\n 'flex h-tf-row min-h-tf-row flex-none items-center gap-3',\n 'relative rounded-tf-inline px-3 text-left',\n ROOM_FOR_A_FINGER,\n CHOSEN,\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n 'tf-transition motion-reduce:transition-none',\n 'cursor-pointer select-none',\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { tone: defaultMenuTone },\n variants: {\n tone: { danger: 'text-tf-danger-hi', neutral: 'text-tf-fg' } satisfies Record<\n MenuTone,\n string\n >,\n },\n },\n)\n\nconst menuLabelRecipe = cva(['flex-none px-3 pt-3 pb-0', `text-tf-caption-sm ${eyebrowQuiet}`])\n\nconst menuTextRecipe = cva('min-w-0 flex-1 truncate')\n\nconst menuShortcutRecipe = cva('flex-none text-tf-caption-sm text-tf-muted tabular-nums')\n\nconst menuSeparatorRecipe = cva('my-2 flex-none border-0')\n\nconst menuArrowRecipe = cva(['[--arrow-size:0.5rem]', '[--arrow-background:var(--tf-glass-flat)]'])\n\nconst menuArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nconst menuAnatomy = anatomy({\n item: { part: 'item', recipe: menuItemRecipe, required: false },\n list: { part: 'list', recipe: menuListRecipe, required: true },\n mark: { part: 'mark', recipe: menuMarkRecipe, required: false },\n root: { part: 'menu', recipe: menuSurfaceRecipe, required: false },\n shortcut: { part: 'shortcut', recipe: menuShortcutRecipe, required: false },\n})\n\nexport {\n type MenuPlacement,\n type MenuTone,\n defaultMenuPlacement,\n defaultMenuTone,\n menuAnatomy,\n menuArrowRecipe,\n menuArrowTipRecipe,\n menuItemRecipe,\n menuLabelRecipe,\n menuGroupRecipe,\n menuListRecipe,\n menuMarkRecipe,\n menuPlacements,\n menuSeparatorRecipe,\n menuShortcutRecipe,\n menuSurfaceRecipe,\n menuTextRecipe,\n menuTones,\n}\n"],"mappings":";;;;;;;AAWA,MAAM,kBAAkB;AAExB,MAAM,YAAY,CAAC,WAAW,QAAQ;AAYtC,MAAM,uBAAuB;AAE7B,MAAM,iBAAiB;CACrB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,oBAAoB,QAAQ,sDAAsD;AAExF,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAIV,MAAM,OAAO;CACX,QAAQ;CACR,QAAQ;CACR,SAAS;AACX;AAEA,MAAM,SAAS;AAEf,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,iBAAiB,IAAI;CACzB;CACA;CACA;AACF,CAAC;AAED,MAAM,iBAAiB,IAAI,CAAC,GAAG,gBAAgB,4BAA4B,GAAG;CAC5E,iBAAiB;EAAE,MAAM;EAAiB,QAAQ;CAAO;CACzD,UAAU;EACR,MAAM;EACN,QAAQ;GAAE,MAAM;GAAa,SAAS;EAAY;CACpD;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,qBAAqB;AAEjD,MAAM,iBAAiB,IACrB;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL,GACA;CACE,iBAAiB,EAAE,MAAM,gBAAgB;CACzC,UAAU,EACR,MAAM;EAAE,QAAQ;EAAqB,SAAS;CAAa,EAI7D;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,CAAC,4BAA4B,sBAAsB,cAAc,CAAC;AAE9F,MAAM,iBAAiB,IAAI,yBAAyB;AAEpD,MAAM,qBAAqB,IAAI,yDAAyD;AAExF,MAAM,sBAAsB,IAAI,yBAAyB;AAEzD,MAAM,kBAAkB,IAAI,CAAC,yBAAyB,2CAA2C,CAAC;AAElG,MAAM,qBAAqB,IAAI,kCAAkC;AAEjE,MAAM,cAAc,QAAQ;CAC1B,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAM;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAK;CAC7D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAM;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAmB,UAAU;CAAM;CACjE,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAoB,UAAU;CAAM;AAC5E,CAAC"}
|
|
@@ -8,8 +8,17 @@ declare const metaRowLayouts: readonly ["justify", "inline", "note"];
|
|
|
8
8
|
declare const metaRowEmphases: readonly ["normal", "strong"];
|
|
9
9
|
declare const metaRowTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
10
10
|
declare const metaRowRecipe: (props?: ({
|
|
11
|
-
layout?: "
|
|
11
|
+
layout?: "justify" | "inline" | "note" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
declare const metaRowAnatomy: {
|
|
14
|
+
readonly root: {
|
|
15
|
+
readonly part: "meta-row";
|
|
16
|
+
readonly recipe: (props?: ({
|
|
17
|
+
layout?: "justify" | "inline" | "note" | null | undefined;
|
|
18
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
|
+
readonly required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
13
22
|
//#endregion
|
|
14
|
-
export { type MetaRowEmphasis, type MetaRowLayout, type MetaRowPairedLayout, defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
23
|
+
export { type MetaRowEmphasis, type MetaRowLayout, type MetaRowPairedLayout, defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowAnatomy, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
15
24
|
//# sourceMappingURL=metaRow.d.ts.map
|
package/dist/recipes/metaRow.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { tones } from "../parts/tone.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/metaRow.ts
|
|
@@ -19,7 +20,12 @@ const metaRowRecipe = cva("flex items-baseline gap-2 tf-icons", {
|
|
|
19
20
|
note: NOTE
|
|
20
21
|
} }
|
|
21
22
|
});
|
|
23
|
+
const metaRowAnatomy = anatomy({ root: {
|
|
24
|
+
part: "meta-row",
|
|
25
|
+
recipe: metaRowRecipe,
|
|
26
|
+
required: true
|
|
27
|
+
} });
|
|
22
28
|
//#endregion
|
|
23
|
-
export { defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
29
|
+
export { defaultMetaRowEmphasis, defaultMetaRowLayout, metaRowAnatomy, metaRowEmphases, metaRowLayouts, metaRowRecipe, metaRowTones };
|
|
24
30
|
|
|
25
31
|
//# sourceMappingURL=metaRow.js.map
|
|
@@ -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' | '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":"
|
|
1
|
+
{"version":3,"file":"metaRow.js","names":[],"sources":["../../src/recipes/metaRow.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\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\nconst metaRowAnatomy = anatomy({\n root: { part: 'meta-row', recipe: metaRowRecipe, required: true },\n})\n\nexport {\n type MetaRowEmphasis,\n type MetaRowLayout,\n type MetaRowPairedLayout,\n defaultMetaRowEmphasis,\n defaultMetaRowLayout,\n metaRowAnatomy,\n metaRowEmphases,\n metaRowLayouts,\n metaRowRecipe,\n metaRowTones,\n}\n"],"mappings":";;;;AAWA,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;AAED,MAAM,iBAAiB,QAAQ,EAC7B,MAAM;CAAE,MAAM;CAAY,QAAQ;CAAe,UAAU;AAAK,EAClE,CAAC"}
|
package/dist/recipes/meter.d.ts
CHANGED
|
@@ -13,11 +13,45 @@ declare const meterPartsRecipe: (props?: ({
|
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
type MeterPartEdge = 'end' | 'inner' | 'only' | 'start';
|
|
15
15
|
declare const meterPartRecipe: (props?: ({
|
|
16
|
-
edge?: "
|
|
16
|
+
edge?: "start" | "end" | "inner" | "only" | null | undefined;
|
|
17
17
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
18
|
declare const meterLegendRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
19
19
|
declare const meterLegendItemRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
20
20
|
declare const meterLegendDotRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
21
|
+
declare const meterAnatomy: {
|
|
22
|
+
readonly caption: {
|
|
23
|
+
readonly part: "caption";
|
|
24
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
25
|
+
readonly required: false;
|
|
26
|
+
};
|
|
27
|
+
readonly head: {
|
|
28
|
+
readonly part: "head";
|
|
29
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
30
|
+
readonly required: false;
|
|
31
|
+
};
|
|
32
|
+
readonly legend: {
|
|
33
|
+
readonly part: "legend";
|
|
34
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
35
|
+
readonly required: false;
|
|
36
|
+
};
|
|
37
|
+
readonly parts: {
|
|
38
|
+
readonly part: "parts";
|
|
39
|
+
readonly recipe: (props?: ({
|
|
40
|
+
variant?: "share" | "split" | "slots" | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
42
|
+
readonly required: false;
|
|
43
|
+
};
|
|
44
|
+
readonly reading: {
|
|
45
|
+
readonly part: "reading";
|
|
46
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
47
|
+
readonly required: false;
|
|
48
|
+
};
|
|
49
|
+
readonly root: {
|
|
50
|
+
readonly part: "meter";
|
|
51
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
52
|
+
readonly required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
21
55
|
//#endregion
|
|
22
|
-
export { type MeterPartEdge, type MeterVariant, defaultMeterVariant, meterCaptionRecipe, meterHeadRecipe, meterLegendDotRecipe, meterLegendItemRecipe, meterLegendRecipe, meterPartRecipe, meterPartsRecipe, meterRangeRecipe, meterReadingRecipe, meterRecipe, meterTrackRecipe, meterVariants };
|
|
56
|
+
export { type MeterPartEdge, type MeterVariant, defaultMeterVariant, meterAnatomy, meterCaptionRecipe, meterHeadRecipe, meterLegendDotRecipe, meterLegendItemRecipe, meterLegendRecipe, meterPartRecipe, meterPartsRecipe, meterRangeRecipe, meterReadingRecipe, meterRecipe, meterTrackRecipe, meterVariants };
|
|
23
57
|
//# sourceMappingURL=meter.d.ts.map
|
package/dist/recipes/meter.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { valueGlide } from "./motion.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/meter.ts
|
|
@@ -33,7 +34,39 @@ const meterPartRecipe = cva(["bg-tf-blend", ...valueGlide], {
|
|
|
33
34
|
const meterLegendRecipe = cva("flex flex-wrap gap-x-4 gap-y-2");
|
|
34
35
|
const meterLegendItemRecipe = cva("flex items-center gap-2 text-tf-caption-sm text-tf-muted");
|
|
35
36
|
const meterLegendDotRecipe = cva("size-2 flex-none rounded-tf-pill bg-tf-blend");
|
|
37
|
+
const meterAnatomy = anatomy({
|
|
38
|
+
caption: {
|
|
39
|
+
part: "caption",
|
|
40
|
+
recipe: meterCaptionRecipe,
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
head: {
|
|
44
|
+
part: "head",
|
|
45
|
+
recipe: meterHeadRecipe,
|
|
46
|
+
required: false
|
|
47
|
+
},
|
|
48
|
+
legend: {
|
|
49
|
+
part: "legend",
|
|
50
|
+
recipe: meterLegendRecipe,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
parts: {
|
|
54
|
+
part: "parts",
|
|
55
|
+
recipe: meterPartsRecipe,
|
|
56
|
+
required: false
|
|
57
|
+
},
|
|
58
|
+
reading: {
|
|
59
|
+
part: "reading",
|
|
60
|
+
recipe: meterReadingRecipe,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
root: {
|
|
64
|
+
part: "meter",
|
|
65
|
+
recipe: meterRecipe,
|
|
66
|
+
required: true
|
|
67
|
+
}
|
|
68
|
+
});
|
|
36
69
|
//#endregion
|
|
37
|
-
export { defaultMeterVariant, meterCaptionRecipe, meterHeadRecipe, meterLegendDotRecipe, meterLegendItemRecipe, meterLegendRecipe, meterPartRecipe, meterPartsRecipe, meterRangeRecipe, meterReadingRecipe, meterRecipe, meterTrackRecipe, meterVariants };
|
|
70
|
+
export { defaultMeterVariant, meterAnatomy, meterCaptionRecipe, meterHeadRecipe, meterLegendDotRecipe, meterLegendItemRecipe, meterLegendRecipe, meterPartRecipe, meterPartsRecipe, meterRangeRecipe, meterReadingRecipe, meterRecipe, meterTrackRecipe, meterVariants };
|
|
38
71
|
|
|
39
72
|
//# sourceMappingURL=meter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meter.js","names":[],"sources":["../../src/recipes/meter.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { valueGlide } from './motion'\n\nconst meterVariants = ['share', 'split', 'slots'] as const\n\ntype MeterVariant = (typeof meterVariants)[number]\n\nconst defaultMeterVariant = 'share' satisfies MeterVariant\n\nconst meterRecipe = cva('flex w-full flex-col gap-2 font-tf-body text-tf-fg')\n\nconst meterHeadRecipe = cva('flex items-baseline justify-between gap-3')\n\nconst meterCaptionRecipe = cva(\n 'text-tf-caption-sm font-medium tracking-tf-eyebrow text-tf-muted uppercase',\n)\n\nconst meterReadingRecipe = cva('text-tf-body-sm font-medium text-tf-fg tabular-nums')\n\nconst meterTrackRecipe = cva('block h-2.5 overflow-hidden rounded-tf-pill bg-tf-sunken')\n\nconst meterRangeRecipe = cva(['block h-full rounded-tf-pill bg-tf-blend', ...valueGlide])\n\nconst meterPartsRecipe = cva('flex gap-1', {\n defaultVariants: { variant: defaultMeterVariant },\n variants: {\n variant: {\n share: '',\n slots: 'h-2.5',\n split: 'h-3',\n } satisfies Record<MeterVariant, string>,\n },\n})\n\ntype MeterPartEdge = 'end' | 'inner' | 'only' | 'start'\n\nconst meterPartRecipe = cva(['bg-tf-blend', ...valueGlide], {\n defaultVariants: { edge: 'inner' },\n variants: {\n edge: {\n end: 'rounded-r-tf-pill',\n inner: '',\n only: 'rounded-tf-pill',\n start: 'rounded-l-tf-pill',\n } satisfies Record<MeterPartEdge, string>,\n },\n})\n\nconst meterLegendRecipe = cva('flex flex-wrap gap-x-4 gap-y-2')\n\nconst meterLegendItemRecipe = cva('flex items-center gap-2 text-tf-caption-sm text-tf-muted')\n\nconst meterLegendDotRecipe = cva('size-2 flex-none rounded-tf-pill bg-tf-blend')\n\nexport {\n type MeterPartEdge,\n type MeterVariant,\n defaultMeterVariant,\n meterCaptionRecipe,\n meterHeadRecipe,\n meterLegendDotRecipe,\n meterLegendItemRecipe,\n meterLegendRecipe,\n meterPartRecipe,\n meterPartsRecipe,\n meterRangeRecipe,\n meterReadingRecipe,\n meterRecipe,\n meterTrackRecipe,\n meterVariants,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"meter.js","names":[],"sources":["../../src/recipes/meter.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { valueGlide } from './motion'\n\nconst meterVariants = ['share', 'split', 'slots'] as const\n\ntype MeterVariant = (typeof meterVariants)[number]\n\nconst defaultMeterVariant = 'share' satisfies MeterVariant\n\nconst meterRecipe = cva('flex w-full flex-col gap-2 font-tf-body text-tf-fg')\n\nconst meterHeadRecipe = cva('flex items-baseline justify-between gap-3')\n\nconst meterCaptionRecipe = cva(\n 'text-tf-caption-sm font-medium tracking-tf-eyebrow text-tf-muted uppercase',\n)\n\nconst meterReadingRecipe = cva('text-tf-body-sm font-medium text-tf-fg tabular-nums')\n\nconst meterTrackRecipe = cva('block h-2.5 overflow-hidden rounded-tf-pill bg-tf-sunken')\n\nconst meterRangeRecipe = cva(['block h-full rounded-tf-pill bg-tf-blend', ...valueGlide])\n\nconst meterPartsRecipe = cva('flex gap-1', {\n defaultVariants: { variant: defaultMeterVariant },\n variants: {\n variant: {\n share: '',\n slots: 'h-2.5',\n split: 'h-3',\n } satisfies Record<MeterVariant, string>,\n },\n})\n\ntype MeterPartEdge = 'end' | 'inner' | 'only' | 'start'\n\nconst meterPartRecipe = cva(['bg-tf-blend', ...valueGlide], {\n defaultVariants: { edge: 'inner' },\n variants: {\n edge: {\n end: 'rounded-r-tf-pill',\n inner: '',\n only: 'rounded-tf-pill',\n start: 'rounded-l-tf-pill',\n } satisfies Record<MeterPartEdge, string>,\n },\n})\n\nconst meterLegendRecipe = cva('flex flex-wrap gap-x-4 gap-y-2')\n\nconst meterLegendItemRecipe = cva('flex items-center gap-2 text-tf-caption-sm text-tf-muted')\n\nconst meterLegendDotRecipe = cva('size-2 flex-none rounded-tf-pill bg-tf-blend')\n\nconst meterAnatomy = anatomy({\n caption: { part: 'caption', recipe: meterCaptionRecipe, required: false },\n head: { part: 'head', recipe: meterHeadRecipe, required: false },\n legend: { part: 'legend', recipe: meterLegendRecipe, required: false },\n parts: { part: 'parts', recipe: meterPartsRecipe, required: false },\n reading: { part: 'reading', recipe: meterReadingRecipe, required: false },\n root: { part: 'meter', recipe: meterRecipe, required: true },\n})\n\nexport {\n type MeterPartEdge,\n type MeterVariant,\n defaultMeterVariant,\n meterAnatomy,\n meterCaptionRecipe,\n meterHeadRecipe,\n meterLegendDotRecipe,\n meterLegendItemRecipe,\n meterLegendRecipe,\n meterPartRecipe,\n meterPartsRecipe,\n meterRangeRecipe,\n meterReadingRecipe,\n meterRecipe,\n meterTrackRecipe,\n meterVariants,\n}\n"],"mappings":";;;;AAMA,MAAM,gBAAgB;CAAC;CAAS;CAAS;AAAO;AAIhD,MAAM,sBAAsB;AAE5B,MAAM,cAAc,IAAI,oDAAoD;AAE5E,MAAM,kBAAkB,IAAI,2CAA2C;AAEvE,MAAM,qBAAqB,IACzB,4EACF;AAEA,MAAM,qBAAqB,IAAI,qDAAqD;AAEpF,MAAM,mBAAmB,IAAI,0DAA0D;AAEvF,MAAM,mBAAmB,IAAI,CAAC,4CAA4C,GAAG,UAAU,CAAC;AAExF,MAAM,mBAAmB,IAAI,cAAc;CACzC,iBAAiB,EAAE,SAAS,oBAAoB;CAChD,UAAU,EACR,SAAS;EACP,OAAO;EACP,OAAO;EACP,OAAO;CACT,EACF;AACF,CAAC;AAID,MAAM,kBAAkB,IAAI,CAAC,eAAe,GAAG,UAAU,GAAG;CAC1D,iBAAiB,EAAE,MAAM,QAAQ;CACjC,UAAU,EACR,MAAM;EACJ,KAAK;EACL,OAAO;EACP,MAAM;EACN,OAAO;CACT,EACF;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,gCAAgC;AAE9D,MAAM,wBAAwB,IAAI,0DAA0D;AAE5F,MAAM,uBAAuB,IAAI,8CAA8C;AAE/E,MAAM,eAAe,QAAQ;CAC3B,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAoB,UAAU;CAAM;CACxE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAM;CAC/D,QAAQ;EAAE,MAAM;EAAU,QAAQ;EAAmB,UAAU;CAAM;CACrE,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAkB,UAAU;CAAM;CAClE,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAoB,UAAU;CAAM;CACxE,MAAM;EAAE,MAAM;EAAS,QAAQ;EAAa,UAAU;CAAK;AAC7D,CAAC"}
|
package/dist/recipes/motion.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
//#region src/recipes/motion.d.ts
|
|
2
2
|
declare const overlayMotion: string[];
|
|
3
|
+
declare const arrivalMotion: string[];
|
|
4
|
+
declare const drawerMotion: string[];
|
|
5
|
+
declare const liftMotion: string[];
|
|
6
|
+
declare const mirrorMotion: string[];
|
|
7
|
+
declare const scrimMirrorMotion: string[];
|
|
8
|
+
declare const railMorph = "tf-transition tf-rails motion-reduce:transition-none";
|
|
9
|
+
declare const valueGlide: string[];
|
|
3
10
|
declare const collapseMotion: string[];
|
|
11
|
+
declare const railCollapse: string;
|
|
4
12
|
//#endregion
|
|
5
|
-
export { collapseMotion, overlayMotion };
|
|
13
|
+
export { arrivalMotion, collapseMotion, drawerMotion, liftMotion, mirrorMotion, overlayMotion, railCollapse, railMorph, scrimMirrorMotion, valueGlide };
|
|
6
14
|
//# sourceMappingURL=motion.d.ts.map
|
package/dist/recipes/nebula.js
CHANGED
|
@@ -10,6 +10,49 @@ declare const numberRangeDashRecipe: (props?: ({
|
|
|
10
10
|
labelled?: boolean | null | undefined;
|
|
11
11
|
size?: "md" | "lg" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
declare const numberRangeAnatomy: {
|
|
14
|
+
readonly cloud: {
|
|
15
|
+
readonly part: "cloud";
|
|
16
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
readonly required: true;
|
|
18
|
+
};
|
|
19
|
+
readonly dash: {
|
|
20
|
+
readonly part: "dash";
|
|
21
|
+
readonly recipe: (props?: ({
|
|
22
|
+
filled?: boolean | null | undefined;
|
|
23
|
+
labelled?: boolean | null | undefined;
|
|
24
|
+
size?: "md" | "lg" | null | undefined;
|
|
25
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
26
|
+
readonly required: true;
|
|
27
|
+
};
|
|
28
|
+
readonly foot: {
|
|
29
|
+
readonly part: "foot";
|
|
30
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
33
|
+
readonly nebula: {
|
|
34
|
+
readonly part: "nebula";
|
|
35
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
36
|
+
readonly required: true;
|
|
37
|
+
};
|
|
38
|
+
readonly root: {
|
|
39
|
+
readonly part: "number-range";
|
|
40
|
+
readonly recipe: (props?: ({
|
|
41
|
+
fullWidth?: boolean | null | undefined;
|
|
42
|
+
message?: boolean | null | undefined;
|
|
43
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
44
|
+
readonly required: true;
|
|
45
|
+
};
|
|
46
|
+
readonly row: {
|
|
47
|
+
readonly part: "row";
|
|
48
|
+
readonly recipe: (props?: ({
|
|
49
|
+
invalid?: boolean | null | undefined;
|
|
50
|
+
loading?: boolean | null | undefined;
|
|
51
|
+
size?: "md" | "lg" | null | undefined;
|
|
52
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
53
|
+
readonly required: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
13
56
|
//#endregion
|
|
14
|
-
export { numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe };
|
|
57
|
+
export { numberRangeAnatomy, numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe };
|
|
15
58
|
//# sourceMappingURL=numberRange.d.ts.map
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
|
+
import { nebulaCloudLowRecipe, nebulaVeilRecipe } from "./nebula.js";
|
|
1
3
|
import "../control.js";
|
|
4
|
+
import { fieldFootRecipe, fieldRecipe, fieldRowRecipe } from "./field.js";
|
|
2
5
|
import { labelRoom } from "./input.js";
|
|
3
6
|
import { cva } from "class-variance-authority";
|
|
4
7
|
//#region src/recipes/numberRange.ts
|
|
@@ -103,7 +106,39 @@ const numberRangeDashRecipe = cva([
|
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
});
|
|
109
|
+
const numberRangeAnatomy = anatomy({
|
|
110
|
+
cloud: {
|
|
111
|
+
part: "cloud",
|
|
112
|
+
recipe: nebulaCloudLowRecipe,
|
|
113
|
+
required: true
|
|
114
|
+
},
|
|
115
|
+
dash: {
|
|
116
|
+
part: "dash",
|
|
117
|
+
recipe: numberRangeDashRecipe,
|
|
118
|
+
required: true
|
|
119
|
+
},
|
|
120
|
+
foot: {
|
|
121
|
+
part: "foot",
|
|
122
|
+
recipe: fieldFootRecipe,
|
|
123
|
+
required: true
|
|
124
|
+
},
|
|
125
|
+
nebula: {
|
|
126
|
+
part: "nebula",
|
|
127
|
+
recipe: nebulaVeilRecipe,
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
root: {
|
|
131
|
+
part: "number-range",
|
|
132
|
+
recipe: fieldRecipe,
|
|
133
|
+
required: true
|
|
134
|
+
},
|
|
135
|
+
row: {
|
|
136
|
+
part: "row",
|
|
137
|
+
recipe: fieldRowRecipe,
|
|
138
|
+
required: true
|
|
139
|
+
}
|
|
140
|
+
});
|
|
106
141
|
//#endregion
|
|
107
|
-
export { numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe };
|
|
142
|
+
export { numberRangeAnatomy, numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe };
|
|
108
143
|
|
|
109
144
|
//# sourceMappingURL=numberRange.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberRange.js","names":[],"sources":["../../src/recipes/numberRange.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport type { FieldSize } from '#control'\nimport { defaultFieldSize } from '#control'\n\nimport { labelRoom } from './input'\n\nconst HALF = [\n 'min-w-0 flex-1 bg-transparent text-tf-fg tf-writes tabular-nums',\n 'placeholder:text-tf-muted placeholder:opacity-0',\n 'data-readonly:text-tf-muted',\n 'disabled:cursor-not-allowed',\n 'outline-2 outline-solid outline-offset-2 outline-transparent',\n '[appearance:textfield]',\n '[&::-webkit-inner-spin-button]:appearance-none',\n '[&::-webkit-outer-spin-button]:appearance-none',\n]\n\nconst numberRangeHalfRecipe = cva(HALF, {\n compoundVariants: [\n { at: 'from', class: 'pl-4', labelled: true, size: 'lg' },\n { at: 'from', class: 'pl-4', labelled: true, size: 'md' },\n { at: 'to', class: 'pr-4', labelled: true, size: 'lg' },\n { at: 'to', class: 'pr-4', labelled: true, size: 'md' },\n { class: labelRoom.lg, labelled: true, size: 'lg' },\n { class: labelRoom.md, labelled: true, size: 'md' },\n ],\n defaultVariants: { at: 'from', labelled: true, size: defaultFieldSize },\n variants: {\n at: { from: 'pr-0 text-left', to: 'pl-0 text-left' },\n labelled: { false: 'px-4 py-0 placeholder:opacity-100', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n },\n})\n\nconst numberRangeRecipe = cva('max-w-64')\n\nconst numberRangeDashRecipe = cva(\n [\n 'flex flex-none items-center self-stretch px-2',\n 'font-medium text-tf-muted tabular-nums',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n compoundVariants: [\n { class: `${labelRoom.lg} text-tf-body-sm`, labelled: true, size: 'lg' },\n { class: `${labelRoom.md} text-tf-body-sm`, labelled: true, size: 'md' },\n ],\n defaultVariants: { filled: false, labelled: true, size: defaultFieldSize },\n variants: {\n filled: { false: 'opacity-0', true: 'opacity-100' },\n labelled: { false: 'py-0 text-tf-body-sm', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n },\n },\n)\n\nexport { numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"numberRange.js","names":[],"sources":["../../src/recipes/numberRange.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport type { FieldSize } from '#control'\nimport { defaultFieldSize } from '#control'\n\nimport { fieldFootRecipe, fieldRecipe, fieldRowRecipe } from './field'\nimport { labelRoom } from './input'\nimport { nebulaCloudLowRecipe, nebulaVeilRecipe } from './nebula'\n\nconst HALF = [\n 'min-w-0 flex-1 bg-transparent text-tf-fg tf-writes tabular-nums',\n 'placeholder:text-tf-muted placeholder:opacity-0',\n 'data-readonly:text-tf-muted',\n 'disabled:cursor-not-allowed',\n 'outline-2 outline-solid outline-offset-2 outline-transparent',\n '[appearance:textfield]',\n '[&::-webkit-inner-spin-button]:appearance-none',\n '[&::-webkit-outer-spin-button]:appearance-none',\n]\n\nconst numberRangeHalfRecipe = cva(HALF, {\n compoundVariants: [\n { at: 'from', class: 'pl-4', labelled: true, size: 'lg' },\n { at: 'from', class: 'pl-4', labelled: true, size: 'md' },\n { at: 'to', class: 'pr-4', labelled: true, size: 'lg' },\n { at: 'to', class: 'pr-4', labelled: true, size: 'md' },\n { class: labelRoom.lg, labelled: true, size: 'lg' },\n { class: labelRoom.md, labelled: true, size: 'md' },\n ],\n defaultVariants: { at: 'from', labelled: true, size: defaultFieldSize },\n variants: {\n at: { from: 'pr-0 text-left', to: 'pl-0 text-left' },\n labelled: { false: 'px-4 py-0 placeholder:opacity-100', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n },\n})\n\nconst numberRangeRecipe = cva('max-w-64')\n\nconst numberRangeDashRecipe = cva(\n [\n 'flex flex-none items-center self-stretch px-2',\n 'font-medium text-tf-muted tabular-nums',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n compoundVariants: [\n { class: `${labelRoom.lg} text-tf-body-sm`, labelled: true, size: 'lg' },\n { class: `${labelRoom.md} text-tf-body-sm`, labelled: true, size: 'md' },\n ],\n defaultVariants: { filled: false, labelled: true, size: defaultFieldSize },\n variants: {\n filled: { false: 'opacity-0', true: 'opacity-100' },\n labelled: { false: 'py-0 text-tf-body-sm', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n },\n },\n)\n\nconst numberRangeAnatomy = anatomy({\n cloud: { part: 'cloud', recipe: nebulaCloudLowRecipe, required: true },\n dash: { part: 'dash', recipe: numberRangeDashRecipe, required: true },\n foot: { part: 'foot', recipe: fieldFootRecipe, required: true },\n nebula: { part: 'nebula', recipe: nebulaVeilRecipe, required: true },\n root: { part: 'number-range', recipe: fieldRecipe, required: true },\n row: { part: 'row', recipe: fieldRowRecipe, required: true },\n})\n\nexport { numberRangeAnatomy, numberRangeDashRecipe, numberRangeHalfRecipe, numberRangeRecipe }\n"],"mappings":";;;;;;;AAqBA,MAAM,wBAAwB,IAAI;CAVhC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAGmC,GAAG;CACtC,kBAAkB;EAChB;GAAE,IAAI;GAAQ,OAAO;GAAQ,UAAU;GAAM,MAAM;EAAK;EACxD;GAAE,IAAI;GAAQ,OAAO;GAAQ,UAAU;GAAM,MAAM;EAAK;EACxD;GAAE,IAAI;GAAM,OAAO;GAAQ,UAAU;GAAM,MAAM;EAAK;EACtD;GAAE,IAAI;GAAM,OAAO;GAAQ,UAAU;GAAM,MAAM;EAAK;EACtD;GAAE,OAAO,UAAU;GAAI,UAAU;GAAM,MAAM;EAAK;EAClD;GAAE,OAAO,UAAU;GAAI,UAAU;GAAM,MAAM;EAAK;CACpD;CACA,iBAAiB;EAAE,IAAI;EAAQ,UAAU;EAAM,MAAA;CAAuB;CACtE,UAAU;EACR,IAAI;GAAE,MAAM;GAAkB,IAAI;EAAiB;EACnD,UAAU;GAAE,OAAO;GAAqC,MAAM;EAAG;EACjE,MAAM;GAAE,IAAI;GAAI,IAAI;EAAG;CACzB;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,UAAU;AAExC,MAAM,wBAAwB,IAC5B;CACE;CACA;CACA;AACF,GACA;CACE,kBAAkB,CAChB;EAAE,OAAO,GAAG,UAAU,GAAG;EAAmB,UAAU;EAAM,MAAM;CAAK,GACvE;EAAE,OAAO,GAAG,UAAU,GAAG;EAAmB,UAAU;EAAM,MAAM;CAAK,CACzE;CACA,iBAAiB;EAAE,QAAQ;EAAO,UAAU;EAAM,MAAA;CAAuB;CACzE,UAAU;EACR,QAAQ;GAAE,OAAO;GAAa,MAAM;EAAc;EAClD,UAAU;GAAE,OAAO;GAAwB,MAAM;EAAG;EACpD,MAAM;GAAE,IAAI;GAAI,IAAI;EAAG;CACzB;AACF,CACF;AAEA,MAAM,qBAAqB,QAAQ;CACjC,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAsB,UAAU;CAAK;CACrE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAuB,UAAU;CAAK;CACpE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAK;CAC9D,QAAQ;EAAE,MAAM;EAAU,QAAQ;EAAkB,UAAU;CAAK;CACnE,MAAM;EAAE,MAAM;EAAgB,QAAQ;EAAa,UAAU;CAAK;CAClE,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAgB,UAAU;CAAK;AAC7D,CAAC"}
|
package/dist/recipes/paper.d.ts
CHANGED
|
@@ -23,8 +23,61 @@ declare const paperBadgeRecipe: (props?: ({
|
|
|
23
23
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
24
|
declare const paperActionRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
25
25
|
declare const paperVariants: readonly ["plain", "elevated"];
|
|
26
|
-
declare const paperTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
27
26
|
declare const paperInsets: readonly ["padded", "flush", "roomy"];
|
|
27
|
+
declare const paperAnatomy: {
|
|
28
|
+
readonly action: {
|
|
29
|
+
readonly part: "action";
|
|
30
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
31
|
+
readonly required: false;
|
|
32
|
+
};
|
|
33
|
+
readonly badge: {
|
|
34
|
+
readonly part: "badge";
|
|
35
|
+
readonly recipe: (props?: ({
|
|
36
|
+
headed?: boolean | null | undefined;
|
|
37
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
38
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
39
|
+
readonly required: false;
|
|
40
|
+
};
|
|
41
|
+
readonly body: {
|
|
42
|
+
readonly part: "body";
|
|
43
|
+
readonly recipe: (props?: ({
|
|
44
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
45
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
46
|
+
readonly required: true;
|
|
47
|
+
};
|
|
48
|
+
readonly cloud: {
|
|
49
|
+
readonly part: "cloud";
|
|
50
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
51
|
+
readonly required: false;
|
|
52
|
+
};
|
|
53
|
+
readonly header: {
|
|
54
|
+
readonly part: "header";
|
|
55
|
+
readonly recipe: (props?: ({
|
|
56
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
57
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
58
|
+
readonly required: false;
|
|
59
|
+
};
|
|
60
|
+
readonly nebula: {
|
|
61
|
+
readonly part: "nebula";
|
|
62
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
63
|
+
readonly required: false;
|
|
64
|
+
};
|
|
65
|
+
readonly root: {
|
|
66
|
+
readonly part: "paper";
|
|
67
|
+
readonly recipe: (props?: ({
|
|
68
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
69
|
+
variant?: "plain" | "elevated" | null | undefined;
|
|
70
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
71
|
+
readonly required: true;
|
|
72
|
+
};
|
|
73
|
+
readonly rule: {
|
|
74
|
+
readonly part: "rule";
|
|
75
|
+
readonly recipe: (props?: ({
|
|
76
|
+
inset?: "roomy" | "padded" | "flush" | null | undefined;
|
|
77
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
78
|
+
readonly required: false;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
28
81
|
//#endregion
|
|
29
|
-
export { type PaperInset, type PaperVariant, defaultPaperInset, defaultPaperTone, defaultPaperVariant, paperActionRecipe, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe,
|
|
82
|
+
export { type PaperInset, type PaperVariant, defaultPaperInset, defaultPaperTone, defaultPaperVariant, paperActionRecipe, paperAnatomy, paperBadgeRecipe, paperBodyRecipe, paperHeaderRecipe, paperInsets, paperRecipe, paperRuleRecipe, paperVariants };
|
|
30
83
|
//# sourceMappingURL=paper.d.ts.map
|