@techfides/ui-library-design 0.1.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.
Files changed (231) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +55 -0
  3. package/assets/brands/digital-boost-group.svg +1 -0
  4. package/assets/brands/rtsg.svg +1 -0
  5. package/assets/brands/tech-it-out.svg +1 -0
  6. package/assets/brands/techfides.svg +1 -0
  7. package/css/index.css +8 -0
  8. package/css/theme.css +1640 -0
  9. package/dist/brands.d.ts +39 -0
  10. package/dist/brands.js +41 -0
  11. package/dist/brands.js.map +1 -0
  12. package/dist/charts/animation.js +14 -0
  13. package/dist/charts/animation.js.map +1 -0
  14. package/dist/charts/bars.d.ts +22 -0
  15. package/dist/charts/bars.js +61 -0
  16. package/dist/charts/bars.js.map +1 -0
  17. package/dist/charts/groupedBars.d.ts +20 -0
  18. package/dist/charts/groupedBars.js +82 -0
  19. package/dist/charts/groupedBars.js.map +1 -0
  20. package/dist/charts/paint.js +19 -0
  21. package/dist/charts/paint.js.map +1 -0
  22. package/dist/charts/spark.d.ts +17 -0
  23. package/dist/charts/spark.js +159 -0
  24. package/dist/charts/spark.js.map +1 -0
  25. package/dist/charts/tooltip.js +41 -0
  26. package/dist/charts/tooltip.js.map +1 -0
  27. package/dist/cn.d.ts +6 -0
  28. package/dist/cn.js +178 -0
  29. package/dist/cn.js.map +1 -0
  30. package/dist/control.d.ts +15 -0
  31. package/dist/control.js +13 -0
  32. package/dist/control.js.map +1 -0
  33. package/dist/index.d.ts +65 -0
  34. package/dist/index.js +65 -0
  35. package/dist/mark.d.ts +7 -0
  36. package/dist/mark.js +11 -0
  37. package/dist/mark.js.map +1 -0
  38. package/dist/parts/control.js +55 -0
  39. package/dist/parts/control.js.map +1 -0
  40. package/dist/parts/eyebrow.js +8 -0
  41. package/dist/parts/eyebrow.js.map +1 -0
  42. package/dist/parts/mark.js +52 -0
  43. package/dist/parts/mark.js.map +1 -0
  44. package/dist/parts/reveal.js +35 -0
  45. package/dist/parts/reveal.js.map +1 -0
  46. package/dist/parts/rouse.js +25 -0
  47. package/dist/parts/rouse.js.map +1 -0
  48. package/dist/parts/rule.js +12 -0
  49. package/dist/parts/rule.js.map +1 -0
  50. package/dist/parts/scroll.js +10 -0
  51. package/dist/parts/scroll.js.map +1 -0
  52. package/dist/parts/shell.js +23 -0
  53. package/dist/parts/shell.js.map +1 -0
  54. package/dist/parts/surface.js +15 -0
  55. package/dist/parts/surface.js.map +1 -0
  56. package/dist/parts/tone.js +13 -0
  57. package/dist/parts/tone.js.map +1 -0
  58. package/dist/parts/travel.js +11 -0
  59. package/dist/parts/travel.js.map +1 -0
  60. package/dist/recipes/accordion.d.ts +13 -0
  61. package/dist/recipes/accordion.js +42 -0
  62. package/dist/recipes/accordion.js.map +1 -0
  63. package/dist/recipes/alert.d.ts +16 -0
  64. package/dist/recipes/alert.js +21 -0
  65. package/dist/recipes/alert.js.map +1 -0
  66. package/dist/recipes/band.d.ts +8 -0
  67. package/dist/recipes/band.js +22 -0
  68. package/dist/recipes/band.js.map +1 -0
  69. package/dist/recipes/bars.d.ts +17 -0
  70. package/dist/recipes/bars.js +27 -0
  71. package/dist/recipes/bars.js.map +1 -0
  72. package/dist/recipes/brandMark.d.ts +5 -0
  73. package/dist/recipes/brandMark.js +7 -0
  74. package/dist/recipes/brandMark.js.map +1 -0
  75. package/dist/recipes/button.d.ts +23 -0
  76. package/dist/recipes/button.js +229 -0
  77. package/dist/recipes/button.js.map +1 -0
  78. package/dist/recipes/cardHeader.d.ts +10 -0
  79. package/dist/recipes/cardHeader.js +11 -0
  80. package/dist/recipes/cardHeader.js.map +1 -0
  81. package/dist/recipes/checkbox.d.ts +26 -0
  82. package/dist/recipes/checkbox.js +103 -0
  83. package/dist/recipes/checkbox.js.map +1 -0
  84. package/dist/recipes/chip.d.ts +26 -0
  85. package/dist/recipes/chip.js +123 -0
  86. package/dist/recipes/chip.js.map +1 -0
  87. package/dist/recipes/codeEditor.d.ts +74 -0
  88. package/dist/recipes/codeEditor.js +71 -0
  89. package/dist/recipes/codeEditor.js.map +1 -0
  90. package/dist/recipes/datePicker.d.ts +39 -0
  91. package/dist/recipes/datePicker.js +166 -0
  92. package/dist/recipes/datePicker.js.map +1 -0
  93. package/dist/recipes/dialog.d.ts +37 -0
  94. package/dist/recipes/dialog.js +116 -0
  95. package/dist/recipes/dialog.js.map +1 -0
  96. package/dist/recipes/feature.d.ts +15 -0
  97. package/dist/recipes/feature.js +48 -0
  98. package/dist/recipes/feature.js.map +1 -0
  99. package/dist/recipes/field.d.ts +26 -0
  100. package/dist/recipes/field.js +129 -0
  101. package/dist/recipes/field.js.map +1 -0
  102. package/dist/recipes/findings.d.ts +11 -0
  103. package/dist/recipes/findings.js +16 -0
  104. package/dist/recipes/findings.js.map +1 -0
  105. package/dist/recipes/heading.d.ts +17 -0
  106. package/dist/recipes/heading.js +37 -0
  107. package/dist/recipes/heading.js.map +1 -0
  108. package/dist/recipes/heartbeat.d.ts +23 -0
  109. package/dist/recipes/heartbeat.js +43 -0
  110. package/dist/recipes/heartbeat.js.map +1 -0
  111. package/dist/recipes/input.d.ts +17 -0
  112. package/dist/recipes/input.js +90 -0
  113. package/dist/recipes/input.js.map +1 -0
  114. package/dist/recipes/listItem.d.ts +6 -0
  115. package/dist/recipes/listItem.js +8 -0
  116. package/dist/recipes/listItem.js.map +1 -0
  117. package/dist/recipes/listbox.d.ts +12 -0
  118. package/dist/recipes/listbox.js +29 -0
  119. package/dist/recipes/listbox.js.map +1 -0
  120. package/dist/recipes/marquee.d.ts +19 -0
  121. package/dist/recipes/marquee.js +36 -0
  122. package/dist/recipes/marquee.js.map +1 -0
  123. package/dist/recipes/menu.d.ts +26 -0
  124. package/dist/recipes/menu.js +86 -0
  125. package/dist/recipes/menu.js.map +1 -0
  126. package/dist/recipes/metaRow.d.ts +14 -0
  127. package/dist/recipes/metaRow.js +19 -0
  128. package/dist/recipes/metaRow.js.map +1 -0
  129. package/dist/recipes/meter.d.ts +23 -0
  130. package/dist/recipes/meter.js +39 -0
  131. package/dist/recipes/meter.js.map +1 -0
  132. package/dist/recipes/motion.d.ts +6 -0
  133. package/dist/recipes/motion.js +34 -0
  134. package/dist/recipes/motion.js.map +1 -0
  135. package/dist/recipes/nebula.d.ts +9 -0
  136. package/dist/recipes/nebula.js +15 -0
  137. package/dist/recipes/nebula.js.map +1 -0
  138. package/dist/recipes/numberRange.d.ts +15 -0
  139. package/dist/recipes/numberRange.js +109 -0
  140. package/dist/recipes/numberRange.js.map +1 -0
  141. package/dist/recipes/paper.d.ts +22 -0
  142. package/dist/recipes/paper.js +42 -0
  143. package/dist/recipes/paper.js.map +1 -0
  144. package/dist/recipes/progressBar.d.ts +7 -0
  145. package/dist/recipes/progressBar.js +11 -0
  146. package/dist/recipes/progressBar.js.map +1 -0
  147. package/dist/recipes/queue.d.ts +16 -0
  148. package/dist/recipes/queue.js +27 -0
  149. package/dist/recipes/queue.js.map +1 -0
  150. package/dist/recipes/radioGroup.d.ts +27 -0
  151. package/dist/recipes/radioGroup.js +68 -0
  152. package/dist/recipes/radioGroup.js.map +1 -0
  153. package/dist/recipes/scopeSwitcher.d.ts +26 -0
  154. package/dist/recipes/scopeSwitcher.js +80 -0
  155. package/dist/recipes/scopeSwitcher.js.map +1 -0
  156. package/dist/recipes/scrollArea.d.ts +19 -0
  157. package/dist/recipes/scrollArea.js +43 -0
  158. package/dist/recipes/scrollArea.js.map +1 -0
  159. package/dist/recipes/searchPalette.d.ts +19 -0
  160. package/dist/recipes/searchPalette.js +63 -0
  161. package/dist/recipes/searchPalette.js.map +1 -0
  162. package/dist/recipes/sectionHeader.d.ts +9 -0
  163. package/dist/recipes/sectionHeader.js +10 -0
  164. package/dist/recipes/sectionHeader.js.map +1 -0
  165. package/dist/recipes/segmentedControl.d.ts +9 -0
  166. package/dist/recipes/segmentedControl.js +29 -0
  167. package/dist/recipes/segmentedControl.js.map +1 -0
  168. package/dist/recipes/select.d.ts +9 -0
  169. package/dist/recipes/select.js +21 -0
  170. package/dist/recipes/select.js.map +1 -0
  171. package/dist/recipes/separator.d.ts +14 -0
  172. package/dist/recipes/separator.js +59 -0
  173. package/dist/recipes/separator.js.map +1 -0
  174. package/dist/recipes/sidebar.d.ts +40 -0
  175. package/dist/recipes/sidebar.js +128 -0
  176. package/dist/recipes/sidebar.js.map +1 -0
  177. package/dist/recipes/sky.d.ts +20 -0
  178. package/dist/recipes/sky.js +127 -0
  179. package/dist/recipes/sky.js.map +1 -0
  180. package/dist/recipes/slider.d.ts +20 -0
  181. package/dist/recipes/slider.js +62 -0
  182. package/dist/recipes/slider.js.map +1 -0
  183. package/dist/recipes/stat.d.ts +30 -0
  184. package/dist/recipes/stat.js +52 -0
  185. package/dist/recipes/stat.js.map +1 -0
  186. package/dist/recipes/switch.d.ts +20 -0
  187. package/dist/recipes/switch.js +60 -0
  188. package/dist/recipes/switch.js.map +1 -0
  189. package/dist/recipes/table.d.ts +74 -0
  190. package/dist/recipes/table.js +182 -0
  191. package/dist/recipes/table.js.map +1 -0
  192. package/dist/recipes/tableFilter.d.ts +14 -0
  193. package/dist/recipes/tableFilter.js +28 -0
  194. package/dist/recipes/tableFilter.js.map +1 -0
  195. package/dist/recipes/tablePaging.d.ts +15 -0
  196. package/dist/recipes/tablePaging.js +50 -0
  197. package/dist/recipes/tablePaging.js.map +1 -0
  198. package/dist/recipes/tail.d.ts +20 -0
  199. package/dist/recipes/tail.js +48 -0
  200. package/dist/recipes/tail.js.map +1 -0
  201. package/dist/recipes/text.d.ts +25 -0
  202. package/dist/recipes/text.js +94 -0
  203. package/dist/recipes/text.js.map +1 -0
  204. package/dist/recipes/textarea.d.ts +13 -0
  205. package/dist/recipes/textarea.js +48 -0
  206. package/dist/recipes/textarea.js.map +1 -0
  207. package/dist/recipes/tile.d.ts +18 -0
  208. package/dist/recipes/tile.js +85 -0
  209. package/dist/recipes/tile.js.map +1 -0
  210. package/dist/recipes/tooltip.d.ts +12 -0
  211. package/dist/recipes/tooltip.js +26 -0
  212. package/dist/recipes/tooltip.js.map +1 -0
  213. package/dist/recipes/topBar.d.ts +15 -0
  214. package/dist/recipes/topBar.js +35 -0
  215. package/dist/recipes/topBar.js.map +1 -0
  216. package/dist/recipes/trail.d.ts +27 -0
  217. package/dist/recipes/trail.js +66 -0
  218. package/dist/recipes/trail.js.map +1 -0
  219. package/dist/recipes/userMenu.d.ts +11 -0
  220. package/dist/recipes/userMenu.js +38 -0
  221. package/dist/recipes/userMenu.js.map +1 -0
  222. package/dist/tally.d.ts +17 -0
  223. package/dist/tally.js +75 -0
  224. package/dist/tally.js.map +1 -0
  225. package/dist/tone.d.ts +26 -0
  226. package/dist/tone.js +26 -0
  227. package/dist/tone.js.map +1 -0
  228. package/dist/words.d.ts +116 -0
  229. package/dist/words.js +93 -0
  230. package/dist/words.js.map +1 -0
  231. package/package.json +72 -0
