@muonic/muon 0.0.2-beta.1 → 0.0.2-beta.11

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 (49) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/components/card/src/card-component.js +13 -2
  3. package/components/card/story.js +3 -3
  4. package/components/cta/src/cta-component.js +35 -16
  5. package/components/cta/story.js +2 -2
  6. package/components/detail/story.js +2 -2
  7. package/components/form/story.js +4 -4
  8. package/components/icon/src/icon-component.js +17 -12
  9. package/components/icon/story.js +1 -1
  10. package/components/image/src/image-component.js +17 -14
  11. package/components/image/story.js +1 -1
  12. package/components/inputter/src/design-tokens.json +129 -32
  13. package/components/inputter/src/inputter-component.js +24 -19
  14. package/components/inputter/src/inputter-styles-detail.css +12 -9
  15. package/components/inputter/src/inputter-styles.css +29 -26
  16. package/components/inputter/src/inputter-styles.slotted.css +1 -1
  17. package/components/inputter/story.js +2 -2
  18. package/css/global.css +17 -0
  19. package/mixins/detail-mixin.js +15 -8
  20. package/muon-element/index.js +6 -5
  21. package/package.json +35 -34
  22. package/rollup.config.mjs +2 -2
  23. package/scripts/rollup-plugins.mjs +64 -32
  24. package/scripts/utils/index.mjs +57 -20
  25. package/storybook/server.config.mjs +3 -0
  26. package/storybook/stories.js +3 -4
  27. package/tests/components/card/__snapshots__/card.test.snap.js +12 -3
  28. package/tests/components/card/card.test.js +1 -1
  29. package/tests/components/cta/__snapshots__/cta.test.snap.js +12 -5
  30. package/tests/components/cta/cta.test.js +1 -6
  31. package/tests/components/form/form.test.js +1 -1
  32. package/tests/components/icon/icon.test.js +1 -1
  33. package/tests/components/image/image.test.js +1 -1
  34. package/tests/components/inputter/__snapshots__/inputter.test.snap.js +53 -144
  35. package/tests/components/inputter/inputter.test.js +1 -1
  36. package/tests/mixins/__snapshots__/detail.test.snap.js +26 -6
  37. package/tests/mixins/detail.test.js +2 -2
  38. package/tests/mixins/form-element.test.js +2 -2
  39. package/tests/mixins/mask.test.js +1 -1
  40. package/tests/mixins/muon-element.test.js +1 -1
  41. package/tests/mixins/validation.test.js +2 -2
  42. package/tests/scripts/utils/cta-component.js +17 -0
  43. package/tests/scripts/utils/font.css.template +4 -0
  44. package/tests/scripts/utils/muon.config.prefix.override.json +13 -0
  45. package/tests/scripts/utils/muon.config.style-dictionary.test.json +14 -0
  46. package/tests/scripts/utils/muon.config.test.json +2 -2
  47. package/tests/scripts/utils/style-dictionary.config.mjs +32 -0
  48. package/tests/scripts/utils/utils-test.mjs +56 -14
  49. package/tokens/utils/formats/reference.js +17 -13
