@styleframe/theme 2.4.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/theme.d.ts +316 -14
- package/dist/theme.js +2803 -2443
- package/dist/theme.umd.cjs +4 -4
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @styleframe/theme
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#117](https://github.com/styleframe-dev/styleframe/pull/117) [`ffe6764`](https://github.com/styleframe-dev/styleframe/commit/ffe6764a2e6c84d5b3cfdf431bf11f17a3f3f118) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Introduce global Styleframe single-instance architecture. Extension files (`*.styleframe.ts`) now share the same instance created in `styleframe.config.ts` instead of creating independent instances. This is a breaking change that affects how styles are imported and composed across files.
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [#81](https://github.com/styleframe-dev/styleframe/pull/81) [`266f961`](https://github.com/styleframe-dev/styleframe/commit/266f96143e9ffb47e0e6326d0e5e7cc9d974ab83) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add Badge recipe with createUseRecipe factory
|
|
12
|
+
- Add `useBadgeRecipe` and `useBadgeRecipeBase` recipe composables with color, variant, and size variants
|
|
13
|
+
- Add `createUseRecipe` factory utility for building reusable, customizable recipe presets
|
|
14
|
+
- Add `3xs` and `2xs` font-size values
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`266f961`](https://github.com/styleframe-dev/styleframe/commit/266f96143e9ffb47e0e6326d0e5e7cc9d974ab83), [`ffe6764`](https://github.com/styleframe-dev/styleframe/commit/ffe6764a2e6c84d5b3cfdf431bf11f17a3f3f118)]:
|
|
19
|
+
- @styleframe/core@3.0.0
|
|
20
|
+
|
|
21
|
+
## 2.5.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [#105](https://github.com/styleframe-dev/styleframe/pull/105) [`b109ac1`](https://github.com/styleframe-dev/styleframe/commit/b109ac148d837ae0a060c34f0236338bf4deca36) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add multiplier support to spacing utilities (margin, padding, gap, space) with @-prefixed numeric values that generate calc() expressions based on a base spacing variable
|
|
26
|
+
|
|
3
27
|
## 2.4.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CamelCase } from 'scule';
|
|
2
2
|
import { ModifierFactory } from '@styleframe/core';
|
|
3
|
+
import { Recipe } from '@styleframe/core';
|
|
3
4
|
import { Reference } from '@styleframe/core';
|
|
4
5
|
import { Styleframe } from '@styleframe/core';
|
|
5
6
|
import { TokenValue } from '@styleframe/core';
|
|
7
|
+
import { UtilityAutogenerateFn } from '@styleframe/core';
|
|
6
8
|
import { UtilityCallbackFn } from '@styleframe/core';
|
|
7
9
|
import { UtilityCreatorFn } from '@styleframe/core';
|
|
8
10
|
import { Variable } from '@styleframe/core';
|
|
11
|
+
import { VariantDeclarationsBlock } from '@styleframe/core';
|
|
9
12
|
|
|
10
13
|
/**
|
|
11
14
|
* Default align-content utility values matching Tailwind CSS.
|
|
@@ -392,6 +395,99 @@ export declare const colorValues: {
|
|
|
392
395
|
*/
|
|
393
396
|
declare type ColorVariationsForKey<K> = K extends string ? ExportKeys<`color.${K}`, DefaultLightnessLevels, "-"> & ExportKeys<`color.${K}-shade`, DefaultShadeLevels, "-"> & ExportKeys<`color.${K}-tint`, DefaultTintLevels, "-"> : never;
|
|
394
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Creates an autogenerate function that handles @-prefixed numeric multiplier values.
|
|
400
|
+
*
|
|
401
|
+
* When a value like "@1.5" is detected (@ prefix + numeric), it generates:
|
|
402
|
+
* - key: the numeric value as string (e.g., "1.5")
|
|
403
|
+
* - value: calc(var(--baseVariable, fallback) * multiplier)
|
|
404
|
+
*
|
|
405
|
+
* Non-multiplier values fall back to the default transformUtilityKey behavior.
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* ```typescript
|
|
409
|
+
* const autogenerate = createMultiplierAutogenerate({
|
|
410
|
+
* s,
|
|
411
|
+
* baseVariable: "spacing",
|
|
412
|
+
* fallback: "1rem",
|
|
413
|
+
* });
|
|
414
|
+
*
|
|
415
|
+
* // Usage with utility:
|
|
416
|
+
* const createMargin = s.utility("margin", ({ value }) => ({ margin: value }), { autogenerate });
|
|
417
|
+
* createMargin(["@1.5", "@2", "@-1"]);
|
|
418
|
+
* // Generates:
|
|
419
|
+
* // ._margin:1.5 { margin: calc(var(--spacing, 1rem) * 1.5); }
|
|
420
|
+
* // ._margin:2 { margin: calc(var(--spacing, 1rem) * 2); }
|
|
421
|
+
* // ._margin:-1 { margin: calc(var(--spacing, 1rem) * -1); }
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
export declare function createMultiplierAutogenerate(options: CreateMultiplierAutogenerateOptions): UtilityAutogenerateFn;
|
|
425
|
+
|
|
426
|
+
export declare interface CreateMultiplierAutogenerateOptions {
|
|
427
|
+
/** The Styleframe instance (required for css template literal) */
|
|
428
|
+
s: Styleframe;
|
|
429
|
+
/** The base variable to multiply against (variable object or variable name string) */
|
|
430
|
+
baseVariable: Variable | string;
|
|
431
|
+
/** Fallback value if the base variable is not defined (e.g., "1rem") */
|
|
432
|
+
fallback?: string;
|
|
433
|
+
/** Optional key replacer function for non-multiplier values */
|
|
434
|
+
replacer?: (key: string) => string;
|
|
435
|
+
/** Optional namespace for token references (e.g., "spacing" makes "@sm" resolve to ref("spacing.sm")) */
|
|
436
|
+
namespace?: string | string[];
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export declare function createUseRecipe<Name extends string, Variants extends Record<string, Record<string, VariantDeclarationsBlock>>, Config extends RecipeConfig<Variants>>(name: Name, defaults: Config): (s: Styleframe, options?: DeepPartial<Config>) => Recipe<Name, Variants>;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Creates a composable function for spacing-based CSS utilities with multiplier support.
|
|
443
|
+
*
|
|
444
|
+
* This is similar to createUseUtility but adds automatic multiplier generation:
|
|
445
|
+
* - @-prefixed numeric values like "@1.5" become: calc(var(--spacing) * 1.5)
|
|
446
|
+
* - Named values and references work as normal
|
|
447
|
+
*
|
|
448
|
+
* @example
|
|
449
|
+
* ```typescript
|
|
450
|
+
* export const useMarginUtility = createUseSpacingUtility(
|
|
451
|
+
* 'margin',
|
|
452
|
+
* ({ value }) => ({ margin: value })
|
|
453
|
+
* );
|
|
454
|
+
*
|
|
455
|
+
* // Usage:
|
|
456
|
+
* const s = styleframe();
|
|
457
|
+
* const createMargin = useMarginUtility(s, { sm: ref(spacingSm) });
|
|
458
|
+
*
|
|
459
|
+
* // Add multiplier values (with @ prefix):
|
|
460
|
+
* createMargin(["@1.5", "@2", "@-1"]);
|
|
461
|
+
* // Generates:
|
|
462
|
+
* // ._margin:1.5 { margin: calc(var(--spacing) * 1.5); }
|
|
463
|
+
* // ._margin:2 { margin: calc(var(--spacing) * 2); }
|
|
464
|
+
* // ._margin:-1 { margin: calc(var(--spacing) * -1); }
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
467
|
+
export declare function createUseSpacingUtility<UtilityName extends string, Defaults extends Record<string, TokenValue> = Record<string, TokenValue>>(utilityName: UtilityName, factory: UtilityCallbackFn, options?: CreateUseSpacingUtilityOptions<Defaults>): <T extends Record<string, TokenValue> = Defaults>(s: Styleframe, values?: T, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
468
|
+
|
|
469
|
+
export declare interface CreateUseSpacingUtilityOptions<Defaults extends Record<string, TokenValue>> {
|
|
470
|
+
/** Default values for the utility */
|
|
471
|
+
defaults?: Defaults;
|
|
472
|
+
/** Whether to merge user values with defaults (true) or replace them (false) */
|
|
473
|
+
mergeDefaults?: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* The base spacing variable name or Variable object.
|
|
476
|
+
* Defaults to "spacing" which references var(--spacing).
|
|
477
|
+
*/
|
|
478
|
+
baseVariable?: string | Variable;
|
|
479
|
+
/**
|
|
480
|
+
* Fallback value if the base variable is not defined.
|
|
481
|
+
* Only used when baseVariable is a string. Defaults to "1rem".
|
|
482
|
+
*/
|
|
483
|
+
fallback?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Optional namespace for token references in autogenerate.
|
|
486
|
+
* When set, "@sm" in array syntax resolves to ref("namespace.sm").
|
|
487
|
+
*/
|
|
488
|
+
namespace?: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
395
491
|
/**
|
|
396
492
|
* Creates a generic composable function for a CSS utility.
|
|
397
493
|
*
|
|
@@ -427,6 +523,11 @@ export declare interface CreateUseUtilityOptions<Defaults extends Record<string,
|
|
|
427
523
|
defaults?: Defaults;
|
|
428
524
|
/** Whether to merge user values with defaults (true) or replace them (false) */
|
|
429
525
|
mergeDefaults?: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* Optional namespace for token references in autogenerate.
|
|
528
|
+
* When set, "@sm" in array syntax resolves to ref("namespace.sm").
|
|
529
|
+
*/
|
|
530
|
+
namespace?: string | string[];
|
|
430
531
|
}
|
|
431
532
|
|
|
432
533
|
/**
|
|
@@ -517,6 +618,10 @@ export declare const cursorValues: {
|
|
|
517
618
|
"zoom-out": string;
|
|
518
619
|
};
|
|
519
620
|
|
|
621
|
+
export declare type DeepPartial<T> = {
|
|
622
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
623
|
+
};
|
|
624
|
+
|
|
520
625
|
declare type DefaultBorderRadius = typeof borderRadiusValues;
|
|
521
626
|
|
|
522
627
|
declare type DefaultBorderStyle = typeof borderStyleValues;
|
|
@@ -776,6 +881,8 @@ export declare const fontFamilyValues: {
|
|
|
776
881
|
|
|
777
882
|
export declare const fontSizeValues: {
|
|
778
883
|
default: string;
|
|
884
|
+
"3xs": string;
|
|
885
|
+
"2xs": string;
|
|
779
886
|
xs: string;
|
|
780
887
|
sm: string;
|
|
781
888
|
md: string;
|
|
@@ -876,6 +983,19 @@ export declare const hyphensValues: {
|
|
|
876
983
|
|
|
877
984
|
export declare function isKeyReferenceValue(value: unknown): value is `@${string}`;
|
|
878
985
|
|
|
986
|
+
/**
|
|
987
|
+
* Check if a value is a numeric string or number (including negative numbers and decimals).
|
|
988
|
+
*
|
|
989
|
+
* @example
|
|
990
|
+
* isNumericValue(1) // true
|
|
991
|
+
* isNumericValue("1.5") // true
|
|
992
|
+
* isNumericValue("-0.5") // true
|
|
993
|
+
* isNumericValue(".5") // true
|
|
994
|
+
* isNumericValue("sm") // false
|
|
995
|
+
* isNumericValue("1rem") // false
|
|
996
|
+
*/
|
|
997
|
+
export declare function isNumericValue(value: unknown): value is string | number;
|
|
998
|
+
|
|
879
999
|
/**
|
|
880
1000
|
* Default isolation utility values matching Tailwind CSS.
|
|
881
1001
|
*/
|
|
@@ -1133,6 +1253,20 @@ export declare const positionValues: {
|
|
|
1133
1253
|
sticky: string;
|
|
1134
1254
|
};
|
|
1135
1255
|
|
|
1256
|
+
export declare type RecipeConfig<Variants extends Record<string, Record<string, VariantDeclarationsBlock>> = Record<string, Record<string, VariantDeclarationsBlock>>> = {
|
|
1257
|
+
base?: VariantDeclarationsBlock;
|
|
1258
|
+
variants?: Variants;
|
|
1259
|
+
defaultVariants?: {
|
|
1260
|
+
[K in keyof Variants]?: keyof Variants[K] & string;
|
|
1261
|
+
};
|
|
1262
|
+
compoundVariants?: Array<{
|
|
1263
|
+
match: {
|
|
1264
|
+
[K in keyof Variants]?: keyof Variants[K] & string;
|
|
1265
|
+
};
|
|
1266
|
+
css: VariantDeclarationsBlock;
|
|
1267
|
+
}>;
|
|
1268
|
+
};
|
|
1269
|
+
|
|
1136
1270
|
/**
|
|
1137
1271
|
* Default resize utility values matching Tailwind CSS.
|
|
1138
1272
|
*/
|
|
@@ -1626,6 +1760,151 @@ export declare const useBackgroundSizeUtility: <T extends Record<string, TokenVa
|
|
|
1626
1760
|
*/
|
|
1627
1761
|
export declare const useBackgroundUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
1628
1762
|
|
|
1763
|
+
/**
|
|
1764
|
+
* Full badge recipe with color, variant, and size variants.
|
|
1765
|
+
* Includes all Nuxt UI-inspired styling options.
|
|
1766
|
+
*/
|
|
1767
|
+
export declare const useBadgeRecipe: (s: Styleframe, options?: DeepPartial< {
|
|
1768
|
+
base: {
|
|
1769
|
+
display: string;
|
|
1770
|
+
alignItems: string;
|
|
1771
|
+
fontWeight: string;
|
|
1772
|
+
borderWidth: string;
|
|
1773
|
+
borderStyle: string;
|
|
1774
|
+
borderColor: string;
|
|
1775
|
+
};
|
|
1776
|
+
variants: {
|
|
1777
|
+
color: {
|
|
1778
|
+
primary: {};
|
|
1779
|
+
secondary: {};
|
|
1780
|
+
success: {};
|
|
1781
|
+
info: {};
|
|
1782
|
+
warning: {};
|
|
1783
|
+
danger: {};
|
|
1784
|
+
};
|
|
1785
|
+
variant: {
|
|
1786
|
+
solid: {};
|
|
1787
|
+
outline: {};
|
|
1788
|
+
soft: {};
|
|
1789
|
+
subtle: {};
|
|
1790
|
+
};
|
|
1791
|
+
size: {
|
|
1792
|
+
xs: {
|
|
1793
|
+
fontSize: string;
|
|
1794
|
+
lineHeight: string;
|
|
1795
|
+
paddingTop: string;
|
|
1796
|
+
paddingBottom: string;
|
|
1797
|
+
paddingLeft: string;
|
|
1798
|
+
paddingRight: string;
|
|
1799
|
+
gap: string;
|
|
1800
|
+
borderRadius: string;
|
|
1801
|
+
};
|
|
1802
|
+
sm: {
|
|
1803
|
+
fontSize: string;
|
|
1804
|
+
lineHeight: string;
|
|
1805
|
+
paddingTop: string;
|
|
1806
|
+
paddingBottom: string;
|
|
1807
|
+
paddingLeft: string;
|
|
1808
|
+
paddingRight: string;
|
|
1809
|
+
gap: string;
|
|
1810
|
+
borderRadius: string;
|
|
1811
|
+
};
|
|
1812
|
+
md: {
|
|
1813
|
+
fontSize: string;
|
|
1814
|
+
paddingTop: string;
|
|
1815
|
+
paddingBottom: string;
|
|
1816
|
+
paddingLeft: string;
|
|
1817
|
+
paddingRight: string;
|
|
1818
|
+
gap: string;
|
|
1819
|
+
borderRadius: string;
|
|
1820
|
+
};
|
|
1821
|
+
lg: {
|
|
1822
|
+
fontSize: string;
|
|
1823
|
+
paddingTop: string;
|
|
1824
|
+
paddingBottom: string;
|
|
1825
|
+
paddingLeft: string;
|
|
1826
|
+
paddingRight: string;
|
|
1827
|
+
gap: string;
|
|
1828
|
+
borderRadius: string;
|
|
1829
|
+
};
|
|
1830
|
+
xl: {
|
|
1831
|
+
fontSize: string;
|
|
1832
|
+
paddingTop: string;
|
|
1833
|
+
paddingBottom: string;
|
|
1834
|
+
paddingLeft: string;
|
|
1835
|
+
paddingRight: string;
|
|
1836
|
+
gap: string;
|
|
1837
|
+
borderRadius: string;
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1840
|
+
};
|
|
1841
|
+
compoundVariants: ({
|
|
1842
|
+
match: {
|
|
1843
|
+
color: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
1844
|
+
variant: "solid";
|
|
1845
|
+
};
|
|
1846
|
+
css: {
|
|
1847
|
+
background: string;
|
|
1848
|
+
color: string;
|
|
1849
|
+
borderColor?: undefined;
|
|
1850
|
+
};
|
|
1851
|
+
} | {
|
|
1852
|
+
match: {
|
|
1853
|
+
color: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
1854
|
+
variant: "outline";
|
|
1855
|
+
};
|
|
1856
|
+
css: {
|
|
1857
|
+
color: string;
|
|
1858
|
+
borderColor: string;
|
|
1859
|
+
background?: undefined;
|
|
1860
|
+
};
|
|
1861
|
+
} | {
|
|
1862
|
+
match: {
|
|
1863
|
+
color: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
1864
|
+
variant: "soft";
|
|
1865
|
+
};
|
|
1866
|
+
css: {
|
|
1867
|
+
background: string;
|
|
1868
|
+
color: string;
|
|
1869
|
+
borderColor?: undefined;
|
|
1870
|
+
};
|
|
1871
|
+
} | {
|
|
1872
|
+
match: {
|
|
1873
|
+
color: "primary" | "secondary" | "success" | "warning" | "danger" | "info";
|
|
1874
|
+
variant: "subtle";
|
|
1875
|
+
};
|
|
1876
|
+
css: {
|
|
1877
|
+
background: string;
|
|
1878
|
+
color: string;
|
|
1879
|
+
borderColor: string;
|
|
1880
|
+
};
|
|
1881
|
+
})[];
|
|
1882
|
+
defaultVariants: {
|
|
1883
|
+
color: "primary";
|
|
1884
|
+
variant: "solid";
|
|
1885
|
+
size: "sm";
|
|
1886
|
+
};
|
|
1887
|
+
}> | undefined) => Recipe<"badge", Record<string, Record<string, VariantDeclarationsBlock>>>;
|
|
1888
|
+
|
|
1889
|
+
/**
|
|
1890
|
+
* Base badge styling - core appearance without variants.
|
|
1891
|
+
* Use this when you want to define your own custom variants.
|
|
1892
|
+
*/
|
|
1893
|
+
export declare const useBadgeRecipeBase: (s: Styleframe, options?: DeepPartial< {
|
|
1894
|
+
base: {
|
|
1895
|
+
display: string;
|
|
1896
|
+
alignItems: string;
|
|
1897
|
+
fontWeight: string;
|
|
1898
|
+
fontSize: string;
|
|
1899
|
+
lineHeight: string;
|
|
1900
|
+
paddingTop: string;
|
|
1901
|
+
paddingBottom: string;
|
|
1902
|
+
paddingLeft: string;
|
|
1903
|
+
paddingRight: string;
|
|
1904
|
+
borderRadius: string;
|
|
1905
|
+
};
|
|
1906
|
+
}> | undefined) => Recipe<"badge", Record<string, Record<string, VariantDeclarationsBlock>>>;
|
|
1907
|
+
|
|
1629
1908
|
/**
|
|
1630
1909
|
* Create blur utility classes.
|
|
1631
1910
|
*
|
|
@@ -2766,6 +3045,8 @@ export declare const useFontFamilyUtility: <T extends Record<string, TokenValue>
|
|
|
2766
3045
|
*/
|
|
2767
3046
|
export declare const useFontSize: <T extends Record<string, TokenValue> = {
|
|
2768
3047
|
default: string;
|
|
3048
|
+
"3xs": string;
|
|
3049
|
+
"2xs": string;
|
|
2769
3050
|
xs: string;
|
|
2770
3051
|
sm: string;
|
|
2771
3052
|
md: string;
|
|
@@ -2954,23 +3235,29 @@ export declare const useForcedColorAdjustUtility: <T extends Record<string, Toke
|
|
|
2954
3235
|
}>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
2955
3236
|
|
|
2956
3237
|
/**
|
|
2957
|
-
* Create gap utility classes.
|
|
3238
|
+
* Create gap utility classes with multiplier support.
|
|
2958
3239
|
*
|
|
2959
3240
|
* @example
|
|
2960
3241
|
* ```typescript
|
|
2961
3242
|
* const s = styleframe();
|
|
2962
|
-
* useGapUtility(s, { '0': '0', '1': '0.25rem', '2': '0.5rem' });
|
|
3243
|
+
* const createGap = useGapUtility(s, { '0': '0', '1': '0.25rem', '2': '0.5rem' });
|
|
3244
|
+
*
|
|
3245
|
+
* // Add multiplier values (with @ prefix):
|
|
3246
|
+
* createGap(["@1.5", "@2"]);
|
|
3247
|
+
* // Generates:
|
|
3248
|
+
* // ._gap:1.5 { gap: calc(var(--spacing) * 1.5); }
|
|
3249
|
+
* // ._gap:2 { gap: calc(var(--spacing) * 2); }
|
|
2963
3250
|
* ```
|
|
2964
3251
|
*/
|
|
2965
3252
|
export declare const useGapUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
2966
3253
|
|
|
2967
3254
|
/**
|
|
2968
|
-
* Create column-gap utility classes.
|
|
3255
|
+
* Create column-gap utility classes with multiplier support.
|
|
2969
3256
|
*/
|
|
2970
3257
|
export declare const useGapXUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
2971
3258
|
|
|
2972
3259
|
/**
|
|
2973
|
-
* Create row-gap utility classes.
|
|
3260
|
+
* Create row-gap utility classes with multiplier support.
|
|
2974
3261
|
*/
|
|
2975
3262
|
export declare const useGapYUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
2976
3263
|
|
|
@@ -3368,13 +3655,19 @@ export declare const useMarginRightUtility: <T extends Record<string, TokenValue
|
|
|
3368
3655
|
export declare const useMarginTopUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
3369
3656
|
|
|
3370
3657
|
/**
|
|
3371
|
-
* Create margin utility classes.
|
|
3658
|
+
* Create margin utility classes with multiplier support.
|
|
3372
3659
|
*
|
|
3373
3660
|
* @example
|
|
3374
3661
|
* ```typescript
|
|
3375
3662
|
* const s = styleframe();
|
|
3376
|
-
* useMarginUtility(s, { sm: '0.5rem', md: '1rem', lg: '1.5rem', auto: 'auto' });
|
|
3377
|
-
*
|
|
3663
|
+
* const createMargin = useMarginUtility(s, { sm: '0.5rem', md: '1rem', lg: '1.5rem', auto: 'auto' });
|
|
3664
|
+
*
|
|
3665
|
+
* // Add multiplier values (with @ prefix):
|
|
3666
|
+
* createMargin(["@1.5", "@2", "@-1"]);
|
|
3667
|
+
* // Generates:
|
|
3668
|
+
* // ._margin:1.5 { margin: calc(var(--spacing) * 1.5); }
|
|
3669
|
+
* // ._margin:2 { margin: calc(var(--spacing) * 2); }
|
|
3670
|
+
* // ._margin:-1 { margin: calc(var(--spacing) * -1); }
|
|
3378
3671
|
* ```
|
|
3379
3672
|
*/
|
|
3380
3673
|
export declare const useMarginUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
@@ -3690,13 +3983,18 @@ export declare const usePaddingRightUtility: <T extends Record<string, TokenValu
|
|
|
3690
3983
|
export declare const usePaddingTopUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
3691
3984
|
|
|
3692
3985
|
/**
|
|
3693
|
-
* Create padding utility classes.
|
|
3986
|
+
* Create padding utility classes with multiplier support.
|
|
3694
3987
|
*
|
|
3695
3988
|
* @example
|
|
3696
3989
|
* ```typescript
|
|
3697
3990
|
* const s = styleframe();
|
|
3698
|
-
* usePaddingUtility(s, { sm: '0.5rem', md: '1rem', lg: '1.5rem' });
|
|
3699
|
-
*
|
|
3991
|
+
* const createPadding = usePaddingUtility(s, { sm: '0.5rem', md: '1rem', lg: '1.5rem' });
|
|
3992
|
+
*
|
|
3993
|
+
* // Add multiplier values (with @ prefix):
|
|
3994
|
+
* createPadding(["@1.5", "@2"]);
|
|
3995
|
+
* // Generates:
|
|
3996
|
+
* // ._padding:1.5 { padding: calc(var(--spacing) * 1.5); }
|
|
3997
|
+
* // ._padding:2 { padding: calc(var(--spacing) * 2); }
|
|
3700
3998
|
* ```
|
|
3701
3999
|
*/
|
|
3702
4000
|
export declare const usePaddingUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
@@ -4109,14 +4407,18 @@ export declare const useSkewYUtility: <T extends Record<string, TokenValue> = Re
|
|
|
4109
4407
|
export declare const useSpaceXReverseUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
4110
4408
|
|
|
4111
4409
|
/**
|
|
4112
|
-
* Create space-x utility classes (horizontal space between children).
|
|
4410
|
+
* Create space-x utility classes with multiplier support (horizontal space between children).
|
|
4113
4411
|
* Uses the "lobotomized owl" selector to add margin-left to all but the first child.
|
|
4114
4412
|
*
|
|
4115
4413
|
* @example
|
|
4116
4414
|
* ```typescript
|
|
4117
4415
|
* const s = styleframe();
|
|
4118
|
-
* useSpaceXUtility(s, { sm: '0.5rem', md: '1rem' });
|
|
4119
|
-
*
|
|
4416
|
+
* const createSpaceX = useSpaceXUtility(s, { sm: '0.5rem', md: '1rem' });
|
|
4417
|
+
*
|
|
4418
|
+
* // Add multiplier values (with @ prefix):
|
|
4419
|
+
* createSpaceX(["@1.5", "@2"]);
|
|
4420
|
+
* // Generates:
|
|
4421
|
+
* // ._space-x:1.5 > * + * { margin-left: calc(var(--spacing) * 1.5); }
|
|
4120
4422
|
* ```
|
|
4121
4423
|
*/
|
|
4122
4424
|
export declare const useSpaceXUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
@@ -4128,7 +4430,7 @@ export declare const useSpaceXUtility: <T extends Record<string, TokenValue> = R
|
|
|
4128
4430
|
export declare const useSpaceYReverseUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|
|
4129
4431
|
|
|
4130
4432
|
/**
|
|
4131
|
-
* Create space-y utility classes (vertical space between children).
|
|
4433
|
+
* Create space-y utility classes with multiplier support (vertical space between children).
|
|
4132
4434
|
* Uses the "lobotomized owl" selector to add margin-top to all but the first child.
|
|
4133
4435
|
*/
|
|
4134
4436
|
export declare const useSpaceYUtility: <T extends Record<string, TokenValue> = Record<string, TokenValue>>(s: Styleframe, values?: T | undefined, modifiers?: ModifierFactory[]) => UtilityCreatorFn;
|