@wordpress/theme 0.2.1-next.dc3f6d3c1.0 → 0.3.1-next.6deb34194.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.
Files changed (58) hide show
  1. package/bin/terrazzo-plugin-inline-alias-values/index.ts +43 -14
  2. package/build/color-ramps/lib/default-ramps.js +65 -65
  3. package/build/color-ramps/lib/default-ramps.js.map +1 -1
  4. package/build/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  5. package/build/color-ramps/lib/index.js.map +2 -2
  6. package/build/color-ramps/lib/taper-chroma.js +18 -44
  7. package/build/color-ramps/lib/taper-chroma.js.map +2 -2
  8. package/build/prebuilt/js/design-tokens.js +20 -9
  9. package/build/prebuilt/js/design-tokens.js.map +2 -2
  10. package/build/prebuilt/json/figma.json +125 -37
  11. package/build/theme-provider.js +3 -1
  12. package/build/theme-provider.js.map +2 -2
  13. package/build/types.js.map +1 -1
  14. package/build-module/color-ramps/lib/default-ramps.js +65 -65
  15. package/build-module/color-ramps/lib/default-ramps.js.map +1 -1
  16. package/build-module/color-ramps/lib/find-color-with-constraints.js.map +2 -2
  17. package/build-module/color-ramps/lib/index.js.map +2 -2
  18. package/build-module/color-ramps/lib/taper-chroma.js +19 -46
  19. package/build-module/color-ramps/lib/taper-chroma.js.map +2 -2
  20. package/build-module/prebuilt/js/design-tokens.js +20 -9
  21. package/build-module/prebuilt/js/design-tokens.js.map +2 -2
  22. package/build-module/prebuilt/json/figma.json +125 -37
  23. package/build-module/theme-provider.js +3 -1
  24. package/build-module/theme-provider.js.map +2 -2
  25. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts +3 -4
  26. package/build-types/color-ramps/lib/find-color-with-constraints.d.ts.map +1 -1
  27. package/build-types/color-ramps/lib/taper-chroma.d.ts +4 -4
  28. package/build-types/color-ramps/lib/taper-chroma.d.ts.map +1 -1
  29. package/build-types/stories/index.story.d.ts +1 -0
  30. package/build-types/stories/index.story.d.ts.map +1 -1
  31. package/build-types/theme-provider.d.ts +1 -1
  32. package/build-types/theme-provider.d.ts.map +1 -1
  33. package/build-types/types.d.ts +8 -0
  34. package/build-types/types.d.ts.map +1 -1
  35. package/docs/ds-tokens.md +25 -14
  36. package/package.json +4 -4
  37. package/src/color-ramps/lib/default-ramps.ts +65 -65
  38. package/src/color-ramps/lib/find-color-with-constraints.ts +11 -7
  39. package/src/color-ramps/lib/index.ts +4 -4
  40. package/src/color-ramps/lib/taper-chroma.ts +32 -63
  41. package/src/prebuilt/css/design-tokens.css +84 -30
  42. package/src/prebuilt/js/design-tokens.js +20 -9
  43. package/src/prebuilt/json/figma.json +125 -37
  44. package/src/stories/index.story.tsx +23 -9
  45. package/src/theme-provider.tsx +2 -0
  46. package/src/types.ts +9 -0
  47. package/terrazzo.config.ts +21 -0
  48. package/tokens/border.json +43 -21
  49. package/tokens/color.json +65 -65
  50. package/tokens/dimension.json +106 -10
  51. package/tsconfig.bin.tsbuildinfo +1 -1
  52. package/tsconfig.src.json +1 -1
  53. package/tsconfig.src.tsbuildinfo +1 -1
  54. package/build/types/css-modules.d.js +0 -1
  55. package/build/types/css-modules.d.js.map +0 -7
  56. package/build-module/types/css-modules.d.js +0 -1
  57. package/build-module/types/css-modules.d.js.map +0 -7
  58. package/src/types/css-modules.d.ts +0 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/prebuilt/js/design-tokens.js"],
