Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: add strokeStyle and rename some union types for consistency #32

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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';

Loading