@@ -0,0 +1,129 @@
1
+ import "../control.js";
2
+ import { controlBase, controlBox, controlInert, controlReach, hitArea } from "../parts/control.js";
3
+ import { controlFailed, controlHealthy, controlShell } from "../parts/shell.js";
4
+ import { cva } from "class-variance-authority";
5
+ //#region src/recipes/field.ts
6
+ const HEALTHY = [
7
+ controlHealthy,
8
+ "reached:**:data-[part=leading]:text-tf-accent-hi",
9
+ "reached:**:data-[part=leading]:stroke-tf-ink",
10
+ "reached:**:data-[part=unit]:tf-blended"
11
+ ].join(" ");
12
+ const FAILED = [
13
+ controlFailed,
14
+ "**:data-[part=leading]:text-tf-danger-hi",
15
+ "**:data-[part=trailing]:text-tf-danger-hi",
16
+ "**:data-[part=leading]:stroke-tf-ink",
17
+ "**:data-[part=trailing]:stroke-tf-ink"
18
+ ].join(" ");
19
+ const PENDING = [
20
+ "tf-edge-lit tf-pulsing tf-clouding",
21
+ "**:data-[part=nebula]:tf-cloud-breathing",
22
+ "**:data-[part=leading]:text-tf-accent-hi",
23
+ "**:data-[part=trailing]:text-tf-accent-hi",
24
+ "**:data-[part=trailing]:stroke-tf-ink"
25
+ ].join(" ");
26
+ const INPUT_WAKES = ["reached:[&_input]:placeholder:opacity-100", "reached:[&_input]:placeholder:delay-(--tf-duration-1)"];
27
+ const LABEL_RESTS_CENTRED = {
28
+ lg: "asleep:**:data-[part=label]:translate-y-1.5",
29
+ md: "asleep:**:data-[part=label]:translate-y-1.75"
30
+ };
31
+ const LABEL_FLOATS_AT = {
32
+ lg: "top-3 text-tf-body",
33
+ md: "top-2 text-tf-body-sm"
34
+ };
35
+ const A_HALF_IS_ENOUGH = ["data-filled:asleep:**:data-[part=label]:translate-y-0", "data-filled:asleep:**:data-[part=label]:scale-80"];
36
+ const shellOf = (size) => [
37
+ "relative isolate w-full",
38
+ "font-tf-body",
39
+ ...controlShell(INPUT_WAKES, LABEL_RESTS_CENTRED[size]),
40
+ ...A_HALF_IS_ENOUGH
41
+ ];
42
+ const SHELLS = {
43
+ lg: [...shellOf("lg"), controlBox.lg].join(" "),
44
+ md: [...shellOf("md"), controlBox.md].join(" ")
45
+ };
46
+ const fieldRecipe = cva(["grid w-full max-w-tf-panel grid-cols-1 font-tf-body", "tf-grows"], {
47
+ defaultVariants: { message: false },
48
+ variants: { message: {
49
+ false: "grid-rows-[auto_0fr]",
50
+ true: "grid-rows-[auto_1fr]"
51
+ } }
52
+ });
53
+ const fieldRowRecipe = cva(controlBase, {
54
+ defaultVariants: {
55
+ invalid: false,
56
+ loading: false,
57
+ size: "lg"
58
+ },
59
+ variants: {
60
+ invalid: {
61
+ false: HEALTHY,
62
+ true: FAILED
63
+ },
64
+ loading: {
65
+ false: "",
66
+ true: PENDING
67
+ },
68
+ size: SHELLS
69
+ }
70
+ });
71
+ const fieldLabelRecipe = cva([
72
+ "pointer-events-none absolute origin-top-left",
73
+ "scale-80 tf-label-ramp tf-label-lit",
74
+ "tf-moves-glide tf-transition motion-reduce:transition-none",
75
+ "data-disabled:opacity-50",
76
+ "**:data-[part=required-indicator]:text-tf-danger-hi"
77
+ ], {
78
+ defaultVariants: {
79
+ hidden: false,
80
+ leading: false,
81
+ size: "lg"
82
+ },
83
+ variants: {
84
+ hidden: {
85
+ false: "",
86
+ true: "sr-only"
87
+ },
88
+ leading: {
89
+ false: "left-4",
90
+ true: "left-13"
91
+ },
92
+ size: LABEL_FLOATS_AT
93
+ }
94
+ });
95
+ const MESSAGE = "min-w-0 flex-1 pt-2 text-tf-caption font-medium sm:truncate";
96
+ const fieldHintRecipe = cva(`${MESSAGE} text-tf-muted`);
97
+ const fieldErrorRecipe = cva(`${MESSAGE} text-tf-danger-hi tf-arrives`, {
98
+ defaultVariants: { alone: false },
99
+ variants: { alone: {
100
+ false: "text-right",
101
+ true: "text-left"
102
+ } }
103
+ });
104
+ const fieldFootRecipe = cva([
105
+ "flex min-h-0 items-start justify-between overflow-hidden",
106
+ "gap-x-4 gap-y-1",
107
+ "**:[text-box-trim:trim-start]"
108
+ ]);
109
+ const fieldUnitRecipe = cva("text-tf-unit [font-size:var(--text-tf-body-sm)] font-medium");
110
+ const ADORNMENT_BOX = "absolute top-1/2 flex -translate-y-1/2 items-center text-tf-muted tf-icons";
111
+ const ADORNMENT = `pointer-events-none ${ADORNMENT_BOX}`;
112
+ const ADORNMENT_EDGE = "text-tf-body [&_svg]:size-tf-icon-lg";
113
+ const leadingRecipe = cva(`${ADORNMENT} left-4 ${ADORNMENT_EDGE}`);
114
+ const trailingRecipe = cva(`${ADORNMENT} right-4 ${ADORNMENT_EDGE}`);
115
+ const TRAILING_HIT = hitArea("after:h-tf-control-sm", "after:w-tf-control-sm");
116
+ const trailingActionRecipe = cva([
117
+ ADORNMENT_BOX,
118
+ ADORNMENT_EDGE,
119
+ "right-4 cursor-pointer",
120
+ "interactive:hovered:text-tf-fg",
121
+ "tf-transition motion-reduce:transition-none",
122
+ TRAILING_HIT,
123
+ ...controlReach,
124
+ ...controlInert
125
+ ]);
126
+ //#endregion
127
+ export { fieldErrorRecipe, fieldFootRecipe, fieldHintRecipe, fieldLabelRecipe, fieldRecipe, fieldRowRecipe, fieldUnitRecipe, leadingRecipe, trailingActionRecipe, trailingRecipe };
128
+
129
+ //# sourceMappingURL=field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field.js","names":[],"sources":["../../src/recipes/field.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport type { FieldSize } from '#control'\nimport { defaultFieldSize } from '#control'\nimport { controlBase, controlBox, controlInert, controlReach, hitArea } from '#parts/control'\nimport { controlFailed, controlHealthy, controlShell } from '#parts/shell'\n\nconst HEALTHY = [\n controlHealthy,\n 'reached:**:data-[part=leading]:text-tf-accent-hi',\n 'reached:**:data-[part=leading]:stroke-tf-ink',\n 'reached:**:data-[part=unit]:tf-blended',\n].join(' ')\n\nconst FAILED = [\n controlFailed,\n '**:data-[part=leading]:text-tf-danger-hi',\n '**:data-[part=trailing]:text-tf-danger-hi',\n '**:data-[part=leading]:stroke-tf-ink',\n '**:data-[part=trailing]:stroke-tf-ink',\n].join(' ')\n\nconst PENDING = [\n 'tf-edge-lit tf-pulsing tf-clouding',\n '**:data-[part=nebula]:tf-cloud-breathing',\n '**:data-[part=leading]:text-tf-accent-hi',\n '**:data-[part=trailing]:text-tf-accent-hi',\n '**:data-[part=trailing]:stroke-tf-ink',\n].join(' ')\n\nconst INPUT_WAKES = [\n 'reached:[&_input]:placeholder:opacity-100',\n 'reached:[&_input]:placeholder:delay-(--tf-duration-1)',\n]\n\nconst LABEL_RESTS_CENTRED = {\n lg: 'asleep:**:data-[part=label]:translate-y-1.5',\n md: 'asleep:**:data-[part=label]:translate-y-1.75',\n} satisfies Record<FieldSize, string>\n\nconst LABEL_FLOATS_AT = {\n lg: 'top-3 text-tf-body',\n md: 'top-2 text-tf-body-sm',\n} satisfies Record<FieldSize, string>\n\nconst A_HALF_IS_ENOUGH = [\n 'data-filled:asleep:**:data-[part=label]:translate-y-0',\n 'data-filled:asleep:**:data-[part=label]:scale-80',\n]\n\nconst shellOf = (size: FieldSize): string[] => [\n 'relative isolate w-full',\n 'font-tf-body',\n ...controlShell(INPUT_WAKES, LABEL_RESTS_CENTRED[size]),\n ...A_HALF_IS_ENOUGH,\n]\n\nconst SHELLS = {\n lg: [...shellOf('lg'), controlBox.lg].join(' '),\n md: [...shellOf('md'), controlBox.md].join(' '),\n} satisfies Record<FieldSize, string>\n\nconst fieldRecipe = cva(['grid w-full max-w-tf-panel grid-cols-1 font-tf-body', 'tf-grows'], {\n defaultVariants: { message: false },\n variants: {\n message: { false: 'grid-rows-[auto_0fr]', true: 'grid-rows-[auto_1fr]' },\n },\n})\n\nconst fieldRowRecipe = cva(controlBase, {\n defaultVariants: { invalid: false, loading: false, size: defaultFieldSize },\n variants: {\n invalid: { false: HEALTHY, true: FAILED },\n loading: { false: '', true: PENDING },\n size: SHELLS,\n },\n})\n\nconst fieldLabelRecipe = cva(\n [\n 'pointer-events-none absolute origin-top-left',\n 'scale-80 tf-label-ramp tf-label-lit',\n 'tf-moves-glide tf-transition motion-reduce:transition-none',\n 'data-disabled:opacity-50',\n '**:data-[part=required-indicator]:text-tf-danger-hi',\n ],\n {\n defaultVariants: { hidden: false, leading: false, size: defaultFieldSize },\n variants: {\n hidden: { false: '', true: 'sr-only' },\n leading: { false: 'left-4', true: 'left-13' },\n size: LABEL_FLOATS_AT,\n },\n },\n)\n\nconst MESSAGE = 'min-w-0 flex-1 pt-2 text-tf-caption font-medium sm:truncate'\n\nconst fieldHintRecipe = cva(`${MESSAGE} text-tf-muted`)\n\nconst fieldErrorRecipe = cva(`${MESSAGE} text-tf-danger-hi tf-arrives`, {\n defaultVariants: { alone: false },\n variants: {\n alone: { false: 'text-right', true: 'text-left' },\n },\n})\n\nconst fieldFootRecipe = cva([\n 'flex min-h-0 items-start justify-between overflow-hidden',\n 'gap-x-4 gap-y-1',\n '**:[text-box-trim:trim-start]',\n])\n\nconst fieldUnitRecipe = cva('text-tf-unit [font-size:var(--text-tf-body-sm)] font-medium')\n\nconst ADORNMENT_BOX = 'absolute top-1/2 flex -translate-y-1/2 items-center text-tf-muted tf-icons'\n\nconst ADORNMENT = `pointer-events-none ${ADORNMENT_BOX}`\n\nconst ADORNMENT_EDGE = 'text-tf-body [&_svg]:size-tf-icon-lg'\n\nconst leadingRecipe = cva(`${ADORNMENT} left-4 ${ADORNMENT_EDGE}`)\n\nconst trailingRecipe = cva(`${ADORNMENT} right-4 ${ADORNMENT_EDGE}`)\n\nconst TRAILING_HIT = hitArea('after:h-tf-control-sm', 'after:w-tf-control-sm')\n\nconst trailingActionRecipe = cva([\n ADORNMENT_BOX,\n ADORNMENT_EDGE,\n 'right-4 cursor-pointer',\n 'interactive:hovered:text-tf-fg',\n 'tf-transition motion-reduce:transition-none',\n TRAILING_HIT,\n ...controlReach,\n ...controlInert,\n])\n\nexport {\n fieldErrorRecipe,\n fieldFootRecipe,\n fieldHintRecipe,\n fieldLabelRecipe,\n fieldRecipe,\n fieldRowRecipe,\n fieldUnitRecipe,\n leadingRecipe,\n trailingActionRecipe,\n trailingRecipe,\n}\n"],"mappings":";;;;;AAOA,MAAM,UAAU;CACd;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,SAAS;CACb;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,UAAU;CACd;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,cAAc,CAClB,6CACA,uDACF;AAEA,MAAM,sBAAsB;CAC1B,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,kBAAkB;CACtB,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,mBAAmB,CACvB,yDACA,kDACF;AAEA,MAAM,WAAW,SAA8B;CAC7C;CACA;CACA,GAAG,aAAa,aAAa,oBAAoB,KAAK;CACtD,GAAG;AACL;AAEA,MAAM,SAAS;CACb,IAAI,CAAC,GAAG,QAAQ,IAAI,GAAG,WAAW,EAAE,CAAC,CAAC,KAAK,GAAG;CAC9C,IAAI,CAAC,GAAG,QAAQ,IAAI,GAAG,WAAW,EAAE,CAAC,CAAC,KAAK,GAAG;AAChD;AAEA,MAAM,cAAc,IAAI,CAAC,uDAAuD,UAAU,GAAG;CAC3F,iBAAiB,EAAE,SAAS,MAAM;CAClC,UAAU,EACR,SAAS;EAAE,OAAO;EAAwB,MAAM;CAAuB,EACzE;AACF,CAAC;AAED,MAAM,iBAAiB,IAAI,aAAa;CACtC,iBAAiB;EAAE,SAAS;EAAO,SAAS;EAAO,MAAA;CAAuB;CAC1E,UAAU;EACR,SAAS;GAAE,OAAO;GAAS,MAAM;EAAO;EACxC,SAAS;GAAE,OAAO;GAAI,MAAM;EAAQ;EACpC,MAAM;CACR;AACF,CAAC;AAED,MAAM,mBAAmB,IACvB;CACE;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB;EAAE,QAAQ;EAAO,SAAS;EAAO,MAAA;CAAuB;CACzE,UAAU;EACR,QAAQ;GAAE,OAAO;GAAI,MAAM;EAAU;EACrC,SAAS;GAAE,OAAO;GAAU,MAAM;EAAU;EAC5C,MAAM;CACR;AACF,CACF;AAEA,MAAM,UAAU;AAEhB,MAAM,kBAAkB,IAAI,GAAG,QAAQ,eAAe;AAEtD,MAAM,mBAAmB,IAAI,GAAG,QAAQ,gCAAgC;CACtE,iBAAiB,EAAE,OAAO,MAAM;CAChC,UAAU,EACR,OAAO;EAAE,OAAO;EAAc,MAAM;CAAY,EAClD;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI;CAC1B;CACA;CACA;AACF,CAAC;AAED,MAAM,kBAAkB,IAAI,6DAA6D;AAEzF,MAAM,gBAAgB;AAEtB,MAAM,YAAY,uBAAuB;AAEzC,MAAM,iBAAiB;AAEvB,MAAM,gBAAgB,IAAI,GAAG,UAAU,UAAU,gBAAgB;AAEjE,MAAM,iBAAiB,IAAI,GAAG,UAAU,WAAW,gBAAgB;AAEnE,MAAM,eAAe,QAAQ,yBAAyB,uBAAuB;AAE7E,MAAM,uBAAuB,IAAI;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL,CAAC"}
@@ -0,0 +1,11 @@
1
+ //#region src/recipes/findings.d.ts
2
+ declare const findingsRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ declare const findingRecipe: (props?: ({} & import("class-variance-authority/types").ClassProp) | undefined) => string;
4
+ declare const findingIconRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ declare const findingTextRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const findingPathRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const findingMessageRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
8
+ declare const findingsSummaryRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ //#endregion
10
+ export { findingIconRecipe, findingMessageRecipe, findingPathRecipe, findingRecipe, findingTextRecipe, findingsRecipe, findingsSummaryRecipe };
11
+ //# sourceMappingURL=findings.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { cva } from "class-variance-authority";
2
+ //#region src/recipes/findings.ts
3
+ const findingsRecipe = cva("flex flex-col gap-1");
4
+ const findingRecipe = cva(["flex items-start gap-2 rounded-tf-control tf-tinted px-4 py-3 blend-tf-accent", "[&_svg]:size-tf-icon-sm [&_svg]:shrink-0"], {
5
+ defaultVariants: {},
6
+ variants: {}
7
+ });
8
+ const findingIconRecipe = cva("mt-0.5 flex-none");
9
+ const findingTextRecipe = cva("flex min-w-0 flex-col gap-0");
10
+ const findingPathRecipe = cva("truncate font-mono text-tf-caption-sm");
11
+ const findingMessageRecipe = cva("text-tf-body-sm font-medium text-tf-fg");
12
+ const findingsSummaryRecipe = cva("flex items-center gap-2 px-4 py-3 text-tf-caption-sm text-tf-muted");
13
+ //#endregion
14
+ export { findingIconRecipe, findingMessageRecipe, findingPathRecipe, findingRecipe, findingTextRecipe, findingsRecipe, findingsSummaryRecipe };
15
+
16
+ //# sourceMappingURL=findings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findings.js","names":[],"sources":["../../src/recipes/findings.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst findingsRecipe = cva('flex flex-col gap-1')\n\nconst findingRecipe = cva(\n [\n 'flex items-start gap-2 rounded-tf-control tf-tinted px-4 py-3 blend-tf-accent',\n '[&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ],\n { defaultVariants: {}, variants: {} },\n)\n\nconst findingIconRecipe = cva('mt-0.5 flex-none')\n\nconst findingTextRecipe = cva('flex min-w-0 flex-col gap-0')\n\nconst findingPathRecipe = cva('truncate font-mono text-tf-caption-sm')\n\nconst findingMessageRecipe = cva('text-tf-body-sm font-medium text-tf-fg')\n\nconst findingsSummaryRecipe = cva(\n 'flex items-center gap-2 px-4 py-3 text-tf-caption-sm text-tf-muted',\n)\n\nexport {\n findingIconRecipe,\n findingMessageRecipe,\n findingPathRecipe,\n findingRecipe,\n findingTextRecipe,\n findingsRecipe,\n findingsSummaryRecipe,\n}\n"],"mappings":";;AAEA,MAAM,iBAAiB,IAAI,qBAAqB;AAEhD,MAAM,gBAAgB,IACpB,CACE,iFACA,0CACF,GACA;CAAE,iBAAiB,CAAC;CAAG,UAAU,CAAC;AAAE,CACtC;AAEA,MAAM,oBAAoB,IAAI,kBAAkB;AAEhD,MAAM,oBAAoB,IAAI,6BAA6B;AAE3D,MAAM,oBAAoB,IAAI,uCAAuC;AAErE,MAAM,uBAAuB,IAAI,wCAAwC;AAEzE,MAAM,wBAAwB,IAC5B,oEACF"}
@@ -0,0 +1,17 @@
1
+ //#region src/recipes/heading.d.ts
2
+ type HeadingLevel = 'display' | 'h2' | 'h3' | 'h4';
3
+ declare const defaultHeadingLevel = "h3";
4
+ declare const headingLevels: readonly ["display", "h2", "h3", "h4"];
5
+ declare const headingRecipe: (props?: ({
6
+ level?: "h2" | "h3" | "h4" | "display" | null | undefined;
7
+ tabular?: boolean | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ declare const HEADING_DEFAULT_TAG: {
10
+ display: string;
11
+ h2: string;
12
+ h3: string;
13
+ h4: string;
14
+ };
15
+ //#endregion
16
+ export { HEADING_DEFAULT_TAG, type HeadingLevel, defaultHeadingLevel, headingLevels, headingRecipe };
17
+ //# sourceMappingURL=heading.d.ts.map
@@ -0,0 +1,37 @@
1
+ import { cva } from "class-variance-authority";
2
+ //#region src/recipes/heading.ts
3
+ const defaultHeadingLevel = "h3";
4
+ const headingLevels = [
5
+ "display",
6
+ "h2",
7
+ "h3",
8
+ "h4"
9
+ ];
10
+ const headingRecipe = cva(["font-tf-display font-bold tracking-tf-tight text-tf-fg"], {
11
+ defaultVariants: {
12
+ level: "h3",
13
+ tabular: false
14
+ },
15
+ variants: {
16
+ level: {
17
+ display: "text-tf-display",
18
+ h2: "text-tf-h2",
19
+ h3: "text-tf-h3",
20
+ h4: "text-tf-h4"
21
+ },
22
+ tabular: {
23
+ false: "",
24
+ true: "tabular-nums"
25
+ }
26
+ }
27
+ });
28
+ const HEADING_DEFAULT_TAG = {
29
+ display: "h1",
30
+ h2: "h2",
31
+ h3: "h3",
32
+ h4: "h3"
33
+ };
34
+ //#endregion
35
+ export { HEADING_DEFAULT_TAG, defaultHeadingLevel, headingLevels, headingRecipe };
36
+
37
+ //# sourceMappingURL=heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heading.js","names":[],"sources":["../../src/recipes/heading.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\ntype HeadingLevel = 'display' | 'h2' | 'h3' | 'h4'\n\nconst defaultHeadingLevel = 'h3' satisfies HeadingLevel\n\nconst headingLevels = ['display', 'h2', 'h3', 'h4'] as const satisfies readonly HeadingLevel[]\n\nconst headingRecipe = cva(['font-tf-display font-bold tracking-tf-tight text-tf-fg'], {\n defaultVariants: { level: defaultHeadingLevel, tabular: false },\n variants: {\n level: {\n display: 'text-tf-display',\n h2: 'text-tf-h2',\n h3: 'text-tf-h3',\n h4: 'text-tf-h4',\n } satisfies Record<HeadingLevel, string>,\n tabular: { false: '', true: 'tabular-nums' },\n },\n})\n\nconst HEADING_DEFAULT_TAG = {\n display: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h3',\n} satisfies Record<HeadingLevel, string>\n\nexport { type HeadingLevel, HEADING_DEFAULT_TAG, defaultHeadingLevel, headingLevels, headingRecipe }\n"],"mappings":";;AAIA,MAAM,sBAAsB;AAE5B,MAAM,gBAAgB;CAAC;CAAW;CAAM;CAAM;AAAI;AAElD,MAAM,gBAAgB,IAAI,CAAC,wDAAwD,GAAG;CACpF,iBAAiB;EAAE,OAAA;EAA4B,SAAS;CAAM;CAC9D,UAAU;EACR,OAAO;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS;GAAE,OAAO;GAAI,MAAM;EAAe;CAC7C;AACF,CAAC;AAED,MAAM,sBAAsB;CAC1B,SAAS;CACT,IAAI;CACJ,IAAI;CACJ,IAAI;AACN"}
@@ -0,0 +1,23 @@
1
+ //#region src/recipes/heartbeat.d.ts
2
+ declare const heartbeatStates: readonly ["beating", "late", "silent"];
3
+ type HeartbeatState = (typeof heartbeatStates)[number];
4
+ declare const defaultHeartbeatState = "beating";
5
+ declare const heartbeatRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const heartbeatRowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const heartbeatMarkRecipe: (props?: ({
8
+ state?: "beating" | "late" | "silent" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare const heartbeatRingRecipe: (props?: ({
11
+ state?: "beating" | "late" | "silent" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ declare const heartbeatDotRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const heartbeatTextRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
15
+ declare const heartbeatLabelRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
16
+ declare const heartbeatHintRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
17
+ declare const heartbeatBeatsRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
18
+ declare const heartbeatBeatRecipe: (props?: ({
19
+ flagged?: boolean | null | undefined;
20
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
+ //#endregion
22
+ export { type HeartbeatState, defaultHeartbeatState, heartbeatBeatRecipe, heartbeatBeatsRecipe, heartbeatDotRecipe, heartbeatHintRecipe, heartbeatLabelRecipe, heartbeatMarkRecipe, heartbeatRecipe, heartbeatRingRecipe, heartbeatRowRecipe, heartbeatStates, heartbeatTextRecipe };
23
+ //# sourceMappingURL=heartbeat.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { toneBlend } from "../tone.js";
2
+ import { cva } from "class-variance-authority";
3
+ //#region src/recipes/heartbeat.ts
4
+ const heartbeatStates = [
5
+ "beating",
6
+ "late",
7
+ "silent"
8
+ ];
9
+ const defaultHeartbeatState = "beating";
10
+ const heartbeatRecipe = cva(["flex flex-col gap-4 rounded-tf-block bg-tf-sunken p-6", "font-tf-body text-tf-fg"]);
11
+ const heartbeatRowRecipe = cva("flex items-center gap-3");
12
+ const heartbeatMarkRecipe = cva("relative flex size-tf-mark-dot flex-none", {
13
+ defaultVariants: { state: defaultHeartbeatState },
14
+ variants: { state: {
15
+ beating: toneBlend.success,
16
+ late: toneBlend.warning,
17
+ silent: toneBlend.danger
18
+ } }
19
+ });
20
+ const heartbeatRingRecipe = cva(["absolute inset-0 rounded-tf-pill bg-tf-blend"], {
21
+ defaultVariants: { state: defaultHeartbeatState },
22
+ variants: { state: {
23
+ beating: "tf-pinging",
24
+ late: "tf-pinging",
25
+ silent: ""
26
+ } }
27
+ });
28
+ const heartbeatDotRecipe = cva(["relative size-tf-mark-dot rounded-tf-pill bg-tf-blend"]);
29
+ const heartbeatTextRecipe = cva("flex min-w-0 flex-1 flex-col gap-0");
30
+ const heartbeatLabelRecipe = cva("text-tf-body-sm font-medium text-tf-fg");
31
+ const heartbeatHintRecipe = cva("text-tf-caption-sm text-tf-muted");
32
+ const heartbeatBeatsRecipe = cva("flex h-9 items-end gap-0.5");
33
+ const heartbeatBeatRecipe = cva("flex-1 rounded-tf-inline", {
34
+ defaultVariants: { flagged: false },
35
+ variants: { flagged: {
36
+ false: "bg-tf-accent-surface",
37
+ true: "bg-tf-warning-hi"
38
+ } }
39
+ });
40
+ //#endregion
41
+ export { defaultHeartbeatState, heartbeatBeatRecipe, heartbeatBeatsRecipe, heartbeatDotRecipe, heartbeatHintRecipe, heartbeatLabelRecipe, heartbeatMarkRecipe, heartbeatRecipe, heartbeatRingRecipe, heartbeatRowRecipe, heartbeatStates, heartbeatTextRecipe };
42
+
43
+ //# sourceMappingURL=heartbeat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"heartbeat.js","names":[],"sources":["../../src/recipes/heartbeat.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { toneBlend } from '#tone'\n\nconst heartbeatStates = ['beating', 'late', 'silent'] as const\n\ntype HeartbeatState = (typeof heartbeatStates)[number]\n\nconst defaultHeartbeatState = 'beating' satisfies HeartbeatState\n\nconst heartbeatRecipe = cva([\n 'flex flex-col gap-4 rounded-tf-block bg-tf-sunken p-6',\n 'font-tf-body text-tf-fg',\n])\n\nconst heartbeatRowRecipe = cva('flex items-center gap-3')\n\nconst heartbeatMarkRecipe = cva('relative flex size-tf-mark-dot flex-none', {\n defaultVariants: { state: defaultHeartbeatState },\n variants: {\n state: {\n beating: toneBlend.success,\n late: toneBlend.warning,\n silent: toneBlend.danger,\n },\n },\n})\n\nconst heartbeatRingRecipe = cva(['absolute inset-0 rounded-tf-pill bg-tf-blend'], {\n defaultVariants: { state: defaultHeartbeatState },\n variants: {\n state: {\n beating: 'tf-pinging',\n late: 'tf-pinging',\n silent: '',\n } satisfies Record<HeartbeatState, string>,\n },\n})\n\nconst heartbeatDotRecipe = cva(['relative size-tf-mark-dot rounded-tf-pill bg-tf-blend'])\n\nconst heartbeatTextRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nconst heartbeatLabelRecipe = cva('text-tf-body-sm font-medium text-tf-fg')\n\nconst heartbeatHintRecipe = cva('text-tf-caption-sm text-tf-muted')\n\nconst heartbeatBeatsRecipe = cva('flex h-9 items-end gap-0.5')\n\nconst heartbeatBeatRecipe = cva('flex-1 rounded-tf-inline', {\n defaultVariants: { flagged: false },\n variants: {\n flagged: {\n false: 'bg-tf-accent-surface',\n true: 'bg-tf-warning-hi',\n },\n },\n})\n\nexport {\n type HeartbeatState,\n defaultHeartbeatState,\n heartbeatBeatRecipe,\n heartbeatBeatsRecipe,\n heartbeatDotRecipe,\n heartbeatHintRecipe,\n heartbeatLabelRecipe,\n heartbeatMarkRecipe,\n heartbeatRecipe,\n heartbeatRingRecipe,\n heartbeatRowRecipe,\n heartbeatStates,\n heartbeatTextRecipe,\n}\n"],"mappings":";;;AAIA,MAAM,kBAAkB;CAAC;CAAW;CAAQ;AAAQ;AAIpD,MAAM,wBAAwB;AAE9B,MAAM,kBAAkB,IAAI,CAC1B,yDACA,yBACF,CAAC;AAED,MAAM,qBAAqB,IAAI,yBAAyB;AAExD,MAAM,sBAAsB,IAAI,4CAA4C;CAC1E,iBAAiB,EAAE,OAAO,sBAAsB;CAChD,UAAU,EACR,OAAO;EACL,SAAS,UAAU;EACnB,MAAM,UAAU;EAChB,QAAQ,UAAU;CACpB,EACF;AACF,CAAC;AAED,MAAM,sBAAsB,IAAI,CAAC,8CAA8C,GAAG;CAChF,iBAAiB,EAAE,OAAO,sBAAsB;CAChD,UAAU,EACR,OAAO;EACL,SAAS;EACT,MAAM;EACN,QAAQ;CACV,EACF;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAAC,uDAAuD,CAAC;AAExF,MAAM,sBAAsB,IAAI,oCAAoC;AAEpE,MAAM,uBAAuB,IAAI,wCAAwC;AAEzE,MAAM,sBAAsB,IAAI,kCAAkC;AAElE,MAAM,uBAAuB,IAAI,4BAA4B;AAE7D,MAAM,sBAAsB,IAAI,4BAA4B;CAC1D,iBAAiB,EAAE,SAAS,MAAM;CAClC,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;CACR,EACF;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ //#region src/recipes/input.d.ts
2
+ declare const inputTypes: readonly ["text", "email", "tel", "url", "search", "password"];
3
+ type InputType = (typeof inputTypes)[number];
4
+ declare const TRAILING_INSET = "pr-13";
5
+ declare const labelRoom: {
6
+ lg: string;
7
+ md: string;
8
+ };
9
+ declare const inputRecipe: (props?: ({
10
+ labelled?: boolean | null | undefined;
11
+ leading?: boolean | null | undefined;
12
+ size?: "md" | "lg" | null | undefined;
13
+ trailing?: boolean | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ //#endregion
16
+ export { type InputType, TRAILING_INSET, inputRecipe, inputTypes, labelRoom };
17
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,90 @@
1
+ import "../control.js";
2
+ import { controlFocus, controlInert } from "../parts/control.js";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/recipes/input.ts
5
+ const inputTypes = [
6
+ "text",
7
+ "email",
8
+ "tel",
9
+ "url",
10
+ "search",
11
+ "password"
12
+ ];
13
+ const INPUT_INSET = "px-4";
14
+ const LEADING_INSET = "pl-13";
15
+ const TRAILING_INSET = "pr-13";
16
+ const labelRoom = {
17
+ lg: "pt-6 pb-2",
18
+ md: "pt-5 pb-1"
19
+ };
20
+ const inputRecipe = cva([
21
+ ...[
22
+ "size-full bg-transparent text-tf-fg tf-writes",
23
+ "placeholder:text-tf-muted placeholder:opacity-0",
24
+ "data-readonly:text-tf-muted",
25
+ "disabled:cursor-not-allowed"
26
+ ],
27
+ ...controlFocus,
28
+ ...controlInert
29
+ ], {
30
+ compoundVariants: [
31
+ {
32
+ class: labelRoom.lg,
33
+ labelled: true,
34
+ size: "lg"
35
+ },
36
+ {
37
+ class: labelRoom.md,
38
+ labelled: true,
39
+ size: "md"
40
+ },
41
+ {
42
+ class: INPUT_INSET,
43
+ leading: false,
44
+ trailing: false
45
+ },
46
+ {
47
+ class: `${LEADING_INSET} pr-3`,
48
+ leading: true,
49
+ trailing: false
50
+ },
51
+ {
52
+ class: `${TRAILING_INSET} pl-4`,
53
+ leading: false,
54
+ trailing: true
55
+ },
56
+ {
57
+ class: `${LEADING_INSET} ${TRAILING_INSET}`,
58
+ leading: true,
59
+ trailing: true
60
+ }
61
+ ],
62
+ defaultVariants: {
63
+ labelled: true,
64
+ leading: false,
65
+ size: "lg",
66
+ trailing: false
67
+ },
68
+ variants: {
69
+ labelled: {
70
+ false: "placeholder:opacity-100",
71
+ true: ""
72
+ },
73
+ leading: {
74
+ false: "",
75
+ true: ""
76
+ },
77
+ size: {
78
+ lg: "",
79
+ md: ""
80
+ },
81
+ trailing: {
82
+ false: "",
83
+ true: ""
84
+ }
85
+ }
86
+ });
87
+ //#endregion
88
+ export { TRAILING_INSET, inputRecipe, inputTypes, labelRoom };
89
+
90
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.js","names":[],"sources":["../../src/recipes/input.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport type { FieldSize } from '#control'\nimport { defaultFieldSize } from '#control'\nimport { controlFocus, controlInert } from '#parts/control'\n\nconst inputTypes = ['text', 'email', 'tel', 'url', 'search', 'password'] as const\n\ntype InputType = (typeof inputTypes)[number]\n\nconst INPUT_INSET = 'px-4'\nconst LEADING_INSET = 'pl-13'\nconst TRAILING_INSET = 'pr-13'\n\nconst labelRoom = {\n lg: 'pt-6 pb-2',\n md: 'pt-5 pb-1',\n} satisfies Record<FieldSize, string>\n\nconst inputSurface = [\n 'size-full bg-transparent text-tf-fg tf-writes',\n 'placeholder:text-tf-muted placeholder:opacity-0',\n 'data-readonly:text-tf-muted',\n 'disabled:cursor-not-allowed',\n]\n\nconst inputRecipe = cva([...inputSurface, ...controlFocus, ...controlInert], {\n compoundVariants: [\n { class: labelRoom.lg, labelled: true, size: 'lg' },\n { class: labelRoom.md, labelled: true, size: 'md' },\n { class: INPUT_INSET, leading: false, trailing: false },\n { class: `${LEADING_INSET} pr-3`, leading: true, trailing: false },\n { class: `${TRAILING_INSET} pl-4`, leading: false, trailing: true },\n { class: `${LEADING_INSET} ${TRAILING_INSET}`, leading: true, trailing: true },\n ],\n defaultVariants: {\n labelled: true,\n leading: false,\n size: defaultFieldSize,\n trailing: false,\n },\n variants: {\n labelled: { false: 'placeholder:opacity-100', true: '' },\n leading: { false: '', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n trailing: { false: '', true: '' },\n },\n})\n\nexport { type InputType, inputRecipe, inputTypes, labelRoom, TRAILING_INSET }\n"],"mappings":";;;;AAMA,MAAM,aAAa;CAAC;CAAQ;CAAS;CAAO;CAAO;CAAU;AAAU;AAIvE,MAAM,cAAc;AACpB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AAEvB,MAAM,YAAY;CAChB,IAAI;CACJ,IAAI;AACN;AASA,MAAM,cAAc,IAAI;CAAC,GAAG;EAN1B;EACA;EACA;EACA;CAGqC;CAAG,GAAG;CAAc,GAAG;AAAY,GAAG;CAC3E,kBAAkB;EAChB;GAAE,OAAO,UAAU;GAAI,UAAU;GAAM,MAAM;EAAK;EAClD;GAAE,OAAO,UAAU;GAAI,UAAU;GAAM,MAAM;EAAK;EAClD;GAAE,OAAO;GAAa,SAAS;GAAO,UAAU;EAAM;EACtD;GAAE,OAAO,GAAG,cAAc;GAAQ,SAAS;GAAM,UAAU;EAAM;EACjE;GAAE,OAAO,GAAG,eAAe;GAAQ,SAAS;GAAO,UAAU;EAAK;EAClE;GAAE,OAAO,GAAG,cAAc,GAAG;GAAkB,SAAS;GAAM,UAAU;EAAK;CAC/E;CACA,iBAAiB;EACf,UAAU;EACV,SAAS;EACT,MAAA;EACA,UAAU;CACZ;CACA,UAAU;EACR,UAAU;GAAE,OAAO;GAA2B,MAAM;EAAG;EACvD,SAAS;GAAE,OAAO;GAAI,MAAM;EAAG;EAC/B,MAAM;GAAE,IAAI;GAAI,IAAI;EAAG;EACvB,UAAU;GAAE,OAAO;GAAI,MAAM;EAAG;CAClC;AACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ //#region src/recipes/listItem.d.ts
2
+ declare const listItemRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
3
+ declare const listItemStackRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ //#endregion
5
+ export { listItemRecipe, listItemStackRecipe };
6
+ //# sourceMappingURL=listItem.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { cva } from "class-variance-authority";
2
+ //#region src/recipes/listItem.ts
3
+ const listItemRecipe = cva("flex min-w-0 items-center gap-4");
4
+ const listItemStackRecipe = cva("flex min-w-0 flex-1 flex-col gap-0");
5
+ //#endregion
6
+ export { listItemRecipe, listItemStackRecipe };
7
+
8
+ //# sourceMappingURL=listItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listItem.js","names":[],"sources":["../../src/recipes/listItem.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst listItemRecipe = cva('flex min-w-0 items-center gap-4')\n\nconst listItemStackRecipe = cva('flex min-w-0 flex-1 flex-col gap-0')\n\nexport { listItemRecipe, listItemStackRecipe }\n"],"mappings":";;AAEA,MAAM,iBAAiB,IAAI,iCAAiC;AAE5D,MAAM,sBAAsB,IAAI,oCAAoC"}
@@ -0,0 +1,12 @@
1
+ //#region src/recipes/listbox.d.ts
2
+ type ListboxMark = 'lit' | 'chosen';
3
+ declare const listboxRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
4
+ declare const listboxLabelRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
5
+ declare const listboxItemRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
6
+ declare const listboxMarkRecipe: (props?: ({
7
+ mark?: "lit" | "chosen" | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ declare const listboxEmptyRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ //#endregion
11
+ export { type ListboxMark, listboxEmptyRecipe, listboxItemRecipe, listboxLabelRecipe, listboxMarkRecipe, listboxRecipe };
12
+ //# sourceMappingURL=listbox.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { controlInert } from "../parts/control.js";
2
+ import { travelMarkBase } from "../parts/travel.js";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/recipes/listbox.ts
5
+ const RAIL = [
6
+ "before:absolute before:inset-y-3 before:left-0 before:w-0.5",
7
+ "before:rounded-tf-pill before:bg-tf-accent-hi",
8
+ "before:content-['']"
9
+ ].join(" ");
10
+ const listboxRecipe = cva(["relative isolate flex min-w-0 flex-col gap-1", "font-tf-body outline-hidden"]);
11
+ const listboxLabelRecipe = cva("sr-only");
12
+ const listboxItemRecipe = cva([
13
+ "relative rounded-tf-control px-4 py-3",
14
+ "cursor-pointer select-none tf-transition motion-reduce:transition-none",
15
+ "data-selected:text-tf-fg",
16
+ ...controlInert
17
+ ]);
18
+ const listboxMarkRecipe = cva([...travelMarkBase, "inset-x-0 h-(--tf-travel-height) tf-rails"], {
19
+ defaultVariants: { mark: "lit" },
20
+ variants: { mark: {
21
+ chosen: `rounded-tf-control bg-tf-accent-tint ${RAIL}`,
22
+ lit: "rounded-tf-control bg-tf-panel-hi"
23
+ } }
24
+ });
25
+ const listboxEmptyRecipe = cva(["flex h-tf-control-lg flex-none items-center justify-center px-4", "text-tf-caption font-medium text-tf-muted"]);
26
+ //#endregion
27
+ export { listboxEmptyRecipe, listboxItemRecipe, listboxLabelRecipe, listboxMarkRecipe, listboxRecipe };
28
+
29
+ //# sourceMappingURL=listbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listbox.js","names":[],"sources":["../../src/recipes/listbox.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { controlInert } from '#parts/control'\nimport { travelMarkBase } from '#parts/travel'\n\ntype ListboxMark = 'lit' | 'chosen'\n\nconst RAIL = [\n 'before:absolute before:inset-y-3 before:left-0 before:w-0.5',\n 'before:rounded-tf-pill before:bg-tf-accent-hi',\n \"before:content-['']\",\n].join(' ')\n\nconst listboxRecipe = cva([\n 'relative isolate flex min-w-0 flex-col gap-1',\n 'font-tf-body outline-hidden',\n])\n\nconst listboxLabelRecipe = cva('sr-only')\n\nconst listboxItemRecipe = cva([\n 'relative rounded-tf-control px-4 py-3',\n 'cursor-pointer select-none tf-transition motion-reduce:transition-none',\n 'data-selected:text-tf-fg',\n ...controlInert,\n])\n\nconst listboxMarkRecipe = cva([...travelMarkBase, 'inset-x-0 h-(--tf-travel-height) tf-rails'], {\n defaultVariants: { mark: 'lit' },\n variants: {\n mark: {\n chosen: `rounded-tf-control bg-tf-accent-tint ${RAIL}`,\n lit: 'rounded-tf-control bg-tf-panel-hi',\n } satisfies Record<ListboxMark, string>,\n },\n})\n\nconst listboxEmptyRecipe = cva([\n 'flex h-tf-control-lg flex-none items-center justify-center px-4',\n 'text-tf-caption font-medium text-tf-muted',\n])\n\nexport {\n type ListboxMark,\n listboxEmptyRecipe,\n listboxItemRecipe,\n listboxLabelRecipe,\n listboxMarkRecipe,\n listboxRecipe,\n}\n"],"mappings":";;;;AAOA,MAAM,OAAO;CACX;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,gBAAgB,IAAI,CACxB,gDACA,6BACF,CAAC;AAED,MAAM,qBAAqB,IAAI,SAAS;AAExC,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA,GAAG;AACL,CAAC;AAED,MAAM,oBAAoB,IAAI,CAAC,GAAG,gBAAgB,2CAA2C,GAAG;CAC9F,iBAAiB,EAAE,MAAM,MAAM;CAC/B,UAAU,EACR,MAAM;EACJ,QAAQ,wCAAwC;EAChD,KAAK;CACP,EACF;AACF,CAAC;AAED,MAAM,qBAAqB,IAAI,CAC7B,mEACA,2CACF,CAAC"}
@@ -0,0 +1,19 @@
1
+ //#region src/recipes/marquee.d.ts
2
+ interface MarqueeItem {
3
+ name: string;
4
+ src: string;
5
+ }
6
+ declare const marqueeRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
7
+ declare const marqueeRuleRecipe: (props?: ({
8
+ edge?: "head" | "foot" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare const marqueeStageRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ declare const marqueeViewportRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
+ declare const marqueeCopyRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
13
+ declare const marqueeItemRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const marqueeMarkRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
15
+ declare const marqueeNameRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
16
+ declare const marqueeSpacing = "3rem";
17
+ //#endregion
18
+ export { type MarqueeItem, marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
19
+ //# sourceMappingURL=marquee.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { ruleFading } from "../parts/rule.js";
2
+ import { cva } from "class-variance-authority";
3
+ //#region src/recipes/marquee.ts
4
+ const WRAPS = "motion-reduce:w-full motion-reduce:flex-wrap motion-reduce:justify-center";
5
+ const marqueeRecipe = cva([
6
+ "relative isolate py-8",
7
+ "font-tf-body",
8
+ "tf-slows hovered:[--tf-marquee-rate:0]"
9
+ ]);
10
+ const marqueeRuleRecipe = cva(`absolute inset-x-0 ${ruleFading}`, {
11
+ defaultVariants: { edge: "head" },
12
+ variants: { edge: {
13
+ foot: "bottom-0",
14
+ head: "top-0"
15
+ } }
16
+ });
17
+ const marqueeStageRecipe = cva("w-full");
18
+ const marqueeViewportRecipe = cva(["relative overflow-hidden", "tf-faded-x motion-reduce:mask-none"]);
19
+ const marqueeCopyRecipe = cva([
20
+ "tf-looping items-center",
21
+ "motion-reduce:gap-y-4 motion-reduce:data-clone:hidden",
22
+ WRAPS
23
+ ]);
24
+ const marqueeItemRecipe = cva([
25
+ "flex flex-none items-center gap-3",
26
+ "cursor-default select-none",
27
+ "text-tf-muted hovered:text-tf-fg",
28
+ "tf-ink-glide tf-transition"
29
+ ]);
30
+ const marqueeMarkRecipe = cva("block size-tf-icon-solo-lg bg-contain bg-center bg-no-repeat");
31
+ const marqueeNameRecipe = cva("font-tf-display text-tf-h4 font-bold whitespace-nowrap");
32
+ const marqueeSpacing = "3rem";
33
+ //#endregion
34
+ export { marqueeCopyRecipe, marqueeItemRecipe, marqueeMarkRecipe, marqueeNameRecipe, marqueeRecipe, marqueeRuleRecipe, marqueeSpacing, marqueeStageRecipe, marqueeViewportRecipe };
35
+
36
+ //# sourceMappingURL=marquee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marquee.js","names":[],"sources":["../../src/recipes/marquee.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { ruleFading } from '#parts/rule'\n\ninterface MarqueeItem {\n name: string\n src: string\n}\n\nconst WRAPS = 'motion-reduce:w-full motion-reduce:flex-wrap motion-reduce:justify-center'\n\nconst marqueeRecipe = cva([\n 'relative isolate py-8',\n 'font-tf-body',\n 'tf-slows hovered:[--tf-marquee-rate:0]',\n])\n\nconst marqueeRuleRecipe = cva(`absolute inset-x-0 ${ruleFading}`, {\n defaultVariants: { edge: 'head' },\n variants: { edge: { foot: 'bottom-0', head: 'top-0' } },\n})\n\nconst marqueeStageRecipe = cva('w-full')\n\nconst marqueeViewportRecipe = cva([\n 'relative overflow-hidden',\n 'tf-faded-x motion-reduce:mask-none',\n])\n\nconst marqueeCopyRecipe = cva([\n 'tf-looping items-center',\n 'motion-reduce:gap-y-4 motion-reduce:data-clone:hidden',\n WRAPS,\n])\n\nconst marqueeItemRecipe = cva([\n 'flex flex-none items-center gap-3',\n 'cursor-default select-none',\n 'text-tf-muted hovered:text-tf-fg',\n 'tf-ink-glide tf-transition',\n])\n\nconst marqueeMarkRecipe = cva('block size-tf-icon-solo-lg bg-contain bg-center bg-no-repeat')\n\nconst marqueeNameRecipe = cva('font-tf-display text-tf-h4 font-bold whitespace-nowrap')\n\nconst marqueeSpacing = '3rem'\n\nexport {\n type MarqueeItem,\n marqueeCopyRecipe,\n marqueeItemRecipe,\n marqueeMarkRecipe,\n marqueeNameRecipe,\n marqueeRecipe,\n marqueeRuleRecipe,\n marqueeSpacing,\n marqueeStageRecipe,\n marqueeViewportRecipe,\n}\n"],"mappings":";;;AASA,MAAM,QAAQ;AAEd,MAAM,gBAAgB,IAAI;CACxB;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,sBAAsB,cAAc;CAChE,iBAAiB,EAAE,MAAM,OAAO;CAChC,UAAU,EAAE,MAAM;EAAE,MAAM;EAAY,MAAM;CAAQ,EAAE;AACxD,CAAC;AAED,MAAM,qBAAqB,IAAI,QAAQ;AAEvC,MAAM,wBAAwB,IAAI,CAChC,4BACA,oCACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,8DAA8D;AAE5F,MAAM,oBAAoB,IAAI,wDAAwD;AAEtF,MAAM,iBAAiB"}
@@ -0,0 +1,26 @@
1
+ //#region src/recipes/menu.d.ts
2
+ type MenuTone = 'neutral' | 'danger';
3
+ declare const defaultMenuTone = "neutral";
4
+ declare const menuTones: readonly ["neutral", "danger"];
5
+ type MenuPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
6
+ declare const defaultMenuPlacement = "bottom-start";
7
+ declare const menuPlacements: readonly ["bottom-start", "bottom-end", "top-start", "top-end", "right-start", "right-end", "left-start", "left-end"];
8
+ declare const menuSurfaceRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const menuListRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ declare const menuMarkRecipe: (props?: ({
11
+ tone?: "danger" | "neutral" | "chosen" | null | undefined;
12
+ within?: "surface" | "list" | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
+ declare const menuGroupRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
15
+ declare const menuItemRecipe: (props?: ({
16
+ tone?: "danger" | "neutral" | null | undefined;
17
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
18
+ declare const menuLabelRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
19
+ declare const menuTextRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
20
+ declare const menuShortcutRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
21
+ declare const menuSeparatorRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
22
+ declare const menuArrowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
23
+ declare const menuArrowTipRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
24
+ //#endregion
25
+ export { type MenuPlacement, type MenuTone, defaultMenuPlacement, defaultMenuTone, menuArrowRecipe, menuArrowTipRecipe, menuGroupRecipe, menuItemRecipe, menuLabelRecipe, menuListRecipe, menuMarkRecipe, menuPlacements, menuSeparatorRecipe, menuShortcutRecipe, menuSurfaceRecipe, menuTextRecipe, menuTones };
26
+ //# sourceMappingURL=menu.d.ts.map