Design System Utilities @ 0.1.1-alpha.0
    Preparing search index...

    Design System Utilities @ 0.1.1-alpha.0

    Documents

    About

    Functions

    makeRelativeURL

    Makes a filenames-based relative url for offline-friendly exports.

    objectFlatten

    Returns a single-level object record with kebab case keys based on nested map keys.

    objectGenerator

    Takes an array of keys and a callback function to easily construct a typed object.

    objectGeneratorAsync

    Takes an array of keys and a callback function to easily construct a typed object.

    objectMap

    A utility to map the values of an object using a callback function.

    objectMapAsync

    Maps a single-level object's properties to new values based on a callback function.

    roundToPixel

    A simple rounding function to use for rounding em and rem values for nicer output.

    Classes

    ColourContrastTest

    Generates a single pair of contrast test results used by the Tokens_Colour_ShadeMap_Shade objects.

    SvgMaker

    The object that defines a single SVG token.

    Tokens

    Generates a complete token object for the design system.

    Type Aliases

    ColourLevels
    ColourLevels_Extended
    ColourNameGeneric

    Enforces some shade names that are always present.

    ColourNameSchema
    ColourTokenSlug

    Slugs representing the colour tokens in this system.

    CssSystemColor
    RecursiveRecord

    Similar to the built-in Record type, but where the object's values can also be identical records.

    RequiredHeadingLevels
    ThemeColourOption

    Allowed options for the values of theme tokens (representing either CSS System Colors or colour design tokens in this system).

    ThemeMode_Contrast
    ThemeMode_ContrastAtLeastOne
    ThemeMode_ContrastExtraOptions
    ThemeMode_ContrastOption
    TokenLevels
    TokenLevels_Extended

    Namespaces

    BuildUtilities

    Utilities to use with the @maddimathon/npm-build-utilities package.

    ColourContrastTest

    Utilities for the Tokens class.

    ColourUtilities

    Utility functions, schemas, and types for dealing with colour values in the system.

    SvgMaker

    Utilities for the SvgMaker class.

    Tokens

    Utilities for the Tokens class.

    Modules

    internal

    Internal classes included as a module for documentation only.