dievas_tokens 1.0.4
dievas_tokens: ^1.0.4 copied to clipboard
Dievas design tokens. Primitive and semantic layers. Pure Dart, no Flutter dependency.
Changelog #
Changes to the Dievas token package, newest first.
1.0.4 #
- Change the switch track when off from
slate200(#E2E8F0) tocoolGreyLight(#DCDEE3) in light mode and fromslate700(#334155) tocharcoal(#292929) in dark mode. - Change the switch thumb when off to white (
#FFFFFF) in both themes. It wasslate300(#CBD5E1) in light mode andslate500(#64748B) in dark mode. - Change the filled Tag background in dark mode from
slate800(#1E293B) to black (#000000).
1.0.3 #
-
Include
menuHoveredBackgroundin both semantic themes:blackAlpha0Afor light andwhiteAlpha14for dark. Dievas uses these constant tokens when constructing its default themes. They were added locally after the published 1.0.2 archive. -
Make segmented control selection neutral: white background/black text in light mode, black background/white text in dark mode. Keep palette role records aligned with these defaults; other brand roles retain their palette colours.
1.0.2 #
-
Slow
DievasAnimationSemantic.loaderfrom 800ms to 2222ms using the newDievasDurationPrimitives.d2222, making the circular loader arc animation visible at Moon timing. -
Use Moon Design Piccolo purple (
#5C33CF) for the default primary brand in both themes. Update focus, selection, active controls, cursors, and tinted brand surfaces together; derive hover and pressed shades from Piccolo. Explicit palette overrides remain available.
Breaking size token naming reverse #
- Lowercase every class scoped size identifier:
DievasSpacingSemantic.md,DievasRadiusSemantic.sm,DievasElevationSemantic.xl,DievasElevationShadowLayer.xl,DievasBreakpointSemantic.xs, and the breakpoint primitives. - Role tokens keep their base and take a lowerCamelCase suffix:
buttonHeightMd,displayLg,headingXl,titleXs,bodyMd,labelXs, andcodeMd. - Radius extras use lowercase names (
r28throughr64);noneandfullreplaceNONEandFULL. - Colour roles, opacity, z-index, easing, animation intents, and
touchMinare unchanged. - Run
dart run dievas_migrate --writeto rewrite consumer code. The newdievas_migrateCLI reads analyzer errors, so it leaves unrelated enums that reuse the same names untouched.
Breaking colour role names #
- Name colours by element, variant or state, and property:
pageBackground,buttonPrimaryHoveredBackground, andinputFocusedBorder. - Replace ambiguous brand, background, surface, and action names; separate dialog, menu, tooltip, and other component backgrounds.
- Preserve existing colour values and extend palette application to the new component roles.
- Migrate Flutter themes, component consumers, examples, gallery labels, and tests together.
- See the token package’s README colour naming migration section for the replacement table and custom theme migration requirements.
Changed #
- Add exact Moon colour primitives and hexadecimal alpha variants, backed by the recorded
moon_tokens0.0.6 reference. - Map neutral light/dark semantics to the Moon reference: primary and secondary text and icons, base and subtle backgrounds, default borders, and overlay. Input text follows primary text; inverse text follows the opposite theme’s primary foreground.
- Change overlay alpha from
0x80to0x8F. These semantic value changes alter rendered output. - Keep existing brand palette, feedback, and component state mappings pending their own semantic migration. Full Moon parity is not yet established.
- Retune the size primitives to the 4pt / 8pt grid: font size follows the Moon type scale (
xsthroughfs72), radius uses lowercase role names withr<px>for larger stops, opacity useso<percent>on 4% and 8% steps, and sizing extends to 256px.
Added #
- Expose the full sizing primitive scale as
DievasSizingSemantic.height<px>andwidth<px>from 4px through 256px, for boxes, constraints, and arbitrary dimensions. - Expose the large radius stops
R28throughR64onDievasRadiusSemantic. - Expose the full opacity percentage scale
O0throughO100onDievasOpacitySemantic.
Documentation and checks #
- Expand the README with token value shapes, palette selection, naming rules, and migration limits.
- Repair historical changelog formatting and clarify class scoped size names, role suffixes, and the
XL2Plushalf step. - Demonstrate semantic spacing and palette resolution in the example.
- Correct elevation dependency comments and remove misleading Moon cross references from none migrated colour roles.
- Resolve naming test paths independently of the working directory and check constant declarations.
- Add fixture tests for all 43 primitive colour references per theme and migrated neutral semantic roles.
- Add pixel value comments to the font weight, letter spacing, line height, and opacity primitives, and trim primitive docs to their shortest useful form.
- Compress every semantic token comment to a three line maximum and remove em dashes and compound word hyphens.
- Extend the naming convention check for the numeric
height,width, andRsize names.
1.0.0 #
This release unifies size names, adds brand palettes, and paints elevation shadows from ordered layer lists.
Breaking size token naming #
Size scales use uppercase class scoped names or lowercase role names with uppercase size suffixes:
- Use
XS,SM,MD,LG,XL, andXL2throughXL8where supported. Half steps areSMPlus,MDPlus,LGPlus,XLPlus, andXL2Plus. - Radius and font size primitives, plus spacing, radius, sizing, breakpoint, elevation, and typography semantics follow this convention.
- Class scoped examples include
DievasSpacingSemantic.MDandDievasRadiusSemantic.SM. - Role examples include
buttonHeightMDandtitleXS;titleXsmbecomestitleXS. - Opacity roles (
oN), z-index, easing, and animation intents are not size axes and retain their names.
Breaking elevation shadow layers #
Shadow layers become ordered lists per tier. Shadows are centred, so the former upper and lower names and their vertical offsets no longer apply:
DievasElevationShadowbecomes({double blur, double tint}). Each layer carries its own tint instead ofoffsetY.- Remove
upperSM,lowerSM,upperMD,lowerMD,upperLG,lowerLG,upperXL, andlowerXLfromDievasElevationShadowLayer. Replace them with listsSM,MD,LG, andXL;XSalso becomes a single-layer list. - Add
DievasElevationSemantic.shadowColour(0xFF171717), an alias forDievasColourPrimitives.neutral900used by every shadow layer.
Breaking offset token removal #
Remove DievasOffsetSemantic, DievasOffsetPrimitives, and their exports. Centred shadows no longer need offsets, and elevation was their only consumer.
Breaking duplicate easing removal #
Remove DievasEasingPrimitives.emphasize and DievasEasingSemantic.emphasize. Both duplicated standard.
Breaking shadow opacity migration #
Remove six aliases from DievasOpacitySemantic: shadow1, shadow1Light, shadow2, shadow2Upper, shadow2Lower, and shadow2Heavy. Shadow tints now live in elevation layer records beside their blurs; no SHADOW_TINT_* constants are exposed.
New brand palettes #
Add palette selection to the token layer:
DievasBrandPaletteholds an 11 tint ramp (50through950) and anonBrandcontrast colour.rolesForLight()androlesForDark()resolve the brand roles.DievasBrandRoleColoursdescribes the resolved record.DievasBrandPalettesincludes defaultindigo, plussky,green,violet,red,amber,ocean,forest,berry,dusk, andterracotta. Parity tests verify that indigo reproduces the built-in brand semantics.
Documentation #
Document the size naming convention and the 4pt / 8pt grid rules.
0.0.3 #
- Add light and dark surface variants:
surfaceCanvas,surfaceCode,surfaceSidebar, andsurfaceTableStriped. - Add
DievasElevationShadowfor shadow layer records. - Fix the animation comment typo (
organiZedtoorganized). - Rename
touchTargetMintotouchMinin sizing semantics. - Correct the
titleXsmcomment from small to extra small. - Add
DievasBreakpointPrimitivesandDievasBreakpointSemantic. - Add
DievasZIndexSemantic. - Add
DievasEasingCurve,DievasEasingPrimitives, andDievasEasingSemantic.
0.0.2 #
- Add
repositoryandhomepagepackage metadata. - Add the
example/directory. - Add Dart documentation comments to uncovered API symbols.
0.0.1 #
Initial release:
- Primitive tokens: colours, typography, spacing, sizing, radius, elevation, opacity, duration, and offset
- Semantic tokens: light/dark colour schemes, typography roles, spacing/sizing scale, elevation layers, opacity levels, radius scale, offset patterns, and animation presets