@terrahq/design-system 0.8.0 → 0.10.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 (32) hide show
  1. package/README.md +5 -4
  2. package/bin/terra-ds.mjs +0 -4
  3. package/dist/icons.css +1 -0
  4. package/dist/style.css +1 -1
  5. package/package.json +1 -1
  6. package/src/scss/framework/_var/_vars.scss +14 -15
  7. package/src/scss/framework/components/btn.scss +1 -0
  8. package/src/scss/framework/foundation/font/_make-font.scss +12 -12
  9. package/src/scss/framework/foundation/gap/_make-gap.scss +10 -10
  10. package/src/scss/framework/foundation/grid/_columns.scss +51 -10
  11. package/src/scss/framework/foundation/grid/_container.scss +0 -7
  12. package/src/scss/framework/foundation/grid/_make-container.scss +3 -3
  13. package/src/scss/framework/foundation/section/_make-section.scss +18 -18
  14. package/src/scss/framework/foundation/spaces/_make-spaces.scss +10 -10
  15. package/src/scss/framework/utilities/_align-items.scss +5 -5
  16. package/src/scss/framework/utilities/_aspect-ratio.scss +5 -5
  17. package/src/scss/framework/utilities/_display.scss +6 -5
  18. package/src/scss/framework/utilities/_flex-direction.scss +5 -5
  19. package/src/scss/framework/utilities/_font-style.scss +5 -5
  20. package/src/scss/framework/utilities/_font-weight.scss +5 -5
  21. package/src/scss/framework/utilities/_height.scss +5 -5
  22. package/src/scss/framework/utilities/_justify-content.scss +5 -5
  23. package/src/scss/framework/utilities/_order.scss +5 -5
  24. package/src/scss/framework/utilities/_overflow.scss +6 -5
  25. package/src/scss/framework/utilities/_position.scss +5 -5
  26. package/src/scss/framework/utilities/_spacing.scss +26 -26
  27. package/src/scss/framework/utilities/_states.scss +0 -7
  28. package/src/scss/framework/utilities/_text-align.scss +7 -7
  29. package/src/scss/framework/utilities/_text-transform.scss +47 -0
  30. package/src/scss/framework/utilities/_utilities.scss +1 -0
  31. package/src/scss/framework/utilities/_width.scss +5 -5
  32. package/terra.config.example.js +1 -2
package/README.md CHANGED
@@ -98,7 +98,7 @@ import '@terrahq/design-system/terraforms.css'
98
98
  <i class="c--terraform-a c--terraform-a--forma f--color-d"></i>
