@tenphi/tasty 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 (359) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +236 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +7 -0
  4. package/dist/chunks/cacheKey.d.ts +1 -0
  5. package/dist/chunks/cacheKey.js +70 -0
  6. package/dist/chunks/cacheKey.js.map +1 -0
  7. package/dist/chunks/cacheKey.mjs +70 -0
  8. package/dist/chunks/cacheKey.mjs.map +1 -0
  9. package/dist/chunks/definitions.d.ts +37 -0
  10. package/dist/chunks/definitions.js +260 -0
  11. package/dist/chunks/definitions.js.map +1 -0
  12. package/dist/chunks/definitions.mjs +260 -0
  13. package/dist/chunks/definitions.mjs.map +1 -0
  14. package/dist/chunks/index.d.ts +3 -0
  15. package/dist/chunks/renderChunk.d.ts +2 -0
  16. package/dist/chunks/renderChunk.js +61 -0
  17. package/dist/chunks/renderChunk.js.map +1 -0
  18. package/dist/chunks/renderChunk.mjs +61 -0
  19. package/dist/chunks/renderChunk.mjs.map +1 -0
  20. package/dist/config.d.ts +279 -0
  21. package/dist/config.js +400 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/config.mjs +231 -0
  24. package/dist/config.mjs.map +1 -0
  25. package/dist/css-writer.d.mts +45 -0
  26. package/dist/css-writer.mjs +74 -0
  27. package/dist/css-writer.mjs.map +1 -0
  28. package/dist/debug.d.ts +204 -0
  29. package/dist/debug.js +733 -0
  30. package/dist/debug.js.map +1 -0
  31. package/dist/extractor.d.mts +24 -0
  32. package/dist/extractor.mjs +150 -0
  33. package/dist/extractor.mjs.map +1 -0
  34. package/dist/hooks/index.d.ts +5 -0
  35. package/dist/hooks/useGlobalStyles.d.ts +27 -0
  36. package/dist/hooks/useGlobalStyles.js +56 -0
  37. package/dist/hooks/useGlobalStyles.js.map +1 -0
  38. package/dist/hooks/useKeyframes.d.ts +56 -0
  39. package/dist/hooks/useKeyframes.js +54 -0
  40. package/dist/hooks/useKeyframes.js.map +1 -0
  41. package/dist/hooks/useProperty.d.ts +79 -0
  42. package/dist/hooks/useProperty.js +91 -0
  43. package/dist/hooks/useProperty.js.map +1 -0
  44. package/dist/hooks/useRawCSS.d.ts +53 -0
  45. package/dist/hooks/useRawCSS.js +28 -0
  46. package/dist/hooks/useRawCSS.js.map +1 -0
  47. package/dist/hooks/useStyles.d.ts +40 -0
  48. package/dist/hooks/useStyles.js +169 -0
  49. package/dist/hooks/useStyles.js.map +1 -0
  50. package/dist/index.d.ts +38 -0
  51. package/dist/index.js +30 -0
  52. package/dist/injector/index.d.ts +157 -0
  53. package/dist/injector/index.js +154 -0
  54. package/dist/injector/index.js.map +1 -0
  55. package/dist/injector/injector.d.ts +139 -0
  56. package/dist/injector/injector.js +404 -0
  57. package/dist/injector/injector.js.map +1 -0
  58. package/dist/injector/injector.mjs +404 -0
  59. package/dist/injector/injector.mjs.map +1 -0
  60. package/dist/injector/sheet-manager.d.ts +127 -0
  61. package/dist/injector/sheet-manager.js +714 -0
  62. package/dist/injector/sheet-manager.js.map +1 -0
  63. package/dist/injector/sheet-manager.mjs +714 -0
  64. package/dist/injector/sheet-manager.mjs.map +1 -0
  65. package/dist/injector/types.d.mts +18 -0
  66. package/dist/injector/types.d.ts +135 -0
  67. package/dist/keyframes/index.js +206 -0
  68. package/dist/keyframes/index.js.map +1 -0
  69. package/dist/keyframes/index.mjs +156 -0
  70. package/dist/keyframes/index.mjs.map +1 -0
  71. package/dist/parser/classify.js +319 -0
  72. package/dist/parser/classify.js.map +1 -0
  73. package/dist/parser/classify.mjs +319 -0
  74. package/dist/parser/classify.mjs.map +1 -0
  75. package/dist/parser/const.js +33 -0
  76. package/dist/parser/const.js.map +1 -0
  77. package/dist/parser/const.mjs +33 -0
  78. package/dist/parser/const.mjs.map +1 -0
  79. package/dist/parser/lru.js +109 -0
  80. package/dist/parser/lru.js.map +1 -0
  81. package/dist/parser/lru.mjs +109 -0
  82. package/dist/parser/lru.mjs.map +1 -0
  83. package/dist/parser/parser.d.ts +25 -0
  84. package/dist/parser/parser.js +116 -0
  85. package/dist/parser/parser.js.map +1 -0
  86. package/dist/parser/parser.mjs +116 -0
  87. package/dist/parser/parser.mjs.map +1 -0
  88. package/dist/parser/tokenizer.js +69 -0
  89. package/dist/parser/tokenizer.js.map +1 -0
  90. package/dist/parser/tokenizer.mjs +69 -0
  91. package/dist/parser/tokenizer.mjs.map +1 -0
  92. package/dist/parser/types.d.mts +37 -0
  93. package/dist/parser/types.d.ts +46 -0
  94. package/dist/parser/types.js +46 -0
  95. package/dist/parser/types.js.map +1 -0
  96. package/dist/parser/types.mjs +46 -0
  97. package/dist/parser/types.mjs.map +1 -0
  98. package/dist/pipeline/conditions.js +377 -0
  99. package/dist/pipeline/conditions.js.map +1 -0
  100. package/dist/pipeline/conditions.mjs +377 -0
  101. package/dist/pipeline/conditions.mjs.map +1 -0
  102. package/dist/pipeline/exclusive.d.ts +1 -0
  103. package/dist/pipeline/exclusive.js +231 -0
  104. package/dist/pipeline/exclusive.js.map +1 -0
  105. package/dist/pipeline/exclusive.mjs +231 -0
  106. package/dist/pipeline/exclusive.mjs.map +1 -0
  107. package/dist/pipeline/index.d.ts +53 -0
  108. package/dist/pipeline/index.js +641 -0
  109. package/dist/pipeline/index.js.map +1 -0
  110. package/dist/pipeline/index.mjs +635 -0
  111. package/dist/pipeline/index.mjs.map +1 -0
  112. package/dist/pipeline/materialize.js +821 -0
  113. package/dist/pipeline/materialize.js.map +1 -0
  114. package/dist/pipeline/materialize.mjs +821 -0
  115. package/dist/pipeline/materialize.mjs.map +1 -0
  116. package/dist/pipeline/parseStateKey.d.ts +1 -0
  117. package/dist/pipeline/parseStateKey.js +418 -0
  118. package/dist/pipeline/parseStateKey.js.map +1 -0
  119. package/dist/pipeline/parseStateKey.mjs +418 -0
  120. package/dist/pipeline/parseStateKey.mjs.map +1 -0
  121. package/dist/pipeline/simplify.js +557 -0
  122. package/dist/pipeline/simplify.js.map +1 -0
  123. package/dist/pipeline/simplify.mjs +557 -0
  124. package/dist/pipeline/simplify.mjs.map +1 -0
  125. package/dist/plugins/index.d.ts +2 -0
  126. package/dist/plugins/okhsl-plugin.d.ts +35 -0
  127. package/dist/plugins/okhsl-plugin.js +371 -0
  128. package/dist/plugins/okhsl-plugin.js.map +1 -0
  129. package/dist/plugins/okhsl-plugin.mjs +345 -0
  130. package/dist/plugins/okhsl-plugin.mjs.map +1 -0
  131. package/dist/plugins/types.d.mts +49 -0
  132. package/dist/plugins/types.d.ts +69 -0
  133. package/dist/properties/index.js +158 -0
  134. package/dist/properties/index.js.map +1 -0
  135. package/dist/properties/index.mjs +141 -0
  136. package/dist/properties/index.mjs.map +1 -0
  137. package/dist/states/index.d.ts +45 -0
  138. package/dist/states/index.js +389 -0
  139. package/dist/states/index.js.map +1 -0
  140. package/dist/states/index.mjs +161 -0
  141. package/dist/states/index.mjs.map +1 -0
  142. package/dist/static/index.d.ts +5 -0
  143. package/dist/static/index.js +5 -0
  144. package/dist/static/tastyStatic.d.ts +46 -0
  145. package/dist/static/tastyStatic.js +31 -0
  146. package/dist/static/tastyStatic.js.map +1 -0
  147. package/dist/static/types.d.ts +49 -0
  148. package/dist/static/types.js +24 -0
  149. package/dist/static/types.js.map +1 -0
  150. package/dist/styles/align.d.ts +15 -0
  151. package/dist/styles/align.js +14 -0
  152. package/dist/styles/align.js.map +1 -0
  153. package/dist/styles/align.mjs +14 -0
  154. package/dist/styles/align.mjs.map +1 -0
  155. package/dist/styles/border.d.ts +25 -0
  156. package/dist/styles/border.js +114 -0
  157. package/dist/styles/border.js.map +1 -0
  158. package/dist/styles/border.mjs +114 -0
  159. package/dist/styles/border.mjs.map +1 -0
  160. package/dist/styles/color.d.ts +14 -0
  161. package/dist/styles/color.js +23 -0
  162. package/dist/styles/color.js.map +1 -0
  163. package/dist/styles/color.mjs +23 -0
  164. package/dist/styles/color.mjs.map +1 -0
  165. package/dist/styles/createStyle.js +77 -0
  166. package/dist/styles/createStyle.js.map +1 -0
  167. package/dist/styles/createStyle.mjs +77 -0
  168. package/dist/styles/createStyle.mjs.map +1 -0
  169. package/dist/styles/dimension.js +97 -0
  170. package/dist/styles/dimension.js.map +1 -0
  171. package/dist/styles/dimension.mjs +97 -0
  172. package/dist/styles/dimension.mjs.map +1 -0
  173. package/dist/styles/display.d.ts +37 -0
  174. package/dist/styles/display.js +67 -0
  175. package/dist/styles/display.js.map +1 -0
  176. package/dist/styles/display.mjs +67 -0
  177. package/dist/styles/display.mjs.map +1 -0
  178. package/dist/styles/fade.d.ts +15 -0
  179. package/dist/styles/fade.js +58 -0
  180. package/dist/styles/fade.js.map +1 -0
  181. package/dist/styles/fade.mjs +58 -0
  182. package/dist/styles/fade.mjs.map +1 -0
  183. package/dist/styles/fill.d.ts +44 -0
  184. package/dist/styles/fill.js +51 -0
  185. package/dist/styles/fill.js.map +1 -0
  186. package/dist/styles/fill.mjs +51 -0
  187. package/dist/styles/fill.mjs.map +1 -0
  188. package/dist/styles/flow.d.ts +16 -0
  189. package/dist/styles/flow.js +12 -0
  190. package/dist/styles/flow.js.map +1 -0
  191. package/dist/styles/flow.mjs +12 -0
  192. package/dist/styles/flow.mjs.map +1 -0
  193. package/dist/styles/gap.d.ts +31 -0
  194. package/dist/styles/gap.js +37 -0
  195. package/dist/styles/gap.js.map +1 -0
  196. package/dist/styles/gap.mjs +37 -0
  197. package/dist/styles/gap.mjs.map +1 -0
  198. package/dist/styles/height.d.ts +17 -0
  199. package/dist/styles/height.js +20 -0
  200. package/dist/styles/height.js.map +1 -0
  201. package/dist/styles/height.mjs +20 -0
  202. package/dist/styles/height.mjs.map +1 -0
  203. package/dist/styles/index.d.ts +2 -0
  204. package/dist/styles/index.js +9 -0
  205. package/dist/styles/index.js.map +1 -0
  206. package/dist/styles/index.mjs +9 -0
  207. package/dist/styles/index.mjs.map +1 -0
  208. package/dist/styles/inset.d.ts +50 -0
  209. package/dist/styles/inset.js +142 -0
  210. package/dist/styles/inset.js.map +1 -0
  211. package/dist/styles/inset.mjs +142 -0
  212. package/dist/styles/inset.mjs.map +1 -0
  213. package/dist/styles/justify.d.ts +15 -0
  214. package/dist/styles/justify.js +14 -0
  215. package/dist/styles/justify.js.map +1 -0
  216. package/dist/styles/justify.mjs +14 -0
  217. package/dist/styles/justify.mjs.map +1 -0
  218. package/dist/styles/list.d.ts +16 -0
  219. package/dist/styles/list.js +98 -0
  220. package/dist/styles/list.js.map +1 -0
  221. package/dist/styles/margin.d.ts +28 -0
  222. package/dist/styles/margin.js +96 -0
  223. package/dist/styles/margin.js.map +1 -0
  224. package/dist/styles/margin.mjs +96 -0
  225. package/dist/styles/margin.mjs.map +1 -0
  226. package/dist/styles/outline.d.ts +29 -0
  227. package/dist/styles/outline.js +65 -0
  228. package/dist/styles/outline.js.map +1 -0
  229. package/dist/styles/outline.mjs +65 -0
  230. package/dist/styles/outline.mjs.map +1 -0
  231. package/dist/styles/padding.d.ts +28 -0
  232. package/dist/styles/padding.js +96 -0
  233. package/dist/styles/padding.js.map +1 -0
  234. package/dist/styles/padding.mjs +96 -0
  235. package/dist/styles/padding.mjs.map +1 -0
  236. package/dist/styles/predefined.d.ts +74 -0
  237. package/dist/styles/predefined.js +241 -0
  238. package/dist/styles/predefined.js.map +1 -0
  239. package/dist/styles/predefined.mjs +232 -0
  240. package/dist/styles/predefined.mjs.map +1 -0
  241. package/dist/styles/preset.d.ts +47 -0
  242. package/dist/styles/preset.js +126 -0
  243. package/dist/styles/preset.js.map +1 -0
  244. package/dist/styles/preset.mjs +126 -0
  245. package/dist/styles/preset.mjs.map +1 -0
  246. package/dist/styles/radius.d.ts +14 -0
  247. package/dist/styles/radius.js +51 -0
  248. package/dist/styles/radius.js.map +1 -0
  249. package/dist/styles/radius.mjs +51 -0
  250. package/dist/styles/radius.mjs.map +1 -0
  251. package/dist/styles/scrollbar.d.ts +21 -0
  252. package/dist/styles/scrollbar.js +105 -0
  253. package/dist/styles/scrollbar.js.map +1 -0
  254. package/dist/styles/scrollbar.mjs +105 -0
  255. package/dist/styles/scrollbar.mjs.map +1 -0
  256. package/dist/styles/shadow.d.ts +14 -0
  257. package/dist/styles/shadow.js +24 -0
  258. package/dist/styles/shadow.js.map +1 -0
  259. package/dist/styles/shadow.mjs +24 -0
  260. package/dist/styles/shadow.mjs.map +1 -0
  261. package/dist/styles/styledScrollbar.d.ts +47 -0
  262. package/dist/styles/styledScrollbar.js +38 -0
  263. package/dist/styles/styledScrollbar.js.map +1 -0
  264. package/dist/styles/styledScrollbar.mjs +38 -0
  265. package/dist/styles/styledScrollbar.mjs.map +1 -0
  266. package/dist/styles/transition.d.ts +14 -0
  267. package/dist/styles/transition.js +138 -0
  268. package/dist/styles/transition.js.map +1 -0
  269. package/dist/styles/transition.mjs +138 -0
  270. package/dist/styles/transition.mjs.map +1 -0
  271. package/dist/styles/types.d.mts +492 -0
  272. package/dist/styles/types.d.ts +496 -0
  273. package/dist/styles/width.d.ts +17 -0
  274. package/dist/styles/width.js +20 -0
  275. package/dist/styles/width.js.map +1 -0
  276. package/dist/styles/width.mjs +20 -0
  277. package/dist/styles/width.mjs.map +1 -0
  278. package/dist/tasty.d.ts +983 -0
  279. package/dist/tasty.js +191 -0
  280. package/dist/tasty.js.map +1 -0
  281. package/dist/tokens/typography.d.ts +19 -0
  282. package/dist/tokens/typography.js +237 -0
  283. package/dist/tokens/typography.js.map +1 -0
  284. package/dist/types.d.ts +182 -0
  285. package/dist/utils/cache-wrapper.js +26 -0
  286. package/dist/utils/cache-wrapper.js.map +1 -0
  287. package/dist/utils/cache-wrapper.mjs +26 -0
  288. package/dist/utils/cache-wrapper.mjs.map +1 -0
  289. package/dist/utils/case-converter.js +8 -0
  290. package/dist/utils/case-converter.js.map +1 -0
  291. package/dist/utils/case-converter.mjs +8 -0
  292. package/dist/utils/case-converter.mjs.map +1 -0
  293. package/dist/utils/colors.d.ts +5 -0
  294. package/dist/utils/colors.js +9 -0
  295. package/dist/utils/colors.js.map +1 -0
  296. package/dist/utils/dotize.d.ts +26 -0
  297. package/dist/utils/dotize.js +122 -0
  298. package/dist/utils/dotize.js.map +1 -0
  299. package/dist/utils/filter-base-props.d.ts +15 -0
  300. package/dist/utils/filter-base-props.js +45 -0
  301. package/dist/utils/filter-base-props.js.map +1 -0
  302. package/dist/utils/get-display-name.d.ts +7 -0
  303. package/dist/utils/get-display-name.js +10 -0
  304. package/dist/utils/get-display-name.js.map +1 -0
  305. package/dist/utils/hsl-to-rgb.js +38 -0
  306. package/dist/utils/hsl-to-rgb.js.map +1 -0
  307. package/dist/utils/hsl-to-rgb.mjs +38 -0
  308. package/dist/utils/hsl-to-rgb.mjs.map +1 -0
  309. package/dist/utils/is-dev-env.js +19 -0
  310. package/dist/utils/is-dev-env.js.map +1 -0
  311. package/dist/utils/is-dev-env.mjs +19 -0
  312. package/dist/utils/is-dev-env.mjs.map +1 -0
  313. package/dist/utils/merge-styles.d.ts +7 -0
  314. package/dist/utils/merge-styles.js +146 -0
  315. package/dist/utils/merge-styles.js.map +1 -0
  316. package/dist/utils/merge-styles.mjs +146 -0
  317. package/dist/utils/merge-styles.mjs.map +1 -0
  318. package/dist/utils/mod-attrs.d.ts +8 -0
  319. package/dist/utils/mod-attrs.js +21 -0
  320. package/dist/utils/mod-attrs.js.map +1 -0
  321. package/dist/utils/okhsl-to-rgb.js +296 -0
  322. package/dist/utils/okhsl-to-rgb.js.map +1 -0
  323. package/dist/utils/okhsl-to-rgb.mjs +296 -0
  324. package/dist/utils/okhsl-to-rgb.mjs.map +1 -0
  325. package/dist/utils/process-tokens.d.ts +31 -0
  326. package/dist/utils/process-tokens.js +171 -0
  327. package/dist/utils/process-tokens.js.map +1 -0
  328. package/dist/utils/process-tokens.mjs +28 -0
  329. package/dist/utils/process-tokens.mjs.map +1 -0
  330. package/dist/utils/resolve-recipes.d.ts +17 -0
  331. package/dist/utils/resolve-recipes.js +143 -0
  332. package/dist/utils/resolve-recipes.js.map +1 -0
  333. package/dist/utils/resolve-recipes.mjs +143 -0
  334. package/dist/utils/resolve-recipes.mjs.map +1 -0
  335. package/dist/utils/string.js +8 -0
  336. package/dist/utils/string.js.map +1 -0
  337. package/dist/utils/string.mjs +8 -0
  338. package/dist/utils/string.mjs.map +1 -0
  339. package/dist/utils/styles.d.mts +18 -0
  340. package/dist/utils/styles.d.ts +183 -0
  341. package/dist/utils/styles.js +585 -0
  342. package/dist/utils/styles.js.map +1 -0
  343. package/dist/utils/styles.mjs +346 -0
  344. package/dist/utils/styles.mjs.map +1 -0
  345. package/dist/utils/typography.d.ts +36 -0
  346. package/dist/utils/typography.js +53 -0
  347. package/dist/utils/typography.js.map +1 -0
  348. package/dist/utils/warnings.d.ts +16 -0
  349. package/dist/utils/warnings.js +16 -0
  350. package/dist/utils/warnings.js.map +1 -0
  351. package/dist/zero/babel.d.mts +108 -0
  352. package/dist/zero/babel.mjs +282 -0
  353. package/dist/zero/babel.mjs.map +1 -0
  354. package/dist/zero/index.d.mts +3 -0
  355. package/dist/zero/index.mjs +4 -0
  356. package/dist/zero/next.d.mts +60 -0
  357. package/dist/zero/next.mjs +78 -0
  358. package/dist/zero/next.mjs.map +1 -0
  359. package/package.json +127 -0
