@instructure/ui-view 8.11.2-snapshot.3 → 8.11.2-snapshot.39

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/es/View/index.js CHANGED
@@ -61,10 +61,13 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
61
61
  // @param props the object to process
62
62
  // @param Component The component whose props are processed.
63
63
  // Only needed for debug logging in non-production builds.
64
+ get _element() {
65
+ return this.ref;
66
+ }
67
+
64
68
  constructor(props) {
65
69
  super(props);
66
70
  this.spanMarginVerified = void 0;
67
- this._element = void 0;
68
71
  this.ref = null;
69
72
 
70
73
  this.handleElementRef = el => {
@@ -73,7 +76,6 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
73
76
  }
74
77
 
75
78
  this.ref = el;
76
- this._element = el;
77
79
  };
78
80
 
79
81
  this.spanMarginVerified = false;
@@ -120,7 +122,7 @@ let View = (_dec = bidirectional(), _dec2 = withStyle(generateStyle, generateCom
120
122
  }
121
123
 
122
124
  return verticalMargin;
123
- }(this._element, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
125
+ }(this.ref, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
124
126
  }
125
127
  }
126
128
 
package/lib/View/index.js CHANGED
@@ -60,10 +60,13 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
60
60
  // @param props the object to process
61
61
  // @param Component The component whose props are processed.
62
62
  // Only needed for debug logging in non-production builds.
63
+ get _element() {
64
+ return this.ref;
65
+ }
66
+
63
67
  constructor(props) {
64
68
  super(props);
65
69
  this.spanMarginVerified = void 0;
66
- this._element = void 0;
67
70
  this.ref = null;
68
71
 
69
72
  this.handleElementRef = el => {
@@ -72,7 +75,6 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
72
75
  }
73
76
 
74
77
  this.ref = el;
75
- this._element = el;
76
78
  };
77
79
 
78
80
  this.spanMarginVerified = false;
@@ -119,7 +121,7 @@ let View = (_dec = (0, _bidirectional.bidirectional)(), _dec2 = (0, _emotion.wit
119
121
  }
120
122
 
121
123
  return verticalMargin;
122
- }(this._element, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
124
+ }(this.ref, this.props.margin), `[View] display style is set to 'inline' and will allow for horizontal margins only.`);
123
125
  }
124
126
  }
125
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-view",
3
- "version": "8.11.2-snapshot.3+6c8116bbe",
3
+ "version": "8.11.2-snapshot.39+5b3b94d60",
4
4
  "description": "A component for basic styles including spacing, sizing, borders, display, positioning, and focus states.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,21 +25,21 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.11.2-snapshot.3+6c8116bbe",
29
- "@instructure/emotion": "8.11.2-snapshot.3+6c8116bbe",
30
- "@instructure/shared-types": "8.11.2-snapshot.3+6c8116bbe",
31
- "@instructure/ui-color-utils": "8.11.2-snapshot.3+6c8116bbe",
32
- "@instructure/ui-dom-utils": "8.11.2-snapshot.3+6c8116bbe",
33
- "@instructure/ui-i18n": "8.11.2-snapshot.3+6c8116bbe",
34
- "@instructure/ui-position": "8.11.2-snapshot.3+6c8116bbe",
35
- "@instructure/ui-prop-types": "8.11.2-snapshot.3+6c8116bbe",
36
- "@instructure/ui-react-utils": "8.11.2-snapshot.3+6c8116bbe",
28
+ "@instructure/console": "8.11.2-snapshot.39+5b3b94d60",
29
+ "@instructure/emotion": "8.11.2-snapshot.39+5b3b94d60",
30
+ "@instructure/shared-types": "8.11.2-snapshot.39+5b3b94d60",
31
+ "@instructure/ui-color-utils": "8.11.2-snapshot.39+5b3b94d60",
32
+ "@instructure/ui-dom-utils": "8.11.2-snapshot.39+5b3b94d60",
33
+ "@instructure/ui-i18n": "8.11.2-snapshot.39+5b3b94d60",
34
+ "@instructure/ui-position": "8.11.2-snapshot.39+5b3b94d60",
35
+ "@instructure/ui-prop-types": "8.11.2-snapshot.39+5b3b94d60",
36
+ "@instructure/ui-react-utils": "8.11.2-snapshot.39+5b3b94d60",
37
37
  "prop-types": "^15"
38
38
  },
39
39
  "devDependencies": {
40
- "@instructure/ui-babel-preset": "8.11.2-snapshot.3+6c8116bbe",
41
- "@instructure/ui-test-utils": "8.11.2-snapshot.3+6c8116bbe",
42
- "@instructure/ui-themes": "8.11.2-snapshot.3+6c8116bbe"
40
+ "@instructure/ui-babel-preset": "8.11.2-snapshot.39+5b3b94d60",
41
+ "@instructure/ui-test-utils": "8.11.2-snapshot.39+5b3b94d60",
42
+ "@instructure/ui-themes": "8.11.2-snapshot.39+5b3b94d60"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=16.8 <=17"
@@ -48,5 +48,5 @@
48
48
  "access": "public"
49
49
  },
50
50
  "sideEffects": false,
51
- "gitHead": "6c8116bbe87878c77fca03bf26de932b40e21302"
51
+ "gitHead": "5b3b94d60693dc069b6ff4fde8f2ca1a72462ab7"
52
52
  }
@@ -106,7 +106,13 @@ class View extends Component<ViewProps> {
106
106
  }
107
107
 
108
108
  private spanMarginVerified: boolean
109
- private _element?: Element | null
109
+ get _element() {
110
+ console.warn(
111
+ '_element property is deprecated and will be removed in v9, please use ref instead'
112
+ )
113
+
114
+ return this.ref
115
+ }
110
116
 
111
117
  constructor(props: ViewProps) {
112
118
  super(props)
@@ -163,7 +169,7 @@ class View extends Component<ViewProps> {
163
169
  }
164
170
 
165
171
  return verticalMargin
166
- })(this._element, this.props.margin),
172
+ })(this.ref, this.props.margin),
167
173
  `[View] display style is set to 'inline' and will allow for horizontal margins only.`
168
174
  )
169
175
  }
@@ -176,7 +182,6 @@ class View extends Component<ViewProps> {
176
182
  this.props.elementRef(el)
177
183
  }
178
184
  this.ref = el
179
- this._element = el
180
185
  }
181
186
 
182
187
  render() {
@@ -97,7 +97,7 @@ declare class View extends Component<ViewProps> {
97
97
  };
98
98
  static omitViewProps: (props: Record<string, any>, Component: ComponentType<any>) => Record<string, any>;
99
99
  private spanMarginVerified;
100
- private _element?;
100
+ get _element(): Element | null;
101
101
  constructor(props: ViewProps);
102
102
  componentDidMount(): void;
103
103
  componentDidUpdate(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAWhD,OAAO,EAAE,GAAG,EAAa,MAAM,sBAAsB,CAAA;AAMrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;;;;;GASG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;;;MAUT;IAgBV,MAAM,CAAC,aAAa,UACX,OAAO,MAAM,EAAE,GAAG,CAAC,aACf,cAAc,GAAG,CAAC,yBAiB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,CAAgB;gBAErB,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAMrC;IAED,MAAM;CA4CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/View/index.ts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