4
- "sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-x-small',\n\t'--wpds-border-radius-small',\n\t'--wpds-border-radius-medium',\n\t'--wpds-border-radius-large',\n\t'--wpds-border-width-focus',\n\t'--wpds-color-bg-surface-neutral',\n\t'--wpds-color-bg-surface-neutral-strong',\n\t'--wpds-color-bg-surface-neutral-weak',\n\t'--wpds-color-bg-surface-brand',\n\t'--wpds-color-bg-surface-success',\n\t'--wpds-color-bg-surface-success-weak',\n\t'--wpds-color-bg-surface-info',\n\t'--wpds-color-bg-surface-info-weak',\n\t'--wpds-color-bg-surface-warning',\n\t'--wpds-color-bg-surface-warning-weak',\n\t'--wpds-color-bg-surface-caution',\n\t'--wpds-color-bg-surface-caution-weak',\n\t'--wpds-color-bg-surface-error',\n\t'--wpds-color-bg-surface-error-weak',\n\t'--wpds-color-bg-interactive-neutral',\n\t'--wpds-color-bg-interactive-neutral-active',\n\t'--wpds-color-bg-interactive-neutral-disabled',\n\t'--wpds-color-bg-interactive-neutral-strong',\n\t'--wpds-color-bg-interactive-neutral-strong-active',\n\t'--wpds-color-bg-interactive-neutral-strong-disabled',\n\t'--wpds-color-bg-interactive-neutral-weak',\n\t'--wpds-color-bg-interactive-neutral-weak-active',\n\t'--wpds-color-bg-interactive-neutral-weak-disabled',\n\t'--wpds-color-bg-interactive-brand',\n\t'--wpds-color-bg-interactive-brand-active',\n\t'--wpds-color-bg-interactive-brand-disabled',\n\t'--wpds-color-bg-interactive-brand-strong',\n\t'--wpds-color-bg-interactive-brand-strong-active',\n\t'--wpds-color-bg-interactive-brand-strong-disabled',\n\t'--wpds-color-bg-interactive-brand-weak',\n\t'--wpds-color-bg-interactive-brand-weak-active',\n\t'--wpds-color-bg-interactive-brand-weak-disabled',\n\t'--wpds-color-bg-track-neutral-weak',\n\t'--wpds-color-bg-track-neutral',\n\t'--wpds-color-bg-thumb-neutral-weak',\n\t'--wpds-color-bg-thumb-neutral-weak-active',\n\t'--wpds-color-bg-thumb-brand',\n\t'--wpds-color-bg-thumb-brand-active',\n\t'--wpds-color-bg-thumb-brand-disabled',\n\t'--wpds-color-fg-content-neutral',\n\t'--wpds-color-fg-content-neutral-weak',\n\t'--wpds-color-fg-content-success',\n\t'--wpds-color-fg-content-success-weak',\n\t'--wpds-color-fg-content-info',\n\t'--wpds-color-fg-content-info-weak',\n\t'--wpds-color-fg-content-warning',\n\t'--wpds-color-fg-content-warning-weak',\n\t'--wpds-color-fg-content-caution',\n\t'--wpds-color-fg-content-caution-weak',\n\t'--wpds-color-fg-content-error',\n\t'--wpds-color-fg-content-error-weak',\n\t'--wpds-color-fg-interactive-neutral',\n\t'--wpds-color-fg-interactive-neutral-active',\n\t'--wpds-color-fg-interactive-neutral-disabled',\n\t'--wpds-color-fg-interactive-neutral-strong',\n\t'--wpds-color-fg-interactive-neutral-strong-active',\n\t'--wpds-color-fg-interactive-neutral-strong-disabled',\n\t'--wpds-color-fg-interactive-neutral-weak',\n\t'--wpds-color-fg-interactive-neutral-weak-disabled',\n\t'--wpds-color-fg-interactive-brand',\n\t'--wpds-color-fg-interactive-brand-active',\n\t'--wpds-color-fg-interactive-brand-disabled',\n\t'--wpds-color-fg-interactive-brand-strong',\n\t'--wpds-color-fg-interactive-brand-strong-active',\n\t'--wpds-color-fg-interactive-brand-strong-disabled',\n\t'--wpds-color-stroke-surface-neutral',\n\t'--wpds-color-stroke-surface-neutral-weak',\n\t'--wpds-color-stroke-surface-neutral-strong',\n\t'--wpds-color-stroke-surface-brand',\n\t'--wpds-color-stroke-surface-brand-strong',\n\t'--wpds-color-stroke-surface-success',\n\t'--wpds-color-stroke-surface-success-strong',\n\t'--wpds-color-stroke-surface-info',\n\t'--wpds-color-stroke-surface-info-strong',\n\t'--wpds-color-stroke-surface-warning',\n\t'--wpds-color-stroke-surface-warning-strong',\n\t'--wpds-color-stroke-surface-error',\n\t'--wpds-color-stroke-surface-error-strong',\n\t'--wpds-color-stroke-interactive-neutral',\n\t'--wpds-color-stroke-interactive-neutral-active',\n\t'--wpds-color-stroke-interactive-neutral-disabled',\n\t'--wpds-color-stroke-interactive-neutral-strong',\n\t'--wpds-color-stroke-interactive-brand',\n\t'--wpds-color-stroke-interactive-brand-active',\n\t'--wpds-color-stroke-interactive-brand-disabled',\n\t'--wpds-color-stroke-interactive-error-strong',\n\t'--wpds-color-stroke-focus-brand',\n\t'--wpds-dimension-base',\n\t'--wpds-dimension-padding-surface-x-small',\n\t'--wpds-dimension-padding-surface-small',\n\t'--wpds-dimension-padding-surface-medium',\n\t'--wpds-dimension-padding-surface-large',\n\t'--wpds-elevation-x-small',\n\t'--wpds-elevation-small',\n\t'--wpds-elevation-medium',\n\t'--wpds-elevation-large',\n\t'--wpds-font-family-heading',\n\t'--wpds-font-family-body',\n\t'--wpds-font-family-mono',\n\t'--wpds-font-size-x-small',\n\t'--wpds-font-size-small',\n\t'--wpds-font-size-medium',\n\t'--wpds-font-size-large',\n\t'--wpds-font-size-x-large',\n\t'--wpds-font-size-2x-large',\n\t'--wpds-font-line-height-x-small',\n\t'--wpds-font-line-height-small',\n\t'--wpds-font-line-height-medium',\n\t'--wpds-font-line-height-large',\n\t'--wpds-font-line-height-x-large',\n\t'--wpds-font-line-height-2x-large',\n];\n"],
5
- "mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
4
+ "sourcesContent": ["/**\n * This file is generated by the @terrazzo/plugin-known-wpds-css-variables plugin.\n * Do not edit this file directly.\n */\n\nexport default [\n\t'--wpds-border-radius-surface-xs',\n\t'--wpds-border-radius-surface-sm',\n\t'--wpds-border-radius-surface-md',\n\t'--wpds-border-radius-surface-lg',\n\t'--wpds-border-width-surface-xs',\n\t'--wpds-border-width-surface-sm',\n\t'--wpds-border-width-surface-md',\n\t'--wpds-border-width-surface-lg',\n\t'--wpds-border-width-interactive-focus',\n\t'--wpds-color-bg-surface-neutral',\n\t'--wpds-color-bg-surface-neutral-strong',\n\t'--wpds-color-bg-surface-neutral-weak',\n\t'--wpds-color-bg-surface-brand',\n\t'--wpds-color-bg-surface-success',\n\t'--wpds-color-bg-surface-success-weak',\n\t'--wpds-color-bg-surface-info',\n\t'--wpds-color-bg-surface-info-weak',\n\t'--wpds-color-bg-surface-warning',\n\t'--wpds-color-bg-surface-warning-weak',\n\t'--wpds-color-bg-surface-caution',\n\t'--wpds-color-bg-surface-caution-weak',\n\t'--wpds-color-bg-surface-error',\n\t'--wpds-color-bg-surface-error-weak',\n\t'--wpds-color-bg-interactive-neutral',\n\t'--wpds-color-bg-interactive-neutral-active',\n\t'--wpds-color-bg-interactive-neutral-disabled',\n\t'--wpds-color-bg-interactive-neutral-strong',\n\t'--wpds-color-bg-interactive-neutral-strong-active',\n\t'--wpds-color-bg-interactive-neutral-strong-disabled',\n\t'--wpds-color-bg-interactive-neutral-weak',\n\t'--wpds-color-bg-interactive-neutral-weak-active',\n\t'--wpds-color-bg-interactive-neutral-weak-disabled',\n\t'--wpds-color-bg-interactive-brand',\n\t'--wpds-color-bg-interactive-brand-active',\n\t'--wpds-color-bg-interactive-brand-disabled',\n\t'--wpds-color-bg-interactive-brand-strong',\n\t'--wpds-color-bg-interactive-brand-strong-active',\n\t'--wpds-color-bg-interactive-brand-strong-disabled',\n\t'--wpds-color-bg-interactive-brand-weak',\n\t'--wpds-color-bg-interactive-brand-weak-active',\n\t'--wpds-color-bg-interactive-brand-weak-disabled',\n\t'--wpds-color-bg-track-neutral-weak',\n\t'--wpds-color-bg-track-neutral',\n\t'--wpds-color-bg-thumb-neutral-weak',\n\t'--wpds-color-bg-thumb-neutral-weak-active',\n\t'--wpds-color-bg-thumb-brand',\n\t'--wpds-color-bg-thumb-brand-active',\n\t'--wpds-color-bg-thumb-brand-disabled',\n\t'--wpds-color-fg-content-neutral',\n\t'--wpds-color-fg-content-neutral-weak',\n\t'--wpds-color-fg-content-success',\n\t'--wpds-color-fg-content-success-weak',\n\t'--wpds-color-fg-content-info',\n\t'--wpds-color-fg-content-info-weak',\n\t'--wpds-color-fg-content-warning',\n\t'--wpds-color-fg-content-warning-weak',\n\t'--wpds-color-fg-content-caution',\n\t'--wpds-color-fg-content-caution-weak',\n\t'--wpds-color-fg-content-error',\n\t'--wpds-color-fg-content-error-weak',\n\t'--wpds-color-fg-interactive-neutral',\n\t'--wpds-color-fg-interactive-neutral-active',\n\t'--wpds-color-fg-interactive-neutral-disabled',\n\t'--wpds-color-fg-interactive-neutral-strong',\n\t'--wpds-color-fg-interactive-neutral-strong-active',\n\t'--wpds-color-fg-interactive-neutral-strong-disabled',\n\t'--wpds-color-fg-interactive-neutral-weak',\n\t'--wpds-color-fg-interactive-neutral-weak-disabled',\n\t'--wpds-color-fg-interactive-brand',\n\t'--wpds-color-fg-interactive-brand-active',\n\t'--wpds-color-fg-interactive-brand-disabled',\n\t'--wpds-color-fg-interactive-brand-strong',\n\t'--wpds-color-fg-interactive-brand-strong-active',\n\t'--wpds-color-fg-interactive-brand-strong-disabled',\n\t'--wpds-color-stroke-surface-neutral',\n\t'--wpds-color-stroke-surface-neutral-weak',\n\t'--wpds-color-stroke-surface-neutral-strong',\n\t'--wpds-color-stroke-surface-brand',\n\t'--wpds-color-stroke-surface-brand-strong',\n\t'--wpds-color-stroke-surface-success',\n\t'--wpds-color-stroke-surface-success-strong',\n\t'--wpds-color-stroke-surface-info',\n\t'--wpds-color-stroke-surface-info-strong',\n\t'--wpds-color-stroke-surface-warning',\n\t'--wpds-color-stroke-surface-warning-strong',\n\t'--wpds-color-stroke-surface-error',\n\t'--wpds-color-stroke-surface-error-strong',\n\t'--wpds-color-stroke-interactive-neutral',\n\t'--wpds-color-stroke-interactive-neutral-active',\n\t'--wpds-color-stroke-interactive-neutral-disabled',\n\t'--wpds-color-stroke-interactive-neutral-strong',\n\t'--wpds-color-stroke-interactive-brand',\n\t'--wpds-color-stroke-interactive-brand-active',\n\t'--wpds-color-stroke-interactive-brand-disabled',\n\t'--wpds-color-stroke-interactive-error-strong',\n\t'--wpds-color-stroke-focus-brand',\n\t'--wpds-dimension-base',\n\t'--wpds-dimension-padding-surface-2xs',\n\t'--wpds-dimension-padding-surface-xs',\n\t'--wpds-dimension-padding-surface-sm',\n\t'--wpds-dimension-padding-surface-md',\n\t'--wpds-dimension-padding-surface-lg',\n\t'--wpds-dimension-gap-2xs',\n\t'--wpds-dimension-gap-xs',\n\t'--wpds-dimension-gap-sm',\n\t'--wpds-dimension-gap-md',\n\t'--wpds-dimension-gap-lg',\n\t'--wpds-dimension-gap-xl',\n\t'--wpds-elevation-x-small',\n\t'--wpds-elevation-small',\n\t'--wpds-elevation-medium',\n\t'--wpds-elevation-large',\n\t'--wpds-font-family-heading',\n\t'--wpds-font-family-body',\n\t'--wpds-font-family-mono',\n\t'--wpds-font-size-x-small',\n\t'--wpds-font-size-small',\n\t'--wpds-font-size-medium',\n\t'--wpds-font-size-large',\n\t'--wpds-font-size-x-large',\n\t'--wpds-font-size-2x-large',\n\t'--wpds-font-line-height-x-small',\n\t'--wpds-font-line-height-small',\n\t'--wpds-font-line-height-medium',\n\t'--wpds-font-line-height-large',\n\t'--wpds-font-line-height-x-large',\n\t'--wpds-font-line-height-2x-large',\n];\n"],
5
+ "mappings": ";AAKA,IAAO,wBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,29 +1,53 @@
1
1
  {
2
- "Border/radius-x-small": {
2
+ "Border/radius-surface-xs": {
3
3
  "value": {
4
4
  ".": "1px"
5
5
  },
6
- "description": "Extra small radius"
6
+ "description": "Extra small radius for surfaces"
7
7
  },
8
- "Border/radius-small": {
8
+ "Border/radius-surface-sm": {
9
9
  "value": {
10
10
  ".": "2px"
11
11
  },
12
- "description": "Small radius"
12
+ "description": "Small radius for surfaces"
13
13
  },
14
- "Border/radius-medium": {
14
+ "Border/radius-surface-md": {
15
15
  "value": {
16
16
  ".": "4px"
17
17
  },
18
- "description": "Medium radius"
18
+ "description": "Medium radius for surfaces"
19
19
  },
20
- "Border/radius-large": {
20
+ "Border/radius-surface-lg": {
21
21
  "value": {
22
22
  ".": "8px"
23
23
  },
24
- "description": "Large radius"
24
+ "description": "Large radius for surfaces"
25
25
  },
26
- "Border/width-focus": {
26
+ "Border/width-surface-xs": {
27
+ "value": {
28
+ ".": "1px"
29
+ },
30
+ "description": "Extra small width for surfaces"
31
+ },
32
+ "Border/width-surface-sm": {
33
+ "value": {
34
+ ".": "2px"
35
+ },
36
+ "description": "Small width for surfaces"
37
+ },
38
+ "Border/width-surface-md": {
39
+ "value": {
40
+ ".": "4px"
41
+ },
42
+ "description": "Medium width for surfaces"
43
+ },
44
+ "Border/width-surface-lg": {
45
+ "value": {
46
+ ".": "8px"
47
+ },
48
+ "description": "Large width for surfaces"
49
+ },
50
+ "Border/width-interactive-focus": {
27
51
  "value": {
28
52
  ".": "2px",
29
53
  "high-dpi": "1.5px"
@@ -56,61 +80,61 @@
56
80
  },
57
81
  "Color/Semantic/Background/Success/bgSur-success": {
58
82
  "value": {
59
- ".": "#cbf5d1"
83
+ ".": "#c5f7cc"
60
84
  },
61
85
  "description": "Background color for surfaces with success tone and normal emphasis."
62
86
  },
63
87
  "Color/Semantic/Background/Success/bgSur-success-weak": {
64
88
  "value": {
65
- ".": "#f0fcf2"
89
+ ".": "#eaffed"
66
90
  },
67
91
  "description": "Background color for surfaces with success tone and weak emphasis."
68
92
  },
69
93
  "Color/Semantic/Background/Info/bgSur-info": {
70
94
  "value": {
71
- ".": "#dfebf8"
95
+ ".": "#deebfa"
72
96
  },
73
97
  "description": "Background color for surfaces with info tone and normal emphasis."
74
98
  },
75
99
  "Color/Semantic/Background/Info/bgSur-info-weak": {
76
100
  "value": {
77
- ".": "#f5f9fd"
101
+ ".": "#f3f9ff"
78
102
  },
79
103
  "description": "Background color for surfaces with info tone and weak emphasis."
80
104
  },
81
105
  "Color/Semantic/Background/Warning/bgSur-warning": {
82
106
  "value": {
83
- ".": "#f8e8cc"
107
+ ".": "#fde6bd"
84
108
  },
85
109
  "description": "Background color for surfaces with warning tone and normal emphasis."
86
110
  },
87
111
  "Color/Semantic/Background/Warning/bgSur-warning-weak": {
88
112
  "value": {
89
- ".": "#fdf7ee"
113
+ ".": "#fff7e0"
90
114
  },
91
115
  "description": "Background color for surfaces with warning tone and weak emphasis."
92
116
  },
93
117
  "Color/Semantic/Background/Caution/bgSur-caution": {
94
118
  "value": {
95
- ".": "#f7eab3"
119
+ ".": "#fee994"
96
120
  },
97
121
  "description": "Background color for surfaces with caution tone and normal emphasis."
98
122
  },
99
123
  "Color/Semantic/Background/Caution/bgSur-caution-weak": {
100
124
  "value": {
101
- ".": "#fdf9e7"
125
+ ".": "#fff9c9"
102
126
  },
103
127
  "description": "Background color for surfaces with caution tone and weak emphasis."
104
128
  },
105
129
  "Color/Semantic/Background/Error/bgSur-error": {
106
130
  "value": {
107
- ".": "#fae4e1"
131
+ ".": "#f6e6e3"
108
132
  },
109
133
  "description": "Background color for surfaces with error tone and normal emphasis."
110
134
  },
111
135
  "Color/Semantic/Background/Error/bgSur-error-weak": {
112
136
  "value": {
113
- ".": "#fdf6f5"
137
+ ".": "#fff6f4"
114
138
  },
115
139
  "description": "Background color for surfaces with error tone and weak emphasis."
116
140
  },
@@ -176,7 +200,7 @@
176
200
  },
177
201
  "Color/Semantic/Background/Brand/bgInt-brand-active": {
178
202
  "value": {
179
- ".": "#f6f8fc"
203
+ ".": "#f6f8fd"
180
204
  },
181
205
  "description": "Background color for interactive elements with brand tone and normal emphasis that are hovered, focused, or active."
182
206
  },
@@ -212,7 +236,7 @@
212
236
  },
213
237
  "Color/Semantic/Background/Brand/bgInt-brand-weak-active": {
214
238
  "value": {
215
- ".": "#e4eaf7"
239
+ ".": "#e6eaf4"
216
240
  },
217
241
  "description": "Background color for interactive elements with brand tone and weak emphasis that are hovered, focused, or active."
218
242
  },
@@ -308,7 +332,7 @@
308
332
  },
309
333
  "Color/Semantic/Foreground/Warning/fgCon-warning-weak": {
310
334
  "value": {
311
- ".": "#936400"
335
+ ".": "#926300"
312
336
  },
313
337
  "description": "Foreground color for content like text with warning tone and weak emphasis."
314
338
  },
@@ -320,7 +344,7 @@
320
344
  },
321
345
  "Color/Semantic/Foreground/Caution/fgCon-caution-weak": {
322
346
  "value": {
323
- ".": "#836b00"
347
+ ".": "#826a00"
324
348
  },
325
349
  "description": "Foreground color for content like text with caution tone and weak emphasis."
326
350
  },
@@ -440,7 +464,7 @@
440
464
  },
441
465
  "Color/Semantic/Stroke/Brand/strokeSur-brand": {
442
466
  "value": {
443
- ".": "#a2b1d6"
467
+ ".": "#a3b1d4"
444
468
  },
445
469
  "description": "Decorative stroke color used to define brand-toned surface boundaries with normal emphasis."
446
470
  },
@@ -452,7 +476,7 @@
452
476
  },
453
477
  "Color/Semantic/Stroke/Success/strokeSur-success": {
454
478
  "value": {
455
- ".": "#82c98f"
479
+ ".": "#8ac894"
456
480
  },
457
481
  "description": "Decorative stroke color used to define success-toned surface boundaries with normal emphasis."
458
482
  },
@@ -464,7 +488,7 @@
464
488
  },