@@ -0,0 +1,496 @@
1
+ import { KeyframesSteps, PropertyDefinition } from "../injector/types.js";
2
+ import { StyleValue, StyleValueStateMap } from "../utils/styles.js";
3
+ import { CSSProperties } from "react";
4
+
5
+ //#region src/styles/types.d.ts
6
+ /**
7
+ * Extensible interface for named color tokens.
8
+ * Augment this interface to register project-specific color names
9
+ * for autocomplete in `fill`, `color`, `svgFill`, and other color style props.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * declare module '@tenphi/tasty' {
14
+ * interface TastyNamedColors {
15
+ * primary: true;
16
+ * danger: true;
17
+ * }
18
+ * }
19
+ * ```
20
+ */
21
+ interface TastyNamedColors {}
22
+ type NamedColorKey = Extract<keyof TastyNamedColors, string>;
23
+ type NamedColor = [NamedColorKey] extends [never] ? string : NamedColorKey;
24
+ /**
25
+ * Extensible interface for typography preset names.
26
+ * Augment this interface to register project-specific preset names for autocomplete.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * declare module '@tenphi/tasty' {
31
+ * interface TastyPresetNames {
32
+ * h1: true;
33
+ * t3: true;
34
+ * }
35
+ * }
36
+ * ```
37
+ */
38
+ interface TastyPresetNames {}
39
+ type PresetNameKey = Extract<keyof TastyPresetNames, string>;
40
+ type PresetName = [PresetNameKey] extends [never] ? string : PresetNameKey;
41
+ type Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
42
+ type OpaquePercentage = '' | `.${Digit}` | `.${Digit}${Digit}` | '.100';
43
+ type NoType = false | null | undefined;
44
+ interface StylesInterface extends Omit<CSSProperties, 'color' | 'fill' | 'font' | 'outline' | 'type' | 'gap' | 'padding' | 'margin' | 'width' | 'height' | 'border' | 'transition' | 'placeContent' | 'placeItems'> {
45
+ /**
46
+ * @deprecated Use `flow` style instead.
47
+ */
48
+ flexDirection: CSSProperties['flexDirection'];
49
+ /**
50
+ * @deprecated Use `placeContent`, `placeItems`, `gridColumns`, `gridRows`, and `gridTemplate` styles instead.
51
+ */
52
+ grid: CSSProperties['grid'];
53
+ /**
54
+ * @deprecated Use `flexShrink`, `flexGrow`, and `flexBasis` styles instead.
55
+ */
56
+ flex: CSSProperties['flex'];
57
+ /**
58
+ * Set the background color of the element. Shortcut for `background-color` with enhanced support for Tasty color tokens and syntaxes.
59
+ *
60
+ * Examples:
61
+ * - `fill="#purple.10"` // purple background with 10% opacity
62
+ * - `fill="#danger"` // danger theme color
63
+ * - `fill="rgb(255 128 0)"` // custom RGB color
64
+ * - `fill={true}` // default fill color
65
+ */
66
+ fill?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | boolean | (string & {});
67
+ /**
68
+ * @deprecated Use `fill` instead.
69
+ */
70
+ backgroundColor?: CSSProperties['backgroundColor'];
71
+ /**
72
+ * Set the background image of the element. Shortcut for `background-image` with enhanced support for Tasty tokens.
73
+ *
74
+ * Examples:
75
+ * - `image="url(/path/to/image.png)"` // image from URL
76
+ * - `image="linear-gradient(to right, #purple, #danger)"` // gradient
77
+ */
78
+ image?: CSSProperties['backgroundImage'];
79
+ /**
80
+ * @deprecated Use `image` instead.
81
+ */
82
+ backgroundImage?: CSSProperties['backgroundImage'];
83
+ /**
84
+ * @deprecated Use separate background styles (`fill`, `image`, `backgroundSize`, etc.) instead.
85
+ * When set, overrides all other background-related styles.
86
+ */
87
+ background?: CSSProperties['background'];
88
+ /**
89
+ * Set the fill color of SVG elements. Outputs the native CSS `fill` property with enhanced support for Tasty color tokens and syntaxes.
90
+ *
91
+ * Examples:
92
+ * - `svgFill="#purple.10"` // purple fill with 10% opacity
93
+ * - `svgFill="#danger"` // danger theme color
94
+ * - `svgFill="rgb(255 128 0)"` // custom RGB color
95
+ * - `svgFill="currentColor"` // inherit from parent color
96
+ */
97
+ svgFill?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | (string & {});
98
+ /**
99
+ * Set the text (current) color of the element. Shortcut for `color` with enhanced support for Tasty color tokens and syntaxes.
100
+ *
101
+ * Examples:
102
+ * - `color="#purple"` // purple text color
103
+ * - `color="#danger.6"` // danger color with 60% opacity
104
+ * - `color="red"` // CSS color name
105
+ * - `color={true}` // currentColor
106
+ */
107
+ color?: `#${NamedColor}${OpaquePercentage}` | `rgb(${string})` | `rgba(${string})` | boolean | string;
108
+ /**
109
+ * The fade style applies gradient-based fading masks to the edges of an element. Replaces complex CSS mask gradients with a simple, declarative API.
110
+ *
111
+ * Syntax: `[width] [directions] [#from-color] [#to-color]`
112
+ *
113
+ * Multiple groups can be separated by commas to specify different colors per direction.
114
+ *
115
+ * Color tokens (optional):
116
+ * - First color: transparent start of gradient (default: `rgb(0 0 0 / 0)`)
117
+ * - Second color: opaque end of gradient (default: `rgb(0 0 0 / 1)`)
118
+ *
119
+ * Examples:
120
+ * - `fade="top"` // fade only top edge with default width
121
+ * - `fade="2x left right"` // fade left and right edges with 2x width
122
+ * - `fade="1x top"` // fade only top edge with 1x width
123
+ * - `fade="3x 1x top bottom"` // top: 3x width, bottom: 1x width
124
+ * - `fade="2x #transparent #dark"` // custom colors for gradient mask
125
+ * - `fade="1x top #clear #solid"` // top edge with custom mask colors
126
+ * - `fade="top #red #blue, bottom #green #yellow"` // different colors per direction
127
+ * - `fade="2x top #a #b, 1x bottom #c #d"` // different widths and colors per direction
128
+ */
129
+ fade?: 'top' | 'right' | 'bottom' | 'left' | string;
130
+ /**
131
+ * @deprecated Use `scrollbar` style instead.
132
+ * Whether the element has styled scrollbar.
133
+ */
134
+ styledScrollbar?: boolean;
135
+ /**
136
+ * The scrollbar style provides a powerful and flexible way to control the appearance and behavior of scrollbars across browsers. It supports custom sizing, color, visibility, and advanced modifiers for modern UI needs.
137
+ *
138
+ * Syntax: `[modifiers] [size] [color1] [color2] [color3]`
139
+ *
140
+ * Modifiers: `thin`, `none`, `auto`, `stable`, `both-edges`, `always`, `styled`
141
+ *
142
+ * Examples:
143
+ * - `scrollbar={true}` // thin scrollbar, default color
144
+ * - `scrollbar="thin 10px #purple.40 #dark.04"`
145
+ * - `scrollbar="styled 12px #purple.40 #dark.04 #white.10"`
146
+ * - `scrollbar="none"`
147
+ * - `scrollbar="always 8px #primary.50 #white.02"`
148
+ */
149
+ scrollbar?: string | boolean | number;
150
+ /**
151
+ * Set font weight for bold texts.
152
+ */
153
+ boldFontWeight?: number;
154
+ /**
155
+ * The gap style is a powerful, cross-layout shorthand for spacing between child elements. Works with flex, grid, and block layouts.
156
+ *
157
+ * For flex/grid: sets native `gap` property
158
+ * For block layouts: emulated using margin on children
159
+ *
160
+ * Examples:
161
+ * - `gap="2x"` // gap: 2x (or margin-bottom: 2x for block)
162
+ * - `gap="1x 2x"` // row gap: 1x, column gap: 2x
163
+ * - `gap={true}` // default gap (1x)
164
+ */
165
+ gap?: CSSProperties['gap'] | string | boolean;
166
+ /**
167
+ * Shorthand for element padding. Supports custom units, directional modifiers, and design-system-driven defaults.
168
+ *
169
+ * Examples:
170
+ * - `padding="2x 1x"` // top/bottom: 2x, left/right: 1x
171
+ * - `padding="2x top"` // only top padding: 2x
172
+ * - `padding="1x left right"` // left and right padding: 1x
173
+ * - `padding={true}` // default padding on all sides
174
+ */
175
+ padding?: CSSProperties['padding'] | string | boolean;
176
+ /**
177
+ * Shorthand for element margin. Supports custom units, directional modifiers, and design-system-driven defaults.
178
+ *
179
+ * Examples:
180
+ * - `margin="2x 1x"` // top/bottom: 2x, left/right: 1x
181
+ * - `margin="2x top"` // only top margin: 2x
182
+ * - `margin="1x left right"` // left and right margin: 1x
183
+ * - `margin={true}` // default margin on all sides
184
+ */
185
+ margin?: CSSProperties['margin'] | string | boolean;
186
+ /**
187
+ * Concise shorthand for setting element width, including min-width and max-width. Supports custom units and advanced sizing keywords.
188
+ *
189
+ * Syntax: `[value]` | `[min max]` | `[min value max]` | `[modifier value]`
190
+ *
191
+ * Modifiers: `min`, `max`
192
+ * Keywords: `stretch`, `max-content`, `min-content`, `fit-content`
193
+ *
194
+ * Examples:
195
+ * - `width="10x"` // width: 10x
196
+ * - `width="1x 10x"` // min-width: 1x; max-width: 10x
197
+ * - `width="min 2x"` // min-width: 2x
198
+ * - `width="stretch"` // width: stretch (fill-available)
199
+ * - `width={true}` // width: auto
200
+ */
201
+ width?: CSSProperties['width'] | string | boolean;
202
+ /**
203
+ * Concise shorthand for setting element height, including min-height and max-height. Supports custom units and advanced sizing keywords.
204
+ *
205
+ * Syntax: `[value]` | `[min max]` | `[min value max]` | `[modifier value]`
206
+ *
207
+ * Modifiers: `min`, `max`
208
+ * Keywords: `stretch`, `max-content`, `min-content`, `fit-content`
209
+ *
210
+ * Examples:
211
+ * - `height="100px"` // height: 100px
212
+ * - `height="1x 5x 10x"` // min-height: 1x; height: 5x; max-height: 10x
213
+ * - `height="min 2x"` // min-height: 2x
214
+ * - `height={true}` // height: auto
215
+ */
216
+ height?: CSSProperties['height'] | string | boolean;
217
+ /**
218
+ * Shorthand for border width, style, and color. Supports directional modifiers and design-system defaults.
219
+ *
220
+ * Syntax: `[width] [style] [color] [directions]` | `[directions]` | `true`
221
+ *
222
+ * Multiple groups can be separated by commas. Later groups override earlier groups for conflicting directions.
223
+ *
224
+ * Examples:
225
+ * - `border={true}` // default border on all sides (1bw solid)
226
+ * - `border="2bw dashed #purple"` // 2bw dashed purple border
227
+ * - `border="2bw top"` // only top border: 2bw solid
228
+ * - `border="dotted #danger left right"` // left/right: 1bw dotted danger
229
+ * - `border="1bw #red, 2bw #blue top"` // all sides red 1bw, top overridden to blue 2bw
230
+ * - `border="1bw, dashed top bottom, #purple left right"` // base 1bw, dashed on top/bottom, purple on left/right
231
+ */
232
+ border?: CSSProperties['border'] | string | boolean;
233
+ /**
234
+ * Powerful shorthand for CSS transitions using semantic names and design tokens. Supports grouped transitions for common UI effects.
235
+ *
236
+ * Semantic names: `fade`, `fill`, `border`, `radius`, `shadow`, `preset`, `gap`, `theme`
237
+ * Multiple transitions: separated by commas
238
+ *
239
+ * Examples:
240
+ * - `transition="fill 0.2s, radius 0.3s"` // transitions background-color and border-radius
241
+ * - `transition="fade 0.15s ease-in"` // transitions mask with easing
242
+ * - `transition="theme 0.3s"` // transitions all theme-related properties
243
+ * - `transition="preset 0.2s"` // transitions typography properties
244
+ */
245
+ transition?: CSSProperties['transition'] | string;
246
+ /**
247
+ * Whether the element is hidden using `display: none`. Boolean shortcut for conditional element visibility.
248
+ *
249
+ * Examples:
250
+ * - `hide={true}` // display: none
251
+ * - `hide={false}` // element remains visible
252
+ */
253
+ hide?: boolean;
254
+ /**
255
+ * The shadow style adds shadow effects around an element's frame. Supports multiple effects separated by commas with X/Y offsets, blur, spread radius, and color.
256
+ *
257
+ * Examples:
258
+ * - `shadow="1x .5x .5x #dark.50"` // custom shadow with Tasty units and colors
259
+ * - `shadow="0 1x 2x #dark.20"` // standard shadow syntax
260
+ * - `shadow={true}` // default shadow from design system
261
+ */
262
+ shadow?: string | boolean;
263
+ /**
264
+ * The radius style rounds the corners of an element's outer border edge. Supports custom units, advanced shapes, and directional modifiers.
265
+ *
266
+ * Syntax: `[value] [modifiers]` | `[shape]` | `true`
267
+ *
268
+ * Shapes: `round` (fully rounded), `ellipse` (50%), `leaf`, `backleaf` (asymmetric)
269
+ * Directional modifiers: `top`, `right`, `bottom`, `left`
270
+ *
271
+ * Examples:
272
+ * - `radius="2r"` // border-radius: calc(var(--radius) * 2)
273
+ * - `radius={true}` // default radius (1r)
274
+ * - `radius="round"` // fully rounded (9999rem)
275
+ * - `radius="leaf"` // asymmetric leaf shape
276
+ * - `radius="1r top"` // round only top corners
277
+ */
278
+ radius?: 'round' | 'ellipse' | 'leaf' | 'backleaf' | string | true;
279
+ /**
280
+ * The flow style is a unified shorthand for controlling layout direction and wrapping in both flex and grid containers. Replaces `flexDirection` and `gridAutoFlow`.
281
+ *
282
+ * For flex: sets `flex-flow` (direction + wrapping)
283
+ * For grid: sets `grid-auto-flow` (direction + density)
284
+ * For block: determines gap direction (row/column)
285
+ *
286
+ * Syntax: `[direction] [wrap|dense]`
287
+ *
288
+ * Examples:
289
+ * - `flow="row wrap"` // flex-flow: row wrap
290
+ * - `flow="column dense"` // grid-auto-flow: column dense
291
+ * - `flow="row"` // primary axis direction
292
+ */
293
+ flow?: CSSProperties['flexFlow'] | CSSProperties['gridAutoFlow'] | string;
294
+ /**
295
+ * The gridAreas style specifies named grid areas, establishing cells in the grid and assigning them names.
296
+ *
297
+ * Examples:
298
+ * - `gridAreas='"header header" "sidebar content" "footer footer"'`
299
+ */
300
+ gridAreas?: CSSProperties['gridTemplateAreas'];
301
+ /**
302
+ * The gridColumns style defines line names and track sizing functions of grid columns.
303
+ *
304
+ * Examples:
305
+ * - `gridColumns="1fr 2fr 1fr"` // three columns with flex ratios
306
+ * - `gridColumns={3}` // three equal columns (shorthand)
307
+ * - `gridColumns="repeat(auto-fit, minmax(200px, 1fr))"` // responsive columns
308
+ */
309
+ gridColumns?: CSSProperties['gridTemplateColumns'] | number;
310
+ /**
311
+ * The gridRows style defines line names and track sizing functions of grid rows.
312
+ *
313
+ * Examples:
314
+ * - `gridRows="auto 1fr auto"` // header, content, footer layout
315
+ * - `gridRows={4}` // four equal rows (shorthand)
316
+ * - `gridRows="repeat(3, 100px)"` // three 100px rows
317
+ */
318
+ gridRows?: CSSProperties['gridTemplateRows'] | number;
319
+ /**
320
+ * The gridTemplate style is a shorthand property for defining grid columns, rows, and areas simultaneously.
321
+ *
322
+ * Examples:
323
+ * - `gridTemplate='"header header" auto "content sidebar" 1fr / 2fr 1fr'`
324
+ */
325
+ gridTemplate?: CSSProperties['gridTemplate'];
326
+ /**
327
+ * The font style specifies a prioritized list of font family names with design-system-driven defaults and fallbacks.
328
+ *
329
+ * Examples:
330
+ * - `font="monospace"` // monospace font stack
331
+ * - `font="Helvetica, Arial, sans-serif"` // custom font list
332
+ * - `font={true}` // default design system font
333
+ */
334
+ font?: CSSProperties['fontFamily'] | boolean;
335
+ /**
336
+ * The outline style sets the outline for the element.
337
+ *
338
+ * Syntax: `[width] [style] [color] / [offset]` | `true`
339
+ *
340
+ * Examples:
341
+ * - `outline="2ow dashed #purple"` // 2ow dashed purple outline
342
+ * - `outline="2ow #danger / 1x"` // 2ow solid danger outline, 1x offset
343
+ * - `outline={true}` // default outline (1ow solid)
344
+ */
345
+ outline?: string | boolean;
346
+ /**
347
+ * The outline offset style sets the offset of the outline.
348
+ *
349
+ * Examples:
350
+ * - `outlineOffset="4px"` // 4px offset
351
+ * - `outlineOffset="1x"` // 1x (8px) offset
352
+ */
353
+ outlineOffset?: string | number;
354
+ /**
355
+ * The preset style sets base text settings according to named presets. Affects `font-size`, `line-height`, `letter-spacing`, `font-weight`, and `text-transform`.
356
+ *
357
+ * Preset names are project-specific. Augment `TastyPresetNames` to register them for autocomplete.
358
+ *
359
+ * Examples:
360
+ * - `preset="h1"` // heading 1 typography
361
+ * - `preset="h2 strong"` // bold heading 2
362
+ * - `preset="t3"` // text size 3
363
+ */
364
+ preset?: PresetName | (string & {});
365
+ /**
366
+ * Shorthand for `align-items` and `align-content`. Sets both properties for unified vertical alignment in flex/grid layouts.
367
+ *
368
+ * Examples:
369
+ * - `align="center"` // align-items: center; align-content: center
370
+ * - `align="flex-start"` // align both to start
371
+ * - `align="space-between"` // distribute space between items
372
+ */
373
+ align?: CSSProperties['alignItems'] | CSSProperties['alignContent'];
374
+ /**
375
+ * Shorthand for `justify-items` and `justify-content`. Sets both properties for unified horizontal alignment in flex/grid layouts.
376
+ *
377
+ * Examples:
378
+ * - `justify="center"` // justify-items: center; justify-content: center
379
+ * - `justify="space-between"` // distribute space between items
380
+ * - `justify="flex-end"` // align both to end
381
+ */
382
+ justify?: CSSProperties['justifyItems'] | CSSProperties['justifyContent'];
383
+ /**
384
+ * Shorthand for `place-items` and `place-content`. Sets both properties for unified alignment of both axes in grid/flex layouts.
385
+ *
386
+ * Examples:
387
+ * - `place="center"` // place-items: center; place-content: center
388
+ * - `place="start end"` // place-items: start; place-content: end
389
+ * - `place="stretch"` // place both to stretch
390
+ */
391
+ place?: CSSProperties['placeItems'] | CSSProperties['placeContent'] | string;
392
+ /**
393
+ * Sets `place-content` property for aligning and distributing content in grid/flex containers.
394
+ *
395
+ * Examples:
396
+ * - `placeContent="center"` // center content in both axes
397
+ * - `placeContent="space-between"` // distribute content with space between
398
+ */
399
+ placeContent?: CSSProperties['placeContent'];
400
+ /**
401
+ * Sets `place-items` property for aligning items in grid/flex containers.
402
+ *
403
+ * Examples:
404
+ * - `placeItems="center"` // center items in both axes
405
+ * - `placeItems="start end"` // start on block axis, end on inline axis
406
+ */
407
+ placeItems?: CSSProperties['placeItems'];
408
+ /**
409
+ * Shorthand for `top`, `right`, `bottom`, and `left` offsets. Supports custom units, directional modifiers, and positioning.
410
+ *
411
+ * Examples:
412
+ * - `inset="0"` // all sides: 0
413
+ * - `inset="2x top"` // only top offset: 2x
414
+ * - `inset="1x left right"` // left and right offsets: 1x
415
+ * - `inset={true}` // all sides: 0
416
+ */
417
+ inset?: 'top' | 'right' | 'bottom' | 'left' | string | CSSProperties['inset'];
418
+ /**
419
+ * Local keyframes definitions for this component.
420
+ * Keys are animation names, values are keyframes step definitions.
421
+ * Local keyframes override global keyframes with the same name.
422
+ *
423
+ * Examples:
424
+ * - `'@keyframes': { fadeIn: { from: { opacity: 0 }, to: { opacity: 1 } } }`
425
+ * - `'@keyframes': { pulse: { '0%, 100%': { transform: 'scale(1)' }, '50%': { transform: 'scale(1.05)' } } }`
426
+ */
427
+ '@keyframes'?: Record<string, KeyframesSteps>;
428
+ /**
429
+ * CSS @property definitions for custom properties using tasty token syntax.
430
+ * Properties are registered once and are permanent (never removed).
431
+ *
432
+ * Token formats:
433
+ * - `$name` for regular properties → `--name` (requires syntax to be specified)
434
+ * - `#name` for color properties → `--name-color` (auto-sets syntax: '<color>', defaults initialValue: 'transparent')
435
+ *
436
+ * Examples:
437
+ * - `'@properties': { '$rotation': { syntax: '<angle>', inherits: false, initialValue: '45deg' } }`
438
+ * - `'@properties': { '#theme': { initialValue: 'purple' } }` // syntax: '<color>' is auto-set
439
+ */
440
+ '@properties'?: Record<string, PropertyDefinition>;
441
+ /**
442
+ * Apply one or more predefined style recipes by name.
443
+ * Recipes are defined globally via `configure({ recipes: { ... } })`.
444
+ * Multiple recipes are space-separated. Use `|` to separate base recipes
445
+ * (applied before component styles) from post recipes (applied after, via mergeStyles).
446
+ *
447
+ * Examples:
448
+ * - `recipe: 'card'` // Apply the 'card' recipe
449
+ * - `recipe: 'card elevated'` // Apply 'card' then 'elevated', then component styles
450
+ * - `recipe: 'reset input | input-autofill'` // Base recipes, then post recipe
451
+ * - `recipe: ''` // Clear recipes from base styles when extending
452
+ */
453
+ recipe?: string;
454
+ }
455
+ type SuffixForSelector = '&' | '.' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
456
+ type Selector = `${SuffixForSelector}${string}`;
457
+ type NotSelector = Exclude<string, Selector | keyof StylesInterface>;
458
+ /** Special style keys that should not be wrapped in StyleValue/StyleValueStateMap */
459
+ type SpecialStyleKeys = '@keyframes' | '@properties' | 'recipe';
460
+ type StylesWithoutSelectors = { [key in keyof StylesInterface as key extends SpecialStyleKeys ? never : key]?: StyleValue<StylesInterface[key]> | StyleValueStateMap<StylesInterface[key]> };
461
+ /**
462
+ * Index signature for recipe-specific arbitrary keys.
463
+ * Supports local predefined states (`@name`), vendor-prefixed CSS properties (`-webkit-*`),
464
+ * CSS custom properties (`$name`), and color tokens (`#name`).
465
+ * Unlike StylesIndexSignature, does NOT allow sub-element selectors (recipes are flat).
466
+ */
467
+ type RecipeIndexSignature = Record<string, StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined>>;
468
+ /**
469
+ * Style type for recipe definitions.
470
+ * Like StylesWithoutSelectors but also allows `@keyframes`, `@properties`,
471
+ * local predefined states, and vendor-prefixed CSS properties.
472
+ * Excludes `recipe` to prevent recursive references.
473
+ */
474
+ type RecipeStyles = StylesWithoutSelectors & RecipeIndexSignature & {
475
+ '@keyframes'?: StylesInterface['@keyframes'];
476
+ '@properties'?: StylesInterface['@properties'];
477
+ };
478
+ /** Special properties that are not regular style values */
479
+ interface SpecialStyleProperties {
480
+ '@keyframes'?: StylesInterface['@keyframes'];
481
+ '@properties'?: StylesInterface['@properties'];
482
+ recipe?: StylesInterface['recipe'];
483
+ }
484
+ /** Index signature for arbitrary style keys (sub-elements, CSS variables, etc.) */
485
+ interface StylesIndexSignature {
486
+ [key: string]: StyleValue<string | number | boolean | undefined> | StyleValueStateMap<string | number | boolean | undefined> | Styles | false | StylesInterface['@keyframes'] | StylesInterface['@properties'];
487
+ /**
488
+ * Selector combinator: `undefined` (descendant, default), `'>'` (child), `'+'` (adjacent), `'~'` (sibling).
489
+ * Can chain with capitalized names: `'> Body > Row >'`. Spaces required around combinators.
490
+ */
491
+ $?: string;
492
+ }
493
+ type Styles = StylesWithoutSelectors & SpecialStyleProperties & StylesIndexSignature;
494
+ //#endregion
495
+ export { NoType, NotSelector, RecipeStyles, Selector, Styles, StylesInterface, StylesWithoutSelectors, SuffixForSelector, TastyNamedColors, TastyPresetNames };
496
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,17 @@
1
+ //#region src/styles/width.d.ts
2
+ interface WidthStyleProps {
3
+ width?: string | number | boolean;
4
+ minWidth?: string | number | boolean;
5
+ maxWidth?: string | number | boolean;
6
+ }
7
+ declare function widthStyle({
8
+ width,
9
+ minWidth,
10
+ maxWidth
11
+ }: WidthStyleProps): Record<string, string | string[]> | undefined;
12
+ declare namespace widthStyle {
13
+ var __lookupStyles: string[];
14
+ }
15
+ //#endregion
16
+ export { widthStyle };
17
+ //# sourceMappingURL=width.d.ts.map
@@ -0,0 +1,20 @@
1
+ import { dimensionStyle } from "./dimension.js";
2
+
3
+ //#region src/styles/width.ts
4
+ const dimension = dimensionStyle("width");
5
+ function widthStyle({ width, minWidth, maxWidth }) {
6
+ return dimension({
7
+ value: width,
8
+ min: minWidth,
9
+ max: maxWidth
10
+ });
11
+ }
12
+ widthStyle.__lookupStyles = [
13
+ "width",
14
+ "minWidth",
15
+ "maxWidth"
16
+ ];
17
+
18
+ //#endregion
19
+ export { widthStyle };
20
+ //# sourceMappingURL=width.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"width.js","names":[],"sources":["../../src/styles/width.ts"],"sourcesContent":["import { dimensionStyle } from './dimension';\n\nconst dimension = dimensionStyle('width');\n\ninterface WidthStyleProps {\n width?: string | number | boolean;\n minWidth?: string | number | boolean;\n maxWidth?: string | number | boolean;\n}\n\nexport function widthStyle({ width, minWidth, maxWidth }: WidthStyleProps) {\n return dimension({ value: width, min: minWidth, max: maxWidth });\n}\n\nwidthStyle.__lookupStyles = ['width', 'minWidth', 'maxWidth'];\n"],"mappings":";;;AAEA,MAAM,YAAY,eAAe,QAAQ;AAQzC,SAAgB,WAAW,EAAE,OAAO,UAAU,YAA6B;AACzE,QAAO,UAAU;EAAE,OAAO;EAAO,KAAK;EAAU,KAAK;EAAU,CAAC;;AAGlE,WAAW,iBAAiB;CAAC;CAAS;CAAY;CAAW"}
@@ -0,0 +1,20 @@
1
+ import { dimensionStyle } from "./dimension.mjs";
2
+
3
+ //#region src/styles/width.ts
4
+ const dimension = dimensionStyle("width");
5
+ function widthStyle({ width, minWidth, maxWidth }) {
6
+ return dimension({
7
+ value: width,
8
+ min: minWidth,
9
+ max: maxWidth
10
+ });
11
+ }
12
+ widthStyle.__lookupStyles = [
13
+ "width",
14
+ "minWidth",
15
+ "maxWidth"
16
+ ];
17
+
18
+ //#endregion
19
+ export { widthStyle };
20
+ //# sourceMappingURL=width.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"width.mjs","names":[],"sources":["../../src/styles/width.ts"],"sourcesContent":["import { dimensionStyle } from './dimension';\n\nconst dimension = dimensionStyle('width');\n\ninterface WidthStyleProps {\n width?: string | number | boolean;\n minWidth?: string | number | boolean;\n maxWidth?: string | number | boolean;\n}\n\nexport function widthStyle({ width, minWidth, maxWidth }: WidthStyleProps) {\n return dimension({ value: width, min: minWidth, max: maxWidth });\n}\n\nwidthStyle.__lookupStyles = ['width', 'minWidth', 'maxWidth'];\n"],"mappings":";;;AAEA,MAAM,YAAY,eAAe,QAAQ;AAQzC,SAAgB,WAAW,EAAE,OAAO,UAAU,YAA6B;AACzE,QAAO,UAAU;EAAE,OAAO;EAAO,KAAK;EAAU,KAAK;EAAU,CAAC;;AAGlE,WAAW,iBAAiB;CAAC;CAAS;CAAY;CAAW"}