diff --git a/changelog.md b/changelog.md index 2841f49..7dded75 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [3.14.0] - 2024-02-14 +## [4.0.0] - 2024-02-21 + +### Changed + +- Fix typo in frontend config, this is a **breaking change** as this require updating config file when upgrading to this version : + +For Spacing now use "arbitraries" instead of "arbritraries" + +## [3.14.0] - 2024-02-18 ### Changed @@ -15,7 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Fix usage of a global Prefix with the plugins - For example by setting up `a17` as prefix, the generated classes will look like this : + For example by setting up `a17-` as prefix, the generated classes will look like this : ``` .container => .a17-container .f-heading-01 => .a17-f-heading-01 diff --git a/docs/SpacingTokens.html b/docs/SpacingTokens.html index 9c61a33..97e5f51 100644 --- a/docs/SpacingTokens.html +++ b/docs/SpacingTokens.html @@ -78,7 +78,7 @@

Scale defined:

spacing: SpacingTokens({ scaler: 4, max: 200, - arbritraries: { + arbitraries: { "400": "400px" } }) @@ -203,7 +203,7 @@

Demo

class="code-example-code" >SpacingTokens({ scaler: 4, - arbritraries: { + arbitraries: { "400": "400px" } }) diff --git a/docs/frontend.config.json b/docs/frontend.config.json index 2450ee9..a59802a 100644 --- a/docs/frontend.config.json +++ b/docs/frontend.config.json @@ -50,7 +50,7 @@ "spacing": { "tokens": { "scaler": 4, - "arbritraries": { + "arbitraries": { "400": "400px", "600": "600px" } diff --git a/package.json b/package.json index 6a2214d..11f30e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@area17/a17-tailwind-plugins", - "version": "3.14.0", + "version": "4.0.0", "author": "A17 (https://area17.com/)", "description": "A collection of Tailwind plugins to help build responsive design systems in collaboration with A17 design and development build methodologies", "main": "index.js", diff --git a/src/SpacingTokens/index.js b/src/SpacingTokens/index.js index db14c02..fa10efc 100644 --- a/src/SpacingTokens/index.js +++ b/src/SpacingTokens/index.js @@ -1,13 +1,13 @@ module.exports = function (spacingTokens) { let scaler = spacingTokens && spacingTokens.scaler ? spacingTokens.scaler : 5; let max = spacingTokens && spacingTokens.max ? spacingTokens.max : 100; - let arbritraries = {}; + let arbitraries = {}; let input = spacingTokens || {}; const output = {}; // make arbitrary values from 0 - 10px for (let n = 0; n <= 10; n++) { - arbritraries[`${n}`] = `${n}px`; + arbitraries[`${n}`] = `${n}px`; } // check to see if there are some specified spacing tokens, or see if some settings are specified @@ -15,14 +15,14 @@ module.exports = function (spacingTokens) { !spacingTokens || spacingTokens.scaler || spacingTokens.max || - spacingTokens.arbritraries + spacingTokens.arbitraries ) { - if (spacingTokens && spacingTokens.arbritraries) { + if (spacingTokens && spacingTokens.arbitraries) { // merge arbitrary values if some set - input = Object.assign(arbritraries, spacingTokens.arbritraries); + input = Object.assign(arbitraries, spacingTokens.arbitraries); } else { // else lets roll with just the 0 - 10px arbitrary values - input = arbritraries; + input = arbitraries; } // generate values for the scaler times table