99
99
  ```
100
100
 
101
- Icons: `arrow-right`, `arrow-left`, `check`, `close`, `plus`, `search`, `chevron-down`, `external`, `download`, `copy`, `mail`, `info`, `menu`, `trash` (an initial set). Terraforms: `forma`, `diana`, `stanley`, `mistyk`, `melos`, `prismo`, `mendia`, `boba`, `ebb`, `gollum`, `punky`, `infinito`.
101
+ Icons: `arrow-right`, `arrow-left`, `check`, `close`, `plus`, `search`, `chevron-down`, `external`, `download`, `copy`, `mail`, `info`, `menu`, `trash`, `pencil` (an initial set). Terraforms: `forma`, `diana`, `stanley`, `mistyk`, `melos`, `prismo`, `mendia`, `boba`, `ebb`, `gollum`, `punky`, `infinito`.
102
102
 
103
103
  A Terraform is used **alone or in a trio**: three different shapes in three different colors. Never two, and never the same shape or color twice in a trio.
104
104
 
@@ -164,13 +164,12 @@ export default {
164
164
  shadows: { a: '0 1px 2px rgb(15 15 15 / .06), 0 4px 16px rgb(15 15 15 / .08)' }, // f--shadow-* (default a, b, c)
165
165
 
166
166
  // Scales of the utilities (each step is a class)
167
- spacing: [0, 1, 2, 4, 8], // u--p-*, u--m-*, u--gap-* (x 8px; default 0 to 10, 12 and 15)
167
+ spacing: [0, 1, 2, 4, 8], // u--padding-*, u--margin-*, u--gap-* (x 8px; default 0 to 10, 12 and 15)
168
168
  sizes: [2, 4, 5, 6, 8], // u--height-*, u--width-* (x 8px; default 2, 3, 4, 5, 6, 8, 10, 12)
169
169
  minWidth: [10, 20, 30, 40], // u--min-width-* (x 8px; this is the default)
170
170
  opacity: { 100: 1, 85: 0.85, 70: 0.7, 50: 0.5 }, // u--opacity-* (this is the default)
171
171
  zIndex: [0, 10, 20, 40], // u--z-index-* (this is the default)
172
172
  offsets: { 0: '0', 100: '100%' }, // u--top-*, u--right-*, u--bottom-*, u--left-* (this is the default)
173
- tint: 0.1, // strength of u--hover-tint-* (this is the default)
174
173
 
175
174
  // Motion
176
175
  time: { a: '0.1s', b: '0.3s', c: '0.6s' }, // micro-interactions, expansion, background dimming (this is the default)
@@ -190,9 +189,11 @@ Every key is optional. "Replaces" means what you don't list is not generated, wh
190
189
 
191
190
  **0.4.2** adds `u--top|right|bottom|left-0|100`, `u--z-index-0|10|20|40`, `u--min-width-{n}` (n x 8px, steps set with `minWidth` in `terra.config.js`), `u--flex-grow-1`, and the button modifiers of Terra: `c--btn-a--second|third|fourth|fifth` (the letters `c--btn-b` to `c--btn-e` stay as aliases). Additive.
192
191
 
192
+ **0.9.0** adds the icon `c--icon-a--pencil` and removes `u--hover-tint-*` (and the `tint` option), which was named after an effect and not after a CSS property. A quiet button is now an outline plus the hover utilities that already exist.
193
+
193
194
  **0.8.0** renames the spacing classes so they read like the CSS property, and the short names are gone (this is the one release that is not additive, while the package is still in development): `u--p-4` is now `u--padding-4`, `u--pt-4` is `u--padding-top-4`, `u--px-4` is `u--padding-x-4`, `u--py-4` is `u--padding-y-4`, and the same for `u--margin-*`. `u--mx-auto`, `u--my-auto` and `u--m-auto` are `u--margin-x-auto`, `u--margin-y-auto` and `u--margin-auto`, and `u--col-gap-*` is `u--column-gap-*`. Breakpoint versions follow: `u--p-mobile-4` is `u--padding-mobile-4`. To migrate, replace the names in your HTML; the frozen 0.0.9 rules were renamed with them, nothing else changed.
194
195
 
195
- **0.7.0** adds what a button needs to be built from utilities alone: `u--height-{n}` and `u--width-{n}` (a fixed height or width of n x 8px) and `u--hover-tint-{letter}` (a faint wash of the color on hover). It also opens more of the package to `terra.config.js`: `sizes`, `shadows`, `opacity`, `zIndex`, `offsets`, `tint`, `time` and `ease` (every one optional, with Terra's values as the default; see `terra.config.example.js`). Spacing classes also exist with the name of the CSS property: `u--padding-y-4` is `u--py-4`, `u--margin-x-auto` is `u--mx-auto` (the short names are unchanged). Additive.
196
+ **0.7.0** adds what a button needs to be built from utilities alone: `u--height-{n}` and `u--width-{n}` (a fixed height or width of n x 8px). It also opens more of the package to `terra.config.js`: `sizes`, `shadows`, `opacity`, `zIndex`, `offsets`, `time` and `ease` (every one optional, with Terra's values as the default; see `terra.config.example.js`). Spacing classes also exist with the name of the CSS property: `u--padding-y-4` is `u--py-4`, `u--margin-x-auto` is `u--mx-auto` (the short names are unchanged). Additive.
196
197
 
197
198
  **0.6.1** adds the icon `c--icon-a--trash` (in `icons.css`) and the button `c--btn-a--sixth` for dangerous actions such as delete (rojizo text, a faint tint on hover). Additive.
198
199
 
package/bin/terra-ds.mjs CHANGED
@@ -51,10 +51,6 @@ if (cfg.offsets) {
51
51
  if (bad.length) fail(`offsets must map whole numbers (the class) to a CSS length, for example { 0: '0', 100: '100%' }. Check: ${bad.join(', ')}`)
52
52
  vars.push(`$offset-values: ${map(cfg.offsets)}`)
53
53
  }
54
- if (cfg.tint !== undefined) {
55
- if (typeof cfg.tint !== 'number' || cfg.tint < 0 || cfg.tint > 1) fail('tint must be a number from 0 to 1 (the strength of the hover wash, 0.1 by default).')
56
- vars.push(`$tint-alpha: ${cfg.tint}`)
57
- }
58
54
  if (cfg.time) {
59
55
  const bad = Object.entries(cfg.time).filter(([k, v]) => !['a', 'b', 'c'].includes(k) || !/^\d*\.?\d+m?s$/.test(v))
60
56
  if (bad.length) fail(`time takes the keys a, b and c with values such as '0.1s' or '150ms'. Check: ${bad.map(([k]) => k).join(', ')}`)
package/dist/icons.css CHANGED
@@ -9,6 +9,7 @@
9
9
  .c--icon-a--info{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M12%2011v5M12%208h.01%22%2F%3E%3C%2Fsvg%3E")}
10
10
  .c--icon-a--mail{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%225%22%20width%3D%2218%22%20height%3D%2214%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M3%207l9%206%209-6%22%2F%3E%3C%2Fsvg%3E")}
11
11
  .c--icon-a--menu{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M4%2012h16M4%2017h16%22%2F%3E%3C%2Fsvg%3E")}
12
+ .c--icon-a--pencil{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2020h4L19.5%208.5a2.1%202.1%200%200%200-3-3L5%2017v3zM14.5%207.5l3%203%22%2F%3E%3C%2Fsvg%3E")}
12
13
  .c--icon-a--plus{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14M5%2012h14%22%2F%3E%3C%2Fsvg%3E")}
13
14
  .c--icon-a--search{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Ccircle%20cx%3D%2211%22%20cy%3D%2211%22%20r%3D%226%22%2F%3E%3Cpath%20d%3D%22M16%2016l4%204%22%2F%3E%3C%2Fsvg%3E")}
14
15
  .c--icon-a--trash{--c-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23000%22%20stroke-width%3D%221.6%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16M9%207V5a1%201%200%200%201%201-1h4a1%201%200%200%201%201%201v2M6.5%207l.8%2012a1%201%200%200%200%201%20.9h7.4a1%201%200%200%200%201-.9l.8-12M10%2011v5M14%2011v5%22%2F%3E%3C%2Fsvg%3E")}