@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,71 @@
1
+ import { cva } from "class-variance-authority";
2
+ //#region src/recipes/codeEditor.ts
3
+ const PAD = "calc(var(--spacing) * 4)";
4
+ const LIFT = "var(--color-tf-panel-2)";
5
+ const LEADING = "var(--text-tf-caption-sm--line-height)";
6
+ const codeEditorRecipe = cva([
7
+ "relative isolate w-full overflow-hidden rounded-tf-control",
8
+ "empty:min-h-(--tf-code-height)",
9
+ "bg-tf-sunken font-tf-body blend-tf-accent",
10
+ "tf-edge-sweep tf-edge-plain reached:tf-edge-lit",
11
+ "tf-transition motion-reduce:transition-none"
12
+ ]);
13
+ const codeEditorTheme = {
14
+ "&": {
15
+ backgroundColor: "transparent",
16
+ color: "var(--color-tf-fg)",
17
+ fontSize: "var(--text-tf-caption-sm)",
18
+ lineHeight: LEADING,
19
+ maxHeight: "var(--tf-code-height)"
20
+ },
21
+ "&.cm-focused": { outline: "none" },
22
+ "&:not(.cm-focused) .cm-activeLine": { backgroundColor: "transparent" },
23
+ "&:not(.cm-focused) .cm-activeLineGutter": {
24
+ backgroundColor: "transparent",
25
+ color: "inherit"
26
+ },
27
+ ".cm-activeLine": { backgroundColor: LIFT },
28
+ ".cm-activeLineGutter": {
29
+ backgroundColor: LIFT,
30
+ color: "var(--color-tf-fg)"
31
+ },
32
+ ".cm-content": {
33
+ caretColor: "var(--color-tf-accent-hi)",
34
+ fontFamily: "var(--font-mono)",
35
+ padding: "0"
36
+ },
37
+ ".cm-cursor": { borderLeftColor: "var(--color-tf-accent-hi)" },
38
+ ".cm-gutters": {
39
+ backgroundColor: "transparent",
40
+ border: "none",
41
+ color: "var(--color-tf-muted)",
42
+ fontFamily: "var(--font-mono)",
43
+ paddingLeft: PAD
44
+ },
45
+ ".cm-line": {
46
+ padding: `0 ${PAD}`,
47
+ transition: "background-color var(--tf-timing-quick)"
48
+ },
49
+ ".cm-lineNumbers .cm-gutterElement": { minWidth: "calc(var(--spacing) * 4)" },
50
+ ".cm-placeholder": { color: "var(--color-tf-muted)" },
51
+ ".cm-scroller": {
52
+ fontFamily: "inherit",
53
+ lineHeight: LEADING,
54
+ overflow: "auto",
55
+ padding: `${PAD} 0`,
56
+ scrollbarColor: "var(--color-tf-line-hi) transparent",
57
+ scrollbarWidth: "thin"
58
+ },
59
+ ".cm-selectionBackground": { backgroundColor: "var(--color-tf-control) !important" }
60
+ };
61
+ const codeSyntaxColors = {
62
+ key: "var(--color-tf-info-hi)",
63
+ literal: "var(--color-tf-accent-hi)",
64
+ number: "var(--color-tf-warning-hi)",
65
+ punctuation: "var(--color-tf-muted)",
66
+ text: "var(--color-tf-success-hi)"
67
+ };
68
+ //#endregion
69
+ export { codeEditorRecipe, codeEditorTheme, codeSyntaxColors };
70
+
71
+ //# sourceMappingURL=codeEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codeEditor.js","names":[],"sources":["../../src/recipes/codeEditor.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nconst PAD = 'calc(var(--spacing) * 4)'\n\nconst LIFT = 'var(--color-tf-panel-2)'\n\nconst LEADING = 'var(--text-tf-caption-sm--line-height)'\n\nconst codeEditorRecipe = cva([\n 'relative isolate w-full overflow-hidden rounded-tf-control',\n 'empty:min-h-(--tf-code-height)',\n 'bg-tf-sunken font-tf-body blend-tf-accent',\n 'tf-edge-sweep tf-edge-plain reached:tf-edge-lit',\n 'tf-transition motion-reduce:transition-none',\n])\n\nconst codeEditorTheme = {\n '&': {\n backgroundColor: 'transparent',\n color: 'var(--color-tf-fg)',\n fontSize: 'var(--text-tf-caption-sm)',\n lineHeight: LEADING,\n maxHeight: 'var(--tf-code-height)',\n },\n '&.cm-focused': { outline: 'none' },\n '&:not(.cm-focused) .cm-activeLine': { backgroundColor: 'transparent' },\n '&:not(.cm-focused) .cm-activeLineGutter': {\n backgroundColor: 'transparent',\n color: 'inherit',\n },\n '.cm-activeLine': { backgroundColor: LIFT },\n '.cm-activeLineGutter': { backgroundColor: LIFT, color: 'var(--color-tf-fg)' },\n '.cm-content': {\n caretColor: 'var(--color-tf-accent-hi)',\n fontFamily: 'var(--font-mono)',\n padding: '0',\n },\n '.cm-cursor': { borderLeftColor: 'var(--color-tf-accent-hi)' },\n '.cm-gutters': {\n backgroundColor: 'transparent',\n border: 'none',\n color: 'var(--color-tf-muted)',\n fontFamily: 'var(--font-mono)',\n paddingLeft: PAD,\n },\n '.cm-line': {\n padding: `0 ${PAD}`,\n transition: 'background-color var(--tf-timing-quick)',\n },\n '.cm-lineNumbers .cm-gutterElement': { minWidth: 'calc(var(--spacing) * 4)' },\n '.cm-placeholder': { color: 'var(--color-tf-muted)' },\n '.cm-scroller': {\n fontFamily: 'inherit',\n lineHeight: LEADING,\n overflow: 'auto',\n padding: `${PAD} 0`,\n scrollbarColor: 'var(--color-tf-line-hi) transparent',\n scrollbarWidth: 'thin',\n },\n '.cm-selectionBackground': { backgroundColor: 'var(--color-tf-control) !important' },\n}\n\nconst codeSyntaxColors = {\n key: 'var(--color-tf-info-hi)',\n literal: 'var(--color-tf-accent-hi)',\n number: 'var(--color-tf-warning-hi)',\n punctuation: 'var(--color-tf-muted)',\n text: 'var(--color-tf-success-hi)',\n}\n\nexport { codeEditorRecipe, codeEditorTheme, codeSyntaxColors }\n"],"mappings":";;AAEA,MAAM,MAAM;AAEZ,MAAM,OAAO;AAEb,MAAM,UAAU;AAEhB,MAAM,mBAAmB,IAAI;CAC3B;CACA;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,kBAAkB;CACtB,KAAK;EACH,iBAAiB;EACjB,OAAO;EACP,UAAU;EACV,YAAY;EACZ,WAAW;CACb;CACA,gBAAgB,EAAE,SAAS,OAAO;CAClC,qCAAqC,EAAE,iBAAiB,cAAc;CACtE,2CAA2C;EACzC,iBAAiB;EACjB,OAAO;CACT;CACA,kBAAkB,EAAE,iBAAiB,KAAK;CAC1C,wBAAwB;EAAE,iBAAiB;EAAM,OAAO;CAAqB;CAC7E,eAAe;EACb,YAAY;EACZ,YAAY;EACZ,SAAS;CACX;CACA,cAAc,EAAE,iBAAiB,4BAA4B;CAC7D,eAAe;EACb,iBAAiB;EACjB,QAAQ;EACR,OAAO;EACP,YAAY;EACZ,aAAa;CACf;CACA,YAAY;EACV,SAAS,KAAK;EACd,YAAY;CACd;CACA,qCAAqC,EAAE,UAAU,2BAA2B;CAC5E,mBAAmB,EAAE,OAAO,wBAAwB;CACpD,gBAAgB;EACd,YAAY;EACZ,YAAY;EACZ,UAAU;EACV,SAAS,GAAG,IAAI;EAChB,gBAAgB;EAChB,gBAAgB;CAClB;CACA,2BAA2B,EAAE,iBAAiB,qCAAqC;AACrF;AAEA,MAAM,mBAAmB;CACvB,KAAK;CACL,SAAS;CACT,QAAQ;CACR,aAAa;CACb,MAAM;AACR"}
@@ -0,0 +1,39 @@
1
+ //#region src/recipes/datePicker.d.ts
2
+ type DatePickerMode = 'single' | 'range';
3
+ declare const defaultDatePickerMode = "single";
4
+ declare const datePickerModes: readonly ["single", "range"];
5
+ type DatePickerRangePreset = 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'thisQuarter' | 'lastQuarter' | 'thisYear' | 'lastYear' | 'last3Days' | 'last7Days' | 'last14Days' | 'last30Days' | 'last90Days';
6
+ declare const datePickerRangePresets: readonly ["thisWeek", "lastWeek", "thisMonth", "lastMonth", "thisQuarter", "lastQuarter", "thisYear", "lastYear", "last3Days", "last7Days", "last14Days", "last30Days", "last90Days"];
7
+ declare const datePickerRowRecipe: (props?: ({
8
+ ranged?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare const datePickerTriggerRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ declare const datePickerDashRecipe: (props?: ({
12
+ filled?: boolean | null | undefined;
13
+ labelled?: boolean | null | undefined;
14
+ size?: "md" | "lg" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare const datePickerStartRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
17
+ declare const datePickerEndRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
18
+ declare const datePickerValueRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
19
+ declare const datePickerContentRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
20
+ declare const datePickerViewsRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
21
+ declare const datePickerViewRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
22
+ declare const datePickerHeadRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
23
+ declare const datePickerRuleRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
24
+ declare const datePickerNavRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
25
+ declare const datePickerViewTriggerRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
26
+ declare const datePickerRangeTextRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
27
+ declare const datePickerBodyRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
28
+ declare const datePickerGridRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
29
+ declare const datePickerWeekCellRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
30
+ declare const datePickerDayRecipe: (props?: ({
31
+ roomy?: boolean | null | undefined;
32
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
33
+ declare const datePickerFootRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
34
+ declare const datePickerPresetRecipe: (props?: ({
35
+ current?: boolean | null | undefined;
36
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
37
+ //#endregion
38
+ export { type DatePickerMode, type DatePickerRangePreset, datePickerBodyRecipe, datePickerContentRecipe, datePickerDashRecipe, datePickerDayRecipe, datePickerEndRecipe, datePickerFootRecipe, datePickerGridRecipe, datePickerHeadRecipe, datePickerModes, datePickerNavRecipe, datePickerPresetRecipe, datePickerRangePresets, datePickerRangeTextRecipe, datePickerRowRecipe, datePickerRuleRecipe, datePickerStartRecipe, datePickerTriggerRecipe, datePickerValueRecipe, datePickerViewRecipe, datePickerViewTriggerRecipe, datePickerViewsRecipe, datePickerWeekCellRecipe, defaultDatePickerMode };
39
+ //# sourceMappingURL=datePicker.d.ts.map
@@ -0,0 +1,166 @@
1
+ import "../control.js";
2
+ import { controlInert, controlPress, controlQuiet, controlQuietIcon, controlReach } from "../parts/control.js";
3
+ import { ruleQuiet } from "../parts/rule.js";
4
+ import { eyebrowQuiet } from "../parts/eyebrow.js";
5
+ import { trailingActionRecipe } from "./field.js";
6
+ import { TRAILING_INSET, labelRoom } from "./input.js";
7
+ import { cva } from "class-variance-authority";
8
+ //#region src/recipes/datePicker.ts
9
+ const defaultDatePickerMode = "single";
10
+ const datePickerModes = ["single", "range"];
11
+ const datePickerRangePresets = [
12
+ "thisWeek",
13
+ "lastWeek",
14
+ "thisMonth",
15
+ "lastMonth",
16
+ "thisQuarter",
17
+ "lastQuarter",
18
+ "thisYear",
19
+ "lastYear",
20
+ "last3Days",
21
+ "last7Days",
22
+ "last14Days",
23
+ "last30Days",
24
+ "last90Days"
25
+ ];
26
+ const datePickerRowRecipe = cva([
27
+ "data-[state=open]:bg-tf-sunken-hi data-[state=open]:tf-edge-lit",
28
+ "data-[state=open]:**:data-[part=leading]:text-tf-accent-hi",
29
+ "data-[state=open]:**:data-[part=leading]:stroke-tf-ink",
30
+ "data-[state=open]:**:data-[part=trigger]:text-tf-accent-hi",
31
+ "data-[state=open]:**:data-[part=trigger]:stroke-tf-ink",
32
+ "reached:**:data-[part=trigger]:text-tf-accent-hi",
33
+ "reached:**:data-[part=trigger]:stroke-tf-ink",
34
+ "reached:**:data-[part=dash]:opacity-100",
35
+ "reached:**:data-[part=dash]:delay-(--tf-duration-1)"
36
+ ], {
37
+ defaultVariants: { ranged: false },
38
+ variants: { ranged: {
39
+ false: "",
40
+ true: "w-fit max-w-full min-w-60"
41
+ } }
42
+ });
43
+ const datePickerTriggerRecipe = cva([trailingActionRecipe(), "data-[state=open]:rotate-180"]);
44
+ const datePickerDashRecipe = cva([
45
+ "flex flex-none items-center self-stretch px-2",
46
+ "text-tf-body-sm font-medium text-tf-muted",
47
+ "tf-transition motion-reduce:transition-none"
48
+ ], {
49
+ compoundVariants: [{
50
+ class: labelRoom.lg,
51
+ labelled: true,
52
+ size: "lg"
53
+ }, {
54
+ class: labelRoom.md,
55
+ labelled: true,
56
+ size: "md"
57
+ }],
58
+ defaultVariants: {
59
+ filled: false,
60
+ labelled: true,
61
+ size: "lg"
62
+ },
63
+ variants: {
64
+ filled: {
65
+ false: "opacity-0",
66
+ true: "opacity-100"
67
+ },
68
+ labelled: {
69
+ false: "py-0",
70
+ true: ""
71
+ },
72
+ size: {
73
+ lg: "",
74
+ md: ""
75
+ }
76
+ }
77
+ });
78
+ const TRIGGER_ROOM = TRAILING_INSET;
79
+ const datePickerStartRecipe = cva("field-sizing-content h-full w-auto min-w-36 pr-0 tabular-nums");
80
+ const datePickerEndRecipe = cva(["field-sizing-content h-full w-auto min-w-36 pl-0 tabular-nums", TRIGGER_ROOM]);
81
+ const datePickerValueRecipe = cva(["tabular-nums", TRIGGER_ROOM]);
82
+ const datePickerContentRecipe = cva(["w-tf-panel max-w-[calc(100vw-2rem)] overflow-hidden px-0", "blend-tf-accent"]);
83
+ const datePickerViewsRecipe = cva("flex min-h-(--container-tf-panel) flex-col");
84
+ const datePickerViewRecipe = cva("flex flex-1 flex-col tf-arrives motion-reduce:transition-none");
85
+ const datePickerHeadRecipe = cva("relative flex flex-none items-center justify-between gap-2 p-2");
86
+ const datePickerRuleRecipe = cva(`absolute inset-x-0 bottom-0 ${ruleQuiet}`);
87
+ const datePickerNavRecipe = cva(controlQuietIcon);
88
+ const datePickerViewTriggerRecipe = cva([
89
+ "inline-flex h-tf-control-sm items-center gap-2 rounded-tf-control px-3",
90
+ "font-tf-display text-tf-body-sm font-medium text-tf-fg",
91
+ "tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0",
92
+ ...controlQuiet,
93
+ ...controlReach,
94
+ ...controlPress,
95
+ ...controlInert
96
+ ]);
97
+ const PAGING = [
98
+ "data-[going=forward]:[--tf-page-from:calc(var(--spacing)*4)]",
99
+ "data-[going=back]:[--tf-page-from:calc(var(--spacing)*-4)]",
100
+ "data-[step=a]:motion-safe:animate-tf-page",
101
+ "data-[step=b]:motion-safe:animate-tf-page-again"
102
+ ];
103
+ const datePickerRangeTextRecipe = cva(["inline-flex min-w-36 items-center justify-center gap-2", ...PAGING]);
104
+ const datePickerBodyRecipe = cva(["flex flex-1 flex-col px-3 pt-3 pb-1", ...PAGING]);
105
+ const datePickerGridRecipe = cva(["w-full flex-1 table-fixed border-separate border-spacing-1", "has-data-[in-hover-range]:**:data-[part=table-cell-trigger]:transition-none"]);
106
+ const datePickerWeekCellRecipe = cva([`h-tf-row text-tf-caption-sm ${eyebrowQuiet}`]);
107
+ const DAY_BAND = [
108
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:bg-tf-accent-tint",
109
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:text-tf-accent-hi",
110
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:rounded-tf-none",
111
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:bg-tf-accent-tint",
112
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:text-tf-accent-hi",
113
+ "not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:rounded-tf-none"
114
+ ];
115
+ const DAY_ENDS = [
116
+ "data-[hover-range-start]:bg-tf-blend data-[hover-range-start]:text-tf-on-accent",
117
+ "data-[hover-range-end]:bg-tf-blend data-[hover-range-end]:text-tf-on-accent",
118
+ "data-[in-range]:not-data-[range-end]:data-[range-start]:rounded-r-tf-none",
119
+ "data-[in-range]:not-data-[range-start]:data-[range-end]:rounded-l-tf-none",
120
+ "data-[in-hover-range]:not-data-[hover-range-end]:data-[hover-range-start]:rounded-r-tf-none",
121
+ "data-[in-hover-range]:not-data-[hover-range-start]:data-[hover-range-end]:rounded-l-tf-none"
122
+ ];
123
+ const DAY_QUIET = ["not-data-selected:not-data-[in-range]:data-weekend:text-tf-muted", "data-[outside-range]:opacity-50"];
124
+ const datePickerDayRecipe = cva([
125
+ "inline-flex w-full items-center justify-center rounded-tf-control",
126
+ "text-tf-body-sm font-medium text-tf-fg tabular-nums blend-tf-accent",
127
+ "tf-ramp",
128
+ "not-data-[in-range]:interactive:hovered:bg-tf-panel-hi",
129
+ "data-today:tf-mark-edge data-today:tf-mark-lit",
130
+ "data-today:interactive:hovered:tf-mark-bloomed",
131
+ "data-selected:bg-tf-blend data-selected:text-tf-on-accent",
132
+ "motion-safe:data-selected:tf-pops",
133
+ ...DAY_BAND,
134
+ ...DAY_ENDS,
135
+ ...DAY_QUIET,
136
+ "cursor-pointer tf-transition motion-reduce:transition-none",
137
+ ...controlReach,
138
+ ...controlPress,
139
+ ...controlInert
140
+ ], {
141
+ defaultVariants: { roomy: false },
142
+ variants: { roomy: {
143
+ false: "h-tf-control-sm",
144
+ true: "h-15"
145
+ } }
146
+ });
147
+ const datePickerFootRecipe = cva("flex flex-none flex-wrap gap-2 px-3 pt-2 pb-3");
148
+ const datePickerPresetRecipe = cva([
149
+ "relative isolate inline-flex h-tf-row flex-none items-center rounded-tf-pill px-3",
150
+ "text-tf-caption font-medium",
151
+ "tf-blend-outline blend-tf-accent",
152
+ "cursor-pointer tf-transition motion-reduce:transition-none",
153
+ ...controlReach,
154
+ ...controlPress,
155
+ ...controlInert
156
+ ], {
157
+ defaultVariants: { current: false },
158
+ variants: { current: {
159
+ false: "text-tf-fg interactive:hovered:bg-tf-panel-hi",
160
+ true: "bg-tf-blend text-tf-on-accent interactive:hovered:tf-blended"
161
+ } }
162
+ });
163
+ //#endregion
164
+ export { datePickerBodyRecipe, datePickerContentRecipe, datePickerDashRecipe, datePickerDayRecipe, datePickerEndRecipe, datePickerFootRecipe, datePickerGridRecipe, datePickerHeadRecipe, datePickerModes, datePickerNavRecipe, datePickerPresetRecipe, datePickerRangePresets, datePickerRangeTextRecipe, datePickerRowRecipe, datePickerRuleRecipe, datePickerStartRecipe, datePickerTriggerRecipe, datePickerValueRecipe, datePickerViewRecipe, datePickerViewTriggerRecipe, datePickerViewsRecipe, datePickerWeekCellRecipe, defaultDatePickerMode };
165
+
166
+ //# sourceMappingURL=datePicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datePicker.js","names":[],"sources":["../../src/recipes/datePicker.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport type { FieldSize } from '#control'\nimport { defaultFieldSize } from '#control'\nimport {\n controlInert,\n controlPress,\n controlQuiet,\n controlQuietIcon,\n controlReach,\n} from '#parts/control'\nimport { eyebrowQuiet } from '#parts/eyebrow'\nimport { ruleQuiet } from '#parts/rule'\n\nimport { trailingActionRecipe } from './field'\nimport { labelRoom, TRAILING_INSET } from './input'\n\ntype DatePickerMode = 'single' | 'range'\n\nconst defaultDatePickerMode = 'single' satisfies DatePickerMode\n\nconst datePickerModes = ['single', 'range'] as const satisfies readonly DatePickerMode[]\n\ntype DatePickerRangePreset =\n | 'thisWeek'\n | 'lastWeek'\n | 'thisMonth'\n | 'lastMonth'\n | 'thisQuarter'\n | 'lastQuarter'\n | 'thisYear'\n | 'lastYear'\n | 'last3Days'\n | 'last7Days'\n | 'last14Days'\n | 'last30Days'\n | 'last90Days'\n\nconst datePickerRangePresets = [\n 'thisWeek',\n 'lastWeek',\n 'thisMonth',\n 'lastMonth',\n 'thisQuarter',\n 'lastQuarter',\n 'thisYear',\n 'lastYear',\n 'last3Days',\n 'last7Days',\n 'last14Days',\n 'last30Days',\n 'last90Days',\n] as const satisfies readonly DatePickerRangePreset[]\n\nconst datePickerRowRecipe = cva(\n [\n 'data-[state=open]:bg-tf-sunken-hi data-[state=open]:tf-edge-lit',\n 'data-[state=open]:**:data-[part=leading]:text-tf-accent-hi',\n 'data-[state=open]:**:data-[part=leading]:stroke-tf-ink',\n 'data-[state=open]:**:data-[part=trigger]:text-tf-accent-hi',\n 'data-[state=open]:**:data-[part=trigger]:stroke-tf-ink',\n 'reached:**:data-[part=trigger]:text-tf-accent-hi',\n 'reached:**:data-[part=trigger]:stroke-tf-ink',\n 'reached:**:data-[part=dash]:opacity-100',\n 'reached:**:data-[part=dash]:delay-(--tf-duration-1)',\n ],\n {\n defaultVariants: { ranged: false },\n variants: {\n ranged: { false: '', true: 'w-fit max-w-full min-w-60' },\n },\n },\n)\n\nconst datePickerTriggerRecipe = cva([trailingActionRecipe(), 'data-[state=open]:rotate-180'])\n\nconst datePickerDashRecipe = cva(\n [\n 'flex flex-none items-center self-stretch px-2',\n 'text-tf-body-sm font-medium text-tf-muted',\n 'tf-transition motion-reduce:transition-none',\n ],\n {\n compoundVariants: [\n { class: labelRoom.lg, labelled: true, size: 'lg' },\n { class: labelRoom.md, labelled: true, size: 'md' },\n ],\n defaultVariants: { filled: false, labelled: true, size: defaultFieldSize },\n variants: {\n filled: { false: 'opacity-0', true: 'opacity-100' },\n labelled: { false: 'py-0', true: '' },\n size: { lg: '', md: '' } satisfies Record<FieldSize, string>,\n },\n },\n)\n\nconst TRIGGER_ROOM = TRAILING_INSET\n\nconst datePickerStartRecipe = cva('field-sizing-content h-full w-auto min-w-36 pr-0 tabular-nums')\n\nconst datePickerEndRecipe = cva([\n 'field-sizing-content h-full w-auto min-w-36 pl-0 tabular-nums',\n TRIGGER_ROOM,\n])\n\nconst datePickerValueRecipe = cva(['tabular-nums', TRIGGER_ROOM])\n\nconst datePickerContentRecipe = cva([\n 'w-tf-panel max-w-[calc(100vw-2rem)] overflow-hidden px-0',\n 'blend-tf-accent',\n])\n\nconst datePickerViewsRecipe = cva('flex min-h-(--container-tf-panel) flex-col')\n\nconst datePickerViewRecipe = cva('flex flex-1 flex-col tf-arrives motion-reduce:transition-none')\n\nconst datePickerHeadRecipe = cva('relative flex flex-none items-center justify-between gap-2 p-2')\n\nconst datePickerRuleRecipe = cva(`absolute inset-x-0 bottom-0 ${ruleQuiet}`)\n\nconst datePickerNavRecipe = cva(controlQuietIcon)\n\nconst datePickerViewTriggerRecipe = cva([\n 'inline-flex h-tf-control-sm items-center gap-2 rounded-tf-control px-3',\n 'font-tf-display text-tf-body-sm font-medium text-tf-fg',\n 'tf-icons [&_svg]:size-tf-icon-sm [&_svg]:shrink-0',\n ...controlQuiet,\n ...controlReach,\n ...controlPress,\n ...controlInert,\n])\n\nconst PAGING = [\n 'data-[going=forward]:[--tf-page-from:calc(var(--spacing)*4)]',\n 'data-[going=back]:[--tf-page-from:calc(var(--spacing)*-4)]',\n 'data-[step=a]:motion-safe:animate-tf-page',\n 'data-[step=b]:motion-safe:animate-tf-page-again',\n]\n\nconst datePickerRangeTextRecipe = cva([\n 'inline-flex min-w-36 items-center justify-center gap-2',\n ...PAGING,\n])\n\nconst datePickerBodyRecipe = cva(['flex flex-1 flex-col px-3 pt-3 pb-1', ...PAGING])\n\nconst datePickerGridRecipe = cva([\n 'w-full flex-1 table-fixed border-separate border-spacing-1',\n 'has-data-[in-hover-range]:**:data-[part=table-cell-trigger]:transition-none',\n])\n\nconst datePickerWeekCellRecipe = cva([`h-tf-row text-tf-caption-sm ${eyebrowQuiet}`])\n\nconst DAY_BAND = [\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:bg-tf-accent-tint',\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:text-tf-accent-hi',\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-range]:rounded-tf-none',\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:bg-tf-accent-tint',\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:text-tf-accent-hi',\n 'not-data-selected:not-data-[hover-range-start]:not-data-[hover-range-end]:data-[in-hover-range]:rounded-tf-none',\n]\n\nconst DAY_ENDS = [\n 'data-[hover-range-start]:bg-tf-blend data-[hover-range-start]:text-tf-on-accent',\n 'data-[hover-range-end]:bg-tf-blend data-[hover-range-end]:text-tf-on-accent',\n 'data-[in-range]:not-data-[range-end]:data-[range-start]:rounded-r-tf-none',\n 'data-[in-range]:not-data-[range-start]:data-[range-end]:rounded-l-tf-none',\n 'data-[in-hover-range]:not-data-[hover-range-end]:data-[hover-range-start]:rounded-r-tf-none',\n 'data-[in-hover-range]:not-data-[hover-range-start]:data-[hover-range-end]:rounded-l-tf-none',\n]\n\nconst DAY_QUIET = [\n 'not-data-selected:not-data-[in-range]:data-weekend:text-tf-muted',\n 'data-[outside-range]:opacity-50',\n]\n\nconst datePickerDayRecipe = cva(\n [\n 'inline-flex w-full items-center justify-center rounded-tf-control',\n 'text-tf-body-sm font-medium text-tf-fg tabular-nums blend-tf-accent',\n 'tf-ramp',\n 'not-data-[in-range]:interactive:hovered:bg-tf-panel-hi',\n 'data-today:tf-mark-edge data-today:tf-mark-lit',\n 'data-today:interactive:hovered:tf-mark-bloomed',\n 'data-selected:bg-tf-blend data-selected:text-tf-on-accent',\n 'motion-safe:data-selected:tf-pops',\n ...DAY_BAND,\n ...DAY_ENDS,\n ...DAY_QUIET,\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { roomy: false },\n variants: {\n roomy: { false: 'h-tf-control-sm', true: 'h-15' },\n },\n },\n)\n\nconst datePickerFootRecipe = cva('flex flex-none flex-wrap gap-2 px-3 pt-2 pb-3')\n\nconst datePickerPresetRecipe = cva(\n [\n 'relative isolate inline-flex h-tf-row flex-none items-center rounded-tf-pill px-3',\n 'text-tf-caption font-medium',\n 'tf-blend-outline blend-tf-accent',\n 'cursor-pointer tf-transition motion-reduce:transition-none',\n ...controlReach,\n ...controlPress,\n ...controlInert,\n ],\n {\n defaultVariants: { current: false },\n variants: {\n current: {\n false: 'text-tf-fg interactive:hovered:bg-tf-panel-hi',\n true: 'bg-tf-blend text-tf-on-accent interactive:hovered:tf-blended',\n },\n },\n },\n)\n\nexport {\n type DatePickerMode,\n type DatePickerRangePreset,\n datePickerBodyRecipe,\n datePickerContentRecipe,\n datePickerDashRecipe,\n datePickerDayRecipe,\n datePickerEndRecipe,\n datePickerFootRecipe,\n datePickerGridRecipe,\n datePickerHeadRecipe,\n datePickerModes,\n datePickerNavRecipe,\n datePickerPresetRecipe,\n datePickerRangePresets,\n datePickerRangeTextRecipe,\n datePickerRowRecipe,\n datePickerRuleRecipe,\n datePickerStartRecipe,\n datePickerTriggerRecipe,\n datePickerValueRecipe,\n datePickerViewRecipe,\n datePickerViewsRecipe,\n datePickerViewTriggerRecipe,\n datePickerWeekCellRecipe,\n defaultDatePickerMode,\n}\n"],"mappings":";;;;;;;;AAmBA,MAAM,wBAAwB;AAE9B,MAAM,kBAAkB,CAAC,UAAU,OAAO;AAiB1C,MAAM,yBAAyB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,sBAAsB,IAC1B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GACA;CACE,iBAAiB,EAAE,QAAQ,MAAM;CACjC,UAAU,EACR,QAAQ;EAAE,OAAO;EAAI,MAAM;CAA4B,EACzD;AACF,CACF;AAEA,MAAM,0BAA0B,IAAI,CAAC,qBAAqB,GAAG,8BAA8B,CAAC;AAE5F,MAAM,uBAAuB,IAC3B;CACE;CACA;CACA;AACF,GACA;CACE,kBAAkB,CAChB;EAAE,OAAO,UAAU;EAAI,UAAU;EAAM,MAAM;CAAK,GAClD;EAAE,OAAO,UAAU;EAAI,UAAU;EAAM,MAAM;CAAK,CACpD;CACA,iBAAiB;EAAE,QAAQ;EAAO,UAAU;EAAM,MAAA;CAAuB;CACzE,UAAU;EACR,QAAQ;GAAE,OAAO;GAAa,MAAM;EAAc;EAClD,UAAU;GAAE,OAAO;GAAQ,MAAM;EAAG;EACpC,MAAM;GAAE,IAAI;GAAI,IAAI;EAAG;CACzB;AACF,CACF;AAEA,MAAM,eAAe;AAErB,MAAM,wBAAwB,IAAI,+DAA+D;AAEjG,MAAM,sBAAsB,IAAI,CAC9B,iEACA,YACF,CAAC;AAED,MAAM,wBAAwB,IAAI,CAAC,gBAAgB,YAAY,CAAC;AAEhE,MAAM,0BAA0B,IAAI,CAClC,4DACA,iBACF,CAAC;AAED,MAAM,wBAAwB,IAAI,4CAA4C;AAE9E,MAAM,uBAAuB,IAAI,+DAA+D;AAEhG,MAAM,uBAAuB,IAAI,gEAAgE;AAEjG,MAAM,uBAAuB,IAAI,+BAA+B,WAAW;AAE3E,MAAM,sBAAsB,IAAI,gBAAgB;AAEhD,MAAM,8BAA8B,IAAI;CACtC;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL,CAAC;AAED,MAAM,SAAS;CACb;CACA;CACA;CACA;AACF;AAEA,MAAM,4BAA4B,IAAI,CACpC,0DACA,GAAG,MACL,CAAC;AAED,MAAM,uBAAuB,IAAI,CAAC,uCAAuC,GAAG,MAAM,CAAC;AAEnF,MAAM,uBAAuB,IAAI,CAC/B,8DACA,6EACF,CAAC;AAED,MAAM,2BAA2B,IAAI,CAAC,+BAA+B,cAAc,CAAC;AAEpF,MAAM,WAAW;CACf;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,WAAW;CACf;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAM,YAAY,CAChB,oEACA,iCACF;AAEA,MAAM,sBAAsB,IAC1B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;CACH;CACA,GAAG;CACH,GAAG;CACH,GAAG;AACL,GACA;CACE,iBAAiB,EAAE,OAAO,MAAM;CAChC,UAAU,EACR,OAAO;EAAE,OAAO;EAAmB,MAAM;CAAO,EAClD;AACF,CACF;AAEA,MAAM,uBAAuB,IAAI,+CAA+C;AAEhF,MAAM,yBAAyB,IAC7B;CACE;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;CACH,GAAG;AACL,GACA;CACE,iBAAiB,EAAE,SAAS,MAAM;CAClC,UAAU,EACR,SAAS;EACP,OAAO;EACP,MAAM;CACR,EACF;AACF,CACF"}
@@ -0,0 +1,37 @@
1
+ //#region src/recipes/dialog.d.ts
2
+ type DialogSize = 'sm' | 'md' | 'lg';
3
+ type DialogLayout = 'panel' | 'confirm';
4
+ declare const defaultDialogLayout = "panel";
5
+ declare const dialogLayouts: readonly ["panel", "confirm"];
6
+ declare const defaultDialogSize = "md";
7
+ declare const dialogSizes: readonly ["sm", "md", "lg"];
8
+ declare const dialogBackdropRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const dialogPositionerRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ declare const dialogRecipe: (props?: ({
11
+ size?: "sm" | "md" | "lg" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ declare const dialogHeldRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
14
+ declare const dialogHeadRecipe: (props?: ({
15
+ layout?: "panel" | "confirm" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ declare const dialogHeadingsRecipe: (props?: ({
18
+ layout?: "panel" | "confirm" | null | undefined;
19
+ roomy?: boolean | null | undefined;
20
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
21
+ declare const dialogTitleRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
22
+ declare const dialogDescriptionRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
23
+ declare const dialogCloseRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
24
+ declare const dialogBodyRecipe: (props?: ({
25
+ layout?: "panel" | "confirm" | null | undefined;
26
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
27
+ declare const dialogFooterRecipe: (props?: ({
28
+ layout?: "panel" | "confirm" | null | undefined;
29
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
30
+ declare const dialogNoteRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
31
+ declare const dialogRowRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
32
+ declare const dialogRowValueRecipe: (props?: ({
33
+ lit?: boolean | null | undefined;
34
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
35
+ //#endregion
36
+ export { type DialogLayout, type DialogSize, defaultDialogLayout, defaultDialogSize, dialogBackdropRecipe, dialogBodyRecipe, dialogCloseRecipe, dialogDescriptionRecipe, dialogFooterRecipe, dialogHeadRecipe, dialogHeadingsRecipe, dialogHeldRecipe, dialogLayouts, dialogNoteRecipe, dialogPositionerRecipe, dialogRecipe, dialogRowRecipe, dialogRowValueRecipe, dialogSizes, dialogTitleRecipe };
37
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1,116 @@
1
+ import { liftMotion, scrimMirrorMotion } from "./motion.js";
2
+ import { surfaceLifted, surfacePanel } from "../parts/surface.js";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/recipes/dialog.ts
5
+ const defaultDialogLayout = "panel";
6
+ const dialogLayouts = ["panel", "confirm"];
7
+ const defaultDialogSize = "md";
8
+ const dialogSizes = [
9
+ "sm",
10
+ "md",
11
+ "lg"
12
+ ];
13
+ const WIDTH = {
14
+ lg: "max-w-tf-page",
15
+ md: "max-w-tf-measure",
16
+ sm: "max-w-tf-panel"
17
+ };
18
+ const GROUND = "relative bg-tf-shade-under";
19
+ const REGION = "relative";
20
+ const FULL = [
21
+ "@max-tf-panel:absolute @max-tf-panel:inset-0",
22
+ "@max-tf-panel:max-h-none @max-tf-panel:max-w-none",
23
+ "@max-tf-panel:rounded-tf-none"
24
+ ];
25
+ const dialogBackdropRecipe = cva([
26
+ "fixed inset-0 z-tf-modal bg-tf-scrim backdrop-blur-tf-scrim",
27
+ ...scrimMirrorMotion,
28
+ "motion-reduce:animate-none"
29
+ ]);
30
+ const dialogPositionerRecipe = cva(["@container fixed inset-0 z-tf-modal flex items-center justify-center p-4 sm:p-10", "font-tf-body"]);
31
+ const dialogRecipe = cva([
32
+ ...surfacePanel,
33
+ "tf-edge-plain",
34
+ ...surfaceLifted,
35
+ "flex max-h-full w-full flex-col overflow-hidden outline-hidden",
36
+ "text-tf-body-sm font-medium text-tf-fg",
37
+ ...FULL,
38
+ ...liftMotion,
39
+ "motion-reduce:animate-none"
40
+ ], {
41
+ defaultVariants: { size: "md" },
42
+ variants: { size: WIDTH }
43
+ });
44
+ const dialogHeldRecipe = cva("motion-safe:data-[state=open]:data-held:tf-shaken");
45
+ const dialogHeadRecipe = cva([REGION, "flex flex-none flex-col px-6 pt-8"], {
46
+ defaultVariants: { layout: defaultDialogLayout },
47
+ variants: { layout: {
48
+ confirm: "items-center gap-6 text-center",
49
+ panel: "gap-6 @max-tf-panel:pt-6"
50
+ } }
51
+ });
52
+ const dialogHeadingsRecipe = cva("flex min-w-0 flex-none flex-col", {
53
+ compoundVariants: [{
54
+ class: "pr-12",
55
+ layout: "panel",
56
+ roomy: true
57
+ }],
58
+ defaultVariants: {
59
+ layout: defaultDialogLayout,
60
+ roomy: false
61
+ },
62
+ variants: {
63
+ layout: {
64
+ confirm: "items-center gap-3 text-center",
65
+ panel: "gap-2 pb-2"
66
+ },
67
+ roomy: {
68
+ false: "",
69
+ true: ""
70
+ }
71
+ }
72
+ });
73
+ const dialogTitleRecipe = cva("font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg");
74
+ const dialogDescriptionRecipe = cva("text-tf-body-sm font-medium text-tf-muted");
75
+ const dialogCloseRecipe = cva("absolute top-3 right-3 z-tf-raised");
76
+ const FADED = [
77
+ "tf-scroll-faded tf-scroll-thin",
78
+ "[--tf-fade-head:calc(var(--spacing)*6)] [--tf-fade-foot:calc(var(--spacing)*8)]",
79
+ "outline-hidden focused:outline-2 focused:-outline-offset-2 focused:outline-tf-accent-hi"
80
+ ].join(" ");
81
+ const dialogBodyRecipe = cva([
82
+ REGION,
83
+ "flex min-h-0 flex-col overflow-y-auto px-6 pt-6",
84
+ FADED,
85
+ "@max-tf-panel:flex-1"
86
+ ], {
87
+ defaultVariants: { layout: defaultDialogLayout },
88
+ variants: { layout: {
89
+ confirm: "items-center gap-6 pb-0 text-center",
90
+ panel: "gap-6 pb-8 @max-tf-panel:pb-6"
91
+ } }
92
+ });
93
+ const dialogFooterRecipe = cva(["flex flex-none gap-3 rounded-b-tf-card px-6", "@max-tf-panel:rounded-tf-none"], {
94
+ defaultVariants: { layout: defaultDialogLayout },
95
+ variants: { layout: {
96
+ confirm: `${REGION} flex-nowrap items-center pt-6 pb-6 *:flex-1`,
97
+ panel: [
98
+ GROUND,
99
+ "flex-wrap items-center justify-end py-5",
100
+ "@max-tf-panel:flex-col-reverse @max-tf-panel:flex-nowrap @max-tf-panel:*:w-full"
101
+ ].join(" ")
102
+ } }
103
+ });
104
+ const dialogNoteRecipe = cva("mr-auto text-tf-caption font-medium text-tf-muted tabular-nums");
105
+ const dialogRowRecipe = cva(["flex h-tf-row flex-none items-center justify-between gap-3", "rounded-tf-inline px-3 text-tf-muted"]);
106
+ const dialogRowValueRecipe = cva("text-tf-fg tabular-nums", {
107
+ defaultVariants: { lit: false },
108
+ variants: { lit: {
109
+ false: "",
110
+ true: "text-tf-accent-hi"
111
+ } }
112
+ });
113
+ //#endregion
114
+ export { defaultDialogLayout, defaultDialogSize, dialogBackdropRecipe, dialogBodyRecipe, dialogCloseRecipe, dialogDescriptionRecipe, dialogFooterRecipe, dialogHeadRecipe, dialogHeadingsRecipe, dialogHeldRecipe, dialogLayouts, dialogNoteRecipe, dialogPositionerRecipe, dialogRecipe, dialogRowRecipe, dialogRowValueRecipe, dialogSizes, dialogTitleRecipe };
115
+
116
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.js","names":[],"sources":["../../src/recipes/dialog.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { surfaceLifted, surfacePanel } from '#parts/surface'\n\nimport { liftMotion, scrimMirrorMotion } from './motion'\n\ntype DialogSize = 'sm' | 'md' | 'lg'\n\ntype DialogLayout = 'panel' | 'confirm'\n\nconst defaultDialogLayout = 'panel' satisfies DialogLayout\n\nconst dialogLayouts = ['panel', 'confirm'] as const satisfies readonly DialogLayout[]\n\nconst defaultDialogSize = 'md' satisfies DialogSize\n\nconst dialogSizes = ['sm', 'md', 'lg'] as const satisfies readonly DialogSize[]\n\nconst WIDTH = {\n lg: 'max-w-tf-page',\n md: 'max-w-tf-measure',\n sm: 'max-w-tf-panel',\n} satisfies Record<DialogSize, string>\n\nconst GROUND = 'relative bg-tf-shade-under'\n\nconst REGION = 'relative'\n\nconst FULL = [\n '@max-tf-panel:absolute @max-tf-panel:inset-0',\n '@max-tf-panel:max-h-none @max-tf-panel:max-w-none',\n '@max-tf-panel:rounded-tf-none',\n]\n\nconst dialogBackdropRecipe = 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 dialogPositionerRecipe = cva([\n '@container fixed inset-0 z-tf-modal flex items-center justify-center p-4 sm:p-10',\n 'font-tf-body',\n])\n\nconst dialogRecipe = cva(\n [\n ...surfacePanel,\n 'tf-edge-plain',\n ...surfaceLifted,\n 'flex max-h-full w-full flex-col overflow-hidden outline-hidden',\n 'text-tf-body-sm font-medium text-tf-fg',\n ...FULL,\n ...liftMotion,\n 'motion-reduce:animate-none',\n ],\n {\n defaultVariants: { size: defaultDialogSize },\n variants: { size: WIDTH },\n },\n)\n\nconst dialogHeldRecipe = cva('motion-safe:data-[state=open]:data-held:tf-shaken')\n\nconst dialogHeadRecipe = cva([REGION, 'flex flex-none flex-col px-6 pt-8'], {\n defaultVariants: { layout: defaultDialogLayout },\n variants: {\n layout: {\n confirm: 'items-center gap-6 text-center',\n panel: 'gap-6 @max-tf-panel:pt-6',\n } satisfies Record<DialogLayout, string>,\n },\n})\n\nconst dialogHeadingsRecipe = cva('flex min-w-0 flex-none flex-col', {\n compoundVariants: [{ class: 'pr-12', layout: 'panel', roomy: true }],\n defaultVariants: { layout: defaultDialogLayout, roomy: false },\n variants: {\n layout: {\n confirm: 'items-center gap-3 text-center',\n panel: 'gap-2 pb-2',\n } satisfies Record<DialogLayout, string>,\n roomy: { false: '', true: '' },\n },\n})\n\nconst dialogTitleRecipe = cva('font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg')\n\nconst dialogDescriptionRecipe = cva('text-tf-body-sm font-medium text-tf-muted')\n\nconst dialogCloseRecipe = cva('absolute top-3 right-3 z-tf-raised')\n\nconst FADED = [\n 'tf-scroll-faded tf-scroll-thin',\n '[--tf-fade-head:calc(var(--spacing)*6)] [--tf-fade-foot:calc(var(--spacing)*8)]',\n 'outline-hidden focused:outline-2 focused:-outline-offset-2 focused:outline-tf-accent-hi',\n].join(' ')\n\nconst dialogBodyRecipe = cva(\n [REGION, 'flex min-h-0 flex-col overflow-y-auto px-6 pt-6', FADED, '@max-tf-panel:flex-1'],\n {\n defaultVariants: { layout: defaultDialogLayout },\n variants: {\n layout: {\n confirm: 'items-center gap-6 pb-0 text-center',\n panel: 'gap-6 pb-8 @max-tf-panel:pb-6',\n } satisfies Record<DialogLayout, string>,\n },\n },\n)\n\nconst dialogFooterRecipe = cva(\n ['flex flex-none gap-3 rounded-b-tf-card px-6', '@max-tf-panel:rounded-tf-none'],\n {\n defaultVariants: { layout: defaultDialogLayout },\n variants: {\n layout: {\n confirm: `${REGION} flex-nowrap items-center pt-6 pb-6 *:flex-1`,\n panel: [\n GROUND,\n 'flex-wrap items-center justify-end py-5',\n '@max-tf-panel:flex-col-reverse @max-tf-panel:flex-nowrap @max-tf-panel:*:w-full',\n ].join(' '),\n } satisfies Record<DialogLayout, string>,\n },\n },\n)\n\nconst dialogNoteRecipe = cva('mr-auto text-tf-caption font-medium text-tf-muted tabular-nums')\n\nconst dialogRowRecipe = cva([\n 'flex h-tf-row flex-none items-center justify-between gap-3',\n 'rounded-tf-inline px-3 text-tf-muted',\n])\n\nconst dialogRowValueRecipe = cva('text-tf-fg tabular-nums', {\n defaultVariants: { lit: false },\n variants: {\n lit: { false: '', true: 'text-tf-accent-hi' },\n },\n})\n\nexport {\n type DialogLayout,\n type DialogSize,\n defaultDialogLayout,\n defaultDialogSize,\n dialogLayouts,\n dialogBackdropRecipe,\n dialogBodyRecipe,\n dialogCloseRecipe,\n dialogDescriptionRecipe,\n dialogFooterRecipe,\n dialogHeadRecipe,\n dialogHeadingsRecipe,\n dialogHeldRecipe,\n dialogNoteRecipe,\n dialogPositionerRecipe,\n dialogRecipe,\n dialogRowRecipe,\n dialogRowValueRecipe,\n dialogSizes,\n dialogTitleRecipe,\n}\n"],"mappings":";;;;AAUA,MAAM,sBAAsB;AAE5B,MAAM,gBAAgB,CAAC,SAAS,SAAS;AAEzC,MAAM,oBAAoB;AAE1B,MAAM,cAAc;CAAC;CAAM;CAAM;AAAI;AAErC,MAAM,QAAQ;CACZ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AAEA,MAAM,SAAS;AAEf,MAAM,SAAS;AAEf,MAAM,OAAO;CACX;CACA;CACA;AACF;AAEA,MAAM,uBAAuB,IAAI;CAC/B;CACA,GAAG;CACH;AACF,CAAC;AAED,MAAM,yBAAyB,IAAI,CACjC,oFACA,cACF,CAAC;AAED,MAAM,eAAe,IACnB;CACE,GAAG;CACH;CACA,GAAG;CACH;CACA;CACA,GAAG;CACH,GAAG;CACH;AACF,GACA;CACE,iBAAiB,EAAE,MAAA,KAAwB;CAC3C,UAAU,EAAE,MAAM,MAAM;AAC1B,CACF;AAEA,MAAM,mBAAmB,IAAI,mDAAmD;AAEhF,MAAM,mBAAmB,IAAI,CAAC,QAAQ,mCAAmC,GAAG;CAC1E,iBAAiB,EAAE,QAAQ,oBAAoB;CAC/C,UAAU,EACR,QAAQ;EACN,SAAS;EACT,OAAO;CACT,EACF;AACF,CAAC;AAED,MAAM,uBAAuB,IAAI,mCAAmC;CAClE,kBAAkB,CAAC;EAAE,OAAO;EAAS,QAAQ;EAAS,OAAO;CAAK,CAAC;CACnE,iBAAiB;EAAE,QAAQ;EAAqB,OAAO;CAAM;CAC7D,UAAU;EACR,QAAQ;GACN,SAAS;GACT,OAAO;EACT;EACA,OAAO;GAAE,OAAO;GAAI,MAAM;EAAG;CAC/B;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,mEAAmE;AAEjG,MAAM,0BAA0B,IAAI,2CAA2C;AAE/E,MAAM,oBAAoB,IAAI,oCAAoC;AAElE,MAAM,QAAQ;CACZ;CACA;CACA;AACF,CAAC,CAAC,KAAK,GAAG;AAEV,MAAM,mBAAmB,IACvB;CAAC;CAAQ;CAAmD;CAAO;AAAsB,GACzF;CACE,iBAAiB,EAAE,QAAQ,oBAAoB;CAC/C,UAAU,EACR,QAAQ;EACN,SAAS;EACT,OAAO;CACT,EACF;AACF,CACF;AAEA,MAAM,qBAAqB,IACzB,CAAC,+CAA+C,+BAA+B,GAC/E;CACE,iBAAiB,EAAE,QAAQ,oBAAoB;CAC/C,UAAU,EACR,QAAQ;EACN,SAAS,GAAG,OAAO;EACnB,OAAO;GACL;GACA;GACA;EACF,CAAC,CAAC,KAAK,GAAG;CACZ,EACF;AACF,CACF;AAEA,MAAM,mBAAmB,IAAI,gEAAgE;AAE7F,MAAM,kBAAkB,IAAI,CAC1B,8DACA,sCACF,CAAC;AAED,MAAM,uBAAuB,IAAI,2BAA2B;CAC1D,iBAAiB,EAAE,KAAK,MAAM;CAC9B,UAAU,EACR,KAAK;EAAE,OAAO;EAAI,MAAM;CAAoB,EAC9C;AACF,CAAC"}
@@ -0,0 +1,15 @@
1
+ //#region src/recipes/feature.d.ts
2
+ declare const featureLevels: readonly ["h2", "h3", "h4", "h5", "h6"];
3
+ type FeatureLevel = (typeof featureLevels)[number];
4
+ declare const defaultFeatureLevel = "h3";
5
+ declare const featureRecipe: (props?: ({
6
+ interactive?: boolean | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare const featureTileRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
9
+ declare const featureTitleRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
10
+ declare const featureLinkRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
11
+ declare const featureBodyRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
12
+ declare const featureFootRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
13
+ //#endregion
14
+ export { type FeatureLevel, defaultFeatureLevel, featureBodyRecipe, featureFootRecipe, featureLevels, featureLinkRecipe, featureRecipe, featureTileRecipe, featureTitleRecipe };
15
+ //# sourceMappingURL=feature.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { surfacePanel } from "../parts/surface.js";
2
+ import { tileReached, tileRoused } from "../parts/rouse.js";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/recipes/feature.ts
5
+ const featureLevels = [
6
+ "h2",
7
+ "h3",
8
+ "h4",
9
+ "h5",
10
+ "h6"
11
+ ];
12
+ const defaultFeatureLevel = "h3";
13
+ const ROUSED_TILE = [tileRoused, tileReached].join(" ");
14
+ const LIFTS = ["motion-safe:hovered:-translate-y-0.5", "motion-safe:reached:-translate-y-0.5"].join(" ");
15
+ const featureRecipe = cva([
16
+ ...surfacePanel,
17
+ "flex flex-col gap-5 p-6 font-tf-body text-tf-fg",
18
+ "tf-fill-scale tf-blend-drift tf-transition motion-reduce:transition-none"
19
+ ], {
20
+ defaultVariants: { interactive: false },
21
+ variants: { interactive: {
22
+ false: "",
23
+ true: [
24
+ "hovered:tf-edge-lit hovered:tf-nudged reached:tf-edge-lit reached:tf-nudged",
25
+ ROUSED_TILE,
26
+ LIFTS
27
+ ].join(" ")
28
+ } }
29
+ });
30
+ const featureTileRecipe = cva("self-start");
31
+ const featureTitleRecipe = cva("font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg");
32
+ const featureLinkRecipe = cva([
33
+ "outline-hidden",
34
+ "before:absolute before:inset-0 before:rounded-tf-card before:content-['']",
35
+ "focused:before:outline-2 focused:before:outline-solid",
36
+ "focused:before:outline-offset-2 focused:before:outline-tf-accent-hi"
37
+ ]);
38
+ const featureBodyRecipe = cva("text-tf-body-sm font-medium text-tf-muted");
39
+ const featureFootRecipe = cva([
40
+ "relative mt-auto inline-flex items-center gap-1 self-start tf-icons",
41
+ "text-tf-caption font-medium text-tf-accent-hi",
42
+ "[&_svg]:size-tf-icon-sm [&_svg]:tf-nudge-follow",
43
+ "pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto"
44
+ ]);
45
+ //#endregion
46
+ export { defaultFeatureLevel, featureBodyRecipe, featureFootRecipe, featureLevels, featureLinkRecipe, featureRecipe, featureTileRecipe, featureTitleRecipe };
47
+
48
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature.js","names":[],"sources":["../../src/recipes/feature.ts"],"sourcesContent":["import { cva } from 'class-variance-authority'\n\nimport { tileReached, tileRoused } from '#parts/rouse'\nimport { surfacePanel } from '#parts/surface'\n\nconst featureLevels = ['h2', 'h3', 'h4', 'h5', 'h6'] as const\n\ntype FeatureLevel = (typeof featureLevels)[number]\n\nconst defaultFeatureLevel = 'h3' satisfies FeatureLevel\n\nconst ROUSED_TILE = [tileRoused, tileReached].join(' ')\n\nconst LIFTS = ['motion-safe:hovered:-translate-y-0.5', 'motion-safe:reached:-translate-y-0.5'].join(\n ' ',\n)\n\nconst featureRecipe = cva(\n [\n ...surfacePanel,\n 'flex flex-col gap-5 p-6 font-tf-body text-tf-fg',\n 'tf-fill-scale tf-blend-drift tf-transition motion-reduce:transition-none',\n ],\n {\n defaultVariants: { interactive: false },\n variants: {\n interactive: {\n false: '',\n true: [\n 'hovered:tf-edge-lit hovered:tf-nudged reached:tf-edge-lit reached:tf-nudged',\n ROUSED_TILE,\n LIFTS,\n ].join(' '),\n },\n },\n },\n)\n\nconst featureTileRecipe = cva('self-start')\n\nconst featureTitleRecipe = cva('font-tf-display text-tf-h4 font-bold tracking-tf-tight text-tf-fg')\n\nconst featureLinkRecipe = cva([\n 'outline-hidden',\n \"before:absolute before:inset-0 before:rounded-tf-card before:content-['']\",\n 'focused:before:outline-2 focused:before:outline-solid',\n 'focused:before:outline-offset-2 focused:before:outline-tf-accent-hi',\n])\n\nconst featureBodyRecipe = cva('text-tf-body-sm font-medium text-tf-muted')\n\nconst featureFootRecipe = cva([\n 'relative mt-auto inline-flex items-center gap-1 self-start tf-icons',\n 'text-tf-caption font-medium text-tf-accent-hi',\n '[&_svg]:size-tf-icon-sm [&_svg]:tf-nudge-follow',\n 'pointer-events-none [&_a]:pointer-events-auto [&_button]:pointer-events-auto',\n])\n\nexport {\n type FeatureLevel,\n defaultFeatureLevel,\n featureBodyRecipe,\n featureFootRecipe,\n featureLevels,\n featureLinkRecipe,\n featureRecipe,\n featureTileRecipe,\n featureTitleRecipe,\n}\n"],"mappings":";;;;AAKA,MAAM,gBAAgB;CAAC;CAAM;CAAM;CAAM;CAAM;AAAI;AAInD,MAAM,sBAAsB;AAE5B,MAAM,cAAc,CAAC,YAAY,WAAW,CAAC,CAAC,KAAK,GAAG;AAEtD,MAAM,QAAQ,CAAC,wCAAwC,sCAAsC,CAAC,CAAC,KAC7F,GACF;AAEA,MAAM,gBAAgB,IACpB;CACE,GAAG;CACH;CACA;AACF,GACA;CACE,iBAAiB,EAAE,aAAa,MAAM;CACtC,UAAU,EACR,aAAa;EACX,OAAO;EACP,MAAM;GACJ;GACA;GACA;EACF,CAAC,CAAC,KAAK,GAAG;CACZ,EACF;AACF,CACF;AAEA,MAAM,oBAAoB,IAAI,YAAY;AAE1C,MAAM,qBAAqB,IAAI,mEAAmE;AAElG,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC;AAED,MAAM,oBAAoB,IAAI,2CAA2C;AAEzE,MAAM,oBAAoB,IAAI;CAC5B;CACA;CACA;CACA;AACF,CAAC"}
@@ -0,0 +1,26 @@
1
+ //#region src/recipes/field.d.ts
2
+ declare const fieldRecipe: (props?: ({
3
+ message?: boolean | null | undefined;
4
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
+ declare const fieldRowRecipe: (props?: ({
6
+ invalid?: boolean | null | undefined;
7
+ loading?: boolean | null | undefined;
8
+ size?: "md" | "lg" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare const fieldLabelRecipe: (props?: ({
11
+ hidden?: boolean | null | undefined;
12
+ leading?: boolean | null | undefined;
13
+ size?: "md" | "lg" | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ declare const fieldHintRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
16
+ declare const fieldErrorRecipe: (props?: ({
17
+ alone?: boolean | null | undefined;
18
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
+ declare const fieldFootRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
20
+ declare const fieldUnitRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
21
+ declare const leadingRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
22
+ declare const trailingRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
23
+ declare const trailingActionRecipe: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
24
+ //#endregion
25
+ export { fieldErrorRecipe, fieldFootRecipe, fieldHintRecipe, fieldLabelRecipe, fieldRecipe, fieldRowRecipe, fieldUnitRecipe, leadingRecipe, trailingActionRecipe, trailingRecipe };
26
+ //# sourceMappingURL=field.d.ts.map