465
489
  "Color/Semantic/Stroke/Info/strokeSur-info": {
466
490
  "value": {
467
- ".": "#9fbcdd"
491
+ ".": "#9fbcdc"
468
492
  },
469
493
  "description": "Decorative stroke color used to define info-toned surface boundaries with normal emphasis."
470
494
  },
@@ -476,19 +500,19 @@
476
500
  },
477
501
  "Color/Semantic/Stroke/Warning/strokeSur-warning": {
478
502
  "value": {
479
- ".": "#d2b581"
503
+ ".": "#d0b381"
480
504
  },
481
505
  "description": "Decorative stroke color used to define warning-toned surface boundaries with normal emphasis."
482
506
  },
483
507
  "Color/Semantic/Stroke/Warning/strokeSur-warning-strong": {
484
508
  "value": {
485
- ".": "#936400"
509
+ ".": "#926300"
486
510
  },
487
511
  "description": "Decorative stroke color used to define warning-toned surface boundaries with strong emphasis."
488
512
  },
489
513
  "Color/Semantic/Stroke/Error/strokeSur-error": {
490
514
  "value": {
491
- ".": "#e1a198"
515
+ ".": "#daa39b"
492
516
  },
493
517
  "description": "Decorative stroke color used to define error-toned surface boundaries with normal emphasis."
494
518
  },
