Skip to content

Commit

Permalink
Merge pull request #32 from tokens-studio/stroke-style
Browse files Browse the repository at this point in the history
BREAKING: add strokeStyle and rename some union types for consistency
  • Loading branch information
jorenbroekema authored Nov 16, 2023
2 parents 728c45c + fc3badc commit bf7096d
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-doors-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tokens-studio/types': minor
---

BREAKING: add strokeStyle token type and values enum, rename the following 3 type exports for consistency: BoxShadowUnion -> BoxShadowTypesUnion, ColorModifierUnion -> ColorModifierTypesUnion, ColorSpaceUnion -> ColorSpaceTypesUnion. Export union types for the enum constants that did not yet have one.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/constants/BorderValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export enum BorderValues {
BORDER_WIDTH = 'width',
BORDER_STYLE = 'style',
}

export type BorderValuesUnion = `${BorderValues}`;
2 changes: 1 addition & 1 deletion src/constants/BoxShadowTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export enum BoxShadowTypes {
INNER_SHADOW = 'innerShadow',
}

export type BoxShadowUnion = `${BoxShadowTypes}`;
export type BoxShadowTypesUnion = `${BoxShadowTypes}`;
2 changes: 2 additions & 0 deletions src/constants/BoxShadowValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ export enum BoxShadowValues {
SPREAD = 'spread',
BLEND_MODE = 'blendMode',
}

export type BoxShadowValuesUnion = `${BoxShadowValues}`;
2 changes: 1 addition & 1 deletion src/constants/ColorModifierTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export enum ColorModifierTypes {
ALPHA = 'alpha',
}

export type ColorModifierUnion = `${ColorModifierTypes}`;
export type ColorModifierTypesUnion = `${ColorModifierTypes}`;
2 changes: 1 addition & 1 deletion src/constants/ColorSpaceTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export enum ColorSpaceTypes {
HSL = 'hsl',
}

export type ColorSpaceUnion = `${ColorSpaceTypes}`;
export type ColorSpaceTypesUnion = `${ColorSpaceTypes}`;
12 changes: 12 additions & 0 deletions src/constants/StrokeStyleValues.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export enum StrokeStyleValues {
SOLID = 'solid',
DASHED = 'dashed',
DOTTED = 'dotted',
DOUBLE = 'double',
GROOVE = 'groove',
RIDGE = 'ridge',
OUTSET = 'outset',
INSET = 'inset',
}

export type StrokeStyleValuesUnion = `${StrokeStyleValues}`;
1 change: 1 addition & 0 deletions src/constants/TokenTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum TokenTypes {
TYPOGRAPHY = 'typography',
OPACITY = 'opacity',
BORDER_WIDTH = 'borderWidth',
STROKE_STYLE = 'strokeStyle',
BOX_SHADOW = 'boxShadow',
FONT_FAMILIES = 'fontFamilies',
FONT_WEIGHTS = 'fontWeights',
Expand Down
2 changes: 2 additions & 0 deletions src/constants/TypographyValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ export enum TypographyValues {
TEXT_DECORATION = 'textDecoration',
TEXT_CASE = 'textCase',
}

export type TypographyValuesUnion = `${TypographyValues}`;
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export * from './ThemeObject.js';
export * from './UsedTokenSetsMap.js';
export * from './valueTypes.js';
export * from '../constants/BorderValues.js';
export * from '../constants/StrokeStyleValues.js';
export * from '../constants/BoxShadowValues.js';
export * from '../constants/TypographyValues.js';

0 comments on commit bf7096d

Please sign in to comment.