@instructure/ui-alerts 8.9.2-snapshot.3 → 8.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.10.0](https://github.com/instructure/instructure-ui/compare/v8.9.1...v8.10.0) (2021-09-28)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-alerts
9
+
6
10
  ## [8.9.1](https://github.com/instructure/instructure-ui/compare/v8.9.0...v8.9.1) (2021-09-16)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-alerts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "8.9.2-snapshot.3+ddc7880d5",
3
+ "version": "8.10.0",
4
4
  "description": "An alert component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -24,24 +24,24 @@
24
24
  },
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@instructure/ui-babel-preset": "8.9.2-snapshot.3+ddc7880d5",
28
- "@instructure/ui-color-utils": "8.9.2-snapshot.3+ddc7880d5",
29
- "@instructure/ui-test-utils": "8.9.2-snapshot.3+ddc7880d5"
27
+ "@instructure/ui-babel-preset": "8.10.0",
28
+ "@instructure/ui-color-utils": "8.10.0",
29
+ "@instructure/ui-test-utils": "8.10.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@babel/runtime": "^7.13.10",
33
- "@instructure/console": "8.9.2-snapshot.3+ddc7880d5",
34
- "@instructure/emotion": "8.9.2-snapshot.3+ddc7880d5",
35
- "@instructure/shared-types": "8.9.2-snapshot.3+ddc7880d5",
36
- "@instructure/ui-a11y-content": "8.9.2-snapshot.3+ddc7880d5",
37
- "@instructure/ui-buttons": "8.9.2-snapshot.3+ddc7880d5",
38
- "@instructure/ui-icons": "8.9.2-snapshot.3+ddc7880d5",
39
- "@instructure/ui-motion": "8.9.2-snapshot.3+ddc7880d5",
40
- "@instructure/ui-react-utils": "8.9.2-snapshot.3+ddc7880d5",
41
- "@instructure/ui-themes": "8.9.2-snapshot.3+ddc7880d5",
42
- "@instructure/ui-utils": "8.9.2-snapshot.3+ddc7880d5",
43
- "@instructure/ui-view": "8.9.2-snapshot.3+ddc7880d5",
44
- "@instructure/uid": "8.9.2-snapshot.3+ddc7880d5",
33
+ "@instructure/console": "8.10.0",
34
+ "@instructure/emotion": "8.10.0",
35
+ "@instructure/shared-types": "8.10.0",
36
+ "@instructure/ui-a11y-content": "8.10.0",
37
+ "@instructure/ui-buttons": "8.10.0",
38
+ "@instructure/ui-icons": "8.10.0",
39
+ "@instructure/ui-motion": "8.10.0",
40
+ "@instructure/ui-react-utils": "8.10.0",
41
+ "@instructure/ui-themes": "8.10.0",
42
+ "@instructure/ui-utils": "8.10.0",
43
+ "@instructure/ui-view": "8.10.0",
44
+ "@instructure/uid": "8.10.0",
45
45
  "keycode": "^2",
46
46
  "prop-types": "^15"
47
47
  },
@@ -52,6 +52,5 @@
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  },
55
- "sideEffects": false,
56
- "gitHead": "ddc7880d5a2f7d4d0596332e8d49cb9b1de68024"
55
+ "sideEffects": false
57
56
  }
@@ -27,8 +27,12 @@ import PropTypes from 'prop-types'
27
27
 
28
28
  import { ThemeablePropTypes } from '@instructure/emotion'
29
29
 
30
- import type { Spacing, WithStyleProps } from '@instructure/emotion'
31
- import type { PropValidators } from '@instructure/shared-types'
30
+ import type {
31
+ Spacing,
32
+ WithStyleProps,
33
+ ComponentStyle
34
+ } from '@instructure/emotion'
35
+ import type { AlertTheme, PropValidators } from '@instructure/shared-types'
32
36
 
