@techfides/ui-library-design 0.3.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anatomies.d.ts +1586 -0
- package/dist/anatomies.js +107 -0
- package/dist/anatomies.js.map +1 -0
- package/dist/anatomy.d.ts +13 -0
- package/dist/anatomy.js +6 -0
- package/dist/anatomy.js.map +1 -0
- package/dist/control.d.ts +1 -2
- package/dist/control.js +1 -2
- package/dist/control.js.map +1 -1
- package/dist/index.d.ts +55 -58
- package/dist/index.js +59 -62
- 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 +72 -3
- package/dist/recipes/stat.js +73 -3
- package/dist/recipes/stat.js.map +1 -1
- package/dist/recipes/switch.d.ts +10 -1
- package/dist/recipes/switch.js +9 -3
- package/dist/recipes/switch.js.map +1 -1
- package/dist/recipes/table.d.ts +63 -3
- package/dist/recipes/table.js +56 -2
- package/dist/recipes/table.js.map +1 -1
- package/dist/recipes/tail.d.ts +40 -5
- package/dist/recipes/tail.js +37 -5
- package/dist/recipes/tail.js.map +1 -1
- package/dist/recipes/text.d.ts +16 -3
- package/dist/recipes/text.js +8 -3
- package/dist/recipes/text.js.map +1 -1
- package/dist/recipes/textarea.d.ts +46 -1
- package/dist/recipes/textarea.js +41 -1
- package/dist/recipes/textarea.js.map +1 -1
- package/dist/recipes/tile.d.ts +23 -1
- package/dist/recipes/tile.js +19 -1
- package/dist/recipes/tile.js.map +1 -1
- package/dist/recipes/tooltip.d.ts +8 -1
- package/dist/recipes/tooltip.js +7 -1
- package/dist/recipes/tooltip.js.map +1 -1
- package/dist/recipes/topBar.d.ts +43 -1
- package/dist/recipes/topBar.js +44 -1
- package/dist/recipes/topBar.js.map +1 -1
- package/dist/recipes/trail.d.ts +55 -5
- package/dist/recipes/trail.js +47 -5
- package/dist/recipes/trail.js.map +1 -1
- package/dist/recipes/userMenu.d.ts +23 -1
- package/dist/recipes/userMenu.js +24 -1
- package/dist/recipes/userMenu.js.map +1 -1
- package/package.json +1 -2
- package/dist/charts/animation.js +0 -14
- package/dist/charts/animation.js.map +0 -1
- package/dist/charts/bars.d.ts +0 -22
- package/dist/charts/bars.js +0 -61
- package/dist/charts/bars.js.map +0 -1
- package/dist/charts/groupedBars.d.ts +0 -20
- package/dist/charts/groupedBars.js +0 -82
- package/dist/charts/groupedBars.js.map +0 -1
- package/dist/charts/paint.js +0 -19
- package/dist/charts/paint.js.map +0 -1
- package/dist/charts/spark.d.ts +0 -17
- package/dist/charts/spark.js +0 -159
- package/dist/charts/spark.js.map +0 -1
- package/dist/charts/tooltip.js +0 -41
- package/dist/charts/tooltip.js.map +0 -1
- package/dist/czech.d.ts +0 -6
- package/dist/czech.js +0 -100
- package/dist/czech.js.map +0 -1
- package/dist/tally.d.ts +0 -17
- package/dist/tally.js +0 -75
- package/dist/tally.js.map +0 -1
- package/dist/words.d.ts +0 -116
- package/dist/words.js +0 -96
- package/dist/words.js.map +0 -1
package/dist/recipes/queue.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
|
+
import { tableRankRecipe } from "./table.js";
|
|
1
3
|
import { cva } from "class-variance-authority";
|
|
2
4
|
//#region src/recipes/queue.ts
|
|
3
5
|
const queueRecipe = cva("@container flex w-full flex-col gap-1 rounded-tf-block bg-tf-sunken p-3");
|
|
@@ -21,7 +23,39 @@ const queueAgeLabelRecipe = cva("text-tf-caption-sm font-normal tabular-nums", {
|
|
|
21
23
|
const queueAgeTrackRecipe = cva("block h-1 w-full overflow-hidden rounded-tf-pill bg-tf-sunken-hi");
|
|
22
24
|
const queueAgeFillRecipe = cva("block h-full bg-tf-blend");
|
|
23
25
|
const queueDotRecipe = cva("size-2 flex-none rounded-tf-pill bg-tf-blend");
|
|
26
|
+
const queueAnatomy = anatomy({
|
|
27
|
+
age: {
|
|
28
|
+
part: "age",
|
|
29
|
+
recipe: queueAgeRecipe,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
dot: {
|
|
33
|
+
part: "dot",
|
|
34
|
+
recipe: queueDotRecipe,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
hint: {
|
|
38
|
+
part: "hint",
|
|
39
|
+
recipe: queueHintRecipe,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
lead: {
|
|
43
|
+
part: "lead",
|
|
44
|
+
recipe: queueLeadRecipe,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
rank: {
|
|
48
|
+
part: "rank",
|
|
49
|
+
recipe: tableRankRecipe,
|
|
50
|
+
required: false
|
|
51
|
+
},
|
|
52
|
+
root: {
|
|
53
|
+
part: "queue",
|
|
54
|
+
recipe: queueRecipe,
|
|
55
|
+
required: true
|
|
56
|
+
}
|
|
57
|
+
});
|
|
24
58
|
//#endregion
|
|
25
|
-
export { queueAgeFillRecipe, queueAgeLabelRecipe, queueAgeRecipe, queueAgeTrackRecipe, queueDotRecipe, queueHintRecipe, queueLeadRecipe, queueRecipe, queueRowRecipe, queueTextRecipe };
|
|
59
|
+
export { queueAgeFillRecipe, queueAgeLabelRecipe, queueAgeRecipe, queueAgeTrackRecipe, queueAnatomy, queueDotRecipe, queueHintRecipe, queueLeadRecipe, queueRecipe, queueRowRecipe, queueTextRecipe };
|
|
26
60
|
|
|
27
61
|
//# sourceMappingURL=queue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","names":[],"sources":["../../src/recipes/queue.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst queueRecipe = cva('@container flex w-full flex-col gap-1 rounded-tf-block bg-tf-sunken p-3')\n\nconst queueRowRecipe = cva([\n 'flex items-center gap-3 rounded-tf-control px-4 py-3',\n 'tf-transition',\n 'data-highlighted:bg-tf-control',\n 'data-selected:tf-tinted data-selected:blend-tf-accent',\n])\n\nconst queueTextRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst queueLeadRecipe = cva('truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst queueHintRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst queueAgeRecipe = cva('flex w-16 flex-none flex-col items-end gap-1 @tf-panel:w-22')\n\nconst queueAgeLabelRecipe = cva('text-tf-caption-sm font-normal tabular-nums', {\n defaultVariants: { toned: false },\n variants: {\n toned: {\n false: 'text-tf-fg',\n true: '',\n },\n },\n})\n\nconst queueAgeTrackRecipe = cva('block h-1 w-full overflow-hidden rounded-tf-pill bg-tf-sunken-hi')\n\nconst queueAgeFillRecipe = cva('block h-full bg-tf-blend')\n\nconst queueDotRecipe = cva('size-2 flex-none rounded-tf-pill bg-tf-blend')\n\nexport {\n queueAgeFillRecipe,\n queueAgeLabelRecipe,\n queueAgeRecipe,\n queueAgeTrackRecipe,\n queueDotRecipe,\n queueHintRecipe,\n queueLeadRecipe,\n queueRecipe,\n queueRowRecipe,\n queueTextRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"queue.js","names":[],"sources":["../../src/recipes/queue.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { tableRankRecipe } from './table'\n\nconst queueRecipe = cva('@container flex w-full flex-col gap-1 rounded-tf-block bg-tf-sunken p-3')\n\nconst queueRowRecipe = cva([\n 'flex items-center gap-3 rounded-tf-control px-4 py-3',\n 'tf-transition',\n 'data-highlighted:bg-tf-control',\n 'data-selected:tf-tinted data-selected:blend-tf-accent',\n])\n\nconst queueTextRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst queueLeadRecipe = cva('truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst queueHintRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst queueAgeRecipe = cva('flex w-16 flex-none flex-col items-end gap-1 @tf-panel:w-22')\n\nconst queueAgeLabelRecipe = cva('text-tf-caption-sm font-normal tabular-nums', {\n defaultVariants: { toned: false },\n variants: {\n toned: {\n false: 'text-tf-fg',\n true: '',\n },\n },\n})\n\nconst queueAgeTrackRecipe = cva('block h-1 w-full overflow-hidden rounded-tf-pill bg-tf-sunken-hi')\n\nconst queueAgeFillRecipe = cva('block h-full bg-tf-blend')\n\nconst queueDotRecipe = cva('size-2 flex-none rounded-tf-pill bg-tf-blend')\n\nconst queueAnatomy = anatomy({\n age: { part: 'age', recipe: queueAgeRecipe, required: true },\n dot: { part: 'dot', recipe: queueDotRecipe, required: false },\n hint: { part: 'hint', recipe: queueHintRecipe, required: true },\n lead: { part: 'lead', recipe: queueLeadRecipe, required: true },\n rank: { part: 'rank', recipe: tableRankRecipe, required: false },\n root: { part: 'queue', recipe: queueRecipe, required: true },\n})\n\nexport {\n queueAgeFillRecipe,\n queueAgeLabelRecipe,\n queueAgeRecipe,\n queueAgeTrackRecipe,\n queueAnatomy,\n queueDotRecipe,\n queueHintRecipe,\n queueLeadRecipe,\n queueRecipe,\n queueRowRecipe,\n queueTextRecipe,\n}\n"],"mappings":";;;;AAMA,MAAM,cAAc,IAAI,yEAAyE;AAEjG,MAAM,iBAAiB,IAAI;CACzB;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,oCAAoC;AAEhE,MAAM,kBAAkB,IAAI,iDAAiD;AAE7E,MAAM,kBAAkB,IAAI,2CAA2C;AAEvE,MAAM,iBAAiB,IAAI,6DAA6D;AAExF,MAAM,sBAAsB,IAAI,+CAA+C;CAC7E,iBAAiB,EAAE,OAAO,MAAM;CAChC,UAAU,EACR,OAAO;EACL,OAAO;EACP,MAAM;CACR,EACF;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI,kEAAkE;AAElG,MAAM,qBAAqB,IAAI,0BAA0B;AAEzD,MAAM,iBAAiB,IAAI,8CAA8C;AAEzE,MAAM,eAAe,QAAQ;CAC3B,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAgB,UAAU;CAAK;CAC3D,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAgB,UAAU;CAAM;CAC5D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAK;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAK;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAM;CAC/D,MAAM;EAAE,MAAM;EAAS,QAAQ;EAAa,UAAU;CAAK;AAC7D,CAAC"}
|
|
@@ -22,6 +22,23 @@ declare const radioTitleRecipe: (props?: import("class-variance-authority/types"
|
|
|
22
22
|
declare const radioHintRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
23
23
|
declare const radioAsideRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
24
24
|
declare const radioErrorRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
25
|
+
declare const radioGroupAnatomy: {
|
|
26
|
+
readonly dot: {
|
|
27
|
+
readonly part: "dot";
|
|
28
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
29
|
+
readonly required: true;
|
|
30
|
+
};
|
|
31
|
+
readonly requiredIndicator: {
|
|
32
|
+
readonly part: "required-indicator";
|
|
33
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
34
|
+
readonly required: false;
|
|
35
|
+
};
|
|
36
|
+
readonly root: {
|
|
37
|
+
readonly part: "radio-group";
|
|
38
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
39
|
+
readonly required: true;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
25
42
|
//#endregion
|
|
26
|
-
export { type RadioAccent, defaultRadioAccent, radioAccents, radioAsideRecipe, radioControlRecipe, radioDotRecipe, radioErrorRecipe, radioGroupLabelRecipe, radioGroupRecipe, radioHintRecipe, radioIndicatorRecipe, radioLabelRecipe, radioLeadRecipe, radioRecipe, radioTitleRecipe };
|
|
43
|
+
export { type RadioAccent, defaultRadioAccent, radioAccents, radioAsideRecipe, radioControlRecipe, radioDotRecipe, radioErrorRecipe, radioGroupAnatomy, radioGroupLabelRecipe, radioGroupRecipe, radioHintRecipe, radioIndicatorRecipe, radioLabelRecipe, radioLeadRecipe, radioRecipe, radioTitleRecipe };
|
|
27
44
|
//# sourceMappingURL=radioGroup.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { toneBlend } from "../tone.js";
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
3
2
|
import { defaultTone, tones } from "../parts/tone.js";
|
|
3
|
+
import { toneBlend } from "../tone.js";
|
|
4
|
+
import { defaultMarkPlate } from "../mark.js";
|
|
4
5
|
import { markBox, markGroup, markPlate, markPress, markRow, markStack, markTitle } from "../parts/mark.js";
|
|
5
6
|
import { eyebrowQuiet } from "../parts/eyebrow.js";
|
|
6
7
|
import { cva } from "class-variance-authority";
|
|
@@ -62,7 +63,24 @@ const radioTitleRecipe = cva(markTitle);
|
|
|
62
63
|
const radioHintRecipe = cva("text-tf-caption font-medium text-tf-muted");
|
|
63
64
|
const radioAsideRecipe = cva("shrink-0 text-tf-body-sm font-medium text-tf-muted tabular-nums");
|
|
64
65
|
const radioErrorRecipe = cva("px-3 pt-1 text-tf-caption font-medium text-tf-danger-hi tf-arrives");
|
|
66
|
+
const radioGroupAnatomy = anatomy({
|
|
67
|
+
dot: {
|
|
68
|
+
part: "dot",
|
|
69
|
+
recipe: radioDotRecipe,
|
|
70
|
+
required: true
|
|
71
|
+
},
|
|
72
|
+
requiredIndicator: {
|
|
73
|
+
part: "required-indicator",
|
|
74
|
+
recipe: radioGroupLabelRecipe,
|
|
75
|
+
required: false
|
|
76
|
+
},
|
|
77
|
+
root: {
|
|
78
|
+
part: "radio-group",
|
|
79
|
+
recipe: radioGroupRecipe,
|
|
80
|
+
required: true
|
|
81
|
+
}
|
|
82
|
+
});
|
|
65
83
|
//#endregion
|
|
66
|
-
export { defaultRadioAccent, radioAccents, radioAsideRecipe, radioControlRecipe, radioDotRecipe, radioErrorRecipe, radioGroupLabelRecipe, radioGroupRecipe, radioHintRecipe, radioIndicatorRecipe, radioLabelRecipe, radioLeadRecipe, radioRecipe, radioTitleRecipe };
|
|
84
|
+
export { defaultRadioAccent, radioAccents, radioAsideRecipe, radioControlRecipe, radioDotRecipe, radioErrorRecipe, radioGroupAnatomy, radioGroupLabelRecipe, radioGroupRecipe, radioHintRecipe, radioIndicatorRecipe, radioLabelRecipe, radioLeadRecipe, radioRecipe, radioTitleRecipe };
|
|
67
85
|
|
|
68
86
|
//# sourceMappingURL=radioGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radioGroup.js","names":[],"sources":["../../src/recipes/radioGroup.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport type { MarkPlate } from '#mark'\nimport { defaultMarkPlate } from '#mark'\nimport { eyebrowQuiet } from '#parts/eyebrow'\nimport {\n markBox,\n markGroup,\n markPlate,\n markPress,\n markRow,\n markStack,\n markTitle,\n} from '#parts/mark'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\nconst radioAccents = tones\n\ntype RadioAccent = Tone\n\nconst defaultRadioAccent = defaultTone\n\nconst radioGroupRecipe = cva([markGroup, 'font-tf-body'])\n\nconst radioGroupLabelRecipe = cva([\n `text-tf-caption-sm ${eyebrowQuiet}`,\n 'px-3 pb-1 font-medium',\n '**:data-[part=required-indicator]:text-tf-danger-hi',\n])\n\nconst radioRecipe = cva([...markRow, 'justify-between gap-6'], {\n defaultVariants: { plate: defaultMarkPlate },\n variants: {\n plate: {\n bare: markPlate.bare,\n full: `${markPlate.full} not-data-[state=checked]:not-data-readonly:interactive:hovered:bg-tf-panel-hi`,\n snug: `${markPlate.snug} not-data-[state=checked]:not-data-readonly:interactive:hovered:bg-tf-panel-hi`,\n } satisfies Record<MarkPlate, string>,\n },\n})\n\nconst radioIndicatorRecipe = cva(\n [\n 'pointer-events-none left-0 h-(--height) w-(--width)',\n 'rounded-tf-block tf-tinted data-disabled:opacity-50',\n '[--transition-duration:var(--tf-duration-2)]',\n '[--transition-timing-function:var(--ease-tf-glide)]',\n ],\n {\n compoundVariants: [{ class: toneBlend.danger, invalid: true }],\n defaultVariants: { accent: defaultRadioAccent, invalid: false },\n variants: {\n accent: toneBlend,\n invalid: { false: '', true: '' },\n },\n },\n)\n\nconst radioLeadRecipe = cva('flex min-w-0 items-center gap-3')\n\nconst radioControlRecipe = cva(\n [\n ...markBox,\n 'rounded-tf-pill bg-tf-sunken',\n 'not-data-readonly:interactive:hovered:bg-tf-sunken-hi',\n 'data-[state=checked]:tf-mark-lit',\n 'data-[state=checked]:**:data-[part=dot]:scale-100',\n 'data-invalid:blend-tf-danger data-invalid:tf-mark-failed',\n markPress,\n ],\n {\n defaultVariants: { accent: defaultRadioAccent },\n variants: { accent: toneBlend },\n },\n)\n\nconst radioDotRecipe = cva([\n 'block size-tf-mark-dot rounded-tf-pill bg-tf-blend',\n 'scale-0 tf-moves-spring tf-transition motion-reduce:transition-none',\n])\n\nconst radioLabelRecipe = cva(markStack)\n\nconst radioTitleRecipe = cva(markTitle)\n\nconst radioHintRecipe = cva('text-tf-caption font-medium text-tf-muted')\n\nconst radioAsideRecipe = cva('shrink-0 text-tf-body-sm font-medium text-tf-muted tabular-nums')\n\nconst radioErrorRecipe = cva('px-3 pt-1 text-tf-caption font-medium text-tf-danger-hi tf-arrives')\n\nexport {\n type RadioAccent,\n defaultRadioAccent,\n radioAccents,\n radioAsideRecipe,\n radioControlRecipe,\n radioDotRecipe,\n radioErrorRecipe,\n radioGroupLabelRecipe,\n radioGroupRecipe,\n radioHintRecipe,\n radioIndicatorRecipe,\n radioLabelRecipe,\n radioLeadRecipe,\n radioRecipe,\n radioTitleRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"radioGroup.js","names":[],"sources":["../../src/recipes/radioGroup.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport type { MarkPlate } from '#mark'\nimport { defaultMarkPlate } from '#mark'\nimport { eyebrowQuiet } from '#parts/eyebrow'\nimport {\n markBox,\n markGroup,\n markPlate,\n markPress,\n markRow,\n markStack,\n markTitle,\n} from '#parts/mark'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\nconst radioAccents = tones\n\ntype RadioAccent = Tone\n\nconst defaultRadioAccent = defaultTone\n\nconst radioGroupRecipe = cva([markGroup, 'font-tf-body'])\n\nconst radioGroupLabelRecipe = cva([\n `text-tf-caption-sm ${eyebrowQuiet}`,\n 'px-3 pb-1 font-medium',\n '**:data-[part=required-indicator]:text-tf-danger-hi',\n])\n\nconst radioRecipe = cva([...markRow, 'justify-between gap-6'], {\n defaultVariants: { plate: defaultMarkPlate },\n variants: {\n plate: {\n bare: markPlate.bare,\n full: `${markPlate.full} not-data-[state=checked]:not-data-readonly:interactive:hovered:bg-tf-panel-hi`,\n snug: `${markPlate.snug} not-data-[state=checked]:not-data-readonly:interactive:hovered:bg-tf-panel-hi`,\n } satisfies Record<MarkPlate, string>,\n },\n})\n\nconst radioIndicatorRecipe = cva(\n [\n 'pointer-events-none left-0 h-(--height) w-(--width)',\n 'rounded-tf-block tf-tinted data-disabled:opacity-50',\n '[--transition-duration:var(--tf-duration-2)]',\n '[--transition-timing-function:var(--ease-tf-glide)]',\n ],\n {\n compoundVariants: [{ class: toneBlend.danger, invalid: true }],\n defaultVariants: { accent: defaultRadioAccent, invalid: false },\n variants: {\n accent: toneBlend,\n invalid: { false: '', true: '' },\n },\n },\n)\n\nconst radioLeadRecipe = cva('flex min-w-0 items-center gap-3')\n\nconst radioControlRecipe = cva(\n [\n ...markBox,\n 'rounded-tf-pill bg-tf-sunken',\n 'not-data-readonly:interactive:hovered:bg-tf-sunken-hi',\n 'data-[state=checked]:tf-mark-lit',\n 'data-[state=checked]:**:data-[part=dot]:scale-100',\n 'data-invalid:blend-tf-danger data-invalid:tf-mark-failed',\n markPress,\n ],\n {\n defaultVariants: { accent: defaultRadioAccent },\n variants: { accent: toneBlend },\n },\n)\n\nconst radioDotRecipe = cva([\n 'block size-tf-mark-dot rounded-tf-pill bg-tf-blend',\n 'scale-0 tf-moves-spring tf-transition motion-reduce:transition-none',\n])\n\nconst radioLabelRecipe = cva(markStack)\n\nconst radioTitleRecipe = cva(markTitle)\n\nconst radioHintRecipe = cva('text-tf-caption font-medium text-tf-muted')\n\nconst radioAsideRecipe = cva('shrink-0 text-tf-body-sm font-medium text-tf-muted tabular-nums')\n\nconst radioErrorRecipe = cva('px-3 pt-1 text-tf-caption font-medium text-tf-danger-hi tf-arrives')\n\nconst radioGroupAnatomy = anatomy({\n dot: { part: 'dot', recipe: radioDotRecipe, required: true },\n requiredIndicator: {\n part: 'required-indicator',\n recipe: radioGroupLabelRecipe,\n required: false,\n },\n root: { part: 'radio-group', recipe: radioGroupRecipe, required: true },\n})\n\nexport {\n type RadioAccent,\n defaultRadioAccent,\n radioAccents,\n radioAsideRecipe,\n radioControlRecipe,\n radioDotRecipe,\n radioErrorRecipe,\n radioGroupAnatomy,\n radioGroupLabelRecipe,\n radioGroupRecipe,\n radioHintRecipe,\n radioIndicatorRecipe,\n radioLabelRecipe,\n radioLeadRecipe,\n radioRecipe,\n radioTitleRecipe,\n}\n"],"mappings":";;;;;;;;AAmBA,MAAM,eAAe;AAIrB,MAAM,qBAAqB;AAE3B,MAAM,mBAAmB,IAAI,CAAC,WAAW,cAAc,CAAC;AAExD,MAAM,wBAAwB,IAAI;CAChC,sBAAsB;CACtB;CACA;AACF,CAAC;AAED,MAAM,cAAc,IAAI,CAAC,GAAG,SAAS,uBAAuB,GAAG;CAC7D,iBAAiB,EAAE,OAAO,iBAAiB;CAC3C,UAAU,EACR,OAAO;EACL,MAAM,UAAU;EAChB,MAAM,GAAG,UAAU,KAAK;EACxB,MAAM,GAAG,UAAU,KAAK;CAC1B,EACF;AACF,CAAC;AAED,MAAM,uBAAuB,IAC3B;CACE;CACA;CACA;CACA;AACF,GACA;CACE,kBAAkB,CAAC;EAAE,OAAO,UAAU;EAAQ,SAAS;CAAK,CAAC;CAC7D,iBAAiB;EAAE,QAAQ;EAAoB,SAAS;CAAM;CAC9D,UAAU;EACR,QAAQ;EACR,SAAS;GAAE,OAAO;GAAI,MAAM;EAAG;CACjC;AACF,CACF;AAEA,MAAM,kBAAkB,IAAI,iCAAiC;AAE7D,MAAM,qBAAqB,IACzB;CACE,GAAG;CACH;CACA;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,QAAQ,mBAAmB;CAC9C,UAAU,EAAE,QAAQ,UAAU;AAChC,CACF;AAEA,MAAM,iBAAiB,IAAI,CACzB,sDACA,qEACF,CAAC;AAED,MAAM,mBAAmB,IAAI,SAAS;AAEtC,MAAM,mBAAmB,IAAI,SAAS;AAEtC,MAAM,kBAAkB,IAAI,2CAA2C;AAEvE,MAAM,mBAAmB,IAAI,iEAAiE;AAE9F,MAAM,mBAAmB,IAAI,oEAAoE;AAEjG,MAAM,oBAAoB,QAAQ;CAChC,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAgB,UAAU;CAAK;CAC3D,mBAAmB;EACjB,MAAM;EACN,QAAQ;EACR,UAAU;CACZ;CACA,MAAM;EAAE,MAAM;EAAe,QAAQ;EAAkB,UAAU;CAAK;AACxE,CAAC"}
|
|
@@ -21,6 +21,43 @@ declare const scopeSwitcherBadgeRecipe: (props?: ({
|
|
|
21
21
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
22
|
declare const scopeSwitcherDotRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
23
23
|
declare const scopeSwitcherWarningRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
24
|
+
declare const scopeSwitcherAnatomy: {
|
|
25
|
+
readonly eyebrow: {
|
|
26
|
+
readonly part: "eyebrow";
|
|
27
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
28
|
+
readonly required: false;
|
|
29
|
+
};
|
|
30
|
+
readonly list: {
|
|
31
|
+
readonly part: "list";
|
|
32
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
33
|
+
readonly required: false;
|
|
34
|
+
};
|
|
35
|
+
readonly mark: {
|
|
36
|
+
readonly part: "mark";
|
|
37
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
38
|
+
readonly required: true;
|
|
39
|
+
};
|
|
40
|
+
readonly root: {
|
|
41
|
+
readonly part: "scope-switcher";
|
|
42
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
43
|
+
readonly required: true;
|
|
44
|
+
};
|
|
45
|
+
readonly rowText: {
|
|
46
|
+
readonly part: "row-text";
|
|
47
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
48
|
+
readonly required: true;
|
|
49
|
+
};
|
|
50
|
+
readonly text: {
|
|
51
|
+
readonly part: "text";
|
|
52
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
53
|
+
readonly required: false;
|
|
54
|
+
};
|
|
55
|
+
readonly value: {
|
|
56
|
+
readonly part: "value";
|
|
57
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
58
|
+
readonly required: true;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
24
61
|
//#endregion
|
|
25
|
-
export { scopeSwitcherBadgeRecipe, scopeSwitcherChevronsRecipe, scopeSwitcherCodeRecipe, scopeSwitcherDotRecipe, scopeSwitcherEyebrowRecipe, scopeSwitcherIconRecipe, scopeSwitcherListRecipe, scopeSwitcherMarkRecipe, scopeSwitcherPillIconRecipe, scopeSwitcherPillRecipe, scopeSwitcherRecipe, scopeSwitcherRowMetaRecipe, scopeSwitcherRowNameRecipe, scopeSwitcherRowRecipe, scopeSwitcherRowTextRecipe, scopeSwitcherTextRecipe, scopeSwitcherValueRecipe, scopeSwitcherWarningRecipe };
|
|
62
|
+
export { scopeSwitcherAnatomy, scopeSwitcherBadgeRecipe, scopeSwitcherChevronsRecipe, scopeSwitcherCodeRecipe, scopeSwitcherDotRecipe, scopeSwitcherEyebrowRecipe, scopeSwitcherIconRecipe, scopeSwitcherListRecipe, scopeSwitcherMarkRecipe, scopeSwitcherPillIconRecipe, scopeSwitcherPillRecipe, scopeSwitcherRecipe, scopeSwitcherRowMetaRecipe, scopeSwitcherRowNameRecipe, scopeSwitcherRowRecipe, scopeSwitcherRowTextRecipe, scopeSwitcherTextRecipe, scopeSwitcherValueRecipe, scopeSwitcherWarningRecipe };
|
|
26
63
|
//# sourceMappingURL=scopeSwitcher.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress, controlQuiet, controlReach } from "../parts/control.js";
|
|
2
3
|
import { collapseMotion, railCollapse, railMorph } from "./motion.js";
|
|
3
4
|
import { eyebrowType } from "../parts/eyebrow.js";
|
|
4
5
|
import { travelMarkBase } from "../parts/travel.js";
|
|
6
|
+
import { menuListRecipe } from "./menu.js";
|
|
5
7
|
import { cva } from "class-variance-authority";
|
|
6
8
|
//#region src/recipes/scopeSwitcher.ts
|
|
7
9
|
const scopeSwitcherRecipe = cva([
|
|
@@ -74,7 +76,44 @@ const scopeSwitcherBadgeRecipe = cva(["inline-flex flex-none items-center gap-2
|
|
|
74
76
|
});
|
|
75
77
|
const scopeSwitcherDotRecipe = cva("size-1.5 flex-none rounded-tf-pill bg-current");
|
|
76
78
|
const scopeSwitcherWarningRecipe = cva("flex-none text-tf-danger-hi");
|
|
79
|
+
const scopeSwitcherAnatomy = anatomy({
|
|
80
|
+
eyebrow: {
|
|
81
|
+
part: "eyebrow",
|
|
82
|
+
recipe: scopeSwitcherEyebrowRecipe,
|
|
83
|
+
required: false
|
|
84
|
+
},
|
|
85
|
+
list: {
|
|
86
|
+
part: "list",
|
|
87
|
+
recipe: menuListRecipe,
|
|
88
|
+
required: false
|
|
89
|
+
},
|
|
90
|
+
mark: {
|
|
91
|
+
part: "mark",
|
|
92
|
+
recipe: scopeSwitcherMarkRecipe,
|
|
93
|
+
required: true
|
|
94
|
+
},
|
|
95
|
+
root: {
|
|
96
|
+
part: "scope-switcher",
|
|
97
|
+
recipe: scopeSwitcherRecipe,
|
|
98
|
+
required: true
|
|
99
|
+
},
|
|
100
|
+
rowText: {
|
|
101
|
+
part: "row-text",
|
|
102
|
+
recipe: scopeSwitcherRowTextRecipe,
|
|
103
|
+
required: true
|
|
104
|
+
},
|
|
105
|
+
text: {
|
|
106
|
+
part: "text",
|
|
107
|
+
recipe: scopeSwitcherTextRecipe,
|
|
108
|
+
required: false
|
|
109
|
+
},
|
|
110
|
+
value: {
|
|
111
|
+
part: "value",
|
|
112
|
+
recipe: scopeSwitcherValueRecipe,
|
|
113
|
+
required: true
|
|
114
|
+
}
|
|
115
|
+
});
|
|
77
116
|
//#endregion
|
|
78
|
-
export { scopeSwitcherBadgeRecipe, scopeSwitcherChevronsRecipe, scopeSwitcherCodeRecipe, scopeSwitcherDotRecipe, scopeSwitcherEyebrowRecipe, scopeSwitcherIconRecipe, scopeSwitcherListRecipe, scopeSwitcherMarkRecipe, scopeSwitcherPillIconRecipe, scopeSwitcherPillRecipe, scopeSwitcherRecipe, scopeSwitcherRowMetaRecipe, scopeSwitcherRowNameRecipe, scopeSwitcherRowRecipe, scopeSwitcherRowTextRecipe, scopeSwitcherTextRecipe, scopeSwitcherValueRecipe, scopeSwitcherWarningRecipe };
|
|
117
|
+
export { scopeSwitcherAnatomy, scopeSwitcherBadgeRecipe, scopeSwitcherChevronsRecipe, scopeSwitcherCodeRecipe, scopeSwitcherDotRecipe, scopeSwitcherEyebrowRecipe, scopeSwitcherIconRecipe, scopeSwitcherListRecipe, scopeSwitcherMarkRecipe, scopeSwitcherPillIconRecipe, scopeSwitcherPillRecipe, scopeSwitcherRecipe, scopeSwitcherRowMetaRecipe, scopeSwitcherRowNameRecipe, scopeSwitcherRowRecipe, scopeSwitcherRowTextRecipe, scopeSwitcherTextRecipe, scopeSwitcherValueRecipe, scopeSwitcherWarningRecipe };
|
|
79
118
|
|
|
80
119
|
//# sourceMappingURL=scopeSwitcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopeSwitcher.js","names":[],"sources":["../../src/recipes/scopeSwitcher.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress, controlQuiet, controlReach } from '#parts/control'\nimport { eyebrowType } from '#parts/eyebrow'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { collapseMotion, railCollapse, railMorph } from './motion'\n\nconst scopeSwitcherRecipe = cva([\n 'group relative flex w-full items-center gap-2 rounded-tf-block px-3 py-1.5 text-left',\n 'in-data-rail:justify-center in-data-rail:gap-0 in-data-rail:px-2',\n 'bg-tf-sunken',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst scopeSwitcherPillRecipe = cva([\n 'inline-flex flex-none items-center gap-2 rounded-tf-pill px-3 py-1.5',\n 'bg-tf-panel-2 text-tf-body-sm font-medium text-tf-fg',\n '[&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst scopeSwitcherTextRecipe = cva(`flex flex-col gap-0 ${railCollapse}`)\n\nconst scopeSwitcherEyebrowRecipe = cva([\n 'truncate text-tf-caption-sm text-tf-accent-hi',\n eyebrowType,\n])\n\nconst scopeSwitcherValueRecipe = cva(\n 'truncate font-tf-display text-tf-body-sm font-medium tracking-tf-tight text-tf-fg',\n)\n\nconst scopeSwitcherChevronsRecipe = 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 scopeSwitcherPillIconRecipe = cva('flex-none text-tf-accent-hi')\n\nconst scopeSwitcherIconRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center rounded-tf-control',\n 'bg-tf-blend text-tf-on-accent tf-cloud-brand tf-clouded blend-tf-accent tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-icons-solo tf-inner-lit',\n '[&_svg]:size-tf-icon-md [&_svg]:shrink-0',\n])\n\nconst scopeSwitcherListRecipe = cva(['relative flex flex-col gap-1 pt-2', ...collapseMotion])\n\nconst scopeSwitcherMarkRecipe = cva([\n ...travelMarkBase,\n 'inset-x-0 h-[61px] rounded-tf-control bg-tf-panel-hi',\n])\n\nconst scopeSwitcherRowRecipe = cva(\n [\n 'group relative flex w-full items-center gap-2 rounded-tf-control px-3 py-2 text-left',\n 'tf-transition data-highlighted:bg-tf-panel-hi',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { selected: false },\n variants: {\n selected: {\n false: '',\n true: 'tf-tinted blend-tf-accent',\n },\n },\n },\n)\n\nconst scopeSwitcherCodeRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center rounded-tf-pill',\n '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 scopeSwitcherRowTextRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst scopeSwitcherRowNameRecipe = cva('truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst scopeSwitcherRowMetaRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst scopeSwitcherBadgeRecipe = cva(\n [\n 'inline-flex flex-none items-center gap-2 rounded-tf-pill bg-tf-panel-hi px-2 py-1',\n 'text-tf-caption-sm font-normal tabular-nums',\n ],\n {\n defaultVariants: { tone: 'accent' },\n variants: {\n tone: {\n accent: 'text-tf-accent-hi',\n warning: 'text-tf-warning-hi',\n },\n },\n },\n)\n\nconst scopeSwitcherDotRecipe = cva('size-1.5 flex-none rounded-tf-pill bg-current')\n\nconst scopeSwitcherWarningRecipe = cva('flex-none text-tf-danger-hi')\n\nexport {\n scopeSwitcherBadgeRecipe,\n scopeSwitcherChevronsRecipe,\n scopeSwitcherCodeRecipe,\n scopeSwitcherDotRecipe,\n scopeSwitcherEyebrowRecipe,\n scopeSwitcherIconRecipe,\n scopeSwitcherListRecipe,\n scopeSwitcherMarkRecipe,\n scopeSwitcherPillIconRecipe,\n scopeSwitcherPillRecipe,\n scopeSwitcherRecipe,\n scopeSwitcherRowNameRecipe,\n scopeSwitcherRowMetaRecipe,\n scopeSwitcherRowRecipe,\n scopeSwitcherRowTextRecipe,\n scopeSwitcherTextRecipe,\n scopeSwitcherValueRecipe,\n scopeSwitcherWarningRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"scopeSwitcher.js","names":[],"sources":["../../src/recipes/scopeSwitcher.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress, controlQuiet, controlReach } from '#parts/control'\nimport { eyebrowType } from '#parts/eyebrow'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { menuListRecipe } from './menu'\nimport { collapseMotion, railCollapse, railMorph } from './motion'\n\nconst scopeSwitcherRecipe = cva([\n 'group relative flex w-full items-center gap-2 rounded-tf-block px-3 py-1.5 text-left',\n 'in-data-rail:justify-center in-data-rail:gap-0 in-data-rail:px-2',\n 'bg-tf-sunken',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst scopeSwitcherPillRecipe = cva([\n 'inline-flex flex-none items-center gap-2 rounded-tf-pill px-3 py-1.5',\n 'bg-tf-panel-2 text-tf-body-sm font-medium text-tf-fg',\n '[&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst scopeSwitcherTextRecipe = cva(`flex flex-col gap-0 ${railCollapse}`)\n\nconst scopeSwitcherEyebrowRecipe = cva([\n 'truncate text-tf-caption-sm text-tf-accent-hi',\n eyebrowType,\n])\n\nconst scopeSwitcherValueRecipe = cva(\n 'truncate font-tf-display text-tf-body-sm font-medium tracking-tf-tight text-tf-fg',\n)\n\nconst scopeSwitcherChevronsRecipe = 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 scopeSwitcherPillIconRecipe = cva('flex-none text-tf-accent-hi')\n\nconst scopeSwitcherIconRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center rounded-tf-control',\n 'bg-tf-blend text-tf-on-accent tf-cloud-brand tf-clouded blend-tf-accent tf-blend-drift',\n 'tf-edge-sweep tf-swept tf-icons-solo tf-inner-lit',\n '[&_svg]:size-tf-icon-md [&_svg]:shrink-0',\n])\n\nconst scopeSwitcherListRecipe = cva(['relative flex flex-col gap-1 pt-2', ...collapseMotion])\n\nconst scopeSwitcherMarkRecipe = cva([\n ...travelMarkBase,\n 'inset-x-0 h-[61px] rounded-tf-control bg-tf-panel-hi',\n])\n\nconst scopeSwitcherRowRecipe = cva(\n [\n 'group relative flex w-full items-center gap-2 rounded-tf-control px-3 py-2 text-left',\n 'tf-transition data-highlighted:bg-tf-panel-hi',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { selected: false },\n variants: {\n selected: {\n false: '',\n true: 'tf-tinted blend-tf-accent',\n },\n },\n },\n)\n\nconst scopeSwitcherCodeRecipe = cva([\n 'relative isolate flex size-tf-control-sm flex-none items-center justify-center rounded-tf-pill',\n '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 scopeSwitcherRowTextRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst scopeSwitcherRowNameRecipe = cva('truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst scopeSwitcherRowMetaRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst scopeSwitcherBadgeRecipe = cva(\n [\n 'inline-flex flex-none items-center gap-2 rounded-tf-pill bg-tf-panel-hi px-2 py-1',\n 'text-tf-caption-sm font-normal tabular-nums',\n ],\n {\n defaultVariants: { tone: 'accent' },\n variants: {\n tone: {\n accent: 'text-tf-accent-hi',\n warning: 'text-tf-warning-hi',\n },\n },\n },\n)\n\nconst scopeSwitcherDotRecipe = cva('size-1.5 flex-none rounded-tf-pill bg-current')\n\nconst scopeSwitcherWarningRecipe = cva('flex-none text-tf-danger-hi')\n\nconst scopeSwitcherAnatomy = anatomy({\n eyebrow: { part: 'eyebrow', recipe: scopeSwitcherEyebrowRecipe, required: false },\n list: { part: 'list', recipe: menuListRecipe, required: false },\n mark: { part: 'mark', recipe: scopeSwitcherMarkRecipe, required: true },\n root: { part: 'scope-switcher', recipe: scopeSwitcherRecipe, required: true },\n rowText: { part: 'row-text', recipe: scopeSwitcherRowTextRecipe, required: true },\n text: { part: 'text', recipe: scopeSwitcherTextRecipe, required: false },\n value: { part: 'value', recipe: scopeSwitcherValueRecipe, required: true },\n})\n\nexport {\n scopeSwitcherAnatomy,\n scopeSwitcherBadgeRecipe,\n scopeSwitcherChevronsRecipe,\n scopeSwitcherCodeRecipe,\n scopeSwitcherDotRecipe,\n scopeSwitcherEyebrowRecipe,\n scopeSwitcherIconRecipe,\n scopeSwitcherListRecipe,\n scopeSwitcherMarkRecipe,\n scopeSwitcherPillIconRecipe,\n scopeSwitcherPillRecipe,\n scopeSwitcherRecipe,\n scopeSwitcherRowNameRecipe,\n scopeSwitcherRowMetaRecipe,\n scopeSwitcherRowRecipe,\n scopeSwitcherRowTextRecipe,\n scopeSwitcherTextRecipe,\n scopeSwitcherValueRecipe,\n scopeSwitcherWarningRecipe,\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,sBAAsB,IAAI;CAC9B;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,0BAA0B,IAAI;CAClC;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,0BAA0B,IAAI,uBAAuB,cAAc;AAEzE,MAAM,6BAA6B,IAAI,CACrC,iDACA,WACF,CAAC;AAED,MAAM,2BAA2B,IAC/B,mFACF;AAEA,MAAM,8BAA8B,IAAI;CACtC;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,8BAA8B,IAAI,6BAA6B;AAErE,MAAM,0BAA0B,IAAI;CAClC;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,0BAA0B,IAAI,CAAC,qCAAqC,GAAG,cAAc,CAAC;AAE5F,MAAM,0BAA0B,IAAI,CAClC,GAAG,gBACH,sDACF,CAAC;AAED,MAAM,yBAAyB,IAC7B;CACE;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL,GACA;CACE,iBAAiB,EAAE,UAAU,MAAM;CACnC,UAAU,EACR,UAAU;EACR,OAAO;EACP,MAAM;CACR,EACF;AACF,CACF;AAEA,MAAM,0BAA0B,IAAI;CAClC;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,6BAA6B,IAAI,oCAAoC;AAE3E,MAAM,6BAA6B,IAAI,iDAAiD;AAExF,MAAM,6BAA6B,IAAI,2CAA2C;AAElF,MAAM,2BAA2B,IAC/B,CACE,qFACA,6CACF,GACA;CACE,iBAAiB,EAAE,MAAM,SAAS;CAClC,UAAU,EACR,MAAM;EACJ,QAAQ;EACR,SAAS;CACX,EACF;AACF,CACF;AAEA,MAAM,yBAAyB,IAAI,+CAA+C;AAElF,MAAM,6BAA6B,IAAI,6BAA6B;AAEpE,MAAM,uBAAuB,QAAQ;CACnC,SAAS;EAAE,MAAM;EAAW,QAAQ;EAA4B,UAAU;CAAM;CAChF,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAM;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAyB,UAAU;CAAK;CACtE,MAAM;EAAE,MAAM;EAAkB,QAAQ;EAAqB,UAAU;CAAK;CAC5E,SAAS;EAAE,MAAM;EAAY,QAAQ;EAA4B,UAAU;CAAK;CAChF,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAyB,UAAU;CAAM;CACvE,OAAO;EAAE,MAAM;EAAS,QAAQ;EAA0B,UAAU;CAAK;AAC3E,CAAC"}
|
|
@@ -8,12 +8,21 @@ declare const scrollAreaRecipe: (props?: ({
|
|
|
8
8
|
declare const scrollViewportRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
9
|
declare const scrollContentRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
10
|
declare const scrollBarRecipe: (props?: ({
|
|
11
|
-
way?: "
|
|
11
|
+
way?: "horizontal" | "vertical" | null | undefined;
|
|
12
12
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
13
|
declare const scrollThumbRecipe: (props?: ({
|
|
14
|
-
way?: "
|
|
14
|
+
way?: "horizontal" | "vertical" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare const scrollCornerRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
declare const scrollAreaAnatomy: {
|
|
18
|
+
readonly root: {
|
|
19
|
+
readonly part: "scroll-area";
|
|
20
|
+
readonly recipe: (props?: ({
|
|
21
|
+
surface?: "bare" | "card" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
readonly required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
17
26
|
//#endregion
|
|
18
|
-
export { type ScrollAreaSurface, defaultScrollAreaSurface, scrollAreaRecipe, scrollAreaSurfaces, scrollBarRecipe, scrollContentRecipe, scrollCornerRecipe, scrollThumbRecipe, scrollViewportRecipe };
|
|
27
|
+
export { type ScrollAreaSurface, defaultScrollAreaSurface, scrollAreaAnatomy, scrollAreaRecipe, scrollAreaSurfaces, scrollBarRecipe, scrollContentRecipe, scrollCornerRecipe, scrollThumbRecipe, scrollViewportRecipe };
|
|
19
28
|
//# sourceMappingURL=scrollArea.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { scrollFades } from "../parts/scroll.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/scrollArea.ts
|
|
@@ -37,7 +38,12 @@ const scrollThumbRecipe = cva([
|
|
|
37
38
|
} }
|
|
38
39
|
});
|
|
39
40
|
const scrollCornerRecipe = cva("bg-transparent");
|
|
41
|
+
const scrollAreaAnatomy = anatomy({ root: {
|
|
42
|
+
part: "scroll-area",
|
|
43
|
+
recipe: scrollAreaRecipe,
|
|
44
|
+
required: true
|
|
45
|
+
} });
|
|
40
46
|
//#endregion
|
|
41
|
-
export { defaultScrollAreaSurface, scrollAreaRecipe, scrollAreaSurfaces, scrollBarRecipe, scrollContentRecipe, scrollCornerRecipe, scrollThumbRecipe, scrollViewportRecipe };
|
|
47
|
+
export { defaultScrollAreaSurface, scrollAreaAnatomy, scrollAreaRecipe, scrollAreaSurfaces, scrollBarRecipe, scrollContentRecipe, scrollCornerRecipe, scrollThumbRecipe, scrollViewportRecipe };
|
|
42
48
|
|
|
43
49
|
//# sourceMappingURL=scrollArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrollArea.js","names":[],"sources":["../../src/recipes/scrollArea.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { scrollFades } from '#parts/scroll'\n\nconst RAIL = 'rounded-tf-inline'\n\ntype ScrollAreaSurface = 'card' | 'bare'\n\ntype ScrollAreaWay = 'vertical' | 'horizontal'\n\nconst defaultScrollAreaSurface = 'card' satisfies ScrollAreaSurface\n\nconst scrollAreaSurfaces = ['card', 'bare'] as const satisfies readonly ScrollAreaSurface[]\n\nconst scrollAreaRecipe = cva(['relative flex flex-col', 'font-tf-body'], {\n defaultVariants: { surface: defaultScrollAreaSurface },\n variants: {\n surface: {\n bare: '',\n card: 'tf-edge-sweep rounded-tf-block bg-tf-panel px-2 shadow-tf-float tf-edge-plain',\n } satisfies Record<ScrollAreaSurface, string>,\n },\n})\n\nconst scrollViewportRecipe = cva([\n 'flex tf-scroll-hidden min-h-0 flex-col py-2 pr-3 outline-hidden',\n 'in-data-overflow-x:pb-3',\n ...scrollFades,\n])\n\nconst scrollContentRecipe = cva('flex flex-col')\n\nconst scrollBarRecipe = cva(\n [`${RAIL} bg-tf-panel`, 'tf-transition motion-reduce:transition-none'],\n {\n defaultVariants: { way: 'vertical' },\n variants: {\n way: {\n horizontal: 'mx-2 mb-1 h-1 opacity-0 in-data-overflow-x:opacity-100',\n vertical: 'my-2 mr-1 w-1 opacity-0 in-data-overflow-y:opacity-100',\n } satisfies Record<ScrollAreaWay, string>,\n },\n },\n)\n\nconst scrollThumbRecipe = cva(\n [\n `${RAIL} bg-tf-line`,\n 'in-data-hover:bg-tf-line-hi in-data-scrolling:bg-tf-line-hi',\n 'data-dragging:bg-tf-accent-hi',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { way: 'vertical' },\n variants: {\n way: {\n horizontal: 'h-1 min-w-tf-icon-solo-lg',\n vertical: 'min-h-tf-icon-solo-lg w-1',\n } satisfies Record<ScrollAreaWay, string>,\n },\n },\n)\n\nconst scrollCornerRecipe = cva('bg-transparent')\n\nexport {\n type ScrollAreaSurface,\n defaultScrollAreaSurface,\n scrollAreaRecipe,\n scrollAreaSurfaces,\n scrollBarRecipe,\n scrollContentRecipe,\n scrollCornerRecipe,\n scrollThumbRecipe,\n scrollViewportRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"scrollArea.js","names":[],"sources":["../../src/recipes/scrollArea.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { scrollFades } from '#parts/scroll'\n\nconst RAIL = 'rounded-tf-inline'\n\ntype ScrollAreaSurface = 'card' | 'bare'\n\ntype ScrollAreaWay = 'vertical' | 'horizontal'\n\nconst defaultScrollAreaSurface = 'card' satisfies ScrollAreaSurface\n\nconst scrollAreaSurfaces = ['card', 'bare'] as const satisfies readonly ScrollAreaSurface[]\n\nconst scrollAreaRecipe = cva(['relative flex flex-col', 'font-tf-body'], {\n defaultVariants: { surface: defaultScrollAreaSurface },\n variants: {\n surface: {\n bare: '',\n card: 'tf-edge-sweep rounded-tf-block bg-tf-panel px-2 shadow-tf-float tf-edge-plain',\n } satisfies Record<ScrollAreaSurface, string>,\n },\n})\n\nconst scrollViewportRecipe = cva([\n 'flex tf-scroll-hidden min-h-0 flex-col py-2 pr-3 outline-hidden',\n 'in-data-overflow-x:pb-3',\n ...scrollFades,\n])\n\nconst scrollContentRecipe = cva('flex flex-col')\n\nconst scrollBarRecipe = cva(\n [`${RAIL} bg-tf-panel`, 'tf-transition motion-reduce:transition-none'],\n {\n defaultVariants: { way: 'vertical' },\n variants: {\n way: {\n horizontal: 'mx-2 mb-1 h-1 opacity-0 in-data-overflow-x:opacity-100',\n vertical: 'my-2 mr-1 w-1 opacity-0 in-data-overflow-y:opacity-100',\n } satisfies Record<ScrollAreaWay, string>,\n },\n },\n)\n\nconst scrollThumbRecipe = cva(\n [\n `${RAIL} bg-tf-line`,\n 'in-data-hover:bg-tf-line-hi in-data-scrolling:bg-tf-line-hi',\n 'data-dragging:bg-tf-accent-hi',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { way: 'vertical' },\n variants: {\n way: {\n horizontal: 'h-1 min-w-tf-icon-solo-lg',\n vertical: 'min-h-tf-icon-solo-lg w-1',\n } satisfies Record<ScrollAreaWay, string>,\n },\n },\n)\n\nconst scrollCornerRecipe = cva('bg-transparent')\n\nconst scrollAreaAnatomy = anatomy({\n root: { part: 'scroll-area', recipe: scrollAreaRecipe, required: true },\n})\n\nexport {\n type ScrollAreaSurface,\n defaultScrollAreaSurface,\n scrollAreaAnatomy,\n scrollAreaRecipe,\n scrollAreaSurfaces,\n scrollBarRecipe,\n scrollContentRecipe,\n scrollCornerRecipe,\n scrollThumbRecipe,\n scrollViewportRecipe,\n}\n"],"mappings":";;;;AAKA,MAAM,OAAO;AAMb,MAAM,2BAA2B;AAEjC,MAAM,qBAAqB,CAAC,QAAQ,MAAM;AAE1C,MAAM,mBAAmB,IAAI,CAAC,0BAA0B,cAAc,GAAG;CACvE,iBAAiB,EAAE,SAAS,yBAAyB;CACrD,UAAU,EACR,SAAS;EACP,MAAM;EACN,MAAM;CACR,EACF;AACF,CAAC;AAED,MAAM,uBAAuB,IAAI;CAC/B;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,sBAAsB,IAAI,eAAe;AAE/C,MAAM,kBAAkB,IACtB,CAAC,GAAG,KAAK,eAAe,6CAA6C,GACrE;CACE,iBAAiB,EAAE,KAAK,WAAW;CACnC,UAAU,EACR,KAAK;EACH,YAAY;EACZ,UAAU;CACZ,EACF;AACF,CACF;AAEA,MAAM,oBAAoB,IACxB;CACE,GAAG,KAAK;CACR;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,KAAK,WAAW;CACnC,UAAU,EACR,KAAK;EACH,YAAY;EACZ,UAAU;CACZ,EACF;AACF,CACF;AAEA,MAAM,qBAAqB,IAAI,gBAAgB;AAE/C,MAAM,oBAAoB,QAAQ,EAChC,MAAM;CAAE,MAAM;CAAe,QAAQ;CAAkB,UAAU;AAAK,EACxE,CAAC"}
|
|
@@ -14,6 +14,53 @@ declare const searchHitTextRecipe: (props?: import("class-variance-authority/typ
|
|
|
14
14
|
declare const searchHitMetaRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
15
|
declare const searchEmptyRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
16
|
declare const searchFootRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
17
|
+
declare const searchPaletteAnatomy: {
|
|
18
|
+
readonly empty: {
|
|
19
|
+
readonly part: "empty";
|
|
20
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
21
|
+
readonly required: false;
|
|
22
|
+
};
|
|
23
|
+
readonly foot: {
|
|
24
|
+
readonly part: "foot";
|
|
25
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
26
|
+
readonly required: true;
|
|
27
|
+
};
|
|
28
|
+
readonly hint: {
|
|
29
|
+
readonly part: "hint";
|
|
30
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
33
|
+
readonly mark: {
|
|
34
|
+
readonly part: "mark";
|
|
35
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
36
|
+
readonly required: true;
|
|
37
|
+
};
|
|
38
|
+
readonly meta: {
|
|
39
|
+
readonly part: "meta";
|
|
40
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
41
|
+
readonly required: false;
|
|
42
|
+
};
|
|
43
|
+
readonly root: {
|
|
44
|
+
readonly part: "search-palette";
|
|
45
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
46
|
+
readonly required: true;
|
|
47
|
+
};
|
|
48
|
+
readonly rule: {
|
|
49
|
+
readonly part: "rule";
|
|
50
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
51
|
+
readonly required: true;
|
|
52
|
+
};
|
|
53
|
+
readonly searchTrigger: {
|
|
54
|
+
readonly part: "search-trigger";
|
|
55
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
56
|
+
readonly required: true;
|
|
57
|
+
};
|
|
58
|
+
readonly shortcut: {
|
|
59
|
+
readonly part: "shortcut";
|
|
60
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
61
|
+
readonly required: false;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
17
64
|
//#endregion
|
|
18
|
-
export { searchEmptyRecipe, searchFieldRecipe, searchFootRecipe, searchHitMetaRecipe, searchHitRecipe, searchHitTextRecipe, searchInputRecipe, searchKeyRecipe, searchLabelRecipe, searchListRecipe, searchMarkRecipe, searchPanelRecipe, searchPositionerRecipe, searchRuleRecipe, searchTriggerRecipe };
|
|
65
|
+
export { searchEmptyRecipe, searchFieldRecipe, searchFootRecipe, searchHitMetaRecipe, searchHitRecipe, searchHitTextRecipe, searchInputRecipe, searchKeyRecipe, searchLabelRecipe, searchListRecipe, searchMarkRecipe, searchPaletteAnatomy, searchPanelRecipe, searchPositionerRecipe, searchRuleRecipe, searchTriggerRecipe };
|
|
19
66
|
//# sourceMappingURL=searchPalette.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress, controlReach } from "../parts/control.js";
|
|
2
3
|
import { ruleFading } from "../parts/rule.js";
|
|
3
4
|
import { mirrorMotion } from "./motion.js";
|
|
@@ -57,7 +58,54 @@ const searchFootRecipe = cva([
|
|
|
57
58
|
"flex items-center justify-between gap-3 rounded-b-tf-card px-5 py-3",
|
|
58
59
|
"text-tf-caption-sm text-tf-muted"
|
|
59
60
|
]);
|
|
61
|
+
const searchPaletteAnatomy = anatomy({
|
|
62
|
+
empty: {
|
|
63
|
+
part: "empty",
|
|
64
|
+
recipe: searchEmptyRecipe,
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
67
|
+
foot: {
|
|
68
|
+
part: "foot",
|
|
69
|
+
recipe: searchFootRecipe,
|
|
70
|
+
required: true
|
|
71
|
+
},
|
|
72
|
+
hint: {
|
|
73
|
+
part: "hint",
|
|
74
|
+
recipe: searchFootRecipe,
|
|
75
|
+
required: true
|
|
76
|
+
},
|
|
77
|
+
mark: {
|
|
78
|
+
part: "mark",
|
|
79
|
+
recipe: searchMarkRecipe,
|
|
80
|
+
required: true
|
|
81
|
+
},
|
|
82
|
+
meta: {
|
|
83
|
+
part: "meta",
|
|
84
|
+
recipe: searchHitMetaRecipe,
|
|
85
|
+
required: false
|
|
86
|
+
},
|
|
87
|
+
root: {
|
|
88
|
+
part: "search-palette",
|
|
89
|
+
recipe: searchPanelRecipe,
|
|
90
|
+
required: true
|
|
91
|
+
},
|
|
92
|
+
rule: {
|
|
93
|
+
part: "rule",
|
|
94
|
+
recipe: searchRuleRecipe,
|
|
95
|
+
required: true
|
|
96
|
+
},
|
|
97
|
+
searchTrigger: {
|
|
98
|
+
part: "search-trigger",
|
|
99
|
+
recipe: searchTriggerRecipe,
|
|
100
|
+
required: true
|
|
101
|
+
},
|
|
102
|
+
shortcut: {
|
|
103
|
+
part: "shortcut",
|
|
104
|
+
recipe: searchKeyRecipe,
|
|
105
|
+
required: false
|
|
106
|
+
}
|
|
107
|
+
});
|
|
60
108
|
//#endregion
|
|
61
|
-
export { searchEmptyRecipe, searchFieldRecipe, searchFootRecipe, searchHitMetaRecipe, searchHitRecipe, searchHitTextRecipe, searchInputRecipe, searchKeyRecipe, searchLabelRecipe, searchListRecipe, searchMarkRecipe, searchPanelRecipe, searchPositionerRecipe, searchRuleRecipe, searchTriggerRecipe };
|
|
109
|
+
export { searchEmptyRecipe, searchFieldRecipe, searchFootRecipe, searchHitMetaRecipe, searchHitRecipe, searchHitTextRecipe, searchInputRecipe, searchKeyRecipe, searchLabelRecipe, searchListRecipe, searchMarkRecipe, searchPaletteAnatomy, searchPanelRecipe, searchPositionerRecipe, searchRuleRecipe, searchTriggerRecipe };
|
|
62
110
|
|
|
63
111
|
//# sourceMappingURL=searchPalette.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchPalette.js","names":[],"sources":["../../src/recipes/searchPalette.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress, controlReach } from '#parts/control'\nimport { ruleFading } from '#parts/rule'\nimport { scrollFades } from '#parts/scroll'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { mirrorMotion } from './motion'\n\nconst GROUND = 'relative flex-none bg-tf-shade-under'\n\nconst searchTriggerRecipe = cva([\n 'relative isolate inline-flex h-tf-control-sm min-w-60 items-center gap-3',\n 'rounded-tf-control bg-tf-control pr-3 pl-3',\n 'font-tf-body text-tf-body-sm font-medium text-tf-muted',\n 'interactive:hovered:bg-tf-control-hi interactive:hovered:text-tf-fg',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlInert,\n])\n\nconst searchLabelRecipe = cva('min-w-0 flex-1 truncate text-left')\n\nconst searchKeyRecipe = cva([\n 'flex h-6 flex-none items-center rounded-tf-inline bg-tf-panel-hi px-2',\n 'text-tf-caption-sm font-normal text-tf-muted',\n])\n\nconst searchPositionerRecipe = cva([\n 'fixed inset-0 z-tf-modal flex items-start justify-center',\n 'px-4 pt-24 pb-10 font-tf-body sm:px-10',\n])\n\nconst searchPanelRecipe = cva([\n 'relative isolate rounded-tf-card bg-tf-shade-deep backdrop-blur-tf-panel',\n 'tf-edge-sweep tf-swept blend-tf-accent tf-edge-plain',\n 'flex max-h-full w-full max-w-tf-measure flex-col overflow-hidden',\n 'text-tf-body-sm font-medium text-tf-fg shadow-tf-float',\n ...mirrorMotion,\n 'motion-reduce:animate-none',\n])\n\nconst searchFieldRecipe = cva([\n GROUND,\n 'flex h-tf-control-lg items-center gap-3 rounded-t-tf-card px-5',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0 [&_svg]:text-tf-muted',\n])\n\nconst searchInputRecipe = cva([\n 'min-w-0 flex-1 border-0 bg-transparent outline-hidden',\n 'font-tf-body text-tf-body text-tf-fg placeholder:text-tf-muted',\n])\n\nconst searchRuleRecipe = cva(`absolute inset-x-0 bottom-0 ${ruleFading}`)\n\nconst searchListRecipe = cva([\n 'relative flex tf-scroll-hidden max-h-80 min-h-0 flex-col overflow-auto p-2',\n 'outline-hidden data-empty:hidden',\n ...scrollFades,\n])\n\nconst searchHitRecipe = cva([\n 'relative flex h-tf-control-md min-h-tf-control-md flex-none items-center gap-4',\n 'rounded-tf-control px-3 text-left text-tf-fg',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0 [&_svg]:text-tf-muted',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst searchMarkRecipe = cva([\n ...travelMarkBase,\n 'inset-x-2 h-tf-control-md rounded-tf-control bg-tf-panel-hi',\n])\n\nconst searchHitTextRecipe = cva('min-w-0 flex-1 truncate')\n\nconst searchHitMetaRecipe = cva([\n 'flex-none text-tf-caption-sm whitespace-nowrap text-tf-muted tabular-nums',\n])\n\nconst searchEmptyRecipe = cva([\n 'flex h-tf-control-lg flex-none items-center justify-center px-3',\n 'bg-tf-panel-2 text-tf-caption font-medium text-tf-muted',\n])\n\nconst searchFootRecipe = cva([\n GROUND,\n 'flex items-center justify-between gap-3 rounded-b-tf-card px-5 py-3',\n 'text-tf-caption-sm text-tf-muted',\n])\n\nexport {\n searchEmptyRecipe,\n searchFieldRecipe,\n searchFootRecipe,\n searchHitMetaRecipe,\n searchHitRecipe,\n searchHitTextRecipe,\n searchInputRecipe,\n searchKeyRecipe,\n searchLabelRecipe,\n searchListRecipe,\n searchMarkRecipe,\n searchPanelRecipe,\n searchPositionerRecipe,\n searchRuleRecipe,\n searchTriggerRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"searchPalette.js","names":[],"sources":["../../src/recipes/searchPalette.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress, controlReach } from '#parts/control'\nimport { ruleFading } from '#parts/rule'\nimport { scrollFades } from '#parts/scroll'\nimport { travelMarkBase } from '#parts/travel'\n\nimport { mirrorMotion } from './motion'\n\nconst GROUND = 'relative flex-none bg-tf-shade-under'\n\nconst searchTriggerRecipe = cva([\n 'relative isolate inline-flex h-tf-control-sm min-w-60 items-center gap-3',\n 'rounded-tf-control bg-tf-control pr-3 pl-3',\n 'font-tf-body text-tf-body-sm font-medium text-tf-muted',\n 'interactive:hovered:bg-tf-control-hi interactive:hovered:text-tf-fg',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlInert,\n])\n\nconst searchLabelRecipe = cva('min-w-0 flex-1 truncate text-left')\n\nconst searchKeyRecipe = cva([\n 'flex h-6 flex-none items-center rounded-tf-inline bg-tf-panel-hi px-2',\n 'text-tf-caption-sm font-normal text-tf-muted',\n])\n\nconst searchPositionerRecipe = cva([\n 'fixed inset-0 z-tf-modal flex items-start justify-center',\n 'px-4 pt-24 pb-10 font-tf-body sm:px-10',\n])\n\nconst searchPanelRecipe = cva([\n 'relative isolate rounded-tf-card bg-tf-shade-deep backdrop-blur-tf-panel',\n 'tf-edge-sweep tf-swept blend-tf-accent tf-edge-plain',\n 'flex max-h-full w-full max-w-tf-measure flex-col overflow-hidden',\n 'text-tf-body-sm font-medium text-tf-fg shadow-tf-float',\n ...mirrorMotion,\n 'motion-reduce:animate-none',\n])\n\nconst searchFieldRecipe = cva([\n GROUND,\n 'flex h-tf-control-lg items-center gap-3 rounded-t-tf-card px-5',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0 [&_svg]:text-tf-muted',\n])\n\nconst searchInputRecipe = cva([\n 'min-w-0 flex-1 border-0 bg-transparent outline-hidden',\n 'font-tf-body text-tf-body text-tf-fg placeholder:text-tf-muted',\n])\n\nconst searchRuleRecipe = cva(`absolute inset-x-0 bottom-0 ${ruleFading}`)\n\nconst searchListRecipe = cva([\n 'relative flex tf-scroll-hidden max-h-80 min-h-0 flex-col overflow-auto p-2',\n 'outline-hidden data-empty:hidden',\n ...scrollFades,\n])\n\nconst searchHitRecipe = cva([\n 'relative flex h-tf-control-md min-h-tf-control-md flex-none items-center gap-4',\n 'rounded-tf-control px-3 text-left text-tf-fg',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0 [&_svg]:text-tf-muted',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst searchMarkRecipe = cva([\n ...travelMarkBase,\n 'inset-x-2 h-tf-control-md rounded-tf-control bg-tf-panel-hi',\n])\n\nconst searchHitTextRecipe = cva('min-w-0 flex-1 truncate')\n\nconst searchHitMetaRecipe = cva([\n 'flex-none text-tf-caption-sm whitespace-nowrap text-tf-muted tabular-nums',\n])\n\nconst searchEmptyRecipe = cva([\n 'flex h-tf-control-lg flex-none items-center justify-center px-3',\n 'bg-tf-panel-2 text-tf-caption font-medium text-tf-muted',\n])\n\nconst searchFootRecipe = cva([\n GROUND,\n 'flex items-center justify-between gap-3 rounded-b-tf-card px-5 py-3',\n 'text-tf-caption-sm text-tf-muted',\n])\n\nconst searchPaletteAnatomy = anatomy({\n empty: { part: 'empty', recipe: searchEmptyRecipe, required: false },\n foot: { part: 'foot', recipe: searchFootRecipe, required: true },\n hint: { part: 'hint', recipe: searchFootRecipe, required: true },\n mark: { part: 'mark', recipe: searchMarkRecipe, required: true },\n meta: { part: 'meta', recipe: searchHitMetaRecipe, required: false },\n root: { part: 'search-palette', recipe: searchPanelRecipe, required: true },\n rule: { part: 'rule', recipe: searchRuleRecipe, required: true },\n searchTrigger: { part: 'search-trigger', recipe: searchTriggerRecipe, required: true },\n shortcut: { part: 'shortcut', recipe: searchKeyRecipe, required: false },\n})\n\nexport {\n searchEmptyRecipe,\n searchFieldRecipe,\n searchFootRecipe,\n searchHitMetaRecipe,\n searchHitRecipe,\n searchHitTextRecipe,\n searchInputRecipe,\n searchKeyRecipe,\n searchLabelRecipe,\n searchListRecipe,\n searchMarkRecipe,\n searchPaletteAnatomy,\n searchPanelRecipe,\n searchPositionerRecipe,\n searchRuleRecipe,\n searchTriggerRecipe,\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,SAAS;AAEf,MAAM,sBAAsB,IAAI;CAC9B;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,oBAAoB,IAAI,mCAAmC;AAEjE,MAAM,kBAAkB,IAAI,CAC1B,yEACA,8CACF,CAAC;AAED,MAAM,yBAAyB,IAAI,CACjC,4DACA,wCACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,CAC5B,yDACA,gEACF,CAAC;AAED,MAAM,mBAAmB,IAAI,+BAA+B,YAAY;AAExE,MAAM,mBAAmB,IAAI;CAC3B;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,kBAAkB,IAAI;CAC1B;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,mBAAmB,IAAI,CAC3B,GAAG,gBACH,6DACF,CAAC;AAED,MAAM,sBAAsB,IAAI,yBAAyB;AAEzD,MAAM,sBAAsB,IAAI,CAC9B,2EACF,CAAC;AAED,MAAM,oBAAoB,IAAI,CAC5B,mEACA,yDACF,CAAC;AAED,MAAM,mBAAmB,IAAI;CAC3B;CACA;CACA;AACF,CAAC;AAED,MAAM,uBAAuB,QAAQ;CACnC,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAmB,UAAU;CAAM;CACnE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAqB,UAAU;CAAM;CACnE,MAAM;EAAE,MAAM;EAAkB,QAAQ;EAAmB,UAAU;CAAK;CAC1E,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAkB,UAAU;CAAK;CAC/D,eAAe;EAAE,MAAM;EAAkB,QAAQ;EAAqB,UAAU;CAAK;CACrF,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAiB,UAAU;CAAM;AACzE,CAAC"}
|
|
@@ -4,12 +4,30 @@ type SectionHeaderEyebrow = 'lead' | 'quiet';
|
|
|
4
4
|
declare const defaultSectionHeaderSize = "section";
|
|
5
5
|
declare const sectionHeaderSizes: readonly ["section", "hero", "panel"];
|
|
6
6
|
declare const sectionHeaderEyebrows: readonly ["lead", "quiet"];
|
|
7
|
-
declare const sectionHeaderTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
8
7
|
declare const restingEyebrow: (size: SectionHeaderSize) => SectionHeaderEyebrow;
|
|
9
8
|
declare const sectionHeaderRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
9
|
declare const sectionHeaderLabelStackRecipe: (props?: ({
|
|
11
10
|
size?: "panel" | "section" | "hero" | null | undefined;
|
|
12
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare const sectionHeaderAnatomy: {
|
|
13
|
+
readonly actions: {
|
|
14
|
+
readonly part: "actions";
|
|
15
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
readonly required: false;
|
|
17
|
+
};
|
|
18
|
+
readonly root: {
|
|
19
|
+
readonly part: "section-header";
|
|
20
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
21
|
+
readonly required: true;
|
|
22
|
+
};
|
|
23
|
+
readonly stack: {
|
|
24
|
+
readonly part: "stack";
|
|
25
|
+
readonly recipe: (props?: ({
|
|
26
|
+
size?: "panel" | "section" | "hero" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
readonly required: true;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
13
31
|
//#endregion
|
|
14
|
-
export { type SectionHeaderEyebrow, type SectionHeaderSize, defaultSectionHeaderSize, restingEyebrow, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes
|
|
32
|
+
export { type SectionHeaderEyebrow, type SectionHeaderSize, defaultSectionHeaderSize, restingEyebrow, sectionHeaderAnatomy, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes };
|
|
15
33
|
//# sourceMappingURL=sectionHeader.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
//#region src/recipes/sectionHeader.ts
|
|
4
4
|
const defaultSectionHeaderSize = "section";
|
|
@@ -8,7 +8,6 @@ const sectionHeaderSizes = [
|
|
|
8
8
|
"panel"
|
|
9
9
|
];
|
|
10
10
|
const sectionHeaderEyebrows = ["lead", "quiet"];
|
|
11
|
-
const sectionHeaderTones = tones;
|
|
12
11
|
const RESTING_EYEBROW = {
|
|
13
12
|
hero: "lead",
|
|
14
13
|
panel: "quiet",
|
|
@@ -24,7 +23,25 @@ const sectionHeaderLabelStackRecipe = cva("flex flex-col", {
|
|
|
24
23
|
section: "gap-4"
|
|
25
24
|
} }
|
|
26
25
|
});
|
|
26
|
+
const sectionHeaderActionsRecipe = cva("flex flex-wrap items-center gap-4");
|
|
27
|
+
const sectionHeaderAnatomy = anatomy({
|
|
28
|
+
actions: {
|
|
29
|
+
part: "actions",
|
|
30
|
+
recipe: sectionHeaderActionsRecipe,
|
|
31
|
+
required: false
|
|
32
|
+
},
|
|
33
|
+
root: {
|
|
34
|
+
part: "section-header",
|
|
35
|
+
recipe: sectionHeaderRecipe,
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
stack: {
|
|
39
|
+
part: "stack",
|
|
40
|
+
recipe: sectionHeaderLabelStackRecipe,
|
|
41
|
+
required: true
|
|
42
|
+
}
|
|
43
|
+
});
|
|
27
44
|
//#endregion
|
|
28
|
-
export { defaultSectionHeaderSize, restingEyebrow, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes
|
|
45
|
+
export { defaultSectionHeaderSize, restingEyebrow, sectionHeaderAnatomy, sectionHeaderEyebrows, sectionHeaderLabelStackRecipe, sectionHeaderRecipe, sectionHeaderSizes };
|
|
29
46
|
|
|
30
47
|
//# sourceMappingURL=sectionHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sectionHeader.js","names":[],"sources":["../../src/recipes/sectionHeader.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport {
|
|
1
|
+
{"version":3,"file":"sectionHeader.js","names":[],"sources":["../../src/recipes/sectionHeader.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\ntype SectionHeaderSize = 'section' | 'hero' | 'panel'\n\ntype SectionHeaderEyebrow = 'lead' | 'quiet'\n\nconst defaultSectionHeaderSize = 'section' satisfies SectionHeaderSize\n\nconst sectionHeaderSizes = [\n 'section',\n 'hero',\n 'panel',\n] as const satisfies readonly SectionHeaderSize[]\n\nconst sectionHeaderEyebrows = ['lead', 'quiet'] as const satisfies readonly SectionHeaderEyebrow[]\n\nconst RESTING_EYEBROW = {\n hero: 'lead',\n panel: 'quiet',\n section: 'quiet',\n} satisfies Record<SectionHeaderSize, SectionHeaderEyebrow>\n\nconst restingEyebrow = (size: SectionHeaderSize): SectionHeaderEyebrow => RESTING_EYEBROW[size]\n\nconst sectionHeaderRecipe = cva('flex flex-col gap-6')\n\nconst sectionHeaderLabelStackRecipe = cva('flex flex-col', {\n defaultVariants: { size: defaultSectionHeaderSize },\n variants: {\n size: {\n hero: 'gap-4',\n panel: 'gap-2',\n section: 'gap-4',\n } satisfies Record<SectionHeaderSize, string>,\n },\n})\n\nconst sectionHeaderActionsRecipe = cva('flex flex-wrap items-center gap-4')\n\nconst sectionHeaderAnatomy = anatomy({\n actions: { part: 'actions', recipe: sectionHeaderActionsRecipe, required: false },\n root: { part: 'section-header', recipe: sectionHeaderRecipe, required: true },\n stack: { part: 'stack', recipe: sectionHeaderLabelStackRecipe, required: true },\n})\n\nexport {\n type SectionHeaderEyebrow,\n type SectionHeaderSize,\n defaultSectionHeaderSize,\n restingEyebrow,\n sectionHeaderAnatomy,\n sectionHeaderEyebrows,\n sectionHeaderLabelStackRecipe,\n sectionHeaderRecipe,\n sectionHeaderSizes,\n}\n"],"mappings":";;;AAQA,MAAM,2BAA2B;AAEjC,MAAM,qBAAqB;CACzB;CACA;CACA;AACF;AAEA,MAAM,wBAAwB,CAAC,QAAQ,OAAO;AAE9C,MAAM,kBAAkB;CACtB,MAAM;CACN,OAAO;CACP,SAAS;AACX;AAEA,MAAM,kBAAkB,SAAkD,gBAAgB;AAE1F,MAAM,sBAAsB,IAAI,qBAAqB;AAErD,MAAM,gCAAgC,IAAI,iBAAiB;CACzD,iBAAiB,EAAE,MAAM,yBAAyB;CAClD,UAAU,EACR,MAAM;EACJ,MAAM;EACN,OAAO;EACP,SAAS;CACX,EACF;AACF,CAAC;AAED,MAAM,6BAA6B,IAAI,mCAAmC;AAE1E,MAAM,uBAAuB,QAAQ;CACnC,SAAS;EAAE,MAAM;EAAW,QAAQ;EAA4B,UAAU;CAAM;CAChF,MAAM;EAAE,MAAM;EAAkB,QAAQ;EAAqB,UAAU;CAAK;CAC5E,OAAO;EAAE,MAAM;EAAS,QAAQ;EAA+B,UAAU;CAAK;AAChF,CAAC"}
|
|
@@ -4,6 +4,13 @@ declare const segmentedControlIndicatorRecipe: (props?: import("class-variance-a
|
|
|
4
4
|
declare const segmentedControlItemRecipe: (props?: ({
|
|
5
5
|
checked?: boolean | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare const segmentedControlAnatomy: {
|
|
8
|
+
readonly root: {
|
|
9
|
+
readonly part: "segmented-control";
|
|
10
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
|
+
readonly required: true;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
7
14
|
//#endregion
|
|
8
|
-
export { segmentedControlIndicatorRecipe, segmentedControlItemRecipe, segmentedControlRecipe };
|
|
15
|
+
export { segmentedControlAnatomy, segmentedControlIndicatorRecipe, segmentedControlItemRecipe, segmentedControlRecipe };
|
|
9
16
|
//# sourceMappingURL=segmentedControl.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress, controlReach, hitArea } from "../parts/control.js";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
//#region src/recipes/segmentedControl.ts
|
|
@@ -23,7 +24,12 @@ const segmentedControlItemRecipe = cva([
|
|
|
23
24
|
true: "text-tf-on-accent"
|
|
24
25
|
} }
|
|
25
26
|
});
|
|
27
|
+
const segmentedControlAnatomy = anatomy({ root: {
|
|
28
|
+
part: "segmented-control",
|
|
29
|
+
recipe: segmentedControlRecipe,
|
|
30
|
+
required: true
|
|
31
|
+
} });
|
|
26
32
|
//#endregion
|
|
27
|
-
export { segmentedControlIndicatorRecipe, segmentedControlItemRecipe, segmentedControlRecipe };
|
|
33
|
+
export { segmentedControlAnatomy, segmentedControlIndicatorRecipe, segmentedControlItemRecipe, segmentedControlRecipe };
|
|
28
34
|
|
|
29
35
|
//# sourceMappingURL=segmentedControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentedControl.js","names":[],"sources":["../../src/recipes/segmentedControl.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress, controlReach, hitArea } from '#parts/control'\n\nconst HIT_AREA = hitArea('after:h-tf-target')\n\nconst segmentedControlRecipe = cva(\n 'relative isolate flex items-center gap-1 rounded-tf-pill bg-tf-panel p-1',\n)\n\nconst segmentedControlIndicatorRecipe = cva([\n 'pointer-events-none absolute z-[-1] rounded-tf-pill bg-tf-blend blend-tf-accent',\n 'top-(--top) left-(--left) h-(--height) w-(--width)',\n '[--transition-duration:var(--tf-duration-1)]',\n '[--transition-timing-function:var(--ease-tf)]',\n])\n\nconst segmentedControlItemRecipe = cva(\n [\n 'relative flex h-tf-control-2xs items-center rounded-tf-pill px-3 text-tf-caption-sm font-normal',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n HIT_AREA,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { checked: false },\n variants: {\n checked: {\n false: 'text-tf-muted interactive:hovered:text-tf-fg',\n true: 'text-tf-on-accent',\n },\n },\n },\n)\n\
|
|
1
|
+
{"version":3,"file":"segmentedControl.js","names":[],"sources":["../../src/recipes/segmentedControl.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress, controlReach, hitArea } from '#parts/control'\n\nconst HIT_AREA = hitArea('after:h-tf-target')\n\nconst segmentedControlRecipe = cva(\n 'relative isolate flex items-center gap-1 rounded-tf-pill bg-tf-panel p-1',\n)\n\nconst segmentedControlIndicatorRecipe = cva([\n 'pointer-events-none absolute z-[-1] rounded-tf-pill bg-tf-blend blend-tf-accent',\n 'top-(--top) left-(--left) h-(--height) w-(--width)',\n '[--transition-duration:var(--tf-duration-1)]',\n '[--transition-timing-function:var(--ease-tf)]',\n])\n\nconst segmentedControlItemRecipe = cva(\n [\n 'relative flex h-tf-control-2xs items-center rounded-tf-pill px-3 text-tf-caption-sm font-normal',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n HIT_AREA,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { checked: false },\n variants: {\n checked: {\n false: 'text-tf-muted interactive:hovered:text-tf-fg',\n true: 'text-tf-on-accent',\n },\n },\n },\n)\n\nconst segmentedControlAnatomy = anatomy({\n root: { part: 'segmented-control', recipe: segmentedControlRecipe, required: true },\n})\n\nexport {\n segmentedControlAnatomy,\n segmentedControlIndicatorRecipe,\n segmentedControlItemRecipe,\n segmentedControlRecipe,\n}\n"],"mappings":";;;;AAKA,MAAM,WAAW,QAAQ,mBAAmB;AAE5C,MAAM,yBAAyB,IAC7B,0EACF;AAEA,MAAM,kCAAkC,IAAI;CAC1C;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,6BAA6B,IACjC;CACE;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;AACL,GACA;CACE,iBAAiB,EAAE,SAAS,MAAM;CAClC,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;CACR,EACF;AACF,CACF;AAEA,MAAM,0BAA0B,QAAQ,EACtC,MAAM;CAAE,MAAM;CAAqB,QAAQ;CAAwB,UAAU;AAAK,EACpF,CAAC"}
|