package/CHANGELOG.md CHANGED
@@ -2,6 +2,73 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.2-beta.11](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.10...v0.0.2-beta.11) (2023-05-05)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * revert dev-storybook ([1b7d07b](https://github.com/centrica-engineering/muon/commit/1b7d07b97456efcbb774ea15da3ae7e3dac52aa2))
11
+
12
+ ### [0.0.2-beta.10](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.9...v0.0.2-beta.10) (2023-05-04)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * move adding lightdom on perform ([41e7843](https://github.com/centrica-engineering/muon/commit/41e7843f57342e84d719a86a34de0ce1862081dc))
18
+
19
+ ### [0.0.2-beta.9](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.8...v0.0.2-beta.9) (2023-04-21)
20
+
21
+ ### [0.0.2-beta.8](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.7...v0.0.2-beta.8) (2023-04-20)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * check if parentElement exists ([2055f37](https://github.com/centrica-engineering/muon/commit/2055f377a03194ebd28fa74f38597dca8e612507))
27
+ * loading and disabled cta ([0569563](https://github.com/centrica-engineering/muon/commit/056956309c202557ac708e17ad4ed5a5760c3887))
28
+ * url state ([023fb86](https://github.com/centrica-engineering/muon/commit/023fb86886cf9d0dbe432fbae1b97e3cb220d5d8))
29
+
30
+ ### [0.0.2-beta.7](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.6...v0.0.2-beta.7) (2023-04-04)
31
+
32
+ ### [0.0.2-beta.6](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.5...v0.0.2-beta.6) (2023-03-28)
33
+
34
+
35
+ ### Features
36
+
37
+ * postcss extend ([7608e26](https://github.com/centrica-engineering/muon/commit/7608e26e1f1876abacbca562fb6724bebc0cbf50))
38
+
39
+ ### [0.0.2-beta.5](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.4...v0.0.2-beta.5) (2023-02-27)
40
+
41
+
42
+ ### Features
43
+
44
+ * global styles ([6705c22](https://github.com/centrica-engineering/muon/commit/6705c224f7664e1ab6ad9d7261921474de1bf0fc))
45
+
46
+ ### [0.0.2-beta.4](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.3...v0.0.2-beta.4) (2023-02-23)
47
+
48
+
49
+ ### Features
50
+
51
+ * config extend style dictionary ([70bbdc7](https://github.com/centrica-engineering/muon/commit/70bbdc7d7cae3e103da8420d1699c6143d833c07))
52
+
53
+
54
+ ### Bug Fixes
55
+
56
+ * enable style dictionary extension ([d718dd9](https://github.com/centrica-engineering/muon/commit/d718dd93676976d0b4fcb25acb7572b15c5d05c5))
57
+
58
+ ### [0.0.2-beta.3](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.2...v0.0.2-beta.3) (2023-02-21)
59
+
60
+
61
+ ### Features
62
+
63
+ * getters for style and class ([e486ea2](https://github.com/centrica-engineering/muon/commit/e486ea2d25c5a6eb0ce5acb1701cc33e1443bc56))
64
+
65
+ ### [0.0.2-beta.2](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.1...v0.0.2-beta.2) (2023-02-16)
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * rename package to alias ([a9e41bc](https://github.com/centrica-engineering/muon/commit/a9e41bccb73188ba931bec65f9f51ff74b27169c))
71
+
5
72
  ### [0.0.2-beta.1](https://github.com/centrica-engineering/muon/compare/v0.0.2-beta.0...v0.0.2-beta.1) (2022-10-31)
6
73
 
7
74
 
@@ -1,4 +1,4 @@
1
- import { MuonElement, html, ScopedElementsMixin } from '@muonic/muon';
1
+ import { MuonElement, classMap, styleMap, html, ScopedElementsMixin } from '@muonic/muon';
2
2
  import { CardMixin } from '@muon/mixins/card-mixin';
3
3
  import { ImageHolderMixin } from '@muon/mixins/image-holder-mixin';
4
4
  import { Image } from '@muon/components/image';
@@ -9,6 +9,7 @@ import styles from './card-styles.css';
9
9
  *
10
10
  * @element card
11
11
  */
12
+
12
13
  export class Card extends ScopedElementsMixin(ImageHolderMixin(CardMixin(MuonElement))) {
13
14
 
14
15
  static get scopedElements() {
@@ -17,6 +18,16 @@ export class Card extends ScopedElementsMixin(ImageHolderMixin(CardMixin(MuonEle
17
18
  };
18
19
  }
19
20
 
21
+ get classes() {
22
+ return {
23
+ card: true
24
+ };
25
+ }
26
+
27
+ get inlineStyles() {
28
+ return {};
29
+ }
30
+
20
31
  get _addImage() {
21
32
  return this.image ? html`
22
33
  <div class="media">
@@ -26,7 +37,7 @@ export class Card extends ScopedElementsMixin(ImageHolderMixin(CardMixin(MuonEle
26
37
 
27
38
  get standardTemplate() {
28
39
  return html`
29
- <div class="card">
40
+ <div class="${classMap(this.classes)}" style="${styleMap(this.inlineStyles)}">
30
41
  ${this._addImage}
31
42
  <div class="body">
32
43
  ${this._addHeader}
@@ -1,7 +1,7 @@
1
- import { Card } from '@muonic/muon/components/card';
2
- import setup from '@muonic/muon/storybook/stories';
3
- import { StandardLink as CTALink } from '../cta/story';
4
1
  import { staticHTML, unsafeStatic } from '@muonic/muon';
2
+ import setup from '@muonic/muon/storybook/stories';
3
+ import { Card } from '@muon/components/card';
4
+ import { StandardLink as CTALink } from '@muon/components/cta/story';
5
5
 
6
6
  const details = setup('card', Card);
7
7
 
@@ -1,4 +1,4 @@
1
- import { MuonElement, html, classMap, ScopedElementsMixin, literal, staticHTML, ifDefined } from '@muonic/muon';
1
+ import { MuonElement, html, classMap, styleMap, ScopedElementsMixin, literal, staticHTML } from '@muonic/muon';
2
2
  import { Icon } from '@muon/components/icon';
3
3
  import {
4
4
  CTA_CONFIG_TYPE,
@@ -49,6 +49,22 @@ export class Cta extends ScopedElementsMixin(MuonElement) {
49
49
  this.icon = CTA_ICON_NAME;
50
50
  }
51
51
 
52
+ get classes() {
53
+ const parentElement = this.parentElement;
54
+ const isDisabled = parentElement?.getAttribute('disabled') || this.disabled;
55
+
56
+ return {
57
+ cta: true,
58
+ [this.type]: true,
59
+ loading: this.loading,
60
+ disabled: isDisabled
61
+ };
62
+ }
63
+
64
+ get inlineStyles() {
65
+ return {};
66
+ }
67
+
52
68
  /**
53
69
  * Adds icon html.
54
70
  *
@@ -84,7 +100,7 @@ export class Cta extends ScopedElementsMixin(MuonElement) {
84
100
  const isInLink = parentName === 'A';
85
101
  const isInBtn = parentName === 'BUTTON';
86
102
  const isInNativeForm = parentName === 'FORM';
87
- const isDisabled = parentElement.getAttribute('disabled') || this.disabled;
103
+ const isDisabled = parentElement?.getAttribute('disabled') || this.disabled;
88
104
  let element = this.href?.length > 0 ? 'a' : 'div';
89
105
 
90
106
  if (
@@ -93,23 +109,35 @@ export class Cta extends ScopedElementsMixin(MuonElement) {
93
109
  !isInLink &&
94
110
  !isInBtn &&
95
111
  !isDisabled &&
112
+ !this.loading &&
96
113
  !this._isButton
97
114
  ) {
98
115
  if (!this.getAttribute('role')) {
99
116
  this.setAttribute('role', 'button');
100
117
  }
101
118
 
102
- if (!this.getAttribute('tabindex')) {
103
- this.setAttribute('tabindex', '0');
104
- }
119
+ this.setAttribute('tabindex', '0');
105
120
  }
106
121
 
107
- if (isDisabled) {
122
+ if (isDisabled || this.loading) {
108
123
  if (!this.getAttribute('aria-disabled')) {
109
124
  this.setAttribute('aria-disabled', 'true');
110
125
  }
126
+
127
+ this.setAttribute('tabindex', '-1');
111
128
  } else {
112
129
  this.removeAttribute('aria-disabled');
130
+
131
+ if (
132
+ this.getAttribute('tabindex') === '-1' &&
133
+ (this._isButton ||
134
+ isInBtn ||
135
+ isInNativeForm ||
136
+ isInLink ||
137
+ element === 'a')
138
+ ) {
139
+ this.removeAttribute('tabindex');
140
+ }
113
141
  }
114
142
 
115
143
  if (isInNativeForm || this._isButton) {
@@ -121,20 +149,11 @@ export class Cta extends ScopedElementsMixin(MuonElement) {
121
149
  this.removeAttribute('tabindex');
122
150
  }
123
151
 
124
- // eslint-disable-next-line no-nested-ternary
125
- const tabIndex = isInLink ? -1 : element !== 'div' ? 0 : undefined;
126
- const classes = {
127
- cta: true,
128
- [this.type]: true,
129
- loading: this.loading,
130
- disabled: isDisabled
131
- };
132
-
133
152
  // eslint-disable-next-line no-nested-ternary
134
153
  const elementTag = element === 'button' ? literal`button` : element === 'a' ? literal`a` : literal`div`;
135
154
 
136
155
  return staticHTML`
137
- <${elementTag} .href=${element === 'a' && this.href} ?disabled=${element === 'button' && (this.loading || this.disabled)} tabindex="${ifDefined(tabIndex)}" aria-label="${this.textContent}" class=${classMap(classes)}>
156
+ <${elementTag} .href=${element === 'a' && this.href} ?disabled=${element === 'button' && (this.loading || this.disabled)} aria-label="${this.textContent}" class=${classMap(this.classes)} style=${styleMap(this.inlineStyles)}>
138
157
  ${content}
139
158
  </${elementTag}>
140
159
  `;
@@ -1,6 +1,6 @@
1
- import { Cta } from '@muonic/muon/components/cta';
2
- import setup from '@muonic/muon/storybook/stories';
3
1
  import { staticHTML } from '@muonic/muon';
2
+ import setup from '@muonic/muon/storybook/stories';
3
+ import { Cta } from '@muon/components/cta';
4
4
 
5
5
  const details = setup('cta', Cta);
6
6
  const tag = details.getTagEl();
@@ -1,6 +1,6 @@
1
- import { Detail } from '@muonic/muon/components/detail';
2
- import setup from '@muonic/muon/storybook/stories';
3
1
  import { staticHTML, unsafeStatic } from '@muonic/muon';
2
+ import setup from '@muonic/muon/storybook/stories';
3
+ import { Detail } from '@muon/components/detail';
4
4
 
5
5
  const details = setup('detail', Detail);
6
6
 
@@ -1,8 +1,8 @@
1
- import { Form } from '@muonic/muon/components/form';
2
- import setup from '@muonic/muon/storybook/stories';
3
- import * as InputterStories from '../inputter/story';
4
- import { Standard as SubmitCTA } from '../cta/story';
5
1
  import { staticHTML } from '@muonic/muon';
2
+ import setup from '@muonic/muon/storybook/stories';
3
+ import { Form } from '@muon/components/form';
4
+ import * as InputterStories from '@muon/components/inputter/story';
5
+ import { Standard as SubmitCTA } from '@muon/components/cta/story';
6
6
 
7
7
  const details = setup('form', Form);
8
8
 
@@ -24,7 +24,7 @@ export class Icon extends MuonElement {
24
24
  describe: { type: String },
25
25
  size: { type: Number },
26
26
  category: { type: String },
27
- url: { type: String, state: true }
27
+ _url: { type: String, state: true }
28
28
  };
29
29
  }
30
30
 
@@ -39,10 +39,23 @@ export class Icon extends MuonElement {
39
39
  this.name = ICON_CONFIG_NAME;
40
40
  this.category = ICON_CONFIG_CATEGORY;
41
41
  this.allSizes = ICON_CONFIG_SIZES;
42
- this.url = ICON_CONFIG_URL;
42
+ this._url = ICON_CONFIG_URL;
43
43
  this.describe = '';
44
44
  }
45
45
 
46
+ get classes() {
47
+ return {
48
+ icon: true,
49
+ [this.type]: true
50
+ };
51
+ }
52
+
53
+ get inlineStyles() {
54
+ return {
55
+ '--icon-size': this.iconSize
56
+ };
57
+ }
58
+
46
59
  /**
47
60
  * A getter method to get size of image.
48
61
  *
@@ -65,18 +78,10 @@ export class Icon extends MuonElement {
65
78
  get standardTemplate() {
66
79
  const hidden = this.describe?.length === 0 ? 'true' : undefined;
67
80
  const role = !hidden ? 'img' : undefined;
68
- const classes = {
69
- icon: true,
70
- [this.type]: true
71
- };
72
-
73
- const styles = {
74
- '--icon-size': this.iconSize
75
- };
76
81
 
77
82
  return html`
78
- <div aria-hidden=${ifDefined(hidden)} role=${ifDefined(role)} aria-label=${ifDefined(role && this.describe)} class=${classMap(classes)} style=${styleMap(styles)}>
79
- ${svgLoader({ name: this.name, category: this.category, path: this.url })}
83
+ <div aria-hidden=${ifDefined(hidden)} role=${ifDefined(role)} aria-label=${ifDefined(role && this.describe)} class=${classMap(this.classes)} style=${styleMap(this.inlineStyles)}>
84
+ ${svgLoader({ name: this.name, category: this.category, path: this._url })}
80
85
  </div>
81
86
  `;
82
87
  }
@@ -1,5 +1,5 @@
1
- import { Icon } from '@muonic/muon/components/icon';
2
1
  import setup from '@muonic/muon/storybook/stories';
2
+ import { Icon } from '@muon/components/icon';
3
3
  import {
4
4
  ICON_CONFIG_SIZES
5
5
  } from '@muonic/muon/build/tokens/es6/muon-tokens.mjs';
@@ -45,7 +45,23 @@ export class Image extends MuonElement {
45
45
  this.placeholder = IMAGE_CONFIG_PLACEHOLDER;
46
46
  this.loading = 'lazy'; // eager|lazy
47
47
  this._ratios = IMAGE_CONFIG_RATIOS;
48
+ }
48
49
 
50
+ get classes() {
51
+ return {
52
+ image: true,
53
+ 'no-ratio': !this.ratio || this.ratio?.length < 1,
54
+ 'is-background': this.background
55
+ };
56
+ }
57
+
58
+ get inlineStyles() {
59
+ const [x, y] = this.ratio.split(' / ');
60
+ return {
61
+ '--image-ratio': CSS?.supports('aspect-ratio', '1 / 1') && this.ratio ? this.ratio : undefined,
62
+ '--image-padding': CSS?.supports('aspect-ratio', '1 / 1') || !x && !y ? undefined : `${y / x * 100}%`,
63
+ '--background-size': this.background ? this.backgroundsize : undefined
64
+ };
49
65
  }
50
66
 
51
67
  get placeholderImage() {
@@ -63,19 +79,6 @@ export class Image extends MuonElement {
63
79
  this.ratio = this.ratio?.length > 0 ? this.ratio : '16 / 9'; // without a default size background images won't show
64
80
  }
65
81
 
66
- const [x, y] = this.ratio.split(' / ');
67
- const styles = {
68
- '--image-ratio': CSS?.supports('aspect-ratio', '1 / 1') && this.ratio ? this.ratio : undefined,
69
- '--image-padding': CSS?.supports('aspect-ratio', '1 / 1') || !x && !y ? undefined : `${y / x * 100}%`,
70
- '--background-size': isBackground ? this.backgroundsize : undefined
71
- };
72
-
73
- const classes = {
74
- image: true,
75
- 'no-ratio': !this.ratio || this.ratio?.length < 1,
76
- 'is-background': isBackground
77
- };
78
-
79
82
  if (this.src && this.src.length > 0) {
80
83
  const imageObj = {
81
84
  src: this.src,
@@ -85,7 +88,7 @@ export class Image extends MuonElement {
85
88
  };
86
89
 
87
90
  return html`
88
- <div class=${classMap(classes)} style=${styleMap(styles)}>
91
+ <div class=${classMap(this.classes)} style=${styleMap(this.inlineStyles)}>
89
92
  ${isBackground ? imageBackgroundLoader(imageObj) : imageInlineLoader(imageObj)}
90
93
  </div>
91
94
  `;
@@ -1,5 +1,5 @@
1
- import { Image } from '@muonic/muon/components/image';
2
1
  import setup from '@muonic/muon/storybook/stories';
2
+ import { Image } from '@muon/components/image';
3
3
  import { IMAGE_CONFIG_RATIOS } from '@muonic/muon/build/tokens/es6/muon-tokens.mjs';
4
4
 
5
5
  const details = setup('image', Image);
@@ -23,24 +23,42 @@
23
23
  },
24
24
  "padding": {
25
25
  "block": {
26
- "description": "Padding space above and below the field text. Equal values in the block axis.",
27
- "value": "{ theme.spacer.sm.value }"
26
+ "start": {
27
+ "description": "Padding space above the field text.",
28
+ "value": "{ theme.spacer.sm.value }"
29
+ },
30
+ "end": {
31
+ "description": "Padding space below the field text.",
32
+ "value": "{ theme.spacer.sm.value }"
33
+ }
28
34
  },
29
35
  "inline": {
30
- "description": "Padding space left and right of the field text. Equal values in the inline axis.",
31
- "value": "{ inputter.field.padding.block.value }"
32
- }
33
- },
34
- "margin": {
35
- "block": {
36
- "description": "Margin space between the label and the field.",
37
- "value": "{ theme.spacer.sm.value }"
36
+ "start": {
37
+ "description": "Padding space left of the field text. Equal values in the inline axis.",
38
+ "value": "{ theme.spacer.sm.value }"
39
+ },
40
+ "end": {
41
+ "description": "Padding space right of the field text. Equal values in the inline axis.",
42
+ "value": "{ theme.spacer.sm.value }"
43
+ }
38
44
  }
39
45
  },
40
46
  "border": {
41
47
  "color": {
42
48
  "description": "Border color of the field.",
43
49
  "value": "{ inputter.field.color.value }"
50
+ },
51
+ "radius": {
52
+ "description": "Border radius of the field.",
53
+ "value": 0
54
+ },
55
+ "style": {
56
+ "description": "Border style of the field.",
57
+ "value": "solid"
58
+ },
59
+ "width": {
60
+ "description": "Border width of the field.",
61
+ "value": "2px"
44
62
  }
45
63
  },
46
64
  "icon": {
@@ -50,7 +68,7 @@
50
68
  },
51
69
  "spacer": {
52
70
  "description": "Padding space used if an icon exists at the start or end of the field.",
53
- "value": "calc({ inputter.field.padding.block.value } + { inputter.field.icon.size.value } + { inputter.field.padding.block.value })"
71
+ "value": "calc({ inputter.field.padding.block.start.value } + { inputter.field.icon.size.value } + { inputter.field.padding.block.end.value })"
54
72
  }
55
73
  },
56
74
  "date": {
@@ -98,6 +116,18 @@
98
116
  "color": {
99
117
  "description": "Label text color of field.",
100
118
  "value": "{ inputter.field.color.value }"
119
+ },
120
+ "margin": {
121
+ "block": {
122
+ "start": {
123
+ "description": "Margin space above the label.",
124
+ "value": 0
125
+ },
126
+ "end": {
127
+ "description": "Margin space below the label.",
128
+ "value": "{ theme.spacer.sm.value }"
129
+ }
130
+ }
101
131
  }
102
132
  },
103
133
  "placeholder": {
@@ -109,10 +139,12 @@
109
139
  "mask": {
110
140
  "__private_color": {
111
141
  "value": "{ theme.color.darkest.value }",
112
- "modify": [{
113
- "type": "brighten",
114
- "amount": 2.75
115
- }]
142
+ "modify": [
143
+ {
144
+ "type": "brighten",
145
+ "amount": 2.75
146
+ }
147
+ ]
116
148
  },
117
149
  "color": {
118
150
  "description": "Text color for the mask of the inputter. Defaults to brightened version of the darkest color.",
@@ -132,10 +164,12 @@
132
164
  "hover": {
133
165
  "__private_color": {
134
166
  "value": "{ inputter.field.color.value }",
135
- "modify": [{
136
- "type": "darken",
137
- "amount": 1.5
138
- }]
167
+ "modify": [
168
+ {
169
+ "type": "darken",
170
+ "amount": 1.5
171
+ }
172
+ ]
139
173
  },
140
174
  "color": {
141
175
  "description": "Color of the field on `hover` state. Defaults to a darkened version of the color.",
@@ -163,6 +197,18 @@
163
197
  "color": {
164
198
  "description": "Outline color for `keyboard focus` state. Defaults to theme's focus color.",
165
199
  "value": "{ theme.color.focus.value }"
200
+ },
201
+ "offset": {
202
+ "description": "Outline offset for `keyboard focus` state. Defaults to theme's focus color.",
203
+ "value": 0
204
+ },
205
+ "style": {
206
+ "description": "Outline style for `keyboard focus` state. Defaults to theme's focus color.",
207
+ "value": "solid"
208
+ },
209
+ "width": {
210
+ "description": "Outline width for `keyboard focus` state. Defaults to theme's focus color.",
211
+ "value": "3px"
166
212
  }
167
213
  }
168
214
  },
@@ -180,10 +226,12 @@
180
226
  "background": {
181
227
  "__private_color": {
182
228
  "value": "{ inputter.disabled.color.value }",
183
- "modify": [{
184
- "type": "brighten",
185
- "amount": 1
186
- }]
229
+ "modify": [
230
+ {
231
+ "type": "brighten",
232
+ "amount": 1
233
+ }
234
+ ]
187
235
  },
188
236
  "color": {
189
237
  "description": "Disabled background color. Defaults to a brightened version of theme's disabled color.",
@@ -198,6 +246,12 @@
198
246
  }
199
247
  },
200
248
  "validation": {
249
+ "font": {
250
+ "size": {
251
+ "description": "Font size for the validation.",
252
+ "value": "14px"
253
+ }
254
+ },
201
255
  "margin": {
202
256
  "block": {
203
257
  "description": "Margin space above and below the validation message. Equal values in the block axis.",
@@ -226,6 +280,12 @@
226
280
  }
227
281
  },
228
282
  "detail": {
283
+ "font": {
284
+ "size": {
285
+ "description": "Font size for the detail.",
286
+ "value": "12px"
287
+ }
288
+ },
229
289
  "color": {
230
290
  "description": "Text color for the detail.",
231
291
  "value": "{ inputter.field.color.value }"
@@ -237,10 +297,21 @@
237
297
  }
238
298
  },
239
299
  "heading": {
300
+ "font": {
301
+ "size": {
302
+ "value": "14px"
303
+ }
304
+ },
240
305
  "margin": {
241
306
  "block": {
242
- "description": "Margin space between the detail heading and the field.",
243
- "value": "{ theme.spacer.sm.value }"
307
+ "start": {
308
+ "description": "Margin space above the detail heading.",
309
+ "value": 0
310
+ },
311
+ "end": {
312
+ "description": "Margin space below the detail heading.",
313
+ "value": "{ theme.spacer.sm.value }"
314
+ }
244
315
  }
245
316
  },
246
317
  "gap": {
@@ -251,8 +322,14 @@
251
322
  "content": {
252
323
  "margin": {
253
324
  "block": {
254
- "description": "Margin space between the detail's heading and content.",
255
- "value": "{ theme.spacer.sm.value }"
325
+ "start": {
326
+ "description": "Margin space above the detail content.",
327
+ "value": 0
328
+ },
329
+ "end": {
330
+ "description": "Margin space below the detail content.",
331
+ "value": "{ theme.spacer.sm.value }"
332
+ }
256
333
  }
257
334
  },
258
335
  "padding": {
@@ -285,22 +362,42 @@
285
362
  "focus": {
286
363
  "outline": {
287
364
  "color": {
288
- "description": "Outline color of the detail on `keyboard focus` state.",
365
+ "description": "Outline color for `keyboard focus` state. Defaults to theme's focus color.",
289
366
  "value": "{ inputter.focus.outline.color.value }"
367
+ },
368
+ "offset": {
369
+ "description": "Outline offset for `keyboard focus` state. Defaults to theme's focus color.",
370
+ "value": "{ inputter.focus.outline.offset.value }"
371
+ },
372
+ "style": {
373
+ "description": "Outline style for `keyboard focus` state. Defaults to theme's focus color.",
374
+ "value": "{ inputter.focus.outline.style.value }"
375
+ },
376
+ "width": {
377
+ "description": "Outline width for `keyboard focus` state. Defaults to theme's focus color.",
378
+ "value": "{ inputter.focus.outline.width.value }"
290
379
  }
291
380
  }
292
381
  },
293
382
  "border": {
294
383
  "__private_color": {
295
384
  "value": "{ inputter.field.color.value }",
296
- "modify": [{
297
- "type": "brighten",
298
- "amount": 3
299
- }]
385
+ "modify": [
386
+ {
387
+ "type": "brighten",
388
+ "amount": 3
389
+ }
390
+ ]
300
391
  },
301
392
  "color": {
302
393
  "description": "Border color of the detail. Defaults to a brightened version of the field color.",
303
394
  "value": "{ inputter.detail.border.__private_color.value }"
395
+ },
396
+ "style": {
397
+ "value": "solid"
398
+ },
399
+ "width": {
400
+ "value": "3px"
304
401
  }
305
402
  }
306
403
  }