33
37
  type AlertOwnProps = {
34
38
  children?: ReactNode
@@ -50,7 +54,9 @@ type PropKeys = keyof AlertOwnProps
50
54
 
51
55
  type AllowedPropKeys = Readonly<Array<PropKeys>>
52
56
 
53
- type AlertProps = AlertOwnProps & WithStyleProps
57
+ type AlertProps = AlertOwnProps & WithStyleProps<AlertTheme, AlertStyle>
58
+
59
+ type AlertStyle = ComponentStyle<'alert' | 'icon' | 'closeButton' | 'content'>
54
60
 
55
61
  const propTypes: PropValidators<PropKeys> = {
56
62
  /**
@@ -126,5 +132,5 @@ const allowedProps: AllowedPropKeys = [
126
132
  'hasShadow'
127
133
  ]
128
134
 
129
- export type { AlertProps }
135
+ export type { AlertProps, AlertStyle }
130
136
  export { propTypes, allowedProps }
@@ -22,8 +22,8 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
 
25
- import { AlertTheme } from '@instructure/shared-types'
26
- import { AlertProps } from './props'
25
+ import type { AlertTheme } from '@instructure/shared-types'
26
+ import type { AlertProps, AlertStyle } from './props'
27
27
 
28
28
  /**
29
29
  * ---
@@ -35,7 +35,10 @@ import { AlertProps } from './props'
35
35
  * @param {Object} state the state of the component, the style is applied to
36
36
  * @return {Object} The final style object, which will be used in the component
37
37
  */
38
- const generateStyle = (componentTheme: AlertTheme, props: AlertProps) => {
38
+ const generateStyle = (
39
+ componentTheme: AlertTheme,
40
+ props: AlertProps
41
+ ): AlertStyle => {
39
42
  const { variant, hasShadow } = props
40
43
 
41
44
  const variantStyles = {
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import type { Spacing, WithStyleProps } from '@instructure/emotion';
3
- import type { PropValidators } from '@instructure/shared-types';
2
+ import type { Spacing, WithStyleProps, ComponentStyle } from '@instructure/emotion';
3
+ import type { AlertTheme, PropValidators } from '@instructure/shared-types';
4
4
  declare type AlertOwnProps = {
5
5
  children?: ReactNode;
6
6
  variant?: 'info' | 'success' | 'warning' | 'error';
@@ -18,9 +18,10 @@ declare type AlertOwnProps = {
18
18
  };
19
19
  declare type PropKeys = keyof AlertOwnProps;
20
20
  declare type AllowedPropKeys = Readonly<Array<PropKeys>>;
21
- declare type AlertProps = AlertOwnProps & WithStyleProps;
21
+ declare type AlertProps = AlertOwnProps & WithStyleProps<AlertTheme, AlertStyle>;
22
+ declare type AlertStyle = ComponentStyle<'alert' | 'icon' | 'closeButton' | 'content'>;
22
23
  declare const propTypes: PropValidators<PropKeys>;
23
24
  declare const allowedProps: AllowedPropKeys;
24
- export type { AlertProps };
25
+ export type { AlertProps, AlertStyle };
25
26
  export { propTypes, allowedProps };
26
27
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/Alert/props.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjC,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,aAAK,aAAa,GAAG;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;IAClD,UAAU,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACpC,oBAAoB,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAA;IAC7C,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,sBAAsB,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,GAAG,SAAS,CAAA;IAC9D,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAA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GAAG,EAAE,KAAK,GAAG,CAAA;IACnC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,aAAK,QAAQ,GAAG,MAAM,aAAa,CAAA;AAEnC,aAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,aAAK,UAAU,GAAG,aAAa,GAAG,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;AAExE,aAAK,UAAU,GAAG,cAAc,CAAC,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC,CAAA;AAE9E,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAwDvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eAcnB,CAAA;AAED,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
@@ -1,5 +1,5 @@
1
- import { AlertTheme } from '@instructure/shared-types';
2
- import { AlertProps } from './props';
1
+ import type { AlertTheme } from '@instructure/shared-types';
2
+ import type { AlertProps, AlertStyle } from './props';
3
3
  /**
4
4
  * ---
5
5
  * private: true
@@ -10,119 +10,6 @@ import { AlertProps } from './props';
10
10
  * @param {Object} state the state of the component, the style is applied to
11
11
  * @return {Object} The final style object, which will be used in the component
12
12
  */
13
- declare const generateStyle: (componentTheme: AlertTheme, props: AlertProps) => {
14
- alert: {
15
- boxShadow?: string | undefined;
16
- borderColor: string;
17
- label: string;
18
- color: string;
19
- background: string;
20
- boxSizing: string;
21
- display: string;
22
- minWidth: string;
23
- borderWidth: string | 0;
24
- borderStyle: string;
25
- borderRadius: string | 0;
26
- } | {
27
- boxShadow?: string | undefined;
28
- borderColor: string;
29
- label: string;
30
- color: string;
31
- background: string;
32
- boxSizing: string;
33
- display: string;
34
- minWidth: string;
35
- borderWidth: string | 0;
36
- borderStyle: string;
37
- borderRadius: string | 0;
38
- } | {
39
- boxShadow?: string | undefined;
40
- borderColor: string;
41
- label: string;
42
- color: string;
43
- background: string;
44
- boxSizing: string;
45
- display: string;
46
- minWidth: string;
47
- borderWidth: string | 0;
48
- borderStyle: string;
49
- borderRadius: string | 0;
50
- } | {
51
- boxShadow?: string | undefined;
52
- borderColor: string;
53
- label: string;
54
- color: string;
55
- background: string;
56
- boxSizing: string;
57
- display: string;
58
- minWidth: string;
59
- borderWidth: string | 0;
60
- borderStyle: string;
61
- borderRadius: string | 0;
62
- };
63
- icon: {
64
- background: string;
65
- borderRightColor: string;
66
- color: string;
67
- boxSizing: string;
68
- flex: string;
69
- display: string;
70
- alignItems: string;
71
- justifyContent: string;
72
- fontSize: string;
73
- borderRight: string;
74
- } | {
75
- background: string;
76
- borderRightColor: string;
77
- color: string;
78
- boxSizing: string;
79
- flex: string;
80
- display: string;
81
- alignItems: string;
82
- justifyContent: string;
83
- fontSize: string;
84
- borderRight: string;
85
- } | {
86
- backgroundColor: string;
87
- borderRightColor: string;
88
- color: string;
89
- boxSizing: string;
90
- flex: string;
91
- display: string;
92
- alignItems: string;
93
- justifyContent: string;
94
- fontSize: string;
95
- borderRight: string;
96
- } | {
97
- background: string;
98
- borderRightColor: string;
99
- color: string;
100
- boxSizing: string;
101
- flex: string;
102
- display: string;
103
- alignItems: string;
104
- justifyContent: string;
105
- fontSize: string;
106
- borderRight: string;
107
- };
108
- closeButton: {
109
- boxSizing: string;
110
- display: string;
111
- alignItems: string;
112
- order: number;
113
- marginTop: string | 0;
114
- marginRight: string | 0;
115
- };
116
- content: {
117
- boxSizing: string;
118
- flex: number;
119
- minWidth: string;
120
- fontSize: string | 0;
121
- fontFamily: string;
122
- fontWeight: number;
123
- lineHeight: string | number;
124
- padding: string | 0;
125
- };
126
- };
13
+ declare const generateStyle: (componentTheme: AlertTheme, props: AlertProps) => AlertStyle;
127
14
  export default generateStyle;
128
15
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Alert/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEpC;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBAAoB,UAAU,SAAS,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EnE,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Alert/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAErD;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,mBACD,UAAU,SACnB,UAAU,KAChB,UA8EF,CAAA;AAED,eAAe,aAAa,CAAA"}
package/LICENSE.md DELETED
@@ -1,27 +0,0 @@
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.