@techfides/ui-library-design 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/anatomies.d.ts +1586 -0
- package/dist/anatomies.js +107 -0
- package/dist/anatomies.js.map +1 -0
- package/dist/anatomy.d.ts +13 -0
- package/dist/anatomy.js +6 -0
- package/dist/anatomy.js.map +1 -0
- package/dist/control.d.ts +1 -2
- package/dist/control.js +1 -2
- package/dist/control.js.map +1 -1
- package/dist/index.d.ts +55 -52
- package/dist/index.js +59 -56
- package/dist/recipes/accordion.d.ts +28 -1
- package/dist/recipes/accordion.js +29 -1
- package/dist/recipes/accordion.js.map +1 -1
- package/dist/recipes/alert.d.ts +45 -1
- package/dist/recipes/alert.js +45 -1
- package/dist/recipes/alert.js.map +1 -1
- package/dist/recipes/band.d.ts +11 -1
- package/dist/recipes/band.js +7 -1
- package/dist/recipes/band.js.map +1 -1
- package/dist/recipes/bars.d.ts +60 -1
- package/dist/recipes/bars.js +59 -1
- package/dist/recipes/bars.js.map +1 -1
- package/dist/recipes/brandMark.d.ts +8 -1
- package/dist/recipes/brandMark.js +7 -1
- package/dist/recipes/brandMark.js.map +1 -1
- package/dist/recipes/button.d.ts +41 -4
- package/dist/recipes/button.js +31 -2
- package/dist/recipes/button.js.map +1 -1
- package/dist/recipes/cardHeader.d.ts +18 -1
- package/dist/recipes/cardHeader.js +19 -1
- package/dist/recipes/cardHeader.js.map +1 -1
- package/dist/recipes/checkbox.d.ts +16 -1
- package/dist/recipes/checkbox.js +16 -3
- package/dist/recipes/checkbox.js.map +1 -1
- package/dist/recipes/chip.d.ts +41 -2
- package/dist/recipes/chip.js +34 -1
- package/dist/recipes/chip.js.map +1 -1
- package/dist/recipes/codeEditor.d.ts +8 -1
- package/dist/recipes/codeEditor.js +7 -1
- package/dist/recipes/codeEditor.js.map +1 -1
- package/dist/recipes/datePicker.d.ts +62 -1
- package/dist/recipes/datePicker.js +56 -3
- package/dist/recipes/datePicker.js.map +1 -1
- package/dist/recipes/dialog.d.ts +49 -1
- package/dist/recipes/dialog.js +40 -1
- package/dist/recipes/dialog.js.map +1 -1
- package/dist/recipes/feature.d.ts +30 -1
- package/dist/recipes/feature.js +30 -2
- package/dist/recipes/feature.js.map +1 -1
- package/dist/recipes/field.js +1 -1
- package/dist/recipes/findings.d.ts +33 -1
- package/dist/recipes/findings.js +34 -1
- package/dist/recipes/findings.js.map +1 -1
- package/dist/recipes/heading.d.ts +12 -2
- package/dist/recipes/heading.js +7 -1
- package/dist/recipes/heading.js.map +1 -1
- package/dist/recipes/heartbeat.d.ts +52 -2
- package/dist/recipes/heartbeat.js +51 -4
- package/dist/recipes/heartbeat.js.map +1 -1
- package/dist/recipes/ink.d.ts +11 -0
- package/dist/recipes/ink.js +13 -0
- package/dist/recipes/ink.js.map +1 -0
- package/dist/recipes/input.d.ts +55 -1
- package/dist/recipes/input.js +52 -2
- package/dist/recipes/input.js.map +1 -1
- package/dist/recipes/listItem.d.ts +18 -1
- package/dist/recipes/listItem.js +20 -1
- package/dist/recipes/listItem.js.map +1 -1
- package/dist/recipes/listbox.d.ts +22 -2
- package/dist/recipes/listbox.js +19 -1
- package/dist/recipes/listbox.js.map +1 -1
- package/dist/recipes/marquee.d.ts +26 -2
- package/dist/recipes/marquee.js +24 -1
- package/dist/recipes/marquee.js.map +1 -1
- package/dist/recipes/menu.d.ts +33 -1
- package/dist/recipes/menu.js +29 -1
- package/dist/recipes/menu.js.map +1 -1
- package/dist/recipes/metaRow.d.ts +11 -2
- package/dist/recipes/metaRow.js +7 -1
- package/dist/recipes/metaRow.js.map +1 -1
- package/dist/recipes/meter.d.ts +36 -2
- package/dist/recipes/meter.js +34 -1
- package/dist/recipes/meter.js.map +1 -1
- package/dist/recipes/motion.d.ts +9 -1
- package/dist/recipes/nebula.js +1 -1
- package/dist/recipes/numberRange.d.ts +44 -1
- package/dist/recipes/numberRange.js +36 -1
- package/dist/recipes/numberRange.js.map +1 -1
- package/dist/recipes/paper.d.ts +55 -2
- package/dist/recipes/paper.js +47 -4
- package/dist/recipes/paper.js.map +1 -1
- package/dist/recipes/progressBar.d.ts +8 -1
- package/dist/recipes/progressBar.js +7 -1
- package/dist/recipes/progressBar.js.map +1 -1
- package/dist/recipes/queue.d.ts +33 -1
- package/dist/recipes/queue.js +35 -1
- package/dist/recipes/queue.js.map +1 -1
- package/dist/recipes/radioGroup.d.ts +18 -1
- package/dist/recipes/radioGroup.js +21 -3
- package/dist/recipes/radioGroup.js.map +1 -1
- package/dist/recipes/scopeSwitcher.d.ts +38 -1
- package/dist/recipes/scopeSwitcher.js +40 -1
- package/dist/recipes/scopeSwitcher.js.map +1 -1
- package/dist/recipes/scrollArea.d.ts +12 -3
- package/dist/recipes/scrollArea.js +7 -1
- package/dist/recipes/scrollArea.js.map +1 -1
- package/dist/recipes/searchPalette.d.ts +48 -1
- package/dist/recipes/searchPalette.js +49 -1
- package/dist/recipes/searchPalette.js.map +1 -1
- package/dist/recipes/sectionHeader.d.ts +20 -2
- package/dist/recipes/sectionHeader.js +20 -3
- package/dist/recipes/sectionHeader.js.map +1 -1
- package/dist/recipes/segmentedControl.d.ts +8 -1
- package/dist/recipes/segmentedControl.js +7 -1
- package/dist/recipes/segmentedControl.js.map +1 -1
- package/dist/recipes/select.d.ts +57 -1
- package/dist/recipes/select.js +51 -1
- package/dist/recipes/select.js.map +1 -1
- package/dist/recipes/separator.d.ts +13 -2
- package/dist/recipes/separator.js +8 -2
- package/dist/recipes/separator.js.map +1 -1
- package/dist/recipes/sidebar.d.ts +128 -2
- package/dist/recipes/sidebar.js +125 -2
- package/dist/recipes/sidebar.js.map +1 -1
- package/dist/recipes/sky.d.ts +31 -1
- package/dist/recipes/sky.js +30 -1
- package/dist/recipes/sky.js.map +1 -1
- package/dist/recipes/slider.d.ts +15 -1
- package/dist/recipes/slider.js +14 -1
- package/dist/recipes/slider.js.map +1 -1
- package/dist/recipes/stat.d.ts +71 -1
- package/dist/recipes/stat.js +73 -3
- package/dist/recipes/stat.js.map +1 -1
- package/dist/recipes/switch.d.ts +10 -1
- package/dist/recipes/switch.js +9 -3
- package/dist/recipes/switch.js.map +1 -1
- package/dist/recipes/table.d.ts +63 -3
- package/dist/recipes/table.js +56 -2
- package/dist/recipes/table.js.map +1 -1
- package/dist/recipes/tail.d.ts +40 -5
- package/dist/recipes/tail.js +37 -5
- package/dist/recipes/tail.js.map +1 -1
- package/dist/recipes/text.d.ts +16 -3
- package/dist/recipes/text.js +8 -3
- package/dist/recipes/text.js.map +1 -1
- package/dist/recipes/textarea.d.ts +46 -1
- package/dist/recipes/textarea.js +41 -1
- package/dist/recipes/textarea.js.map +1 -1
- package/dist/recipes/tile.d.ts +23 -1
- package/dist/recipes/tile.js +19 -1
- package/dist/recipes/tile.js.map +1 -1
- package/dist/recipes/tooltip.d.ts +8 -1
- package/dist/recipes/tooltip.js +7 -1
- package/dist/recipes/tooltip.js.map +1 -1
- package/dist/recipes/topBar.d.ts +43 -1
- package/dist/recipes/topBar.js +44 -1
- package/dist/recipes/topBar.js.map +1 -1
- package/dist/recipes/trail.d.ts +55 -5
- package/dist/recipes/trail.js +47 -5
- package/dist/recipes/trail.js.map +1 -1
- package/dist/recipes/userMenu.d.ts +23 -1
- package/dist/recipes/userMenu.js +24 -1
- package/dist/recipes/userMenu.js.map +1 -1
- package/package.json +1 -1
package/dist/recipes/select.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
|
+
import { fieldFootRecipe, fieldRecipe, trailingRecipe } from "./field.js";
|
|
3
|
+
import { menuMarkRecipe, menuShortcutRecipe } from "./menu.js";
|
|
1
4
|
import { cva } from "class-variance-authority";
|
|
2
5
|
//#region src/recipes/select.ts
|
|
3
6
|
const selectTriggerRecipe = cva([
|
|
@@ -15,7 +18,54 @@ const selectRowRecipe = cva([
|
|
|
15
18
|
"has-data-[state=open]:**:data-[part=trailing]:stroke-tf-ink"
|
|
16
19
|
]);
|
|
17
20
|
const selectEmptyRecipe = cva(["flex h-tf-row min-h-tf-row flex-none items-center px-3", "text-tf-body-sm font-medium text-tf-muted"]);
|
|
21
|
+
const selectAnatomy = anatomy({
|
|
22
|
+
empty: {
|
|
23
|
+
part: "empty",
|
|
24
|
+
recipe: selectEmptyRecipe,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
foot: {
|
|
28
|
+
part: "foot",
|
|
29
|
+
recipe: fieldFootRecipe,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
held: {
|
|
33
|
+
part: "held",
|
|
34
|
+
recipe: menuMarkRecipe,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
mark: {
|
|
38
|
+
part: "mark",
|
|
39
|
+
recipe: menuMarkRecipe,
|
|
40
|
+
required: true
|
|
41
|
+
},
|
|
42
|
+
meta: {
|
|
43
|
+
part: "meta",
|
|
44
|
+
recipe: menuShortcutRecipe,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
root: {
|
|
48
|
+
part: "select",
|
|
49
|
+
recipe: fieldRecipe,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
row: {
|
|
53
|
+
part: "row",
|
|
54
|
+
recipe: selectRowRecipe,
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
spinner: {
|
|
58
|
+
part: "spinner",
|
|
59
|
+
recipe: trailingRecipe,
|
|
60
|
+
required: false
|
|
61
|
+
},
|
|
62
|
+
trailing: {
|
|
63
|
+
part: "trailing",
|
|
64
|
+
recipe: trailingRecipe,
|
|
65
|
+
required: true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
18
68
|
//#endregion
|
|
19
|
-
export { selectEmptyRecipe, selectIndicatorRecipe, selectRowRecipe, selectTriggerRecipe, selectValueRecipe };
|
|
69
|
+
export { selectAnatomy, selectEmptyRecipe, selectIndicatorRecipe, selectRowRecipe, selectTriggerRecipe, selectValueRecipe };
|
|
20
70
|
|
|
21
71
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../src/recipes/select.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst selectTriggerRecipe = cva([\n 'flex items-center text-left',\n 'cursor-pointer disabled:cursor-not-allowed',\n 'data-readonly:cursor-default',\n 'outline-hidden',\n])\n\nconst selectValueRecipe = cva('min-w-0 flex-1 truncate')\n\nconst selectIndicatorRecipe = cva([\n 'tf-transition motion-reduce:transition-none',\n 'data-[state=open]:rotate-180',\n])\n\nconst selectRowRecipe = cva([\n 'reached:**:data-[part=trailing]:text-tf-accent-hi',\n 'reached:**:data-[part=trailing]:stroke-tf-ink',\n 'has-data-[state=open]:**:data-[part=trailing]:text-tf-accent-hi',\n 'has-data-[state=open]:**:data-[part=trailing]:stroke-tf-ink',\n])\n\nconst selectEmptyRecipe = cva([\n 'flex h-tf-row min-h-tf-row flex-none items-center px-3',\n 'text-tf-body-sm font-medium text-tf-muted',\n])\n\nexport {\n selectEmptyRecipe,\n selectIndicatorRecipe,\n selectRowRecipe,\n selectTriggerRecipe,\n selectValueRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../src/recipes/select.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { fieldFootRecipe, fieldRecipe, trailingRecipe } from './field'\nimport { menuMarkRecipe, menuShortcutRecipe } from './menu'\n\nconst selectTriggerRecipe = cva([\n 'flex items-center text-left',\n 'cursor-pointer disabled:cursor-not-allowed',\n 'data-readonly:cursor-default',\n 'outline-hidden',\n])\n\nconst selectValueRecipe = cva('min-w-0 flex-1 truncate')\n\nconst selectIndicatorRecipe = cva([\n 'tf-transition motion-reduce:transition-none',\n 'data-[state=open]:rotate-180',\n])\n\nconst selectRowRecipe = cva([\n 'reached:**:data-[part=trailing]:text-tf-accent-hi',\n 'reached:**:data-[part=trailing]:stroke-tf-ink',\n 'has-data-[state=open]:**:data-[part=trailing]:text-tf-accent-hi',\n 'has-data-[state=open]:**:data-[part=trailing]:stroke-tf-ink',\n])\n\nconst selectEmptyRecipe = cva([\n 'flex h-tf-row min-h-tf-row flex-none items-center px-3',\n 'text-tf-body-sm font-medium text-tf-muted',\n])\n\nconst selectAnatomy = anatomy({\n empty: { part: 'empty', recipe: selectEmptyRecipe, required: false },\n foot: { part: 'foot', recipe: fieldFootRecipe, required: true },\n held: { part: 'held', recipe: menuMarkRecipe, required: true },\n mark: { part: 'mark', recipe: menuMarkRecipe, required: true },\n meta: { part: 'meta', recipe: menuShortcutRecipe, required: false },\n root: { part: 'select', recipe: fieldRecipe, required: true },\n row: { part: 'row', recipe: selectRowRecipe, required: true },\n spinner: { part: 'spinner', recipe: trailingRecipe, required: false },\n trailing: { part: 'trailing', recipe: trailingRecipe, required: true },\n})\n\nexport {\n selectAnatomy,\n selectEmptyRecipe,\n selectIndicatorRecipe,\n selectRowRecipe,\n selectTriggerRecipe,\n selectValueRecipe,\n}\n"],"mappings":";;;;;AAOA,MAAM,sBAAsB,IAAI;CAC9B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,yBAAyB;AAEvD,MAAM,wBAAwB,IAAI,CAChC,+CACA,8BACF,CAAC;AAED,MAAM,kBAAkB,IAAI;CAC1B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,CAC5B,0DACA,2CACF,CAAC;AAED,MAAM,gBAAgB,QAAQ;CAC5B,OAAO;EAAE,MAAM;EAAS,QAAQ;EAAmB,UAAU;CAAM;CACnE,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAiB,UAAU;CAAK;CAC9D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAK;CAC7D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAgB,UAAU;CAAK;CAC7D,MAAM;EAAE,MAAM;EAAQ,QAAQ;EAAoB,UAAU;CAAM;CAClE,MAAM;EAAE,MAAM;EAAU,QAAQ;EAAa,UAAU;CAAK;CAC5D,KAAK;EAAE,MAAM;EAAO,QAAQ;EAAiB,UAAU;CAAK;CAC5D,SAAS;EAAE,MAAM;EAAW,QAAQ;EAAgB,UAAU;CAAM;CACpE,UAAU;EAAE,MAAM;EAAY,QAAQ;EAAgB,UAAU;CAAK;AACvE,CAAC"}
|
|
@@ -5,13 +5,24 @@ declare const defaultSeparatorOrientation = "horizontal";
|
|
|
5
5
|
declare const defaultSeparatorVariant = "filled";
|
|
6
6
|
declare const defaultSeparatorTone = "accent";
|
|
7
7
|
declare const separatorRecipe: (props?: ({
|
|
8
|
-
orientation?: "
|
|
8
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
9
9
|
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
10
10
|
variant?: "quiet" | "filled" | "fade" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
declare const separatorOrientations: readonly ["horizontal", "vertical"];
|
|
13
13
|
declare const separatorVariants: readonly ["fade", "filled", "quiet"];
|
|
14
14
|
declare const separatorTones: readonly ["accent", "success", "warning", "info", "danger"];
|
|
15
|
+
declare const separatorAnatomy: {
|
|
16
|
+
readonly root: {
|
|
17
|
+
readonly part: "separator";
|
|
18
|
+
readonly recipe: (props?: ({
|
|
19
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
20
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
21
|
+
variant?: "quiet" | "filled" | "fade" | null | undefined;
|
|
22
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
23
|
+
readonly required: true;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
15
26
|
//#endregion
|
|
16
|
-
export { type SeparatorOrientation, type SeparatorVariant, defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
27
|
+
export { type SeparatorOrientation, type SeparatorVariant, defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorAnatomy, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
17
28
|
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
2
|
import { fadingDownOf, fadingOf, filledDownOf, filledOf, ruleQuiet, ruleQuietDown } from "../parts/rule.js";
|
|
3
3
|
import { defaultTone, tones } from "../parts/tone.js";
|
|
4
|
+
import { toneBlend } from "../tone.js";
|
|
4
5
|
import { cva } from "class-variance-authority";
|
|
5
6
|
//#region src/recipes/separator.ts
|
|
6
7
|
const defaultSeparatorOrientation = "horizontal";
|
|
@@ -80,7 +81,12 @@ const separatorVariants = [
|
|
|
80
81
|
"quiet"
|
|
81
82
|
];
|
|
82
83
|
const separatorTones = tones;
|
|
84
|
+
const separatorAnatomy = anatomy({ root: {
|
|
85
|
+
part: "separator",
|
|
86
|
+
recipe: separatorRecipe,
|
|
87
|
+
required: true
|
|
88
|
+
} });
|
|
83
89
|
//#endregion
|
|
84
|
-
export { defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
90
|
+
export { defaultSeparatorOrientation, defaultSeparatorTone, defaultSeparatorVariant, separatorAnatomy, separatorOrientations, separatorRecipe, separatorTones, separatorVariants };
|
|
85
91
|
|
|
86
92
|
//# sourceMappingURL=separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","names":[],"sources":["../../src/recipes/separator.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport {\n fadingDownOf,\n fadingOf,\n filledDownOf,\n filledOf,\n ruleQuiet,\n ruleQuietDown,\n} from '#parts/rule'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\ntype SeparatorOrientation = 'horizontal' | 'vertical'\n\ntype SeparatorVariant = 'fade' | 'filled' | 'quiet'\n\nconst defaultSeparatorOrientation = 'horizontal' satisfies SeparatorOrientation\n\nconst defaultSeparatorVariant = 'filled' satisfies SeparatorVariant\n\nconst defaultSeparatorTone = defaultTone\n\ninterface TonedRule {\n class: string\n orientation: SeparatorOrientation\n tone: Tone\n variant: SeparatorVariant\n}\n\nconst tonedRules: TonedRule[] = tones.flatMap((tone) => {\n const blend = toneBlend[tone]\n\n return [\n { class: fadingOf(blend), orientation: 'horizontal', tone, variant: 'fade' },\n { class: filledOf(blend), orientation: 'horizontal', tone, variant: 'filled' },\n { class: fadingDownOf(blend), orientation: 'vertical', tone, variant: 'fade' },\n { class: filledDownOf(blend), orientation: 'vertical', tone, variant: 'filled' },\n ]\n})\n\nconst separatorRecipe = cva('shrink-0', {\n compoundVariants: [\n { class: ruleQuiet, orientation: 'horizontal', variant: 'quiet' },\n { class: ruleQuietDown, orientation: 'vertical', variant: 'quiet' },\n ...tonedRules,\n ],\n defaultVariants: {\n orientation: defaultSeparatorOrientation,\n tone: defaultSeparatorTone,\n variant: defaultSeparatorVariant,\n },\n variants: {\n orientation: {\n horizontal: 'w-full',\n vertical: 'self-stretch',\n } satisfies Record<SeparatorOrientation, string>,\n tone: {\n accent: '',\n danger: '',\n info: '',\n success: '',\n warning: '',\n } satisfies Record<Tone, string>,\n variant: {\n fade: '',\n filled: '',\n quiet: '',\n } satisfies Record<SeparatorVariant, string>,\n },\n})\n\nconst separatorOrientations = [\n 'horizontal',\n 'vertical',\n] as const satisfies readonly SeparatorOrientation[]\n\nconst separatorVariants = ['fade', 'filled', 'quiet'] as const satisfies readonly SeparatorVariant[]\n\nconst separatorTones = tones\n\nexport {\n type SeparatorOrientation,\n type SeparatorVariant,\n defaultSeparatorOrientation,\n defaultSeparatorTone,\n defaultSeparatorVariant,\n separatorOrientations,\n separatorRecipe,\n separatorTones,\n separatorVariants,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../src/recipes/separator.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport {\n fadingDownOf,\n fadingOf,\n filledDownOf,\n filledOf,\n ruleQuiet,\n ruleQuietDown,\n} from '#parts/rule'\nimport { defaultTone, tones } from '#parts/tone'\nimport type { Tone } from '#tone'\nimport { toneBlend } from '#tone'\n\ntype SeparatorOrientation = 'horizontal' | 'vertical'\n\ntype SeparatorVariant = 'fade' | 'filled' | 'quiet'\n\nconst defaultSeparatorOrientation = 'horizontal' satisfies SeparatorOrientation\n\nconst defaultSeparatorVariant = 'filled' satisfies SeparatorVariant\n\nconst defaultSeparatorTone = defaultTone\n\ninterface TonedRule {\n class: string\n orientation: SeparatorOrientation\n tone: Tone\n variant: SeparatorVariant\n}\n\nconst tonedRules: TonedRule[] = tones.flatMap((tone) => {\n const blend = toneBlend[tone]\n\n return [\n { class: fadingOf(blend), orientation: 'horizontal', tone, variant: 'fade' },\n { class: filledOf(blend), orientation: 'horizontal', tone, variant: 'filled' },\n { class: fadingDownOf(blend), orientation: 'vertical', tone, variant: 'fade' },\n { class: filledDownOf(blend), orientation: 'vertical', tone, variant: 'filled' },\n ]\n})\n\nconst separatorRecipe = cva('shrink-0', {\n compoundVariants: [\n { class: ruleQuiet, orientation: 'horizontal', variant: 'quiet' },\n { class: ruleQuietDown, orientation: 'vertical', variant: 'quiet' },\n ...tonedRules,\n ],\n defaultVariants: {\n orientation: defaultSeparatorOrientation,\n tone: defaultSeparatorTone,\n variant: defaultSeparatorVariant,\n },\n variants: {\n orientation: {\n horizontal: 'w-full',\n vertical: 'self-stretch',\n } satisfies Record<SeparatorOrientation, string>,\n tone: {\n accent: '',\n danger: '',\n info: '',\n success: '',\n warning: '',\n } satisfies Record<Tone, string>,\n variant: {\n fade: '',\n filled: '',\n quiet: '',\n } satisfies Record<SeparatorVariant, string>,\n },\n})\n\nconst separatorOrientations = [\n 'horizontal',\n 'vertical',\n] as const satisfies readonly SeparatorOrientation[]\n\nconst separatorVariants = ['fade', 'filled', 'quiet'] as const satisfies readonly SeparatorVariant[]\n\nconst separatorTones = tones\n\nconst separatorAnatomy = anatomy({\n root: { part: 'separator', recipe: separatorRecipe, required: true },\n})\n\nexport {\n type SeparatorOrientation,\n type SeparatorVariant,\n defaultSeparatorOrientation,\n defaultSeparatorTone,\n defaultSeparatorVariant,\n separatorAnatomy,\n separatorOrientations,\n separatorRecipe,\n separatorTones,\n separatorVariants,\n}\n"],"mappings":";;;;;;AAmBA,MAAM,8BAA8B;AAEpC,MAAM,0BAA0B;AAEhC,MAAM,uBAAuB;AAS7B,MAAM,aAA0B,MAAM,SAAS,SAAS;CACtD,MAAM,QAAQ,UAAU;CAExB,OAAO;EACL;GAAE,OAAO,SAAS,KAAK;GAAG,aAAa;GAAc;GAAM,SAAS;EAAO;EAC3E;GAAE,OAAO,SAAS,KAAK;GAAG,aAAa;GAAc;GAAM,SAAS;EAAS;EAC7E;GAAE,OAAO,aAAa,KAAK;GAAG,aAAa;GAAY;GAAM,SAAS;EAAO;EAC7E;GAAE,OAAO,aAAa,KAAK;GAAG,aAAa;GAAY;GAAM,SAAS;EAAS;CACjF;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,YAAY;CACtC,kBAAkB;EAChB;GAAE,OAAO;GAAW,aAAa;GAAc,SAAS;EAAQ;EAChE;GAAE,OAAO;GAAe,aAAa;GAAY,SAAS;EAAQ;EAClE,GAAG;CACL;CACA,iBAAiB;EACf,aAAa;EACb,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,aAAa;GACX,YAAY;GACZ,UAAU;EACZ;EACA,MAAM;GACJ,QAAQ;GACR,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;EACX;EACA,SAAS;GACP,MAAM;GACN,QAAQ;GACR,OAAO;EACT;CACF;AACF,CAAC;AAED,MAAM,wBAAwB,CAC5B,cACA,UACF;AAEA,MAAM,oBAAoB;CAAC;CAAQ;CAAU;AAAO;AAEpD,MAAM,iBAAiB;AAEvB,MAAM,mBAAmB,QAAQ,EAC/B,MAAM;CAAE,MAAM;CAAa,QAAQ;CAAiB,UAAU;AAAK,EACrE,CAAC"}
|
|
@@ -27,7 +27,7 @@ declare const sidebarNavRecipe: (props?: import("class-variance-authority/types"
|
|
|
27
27
|
declare const sidebarMarkRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
28
28
|
declare const sidebarGroupRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
29
29
|
declare const sidebarItemRecipe: (props?: ({
|
|
30
|
-
level?: "
|
|
30
|
+
level?: "child" | "top" | null | undefined;
|
|
31
31
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
32
32
|
declare const sidebarIconRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
33
33
|
declare const sidebarLabelRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
@@ -35,6 +35,132 @@ declare const sidebarChevronRecipe: (props?: import("class-variance-authority/ty
|
|
|
35
35
|
declare const sidebarDotRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
36
36
|
declare const sidebarSubRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
37
37
|
declare const sidebarFootRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
38
|
+
declare const sidebarAnatomy: {
|
|
39
|
+
readonly brand: {
|
|
40
|
+
readonly part: "brand";
|
|
41
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
42
|
+
readonly required: true;
|
|
43
|
+
};
|
|
44
|
+
readonly brandStack: {
|
|
45
|
+
readonly part: "brand-stack";
|
|
46
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
47
|
+
readonly required: true;
|
|
48
|
+
};
|
|
49
|
+
readonly brandSubtitle: {
|
|
50
|
+
readonly part: "brand-subtitle";
|
|
51
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
52
|
+
readonly required: false;
|
|
53
|
+
};
|
|
54
|
+
readonly child: {
|
|
55
|
+
readonly part: "child";
|
|
56
|
+
readonly recipe: (props?: ({
|
|
57
|
+
level?: "child" | "top" | null | undefined;
|
|
58
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
59
|
+
readonly required: false;
|
|
60
|
+
};
|
|
61
|
+
readonly dot: {
|
|
62
|
+
readonly part: "dot";
|
|
63
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
64
|
+
readonly required: false;
|
|
65
|
+
};
|
|
66
|
+
readonly foot: {
|
|
67
|
+
readonly part: "foot";
|
|
68
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
69
|
+
readonly required: true;
|
|
70
|
+
};
|
|
71
|
+
readonly head: {
|
|
72
|
+
readonly part: "head";
|
|
73
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
74
|
+
readonly required: true;
|
|
75
|
+
};
|
|
76
|
+
readonly item: {
|
|
77
|
+
readonly part: "item";
|
|
78
|
+
readonly recipe: (props?: ({
|
|
79
|
+
level?: "child" | "top" | null | undefined;
|
|
80
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
81
|
+
readonly required: false;
|
|
82
|
+
};
|
|
83
|
+
readonly label: {
|
|
84
|
+
readonly part: "label";
|
|
85
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
86
|
+
readonly required: true;
|
|
87
|
+
};
|
|
88
|
+
readonly mark: {
|
|
89
|
+
readonly part: "mark";
|
|
90
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
91
|
+
readonly required: true;
|
|
92
|
+
};
|
|
93
|
+
readonly mobileBar: {
|
|
94
|
+
readonly part: "mobile-bar";
|
|
95
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
96
|
+
readonly required: true;
|
|
97
|
+
};
|
|
98
|
+
readonly mobileEyebrow: {
|
|
99
|
+
readonly part: "mobile-eyebrow";
|
|
100
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
101
|
+
readonly required: false;
|
|
102
|
+
};
|
|
103
|
+
readonly mobileHeadings: {
|
|
104
|
+
readonly part: "mobile-headings";
|
|
105
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
106
|
+
readonly required: false;
|
|
107
|
+
};
|
|
108
|
+
readonly mobileTitle: {
|
|
109
|
+
readonly part: "mobile-title";
|
|
110
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
111
|
+
readonly required: false;
|
|
112
|
+
};
|
|
113
|
+
readonly nav: {
|
|
114
|
+
readonly part: "nav";
|
|
115
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
116
|
+
readonly required: true;
|
|
117
|
+
};
|
|
118
|
+
readonly overlayBody: {
|
|
119
|
+
readonly part: "overlay-body";
|
|
120
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
121
|
+
readonly required: true;
|
|
122
|
+
};
|
|
123
|
+
readonly overlayBrand: {
|
|
124
|
+
readonly part: "overlay-brand";
|
|
125
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
126
|
+
readonly required: true;
|
|
127
|
+
};
|
|
128
|
+
readonly overlayHead: {
|
|
129
|
+
readonly part: "overlay-head";
|
|
130
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
131
|
+
readonly required: true;
|
|
132
|
+
};
|
|
133
|
+
readonly overlayScope: {
|
|
134
|
+
readonly part: "overlay-scope";
|
|
135
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
136
|
+
readonly required: false;
|
|
137
|
+
};
|
|
138
|
+
readonly root: {
|
|
139
|
+
readonly part: "sidebar";
|
|
140
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
141
|
+
readonly required: true;
|
|
142
|
+
};
|
|
143
|
+
readonly scope: {
|
|
144
|
+
readonly part: "scope";
|
|
145
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
146
|
+
readonly required: false;
|
|
147
|
+
};
|
|
148
|
+
readonly separator: {
|
|
149
|
+
readonly part: "separator";
|
|
150
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
151
|
+
readonly required: true;
|
|
152
|
+
};
|
|
153
|
+
readonly switch: {
|
|
154
|
+
readonly part: "switch";
|
|
155
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
156
|
+
readonly required: true;
|
|
157
|
+
};
|
|
158
|
+
readonly wordmark: {
|
|
159
|
+
readonly part: "wordmark";
|
|
160
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
161
|
+
readonly required: true;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
38
164
|
//#endregion
|
|
39
|
-
export { sidebarBrandRecipe, sidebarBrandStackRecipe, sidebarBrandSubtitleRecipe, sidebarChevronRecipe, sidebarDotRecipe, sidebarFootRecipe, sidebarGroupRecipe, sidebarHeadRecipe, sidebarIconRecipe, sidebarItemRecipe, sidebarLabelRecipe, sidebarMarkRecipe, sidebarMobileBarRecipe, sidebarMobileEyebrowRecipe, sidebarMobileHeadingsRecipe, sidebarMobileTitleRecipe, sidebarNavRecipe, sidebarOverlayBackdropRecipe, sidebarOverlayBodyRecipe, sidebarOverlayBrandRecipe, sidebarOverlayHeadRecipe, sidebarOverlayItemActive, sidebarOverlayNavRecipe, sidebarOverlayPanelRecipe, sidebarOverlayPositionerRecipe, sidebarOverlayScopeRecipe, sidebarOverlaySeparatorRecipe, sidebarRecipe, sidebarScopeRecipe, sidebarSubRecipe, sidebarSwitchRecipe, sidebarToggleRecipe, sidebarTravel, sidebarWordmarkRecipe };
|
|
165
|
+
export { sidebarAnatomy, sidebarBrandRecipe, sidebarBrandStackRecipe, sidebarBrandSubtitleRecipe, sidebarChevronRecipe, sidebarDotRecipe, sidebarFootRecipe, sidebarGroupRecipe, sidebarHeadRecipe, sidebarIconRecipe, sidebarItemRecipe, sidebarLabelRecipe, sidebarMarkRecipe, sidebarMobileBarRecipe, sidebarMobileEyebrowRecipe, sidebarMobileHeadingsRecipe, sidebarMobileTitleRecipe, sidebarNavRecipe, sidebarOverlayBackdropRecipe, sidebarOverlayBodyRecipe, sidebarOverlayBrandRecipe, sidebarOverlayHeadRecipe, sidebarOverlayItemActive, sidebarOverlayNavRecipe, sidebarOverlayPanelRecipe, sidebarOverlayPositionerRecipe, sidebarOverlayScopeRecipe, sidebarOverlaySeparatorRecipe, sidebarRecipe, sidebarScopeRecipe, sidebarSubRecipe, sidebarSwitchRecipe, sidebarToggleRecipe, sidebarTravel, sidebarWordmarkRecipe };
|
|
40
166
|
//# sourceMappingURL=sidebar.d.ts.map
|
package/dist/recipes/sidebar.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
1
2
|
import { controlInert, controlPress, controlReach } from "../parts/control.js";
|
|
2
3
|
import { collapseMotion, drawerMotion, railCollapse, railMorph, scrimMirrorMotion } from "./motion.js";
|
|
3
|
-
import { eyebrowLead } from "../parts/eyebrow.js";
|
|
4
4
|
import { surfaceLifted, surfacePanel } from "../parts/surface.js";
|
|
5
|
+
import { eyebrowLead } from "../parts/eyebrow.js";
|
|
5
6
|
import { cva } from "class-variance-authority";
|
|
6
7
|
//#region src/recipes/sidebar.ts
|
|
7
8
|
const CHILD_INSET = "pl-11";
|
|
@@ -122,7 +123,129 @@ const sidebarDotRecipe = cva([
|
|
|
122
123
|
]);
|
|
123
124
|
const sidebarSubRecipe = cva(["flex flex-col gap-1 pt-1", ...collapseMotion]);
|
|
124
125
|
const sidebarFootRecipe = cva("relative mt-auto flex flex-none flex-col gap-1 px-3");
|
|
126
|
+
const sidebarAnatomy = anatomy({
|
|
127
|
+
brand: {
|
|
128
|
+
part: "brand",
|
|
129
|
+
recipe: sidebarBrandRecipe,
|
|
130
|
+
required: true
|
|
131
|
+
},
|
|
132
|
+
brandStack: {
|
|
133
|
+
part: "brand-stack",
|
|
134
|
+
recipe: sidebarBrandStackRecipe,
|
|
135
|
+
required: true
|
|
136
|
+
},
|
|
137
|
+
brandSubtitle: {
|
|
138
|
+
part: "brand-subtitle",
|
|
139
|
+
recipe: sidebarBrandSubtitleRecipe,
|
|
140
|
+
required: false
|
|
141
|
+
},
|
|
142
|
+
child: {
|
|
143
|
+
part: "child",
|
|
144
|
+
recipe: sidebarItemRecipe,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
dot: {
|
|
148
|
+
part: "dot",
|
|
149
|
+
recipe: sidebarDotRecipe,
|
|
150
|
+
required: false
|
|
151
|
+
},
|
|
152
|
+
foot: {
|
|
153
|
+
part: "foot",
|
|
154
|
+
recipe: sidebarFootRecipe,
|
|
155
|
+
required: true
|
|
156
|
+
},
|
|
157
|
+
head: {
|
|
158
|
+
part: "head",
|
|
159
|
+
recipe: sidebarHeadRecipe,
|
|
160
|
+
required: true
|
|
161
|
+
},
|
|
162
|
+
item: {
|
|
163
|
+
part: "item",
|
|
164
|
+
recipe: sidebarItemRecipe,
|
|
165
|
+
required: false
|
|
166
|
+
},
|
|
167
|
+
label: {
|
|
168
|
+
part: "label",
|
|
169
|
+
recipe: sidebarLabelRecipe,
|
|
170
|
+
required: true
|
|
171
|
+
},
|
|
172
|
+
mark: {
|
|
173
|
+
part: "mark",
|
|
174
|
+
recipe: sidebarMarkRecipe,
|
|
175
|
+
required: true
|
|
176
|
+
},
|
|
177
|
+
mobileBar: {
|
|
178
|
+
part: "mobile-bar",
|
|
179
|
+
recipe: sidebarMobileBarRecipe,
|
|
180
|
+
required: true
|
|
181
|
+
},
|
|
182
|
+
mobileEyebrow: {
|
|
183
|
+
part: "mobile-eyebrow",
|
|
184
|
+
recipe: sidebarMobileEyebrowRecipe,
|
|
185
|
+
required: false
|
|
186
|
+
},
|
|
187
|
+
mobileHeadings: {
|
|
188
|
+
part: "mobile-headings",
|
|
189
|
+
recipe: sidebarMobileHeadingsRecipe,
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
mobileTitle: {
|
|
193
|
+
part: "mobile-title",
|
|
194
|
+
recipe: sidebarMobileTitleRecipe,
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
nav: {
|
|
198
|
+
part: "nav",
|
|
199
|
+
recipe: sidebarNavRecipe,
|
|
200
|
+
required: true
|
|
201
|
+
},
|
|
202
|
+
overlayBody: {
|
|
203
|
+
part: "overlay-body",
|
|
204
|
+
recipe: sidebarOverlayBodyRecipe,
|
|
205
|
+
required: true
|
|
206
|
+
},
|
|
207
|
+
overlayBrand: {
|
|
208
|
+
part: "overlay-brand",
|
|
209
|
+
recipe: sidebarOverlayBrandRecipe,
|
|
210
|
+
required: true
|
|
211
|
+
},
|
|
212
|
+
overlayHead: {
|
|
213
|
+
part: "overlay-head",
|
|
214
|
+
recipe: sidebarOverlayHeadRecipe,
|
|
215
|
+
required: true
|
|
216
|
+
},
|
|
217
|
+
overlayScope: {
|
|
218
|
+
part: "overlay-scope",
|
|
219
|
+
recipe: sidebarOverlayScopeRecipe,
|
|
220
|
+
required: false
|
|
221
|
+
},
|
|
222
|
+
root: {
|
|
223
|
+
part: "sidebar",
|
|
224
|
+
recipe: sidebarRecipe,
|
|
225
|
+
required: true
|
|
226
|
+
},
|
|
227
|
+
scope: {
|
|
228
|
+
part: "scope",
|
|
229
|
+
recipe: sidebarScopeRecipe,
|
|
230
|
+
required: false
|
|
231
|
+
},
|
|
232
|
+
separator: {
|
|
233
|
+
part: "separator",
|
|
234
|
+
recipe: sidebarOverlaySeparatorRecipe,
|
|
235
|
+
required: true
|
|
236
|
+
},
|
|
237
|
+
switch: {
|
|
238
|
+
part: "switch",
|
|
239
|
+
recipe: sidebarSwitchRecipe,
|
|
240
|
+
required: true
|
|
241
|
+
},
|
|
242
|
+
wordmark: {
|
|
243
|
+
part: "wordmark",
|
|
244
|
+
recipe: sidebarWordmarkRecipe,
|
|
245
|
+
required: true
|
|
246
|
+
}
|
|
247
|
+
});
|
|
125
248
|
//#endregion
|
|
126
|
-
export { sidebarBrandRecipe, sidebarBrandStackRecipe, sidebarBrandSubtitleRecipe, sidebarChevronRecipe, sidebarDotRecipe, sidebarFootRecipe, sidebarGroupRecipe, sidebarHeadRecipe, sidebarIconRecipe, sidebarItemRecipe, sidebarLabelRecipe, sidebarMarkRecipe, sidebarMobileBarRecipe, sidebarMobileEyebrowRecipe, sidebarMobileHeadingsRecipe, sidebarMobileTitleRecipe, sidebarNavRecipe, sidebarOverlayBackdropRecipe, sidebarOverlayBodyRecipe, sidebarOverlayBrandRecipe, sidebarOverlayHeadRecipe, sidebarOverlayItemActive, sidebarOverlayNavRecipe, sidebarOverlayPanelRecipe, sidebarOverlayPositionerRecipe, sidebarOverlayScopeRecipe, sidebarOverlaySeparatorRecipe, sidebarRecipe, sidebarScopeRecipe, sidebarSubRecipe, sidebarSwitchRecipe, sidebarToggleRecipe, sidebarTravel, sidebarWordmarkRecipe };
|
|
249
|
+
export { sidebarAnatomy, sidebarBrandRecipe, sidebarBrandStackRecipe, sidebarBrandSubtitleRecipe, sidebarChevronRecipe, sidebarDotRecipe, sidebarFootRecipe, sidebarGroupRecipe, sidebarHeadRecipe, sidebarIconRecipe, sidebarItemRecipe, sidebarLabelRecipe, sidebarMarkRecipe, sidebarMobileBarRecipe, sidebarMobileEyebrowRecipe, sidebarMobileHeadingsRecipe, sidebarMobileTitleRecipe, sidebarNavRecipe, sidebarOverlayBackdropRecipe, sidebarOverlayBodyRecipe, sidebarOverlayBrandRecipe, sidebarOverlayHeadRecipe, sidebarOverlayItemActive, sidebarOverlayNavRecipe, sidebarOverlayPanelRecipe, sidebarOverlayPositionerRecipe, sidebarOverlayScopeRecipe, sidebarOverlaySeparatorRecipe, sidebarRecipe, sidebarScopeRecipe, sidebarSubRecipe, sidebarSwitchRecipe, sidebarToggleRecipe, sidebarTravel, sidebarWordmarkRecipe };
|
|
127
250
|
|
|
128
251
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","names":[],"sources":["../../src/recipes/sidebar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert, controlPress, controlReach } from '#parts/control'\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { surfaceLifted, surfacePanel } from '#parts/surface'\n\nimport { collapseMotion, drawerMotion, railCollapse, railMorph, scrimMirrorMotion } from './motion'\n\nconst CHILD_INSET = 'pl-11'\n\nconst ROW_STRIDE = `calc(var(--spacing-tf-control-md) + var(--spacing))`\n\nconst RAIL_STRIDE = `calc(var(--spacing-tf-control-md) + var(--spacing))`\n\nconst sidebarTravel = (index: number, rail: boolean): string => {\n const step = String(index)\n\n if (rail) {\n return `0 calc(${RAIL_STRIDE} * ${step})`\n }\n return `0 calc(${ROW_STRIDE} * ${step})`\n}\n\nconst MORPHS = railMorph\n\nconst ITEM = [\n 'group relative flex flex-none items-center rounded-tf-control',\n 'text-tf-body text-tf-muted',\n 'interactive:hovered:text-tf-fg aria-[current=page]:text-tf-on-accent',\n 'not-aria-[current=page]:interactive:hovered:bg-tf-panel-hi',\n `cursor-pointer ${MORPHS}`,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n]\n\nconst sidebarRecipe = cva([\n 'sticky top-0 z-tf-dropdown hidden h-dvh min-h-0 flex-none flex-col gap-6 py-6 lg:flex',\n 'w-tf-sidebar data-rail:w-tf-rail',\n 'border-r border-tf-line-2 bg-tf-glass backdrop-blur-tf-glass',\n 'tf-icons font-tf-body text-tf-fg',\n MORPHS,\n])\n\nconst sidebarScopeRecipe = cva('flex-none px-3')\n\nconst sidebarMobileBarRecipe = cva([\n 'fixed inset-x-0 top-0 z-tf-dropdown flex items-center gap-3 px-4 lg:hidden',\n 'h-tf-control-lg border-b border-tf-line-2 bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n])\n\nconst sidebarMobileHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst sidebarMobileEyebrowRecipe = cva(['truncate', eyebrowLead])\n\nconst sidebarMobileTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst sidebarOverlayBackdropRecipe = cva([\n 'fixed inset-0 z-tf-modal bg-tf-scrim backdrop-blur-tf-scrim',\n ...scrimMirrorMotion,\n 'motion-reduce:animate-none',\n])\n\nconst sidebarOverlayPositionerRecipe = cva('fixed inset-0 z-tf-modal flex flex-col font-tf-body')\n\nconst sidebarOverlayPanelRecipe = cva([\n ...surfacePanel,\n ...surfaceLifted,\n 'flex h-full w-full flex-col overflow-hidden rounded-tf-none',\n 'text-tf-body-sm font-medium text-tf-fg',\n ...drawerMotion,\n 'motion-reduce:animate-none',\n])\n\nconst sidebarOverlayHeadRecipe = cva(\n 'relative flex flex-none items-center gap-5 border-b border-tf-line-2 px-4 py-3',\n)\n\nconst sidebarOverlayBrandRecipe = cva([\n 'flex min-w-0 items-center gap-3',\n '[&_svg]:size-tf-icon-solo-sm [&_svg]:shrink-0',\n])\n\nconst sidebarOverlayScopeRecipe = cva('ml-auto truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst sidebarOverlayBodyRecipe = cva([\n 'flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 py-4',\n 'tf-scroll-thin tf-scroll-faded',\n '[--tf-fade-foot:calc(var(--spacing)*2)] [--tf-fade-head:calc(var(--spacing)*2)]',\n])\n\nconst sidebarOverlayNavRecipe = cva('flex flex-none flex-col gap-1')\n\nconst sidebarOverlaySeparatorRecipe = cva('h-px w-full flex-none bg-tf-line-2')\n\nconst sidebarOverlayItemActive =\n 'aria-[current=page]:bg-tf-blend aria-[current=page]:blend-tf-accent'\n\nconst sidebarHeadRecipe = cva(['flex flex-none items-center gap-3 px-3', MORPHS])\n\nconst sidebarBrandRecipe = cva([\n 'flex min-w-0 items-center gap-3 pl-3',\n 'in-data-rail:gap-0 in-data-rail:pl-4',\n '[&_svg]:size-tf-icon-solo-sm [&_svg]:shrink-0',\n MORPHS,\n])\n\nconst sidebarBrandStackRecipe = cva(['flex flex-col gap-px', railCollapse])\n\nconst sidebarWordmarkRecipe = cva(['truncate font-tf-display text-tf-lead tracking-tf-tight'])\n\nconst sidebarBrandSubtitleRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst sidebarToggleRecipe = cva('flex-none [&_svg]:size-tf-icon-solo-sm')\n\nconst sidebarSwitchRecipe = cva([\n 'flex flex-none items-center justify-end in-data-rail:pr-2',\n MORPHS,\n])\n\nconst FADED = [\n 'tf-scroll-faded tf-scroll-thin',\n '[--tf-fade-head:calc(var(--spacing)*2)] [--tf-fade-foot:calc(var(--spacing)*2)]',\n 'outline-hidden focused:outline-2 focused:-outline-offset-2 focused:outline-tf-accent-hi',\n].join(' ')\n\nconst sidebarNavRecipe = cva([\n 'relative flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto px-3 py-2',\n FADED,\n])\n\nconst sidebarMarkRecipe = cva([\n 'pointer-events-none absolute inset-x-3 top-2 h-tf-control-md rounded-tf-control',\n 'in-data-rail:inset-x-4',\n 'bg-tf-blend blend-tf-accent',\n `tf-slides-settle ${MORPHS}`,\n])\n\nconst sidebarGroupRecipe = cva('flex flex-none flex-col')\n\nconst sidebarItemRecipe = cva(\n [\n ...ITEM,\n 'h-tf-control-md min-h-tf-control-md w-full text-left',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ],\n {\n defaultVariants: { level: 'top' },\n variants: {\n level: {\n child: `${CHILD_INSET} pr-3`,\n top: [\n 'gap-3 px-3',\n 'in-data-rail:gap-0',\n 'in-data-rail:px-[calc((var(--spacing-tf-rail)-var(--spacing)*6-var(--spacing-tf-icon-md))/2)]',\n ].join(' '),\n },\n },\n },\n)\n\nconst sidebarIconRecipe = cva([\n 'relative inline-flex size-tf-icon-md flex-none [&_svg]:size-tf-icon-md',\n '[&_svg]:shrink-0',\n MORPHS,\n])\n\nconst sidebarLabelRecipe = cva(['truncate text-left tf-text-trim', railCollapse])\n\nconst sidebarChevronRecipe = cva([\n 'w-tf-icon-sm flex-none overflow-hidden in-data-rail:w-0 in-data-rail:opacity-0',\n 'group-aria-expanded:rotate-180',\n MORPHS,\n])\n\nconst sidebarDotRecipe = cva([\n 'pointer-events-none absolute -right-1 -bottom-1',\n 'size-1 rounded-tf-pill bg-current opacity-0 in-data-rail:opacity-100',\n MORPHS,\n])\n\nconst sidebarSubRecipe = cva(['flex flex-col gap-1 pt-1', ...collapseMotion])\n\nconst sidebarFootRecipe = cva('relative mt-auto flex flex-none flex-col gap-1 px-3')\n\nexport {\n sidebarBrandRecipe,\n sidebarBrandStackRecipe,\n sidebarBrandSubtitleRecipe,\n sidebarChevronRecipe,\n sidebarDotRecipe,\n sidebarFootRecipe,\n sidebarGroupRecipe,\n sidebarHeadRecipe,\n sidebarIconRecipe,\n sidebarItemRecipe,\n sidebarLabelRecipe,\n sidebarMarkRecipe,\n sidebarMobileBarRecipe,\n sidebarMobileEyebrowRecipe,\n sidebarMobileHeadingsRecipe,\n sidebarMobileTitleRecipe,\n sidebarNavRecipe,\n sidebarOverlayBackdropRecipe,\n sidebarOverlayBodyRecipe,\n sidebarOverlayBrandRecipe,\n sidebarOverlayHeadRecipe,\n sidebarOverlayItemActive,\n sidebarOverlayNavRecipe,\n sidebarOverlayPanelRecipe,\n sidebarOverlayPositionerRecipe,\n sidebarOverlayScopeRecipe,\n sidebarOverlaySeparatorRecipe,\n sidebarRecipe,\n sidebarScopeRecipe,\n sidebarSubRecipe,\n sidebarSwitchRecipe,\n sidebarToggleRecipe,\n sidebarTravel,\n sidebarWordmarkRecipe,\n}\n"],"mappings":";;;;;;AAQA,MAAM,cAAc;AAEpB,MAAM,aAAa;AAEnB,MAAM,cAAc;AAEpB,MAAM,iBAAiB,OAAe,SAA0B;CAC9D,MAAM,OAAO,OAAO,KAAK;CAEzB,IAAI,MACF,OAAO,UAAU,YAAY,KAAK,KAAK;CAEzC,OAAO,UAAU,WAAW,KAAK,KAAK;AACxC;AAEA,MAAM,SAAS;AAEf,MAAM,OAAO;CACX;CACA;CACA;CACA;CACA,kBAAkB;CAClB,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAEA,MAAM,gBAAgB,IAAI;CACxB;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,gBAAgB;AAE/C,MAAM,yBAAyB,IAAI;CACjC;CACA;CACA;AACF,CAAC;AAED,MAAM,8BAA8B,IAAI,oCAAoC;AAE5E,MAAM,6BAA6B,IAAI,CAAC,YAAY,WAAW,CAAC;AAEhE,MAAM,2BAA2B,IAC/B,4EACF;AAEA,MAAM,+BAA+B,IAAI;CACvC;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,iCAAiC,IAAI,qDAAqD;AAEhG,MAAM,4BAA4B,IAAI;CACpC,GAAG;CACH,GAAG;CACH;CACA;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,2BAA2B,IAC/B,gFACF;AAEA,MAAM,4BAA4B,IAAI,CACpC,mCACA,+CACF,CAAC;AAED,MAAM,4BAA4B,IAAI,yDAAyD;AAE/F,MAAM,2BAA2B,IAAI;CACnC;CACA;CACA;AACF,CAAC;AAED,MAAM,0BAA0B,IAAI,+BAA+B;AAEnE,MAAM,gCAAgC,IAAI,oCAAoC;AAE9E,MAAM,2BACJ;AAEF,MAAM,oBAAoB,IAAI,CAAC,0CAA0C,MAAM,CAAC;AAEhF,MAAM,qBAAqB,IAAI;CAC7B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,0BAA0B,IAAI,CAAC,wBAAwB,YAAY,CAAC;AAE1E,MAAM,wBAAwB,IAAI,CAAC,yDAAyD,CAAC;AAE7F,MAAM,6BAA6B,IAAI,2CAA2C;AAElF,MAAM,sBAAsB,IAAI,wCAAwC;AAExE,MAAM,sBAAsB,IAAI,CAC9B,6DACA,MACF,CAAC;AAED,MAAM,QAAQ;CACZ;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,mBAAmB,IAAI,CAC3B,yEACA,KACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA,oBAAoB;AACtB,CAAC;AAED,MAAM,qBAAqB,IAAI,yBAAyB;AAExD,MAAM,oBAAoB,IACxB;CACE,GAAG;CACH;CACA;AACF,GACA;CACE,iBAAiB,EAAE,OAAO,MAAM;CAChC,UAAU,EACR,OAAO;EACL,OAAO,GAAG,YAAY;EACtB,KAAK;GACH;GACA;GACA;EACF,CAAC,CAAC,KAAK,GAAG;CACZ,EACF;AACF,CACF;AAEA,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAAC,mCAAmC,YAAY,CAAC;AAEhF,MAAM,uBAAuB,IAAI;CAC/B;CACA;CACA;AACF,CAAC;AAED,MAAM,mBAAmB,IAAI;CAC3B;CACA;CACA;AACF,CAAC;AAED,MAAM,mBAAmB,IAAI,CAAC,4BAA4B,GAAG,cAAc,CAAC;AAE5E,MAAM,oBAAoB,IAAI,qDAAqD"}
|
|
1
|
+
{"version":3,"file":"sidebar.js","names":[],"sources":["../../src/recipes/sidebar.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\nimport { controlInert, controlPress, controlReach } from '#parts/control'\nimport { eyebrowLead } from '#parts/eyebrow'\nimport { surfaceLifted, surfacePanel } from '#parts/surface'\n\nimport { collapseMotion, drawerMotion, railCollapse, railMorph, scrimMirrorMotion } from './motion'\n\nconst CHILD_INSET = 'pl-11'\n\nconst ROW_STRIDE = `calc(var(--spacing-tf-control-md) + var(--spacing))`\n\nconst RAIL_STRIDE = `calc(var(--spacing-tf-control-md) + var(--spacing))`\n\nconst sidebarTravel = (index: number, rail: boolean): string => {\n const step = String(index)\n\n if (rail) {\n return `0 calc(${RAIL_STRIDE} * ${step})`\n }\n return `0 calc(${ROW_STRIDE} * ${step})`\n}\n\nconst MORPHS = railMorph\n\nconst ITEM = [\n 'group relative flex flex-none items-center rounded-tf-control',\n 'text-tf-body text-tf-muted',\n 'interactive:hovered:text-tf-fg aria-[current=page]:text-tf-on-accent',\n 'not-aria-[current=page]:interactive:hovered:bg-tf-panel-hi',\n `cursor-pointer ${MORPHS}`,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n]\n\nconst sidebarRecipe = cva([\n 'sticky top-0 z-tf-dropdown hidden h-dvh min-h-0 flex-none flex-col gap-6 py-6 lg:flex',\n 'w-tf-sidebar data-rail:w-tf-rail',\n 'border-r border-tf-line-2 bg-tf-glass backdrop-blur-tf-glass',\n 'tf-icons font-tf-body text-tf-fg',\n MORPHS,\n])\n\nconst sidebarScopeRecipe = cva('flex-none px-3')\n\nconst sidebarMobileBarRecipe = cva([\n 'fixed inset-x-0 top-0 z-tf-dropdown flex items-center gap-3 px-4 lg:hidden',\n 'h-tf-control-lg border-b border-tf-line-2 bg-tf-panel-2 backdrop-blur-tf-panel',\n 'tf-icons font-tf-body text-tf-fg',\n])\n\nconst sidebarMobileHeadingsRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst sidebarMobileEyebrowRecipe = cva(['truncate', eyebrowLead])\n\nconst sidebarMobileTitleRecipe = cva(\n 'truncate font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg',\n)\n\nconst sidebarOverlayBackdropRecipe = cva([\n 'fixed inset-0 z-tf-modal bg-tf-scrim backdrop-blur-tf-scrim',\n ...scrimMirrorMotion,\n 'motion-reduce:animate-none',\n])\n\nconst sidebarOverlayPositionerRecipe = cva('fixed inset-0 z-tf-modal flex flex-col font-tf-body')\n\nconst sidebarOverlayPanelRecipe = cva([\n ...surfacePanel,\n ...surfaceLifted,\n 'flex h-full w-full flex-col overflow-hidden rounded-tf-none',\n 'text-tf-body-sm font-medium text-tf-fg',\n ...drawerMotion,\n 'motion-reduce:animate-none',\n])\n\nconst sidebarOverlayHeadRecipe = cva(\n 'relative flex flex-none items-center gap-5 border-b border-tf-line-2 px-4 py-3',\n)\n\nconst sidebarOverlayBrandRecipe = cva([\n 'flex min-w-0 items-center gap-3',\n '[&_svg]:size-tf-icon-solo-sm [&_svg]:shrink-0',\n])\n\nconst sidebarOverlayScopeRecipe = cva('ml-auto truncate text-tf-body-sm font-medium text-tf-fg')\n\nconst sidebarOverlayBodyRecipe = cva([\n 'flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 py-4',\n 'tf-scroll-thin tf-scroll-faded',\n '[--tf-fade-foot:calc(var(--spacing)*2)] [--tf-fade-head:calc(var(--spacing)*2)]',\n])\n\nconst sidebarOverlayNavRecipe = cva('flex flex-none flex-col gap-1')\n\nconst sidebarOverlaySeparatorRecipe = cva('h-px w-full flex-none bg-tf-line-2')\n\nconst sidebarOverlayItemActive =\n 'aria-[current=page]:bg-tf-blend aria-[current=page]:blend-tf-accent'\n\nconst sidebarHeadRecipe = cva(['flex flex-none items-center gap-3 px-3', MORPHS])\n\nconst sidebarBrandRecipe = cva([\n 'flex min-w-0 items-center gap-3 pl-3',\n 'in-data-rail:gap-0 in-data-rail:pl-4',\n '[&_svg]:size-tf-icon-solo-sm [&_svg]:shrink-0',\n MORPHS,\n])\n\nconst sidebarBrandStackRecipe = cva(['flex flex-col gap-px', railCollapse])\n\nconst sidebarWordmarkRecipe = cva(['truncate font-tf-display text-tf-lead tracking-tf-tight'])\n\nconst sidebarBrandSubtitleRecipe = cva('truncate text-tf-caption-sm text-tf-muted')\n\nconst sidebarToggleRecipe = cva('flex-none [&_svg]:size-tf-icon-solo-sm')\n\nconst sidebarSwitchRecipe = cva([\n 'flex flex-none items-center justify-end in-data-rail:pr-2',\n MORPHS,\n])\n\nconst FADED = [\n 'tf-scroll-faded tf-scroll-thin',\n '[--tf-fade-head:calc(var(--spacing)*2)] [--tf-fade-foot:calc(var(--spacing)*2)]',\n 'outline-hidden focused:outline-2 focused:-outline-offset-2 focused:outline-tf-accent-hi',\n].join(' ')\n\nconst sidebarNavRecipe = cva([\n 'relative flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto px-3 py-2',\n FADED,\n])\n\nconst sidebarMarkRecipe = cva([\n 'pointer-events-none absolute inset-x-3 top-2 h-tf-control-md rounded-tf-control',\n 'in-data-rail:inset-x-4',\n 'bg-tf-blend blend-tf-accent',\n `tf-slides-settle ${MORPHS}`,\n])\n\nconst sidebarGroupRecipe = cva('flex flex-none flex-col')\n\nconst sidebarItemRecipe = cva(\n [\n ...ITEM,\n 'h-tf-control-md min-h-tf-control-md w-full text-left',\n '[&>svg]:size-tf-icon-sm [&>svg]:shrink-0',\n ],\n {\n defaultVariants: { level: 'top' },\n variants: {\n level: {\n child: `${CHILD_INSET} pr-3`,\n top: [\n 'gap-3 px-3',\n 'in-data-rail:gap-0',\n 'in-data-rail:px-[calc((var(--spacing-tf-rail)-var(--spacing)*6-var(--spacing-tf-icon-md))/2)]',\n ].join(' '),\n },\n },\n },\n)\n\nconst sidebarIconRecipe = cva([\n 'relative inline-flex size-tf-icon-md flex-none [&_svg]:size-tf-icon-md',\n '[&_svg]:shrink-0',\n MORPHS,\n])\n\nconst sidebarLabelRecipe = cva(['truncate text-left tf-text-trim', railCollapse])\n\nconst sidebarChevronRecipe = cva([\n 'w-tf-icon-sm flex-none overflow-hidden in-data-rail:w-0 in-data-rail:opacity-0',\n 'group-aria-expanded:rotate-180',\n MORPHS,\n])\n\nconst sidebarDotRecipe = cva([\n 'pointer-events-none absolute -right-1 -bottom-1',\n 'size-1 rounded-tf-pill bg-current opacity-0 in-data-rail:opacity-100',\n MORPHS,\n])\n\nconst sidebarSubRecipe = cva(['flex flex-col gap-1 pt-1', ...collapseMotion])\n\nconst sidebarFootRecipe = cva('relative mt-auto flex flex-none flex-col gap-1 px-3')\n\nconst sidebarAnatomy = anatomy({\n brand: { part: 'brand', recipe: sidebarBrandRecipe, required: true },\n brandStack: { part: 'brand-stack', recipe: sidebarBrandStackRecipe, required: true },\n brandSubtitle: { part: 'brand-subtitle', recipe: sidebarBrandSubtitleRecipe, required: false },\n child: { part: 'child', recipe: sidebarItemRecipe, required: false },\n dot: { part: 'dot', recipe: sidebarDotRecipe, required: false },\n foot: { part: 'foot', recipe: sidebarFootRecipe, required: true },\n head: { part: 'head', recipe: sidebarHeadRecipe, required: true },\n item: { part: 'item', recipe: sidebarItemRecipe, required: false },\n label: { part: 'label', recipe: sidebarLabelRecipe, required: true },\n mark: { part: 'mark', recipe: sidebarMarkRecipe, required: true },\n mobileBar: { part: 'mobile-bar', recipe: sidebarMobileBarRecipe, required: true },\n mobileEyebrow: { part: 'mobile-eyebrow', recipe: sidebarMobileEyebrowRecipe, required: false },\n mobileHeadings: {\n part: 'mobile-headings',\n recipe: sidebarMobileHeadingsRecipe,\n required: false,\n },\n mobileTitle: { part: 'mobile-title', recipe: sidebarMobileTitleRecipe, required: false },\n nav: { part: 'nav', recipe: sidebarNavRecipe, required: true },\n overlayBody: { part: 'overlay-body', recipe: sidebarOverlayBodyRecipe, required: true },\n overlayBrand: { part: 'overlay-brand', recipe: sidebarOverlayBrandRecipe, required: true },\n overlayHead: { part: 'overlay-head', recipe: sidebarOverlayHeadRecipe, required: true },\n overlayScope: { part: 'overlay-scope', recipe: sidebarOverlayScopeRecipe, required: false },\n root: { part: 'sidebar', recipe: sidebarRecipe, required: true },\n scope: { part: 'scope', recipe: sidebarScopeRecipe, required: false },\n separator: { part: 'separator', recipe: sidebarOverlaySeparatorRecipe, required: true },\n switch: { part: 'switch', recipe: sidebarSwitchRecipe, required: true },\n wordmark: { part: 'wordmark', recipe: sidebarWordmarkRecipe, required: true },\n})\n\nexport {\n sidebarAnatomy,\n sidebarBrandRecipe,\n sidebarBrandStackRecipe,\n sidebarBrandSubtitleRecipe,\n sidebarChevronRecipe,\n sidebarDotRecipe,\n sidebarFootRecipe,\n sidebarGroupRecipe,\n sidebarHeadRecipe,\n sidebarIconRecipe,\n sidebarItemRecipe,\n sidebarLabelRecipe,\n sidebarMarkRecipe,\n sidebarMobileBarRecipe,\n sidebarMobileEyebrowRecipe,\n sidebarMobileHeadingsRecipe,\n sidebarMobileTitleRecipe,\n sidebarNavRecipe,\n sidebarOverlayBackdropRecipe,\n sidebarOverlayBodyRecipe,\n sidebarOverlayBrandRecipe,\n sidebarOverlayHeadRecipe,\n sidebarOverlayItemActive,\n sidebarOverlayNavRecipe,\n sidebarOverlayPanelRecipe,\n sidebarOverlayPositionerRecipe,\n sidebarOverlayScopeRecipe,\n sidebarOverlaySeparatorRecipe,\n sidebarRecipe,\n sidebarScopeRecipe,\n sidebarSubRecipe,\n sidebarSwitchRecipe,\n sidebarToggleRecipe,\n sidebarTravel,\n sidebarWordmarkRecipe,\n}\n"],"mappings":"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"}
|
package/dist/recipes/sky.d.ts
CHANGED
|
@@ -15,6 +15,36 @@ declare const starRecipe: (props?: import("class-variance-authority/types").Clas
|
|
|
15
15
|
declare const contentRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
16
|
declare const starLayers: (count: number, seed: string) => StarLayer[];
|
|
17
17
|
declare const cloudDrift: (seed: string) => Cloud;
|
|
18
|
+
declare const skyAnatomy: {
|
|
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 nebula: {
|
|
25
|
+
readonly part: "nebula";
|
|
26
|
+
readonly recipe: (props?: ({
|
|
27
|
+
origin?: "top" | "top-right" | "right" | "bottom-right" | "bottom" | "bottom-left" | "left" | "top-left" | null | undefined;
|
|
28
|
+
tone?: "accent" | "success" | "warning" | "info" | "danger" | null | undefined;
|
|
29
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
30
|
+
readonly required: true;
|
|
31
|
+
};
|
|
32
|
+
readonly root: {
|
|
33
|
+
readonly part: "sky";
|
|
34
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
35
|
+
readonly required: true;
|
|
36
|
+
};
|
|
37
|
+
readonly star: {
|
|
38
|
+
readonly part: "star";
|
|
39
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
40
|
+
readonly required: true;
|
|
41
|
+
};
|
|
42
|
+
readonly stars: {
|
|
43
|
+
readonly part: "stars";
|
|
44
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
45
|
+
readonly required: true;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
18
48
|
//#endregion
|
|
19
|
-
export { type Cloud, type StarLayer, cloudDrift, contentRecipe, driftRecipe, skyRecipe, starLayers, starRecipe };
|
|
49
|
+
export { type Cloud, type StarLayer, cloudDrift, contentRecipe, driftRecipe, skyAnatomy, skyRecipe, starLayers, starRecipe };
|
|
20
50
|
//# sourceMappingURL=sky.d.ts.map
|
package/dist/recipes/sky.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { anatomy } from "../anatomy.js";
|
|
2
|
+
import { nebulaRecipe } from "./nebula.js";
|
|
1
3
|
import { cva } from "class-variance-authority";
|
|
2
4
|
//#region src/recipes/sky.ts
|
|
3
5
|
const DIM = 1;
|
|
@@ -121,7 +123,34 @@ const cloudDrift = (seed) => {
|
|
|
121
123
|
shift: `${String(across)}% ${String(down)}%`
|
|
122
124
|
};
|
|
123
125
|
};
|
|
126
|
+
const skyAnatomy = anatomy({
|
|
127
|
+
content: {
|
|
128
|
+
part: "content",
|
|
129
|
+
recipe: contentRecipe,
|
|
130
|
+
required: true
|
|
131
|
+
},
|
|
132
|
+
nebula: {
|
|
133
|
+
part: "nebula",
|
|
134
|
+
recipe: nebulaRecipe,
|
|
135
|
+
required: true
|
|
136
|
+
},
|
|
137
|
+
root: {
|
|
138
|
+
part: "sky",
|
|
139
|
+
recipe: skyRecipe,
|
|
140
|
+
required: true
|
|
141
|
+
},
|
|
142
|
+
star: {
|
|
143
|
+
part: "star",
|
|
144
|
+
recipe: starRecipe,
|
|
145
|
+
required: true
|
|
146
|
+
},
|
|
147
|
+
stars: {
|
|
148
|
+
part: "stars",
|
|
149
|
+
recipe: driftRecipe,
|
|
150
|
+
required: true
|
|
151
|
+
}
|
|
152
|
+
});
|
|
124
153
|
//#endregion
|
|
125
|
-
export { cloudDrift, contentRecipe, driftRecipe, skyRecipe, starLayers, starRecipe };
|
|
154
|
+
export { cloudDrift, contentRecipe, driftRecipe, skyAnatomy, skyRecipe, starLayers, starRecipe };
|
|
126
155
|
|
|
127
156
|
//# sourceMappingURL=sky.js.map
|
package/dist/recipes/sky.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sky.js","names":[],"sources":["../../src/recipes/sky.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst DIM = 1\nconst MID = 2\nconst BRIGHT = 3\n\nconst FAINT = 28\nconst DUSKY = 40\nconst STEADY = 55\nconst CLEAR = 70\nconst KEEN = 95\n\nconst STAR_PX = [DIM, DIM, MID, MID, BRIGHT] as const\nconst STAR_GLOW = [FAINT, DUSKY, STEADY, CLEAR, KEEN] as const\n\nconst SEED_BASE = 7\nconst SEED_STEP = 131\nconst LEHMER_MULTIPLIER = 16_807\nconst LEHMER_MODULUS = 2_147_483_647\n\nconst FIRST = 0\nconst ORIGIN = 0\nconst ONE = 1\nconst EDGE = 4\nconst FIELD = 92\nconst CLOUD_SHIFT = 26\nconst HALF = 0.5\n\nconst LAYERS = 4\n\nconst HALO_AT = CLEAR\n\nconst HALO_SCALE = 5\n\nconst HALO_GLOW = 7\n\nconst CORE_EDGE = 99\n\ninterface Speck {\n across: number\n down: number\n glow: number\n px: number\n}\n\ninterface StarLayer {\n delay: string\n image: string\n position: string\n size: string\n}\n\ninterface Cloud {\n delay: string\n shift: string\n}\n\nconst skyRecipe = cva([\n 'relative isolate overflow-hidden',\n 'rounded-tf-card bg-tf-bg',\n 'font-tf-body text-tf-fg',\n])\n\nconst driftRecipe = cva([\n 'pointer-events-none absolute -inset-1/4',\n '[rotate:var(--tf-sweep)] tf-turning',\n '[animation-duration:calc(var(--tf-sweep-duration)*45)]',\n])\n\nconst starRecipe = cva('pointer-events-none absolute inset-0 tf-twinkling bg-no-repeat')\n\nconst contentRecipe = cva('relative')\n\nconst hashOf = (seed: string): number => {\n let value = SEED_BASE\n\n for (const letter of seed) {\n value = (value * SEED_STEP + (letter.codePointAt(FIRST) ?? ORIGIN)) % LEHMER_MODULUS\n }\n return value + ONE\n}\n\nconst streamFrom = (seed: string): (() => number) => {\n let state = hashOf(seed)\n\n return () => {\n state = (state * LEHMER_MULTIPLIER) % LEHMER_MODULUS\n return state / LEHMER_MODULUS\n }\n}\n\nconst pick = <Value>(choices: readonly Value[], roll: number, fallback: Value): Value =>\n choices[Math.floor(roll * choices.length)] ?? fallback\n\nconst glowOf = (strength: number): string =>\n `color-mix(in oklab, var(--color-tf-fg) ${String(strength)}%, transparent)`\n\nconst circleOf = (strength: number): string => {\n const ink = glowOf(strength)\n\n return `radial-gradient(circle closest-side, ${ink} 0, ${ink} ${String(CORE_EDGE)}%, transparent 100%)`\n}\n\nconst haloOf = (strength: number): string => {\n const ink = glowOf(strength)\n\n return `radial-gradient(circle closest-side, ${ink} 0, transparent 100%)`\n}\n\nconst speckFrom = (roll: () => number): Speck => {\n const step = roll()\n\n return {\n across: EDGE + roll() * FIELD,\n down: EDGE + roll() * FIELD,\n glow: pick(STAR_GLOW, step, FAINT),\n px: pick(STAR_PX, step, DIM),\n }\n}\n\nconst spotOf = (speck: Speck): string => `${String(speck.across)}% ${String(speck.down)}%`\n\nconst sizeOf = (across: number): string => `${String(across)}px ${String(across)}px`\n\ninterface Drawing {\n images: string[]\n positions: string[]\n sizes: string[]\n}\n\nconst draw = (sheet: Drawing, speck: Speck): void => {\n if (speck.glow >= HALO_AT) {\n sheet.images.push(haloOf(HALO_GLOW))\n sheet.positions.push(spotOf(speck))\n sheet.sizes.push(sizeOf(speck.px * HALO_SCALE))\n }\n sheet.images.push(circleOf(speck.glow))\n sheet.positions.push(spotOf(speck))\n sheet.sizes.push(sizeOf(speck.px))\n}\n\nconst starLayers = (count: number, seed: string): StarLayer[] => {\n const roll = streamFrom(seed)\n const sheets: Drawing[] = Array.from({ length: LAYERS }, () => ({\n images: [],\n positions: [],\n sizes: [],\n }))\n\n for (let drawn = ORIGIN; drawn < count; drawn += ONE) {\n const speck = speckFrom(roll)\n const sheet = sheets[Math.floor(roll() * LAYERS)] ?? sheets[FIRST]\n\n if (sheet) {\n draw(sheet, speck)\n }\n }\n return sheets.map((sheet, index) => ({\n delay: `calc(var(--tf-twinkle-duration) * -${String(index / LAYERS)})`,\n image: sheet.images.join(', '),\n position: sheet.positions.join(', '),\n size: sheet.sizes.join(', '),\n }))\n}\n\nconst cloudDrift = (seed: string): Cloud => {\n const roll = streamFrom(`cloud:${seed}`)\n const turn = roll()\n const across = (roll() - HALF) * CLOUD_SHIFT\n const down = (roll() - HALF) * CLOUD_SHIFT\n\n return {\n delay: `calc(var(--tf-sweep-duration) * -${String(turn)})`,\n shift: `${String(across)}% ${String(down)}%`,\n }\n}\n\nexport {\n type Cloud,\n type StarLayer,\n cloudDrift,\n contentRecipe,\n driftRecipe,\n skyRecipe,\n starLayers,\n starRecipe,\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"sky.js","names":[],"sources":["../../src/recipes/sky.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { anatomy } from '#anatomy'\n\nimport { nebulaRecipe } from './nebula'\n\nconst DIM = 1\nconst MID = 2\nconst BRIGHT = 3\n\nconst FAINT = 28\nconst DUSKY = 40\nconst STEADY = 55\nconst CLEAR = 70\nconst KEEN = 95\n\nconst STAR_PX = [DIM, DIM, MID, MID, BRIGHT] as const\nconst STAR_GLOW = [FAINT, DUSKY, STEADY, CLEAR, KEEN] as const\n\nconst SEED_BASE = 7\nconst SEED_STEP = 131\nconst LEHMER_MULTIPLIER = 16_807\nconst LEHMER_MODULUS = 2_147_483_647\n\nconst FIRST = 0\nconst ORIGIN = 0\nconst ONE = 1\nconst EDGE = 4\nconst FIELD = 92\nconst CLOUD_SHIFT = 26\nconst HALF = 0.5\n\nconst LAYERS = 4\n\nconst HALO_AT = CLEAR\n\nconst HALO_SCALE = 5\n\nconst HALO_GLOW = 7\n\nconst CORE_EDGE = 99\n\ninterface Speck {\n across: number\n down: number\n glow: number\n px: number\n}\n\ninterface StarLayer {\n delay: string\n image: string\n position: string\n size: string\n}\n\ninterface Cloud {\n delay: string\n shift: string\n}\n\nconst skyRecipe = cva([\n 'relative isolate overflow-hidden',\n 'rounded-tf-card bg-tf-bg',\n 'font-tf-body text-tf-fg',\n])\n\nconst driftRecipe = cva([\n 'pointer-events-none absolute -inset-1/4',\n '[rotate:var(--tf-sweep)] tf-turning',\n '[animation-duration:calc(var(--tf-sweep-duration)*45)]',\n])\n\nconst starRecipe = cva('pointer-events-none absolute inset-0 tf-twinkling bg-no-repeat')\n\nconst contentRecipe = cva('relative')\n\nconst hashOf = (seed: string): number => {\n let value = SEED_BASE\n\n for (const letter of seed) {\n value = (value * SEED_STEP + (letter.codePointAt(FIRST) ?? ORIGIN)) % LEHMER_MODULUS\n }\n return value + ONE\n}\n\nconst streamFrom = (seed: string): (() => number) => {\n let state = hashOf(seed)\n\n return () => {\n state = (state * LEHMER_MULTIPLIER) % LEHMER_MODULUS\n return state / LEHMER_MODULUS\n }\n}\n\nconst pick = <Value>(choices: readonly Value[], roll: number, fallback: Value): Value =>\n choices[Math.floor(roll * choices.length)] ?? fallback\n\nconst glowOf = (strength: number): string =>\n `color-mix(in oklab, var(--color-tf-fg) ${String(strength)}%, transparent)`\n\nconst circleOf = (strength: number): string => {\n const ink = glowOf(strength)\n\n return `radial-gradient(circle closest-side, ${ink} 0, ${ink} ${String(CORE_EDGE)}%, transparent 100%)`\n}\n\nconst haloOf = (strength: number): string => {\n const ink = glowOf(strength)\n\n return `radial-gradient(circle closest-side, ${ink} 0, transparent 100%)`\n}\n\nconst speckFrom = (roll: () => number): Speck => {\n const step = roll()\n\n return {\n across: EDGE + roll() * FIELD,\n down: EDGE + roll() * FIELD,\n glow: pick(STAR_GLOW, step, FAINT),\n px: pick(STAR_PX, step, DIM),\n }\n}\n\nconst spotOf = (speck: Speck): string => `${String(speck.across)}% ${String(speck.down)}%`\n\nconst sizeOf = (across: number): string => `${String(across)}px ${String(across)}px`\n\ninterface Drawing {\n images: string[]\n positions: string[]\n sizes: string[]\n}\n\nconst draw = (sheet: Drawing, speck: Speck): void => {\n if (speck.glow >= HALO_AT) {\n sheet.images.push(haloOf(HALO_GLOW))\n sheet.positions.push(spotOf(speck))\n sheet.sizes.push(sizeOf(speck.px * HALO_SCALE))\n }\n sheet.images.push(circleOf(speck.glow))\n sheet.positions.push(spotOf(speck))\n sheet.sizes.push(sizeOf(speck.px))\n}\n\nconst starLayers = (count: number, seed: string): StarLayer[] => {\n const roll = streamFrom(seed)\n const sheets: Drawing[] = Array.from({ length: LAYERS }, () => ({\n images: [],\n positions: [],\n sizes: [],\n }))\n\n for (let drawn = ORIGIN; drawn < count; drawn += ONE) {\n const speck = speckFrom(roll)\n const sheet = sheets[Math.floor(roll() * LAYERS)] ?? sheets[FIRST]\n\n if (sheet) {\n draw(sheet, speck)\n }\n }\n return sheets.map((sheet, index) => ({\n delay: `calc(var(--tf-twinkle-duration) * -${String(index / LAYERS)})`,\n image: sheet.images.join(', '),\n position: sheet.positions.join(', '),\n size: sheet.sizes.join(', '),\n }))\n}\n\nconst cloudDrift = (seed: string): Cloud => {\n const roll = streamFrom(`cloud:${seed}`)\n const turn = roll()\n const across = (roll() - HALF) * CLOUD_SHIFT\n const down = (roll() - HALF) * CLOUD_SHIFT\n\n return {\n delay: `calc(var(--tf-sweep-duration) * -${String(turn)})`,\n shift: `${String(across)}% ${String(down)}%`,\n }\n}\n\nconst skyAnatomy = anatomy({\n content: { part: 'content', recipe: contentRecipe, required: true },\n nebula: { part: 'nebula', recipe: nebulaRecipe, required: true },\n root: { part: 'sky', recipe: skyRecipe, required: true },\n star: { part: 'star', recipe: starRecipe, required: true },\n stars: { part: 'stars', recipe: driftRecipe, required: true },\n})\n\nexport {\n type Cloud,\n type StarLayer,\n cloudDrift,\n contentRecipe,\n driftRecipe,\n skyAnatomy,\n skyRecipe,\n starLayers,\n starRecipe,\n}\n"],"mappings":"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"}
|
package/dist/recipes/slider.d.ts
CHANGED
|
@@ -17,6 +17,20 @@ declare const sliderHintRecipe: (props?: ({
|
|
|
17
17
|
invalid?: boolean | null | undefined;
|
|
18
18
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
19
|
declare const sliderBoundsRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
20
|
+
declare const sliderAnatomy: {
|
|
21
|
+
readonly bounds: {
|
|
22
|
+
readonly part: "bounds";
|
|
23
|
+
readonly recipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
24
|
+
readonly required: true;
|
|
25
|
+
};
|
|
26
|
+
readonly root: {
|
|
27
|
+
readonly part: "slider";
|
|
28
|
+
readonly recipe: (props?: ({
|
|
29
|
+
fullWidth?: boolean | null | undefined;
|
|
30
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
31
|
+
readonly required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
20
34
|
//#endregion
|
|
21
|
-
export { sliderBoundsRecipe, sliderControlRecipe, sliderFootRecipe, sliderHeadRecipe, sliderHintRecipe, sliderKnobSize, sliderLabelRecipe, sliderNotchRecipe, sliderNotchesRecipe, sliderRangeRecipe, sliderRecipe, sliderThumbRecipe, sliderTrackRecipe, sliderValueRecipe };
|
|
35
|
+
export { sliderAnatomy, sliderBoundsRecipe, sliderControlRecipe, sliderFootRecipe, sliderHeadRecipe, sliderHintRecipe, sliderKnobSize, sliderLabelRecipe, sliderNotchRecipe, sliderNotchesRecipe, sliderRangeRecipe, sliderRecipe, sliderThumbRecipe, sliderTrackRecipe, sliderValueRecipe };
|
|
22
36
|
//# sourceMappingURL=slider.d.ts.map
|