@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/tile.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/recipes/tile.ts
|
|
3
4
|
const tileTones = [
|
|
@@ -79,7 +80,24 @@ const tileGlyphRecipe = cva([
|
|
|
79
80
|
} }
|
|
80
81
|
});
|
|
81
82
|
const tileCloudRecipe = cva("tf-nebula-cloud tf-cloud-tight");
|
|
83
|
+
const tileAnatomy = anatomy({
|
|
84
|
+
cloud: {
|
|
85
|
+
part: "cloud",
|
|
86
|
+
recipe: tileCloudRecipe,
|
|
87
|
+
required: false
|
|
88
|
+
},
|
|
89
|
+
glyph: {
|
|
90
|
+
part: "glyph",
|
|
91
|
+
recipe: tileGlyphRecipe,
|
|
92
|
+
required: true
|
|
93
|
+
},
|
|
94
|
+
root: {
|
|
95
|
+
part: "tile",
|
|
96
|
+
recipe: tileRecipe,
|
|
97
|
+
required: true
|
|
98
|
+
}
|
|
99
|
+
});
|
|
82
100
|
//#endregion
|
|
83
|
-
export { defaultTileRest, defaultTileTone, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
101
|
+
export { defaultTileRest, defaultTileTone, tileAnatomy, tileCloudRecipe, tileGlyphRecipe, tileRecipe, tileRests, tileTones };
|
|
84
102
|
|
|
85
103
|
//# sourceMappingURL=tile.js.map
|
package/dist/recipes/tile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tile.js","names":[],"sources":["../../src/recipes/tile.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst tileTones = ['accent', 'success', 'warning', 'info', 'danger'] as const\n\ntype TileTone = (typeof tileTones)[number]\n\nconst defaultTileTone = 'accent' satisfies TileTone\n\nconst tileRests = ['lit', 'quiet', 'filled'] as const\n\ntype TileRest = (typeof tileRests)[number]\n\nconst defaultTileRest = 'lit' satisfies TileRest\n\nconst BLEND = {\n accent: 'blend-tf-accent',\n danger: 'blend-tf-danger',\n info: 'blend-tf-info',\n success: 'blend-tf-success',\n warning: 'blend-tf-warning',\n} satisfies Record<TileTone, string>\n\nconst INK = {\n accent: 'text-tf-accent-hi',\n danger: 'text-tf-danger-hi',\n info: 'text-tf-info-hi',\n success: 'text-tf-success-hi',\n warning: 'text-tf-warning-hi',\n} satisfies Record<TileTone, string>\n\nconst FILLED_INK = {\n accent: 'text-tf-on-accent',\n danger: 'text-tf-on-semantic',\n info: 'text-tf-on-semantic',\n success: 'text-tf-on-semantic',\n warning: 'text-tf-on-semantic',\n} satisfies Record<TileTone, string>\n\nconst LIT = 'tf-edge-sweep tf-swept tf-inner-lit tf-glass-plate stroke-tf-ink tf-icons-solo'\n\nconst QUIET = [\n 'bg-tf-panel-hi tf-ramp tf-cloud-brand tf-cloud-hidden',\n 'text-tf-fg tf-blend-drift tf-icons',\n].join(' ')\n\nconst FILLED = [\n 'bg-tf-blend tf-cloud-brand tf-clouded tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-inner-lit tf-icons-solo',\n].join(' ')\n\nconst tileRecipe = cva(\n [\n 'relative isolate flex size-tf-control-lg shrink-0 items-center justify-center',\n 'rounded-tf-card',\n 'tf-transition motion-reduce:transition-none',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n ],\n {\n compoundVariants: [\n ...tileTones.map((tone) => ({ class: INK[tone], rest: 'lit' as const, tone })),\n ...tileTones.map((tone) => ({ class: FILLED_INK[tone], rest: 'filled' as const, tone })),\n ],\n defaultVariants: { rest: defaultTileRest, tone: defaultTileTone },\n variants: {\n rest: { filled: FILLED, lit: LIT, quiet: QUIET } satisfies Record<TileRest, string>,\n tone: BLEND,\n },\n },\n)\n\nconst tileGlyphRecipe = cva(\n [\n 'inline-flex items-center justify-center',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n 'tf-moves-spring tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { rest: defaultTileRest },\n variants: {\n rest: {\n filled: 'motion-safe:tf-pops',\n lit: 'motion-safe:tf-pops',\n quiet: '',\n } satisfies Record<TileRest, string>,\n },\n },\n)\n\nconst tileCloudRecipe = cva('tf-nebula-cloud tf-cloud-tight')\n\nexport {\n type TileRest,\n type TileTone,\n defaultTileRest,\n defaultTileTone,\n tileCloudRecipe,\n tileGlyphRecipe,\n tileRecipe,\n tileRests,\n tileTones,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tile.js","names":[],"sources":["../../src/recipes/tile.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nconst tileTones = ['accent', 'success', 'warning', 'info', 'danger'] as const\n\ntype TileTone = (typeof tileTones)[number]\n\nconst defaultTileTone = 'accent' satisfies TileTone\n\nconst tileRests = ['lit', 'quiet', 'filled'] as const\n\ntype TileRest = (typeof tileRests)[number]\n\nconst defaultTileRest = 'lit' satisfies TileRest\n\nconst BLEND = {\n accent: 'blend-tf-accent',\n danger: 'blend-tf-danger',\n info: 'blend-tf-info',\n success: 'blend-tf-success',\n warning: 'blend-tf-warning',\n} satisfies Record<TileTone, string>\n\nconst INK = {\n accent: 'text-tf-accent-hi',\n danger: 'text-tf-danger-hi',\n info: 'text-tf-info-hi',\n success: 'text-tf-success-hi',\n warning: 'text-tf-warning-hi',\n} satisfies Record<TileTone, string>\n\nconst FILLED_INK = {\n accent: 'text-tf-on-accent',\n danger: 'text-tf-on-semantic',\n info: 'text-tf-on-semantic',\n success: 'text-tf-on-semantic',\n warning: 'text-tf-on-semantic',\n} satisfies Record<TileTone, string>\n\nconst LIT = 'tf-edge-sweep tf-swept tf-inner-lit tf-glass-plate stroke-tf-ink tf-icons-solo'\n\nconst QUIET = [\n 'bg-tf-panel-hi tf-ramp tf-cloud-brand tf-cloud-hidden',\n 'text-tf-fg tf-blend-drift tf-icons',\n].join(' ')\n\nconst FILLED = [\n 'bg-tf-blend tf-cloud-brand tf-clouded tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-inner-lit tf-icons-solo',\n].join(' ')\n\nconst tileRecipe = cva(\n [\n 'relative isolate flex size-tf-control-lg shrink-0 items-center justify-center',\n 'rounded-tf-card',\n 'tf-transition motion-reduce:transition-none',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n ],\n {\n compoundVariants: [\n ...tileTones.map((tone) => ({ class: INK[tone], rest: 'lit' as const, tone })),\n ...tileTones.map((tone) => ({ class: FILLED_INK[tone], rest: 'filled' as const, tone })),\n ],\n defaultVariants: { rest: defaultTileRest, tone: defaultTileTone },\n variants: {\n rest: { filled: FILLED, lit: LIT, quiet: QUIET } satisfies Record<TileRest, string>,\n tone: BLEND,\n },\n },\n)\n\nconst tileGlyphRecipe = cva(\n [\n 'inline-flex items-center justify-center',\n '[&_svg]:size-tf-icon-solo-lg [&_svg]:shrink-0',\n 'tf-moves-spring tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { rest: defaultTileRest },\n variants: {\n rest: {\n filled: 'motion-safe:tf-pops',\n lit: 'motion-safe:tf-pops',\n quiet: '',\n } satisfies Record<TileRest, string>,\n },\n },\n)\n\nconst tileCloudRecipe = cva('tf-nebula-cloud tf-cloud-tight')\n\nconst tileAnatomy = anatomy({\n cloud: { part: 'cloud', recipe: tileCloudRecipe, required: false },\n glyph: { part: 'glyph', recipe: tileGlyphRecipe, required: true },\n root: { part: 'tile', recipe: tileRecipe, required: true },\n})\n\nexport {\n type TileRest,\n type TileTone,\n defaultTileRest,\n defaultTileTone,\n tileAnatomy,\n tileCloudRecipe,\n tileGlyphRecipe,\n tileRecipe,\n tileRests,\n tileTones,\n}\n"],"mappings":";;;AAIA,MAAM,YAAY;CAAC;CAAU;CAAW;CAAW;CAAQ;AAAQ;AAInE,MAAM,kBAAkB;AAExB,MAAM,YAAY;CAAC;CAAO;CAAS;AAAQ;AAI3C,MAAM,kBAAkB;AAExB,MAAM,QAAQ;CACZ,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,MAAM;CACV,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,aAAa;CACjB,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,SAAS;CACT,SAAS;AACX;AAEA,MAAM,MAAM;AAEZ,MAAM,QAAQ,CACZ,yDACA,oCACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,SAAS,CACb,wDACA,mDACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,aAAa,IACjB;CACE;CACA;CACA;CACA;AACF,GACA;CACE,kBAAkB,CAChB,GAAG,UAAU,KAAK,UAAU;EAAE,OAAO,IAAI;EAAO,MAAM;EAAgB;CAAK,EAAE,GAC7E,GAAG,UAAU,KAAK,UAAU;EAAE,OAAO,WAAW;EAAO,MAAM;EAAmB;CAAK,EAAE,CACzF;CACA,iBAAiB;EAAE,MAAA;EAAuB,MAAM;CAAgB;CAChE,UAAU;EACR,MAAM;GAAE,QAAQ;GAAQ,KAAK;GAAK,OAAO;EAAM;EAC/C,MAAM;CACR;AACF,CACF;AAEA,MAAM,kBAAkB,IACtB;CACE;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,MAAA,MAAsB;CACzC,UAAU,EACR,MAAM;EACJ,QAAQ;EACR,KAAK;EACL,OAAO;CACT,EACF;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,gCAAgC;AAE5D,MAAM,cAAc,QAAQ;CAC1B,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAiB,UAAU;CAAM;CACjE,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAiB,UAAU;CAAK;CAChE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAY,UAAU;CAAK;AAC3D,CAAC"}
|
|
@@ -7,6 +7,13 @@ declare const tooltipPlacements: readonly ["top", "right", "bottom", "left"];
|
|
|
7
7
|
declare const tooltipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
8
|
declare const tooltipArrowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
9
|
declare const tooltipArrowTipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
|
+
declare const tooltipAnatomy: {
|
|
11
|
+
readonly root: {
|
|
12
|
+
readonly part: "tooltip";
|
|
13
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
14
|
+
readonly required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
10
17
|
//#endregion
|
|
11
|
-
export { type TooltipPlacement, defaultTooltipPlacement, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
18
|
+
export { type TooltipPlacement, defaultTooltipPlacement, tooltipAnatomy, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
12
19
|
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/recipes/tooltip.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { arrivalMotion } from "./motion.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/tooltip.ts
|
|
@@ -20,7 +21,12 @@ const tooltipRecipe = cva([
|
|
|
20
21
|
]);
|
|
21
22
|
const tooltipArrowRecipe = cva(["[--arrow-size:0.5rem]", "[--arrow-background:var(--tf-glass-flat)]"]);
|
|
22
23
|
const tooltipArrowTipRecipe = cva("border-t border-l border-tf-line");
|
|
24
|
+
const tooltipAnatomy = anatomy({ root: {
|
|
25
|
+
part: "tooltip",
|
|
26
|
+
recipe: tooltipRecipe,
|
|
27
|
+
required: true
|
|
28
|
+
} });
|
|
23
29
|
//#endregion
|
|
24
|
-
export { defaultTooltipPlacement, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
30
|
+
export { defaultTooltipPlacement, tooltipAnatomy, tooltipArrowRecipe, tooltipArrowTipRecipe, tooltipCloseToken, tooltipOpenToken, tooltipPlacements, tooltipRecipe };
|
|
25
31
|
|
|
26
32
|
//# sourceMappingURL=tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":[],"sources":["../../src/recipes/tooltip.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { arrivalMotion } from './motion'\n\ntype TooltipPlacement = 'top' | 'right' | 'bottom' | 'left'\n\nconst defaultTooltipPlacement = 'right' satisfies TooltipPlacement\n\nconst tooltipOpenToken = '--tf-duration-2'\n\nconst tooltipCloseToken = '--tf-duration-1'\n\nconst tooltipPlacements = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n] as const satisfies readonly TooltipPlacement[]\n\nconst tooltipRecipe = cva([\n 'z-tf-tooltip max-w-tf-panel rounded-tf-inline px-1.5 py-0.75',\n 'bg-tf-glass shadow-tf-float backdrop-blur-tf-glass',\n 'tf-edge-sweep tf-edge-plain',\n 'font-tf-body text-tf-caption-sm text-tf-fg',\n ...arrivalMotion,\n 'motion-reduce:animate-none',\n])\n\nconst tooltipArrowRecipe = cva([\n '[--arrow-size:0.5rem]',\n '[--arrow-background:var(--tf-glass-flat)]',\n])\n\nconst tooltipArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nexport {\n type TooltipPlacement,\n defaultTooltipPlacement,\n tooltipCloseToken,\n tooltipOpenToken,\n tooltipArrowRecipe,\n tooltipArrowTipRecipe,\n tooltipPlacements,\n tooltipRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../src/recipes/tooltip.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { arrivalMotion } from './motion'\n\ntype TooltipPlacement = 'top' | 'right' | 'bottom' | 'left'\n\nconst defaultTooltipPlacement = 'right' satisfies TooltipPlacement\n\nconst tooltipOpenToken = '--tf-duration-2'\n\nconst tooltipCloseToken = '--tf-duration-1'\n\nconst tooltipPlacements = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n] as const satisfies readonly TooltipPlacement[]\n\nconst tooltipRecipe = cva([\n 'z-tf-tooltip max-w-tf-panel rounded-tf-inline px-1.5 py-0.75',\n 'bg-tf-glass shadow-tf-float backdrop-blur-tf-glass',\n 'tf-edge-sweep tf-edge-plain',\n 'font-tf-body text-tf-caption-sm text-tf-fg',\n ...arrivalMotion,\n 'motion-reduce:animate-none',\n])\n\nconst tooltipArrowRecipe = cva([\n '[--arrow-size:0.5rem]',\n '[--arrow-background:var(--tf-glass-flat)]',\n])\n\nconst tooltipArrowTipRecipe = cva('border-t border-l border-tf-line')\n\nconst tooltipAnatomy = anatomy({\n root: { part: 'tooltip', recipe: tooltipRecipe, required: true },\n})\n\nexport {\n type TooltipPlacement,\n defaultTooltipPlacement,\n tooltipAnatomy,\n tooltipCloseToken,\n tooltipOpenToken,\n tooltipArrowRecipe,\n tooltipArrowTipRecipe,\n tooltipPlacements,\n tooltipRecipe,\n}\n"],"mappings":";;;;AAQA,MAAM,0BAA0B;AAEhC,MAAM,mBAAmB;AAEzB,MAAM,oBAAoB;AAE1B,MAAM,oBAAoB;CACxB;CACA;CACA;CACA;AACF;AAEA,MAAM,gBAAgB,IAAI;CACxB;CACA;CACA;CACA;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAC7B,yBACA,2CACF,CAAC;AAED,MAAM,wBAAwB,IAAI,kCAAkC;AAEpE,MAAM,iBAAiB,QAAQ,EAC7B,MAAM;CAAE,MAAM;CAAW,QAAQ;CAAe,UAAU;AAAK,EACjE,CAAC"}
|
package/dist/recipes/topBar.d.ts
CHANGED
|
@@ -10,6 +10,48 @@ declare const topBarActionsRecipe: (props?: import("class-variance-authority/typ
|
|
|
10
10
|
declare const topBarLevels: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
11
11
|
type TopBarLevel = (typeof topBarLevels)[number];
|
|
12
12
|
declare const defaultTopBarLevel = "h1";
|
|
13
|
+
declare const topBarAnatomy: {
|
|
14
|
+
readonly actions: {
|
|
15
|
+
readonly part: "actions";
|
|
16
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
readonly required: false;
|
|
18
|
+
};
|
|
19
|
+
readonly content: {
|
|
20
|
+
readonly part: "content";
|
|
21
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
22
|
+
readonly required: true;
|
|
23
|
+
};
|
|
24
|
+
readonly edge: {
|
|
25
|
+
readonly part: "edge";
|
|
26
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
27
|
+
readonly required: true;
|
|
28
|
+
};
|
|
29
|
+
readonly eyebrow: {
|
|
30
|
+
readonly part: "eyebrow";
|
|
31
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
32
|
+
readonly required: false;
|
|
33
|
+
};
|
|
34
|
+
readonly headings: {
|
|
35
|
+
readonly part: "headings";
|
|
36
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
37
|
+
readonly required: true;
|
|
38
|
+
};
|
|
39
|
+
readonly root: {
|
|
40
|
+
readonly part: "top-bar";
|
|
41
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
42
|
+
readonly required: true;
|
|
43
|
+
};
|
|
44
|
+
readonly rule: {
|
|
45
|
+
readonly part: "rule";
|
|
46
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
47
|
+
readonly required: true;
|
|
48
|
+
};
|
|
49
|
+
readonly title: {
|
|
50
|
+
readonly part: "title";
|
|
51
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
52
|
+
readonly required: true;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
13
55
|
//#endregion
|
|
14
|
-
export { type TopBarLevel, defaultTopBarLevel, topBarActionsRecipe, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
56
|
+
export { type TopBarLevel, defaultTopBarLevel, topBarActionsRecipe, topBarAnatomy, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
15
57
|
//# sourceMappingURL=topBar.d.ts.map
|
package/dist/recipes/topBar.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { ruleFading } from "../parts/rule.js";
|
|
2
3
|
import { eyebrowLead } from "../parts/eyebrow.js";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
@@ -29,7 +30,49 @@ const topBarLevels = [
|
|
|
29
30
|
"h6"
|
|
30
31
|
];
|
|
31
32
|
const defaultTopBarLevel = "h1";
|
|
33
|
+
const topBarAnatomy = anatomy({
|
|
34
|
+
actions: {
|
|
35
|
+
part: "actions",
|
|
36
|
+
recipe: topBarActionsRecipe,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
content: {
|
|
40
|
+
part: "content",
|
|
41
|
+
recipe: topBarContentRecipe,
|
|
42
|
+
required: true
|
|
43
|
+
},
|
|
44
|
+
edge: {
|
|
45
|
+
part: "edge",
|
|
46
|
+
recipe: topBarEdgeRecipe,
|
|
47
|
+
required: true
|
|
48
|
+
},
|
|
49
|
+
eyebrow: {
|
|
50
|
+
part: "eyebrow",
|
|
51
|
+
recipe: topBarEyebrowRecipe,
|
|
52
|
+
required: false
|
|
53
|
+
},
|
|
54
|
+
headings: {
|
|
55
|
+
part: "headings",
|
|
56
|
+
recipe: topBarHeadingsRecipe,
|
|
57
|
+
required: true
|
|
58
|
+
},
|
|
59
|
+
root: {
|
|
60
|
+
part: "top-bar",
|
|
61
|
+
recipe: topBarRecipe,
|
|
62
|
+
required: true
|
|
63
|
+
},
|
|
64
|
+
rule: {
|
|
65
|
+
part: "rule",
|
|
66
|
+
recipe: topBarRuleRecipe,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
part: "title",
|
|
71
|
+
recipe: topBarTitleRecipe,
|
|
72
|
+
required: true
|
|
73
|
+
}
|
|
74
|
+
});
|
|
32
75
|
//#endregion
|
|
33
|
-
export { defaultTopBarLevel, topBarActionsRecipe, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
76
|
+
export { defaultTopBarLevel, topBarActionsRecipe, topBarAnatomy, topBarContentRecipe, topBarEdgeRecipe, topBarEyebrowRecipe, topBarHeadingsRecipe, topBarLevels, topBarRecipe, topBarRuleRecipe, topBarTitleRecipe };
|
|
34
77
|
|
|
35
78
|
//# sourceMappingURL=topBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topBar.js","names":[],"sources":["../../src/recipes/topBar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { ruleFading } from '#parts/rule'\n\nconst topBarRecipe = cva([\n 'sticky top-0 isolate z-tf-raised w-full',\n 'bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n 'tf-transition motion-reduce:transition-none',\n 'data-lifted:shadow-tf-float',\n])\n\nconst topBarContentRecipe = cva([\n 'mx-auto flex w-full max-w-tf-canvas flex-wrap items-center gap-4 px-6 py-4 sm:px-12',\n 'min-h-[calc(var(--spacing-tf-control-lg)+var(--spacing)*8)]',\n])\n\nconst topBarEdgeRecipe = cva('-mb-px block h-px w-full')\n\nconst topBarRuleRecipe = cva([\n `absolute inset-x-0 bottom-0 ${ruleFading}`,\n 'opacity-0 tf-transition motion-reduce:transition-none',\n 'in-data-lifted:opacity-100',\n])\n\nconst topBarHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-1')\n\nconst topBarEyebrowRecipe = cva(eyebrowLead)\n\nconst topBarTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h3 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst topBarActionsRecipe = cva('flex flex-wrap items-center gap-4')\n\nconst topBarLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\n\ntype TopBarLevel = (typeof topBarLevels)[number]\n\nconst defaultTopBarLevel = 'h1' satisfies TopBarLevel\n\nexport {\n type TopBarLevel,\n defaultTopBarLevel,\n topBarLevels,\n topBarRuleRecipe,\n topBarActionsRecipe,\n topBarContentRecipe,\n topBarEdgeRecipe,\n topBarEyebrowRecipe,\n topBarHeadingsRecipe,\n topBarRecipe,\n topBarTitleRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"topBar.js","names":[],"sources":["../../src/recipes/topBar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { ruleFading } from '#parts/rule'\n\nconst topBarRecipe = cva([\n 'sticky top-0 isolate z-tf-raised w-full',\n 'bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n 'tf-transition motion-reduce:transition-none',\n 'data-lifted:shadow-tf-float',\n])\n\nconst topBarContentRecipe = cva([\n 'mx-auto flex w-full max-w-tf-canvas flex-wrap items-center gap-4 px-6 py-4 sm:px-12',\n 'min-h-[calc(var(--spacing-tf-control-lg)+var(--spacing)*8)]',\n])\n\nconst topBarEdgeRecipe = cva('-mb-px block h-px w-full')\n\nconst topBarRuleRecipe = cva([\n `absolute inset-x-0 bottom-0 ${ruleFading}`,\n 'opacity-0 tf-transition motion-reduce:transition-none',\n 'in-data-lifted:opacity-100',\n])\n\nconst topBarHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-1')\n\nconst topBarEyebrowRecipe = cva(eyebrowLead)\n\nconst topBarTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h3 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst topBarActionsRecipe = cva('flex flex-wrap items-center gap-4')\n\nconst topBarLevels = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const\n\ntype TopBarLevel = (typeof topBarLevels)[number]\n\nconst defaultTopBarLevel = 'h1' satisfies TopBarLevel\n\nconst topBarAnatomy = anatomy({\n actions: { part: 'actions', recipe: topBarActionsRecipe, required: false },\n content: { part: 'content', recipe: topBarContentRecipe, required: true },\n edge: { part: 'edge', recipe: topBarEdgeRecipe, required: true },\n eyebrow: { part: 'eyebrow', recipe: topBarEyebrowRecipe, required: false },\n headings: { part: 'headings', recipe: topBarHeadingsRecipe, required: true },\n root: { part: 'top-bar', recipe: topBarRecipe, required: true },\n rule: { part: 'rule', recipe: topBarRuleRecipe, required: true },\n title: { part: 'title', recipe: topBarTitleRecipe, required: true },\n})\n\nexport {\n type TopBarLevel,\n defaultTopBarLevel,\n topBarAnatomy,\n topBarLevels,\n topBarRuleRecipe,\n topBarActionsRecipe,\n topBarContentRecipe,\n topBarEdgeRecipe,\n topBarEyebrowRecipe,\n topBarHeadingsRecipe,\n topBarRecipe,\n topBarTitleRecipe,\n}\n"],"mappings":";;;;;AAMA,MAAM,eAAe,IAAI;CACvB;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI,CAC9B,uFACA,6DACF,CAAC;AAED,MAAM,mBAAmB,IAAI,0BAA0B;AAEvD,MAAM,mBAAmB,IAAI;CAC3B,+BAA+B;CAC/B;CACA;AACF,CAAC;AAED,MAAM,uBAAuB,IAAI,oCAAoC;AAErE,MAAM,sBAAsB,IAAI,WAAW;AAE3C,MAAM,oBAAoB,IACxB,4EACF;AAEA,MAAM,sBAAsB,IAAI,mCAAmC;AAEnE,MAAM,eAAe;CAAC;CAAM;CAAM;CAAM;CAAM;CAAM;AAAI;AAIxD,MAAM,qBAAqB;AAE3B,MAAM,gBAAgB,QAAQ;CAC5B,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAM;CACzE,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAK;CACxE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAqB,UAAU;CAAM;CACzE,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAsB,UAAU;CAAK;CAC3E,MAAM;EAAE,MAAM;EAAW,QAAQ;EAAc,UAAU;CAAK;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAmB,UAAU;CAAK;AACpE,CAAC"}
|
package/dist/recipes/trail.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region src/recipes/trail.d.ts
|
|
2
2
|
declare const trailStates: readonly ["done", "failed", "current", "pending"];
|
|
3
3
|
type TrailState = (typeof trailStates)[number];
|
|
4
|
-
declare const defaultTrailState = "pending";
|
|
5
4
|
declare const trailFlows: readonly ["row", "column"];
|
|
6
5
|
type TrailFlow = (typeof trailFlows)[number];
|
|
7
6
|
declare const defaultTrailFlow = "row";
|
|
@@ -11,17 +10,68 @@ declare const trailRecipe: (props?: ({
|
|
|
11
10
|
declare const trailStepRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
12
11
|
declare const trailCaptionRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
12
|
declare const trailBadgeRecipe: (props?: ({
|
|
14
|
-
state?: "
|
|
13
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
15
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
15
|
declare const trailSpinRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
16
|
declare const trailConnectorRecipe: (props?: ({
|
|
18
17
|
flow?: "row" | "column" | null | undefined;
|
|
19
|
-
state?: "
|
|
18
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
20
19
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
20
|
declare const trailLabelRecipe: (props?: ({
|
|
22
|
-
state?: "
|
|
21
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
23
22
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
23
|
declare const trailHintRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
24
|
+
declare const trailAnatomy: {
|
|
25
|
+
readonly badge: {
|
|
26
|
+
readonly part: "badge";
|
|
27
|
+
readonly recipe: (props?: ({
|
|
28
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
29
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
30
|
+
readonly required: true;
|
|
31
|
+
};
|
|
32
|
+
readonly caption: {
|
|
33
|
+
readonly part: "caption";
|
|
34
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
35
|
+
readonly required: true;
|
|
36
|
+
};
|
|
37
|
+
readonly connector: {
|
|
38
|
+
readonly part: "connector";
|
|
39
|
+
readonly recipe: (props?: ({
|
|
40
|
+
flow?: "row" | "column" | null | undefined;
|
|
41
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
42
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
43
|
+
readonly required: false;
|
|
44
|
+
};
|
|
45
|
+
readonly hint: {
|
|
46
|
+
readonly part: "hint";
|
|
47
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
48
|
+
readonly required: false;
|
|
49
|
+
};
|
|
50
|
+
readonly label: {
|
|
51
|
+
readonly part: "label";
|
|
52
|
+
readonly recipe: (props?: ({
|
|
53
|
+
state?: "pending" | "done" | "failed" | "current" | null | undefined;
|
|
54
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
55
|
+
readonly required: true;
|
|
56
|
+
};
|
|
57
|
+
readonly meta: {
|
|
58
|
+
readonly part: "meta";
|
|
59
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
60
|
+
readonly required: false;
|
|
61
|
+
};
|
|
62
|
+
readonly root: {
|
|
63
|
+
readonly part: "trail";
|
|
64
|
+
readonly recipe: (props?: ({
|
|
65
|
+
flow?: "row" | "column" | null | undefined;
|
|
66
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
67
|
+
readonly required: true;
|
|
68
|
+
};
|
|
69
|
+
readonly step: {
|
|
70
|
+
readonly part: "step";
|
|
71
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
72
|
+
readonly required: false;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
25
75
|
//#endregion
|
|
26
|
-
export { type TrailFlow, type TrailState, defaultTrailFlow,
|
|
76
|
+
export { type TrailFlow, type TrailState, defaultTrailFlow, trailAnatomy, trailBadgeRecipe, trailCaptionRecipe, trailConnectorRecipe, trailFlows, trailHintRecipe, trailLabelRecipe, trailRecipe, trailSpinRecipe, trailStates, trailStepRecipe };
|
|
27
77
|
//# sourceMappingURL=trail.d.ts.map
|
package/dist/recipes/trail.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { cva } from "class-variance-authority";
|
|
2
3
|
//#region src/recipes/trail.ts
|
|
3
4
|
const trailStates = [
|
|
@@ -6,7 +7,6 @@ const trailStates = [
|
|
|
6
7
|
"current",
|
|
7
8
|
"pending"
|
|
8
9
|
];
|
|
9
|
-
const defaultTrailState = "pending";
|
|
10
10
|
const trailFlows = ["row", "column"];
|
|
11
11
|
const defaultTrailFlow = "row";
|
|
12
12
|
const trailRecipe = cva("rounded-tf-block bg-tf-sunken p-6 font-tf-body", {
|
|
@@ -23,7 +23,7 @@ const trailBadgeRecipe = cva([
|
|
|
23
23
|
"tf-icons",
|
|
24
24
|
"[&_svg]:size-tf-icon-2xs [&_svg]:shrink-0"
|
|
25
25
|
], {
|
|
26
|
-
defaultVariants: { state:
|
|
26
|
+
defaultVariants: { state: "pending" },
|
|
27
27
|
variants: { state: {
|
|
28
28
|
current: "bg-tf-blend text-tf-on-accent blend-tf-accent",
|
|
29
29
|
done: "bg-tf-blend text-tf-on-semantic blend-tf-success",
|
|
@@ -35,7 +35,7 @@ const trailSpinRecipe = cva("[&_svg]:animate-spin motion-reduce:[&_svg]:animate-
|
|
|
35
35
|
const trailConnectorRecipe = cva("", {
|
|
36
36
|
defaultVariants: {
|
|
37
37
|
flow: "row",
|
|
38
|
-
state:
|
|
38
|
+
state: "pending"
|
|
39
39
|
},
|
|
40
40
|
variants: {
|
|
41
41
|
flow: {
|
|
@@ -51,7 +51,7 @@ const trailConnectorRecipe = cva("", {
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const trailLabelRecipe = cva("text-tf-caption font-medium", {
|
|
54
|
-
defaultVariants: { state:
|
|
54
|
+
defaultVariants: { state: "pending" },
|
|
55
55
|
variants: { state: {
|
|
56
56
|
current: "text-tf-accent-hi",
|
|
57
57
|
done: "text-tf-fg",
|
|
@@ -60,7 +60,49 @@ const trailLabelRecipe = cva("text-tf-caption font-medium", {
|
|
|
60
60
|
} }
|
|
61
61
|
});
|
|
62
62
|
const trailHintRecipe = cva("text-tf-caption-sm text-tf-muted");
|
|
63
|
+
const trailAnatomy = anatomy({
|
|
64
|
+
badge: {
|
|
65
|
+
part: "badge",
|
|
66
|
+
recipe: trailBadgeRecipe,
|
|
67
|
+
required: true
|
|
68
|
+
},
|
|
69
|
+
caption: {
|
|
70
|
+
part: "caption",
|
|
71
|
+
recipe: trailCaptionRecipe,
|
|
72
|
+
required: true
|
|
73
|
+
},
|
|
74
|
+
connector: {
|
|
75
|
+
part: "connector",
|
|
76
|
+
recipe: trailConnectorRecipe,
|
|
77
|
+
required: false
|
|
78
|
+
},
|
|
79
|
+
hint: {
|
|
80
|
+
part: "hint",
|
|
81
|
+
recipe: trailHintRecipe,
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
label: {
|
|
85
|
+
part: "label",
|
|
86
|
+
recipe: trailLabelRecipe,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
89
|
+
meta: {
|
|
90
|
+
part: "meta",
|
|
91
|
+
recipe: trailHintRecipe,
|
|
92
|
+
required: false
|
|
93
|
+
},
|
|
94
|
+
root: {
|
|
95
|
+
part: "trail",
|
|
96
|
+
recipe: trailRecipe,
|
|
97
|
+
required: true
|
|
98
|
+
},
|
|
99
|
+
step: {
|
|
100
|
+
part: "step",
|
|
101
|
+
recipe: trailStepRecipe,
|
|
102
|
+
required: false
|
|
103
|
+
}
|
|
104
|
+
});
|
|
63
105
|
//#endregion
|
|
64
|
-
export { defaultTrailFlow,
|
|
106
|
+
export { defaultTrailFlow, trailAnatomy, trailBadgeRecipe, trailCaptionRecipe, trailConnectorRecipe, trailFlows, trailHintRecipe, trailLabelRecipe, trailRecipe, trailSpinRecipe, trailStates, trailStepRecipe };
|
|
65
107
|
|
|
66
108
|
//# sourceMappingURL=trail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trail.js","names":[],"sources":["../../src/recipes/trail.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst trailStates = ['done', 'failed', 'current', 'pending'] as const\n\ntype TrailState = (typeof trailStates)[number]\n\nconst
|
|
1
|
+
{"version":3,"file":"trail.js","names":[],"sources":["../../src/recipes/trail.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nconst trailStates = ['done', 'failed', 'current', 'pending'] as const\n\ntype TrailState = (typeof trailStates)[number]\n\nconst trailFlows = ['row', 'column'] as const\n\ntype TrailFlow = (typeof trailFlows)[number]\n\nconst defaultTrailFlow = 'row' satisfies TrailFlow\n\nconst trailRecipe = cva('rounded-tf-block bg-tf-sunken p-6 font-tf-body', {\n defaultVariants: { flow: defaultTrailFlow },\n variants: {\n flow: {\n column: 'grid grid-cols-1 gap-3',\n row: 'grid gap-y-2',\n } satisfies Record<TrailFlow, string>,\n },\n})\n\nconst trailStepRecipe = cva('relative flex flex-row items-start gap-2')\n\nconst trailCaptionRecipe = cva(\n '[grid-column:span_2] flex min-w-0 flex-1 flex-col gap-0 pr-3 last:[grid-column:span_1] last:pr-0',\n)\n\nconst trailBadgeRecipe = cva(\n [\n 'relative isolate flex size-6.5 flex-none items-center justify-center rounded-tf-pill',\n 'tf-icons',\n '[&_svg]:size-tf-icon-2xs [&_svg]:shrink-0',\n ],\n {\n defaultVariants: { state: 'pending' },\n variants: {\n state: {\n current: 'bg-tf-blend text-tf-on-accent blend-tf-accent',\n done: 'bg-tf-blend text-tf-on-semantic blend-tf-success',\n failed: 'bg-tf-blend text-tf-on-semantic blend-tf-danger',\n pending: 'bg-tf-panel text-tf-muted opacity-55',\n } satisfies Record<TrailState, string>,\n },\n },\n)\n\nconst trailSpinRecipe = cva('[&_svg]:animate-spin motion-reduce:[&_svg]:animate-none')\n\nconst trailConnectorRecipe = cva('', {\n defaultVariants: { flow: defaultTrailFlow, state: 'pending' },\n variants: {\n flow: {\n column: 'absolute top-6.5 -bottom-3 left-[calc(1.625rem/2-1px)] w-0.5',\n row: 'mx-1 mt-[calc(1.625rem/2)] h-0.5 min-w-6',\n } satisfies Record<TrailFlow, string>,\n state: {\n current: 'bg-tf-line',\n done: 'bg-tf-success-hi',\n failed: 'bg-tf-danger-hi',\n pending: 'bg-tf-line',\n } satisfies Record<TrailState, string>,\n },\n})\n\nconst trailLabelRecipe = cva('text-tf-caption font-medium', {\n defaultVariants: { state: 'pending' },\n variants: {\n state: {\n current: 'text-tf-accent-hi',\n done: 'text-tf-fg',\n failed: 'text-tf-danger-hi',\n pending: 'text-tf-muted',\n } satisfies Record<TrailState, string>,\n },\n})\n\nconst trailHintRecipe = cva('text-tf-caption-sm text-tf-muted')\n\nconst trailAnatomy = anatomy({\n badge: { part: 'badge', recipe: trailBadgeRecipe, required: true },\n caption: { part: 'caption', recipe: trailCaptionRecipe, required: true },\n connector: { part: 'connector', recipe: trailConnectorRecipe, required: false },\n hint: { part: 'hint', recipe: trailHintRecipe, required: false },\n label: { part: 'label', recipe: trailLabelRecipe, required: true },\n meta: { part: 'meta', recipe: trailHintRecipe, required: false },\n root: { part: 'trail', recipe: trailRecipe, required: true },\n step: { part: 'step', recipe: trailStepRecipe, required: false },\n})\n\nexport {\n type TrailFlow,\n type TrailState,\n defaultTrailFlow,\n trailAnatomy,\n trailBadgeRecipe,\n trailCaptionRecipe,\n trailConnectorRecipe,\n trailFlows,\n trailHintRecipe,\n trailLabelRecipe,\n trailRecipe,\n trailSpinRecipe,\n trailStates,\n trailStepRecipe,\n}\n"],"mappings":";;;AAIA,MAAM,cAAc;CAAC;CAAQ;CAAU;CAAW;AAAS;AAI3D,MAAM,aAAa,CAAC,OAAO,QAAQ;AAInC,MAAM,mBAAmB;AAEzB,MAAM,cAAc,IAAI,kDAAkD;CACxE,iBAAiB,EAAE,MAAA,MAAuB;CAC1C,UAAU,EACR,MAAM;EACJ,QAAQ;EACR,KAAK;CACP,EACF;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,0CAA0C;AAEtE,MAAM,qBAAqB,IACzB,kGACF;AAEA,MAAM,mBAAmB,IACvB;CACE;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,OAAO,UAAU;CACpC,UAAU,EACR,OAAO;EACL,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;CACX,EACF;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,yDAAyD;AAErF,MAAM,uBAAuB,IAAI,IAAI;CACnC,iBAAiB;EAAE,MAAA;EAAwB,OAAO;CAAU;CAC5D,UAAU;EACR,MAAM;GACJ,QAAQ;GACR,KAAK;EACP;EACA,OAAO;GACL,SAAS;GACT,MAAM;GACN,QAAQ;GACR,SAAS;EACX;CACF;AACF,CAAC;AAED,MAAM,mBAAmB,IAAI,+BAA+B;CAC1D,iBAAiB,EAAE,OAAO,UAAU;CACpC,UAAU,EACR,OAAO;EACL,SAAS;EACT,MAAM;EACN,QAAQ;EACR,SAAS;CACX,EACF;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,kCAAkC;AAE9D,MAAM,eAAe,QAAQ;CAC3B,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAkB,UAAU;CAAK;CACjE,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAoB,UAAU;CAAK;CACvE,WAAW;EAAE,MAAM;EAAa,QAAQ;EAAsB,UAAU;CAAM;CAC9E,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAM;CAC/D,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAkB,UAAU;CAAK;CACjE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAM;CAC/D,MAAM;EAAE,MAAM;EAAS,QAAQ;EAAa,UAAU;CAAK;CAC3D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAM;AACjE,CAAC"}
|
|
@@ -6,6 +6,28 @@ declare const userIdentityRecipe: (props?: import("class-variance-authority/type
|
|
|
6
6
|
declare const userNameRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
7
7
|
declare const userRoleRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
8
|
declare const userChevronRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
|
+
declare const userMenuAnatomy: {
|
|
10
|
+
readonly identity: {
|
|
11
|
+
readonly part: "identity";
|
|
12
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
13
|
+
readonly required: true;
|
|
14
|
+
};
|
|
15
|
+
readonly name: {
|
|
16
|
+
readonly part: "name";
|
|
17
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
18
|
+
readonly required: true;
|
|
19
|
+
};
|
|
20
|
+
readonly root: {
|
|
21
|
+
readonly part: "account";
|
|
22
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
23
|
+
readonly required: true;
|
|
24
|
+
};
|
|
25
|
+
readonly subtitle: {
|
|
26
|
+
readonly part: "subtitle";
|
|
27
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
28
|
+
readonly required: false;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
9
31
|
//#endregion
|
|
10
|
-
export { userAvatarRecipe, userChevronRecipe, userIdentityRecipe, userNameRecipe, userPortraitRecipe, userRoleRecipe, userTriggerRecipe };
|
|
32
|
+
export { userAvatarRecipe, userChevronRecipe, userIdentityRecipe, userMenuAnatomy, userNameRecipe, userPortraitRecipe, userRoleRecipe, userTriggerRecipe };
|
|
11
33
|
//# sourceMappingURL=userMenu.d.ts.map
|
package/dist/recipes/userMenu.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress } from "../parts/control.js";
|
|
2
3
|
import { railCollapse, railMorph } from "./motion.js";
|
|
3
4
|
import { cva } from "class-variance-authority";
|
|
@@ -32,7 +33,29 @@ const userChevronRecipe = cva([
|
|
|
32
33
|
"[--tf-travel:opacity_var(--tf-timing-glide)]",
|
|
33
34
|
railMorph
|
|
34
35
|
]);
|
|
36
|
+
const userMenuAnatomy = anatomy({
|
|
37
|
+
identity: {
|
|
38
|
+
part: "identity",
|
|
39
|
+
recipe: userIdentityRecipe,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
name: {
|
|
43
|
+
part: "name",
|
|
44
|
+
recipe: userNameRecipe,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
root: {
|
|
48
|
+
part: "account",
|
|
49
|
+
recipe: userTriggerRecipe,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
subtitle: {
|
|
53
|
+
part: "subtitle",
|
|
54
|
+
recipe: userRoleRecipe,
|
|
55
|
+
required: false
|
|
56
|
+
}
|
|
57
|
+
});
|
|
35
58
|
//#endregion
|
|
36
|
-
export { userAvatarRecipe, userChevronRecipe, userIdentityRecipe, userNameRecipe, userPortraitRecipe, userRoleRecipe, userTriggerRecipe };
|
|
59
|
+
export { userAvatarRecipe, userChevronRecipe, userIdentityRecipe, userMenuAnatomy, userNameRecipe, userPortraitRecipe, userRoleRecipe, userTriggerRecipe };
|
|
37
60
|
|
|
38
61
|
//# sourceMappingURL=userMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userMenu.js","names":[],"sources":["../../src/recipes/userMenu.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress } from '#parts/control'\n\nimport { railCollapse, railMorph } from './motion'\n\nconst userTriggerRecipe = cva([\n 'flex w-full items-center justify-center gap-3 rounded-tf-control p-3 text-left',\n 'text-tf-fg data-rail:gap-0 data-rail:py-2',\n 'data-rail:px-2',\n 'interactive:hovered:bg-tf-panel',\n 'hovered:**:data-[scope=avatar]:tf-edge-lit',\n 'focused:**:data-[scope=avatar]:tf-edge-lit',\n 'outline-hidden',\n 'focused:outline-2 focused:outline-offset-2 focused:outline-tf-accent-hi focused:outline-solid',\n `cursor-pointer ${railMorph}`,\n '[&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ...controlPress,\n ...controlInert,\n])\n\nconst userAvatarRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center',\n 'rounded-tf-pill bg-tf-panel-hi text-tf-caption font-medium text-tf-fg',\n 'tf-edge-sweep tf-swept blend-tf-accent',\n 'tf-transition motion-reduce:transition-none',\n])\n\nconst userPortraitRecipe = cva('size-full rounded-tf-pill object-cover')\n\nconst userIdentityRecipe = cva(`flex flex-col gap-0 ${railCollapse}`)\n\nconst userNameRecipe = cva('truncate text-tf-body-sm font-medium')\n\nconst userRoleRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst userChevronRecipe = cva([\n 'flex-none text-tf-muted',\n 'in-data-rail:size-0! in-data-rail:opacity-0',\n '[--tf-travel:opacity_var(--tf-timing-glide)]',\n railMorph,\n])\n\nexport {\n userAvatarRecipe,\n userPortraitRecipe,\n userChevronRecipe,\n userIdentityRecipe,\n userNameRecipe,\n userRoleRecipe,\n userTriggerRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"userMenu.js","names":[],"sources":["../../src/recipes/userMenu.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress } from '#parts/control'\n\nimport { railCollapse, railMorph } from './motion'\n\nconst userTriggerRecipe = cva([\n 'flex w-full items-center justify-center gap-3 rounded-tf-control p-3 text-left',\n 'text-tf-fg data-rail:gap-0 data-rail:py-2',\n 'data-rail:px-2',\n 'interactive:hovered:bg-tf-panel',\n 'hovered:**:data-[scope=avatar]:tf-edge-lit',\n 'focused:**:data-[scope=avatar]:tf-edge-lit',\n 'outline-hidden',\n 'focused:outline-2 focused:outline-offset-2 focused:outline-tf-accent-hi focused:outline-solid',\n `cursor-pointer ${railMorph}`,\n '[&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ...controlPress,\n ...controlInert,\n])\n\nconst userAvatarRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center',\n 'rounded-tf-pill bg-tf-panel-hi text-tf-caption font-medium text-tf-fg',\n 'tf-edge-sweep tf-swept blend-tf-accent',\n 'tf-transition motion-reduce:transition-none',\n])\n\nconst userPortraitRecipe = cva('size-full rounded-tf-pill object-cover')\n\nconst userIdentityRecipe = cva(`flex flex-col gap-0 ${railCollapse}`)\n\nconst userNameRecipe = cva('truncate text-tf-body-sm font-medium')\n\nconst userRoleRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst userChevronRecipe = cva([\n 'flex-none text-tf-muted',\n 'in-data-rail:size-0! in-data-rail:opacity-0',\n '[--tf-travel:opacity_var(--tf-timing-glide)]',\n railMorph,\n])\n\nconst userMenuAnatomy = anatomy({\n identity: { part: 'identity', recipe: userIdentityRecipe, required: true },\n name: { part: 'name', recipe: userNameRecipe, required: true },\n root: { part: 'account', recipe: userTriggerRecipe, required: true },\n subtitle: { part: 'subtitle', recipe: userRoleRecipe, required: false },\n})\n\nexport {\n userAvatarRecipe,\n userMenuAnatomy,\n userPortraitRecipe,\n userChevronRecipe,\n userIdentityRecipe,\n userNameRecipe,\n userRoleRecipe,\n userTriggerRecipe,\n}\n"],"mappings":";;;;;AAOA,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,kBAAkB;CAClB;CACA,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,mBAAmB,IAAI;CAC3B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,wCAAwC;AAEvE,MAAM,qBAAqB,IAAI,uBAAuB,cAAc;AAEpE,MAAM,iBAAiB,IAAI,sCAAsC;AAEjE,MAAM,iBAAiB,IAAI,2CAA2C;AAEtE,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,kBAAkB,QAAQ;CAC9B,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAoB,UAAU;CAAK;CACzE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAK;CAC7D,MAAM;EAAE,MAAM;EAAW,QAAQ;EAAmB,UAAU;CAAK;CACnE,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAgB,UAAU;CAAM;AACxE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techfides/ui-library-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Framework-agnostic design core for the TechFides UI library: Tailwind design tokens and component variant recipes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cva",
|
|
@@ -55,8 +55,9 @@
|
|
|
55
55
|
"node": ">=24"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
|
-
"build": "tsdown",
|
|
58
|
+
"build": "node scripts/generate-cn.ts && tsdown",
|
|
59
59
|
"dev": "tsdown --watch",
|
|
60
|
+
"generate": "node scripts/generate-cn.ts",
|
|
60
61
|
"lint": "eslint . --max-warnings=0",
|
|
61
62
|
"typecheck": "tsc --noEmit"
|
|
62
63
|
},
|