@instructure/ui-view 8.12.0 → 8.12.1-snapshot.15
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.md +27 -0
- package/es/View/index.js +1 -2
- package/es/View/styles.js +14 -10
- package/lib/View/index.js +1 -2
- package/lib/View/styles.js +14 -10
- package/package.json +15 -14
- package/src/View/index.tsx +1 -2
- package/src/View/styles.ts +14 -10
- package/types/View/index.d.ts.map +1 -1
- package/types/View/styles.d.ts.map +1 -1
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The MIT License (MIT)
|
|
3
|
+
category: Getting Started
|
|
4
|
+
order: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The MIT License (MIT)
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
+
|
|
11
|
+
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions.**
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
package/es/View/index.js
CHANGED
|
@@ -155,8 +155,7 @@ let View = (_dec = textDirectionContextConsumer(), _dec2 = withStyle(generateSty
|
|
|
155
155
|
const ElementType = getElementType(View, this.props);
|
|
156
156
|
return jsx(ElementType, Object.assign({}, passthroughProps(props), {
|
|
157
157
|
className: className,
|
|
158
|
-
css: styles === null || styles === void 0 ? void 0 : styles.view,
|
|
159
|
-
style: styles === null || styles === void 0 ? void 0 : styles.inlineStyles,
|
|
158
|
+
css: [styles === null || styles === void 0 ? void 0 : styles.view, styles === null || styles === void 0 ? void 0 : styles.inlineStyles],
|
|
160
159
|
ref: this.handleElementRef
|
|
161
160
|
}), children);
|
|
162
161
|
}
|
package/es/View/styles.js
CHANGED
|
@@ -467,16 +467,20 @@ const generateStyle = (componentTheme, props) => {
|
|
|
467
467
|
} : {}),
|
|
468
468
|
...(shouldUseFocusStyles ? focusStyles : {})
|
|
469
469
|
},
|
|
470
|
-
inlineStyles: {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
470
|
+
inlineStyles: {
|
|
471
|
+
//every '&' symbol will add another class to the rule, so it will be stronger
|
|
472
|
+
//making an accidental override less likely
|
|
473
|
+
'&&&&&&&&&&': { ...spacingStyle,
|
|
474
|
+
...borderStyle,
|
|
475
|
+
...offsetStyle,
|
|
476
|
+
width,
|
|
477
|
+
height,
|
|
478
|
+
minWidth,
|
|
479
|
+
minHeight,
|
|
480
|
+
maxWidth,
|
|
481
|
+
maxHeight,
|
|
482
|
+
...getStyleProps(props)
|
|
483
|
+
}
|
|
480
484
|
}
|
|
481
485
|
};
|
|
482
486
|
};
|
package/lib/View/index.js
CHANGED
|
@@ -153,8 +153,7 @@ let View = (_dec = (0, _textDirectionContextConsumer.textDirectionContextConsume
|
|
|
153
153
|
const ElementType = (0, _getElementType.getElementType)(View, this.props);
|
|
154
154
|
return (0, _emotion.jsx)(ElementType, Object.assign({}, (0, _passthroughProps.passthroughProps)(props), {
|
|
155
155
|
className: className,
|
|
156
|
-
css: styles === null || styles === void 0 ? void 0 : styles.view,
|
|
157
|
-
style: styles === null || styles === void 0 ? void 0 : styles.inlineStyles,
|
|
156
|
+
css: [styles === null || styles === void 0 ? void 0 : styles.view, styles === null || styles === void 0 ? void 0 : styles.inlineStyles],
|
|
158
157
|
ref: this.handleElementRef
|
|
159
158
|
}), children);
|
|
160
159
|
}
|
package/lib/View/styles.js
CHANGED
|
@@ -477,16 +477,20 @@ const generateStyle = (componentTheme, props) => {
|
|
|
477
477
|
} : {}),
|
|
478
478
|
...(shouldUseFocusStyles ? focusStyles : {})
|
|
479
479
|
},
|
|
480
|
-
inlineStyles: {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
480
|
+
inlineStyles: {
|
|
481
|
+
//every '&' symbol will add another class to the rule, so it will be stronger
|
|
482
|
+
//making an accidental override less likely
|
|
483
|
+
'&&&&&&&&&&': { ...spacingStyle,
|
|
484
|
+
...borderStyle,
|
|
485
|
+
...offsetStyle,
|
|
486
|
+
width,
|
|
487
|
+
height,
|
|
488
|
+
minWidth,
|
|
489
|
+
minHeight,
|
|
490
|
+
maxWidth,
|
|
491
|
+
maxHeight,
|
|
492
|
+
...getStyleProps(props)
|
|
493
|
+
}
|
|
490
494
|
}
|
|
491
495
|
};
|
|
492
496
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-view",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.1-snapshot.15+c50fd66e4",
|
|
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.12.
|
|
29
|
-
"@instructure/emotion": "8.12.
|
|
30
|
-
"@instructure/shared-types": "8.12.
|
|
31
|
-
"@instructure/ui-color-utils": "8.12.
|
|
32
|
-
"@instructure/ui-dom-utils": "8.12.
|
|
33
|
-
"@instructure/ui-i18n": "8.12.
|
|
34
|
-
"@instructure/ui-position": "8.12.
|
|
35
|
-
"@instructure/ui-prop-types": "8.12.
|
|
36
|
-
"@instructure/ui-react-utils": "8.12.
|
|
28
|
+
"@instructure/console": "8.12.1-snapshot.15+c50fd66e4",
|
|
29
|
+
"@instructure/emotion": "8.12.1-snapshot.15+c50fd66e4",
|
|
30
|
+
"@instructure/shared-types": "8.12.1-snapshot.15+c50fd66e4",
|
|
31
|
+
"@instructure/ui-color-utils": "8.12.1-snapshot.15+c50fd66e4",
|
|
32
|
+
"@instructure/ui-dom-utils": "8.12.1-snapshot.15+c50fd66e4",
|
|
33
|
+
"@instructure/ui-i18n": "8.12.1-snapshot.15+c50fd66e4",
|
|
34
|
+
"@instructure/ui-position": "8.12.1-snapshot.15+c50fd66e4",
|
|
35
|
+
"@instructure/ui-prop-types": "8.12.1-snapshot.15+c50fd66e4",
|
|
36
|
+
"@instructure/ui-react-utils": "8.12.1-snapshot.15+c50fd66e4",
|
|
37
37
|
"prop-types": "^15"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "8.12.
|
|
41
|
-
"@instructure/ui-test-utils": "8.12.
|
|
42
|
-
"@instructure/ui-themes": "8.12.
|
|
40
|
+
"@instructure/ui-babel-preset": "8.12.1-snapshot.15+c50fd66e4",
|
|
41
|
+
"@instructure/ui-test-utils": "8.12.1-snapshot.15+c50fd66e4",
|
|
42
|
+
"@instructure/ui-themes": "8.12.1-snapshot.15+c50fd66e4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8 <=17"
|
|
@@ -47,5 +47,6 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"sideEffects": false
|
|
50
|
+
"sideEffects": false,
|
|
51
|
+
"gitHead": "c50fd66e4ba9e5d4b814659f8ee4e1cc2f929cc2"
|
|
51
52
|
}
|
package/src/View/index.tsx
CHANGED
|
@@ -218,8 +218,7 @@ class View extends Component<ViewProps> {
|
|
|
218
218
|
//@ts-expect-error TODO: `ref` prop causes: "Expression produces a union type that is too complex to represent.ts(2590)"
|
|
219
219
|
{...passthroughProps(props)}
|
|
220
220
|
className={className}
|
|
221
|
-
css={styles?.view}
|
|
222
|
-
style={styles?.inlineStyles}
|
|
221
|
+
css={[styles?.view, styles?.inlineStyles]}
|
|
223
222
|
ref={this.handleElementRef}
|
|
224
223
|
>
|
|
225
224
|
{children}
|
package/src/View/styles.ts
CHANGED
|
@@ -600,16 +600,20 @@ const generateStyle = (
|
|
|
600
600
|
...(shouldUseFocusStyles ? focusStyles : {})
|
|
601
601
|
},
|
|
602
602
|
inlineStyles: {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
603
|
+
//every '&' symbol will add another class to the rule, so it will be stronger
|
|
604
|
+
//making an accidental override less likely
|
|
605
|
+
'&&&&&&&&&&': {
|
|
606
|
+
...spacingStyle,
|
|
607
|
+
...borderStyle,
|
|
608
|
+
...offsetStyle,
|
|
609
|
+
width,
|
|
610
|
+
height,
|
|
611
|
+
minWidth,
|
|
612
|
+
minHeight,
|
|
613
|
+
maxWidth,
|
|
614
|
+
maxHeight,
|
|
615
|
+
...getStyleProps(props)
|
|
616
|
+
}
|
|
613
617
|
}
|
|
614
618
|
}
|
|
615
619
|
}
|
|
@@ -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;;;;;;;;GAQG;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,IAAI,QAAQ,mBAMX;gBAEW,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAKrC;IAED,MAAM;
|
|
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;;;;;;;;GAQG;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,IAAI,QAAQ,mBAMX;gBAEW,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAoDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,OAAQ,OAAO,GAAG,IAAI,UAKrC;IAED,MAAM;CA0CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/View/styles.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAGV,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AA0UnD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,SAAS,SAClB,SAAS,KACf,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/View/styles.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EAGV,SAAS,EACV,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AA0UnD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,SAAS,SAClB,SAAS,KACf,SA6OF,CAAA;AACD,eAAe,aAAa,CAAA"}
|