@@ -558,30 +582,94 @@
558
582
  },
559
583
  "description": "Base dimension unit"
560
584
  },
561
- "Dimension/Semantic/padding-surface-x-small": {
585
+ "Dimension/Semantic/padding-surface-2xs": {
562
586
  "value": {
563
- ".": "8px"
587
+ ".": "4px",
588
+ "compact": "4px",
589
+ "comfortable": "8px"
590
+ },
591
+ "description": "2x extra small spacing for surfaces"
592
+ },
593
+ "Dimension/Semantic/padding-surface-xs": {
594
+ "value": {
595
+ ".": "8px",
596
+ "compact": "4px",
597
+ "comfortable": "12px"
564
598
  },
565
599
  "description": "Extra small spacing for surfaces"
566
600
  },
567
- "Dimension/Semantic/padding-surface-small": {
601
+ "Dimension/Semantic/padding-surface-sm": {
568
602
  "value": {
569
- ".": "12px"
603
+ ".": "16px",
604
+ "compact": "12px",
605
+ "comfortable": "20px"
570
606
  },
571
607
  "description": "Small spacing for surfaces"
572
608
  },
573
- "Dimension/Semantic/padding-surface-medium": {
609
+ "Dimension/Semantic/padding-surface-md": {
574
610
  "value": {
575
- ".": "16px"
611
+ ".": "24px",
612
+ "compact": "20px",
613
+ "comfortable": "32px"
576
614
  },
577
615
  "description": "Medium spacing for surfaces"
578
616
  },
579
- "Dimension/Semantic/padding-surface-large": {
617
+ "Dimension/Semantic/padding-surface-lg": {
580
618
  "value": {
581
- ".": "24px"
619
+ ".": "32px",
620
+ "compact": "24px",
621
+ "comfortable": "40px"
582
622
  },
583
623
  "description": "Large spacing for surfaces"
584
624
  },
625
+ "Dimension/Semantic/gap-2xs": {
626
+ "value": {
627
+ ".": "4px",
628
+ "compact": "4px",
629
+ "comfortable": "8px"
630
+ },
631
+ "description": "2x extra small gap"
632
+ },
633
+ "Dimension/Semantic/gap-xs": {
634
+ "value": {
635
+ ".": "8px",
636
+ "compact": "4px",
637
+ "comfortable": "12px"
638
+ },
639
+ "description": "Extra small gap"
640
+ },
641
+ "Dimension/Semantic/gap-sm": {
642
+ "value": {
643
+ ".": "12px",
644
+ "compact": "8px",
645
+ "comfortable": "16px"
646
+ },
647
+ "description": "Small gap"
648
+ },
649
+ "Dimension/Semantic/gap-md": {
650
+ "value": {
651
+ ".": "16px",
652
+ "compact": "12px",
653
+ "comfortable": "20px"
654
+ },
655
+ "description": "Medium gap"
656
+ },
657
+ "Dimension/Semantic/gap-lg": {
658
+ "value": {
659
+ ".": "24px",
660
+ "compact": "20px",
661
+ "comfortable": "32px"
662
+ },
663
+ "description": "Large gap"
664
+ },
665
+ "Dimension/Semantic/gap-xl": {
666
+ "value": {
667
+ ".": "40px",
668
+ "compact": "32px",
669
+ "comfortable": "48px"
670
+ },
671
+ "description": "Extra large gap"
672
+ },
585
673
  "Elevation/x-small": {
586
674
  "value": {
587
675
  ".": "0 1px 1px 0 color(srgb 0 0 0 / 0.03), 0 1px 2px 0 color(srgb 0 0 0 / 0.02), 0 3px 3px 0 color(srgb 0 0 0 / 0.02), 0 4px 4px 0 color(srgb 0 0 0 / 0.01)"
@@ -36,7 +36,8 @@ function generateCSSSelector({
36
36
  var ThemeProvider = ({
37
37
  children,
38
38
  color = {},
39
- isRoot = false
39
+ isRoot = false,
40
+ density
40
41
  }) => {
41
42
  const instanceId = useId();
42
43
  const { themeProviderStyles, resolvedSettings } = useThemeProviderStyles({
@@ -58,6 +59,7 @@ var ThemeProvider = ({
58
59
  {
59
60
  "data-wpds-theme-provider-id": instanceId,
60
61
  "data-wpds-root-provider": isRoot,
62
+ "data-wpds-density": density,
61
63
  className: style_default.root,
62
64
  children: /* @__PURE__ */ jsx(ThemeContext.Provider, { value: contextValue, children })
63
65
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/theme-provider.tsx", "../src/style.module.css"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useId } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ThemeContext } from './context';\nimport { useThemeProviderStyles } from './use-theme-provider-styles';\nimport { type ThemeProviderProps } from './types';\nimport styles from './style.module.css';\n\nfunction cssObjectToText( values: CSSProperties ) {\n\treturn Object.entries( values )\n\t\t.map( ( [ key, value ] ) => `${ key }: ${ value };` )\n\t\t.join( '' );\n}\n\nfunction generateCSSSelector( {\n\tinstanceId,\n\tisRoot,\n}: {\n\tinstanceId: string;\n\tisRoot: boolean;\n} ) {\n\tconst rootSel = `[data-wpds-root-provider=\"true\"]`;\n\tconst instanceIdSel = `[data-wpds-theme-provider-id=\"${ instanceId }\"]`;\n\n\tconst selectors = [];\n\n\tif ( isRoot ) {\n\t\tselectors.push(\n\t\t\t`:root:has(.${ styles.root }${ rootSel }${ instanceIdSel })`\n\t\t);\n\t}\n\n\tselectors.push( `.${ styles.root }.${ styles.root }${ instanceIdSel }` );\n\n\treturn selectors.join( ',' );\n}\n\nexport const ThemeProvider = ( {\n\tchildren,\n\tcolor = {},\n\tisRoot = false,\n}: ThemeProviderProps ) => {\n\tconst instanceId = useId();\n\n\tconst { themeProviderStyles, resolvedSettings } = useThemeProviderStyles( {\n\t\tcolor,\n\t} );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tresolvedSettings,\n\t\t} ),\n\t\t[ resolvedSettings ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ themeProviderStyles ? (\n\t\t\t\t<style>\n\t\t\t\t\t{ `${ generateCSSSelector( {\n\t\t\t\t\t\tinstanceId,\n\t\t\t\t\t\tisRoot,\n\t\t\t\t\t} ) } {${ cssObjectToText( themeProviderStyles ) }}` }\n\t\t\t\t</style>\n\t\t\t) : null }\n\t\t\t<div\n\t\t\t\tdata-wpds-theme-provider-id={ instanceId }\n\t\t\t\tdata-wpds-root-provider={ isRoot }\n\t\t\t\tclassName={ styles.root }\n\t\t\t>\n\t\t\t\t<ThemeContext.Provider value={ contextValue }>\n\t\t\t\t\t{ children }\n\t\t\t\t</ThemeContext.Provider>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n", "const css = `.style-module__root__26kw6 {\n\tdisplay: contents;\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"root\": \"style-module__root__26kw6\"\n};"],
5
- "mappings": ";AAQA,SAAS,SAAS,aAAa;AAK/B,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;;;ACdvC,IAAM,MAAM;AAAA;AAAA;AAAA;AAIZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,QAAQ;AACV;;;ADwDE,mBAEE,KAFF;AAhDF,SAAS,gBAAiB,QAAwB;AACjD,SAAO,OAAO,QAAS,MAAO,EAC5B,IAAK,CAAE,CAAE,KAAK,KAAM,MAAO,GAAI,GAAI,KAAM,KAAM,GAAI,EACnD,KAAM,EAAG;AACZ;AAEA,SAAS,oBAAqB;AAAA,EAC7B;AAAA,EACA;AACD,GAGI;AACH,QAAM,UAAU;AAChB,QAAM,gBAAgB,iCAAkC,UAAW;AAEnE,QAAM,YAAY,CAAC;AAEnB,MAAK,QAAS;AACb,cAAU;AAAA,MACT,cAAe,cAAO,IAAK,GAAI,OAAQ,GAAI,aAAc;AAAA,IAC1D;AAAA,EACD;AAEA,YAAU,KAAM,IAAK,cAAO,IAAK,IAAK,cAAO,IAAK,GAAI,aAAc,EAAG;AAEvE,SAAO,UAAU,KAAM,GAAI;AAC5B;AAEO,IAAM,gBAAgB,CAAE;AAAA,EAC9B;AAAA,EACA,QAAQ,CAAC;AAAA,EACT,SAAS;AACV,MAA2B;AAC1B,QAAM,aAAa,MAAM;AAEzB,QAAM,EAAE,qBAAqB,iBAAiB,IAAI,uBAAwB;AAAA,IACzE;AAAA,EACD,CAAE;AAEF,QAAM,eAAe;AAAA,IACpB,OAAQ;AAAA,MACP;AAAA,IACD;AAAA,IACA,CAAE,gBAAiB;AAAA,EACpB;AAEA,SACC,iCACG;AAAA,0BACD,oBAAC,WACE,aAAI,oBAAqB;AAAA,MAC1B;AAAA,MACA;AAAA,IACD,CAAE,CAAE,KAAM,gBAAiB,mBAAoB,CAAE,KAClD,IACG;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACA,+BAA8B;AAAA,QAC9B,2BAA0B;AAAA,QAC1B,WAAY,cAAO;AAAA,QAEnB,8BAAC,aAAa,UAAb,EAAsB,OAAQ,cAC5B,UACH;AAAA;AAAA,IACD;AAAA,KACD;AAEF;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport type { CSSProperties } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useId } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ThemeContext } from './context';\nimport { useThemeProviderStyles } from './use-theme-provider-styles';\nimport { type ThemeProviderProps } from './types';\nimport styles from './style.module.css';\n\nfunction cssObjectToText( values: CSSProperties ) {\n\treturn Object.entries( values )\n\t\t.map( ( [ key, value ] ) => `${ key }: ${ value };` )\n\t\t.join( '' );\n}\n\nfunction generateCSSSelector( {\n\tinstanceId,\n\tisRoot,\n}: {\n\tinstanceId: string;\n\tisRoot: boolean;\n} ) {\n\tconst rootSel = `[data-wpds-root-provider=\"true\"]`;\n\tconst instanceIdSel = `[data-wpds-theme-provider-id=\"${ instanceId }\"]`;\n\n\tconst selectors = [];\n\n\tif ( isRoot ) {\n\t\tselectors.push(\n\t\t\t`:root:has(.${ styles.root }${ rootSel }${ instanceIdSel })`\n\t\t);\n\t}\n\n\tselectors.push( `.${ styles.root }.${ styles.root }${ instanceIdSel }` );\n\n\treturn selectors.join( ',' );\n}\n\nexport const ThemeProvider = ( {\n\tchildren,\n\tcolor = {},\n\tisRoot = false,\n\tdensity,\n}: ThemeProviderProps ) => {\n\tconst instanceId = useId();\n\n\tconst { themeProviderStyles, resolvedSettings } = useThemeProviderStyles( {\n\t\tcolor,\n\t} );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tresolvedSettings,\n\t\t} ),\n\t\t[ resolvedSettings ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ themeProviderStyles ? (\n\t\t\t\t<style>\n\t\t\t\t\t{ `${ generateCSSSelector( {\n\t\t\t\t\t\tinstanceId,\n\t\t\t\t\t\tisRoot,\n\t\t\t\t\t} ) } {${ cssObjectToText( themeProviderStyles ) }}` }\n\t\t\t\t</style>\n\t\t\t) : null }\n\t\t\t<div\n\t\t\t\tdata-wpds-theme-provider-id={ instanceId }\n\t\t\t\tdata-wpds-root-provider={ isRoot }\n\t\t\t\tdata-wpds-density={ density }\n\t\t\t\tclassName={ styles.root }\n\t\t\t>\n\t\t\t\t<ThemeContext.Provider value={ contextValue }>\n\t\t\t\t\t{ children }\n\t\t\t\t</ThemeContext.Provider>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n", "const css = `.style-module__root__26kw6 {\n\tdisplay: contents;\n}\n`;\ndocument.head\n .appendChild(document.createElement(\"style\"))\n .appendChild(document.createTextNode(css));\nexport {css};\nexport default {\n \"root\": \"style-module__root__26kw6\"\n};"],
5
+ "mappings": ";AAQA,SAAS,SAAS,aAAa;AAK/B,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;;;ACdvC,IAAM,MAAM;AAAA;AAAA;AAAA;AAIZ,SAAS,KACJ,YAAY,SAAS,cAAc,OAAO,CAAC,EAC3C,YAAY,SAAS,eAAe,GAAG,CAAC;AAE7C,IAAO,gBAAQ;AAAA,EACb,QAAQ;AACV;;;ADyDE,mBAEE,KAFF;AAjDF,SAAS,gBAAiB,QAAwB;AACjD,SAAO,OAAO,QAAS,MAAO,EAC5B,IAAK,CAAE,CAAE,KAAK,KAAM,MAAO,GAAI,GAAI,KAAM,KAAM,GAAI,EACnD,KAAM,EAAG;AACZ;AAEA,SAAS,oBAAqB;AAAA,EAC7B;AAAA,EACA;AACD,GAGI;AACH,QAAM,UAAU;AAChB,QAAM,gBAAgB,iCAAkC,UAAW;AAEnE,QAAM,YAAY,CAAC;AAEnB,MAAK,QAAS;AACb,cAAU;AAAA,MACT,cAAe,cAAO,IAAK,GAAI,OAAQ,GAAI,aAAc;AAAA,IAC1D;AAAA,EACD;AAEA,YAAU,KAAM,IAAK,cAAO,IAAK,IAAK,cAAO,IAAK,GAAI,aAAc,EAAG;AAEvE,SAAO,UAAU,KAAM,GAAI;AAC5B;AAEO,IAAM,gBAAgB,CAAE;AAAA,EAC9B;AAAA,EACA,QAAQ,CAAC;AAAA,EACT,SAAS;AAAA,EACT;AACD,MAA2B;AAC1B,QAAM,aAAa,MAAM;AAEzB,QAAM,EAAE,qBAAqB,iBAAiB,IAAI,uBAAwB;AAAA,IACzE;AAAA,EACD,CAAE;AAEF,QAAM,eAAe;AAAA,IACpB,OAAQ;AAAA,MACP;AAAA,IACD;AAAA,IACA,CAAE,gBAAiB;AAAA,EACpB;AAEA,SACC,iCACG;AAAA,0BACD,oBAAC,WACE,aAAI,oBAAqB;AAAA,MAC1B;AAAA,MACA;AAAA,IACD,CAAE,CAAE,KAAM,gBAAiB,mBAAoB,CAAE,KAClD,IACG;AAAA,IACJ;AAAA,MAAC;AAAA;AAAA,QACA,+BAA8B;AAAA,QAC9B,2BAA0B;AAAA,QAC1B,qBAAoB;AAAA,QACpB,WAAY,cAAO;AAAA,QAEnB,8BAAC,aAAa,UAAb,EAAsB,OAAQ,cAC5B,UACH;AAAA;AAAA,IACD;AAAA,KACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { type ColorTypes } from 'colorjs.io/fn';
4
+ import { type PlainColorObject } from 'colorjs.io/fn';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
@@ -12,7 +12,6 @@ import { type TaperChromaOptions } from './taper-chroma';
12
12
  * - the L applied to the seed meets the contrast target against the reference
13
13
  * - the search is performed in one direction (ie lighter / darker)
14
14
  * - more constraints can be applied around lightness
15
- * - chroma could be tapered
16
15
  * @param reference
17
16
  * @param seed
18
17
  * @param target
@@ -23,14 +22,14 @@ import { type TaperChromaOptions } from './taper-chroma';
23
22
  * @param options.lightnessConstraint.value
24
23
  * @param options.taperChromaOptions
25
24
  */
26
- export declare function findColorMeetingRequirements(reference: ColorTypes, seed: ColorTypes, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
25
+ export declare function findColorMeetingRequirements(reference: PlainColorObject, seed: PlainColorObject, target: number, direction: 'lighter' | 'darker', { lightnessConstraint, taperChromaOptions, }?: {
27
26
  lightnessConstraint?: {
28
27
  type: 'force' | 'onlyIfSucceeds';
29
28
  value: number;
30
29
  };
31
30
  taperChromaOptions?: TaperChromaOptions;
32
31
  }): {
33
- color: ColorTypes;
32
+ color: PlainColorObject;
34
33
  reached: boolean;
35
34
  achieved: number;
36
35
  deficit?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE5D;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,UAAU,EACrB,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAoG7E"}
1
+ {"version":3,"file":"find-color-with-constraints.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/find-color-with-constraints.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAElE;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,gBAAgB,CAAC;AAatE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,gBAAgB,EAC3B,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,GAAG,QAAQ,EAC/B,EACC,mBAAmB,EACnB,kBAAkB,GAClB,GAAE;IACF,mBAAmB,CAAC,EAAE;QACrB,IAAI,EAAE,OAAO,GAAG,gBAAgB,CAAC;QACjC,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACnC,GACJ;IACF,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAoGA"}
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { type ColorTypes, type ColorObject } from 'colorjs.io/fn';
4
+ import { type PlainColorObject, type ColorSpace } from 'colorjs.io/fn';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
8
  import './register-color-spaces';
9
9
  export interface TaperChromaOptions {
10
- gamut?: 'p3' | 'srgb';
10
+ gamut?: ColorSpace;
11
11
  alpha?: number;
12
12
  carry?: number;
13
13
  cUpperBound?: number;
@@ -27,10 +27,10 @@ export interface TaperChromaOptions {
27
27
  * @param lTarget
28
28
  * @param options
29
29
  */
30
- export declare function taperChroma(seed: ColorTypes, // already OKLCH
30
+ export declare function taperChroma(seed: PlainColorObject, // already OKLCH
31
31
  lTarget: number, // [0..1]
32
32
  options?: TaperChromaOptions): {
33
33
  l: number;
34
34
  c: number;
35
- } | ColorObject;
35
+ } | PlainColorObject;
36
36
  //# sourceMappingURL=taper-chroma.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAMN,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,UAAU,EAAE,gBAAgB;AAClC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CA8ExC"}
1
+ {"version":3,"file":"taper-chroma.d.ts","sourceRoot":"","sources":["../../../src/color-ramps/lib/taper-chroma.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAKN,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,OAAO,yBAAyB,CAAC;AAEjC,MAAM,WAAW,kBAAkB;IAClC,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAC1B,IAAI,EAAE,gBAAgB,EAAE,gBAAgB;AACxC,OAAO,EAAE,MAAM,EAAE,SAAS;AAC1B,OAAO,GAAE,kBAAuB,GAC9B;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,gBAAgB,CA+D7C"}
@@ -6,6 +6,7 @@ import type { Meta, StoryObj } from '@storybook/react';
6
6
  * Internal dependencies
7
7
  */
8
8
  import { ThemeProvider } from '../theme-provider';
9
+ import '../prebuilt/css/design-tokens.css';
9
10
  declare const meta: Meta<typeof ThemeProvider>;
10
11
  export default meta;
11
12
  export declare const Default: StoryObj<typeof ThemeProvider>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAgBrC,CAAC;AACF,eAAe,IAAI,CAAC;AA2GpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,aAAa,CAInD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAE,OAAO,aAAa,CA+CtD,CAAC;AA6CF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,aAAa,CAiDhE,CAAC;AA0EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAE,OAAO,aAAa,CA6CzD,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../src/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAavD;;GAEG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,mCAAmC,CAAC;AAE3C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAgBrC,CAAC;AACF,eAAe,IAAI,CAAC;AA2GpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,aAAa,CAInD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAE,OAAO,aAAa,CA+CtD,CAAC;AA6CF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,aAAa,CA8DhE,CAAC;AA0EF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAE,OAAO,aAAa,CA6CzD,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type ThemeProviderProps } from './types';
2
- export declare const ThemeProvider: ({ children, color, isRoot, }: ThemeProviderProps) => import("react").JSX.Element;
2
+ export declare const ThemeProvider: ({ children, color, isRoot, density, }: ThemeProviderProps) => import("react").JSX.Element;
3
3
  //# sourceMappingURL=theme-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../src/theme-provider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAgClD,eAAO,MAAM,aAAa,GAAK,8BAI5B,kBAAkB,gCAmCpB,CAAC"}
1
+ {"version":3,"file":"theme-provider.d.ts","sourceRoot":"","sources":["../src/theme-provider.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAgClD,eAAO,MAAM,aAAa,GAAK,uCAK5B,kBAAkB,gCAoCpB,CAAC"}
@@ -22,6 +22,14 @@ export interface ThemeProviderSettings {
22
22
  */
23
23
  bg?: string;
24
24
  };
25
+ /**
26
+ * The density of the theme. If left unspecified, the theme inherits from
27
+ * the density of the closest `ThemeProvider`, or uses the default density
28
+ * if there is no inherited density.
29
+ *
30
+ * @default undefined
31
+ */
32
+ density?: undefined | 'default' | 'compact' | 'comfortable';
25
33
  }
26
34
  export interface ThemeProviderProps extends ThemeProviderSettings {
27
35
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE;QACP;;;;;WAKG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;;;;WAKG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;CACF;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAChE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE;QACP;;;;;WAKG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;;;;WAKG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;IAEF;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;CAC5D;AAED,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAChE;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
package/docs/ds-tokens.md CHANGED
@@ -9,13 +9,17 @@ Do not edit directly.
9
9
 
10
10
  ### Border
11
11
 
12
- | Variable name | Description |
13
- | ------------------------------ | --------------------------- |
14
- | `--wpds-border-radius-x-small` | Extra small radius |
15
- | `--wpds-border-radius-small` | Small radius |
16
- | `--wpds-border-radius-medium` | Medium radius |
17
- | `--wpds-border-radius-large` | Large radius |
18
- | `--wpds-border-width-focus` | Border width for focus ring |
12
+ | Variable name | Description |
13
+ | --------------------------------------- | ------------------------------- |
14
+ | `--wpds-border-radius-surface-xs` | Extra small radius for surfaces |
15
+ | `--wpds-border-radius-surface-sm` | Small radius for surfaces |
16
+ | `--wpds-border-radius-surface-md` | Medium radius for surfaces |
17
+ | `--wpds-border-radius-surface-lg` | Large radius for surfaces |
18
+ | `--wpds-border-width-surface-xs` | Extra small width for surfaces |
19
+ | `--wpds-border-width-surface-sm` | Small width for surfaces |
20
+ | `--wpds-border-width-surface-md` | Medium width for surfaces |
21
+ | `--wpds-border-width-surface-lg` | Large width for surfaces |
22
+ | `--wpds-border-width-interactive-focus` | Border width for focus ring |
19
23
 
20
24
  ### Color
21
25
 
@@ -111,13 +115,20 @@ Do not edit directly.
111
115
 
112
116
  ### Dimension
113
117
 
114
- | Variable name | Description |
115
- | ------------------------------------------ | -------------------------------- |
116
- | `--wpds-dimension-base` | Base dimension unit |
117
- | `--wpds-dimension-padding-surface-x-small` | Extra small spacing for surfaces |
118
- | `--wpds-dimension-padding-surface-small` | Small spacing for surfaces |
119
- | `--wpds-dimension-padding-surface-medium` | Medium spacing for surfaces |
120
- | `--wpds-dimension-padding-surface-large` | Large spacing for surfaces |
118
+ | Variable name | Description |
119
+ | -------------------------------------- | ----------------------------------- |
120
+ | `--wpds-dimension-base` | Base dimension unit |
121
+ | `--wpds-dimension-padding-surface-2xs` | 2x extra small spacing for surfaces |
122
+ | `--wpds-dimension-padding-surface-xs` | Extra small spacing for surfaces |
123
+ | `--wpds-dimension-padding-surface-sm` | Small spacing for surfaces |
124
+ | `--wpds-dimension-padding-surface-md` | Medium spacing for surfaces |
125
+ | `--wpds-dimension-padding-surface-lg` | Large spacing for surfaces |
126
+ | `--wpds-dimension-gap-2xs` | 2x extra small gap |
127
+ | `--wpds-dimension-gap-xs` | Extra small gap |
128
+ | `--wpds-dimension-gap-sm` | Small gap |
129
+ | `--wpds-dimension-gap-md` | Medium gap |
130
+ | `--wpds-dimension-gap-lg` | Large gap |
131
+ | `--wpds-dimension-gap-xl` | Extra large gap |
121
132
 
122
133
  ### Elevation
123
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/theme",
3
- "version": "0.2.1-next.dc3f6d3c1.0",
3
+ "version": "0.3.1-next.6deb34194.0",
4
4
  "description": "Theme and context provider for the WordPress Design System.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -43,8 +43,8 @@
43
43
  "build-module/color-ramps/lib/register-color-spaces.js"
44
44
  ],
45
45
  "dependencies": {
46
- "@wordpress/element": "^6.35.1-next.dc3f6d3c1.0",
47
- "@wordpress/private-apis": "^1.35.1-next.dc3f6d3c1.0",
46
+ "@wordpress/element": "^6.36.1-next.6deb34194.0",
47
+ "@wordpress/private-apis": "^1.36.1-next.6deb34194.0",
48
48
  "colorjs.io": "^0.5.2",
49
49
  "memize": "^2.1.0"
50
50
  },
@@ -64,5 +64,5 @@
64
64
  "build": "npm run build:tokens && npm run build:default-ramps",
65
65
  "postbuild": "prettier --write tokens/color.json src/prebuilt src/color-ramps/lib/default-ramps.ts docs"
66
66
  },
67
- "gitHead": "f73b5e69b34fbaccfb8c47783f4f993059ff1a41"
67
+ "gitHead": "457096e9e9b3896d2d4fe54fc19d7fb571ee9a44"
68
68
  }