@baseline-ui/css 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { Sprinkles } from '@baseline-ui/tokens';
2
2
  import { StyleRule } from '@vanilla-extract/css';
3
3
 
4
- declare type _StyleRule = StyleRule | ReturnType<typeof recipeSprinkles>;
5
- declare type ClassNames = string | ClassNames[];
6
- declare type _ComplexStyleRule = _StyleRule | (_StyleRule | ClassNames)[];
7
- declare type _RecipeStyleRule = _ComplexStyleRule | string;
8
- declare type VariantDefinitions = Record<string, _RecipeStyleRule>;
9
- declare type VariantGroups = Record<string, VariantDefinitions>;
10
- declare type BooleanMap<T> = T extends "true" | "false" ? boolean : T;
11
- declare type VariantSelection<Variants extends VariantGroups> = {
4
+ type _StyleRule = StyleRule | ReturnType<typeof recipeSprinkles>;
5
+ type ClassNames = string | ClassNames[];
6
+ type _ComplexStyleRule = _StyleRule | (_StyleRule | ClassNames)[];
7
+ type _RecipeStyleRule = _ComplexStyleRule | string;
8
+ type VariantDefinitions = Record<string, _RecipeStyleRule>;
9
+ type VariantGroups = Record<string, VariantDefinitions>;
10
+ type BooleanMap<T> = T extends "true" | "false" ? boolean : T;
11
+ type VariantSelection<Variants extends VariantGroups> = {
12
12
  [VariantGroup in keyof Variants]?: BooleanMap<keyof Variants[VariantGroup]>;
13
13
  };
14
14
  interface CompoundVariant<Variants extends VariantGroups> {
@@ -21,7 +21,7 @@ interface PatternOptions<Variants extends VariantGroups> {
21
21
  defaultVariants?: VariantSelection<Variants>;
22
22
  compoundVariants?: CompoundVariant<Variants>[];
23
23
  }
24
- declare type VariantsClassNames<Variants extends VariantGroups> = {
24
+ type VariantsClassNames<Variants extends VariantGroups> = {
25
25
  [P in keyof Variants]: {
26
26
  [PP in keyof Variants[P]]: string;
27
27
  };
@@ -30,11 +30,11 @@ interface RecipeClassNames<Variants extends VariantGroups> {
30
30
  base: string;
31
31
  variants: VariantsClassNames<Variants>;
32
32
  }
33
- declare type RuntimeFn<Variants extends VariantGroups> = ((options?: VariantSelection<Variants>) => string) & {
33
+ type RuntimeFn<Variants extends VariantGroups> = ((options?: VariantSelection<Variants>) => string) & {
34
34
  variants: () => (keyof Variants)[];
35
35
  classNames: RecipeClassNames<Variants>;
36
36
  };
37
- declare type CleanedVariants<Variants extends VariantGroups> = {
37
+ type CleanedVariants<Variants extends VariantGroups> = {
38
38
  [P in keyof Variants]: {
39
39
  [PP in keyof Variants[P]]: PP extends keyof ReturnType<typeof recipeSprinkles> ? never : Variants[P][PP];
40
40
  };
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { Sprinkles } from '@baseline-ui/tokens';
2
2
  import { StyleRule } from '@vanilla-extract/css';
3
3
 
4
- declare type _StyleRule = StyleRule | ReturnType<typeof recipeSprinkles>;
5
- declare type ClassNames = string | ClassNames[];
6
- declare type _ComplexStyleRule = _StyleRule | (_StyleRule | ClassNames)[];
7
- declare type _RecipeStyleRule = _ComplexStyleRule | string;
8
- declare type VariantDefinitions = Record<string, _RecipeStyleRule>;
9
- declare type VariantGroups = Record<string, VariantDefinitions>;
10
- declare type BooleanMap<T> = T extends "true" | "false" ? boolean : T;
11
- declare type VariantSelection<Variants extends VariantGroups> = {
4
+ type _StyleRule = StyleRule | ReturnType<typeof recipeSprinkles>;
5
+ type ClassNames = string | ClassNames[];
6
+ type _ComplexStyleRule = _StyleRule | (_StyleRule | ClassNames)[];
7
+ type _RecipeStyleRule = _ComplexStyleRule | string;
8
+ type VariantDefinitions = Record<string, _RecipeStyleRule>;
9
+ type VariantGroups = Record<string, VariantDefinitions>;
10
+ type BooleanMap<T> = T extends "true" | "false" ? boolean : T;
11
+ type VariantSelection<Variants extends VariantGroups> = {
12
12
  [VariantGroup in keyof Variants]?: BooleanMap<keyof Variants[VariantGroup]>;
13
13
  };
14
14
  interface CompoundVariant<Variants extends VariantGroups> {
@@ -21,7 +21,7 @@ interface PatternOptions<Variants extends VariantGroups> {
21
21
  defaultVariants?: VariantSelection<Variants>;
22
22
  compoundVariants?: CompoundVariant<Variants>[];
23
23
  }
24
- declare type VariantsClassNames<Variants extends VariantGroups> = {
24
+ type VariantsClassNames<Variants extends VariantGroups> = {
25
25
  [P in keyof Variants]: {
26
26
  [PP in keyof Variants[P]]: string;
27
27
  };
@@ -30,11 +30,11 @@ interface RecipeClassNames<Variants extends VariantGroups> {
30
30
  base: string;
31
31
  variants: VariantsClassNames<Variants>;
32
32
  }
33
- declare type RuntimeFn<Variants extends VariantGroups> = ((options?: VariantSelection<Variants>) => string) & {
33
+ type RuntimeFn<Variants extends VariantGroups> = ((options?: VariantSelection<Variants>) => string) & {
34
34
  variants: () => (keyof Variants)[];
35
35
  classNames: RecipeClassNames<Variants>;
36
36
  };
37
- declare type CleanedVariants<Variants extends VariantGroups> = {
37
+ type CleanedVariants<Variants extends VariantGroups> = {
38
38
  [P in keyof Variants]: {
39
39
  [PP in keyof Variants[P]]: PP extends keyof ReturnType<typeof recipeSprinkles> ? never : Variants[P][PP];
40
40
  };
package/dist/index.js CHANGED
@@ -1,9 +1,4 @@
1
- 'use strict';
2
-
3
- var tokens = require('@baseline-ui/tokens');
4
- var recipes = require('@vanilla-extract/recipes');
5
-
6
- /**
1
+ 'use strict';var tokens=require('@baseline-ui/tokens'),recipes=require('@vanilla-extract/recipes');/**
7
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
8
3
  *
9
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -12,7 +7,4 @@ var recipes = require('@vanilla-extract/recipes');
12
7
  * This notice may not be removed from this file.
13
8
  *
14
9
  */
15
- var{base:f,variants:V,compoundVariants:S}=tokens.sprinkles,o="__@@Component_Sprinkles__";function k(e){return {[o]:!0,baseSprinkles:f(e),variantSprinkles:V(e),compoundVariantSprinkles:S(e)}}function d(e){switch(e){case"base":return tokens.Layers.BASE;case"variant":return tokens.Layers.VARIANTS;case"compoundVariant":return tokens.Layers.COMPOUND_VARIANTS}}function n(e,a){return e&&(Array.isArray(e)?e.map(r=>typeof r=="object"?n(r,a):r):typeof e=="object"?o in e?e[`${a}Sprinkles`]:e["@layer"]?e:{"@layer":{[d(a)]:e}}:e)}function l(e){return e&&Object.fromEntries(Object.entries(e).map(([a,r])=>[a,Object.fromEntries(Object.entries(r).map(([t,i])=>[t,n(i,"variant")]))]))}function N(e,a){let{base:r,variants:t,compoundVariants:i,defaultVariants:c}=e;return recipes.recipe({base:n(r,"base"),compoundVariants:i?.map(p=>({...p,style:n(p.style,"compoundVariant")})),variants:l(t),defaultVariants:c},a)}
16
-
17
- exports.layeredRecipe = N;
18
- exports.recipeSprinkles = k;
10
+ var{base:f,variants:V,compoundVariants:S}=tokens.sprinkles,o="__@@Component_Sprinkles__";function k(e){return {[o]:!0,baseSprinkles:f(e),variantSprinkles:V(e),compoundVariantSprinkles:S(e)}}function d(e){switch(e){case"base":return tokens.Layers.BASE;case"variant":return tokens.Layers.VARIANTS;case"compoundVariant":return tokens.Layers.COMPOUND_VARIANTS}}function n(e,a){return e&&(Array.isArray(e)?e.map(r=>typeof r=="object"?n(r,a):r):typeof e=="object"?o in e?e[`${a}Sprinkles`]:e["@layer"]?e:{"@layer":{[d(a)]:e}}:e)}function l(e){return e&&Object.fromEntries(Object.entries(e).map(([a,r])=>[a,Object.fromEntries(Object.entries(r).map(([t,i])=>[t,n(i,"variant")]))]))}function N(e,a){let{base:r,variants:t,compoundVariants:i,defaultVariants:c}=e;return recipes.recipe({base:n(r,"base"),compoundVariants:i?.map(p=>({...p,style:n(p.style,"compoundVariant")})),variants:l(t),defaultVariants:c},a)}exports.layeredRecipe=N;exports.recipeSprinkles=k;
package/dist/index.mjs CHANGED
@@ -1,7 +1,4 @@
1
- import { sprinkles, Layers } from '@baseline-ui/tokens';
2
- import { recipe } from '@vanilla-extract/recipes';
3
-
4
- /**
1
+ import {sprinkles,Layers}from'@baseline-ui/tokens';import {recipe}from'@vanilla-extract/recipes';/**
5
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
6
3
  *
7
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -10,6 +7,4 @@ import { recipe } from '@vanilla-extract/recipes';
10
7
  * This notice may not be removed from this file.
11
8
  *
12
9
  */
13
- var{base:f,variants:V,compoundVariants:S}=sprinkles,o="__@@Component_Sprinkles__";function k(e){return {[o]:!0,baseSprinkles:f(e),variantSprinkles:V(e),compoundVariantSprinkles:S(e)}}function d(e){switch(e){case"base":return Layers.BASE;case"variant":return Layers.VARIANTS;case"compoundVariant":return Layers.COMPOUND_VARIANTS}}function n(e,a){return e&&(Array.isArray(e)?e.map(r=>typeof r=="object"?n(r,a):r):typeof e=="object"?o in e?e[`${a}Sprinkles`]:e["@layer"]?e:{"@layer":{[d(a)]:e}}:e)}function l(e){return e&&Object.fromEntries(Object.entries(e).map(([a,r])=>[a,Object.fromEntries(Object.entries(r).map(([t,i])=>[t,n(i,"variant")]))]))}function N(e,a){let{base:r,variants:t,compoundVariants:i,defaultVariants:c}=e;return recipe({base:n(r,"base"),compoundVariants:i?.map(p=>({...p,style:n(p.style,"compoundVariant")})),variants:l(t),defaultVariants:c},a)}
14
-
15
- export { N as layeredRecipe, k as recipeSprinkles };
10
+ var{base:f,variants:V,compoundVariants:S}=sprinkles,o="__@@Component_Sprinkles__";function k(e){return {[o]:!0,baseSprinkles:f(e),variantSprinkles:V(e),compoundVariantSprinkles:S(e)}}function d(e){switch(e){case"base":return Layers.BASE;case"variant":return Layers.VARIANTS;case"compoundVariant":return Layers.COMPOUND_VARIANTS}}function n(e,a){return e&&(Array.isArray(e)?e.map(r=>typeof r=="object"?n(r,a):r):typeof e=="object"?o in e?e[`${a}Sprinkles`]:e["@layer"]?e:{"@layer":{[d(a)]:e}}:e)}function l(e){return e&&Object.fromEntries(Object.entries(e).map(([a,r])=>[a,Object.fromEntries(Object.entries(r).map(([t,i])=>[t,n(i,"variant")]))]))}function N(e,a){let{base:r,variants:t,compoundVariants:i,defaultVariants:c}=e;return recipe({base:n(r,"base"),compoundVariants:i?.map(p=>({...p,style:n(p.style,"compoundVariant")})),variants:l(t),defaultVariants:c},a)}export{N as layeredRecipe,k as recipeSprinkles};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseline-ui/css",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "The styling library for Baseline UI",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15,9 +15,9 @@
15
15
  "author": "",
16
16
  "license": "SEE LICENSE IN https://pspdfkit.com/legal/License.pdf",
17
17
  "dependencies": {
18
- "@vanilla-extract/recipes": "0.5.3",
19
- "@vanilla-extract/css": "^1.15.3",
20
- "@baseline-ui/tokens": "0.36.0"
18
+ "@vanilla-extract/recipes": "0.5.5",
19
+ "@vanilla-extract/css": "^1.17.1",
20
+ "@baseline-ui/tokens": "0.37.0"
21
21
  },
22
22
  "publishConfig": {
23
23
  "access": "public"