@datatechsolutions/tympan-tokens 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +105 -0
- package/README.md +318 -0
- package/dist/contrast-report.md +13955 -0
- package/dist/dtcg/astrlabe.dark-high.tokens.json +2947 -0
- package/dist/dtcg/astrlabe.dark.tokens.json +2947 -0
- package/dist/dtcg/astrlabe.light-high.tokens.json +2947 -0
- package/dist/dtcg/astrlabe.light.tokens.json +2947 -0
- package/dist/dtcg/base.tokens.json +422 -0
- package/dist/dtcg/density.comfortable.tokens.json +48 -0
- package/dist/dtcg/density.compact.tokens.json +48 -0
- package/dist/dtcg/density.default.tokens.json +48 -0
- package/dist/dtcg/fakhir.dark-high.tokens.json +2971 -0
- package/dist/dtcg/fakhir.dark.tokens.json +2971 -0
- package/dist/dtcg/fakhir.light-high.tokens.json +2971 -0
- package/dist/dtcg/fakhir.light.tokens.json +2971 -0
- package/dist/dtcg/flow.tokens.json +675 -0
- package/dist/dtcg/high-contrast.dark.tokens.json +2943 -0
- package/dist/dtcg/high-contrast.light.tokens.json +2943 -0
- package/dist/dtcg/neutral.dark-high.tokens.json +2947 -0
- package/dist/dtcg/neutral.dark.tokens.json +2947 -0
- package/dist/dtcg/neutral.light-high.tokens.json +2947 -0
- package/dist/dtcg/neutral.light.tokens.json +2947 -0
- package/dist/dtcg/print/print-aquarela.dark.tokens.json +3014 -0
- package/dist/dtcg/print/print-aquarela.light.tokens.json +3009 -0
- package/dist/dtcg/print/print-art-nouveau.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-art-nouveau.light.tokens.json +2944 -0
- package/dist/dtcg/print/print-atlas-oficial.dark.tokens.json +2945 -0
- package/dist/dtcg/print/print-atlas-oficial.light.tokens.json +2945 -0
- package/dist/dtcg/print/print-azulejo-modernista.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-azulejo-modernista.light.tokens.json +2946 -0
- package/dist/dtcg/print/print-bauhaus.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-bauhaus.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-blocos-coloridos.dark.tokens.json +2974 -0
- package/dist/dtcg/print/print-blocos-coloridos.light.tokens.json +2967 -0
- package/dist/dtcg/print/print-brutalista.dark.tokens.json +2956 -0
- package/dist/dtcg/print/print-brutalista.light.tokens.json +2956 -0
- package/dist/dtcg/print/print-caderno.dark.tokens.json +2958 -0
- package/dist/dtcg/print/print-caderno.light.tokens.json +2954 -0
- package/dist/dtcg/print/print-cartao-postal.dark.tokens.json +2958 -0
- package/dist/dtcg/print/print-cartao-postal.light.tokens.json +2954 -0
- package/dist/dtcg/print/print-cientifico.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-cientifico.light.tokens.json +2944 -0
- package/dist/dtcg/print/print-concretismo.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-concretismo.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-construtivismo.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-construtivismo.light.tokens.json +2946 -0
- package/dist/dtcg/print/print-cordel.dark.tokens.json +2958 -0
- package/dist/dtcg/print/print-cordel.light.tokens.json +2954 -0
- package/dist/dtcg/print/print-dados-br.dark.tokens.json +2959 -0
- package/dist/dtcg/print/print-dados-br.light.tokens.json +2956 -0
- package/dist/dtcg/print/print-dashboard.dark.tokens.json +3015 -0
- package/dist/dtcg/print/print-dashboard.light.tokens.json +3007 -0
- package/dist/dtcg/print/print-diagrama-modernista.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-diagrama-modernista.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-divulgacao.dark.tokens.json +2942 -0
- package/dist/dtcg/print/print-divulgacao.light.tokens.json +2938 -0
- package/dist/dtcg/print/print-fluxo-historico.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-fluxo-historico.light.tokens.json +2941 -0
- package/dist/dtcg/print/print-grade-holandesa.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-grade-holandesa.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-graficos-1900.dark.tokens.json +2959 -0
- package/dist/dtcg/print/print-graficos-1900.light.tokens.json +2955 -0
- package/dist/dtcg/print/print-infografico-ilustrado.dark.tokens.json +2974 -0
- package/dist/dtcg/print/print-infografico-ilustrado.light.tokens.json +2970 -0
- package/dist/dtcg/print/print-isotype.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-isotype.light.tokens.json +2946 -0
- package/dist/dtcg/print/print-jornal-1959.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-jornal-1959.light.tokens.json +2944 -0
- package/dist/dtcg/print/print-jornal.dark.tokens.json +2958 -0
- package/dist/dtcg/print/print-jornal.light.tokens.json +2951 -0
- package/dist/dtcg/print/print-mapa-de-metro.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-mapa-de-metro.light.tokens.json +2946 -0
- package/dist/dtcg/print/print-memphis.dark.tokens.json +2942 -0
- package/dist/dtcg/print/print-memphis.light.tokens.json +2938 -0
- package/dist/dtcg/print/print-minimo-de-tinta.dark.tokens.json +2958 -0
- package/dist/dtcg/print/print-minimo-de-tinta.light.tokens.json +2951 -0
- package/dist/dtcg/print/print-papel-recortado.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-papel-recortado.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-papel-salmao.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-papel-salmao.light.tokens.json +2941 -0
- package/dist/dtcg/print/print-pictogramas.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-pictogramas.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-pop-art.dark.tokens.json +2942 -0
- package/dist/dtcg/print/print-pop-art.light.tokens.json +2938 -0
- package/dist/dtcg/print/print-prancheta-clara.dark.tokens.json +2960 -0
- package/dist/dtcg/print/print-prancheta-clara.light.tokens.json +2956 -0
- package/dist/dtcg/print/print-prancheta.dark.tokens.json +2956 -0
- package/dist/dtcg/print/print-prancheta.light.tokens.json +2960 -0
- package/dist/dtcg/print/print-proporcao-modular.dark.tokens.json +2945 -0
- package/dist/dtcg/print/print-proporcao-modular.light.tokens.json +2941 -0
- package/dist/dtcg/print/print-riso.dark.tokens.json +2960 -0
- package/dist/dtcg/print/print-riso.light.tokens.json +2956 -0
- package/dist/dtcg/print/print-semanario.dark.tokens.json +2944 -0
- package/dist/dtcg/print/print-semanario.light.tokens.json +2937 -0
- package/dist/dtcg/print/print-sinalizacao.dark.tokens.json +2946 -0
- package/dist/dtcg/print/print-sinalizacao.light.tokens.json +2942 -0
- package/dist/dtcg/print/print-suico.dark.tokens.json +2960 -0
- package/dist/dtcg/print/print-suico.light.tokens.json +2956 -0
- package/dist/dtcg/print/print-tropicalia.dark.tokens.json +2945 -0
- package/dist/dtcg/print/print-tropicalia.light.tokens.json +2941 -0
- package/dist/dtcg/print-aquarela.dark-high.tokens.json +3014 -0
- package/dist/dtcg/print-aquarela.dark.tokens.json +3014 -0
- package/dist/dtcg/print-aquarela.light-high.tokens.json +3014 -0
- package/dist/dtcg/print-aquarela.light.tokens.json +3009 -0
- package/dist/dtcg/print-art-nouveau.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-art-nouveau.dark.tokens.json +2944 -0
- package/dist/dtcg/print-art-nouveau.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-art-nouveau.light.tokens.json +2944 -0
- package/dist/dtcg/print-atlas-oficial.dark-high.tokens.json +2945 -0
- package/dist/dtcg/print-atlas-oficial.dark.tokens.json +2945 -0
- package/dist/dtcg/print-atlas-oficial.light-high.tokens.json +2945 -0
- package/dist/dtcg/print-atlas-oficial.light.tokens.json +2945 -0
- package/dist/dtcg/print-azulejo-modernista.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-azulejo-modernista.dark.tokens.json +2946 -0
- package/dist/dtcg/print-azulejo-modernista.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-azulejo-modernista.light.tokens.json +2946 -0
- package/dist/dtcg/print-bauhaus.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-bauhaus.dark.tokens.json +2946 -0
- package/dist/dtcg/print-bauhaus.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-bauhaus.light.tokens.json +2942 -0
- package/dist/dtcg/print-blocos-coloridos.dark-high.tokens.json +2974 -0
- package/dist/dtcg/print-blocos-coloridos.dark.tokens.json +2974 -0
- package/dist/dtcg/print-blocos-coloridos.light-high.tokens.json +2974 -0
- package/dist/dtcg/print-blocos-coloridos.light.tokens.json +2967 -0
- package/dist/dtcg/print-brutalista.dark-high.tokens.json +2956 -0
- package/dist/dtcg/print-brutalista.dark.tokens.json +2956 -0
- package/dist/dtcg/print-brutalista.light-high.tokens.json +2956 -0
- package/dist/dtcg/print-brutalista.light.tokens.json +2956 -0
- package/dist/dtcg/print-caderno.dark-high.tokens.json +2958 -0
- package/dist/dtcg/print-caderno.dark.tokens.json +2958 -0
- package/dist/dtcg/print-caderno.light-high.tokens.json +2958 -0
- package/dist/dtcg/print-caderno.light.tokens.json +2954 -0
- package/dist/dtcg/print-cartao-postal.dark-high.tokens.json +2958 -0
- package/dist/dtcg/print-cartao-postal.dark.tokens.json +2958 -0
- package/dist/dtcg/print-cartao-postal.light-high.tokens.json +2958 -0
- package/dist/dtcg/print-cartao-postal.light.tokens.json +2954 -0
- package/dist/dtcg/print-cientifico.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-cientifico.dark.tokens.json +2944 -0
- package/dist/dtcg/print-cientifico.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-cientifico.light.tokens.json +2944 -0
- package/dist/dtcg/print-concretismo.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-concretismo.dark.tokens.json +2946 -0
- package/dist/dtcg/print-concretismo.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-concretismo.light.tokens.json +2942 -0
- package/dist/dtcg/print-construtivismo.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-construtivismo.dark.tokens.json +2946 -0
- package/dist/dtcg/print-construtivismo.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-construtivismo.light.tokens.json +2946 -0
- package/dist/dtcg/print-cordel.dark-high.tokens.json +2958 -0
- package/dist/dtcg/print-cordel.dark.tokens.json +2958 -0
- package/dist/dtcg/print-cordel.light-high.tokens.json +2958 -0
- package/dist/dtcg/print-cordel.light.tokens.json +2954 -0
- package/dist/dtcg/print-dados-br.dark-high.tokens.json +2959 -0
- package/dist/dtcg/print-dados-br.dark.tokens.json +2959 -0
- package/dist/dtcg/print-dados-br.light-high.tokens.json +2959 -0
- package/dist/dtcg/print-dados-br.light.tokens.json +2956 -0
- package/dist/dtcg/print-dashboard.dark-high.tokens.json +3015 -0
- package/dist/dtcg/print-dashboard.dark.tokens.json +3015 -0
- package/dist/dtcg/print-dashboard.light-high.tokens.json +3015 -0
- package/dist/dtcg/print-dashboard.light.tokens.json +3007 -0
- package/dist/dtcg/print-diagrama-modernista.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-diagrama-modernista.dark.tokens.json +2946 -0
- package/dist/dtcg/print-diagrama-modernista.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-diagrama-modernista.light.tokens.json +2942 -0
- package/dist/dtcg/print-divulgacao.dark-high.tokens.json +2942 -0
- package/dist/dtcg/print-divulgacao.dark.tokens.json +2942 -0
- package/dist/dtcg/print-divulgacao.light-high.tokens.json +2942 -0
- package/dist/dtcg/print-divulgacao.light.tokens.json +2938 -0
- package/dist/dtcg/print-fluxo-historico.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-fluxo-historico.dark.tokens.json +2944 -0
- package/dist/dtcg/print-fluxo-historico.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-fluxo-historico.light.tokens.json +2941 -0
- package/dist/dtcg/print-grade-holandesa.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-grade-holandesa.dark.tokens.json +2946 -0
- package/dist/dtcg/print-grade-holandesa.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-grade-holandesa.light.tokens.json +2942 -0
- package/dist/dtcg/print-graficos-1900.dark-high.tokens.json +2959 -0
- package/dist/dtcg/print-graficos-1900.dark.tokens.json +2959 -0
- package/dist/dtcg/print-graficos-1900.light-high.tokens.json +2959 -0
- package/dist/dtcg/print-graficos-1900.light.tokens.json +2955 -0
- package/dist/dtcg/print-infografico-ilustrado.dark-high.tokens.json +2974 -0
- package/dist/dtcg/print-infografico-ilustrado.dark.tokens.json +2974 -0
- package/dist/dtcg/print-infografico-ilustrado.light-high.tokens.json +2974 -0
- package/dist/dtcg/print-infografico-ilustrado.light.tokens.json +2970 -0
- package/dist/dtcg/print-isotype.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-isotype.dark.tokens.json +2946 -0
- package/dist/dtcg/print-isotype.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-isotype.light.tokens.json +2946 -0
- package/dist/dtcg/print-jornal-1959.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-jornal-1959.dark.tokens.json +2944 -0
- package/dist/dtcg/print-jornal-1959.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-jornal-1959.light.tokens.json +2944 -0
- package/dist/dtcg/print-jornal.dark-high.tokens.json +2958 -0
- package/dist/dtcg/print-jornal.dark.tokens.json +2958 -0
- package/dist/dtcg/print-jornal.light-high.tokens.json +2958 -0
- package/dist/dtcg/print-jornal.light.tokens.json +2951 -0
- package/dist/dtcg/print-mapa-de-metro.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-mapa-de-metro.dark.tokens.json +2946 -0
- package/dist/dtcg/print-mapa-de-metro.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-mapa-de-metro.light.tokens.json +2946 -0
- package/dist/dtcg/print-memphis.dark-high.tokens.json +2942 -0
- package/dist/dtcg/print-memphis.dark.tokens.json +2942 -0
- package/dist/dtcg/print-memphis.light-high.tokens.json +2942 -0
- package/dist/dtcg/print-memphis.light.tokens.json +2938 -0
- package/dist/dtcg/print-minimo-de-tinta.dark-high.tokens.json +2958 -0
- package/dist/dtcg/print-minimo-de-tinta.dark.tokens.json +2958 -0
- package/dist/dtcg/print-minimo-de-tinta.light-high.tokens.json +2958 -0
- package/dist/dtcg/print-minimo-de-tinta.light.tokens.json +2951 -0
- package/dist/dtcg/print-papel-recortado.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-papel-recortado.dark.tokens.json +2946 -0
- package/dist/dtcg/print-papel-recortado.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-papel-recortado.light.tokens.json +2942 -0
- package/dist/dtcg/print-papel-salmao.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-papel-salmao.dark.tokens.json +2944 -0
- package/dist/dtcg/print-papel-salmao.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-papel-salmao.light.tokens.json +2941 -0
- package/dist/dtcg/print-pictogramas.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-pictogramas.dark.tokens.json +2946 -0
- package/dist/dtcg/print-pictogramas.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-pictogramas.light.tokens.json +2942 -0
- package/dist/dtcg/print-pop-art.dark-high.tokens.json +2942 -0
- package/dist/dtcg/print-pop-art.dark.tokens.json +2942 -0
- package/dist/dtcg/print-pop-art.light-high.tokens.json +2942 -0
- package/dist/dtcg/print-pop-art.light.tokens.json +2938 -0
- package/dist/dtcg/print-prancheta-clara.dark-high.tokens.json +2960 -0
- package/dist/dtcg/print-prancheta-clara.dark.tokens.json +2960 -0
- package/dist/dtcg/print-prancheta-clara.light-high.tokens.json +2960 -0
- package/dist/dtcg/print-prancheta-clara.light.tokens.json +2956 -0
- package/dist/dtcg/print-prancheta.dark-high.tokens.json +2960 -0
- package/dist/dtcg/print-prancheta.dark.tokens.json +2956 -0
- package/dist/dtcg/print-prancheta.light-high.tokens.json +2960 -0
- package/dist/dtcg/print-prancheta.light.tokens.json +2960 -0
- package/dist/dtcg/print-proporcao-modular.dark-high.tokens.json +2945 -0
- package/dist/dtcg/print-proporcao-modular.dark.tokens.json +2945 -0
- package/dist/dtcg/print-proporcao-modular.light-high.tokens.json +2945 -0
- package/dist/dtcg/print-proporcao-modular.light.tokens.json +2941 -0
- package/dist/dtcg/print-riso.dark-high.tokens.json +2960 -0
- package/dist/dtcg/print-riso.dark.tokens.json +2960 -0
- package/dist/dtcg/print-riso.light-high.tokens.json +2960 -0
- package/dist/dtcg/print-riso.light.tokens.json +2956 -0
- package/dist/dtcg/print-semanario.dark-high.tokens.json +2944 -0
- package/dist/dtcg/print-semanario.dark.tokens.json +2944 -0
- package/dist/dtcg/print-semanario.light-high.tokens.json +2944 -0
- package/dist/dtcg/print-semanario.light.tokens.json +2937 -0
- package/dist/dtcg/print-sinalizacao.dark-high.tokens.json +2946 -0
- package/dist/dtcg/print-sinalizacao.dark.tokens.json +2946 -0
- package/dist/dtcg/print-sinalizacao.light-high.tokens.json +2946 -0
- package/dist/dtcg/print-sinalizacao.light.tokens.json +2942 -0
- package/dist/dtcg/print-suico.dark-high.tokens.json +2960 -0
- package/dist/dtcg/print-suico.dark.tokens.json +2960 -0
- package/dist/dtcg/print-suico.light-high.tokens.json +2960 -0
- package/dist/dtcg/print-suico.light.tokens.json +2956 -0
- package/dist/dtcg/print-tropicalia.dark-high.tokens.json +2945 -0
- package/dist/dtcg/print-tropicalia.dark.tokens.json +2945 -0
- package/dist/dtcg/print-tropicalia.light-high.tokens.json +2945 -0
- package/dist/dtcg/print-tropicalia.light.tokens.json +2941 -0
- package/dist/dtcg/tympan.dark-high.tokens.json +2971 -0
- package/dist/dtcg/tympan.dark.tokens.json +2971 -0
- package/dist/dtcg/tympan.light-high.tokens.json +2971 -0
- package/dist/dtcg/tympan.light.tokens.json +2971 -0
- package/dist/index.d.ts +642 -0
- package/dist/index.js +4873 -0
- package/dist/index.js.map +1 -0
- package/dist/print-aliases.d.ts +54 -0
- package/dist/print-aliases.js +71 -0
- package/dist/print-aliases.js.map +1 -0
- package/dist/print-themes/print-aquarela.css +1483 -0
- package/dist/print-themes/print-art-nouveau.css +1467 -0
- package/dist/print-themes/print-atlas-oficial.css +1467 -0
- package/dist/print-themes/print-azulejo-modernista.css +1467 -0
- package/dist/print-themes/print-bauhaus.css +1467 -0
- package/dist/print-themes/print-blocos-coloridos.css +1467 -0
- package/dist/print-themes/print-brutalista.css +1475 -0
- package/dist/print-themes/print-caderno.css +1483 -0
- package/dist/print-themes/print-cartao-postal.css +1483 -0
- package/dist/print-themes/print-cientifico.css +1467 -0
- package/dist/print-themes/print-concretismo.css +1467 -0
- package/dist/print-themes/print-construtivismo.css +1467 -0
- package/dist/print-themes/print-cordel.css +1483 -0
- package/dist/print-themes/print-dados-br.css +1475 -0
- package/dist/print-themes/print-dashboard.css +1475 -0
- package/dist/print-themes/print-diagrama-modernista.css +1467 -0
- package/dist/print-themes/print-divulgacao.css +1467 -0
- package/dist/print-themes/print-fluxo-historico.css +1475 -0
- package/dist/print-themes/print-grade-holandesa.css +1475 -0
- package/dist/print-themes/print-graficos-1900.css +1483 -0
- package/dist/print-themes/print-infografico-ilustrado.css +1467 -0
- package/dist/print-themes/print-isotype.css +1467 -0
- package/dist/print-themes/print-jornal-1959.css +1467 -0
- package/dist/print-themes/print-jornal.css +1475 -0
- package/dist/print-themes/print-mapa-de-metro.css +1467 -0
- package/dist/print-themes/print-memphis.css +1467 -0
- package/dist/print-themes/print-minimo-de-tinta.css +1475 -0
- package/dist/print-themes/print-papel-recortado.css +1467 -0
- package/dist/print-themes/print-papel-salmao.css +1467 -0
- package/dist/print-themes/print-pictogramas.css +1467 -0
- package/dist/print-themes/print-pop-art.css +1467 -0
- package/dist/print-themes/print-prancheta-clara.css +1483 -0
- package/dist/print-themes/print-prancheta.css +1483 -0
- package/dist/print-themes/print-proporcao-modular.css +1467 -0
- package/dist/print-themes/print-riso.css +1483 -0
- package/dist/print-themes/print-semanario.css +1467 -0
- package/dist/print-themes/print-sinalizacao.css +1467 -0
- package/dist/print-themes/print-suico.css +1475 -0
- package/dist/print-themes/print-tropicalia.css +1467 -0
- package/dist/print-themes.css +57215 -0
- package/dist/print-themes.json +236 -0
- package/dist/tokens.css +64416 -0
- package/dist/tokens.json +31449 -0
- package/dist/values.d.ts +14 -0
- package/dist/values.js +31454 -0
- package/package.json +67 -0
- package/src/base/motion.tokens.json +15 -0
- package/src/base/space.tokens.json +122 -0
- package/src/base/type.tokens.json +227 -0
- package/src/base/z.tokens.json +13 -0
- package/src/color.ts +239 -0
- package/src/dtcg.ts +102 -0
- package/src/flow.ts +130 -0
- package/src/index.ts +17 -0
- package/src/presets.ts +135 -0
- package/src/presets.ts.diff +26 -0
- package/src/print-aliases.ts +84 -0
- package/src/print-presets.ts +1611 -0
- package/src/print-themes.ts +404 -0
- package/src/scripts.ts +75 -0
- package/src/stylesheet.ts +238 -0
- package/src/theme.ts +553 -0
- package/src/theme.ts.rej +16 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Assembles the token stylesheet: selector strategy for themes, modes and
|
|
2
|
+
// densities, plus the user-preference media blocks. Used by the static build
|
|
3
|
+
// (fed by Style Dictionary output) and by the live theme customizer (fed
|
|
4
|
+
// directly by the generator); both produce the same text for the same input.
|
|
5
|
+
|
|
6
|
+
import { presets as builtInPresets, DEFAULT_THEME } from './presets.ts'
|
|
7
|
+
import { printThemePresets } from './print-themes.ts'
|
|
8
|
+
import { scriptRules } from './scripts.ts'
|
|
9
|
+
import { DENSITIES, densityVariables, resolveTheme, themeVariables, type Density, type ThemeConfig } from './theme.ts'
|
|
10
|
+
|
|
11
|
+
export type VarList = Array<[string, string]>
|
|
12
|
+
|
|
13
|
+
export interface ThemeVars {
|
|
14
|
+
name: string
|
|
15
|
+
light: VarList
|
|
16
|
+
dark: VarList
|
|
17
|
+
/** Values used under `prefers-contrast: more` (omitted for themes that are already high contrast). */
|
|
18
|
+
highLight?: VarList
|
|
19
|
+
highDark?: VarList
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface StylesheetInput {
|
|
23
|
+
/** Theme-independent tokens (space, type, motion, z, layout). */
|
|
24
|
+
base?: VarList
|
|
25
|
+
themes: ThemeVars[]
|
|
26
|
+
/** Theme applied to `:root` without attributes. `null` scopes every theme to its attribute. */
|
|
27
|
+
defaultTheme?: string | null
|
|
28
|
+
densities?: Partial<Record<Density, VarList>>
|
|
29
|
+
/**
|
|
30
|
+
* Component tokens that reference theme roles through var(). Declared on
|
|
31
|
+
* every theme and mode scope so a nested theme re-resolves them.
|
|
32
|
+
*/
|
|
33
|
+
components?: VarList
|
|
34
|
+
/** Extra component rules emitted after the component tokens (e.g. the flow tone mapping). */
|
|
35
|
+
componentRules?: string
|
|
36
|
+
/** Cascade layer; `null` for none. */
|
|
37
|
+
layer?: string | null
|
|
38
|
+
banner?: string
|
|
39
|
+
/**
|
|
40
|
+
* Emit the user-preference blocks (reduced motion and transparency,
|
|
41
|
+
* forced colours). Default true; add-on theme sheets loaded after the main
|
|
42
|
+
* token sheet set it to false because those blocks already apply to every theme.
|
|
43
|
+
*/
|
|
44
|
+
preferences?: boolean
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const indent = (s: string, n = 2) =>
|
|
48
|
+
s
|
|
49
|
+
.split('\n')
|
|
50
|
+
.map((l) => (l ? ' '.repeat(n) + l : l))
|
|
51
|
+
.join('\n')
|
|
52
|
+
const decls = (vars: VarList, extra: string[] = []) => [...extra, ...vars.map(([n, v]) => `${n}: ${v};`)].join('\n')
|
|
53
|
+
const rule = (selectors: string[], body: string) => `${selectors.join(',\n')} {\n${indent(body)}\n}`
|
|
54
|
+
const media = (query: string, body: string) => `@media ${query} {\n${indent(body)}\n}`
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Selectors for one theme. The attributes may sit on the same element or on
|
|
58
|
+
* an ancestor: `data-ty-theme` picks the theme, `data-ty-mode` forces light or
|
|
59
|
+
* dark (absent or `system` follows `prefers-color-scheme`).
|
|
60
|
+
*/
|
|
61
|
+
export function themeSelectors(name: string, isDefault: boolean) {
|
|
62
|
+
const t = `[data-ty-theme="${name}"]`
|
|
63
|
+
return {
|
|
64
|
+
light: isDefault ? [':root', t, '[data-ty-mode="light"]'] : [t, `${t} [data-ty-mode="light"]`],
|
|
65
|
+
systemDark: isDefault
|
|
66
|
+
? [':root:not([data-ty-mode="light"])', `${t}:not([data-ty-mode="light"])`]
|
|
67
|
+
: [`${t}:not([data-ty-mode="light"])`],
|
|
68
|
+
dark: isDefault
|
|
69
|
+
? ['[data-ty-mode="dark"]', `${t}[data-ty-mode="dark"]`, `${t} [data-ty-mode="dark"]`, `[data-ty-mode="dark"] ${t}`]
|
|
70
|
+
: [`${t}[data-ty-mode="dark"]`, `${t} [data-ty-mode="dark"]`, `[data-ty-mode="dark"] ${t}`],
|
|
71
|
+
explicitLight: [`${t}[data-ty-mode="light"]`, `[data-ty-mode="dark"] ${t}[data-ty-mode="light"]`],
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function themeBlocks(theme: ThemeVars, isDefault: boolean, light: VarList, dark: VarList): string[] {
|
|
76
|
+
const s = themeSelectors(theme.name, isDefault)
|
|
77
|
+
return [
|
|
78
|
+
rule(s.light, decls(light, ['color-scheme: light;'])),
|
|
79
|
+
media('(prefers-color-scheme: dark)', rule(s.systemDark, decls(dark, ['color-scheme: dark;']))),
|
|
80
|
+
rule(s.dark, decls(dark, ['color-scheme: dark;'])),
|
|
81
|
+
rule(s.explicitLight, decls(light, ['color-scheme: light;'])),
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const ANY_SCOPE = [':root', '[data-ty-theme]', '[data-ty-mode]']
|
|
86
|
+
|
|
87
|
+
/** Forced colours: roles map to system colours so boundaries and state stay visible. */
|
|
88
|
+
export const FORCED_COLORS_VARS: VarList = [
|
|
89
|
+
['--ty-bg', 'Canvas'],
|
|
90
|
+
['--ty-surface', 'Canvas'],
|
|
91
|
+
['--ty-surface-raised', 'Canvas'],
|
|
92
|
+
['--ty-surface-sunken', 'Canvas'],
|
|
93
|
+
['--ty-surface-solid', 'Canvas'],
|
|
94
|
+
['--ty-surface-raised-solid', 'Canvas'],
|
|
95
|
+
['--ty-secondary', 'ButtonFace'],
|
|
96
|
+
['--ty-on-secondary', 'ButtonText'],
|
|
97
|
+
['--ty-ink', 'CanvasText'],
|
|
98
|
+
['--ty-ink-2', 'CanvasText'],
|
|
99
|
+
['--ty-ink-3', 'CanvasText'],
|
|
100
|
+
['--ty-line', 'CanvasText'],
|
|
101
|
+
['--ty-line-soft', 'CanvasText'],
|
|
102
|
+
['--ty-line-strong', 'CanvasText'],
|
|
103
|
+
['--ty-input', 'CanvasText'],
|
|
104
|
+
['--ty-focus-ring', 'Highlight'],
|
|
105
|
+
['--ty-brand', 'Highlight'],
|
|
106
|
+
['--ty-accent', 'Highlight'],
|
|
107
|
+
['--ty-on-brand', 'HighlightText'],
|
|
108
|
+
['--ty-accent-ink', 'HighlightText'],
|
|
109
|
+
['--ty-brand-soft', 'Canvas'],
|
|
110
|
+
['--ty-accent-soft', 'Canvas'],
|
|
111
|
+
['--ty-on-brand-soft', 'LinkText'],
|
|
112
|
+
['--ty-on-accent-soft', 'LinkText'],
|
|
113
|
+
['--ty-cta', 'ButtonFace'],
|
|
114
|
+
['--ty-cta-solid', 'ButtonFace'],
|
|
115
|
+
['--ty-on-cta', 'ButtonText'],
|
|
116
|
+
['--ty-backdrop', 'transparent'],
|
|
117
|
+
['--ty-shadow-sheet', 'none'],
|
|
118
|
+
['--ty-shadow-raised', 'none'],
|
|
119
|
+
['--ty-shadow-floating', 'none'],
|
|
120
|
+
['--ty-shadow-modal', 'none'],
|
|
121
|
+
['--ty-glass-blur-sheet', '0px'],
|
|
122
|
+
['--ty-glass-blur-floating', '0px'],
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
/** Reduced transparency (and no backdrop-filter support): opaque surfaces, no blur, no ambient. */
|
|
126
|
+
export const OPAQUE_VARS: VarList = [
|
|
127
|
+
['--ty-surface', 'var(--ty-surface-solid) !important'],
|
|
128
|
+
['--ty-surface-raised', 'var(--ty-surface-raised-solid) !important'],
|
|
129
|
+
['--ty-secondary', 'var(--ty-surface-raised-solid) !important'],
|
|
130
|
+
['--ty-glass-blur-sheet', '0px !important'],
|
|
131
|
+
['--ty-glass-blur-floating', '0px !important'],
|
|
132
|
+
['--ty-glass-saturate', '1 !important'],
|
|
133
|
+
['--ty-ambient-1', 'transparent !important'],
|
|
134
|
+
['--ty-ambient-2', 'transparent !important'],
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
export function buildStylesheet(input: StylesheetInput): string {
|
|
138
|
+
const parts: string[] = []
|
|
139
|
+
const defaultTheme = input.defaultTheme === undefined ? DEFAULT_THEME : input.defaultTheme
|
|
140
|
+
if (input.base?.length) {
|
|
141
|
+
parts.push(rule([':root'], decls(input.base)))
|
|
142
|
+
parts.push(`/* per-script typography (:lang) */\n${scriptRules(input.base)}`)
|
|
143
|
+
// Reading direction as a number, for inline-axis translations that must mirror in RTL.
|
|
144
|
+
parts.push(`:root,\n[dir="ltr"] {\n --ty-inline-sign: 1;\n}\n\n[dir="rtl"] {\n --ty-inline-sign: -1;\n}`)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const densities = input.densities ?? {}
|
|
148
|
+
if (densities.default) parts.push(rule([':root', '[data-ty-density="default"]'], decls(densities.default)))
|
|
149
|
+
for (const d of ['compact', 'comfortable'] as const) {
|
|
150
|
+
const v = densities[d]
|
|
151
|
+
if (v) parts.push(rule([`[data-ty-density="${d}"]`], decls(v)))
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (input.components?.length) {
|
|
155
|
+
parts.push(`/* component tokens */\n${rule(ANY_SCOPE, decls(input.components))}`)
|
|
156
|
+
}
|
|
157
|
+
if (input.componentRules) parts.push(input.componentRules)
|
|
158
|
+
|
|
159
|
+
for (const theme of input.themes) {
|
|
160
|
+
parts.push(`/* theme: ${theme.name} */`)
|
|
161
|
+
parts.push(...themeBlocks(theme, theme.name === defaultTheme, theme.light, theme.dark))
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const high = input.themes.filter((t) => t.highLight && t.highDark)
|
|
165
|
+
if (high.length) {
|
|
166
|
+
const inner = high.flatMap((t) => themeBlocks(t, t.name === defaultTheme, t.highLight!, t.highDark!))
|
|
167
|
+
parts.push(`/* prefers-contrast: more -> the high-contrast variant of each theme */\n${media('(prefers-contrast: more)', inner.join('\n\n'))}`)
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (input.preferences !== false) {
|
|
171
|
+
const durations = (input.base ?? []).filter(([n]) => n.startsWith('--ty-dur-')).map(([n]) => [n, '0ms'] as [string, string])
|
|
172
|
+
if (durations.length) parts.push(media('(prefers-reduced-motion: reduce)', rule(ANY_SCOPE, decls(durations))))
|
|
173
|
+
parts.push(media('(prefers-reduced-transparency: reduce)', rule(ANY_SCOPE, decls(OPAQUE_VARS))))
|
|
174
|
+
parts.push(`@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n${indent(rule(ANY_SCOPE, decls(OPAQUE_VARS)))}\n}`)
|
|
175
|
+
parts.push(media('(forced-colors: active)', rule(ANY_SCOPE, decls(FORCED_COLORS_VARS))))
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const body = parts.join('\n\n')
|
|
179
|
+
const layered = input.layer === null ? body : `@layer ${input.layer ?? 'tympan.tokens'} {\n${indent(body)}\n}`
|
|
180
|
+
return `${input.banner ? `${input.banner}\n` : ''}${layered}\n`
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** Generator output for one theme config, as variable lists. */
|
|
184
|
+
export function themeVarsFor(config: ThemeConfig): ThemeVars {
|
|
185
|
+
const vars: ThemeVars = {
|
|
186
|
+
name: config.name,
|
|
187
|
+
light: themeVariables(resolveTheme(config, 'light')),
|
|
188
|
+
dark: themeVariables(resolveTheme(config, 'dark')),
|
|
189
|
+
}
|
|
190
|
+
if (config.contrast !== 'high') {
|
|
191
|
+
vars.highLight = themeVariables(resolveTheme(config, 'light', 'high'))
|
|
192
|
+
vars.highDark = themeVariables(resolveTheme(config, 'dark', 'high'))
|
|
193
|
+
}
|
|
194
|
+
return vars
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ThemeCssOptions {
|
|
198
|
+
/** Make this theme the `:root` default (for a standalone stylesheet). */
|
|
199
|
+
asDefault?: boolean
|
|
200
|
+
/** Include the density blocks. */
|
|
201
|
+
densities?: boolean
|
|
202
|
+
layer?: string | null
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** CSS for one theme config, straight from the generator (used by the customizer). */
|
|
206
|
+
export function generateThemeCss(config: ThemeConfig, options: ThemeCssOptions = {}): string {
|
|
207
|
+
return buildStylesheet({
|
|
208
|
+
themes: [themeVarsFor(config)],
|
|
209
|
+
defaultTheme: options.asDefault ? config.name : null,
|
|
210
|
+
densities: options.densities
|
|
211
|
+
? { default: densityVariables('default'), compact: densityVariables('compact'), comfortable: densityVariables('comfortable') }
|
|
212
|
+
: undefined,
|
|
213
|
+
layer: options.layer === undefined ? 'tympan.tokens' : options.layer,
|
|
214
|
+
})
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** Variable lists of every built-in preset. */
|
|
218
|
+
export function presetThemeVars(list: readonly ThemeConfig[] = builtInPresets): ThemeVars[] {
|
|
219
|
+
return list.map(themeVarsFor)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* The opt-in stylesheet of the print themes (`print-themes.css`): every
|
|
224
|
+
* listed theme scoped to its `data-ty-theme` attribute, with its high-contrast
|
|
225
|
+
* variant, and no user-preference blocks (the main token sheet has them).
|
|
226
|
+
* Load it after `tokens.css`.
|
|
227
|
+
*/
|
|
228
|
+
export function generatePrintThemesCss(list: readonly ThemeConfig[] = printThemePresets, options: { layer?: string | null; banner?: string; themes?: ThemeVars[] } = {}): string {
|
|
229
|
+
return buildStylesheet({
|
|
230
|
+
themes: options.themes ?? list.map(themeVarsFor),
|
|
231
|
+
defaultTheme: null,
|
|
232
|
+
layer: options.layer === undefined ? 'tympan.tokens' : options.layer,
|
|
233
|
+
preferences: false,
|
|
234
|
+
banner: options.banner,
|
|
235
|
+
})
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export { DENSITIES }
|