Core Changelog
Release history for TW-Classed Core
@tw-classed/core
1.7.0
Minor Changes
-
#132
6fd3d61Thanks @sannajammeh! - AddgetVariantConfig()utility tocore&reactapi's. This extracts the entire parsed variant config from a classed component, also supports nested variants from component composition.Usage:
const Button = classed("button", { variants: { color: { blue: "bg-blue-500", }, }, }); const { variants } = getVariantConfig(Button); variants.color.blue; // "bg-blue-500"
Patch Changes
- #133
97130ecThanks @sannajammeh! - Ensure compatibility withexactOptionalPropertyTypes:truein tsconfig.json
1.7.0-canary.0
Minor Changes
-
#132
6fd3d61Thanks @sannajammeh! - AddgetVariantConfig()utility tocore&reactapi's. This extracts the entire parsed variant config from a classed component, also supports nested variants from component composition.Usage:
const Button = classed("button", { variants: { color: { blue: "bg-blue-500", }, }, }); const { variants } = getVariantConfig(Button); variants.color.blue; // "bg-blue-500"
Patch Changes
- #133
97130ecThanks @sannajammeh! - Ensure compatibility withexactOptionalPropertyTypes:truein tsconfig.json
1.6.0
Minor Changes
-
#125
e3b9d61eThanks @sannajammeh! - - (Feat): Add support for defaultProps in React api Components can now have default props in the React apiconst Button = classed.button({ defaultProps: { someProp: "someValue", }, });This change is considered unstable, for now defaultProps will not populate when using composition nor affect variants or classname generation.
- (Fix): Data attributes are now correctly generated for composition
1.5.2
Patch Changes
- #119
67ec8d98Thanks @sannajammeh! - This release exports the default merger ascx, adds additional test cases for cx & react props, bumps all packages to latest
1.5.1
Patch Changes
-
#114
52abded9Thanks @sannajammeh! - Add support for array matching compound variants- Add support for matched variants to appear as dataAttributes
- Update dependencies
chore(core): update parser and types to support array compound variants
- Update parser to handle array compound variants
- Update types to handle array compound variants
feat(react): update types to support array compound variants
- Update types to handle array compound variants
test(core): add tests for array compound variants
- Add tests for array compound variants
test(compound.spec.tsx): add tests for array compound variants to improve test coverage
1.5.0
Minor Changes
-
#105
233bddfdThanks @Xiot! - Adds support for matched variants to appear as dataAttributesExample
const Button = classed("button", { variants: { color: { blue: "bg-blue-100", red: "bg-red-100", }, }, defaultVariants: { color: "red", }, dataAttributes: ["color"], }); <Button color="blue" /> // Rendered html will be <button data-color="blue" /> <Button> // Rendered html will be <button data-color="red /> // From default variants
1.5.0-canary.0
Minor Changes
-
#105
233bddfdThanks @Xiot! - Adds support for matched variants to appear as dataAttributesExample
const Button = classed("button", { variants: { color: { blue: "bg-blue-100", red: "bg-red-100", }, }, defaultVariants: { color: "red", }, dataAttributes: ["color"], }); <Button color="blue" /> // Rendered html will be <button data-color="blue" /> <Button> // Rendered html will be <button data-color="red /> // From default variants
1.4.4
Patch Changes
- #101
f19df61fThanks @sannajammeh! - Improve performance for core lib, carries over to React
1.4.0
Minor Changes
- #82
0f5f46faThanks @sannajammeh! - Adds support forderiveClassed&makeStrict. Updated core internal typing for compatibility.
Patch Changes
-
#89
785bcaaaThanks @sannajammeh! - Adds support for compoundVariants to be inherit via the composition API.Example:
const Button = classed.button({ base: "bg-blue-500 text-white", variants: { size: { sm: "px-2 py-1 text-sm", md: "px-4 py-2 text-base", }, color: { red: "bg-red-500", green: "bg-green-500", }, }, compoundVariants: [ { size: "sm", color: "green" class: "super-special-class-modifyer" }, ], }); const GreenButton = classed(Button, { defaultVariants: { color: "green", // This now triggers the compoundVariant }, });
1.4.0-canary.5
Patch Changes
-
785bcaaaThanks @sannajammeh! - Adds support for compoundVariants to be inherit via the composition API.Example:
const Button = classed.button({ base: "bg-blue-500 text-white", variants: { size: { sm: "px-2 py-1 text-sm", md: "px-4 py-2 text-base", }, color: { red: "bg-red-500", green: "bg-green-500", }, }, compoundVariants: [ { size: "sm", color: "green" class: "super-special-class-modifyer" }, ], }); const GreenButton = classed(Button, { defaultVariants: { color: "green", // This now triggers the compoundVariant }, });
1.4.0-canary.1
Minor Changes
- #82
0f5f46faThanks @sannajammeh! - Adds support forderiveClassed&makeStrict. Updated core internal typing for compatibility.
1.3.2
Patch Changes
-
#68
091ef6a4Thanks @sannajammeh! - Adds support in core lib forclass&classNamewhen calling a class producer functionExample:
const button = classed("bg-blue-500"); // LitHTML html`<button class=${button({ class: "text-white" })}>Click me</button>`;
1.3.2-canary.1
Patch Changes
-
091ef6a4Thanks @sannajammeh! - Adds support in core lib forclass&classNamewhen calling a class producer functionExample:
const button = classed("bg-blue-500"); // LitHTML html`<button class=${button({ class: "text-white" })}>Click me</button>`;
1.3.0
Patch Changes
-
#61
79be37a2Thanks @sannajammeh! - This release extends core to support the createClassed API, adds improvements to the documentation -
#61
29570c7eThanks @sannajammeh! - Export DerivedComponentType to handle as prop in derived components -
#61
f328e321Thanks @sannajammeh! - Switch to SWC powered bunchee bundler -
#61
e7596bb9Thanks @sannajammeh! - Fixes "This module is a CJS module" in node.js with type:"module"
1.3.0-canary.4
Patch Changes
e7596bb9Thanks @sannajammeh! - Fixes "This module is a CJS module" in node.js with type:"module"
1.3.0-canary.3
Patch Changes
f328e321Thanks @sannajammeh! - Switch to SWC powered bunchee bundler
1.3.0-canary.2
Patch Changes
29570c7eThanks @sannajammeh! - Export DerivedComponentType to handle as prop in derived components
1.3.0-canary.1
Patch Changes
79be37a2Thanks @sannajammeh! - This release extends core to support the createClassed API, adds improvements to the documentation
1.2.5
Patch Changes
9d8f12f4Thanks @sannajammeh! - Widen types of boolean variants
1.2.4
Patch Changes
413c87d1Thanks @sannajammeh! - Export VariantProps from core, document variant props in core docs
1.2.3
Patch Changes
-
#39
55e8b2b8Thanks @sannajammeh! - ES2018 build spec, code refactor, readme updates -
#33
92617148Thanks @sannajammeh! - Fix numeric variants
1.2.3-canary.1
Patch Changes
55e8b2b8Thanks @sannajammeh! - ES2018 build spec, code refactor, readme updates
1.2.3-canary.0
Patch Changes
- #33
92617148Thanks @sannajammeh! - Fix numeric variants
1.2.2
Patch Changes
- #30
1cc8c2e6Thanks @sannajammeh! - Fix core require
1.2.1
Patch Changes
- #27
c6d76b9eThanks @sannajammeh! - Fixes Reflect.has api bug
1.2.0
Patch Changes
-
#19
2d24a386Thanks @sannajammeh! - Switch core bundler to unbuild for bundleless exports -
#21
01c1a8b3Thanks @sannajammeh! - Final Proxty API & base property
1.2.0-canary.3
Patch Changes
- #21
01c1a8b3Thanks @sannajammeh! - Final Proxty API & base property
1.2.0-canary.2
Patch Changes
- #19
2d24a386Thanks @sannajammeh! - Switch core bundler to unbuild for bundleless exports
1.1.0
Minor Changes
- #12
c6e1ae2Thanks @sannajammeh! - Added full support for compoundVariants, base property in config object
1.0.0
Major Changes
- Final v1 release of all packages. Breaking from alpha: both core and react no longer export default and switched to classed.