@instructure/ui-instructure 11.6.0 → 11.6.1-snapshot-129
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 +30 -75
- package/es/AiInformation/{index.js → v1/index.js} +8 -7
- package/es/AiInformation/v2/index.js +195 -0
- package/es/AiInformation/v2/props.js +26 -0
- package/es/AiInformation/v2/styles.js +93 -0
- package/es/DataPermissionLevels/{index.js → v1/index.js} +6 -6
- package/es/NutritionFacts/{index.js → v1/index.js} +6 -6
- package/es/{index.js → exports/a.js} +3 -3
- package/es/exports/b.js +26 -0
- package/lib/AiInformation/{index.js → v1/index.js} +21 -20
- package/lib/AiInformation/v2/index.js +202 -0
- package/lib/AiInformation/v2/props.js +31 -0
- package/lib/AiInformation/v2/styles.js +99 -0
- package/lib/DataPermissionLevels/{index.js → v1/index.js} +18 -19
- package/lib/NutritionFacts/{index.js → v1/index.js} +20 -21
- package/lib/{index.js → exports/a.js} +6 -6
- package/lib/exports/b.js +26 -0
- package/package.json +45 -23
- package/src/AiInformation/{index.tsx → v1/index.tsx} +8 -7
- package/src/AiInformation/{props.ts → v1/props.ts} +2 -1
- package/src/AiInformation/v2/README.md +302 -0
- package/src/AiInformation/v2/index.tsx +197 -0
- package/src/AiInformation/v2/props.ts +163 -0
- package/src/AiInformation/v2/styles.ts +101 -0
- package/src/DataPermissionLevels/{index.tsx → v1/index.tsx} +6 -6
- package/src/NutritionFacts/{index.tsx → v1/index.tsx} +6 -6
- package/src/{index.ts → exports/a.ts} +6 -6
- package/src/exports/b.ts +29 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/AiInformation/v1/index.d.ts.map +1 -0
- package/types/AiInformation/{props.d.ts → v1/props.d.ts} +2 -1
- package/types/AiInformation/v1/props.d.ts.map +1 -0
- package/types/AiInformation/v1/styles.d.ts.map +1 -0
- package/types/AiInformation/v1/theme.d.ts.map +1 -0
- package/types/AiInformation/v2/index.d.ts +10 -0
- package/types/AiInformation/v2/index.d.ts.map +1 -0
- package/types/AiInformation/v2/props.d.ts +97 -0
- package/types/AiInformation/v2/props.d.ts.map +1 -0
- package/types/AiInformation/v2/styles.d.ts +15 -0
- package/types/AiInformation/v2/styles.d.ts.map +1 -0
- package/types/DataPermissionLevels/v1/index.d.ts.map +1 -0
- package/types/DataPermissionLevels/v1/props.d.ts.map +1 -0
- package/types/DataPermissionLevels/v1/styles.d.ts.map +1 -0
- package/types/DataPermissionLevels/v1/theme.d.ts.map +1 -0
- package/types/NutritionFacts/v1/index.d.ts.map +1 -0
- package/types/NutritionFacts/v1/props.d.ts.map +1 -0
- package/types/NutritionFacts/v1/styles.d.ts.map +1 -0
- package/types/NutritionFacts/v1/theme.d.ts.map +1 -0
- package/types/exports/a.d.ts +7 -0
- package/types/exports/a.d.ts.map +1 -0
- package/types/exports/b.d.ts +7 -0
- package/types/exports/b.d.ts.map +1 -0
- package/types/AiInformation/index.d.ts.map +0 -1
- package/types/AiInformation/props.d.ts.map +0 -1
- package/types/AiInformation/styles.d.ts.map +0 -1
- package/types/AiInformation/theme.d.ts.map +0 -1
- package/types/DataPermissionLevels/index.d.ts.map +0 -1
- package/types/DataPermissionLevels/props.d.ts.map +0 -1
- package/types/DataPermissionLevels/styles.d.ts.map +0 -1
- package/types/DataPermissionLevels/theme.d.ts.map +0 -1
- package/types/NutritionFacts/index.d.ts.map +0 -1
- package/types/NutritionFacts/props.d.ts.map +0 -1
- package/types/NutritionFacts/styles.d.ts.map +0 -1
- package/types/NutritionFacts/theme.d.ts.map +0 -1
- package/types/index.d.ts +0 -7
- package/types/index.d.ts.map +0 -1
- /package/es/AiInformation/{props.js → v1/props.js} +0 -0
- /package/es/AiInformation/{styles.js → v1/styles.js} +0 -0
- /package/es/AiInformation/{theme.js → v1/theme.js} +0 -0
- /package/es/DataPermissionLevels/{props.js → v1/props.js} +0 -0
- /package/es/DataPermissionLevels/{styles.js → v1/styles.js} +0 -0
- /package/es/DataPermissionLevels/{theme.js → v1/theme.js} +0 -0
- /package/es/NutritionFacts/{props.js → v1/props.js} +0 -0
- /package/es/NutritionFacts/{styles.js → v1/styles.js} +0 -0
- /package/es/NutritionFacts/{theme.js → v1/theme.js} +0 -0
- /package/lib/AiInformation/{props.js → v1/props.js} +0 -0
- /package/lib/AiInformation/{styles.js → v1/styles.js} +0 -0
- /package/lib/AiInformation/{theme.js → v1/theme.js} +0 -0
- /package/lib/DataPermissionLevels/{props.js → v1/props.js} +0 -0
- /package/lib/DataPermissionLevels/{styles.js → v1/styles.js} +0 -0
- /package/lib/DataPermissionLevels/{theme.js → v1/theme.js} +0 -0
- /package/lib/NutritionFacts/{props.js → v1/props.js} +0 -0
- /package/lib/NutritionFacts/{styles.js → v1/styles.js} +0 -0
- /package/lib/NutritionFacts/{theme.js → v1/theme.js} +0 -0
- /package/src/AiInformation/{README.md → v1/README.md} +0 -0
- /package/src/AiInformation/{styles.ts → v1/styles.ts} +0 -0
- /package/src/AiInformation/{theme.ts → v1/theme.ts} +0 -0
- /package/src/DataPermissionLevels/{README.md → v1/README.md} +0 -0
- /package/src/DataPermissionLevels/{props.ts → v1/props.ts} +0 -0
- /package/src/DataPermissionLevels/{styles.ts → v1/styles.ts} +0 -0
- /package/src/DataPermissionLevels/{theme.ts → v1/theme.ts} +0 -0
- /package/src/NutritionFacts/{README.md → v1/README.md} +0 -0
- /package/src/NutritionFacts/{props.ts → v1/props.ts} +0 -0
- /package/src/NutritionFacts/{styles.ts → v1/styles.ts} +0 -0
- /package/src/NutritionFacts/{theme.ts → v1/theme.ts} +0 -0
- /package/types/AiInformation/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/AiInformation/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/AiInformation/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/DataPermissionLevels/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/DataPermissionLevels/{props.d.ts → v1/props.d.ts} +0 -0
- /package/types/DataPermissionLevels/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/DataPermissionLevels/{theme.d.ts → v1/theme.d.ts} +0 -0
- /package/types/NutritionFacts/{index.d.ts → v1/index.d.ts} +0 -0
- /package/types/NutritionFacts/{props.d.ts → v1/props.d.ts} +0 -0
- /package/types/NutritionFacts/{styles.d.ts → v1/styles.d.ts} +0 -0
- /package/types/NutritionFacts/{theme.d.ts → v1/theme.d.ts} +0 -0
|
@@ -7,12 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.NutritionFacts = void 0;
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var _Link = require("@instructure/ui-link/lib/Link");
|
|
10
|
+
var _v11_ = require("@instructure/ui-modal/v11_6");
|
|
11
|
+
var _v11_2 = require("@instructure/ui-buttons/v11_6");
|
|
12
|
+
var _v11_3 = require("@instructure/ui-heading/v11_6");
|
|
13
|
+
var _v11_4 = require("@instructure/ui-text/v11_6");
|
|
14
|
+
var _v11_5 = require("@instructure/ui-link/v11_6");
|
|
16
15
|
var _emotion = require("@instructure/emotion");
|
|
17
16
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
18
17
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
@@ -59,14 +58,14 @@ category: components/AI Components
|
|
|
59
58
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
60
59
|
open = _useState2[0],
|
|
61
60
|
setOpen = _useState2[1];
|
|
62
|
-
const styles = (0, _emotion.
|
|
61
|
+
const styles = (0, _emotion.useStyleLegacy)({
|
|
63
62
|
generateStyle: _styles.default,
|
|
64
63
|
generateComponentTheme: _theme.default,
|
|
65
64
|
componentId: 'NutritionFacts',
|
|
66
65
|
displayName: 'NutritionFacts'
|
|
67
66
|
});
|
|
68
67
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
69
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
68
|
+
children: [(0, _jsxRuntime.jsx)(_v11_5.Link, {
|
|
70
69
|
variant: "standalone",
|
|
71
70
|
onClick: e => {
|
|
72
71
|
e.preventDefault();
|
|
@@ -75,7 +74,7 @@ category: components/AI Components
|
|
|
75
74
|
forceButtonRole: false,
|
|
76
75
|
href: "#",
|
|
77
76
|
children: triggerText
|
|
78
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
77
|
+
}), (0, _jsxRuntime.jsxs)(_v11_.Modal, {
|
|
79
78
|
open: open,
|
|
80
79
|
onDismiss: () => {
|
|
81
80
|
setOpen(false);
|
|
@@ -83,22 +82,22 @@ category: components/AI Components
|
|
|
83
82
|
label: modalLabel,
|
|
84
83
|
shouldCloseOnDocumentClick: true,
|
|
85
84
|
size: fullscreen ? 'fullscreen' : 'medium',
|
|
86
|
-
children: [(0, _jsxRuntime.jsxs)(
|
|
85
|
+
children: [(0, _jsxRuntime.jsxs)(_v11_.Modal.Header, {
|
|
87
86
|
spacing: "compact",
|
|
88
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
87
|
+
children: [(0, _jsxRuntime.jsx)(_v11_3.Heading, {
|
|
89
88
|
aiVariant: "stacked",
|
|
90
89
|
children: title
|
|
91
|
-
}), (0, _jsxRuntime.jsx)(
|
|
90
|
+
}), (0, _jsxRuntime.jsx)(_v11_2.CloseButton, {
|
|
92
91
|
size: "medium",
|
|
93
92
|
placement: "end",
|
|
94
93
|
offset: "small",
|
|
95
94
|
onClick: () => setOpen(false),
|
|
96
95
|
screenReaderLabel: closeIconButtonScreenReaderLabel
|
|
97
96
|
})]
|
|
98
|
-
}), (0, _jsxRuntime.jsx)(
|
|
97
|
+
}), (0, _jsxRuntime.jsx)(_v11_.Modal.Body, {
|
|
99
98
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
100
99
|
css: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
101
|
-
children: [(0, _jsxRuntime.jsxs)(
|
|
100
|
+
children: [(0, _jsxRuntime.jsxs)(_v11_3.Heading, {
|
|
102
101
|
variant: "titleSection",
|
|
103
102
|
level: "h3",
|
|
104
103
|
children: [' ', featureName, ' ']
|
|
@@ -108,7 +107,7 @@ category: components/AI Components
|
|
|
108
107
|
}, index) => {
|
|
109
108
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
110
109
|
css: styles === null || styles === void 0 ? void 0 : styles.blockContainer,
|
|
111
|
-
children: [(0, _jsxRuntime.jsxs)(
|
|
110
|
+
children: [(0, _jsxRuntime.jsxs)(_v11_3.Heading, {
|
|
112
111
|
variant: "titleModule",
|
|
113
112
|
level: "h4",
|
|
114
113
|
children: [' ', blockTitle, ' ']
|
|
@@ -124,18 +123,18 @@ category: components/AI Components
|
|
|
124
123
|
css: styles === null || styles === void 0 ? void 0 : styles.segmentCard,
|
|
125
124
|
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
126
125
|
css: styles === null || styles === void 0 ? void 0 : styles.segmentCardExplainerContainer,
|
|
127
|
-
children: [(0, _jsxRuntime.jsxs)(
|
|
126
|
+
children: [(0, _jsxRuntime.jsxs)(_v11_3.Heading, {
|
|
128
127
|
variant: "label",
|
|
129
128
|
children: [' ', segmentTitle, ' ']
|
|
130
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
129
|
+
}), (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
131
130
|
variant: "contentSmall",
|
|
132
131
|
color: "secondary",
|
|
133
132
|
children: [' ', description, ' ']
|
|
134
133
|
})]
|
|
135
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
134
|
+
}), (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
136
135
|
variant: "content",
|
|
137
136
|
children: [" ", value, " "]
|
|
138
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
137
|
+
}), (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
139
138
|
variant: "contentSmall",
|
|
140
139
|
color: "secondary",
|
|
141
140
|
children: [' ', valueDescription, ' ']
|
|
@@ -146,8 +145,8 @@ category: components/AI Components
|
|
|
146
145
|
}, index);
|
|
147
146
|
})]
|
|
148
147
|
})
|
|
149
|
-
}), (0, _jsxRuntime.jsx)(
|
|
150
|
-
children: (0, _jsxRuntime.jsx)(
|
|
148
|
+
}), (0, _jsxRuntime.jsx)(_v11_.Modal.Footer, {
|
|
149
|
+
children: (0, _jsxRuntime.jsx)(_v11_2.Button, {
|
|
151
150
|
onClick: () => setOpen(false),
|
|
152
151
|
children: closeButtonText
|
|
153
152
|
})
|
|
@@ -6,21 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "AiInformation", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _v3.AiInformation;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DataPermissionLevels", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _v2.DataPermissionLevels;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "NutritionFacts", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _v.NutritionFacts;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
24
|
+
var _v = require("../NutritionFacts/v1");
|
|
25
|
+
var _v2 = require("../DataPermissionLevels/v1");
|
|
26
|
+
var _v3 = require("../AiInformation/v1");
|
package/lib/exports/b.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AiInformation", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _v3.AiInformation;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "DataPermissionLevels", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _v2.DataPermissionLevels;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "NutritionFacts", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _v.NutritionFacts;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _v = require("../NutritionFacts/v1");
|
|
25
|
+
var _v2 = require("../DataPermissionLevels/v1");
|
|
26
|
+
var _v3 = require("../AiInformation/v2");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-instructure",
|
|
3
|
-
"version": "11.6.
|
|
3
|
+
"version": "11.6.1-snapshot-129",
|
|
4
4
|
"description": "Collection of specific components for Instructure products",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.27.6",
|
|
18
|
-
"@instructure/emotion": "11.6.
|
|
19
|
-
"@instructure/shared-types": "11.6.
|
|
20
|
-
"@instructure/ui-
|
|
21
|
-
"@instructure/ui-
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-link": "11.6.
|
|
24
|
-
"@instructure/ui-modal": "11.6.
|
|
25
|
-
"@instructure/ui-
|
|
26
|
-
"@instructure/ui-
|
|
27
|
-
"@instructure/ui-
|
|
28
|
-
"@instructure/ui-
|
|
18
|
+
"@instructure/emotion": "11.6.1-snapshot-129",
|
|
19
|
+
"@instructure/shared-types": "11.6.1-snapshot-129",
|
|
20
|
+
"@instructure/ui-heading": "11.6.1-snapshot-129",
|
|
21
|
+
"@instructure/ui-icons": "11.6.1-snapshot-129",
|
|
22
|
+
"@instructure/ui-buttons": "11.6.1-snapshot-129",
|
|
23
|
+
"@instructure/ui-link": "11.6.1-snapshot-129",
|
|
24
|
+
"@instructure/ui-modal": "11.6.1-snapshot-129",
|
|
25
|
+
"@instructure/ui-popover": "11.6.1-snapshot-129",
|
|
26
|
+
"@instructure/ui-react-utils": "11.6.1-snapshot-129",
|
|
27
|
+
"@instructure/ui-view": "11.6.1-snapshot-129",
|
|
28
|
+
"@instructure/ui-text": "11.6.1-snapshot-129"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@testing-library/jest-dom": "^6.6.3",
|
|
32
32
|
"@testing-library/react": "15.0.7",
|
|
33
33
|
"vitest": "^3.2.2",
|
|
34
|
-
"@instructure/ui-
|
|
35
|
-
"@instructure/ui-
|
|
36
|
-
"@instructure/ui-color-utils": "11.6.
|
|
37
|
-
"@instructure/ui-themes": "11.6.
|
|
34
|
+
"@instructure/ui-axe-check": "11.6.1-snapshot-129",
|
|
35
|
+
"@instructure/ui-babel-preset": "11.6.1-snapshot-129",
|
|
36
|
+
"@instructure/ui-color-utils": "11.6.1-snapshot-129",
|
|
37
|
+
"@instructure/ui-themes": "11.6.1-snapshot-129"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=18 <=19"
|
|
@@ -44,17 +44,39 @@
|
|
|
44
44
|
},
|
|
45
45
|
"sideEffects": false,
|
|
46
46
|
"exports": {
|
|
47
|
-
".": {
|
|
48
|
-
"types": "./types/index.d.ts",
|
|
49
|
-
"import": "./es/index.js",
|
|
50
|
-
"require": "./lib/index.js",
|
|
51
|
-
"default": "./es/index.js"
|
|
52
|
-
},
|
|
53
47
|
"./lib/*": "./lib/*",
|
|
54
48
|
"./es/*": "./es/*",
|
|
55
49
|
"./types/*": "./types/*",
|
|
56
50
|
"./package.json": "./package.json",
|
|
57
|
-
"./src/*": "./src/*"
|
|
51
|
+
"./src/*": "./src/*",
|
|
52
|
+
".": {
|
|
53
|
+
"src": "./src/exports/a.ts",
|
|
54
|
+
"types": "./types/exports/a.d.ts",
|
|
55
|
+
"import": "./es/exports/a.js",
|
|
56
|
+
"require": "./lib/exports/a.js",
|
|
57
|
+
"default": "./es/exports/a.js"
|
|
58
|
+
},
|
|
59
|
+
"./v11_6": {
|
|
60
|
+
"src": "./src/exports/a.ts",
|
|
61
|
+
"types": "./types/exports/a.d.ts",
|
|
62
|
+
"import": "./es/exports/a.js",
|
|
63
|
+
"require": "./lib/exports/a.js",
|
|
64
|
+
"default": "./es/exports/a.js"
|
|
65
|
+
},
|
|
66
|
+
"./v11_7": {
|
|
67
|
+
"src": "./src/exports/b.ts",
|
|
68
|
+
"types": "./types/exports/b.d.ts",
|
|
69
|
+
"import": "./es/exports/b.js",
|
|
70
|
+
"require": "./lib/exports/b.js",
|
|
71
|
+
"default": "./es/exports/b.js"
|
|
72
|
+
},
|
|
73
|
+
"./latest": {
|
|
74
|
+
"src": "./src/exports/b.ts",
|
|
75
|
+
"types": "./types/exports/b.d.ts",
|
|
76
|
+
"import": "./es/exports/b.js",
|
|
77
|
+
"require": "./lib/exports/b.js",
|
|
78
|
+
"default": "./es/exports/b.js"
|
|
79
|
+
}
|
|
58
80
|
},
|
|
59
81
|
"scripts": {
|
|
60
82
|
"lint": "ui-scripts lint",
|
|
@@ -22,14 +22,15 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
import { useState } from 'react'
|
|
25
|
-
import { Popover } from '@instructure/ui-popover'
|
|
26
|
-
import { CloseButton } from '@instructure/ui-buttons'
|
|
27
|
-
import { Heading } from '@instructure/ui-heading'
|
|
28
|
-
import { Text } from '@instructure/ui-text'
|
|
29
|
-
import { Link } from '@instructure/ui-link'
|
|
25
|
+
import { Popover } from '@instructure/ui-popover/v11_6'
|
|
26
|
+
import { CloseButton } from '@instructure/ui-buttons/v11_6'
|
|
27
|
+
import { Heading } from '@instructure/ui-heading/v11_6'
|
|
28
|
+
import { Text } from '@instructure/ui-text/v11_6'
|
|
29
|
+
import { Link } from '@instructure/ui-link/v11_6'
|
|
30
30
|
import { IconExternalLinkLine } from '@instructure/ui-icons'
|
|
31
|
-
import { useStyle } from '@instructure/emotion'
|
|
32
|
-
import { NutritionFacts
|
|
31
|
+
import { useStyleLegacy as useStyle } from '@instructure/emotion'
|
|
32
|
+
import { NutritionFacts } from '../../NutritionFacts/v1'
|
|
33
|
+
import { DataPermissionLevels } from '../../DataPermissionLevels/v1'
|
|
33
34
|
|
|
34
35
|
import { AiInformationProps } from './props'
|
|
35
36
|
import generateStyle from './styles'
|
|
@@ -27,7 +27,8 @@ import type {
|
|
|
27
27
|
OtherHTMLAttributes,
|
|
28
28
|
Renderable
|
|
29
29
|
} from '@instructure/shared-types'
|
|
30
|
-
import type { NutritionFactsProps
|
|
30
|
+
import type { NutritionFactsProps } from '../../NutritionFacts/v1/props'
|
|
31
|
+
import type { DataPermissionLevelsProps } from '../../DataPermissionLevels/v1/props'
|
|
31
32
|
|
|
32
33
|
type AiInformationOwnProps = {
|
|
33
34
|
/**
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
---
|
|
2
|
+
describes: AiInformation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
This component is made to display specific AI related data in Instructure products.
|
|
6
|
+
|
|
7
|
+
This component is composed from
|
|
8
|
+
|
|
9
|
+
- `NutritionFacts`
|
|
10
|
+
- `DataPermissionLevels`
|
|
11
|
+
|
|
12
|
+
It copies their API exactly, with their name as prefix (e.g.: dataPermissionLevels' `title` becomes `dataPermissionLevelsTitle`). This leads to some redundancy of the data, but makes it easier to use the component.
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
---
|
|
16
|
+
type: example
|
|
17
|
+
readonly: true
|
|
18
|
+
---
|
|
19
|
+
<div>
|
|
20
|
+
<AiInformation
|
|
21
|
+
trigger={<Button>AI information</Button>}
|
|
22
|
+
title="Features"
|
|
23
|
+
data={[
|
|
24
|
+
{
|
|
25
|
+
featureName: "Feature name",
|
|
26
|
+
privacyNoticeText: "AI Privacy Notice",
|
|
27
|
+
privacyNoticeUrl: "https://www.instructure.com/policies/artificial-intelligence-privacy",
|
|
28
|
+
permissionLevelText: "Permission Level",
|
|
29
|
+
permissionLevel: "Level 1",
|
|
30
|
+
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",
|
|
31
|
+
permissionLevelsModalTriggerText: "Permission Levels",
|
|
32
|
+
modelNameText: "Base Model",
|
|
33
|
+
modelName: "Claude 3 Haiku",
|
|
34
|
+
nutritionFactsModalTriggerText: "AI Nutrition Facts"
|
|
35
|
+
}
|
|
36
|
+
]}
|
|
37
|
+
|
|
38
|
+
dataPermissionLevelsTitle="Data Permission Levels"
|
|
39
|
+
dataPermissionLevelsCurrentFeatureText="Current Feature:"
|
|
40
|
+
dataPermissionLevelsCurrentFeature="Feature name"
|
|
41
|
+
dataPermissionLevelsCloseIconButtonScreenReaderLabel="Close"
|
|
42
|
+
dataPermissionLevelsCloseButtonText="Close"
|
|
43
|
+
dataPermissionLevelsModalLabel="This is a Data Permission Levels modal"
|
|
44
|
+
dataPermissionLevelsTriggerText="Data Permission Levels"
|
|
45
|
+
dataPermissionLevelsData={[
|
|
46
|
+
{
|
|
47
|
+
level: "Level 1",
|
|
48
|
+
title: "Descriptive Analytics and Research",
|
|
49
|
+
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",
|
|
50
|
+
highlighted:true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
level: "Level 2",
|
|
54
|
+
title: "AI-Powered Features Without Data Training",
|
|
55
|
+
description: "We utilize off-the-shelf AI models and customer data as input to provide AI-powered features. No data is used for training this model."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
level: "Level 3",
|
|
59
|
+
title: "AI Customization for Individual Institutions",
|
|
60
|
+
description: "We customize AI solutions tailored to the unique needs and resources of educational institutions. We use customer data to fine-tune data and train AI models that only serve your institution. Your institution’s data only serves them through trained models."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
level: "Level 4",
|
|
64
|
+
title: "Collaborative AI Consortium",
|
|
65
|
+
description: "We established a consortium with educational institutions that shares anonymized data, best practices, and research findings. This fosters collaboration and accelerates the responsible development of AI in education. Specialized AI models are created for better outcomes in education, cost savings, and more."
|
|
66
|
+
},
|
|
67
|
+
]}
|
|
68
|
+
|
|
69
|
+
nutritionFactsModalLabel="This is a modal for AI facts"
|
|
70
|
+
nutritionFactsTitle="Nutrition Facts"
|
|
71
|
+
nutritionFactsFeatureName="Feature Name"
|
|
72
|
+
nutritionFactsCloseButtonText="Close"
|
|
73
|
+
nutritionFactsCloseIconButtonScreenReaderLabel="Close"
|
|
74
|
+
nutritionFactsTriggerText="Nutrition Facts"
|
|
75
|
+
nutritionFactsData={[
|
|
76
|
+
{
|
|
77
|
+
blockTitle: "Model & Data",
|
|
78
|
+
segmentData:[
|
|
79
|
+
{
|
|
80
|
+
segmentTitle: "Base Model",
|
|
81
|
+
description: "The foundational AI on which further training and customizations are built.",
|
|
82
|
+
value: "Value",
|
|
83
|
+
valueDescription: "Description"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
segmentTitle: "Trained with User Data",
|
|
87
|
+
description: "Indicates the AI model has been given customer data in order to improve its results.",
|
|
88
|
+
value: "Value",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
segmentTitle: "Data Shared with Model",
|
|
92
|
+
description: "Indicates which training or operational content was given to the model.",
|
|
93
|
+
value: "Value",
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
blockTitle: "Privacy & Compliance",
|
|
99
|
+
segmentData:[
|
|
100
|
+
{
|
|
101
|
+
segmentTitle: "Data Retention",
|
|
102
|
+
description: "How long the model stores customer data.",
|
|
103
|
+
value: "Value",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
segmentTitle: "Data Logging",
|
|
107
|
+
description: "Recording the AI's performance for auditing, analysis, and improvement.",
|
|
108
|
+
value: "Value",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
segmentTitle: "Regions Supported",
|
|
112
|
+
description: "The locations where the AI model is officially available and supported.",
|
|
113
|
+
value: "Value",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
segmentTitle: "PII",
|
|
117
|
+
description: "Sensitive data that can be used to identify an individual.",
|
|
118
|
+
value: "Value",
|
|
119
|
+
},
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
blockTitle: "Outputs",
|
|
124
|
+
segmentData:[
|
|
125
|
+
{
|
|
126
|
+
segmentTitle: "AI Settings Control",
|
|
127
|
+
description: "The ability to turn the AI on or off within the product.",
|
|
128
|
+
value: "Value",
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
segmentTitle: "Human in the Loop",
|
|
132
|
+
description: "Indicates if a human is involved in the AI's process or output.",
|
|
133
|
+
value: "Value",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
segmentTitle: "Guardrails",
|
|
137
|
+
description: "Preventative safety mechanisms or limitations built into the AI model.",
|
|
138
|
+
value: "Value",
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
segmentTitle: "Expected Risks",
|
|
142
|
+
description: "Any risks the model may pose to the user.",
|
|
143
|
+
value: "Value",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
segmentTitle: "Intended Outcomes",
|
|
147
|
+
description: "The specific results the AI model is meant to achieve.",
|
|
148
|
+
value: "Value",
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
]}
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Small Viewport
|
|
158
|
+
|
|
159
|
+
For mobile and other small viewport devices, modals should be fullscreen. Set the `fullscreenModals` prop to make them so.
|
|
160
|
+
|
|
161
|
+
```js
|
|
162
|
+
---
|
|
163
|
+
type: example
|
|
164
|
+
readonly: true
|
|
165
|
+
---
|
|
166
|
+
<div>
|
|
167
|
+
<AiInformation
|
|
168
|
+
fullscreenModals
|
|
169
|
+
trigger={<Button>AI information</Button>}
|
|
170
|
+
title="Features"
|
|
171
|
+
data={[
|
|
172
|
+
{
|
|
173
|
+
featureName: "Feature name",
|
|
174
|
+
privacyNoticeText: "AI Privacy Notice",
|
|
175
|
+
privacyNoticeUrl: "https://www.instructure.com/policies/artificial-intelligence-privacy",
|
|
176
|
+
permissionLevelText: "Permission Level",
|
|
177
|
+
permissionLevel: "Level 1",
|
|
178
|
+
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",
|
|
179
|
+
permissionLevelsModalTriggerText: "Permission Levels",
|
|
180
|
+
modelNameText: "Base Model",
|
|
181
|
+
modelName: "Claude 3 Haiku",
|
|
182
|
+
nutritionFactsModalTriggerText: "AI Nutrition Facts"
|
|
183
|
+
}
|
|
184
|
+
]}
|
|
185
|
+
|
|
186
|
+
dataPermissionLevelsTitle="Data Permission Levels"
|
|
187
|
+
dataPermissionLevelsCurrentFeatureText="Current Feature:"
|
|
188
|
+
dataPermissionLevelsCurrentFeature="Feature name"
|
|
189
|
+
dataPermissionLevelsCloseIconButtonScreenReaderLabel="Close"
|
|
190
|
+
dataPermissionLevelsCloseButtonText="Close"
|
|
191
|
+
dataPermissionLevelsModalLabel="This is a Data Permission Levels modal"
|
|
192
|
+
dataPermissionLevelsTriggerText="Data Permission Levels"
|
|
193
|
+
dataPermissionLevelsData={[
|
|
194
|
+
{
|
|
195
|
+
level: "Level 1",
|
|
196
|
+
title: "Descriptive Analytics and Research",
|
|
197
|
+
description: "We leverage anonymized aggregate data for detailed analytics to inform model development and product improvements. No AI models are used at this level.",
|
|
198
|
+
highlighted:true
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
level: "Level 2",
|
|
202
|
+
title: "AI-Powered Features Without Data Training",
|
|
203
|
+
description: "We utilize off-the-shelf AI models and customer data as input to provide AI-powered features. No data is used for training this model."
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
level: "Level 3",
|
|
207
|
+
title: "AI Customization for Individual Institutions",
|
|
208
|
+
description: "We customize AI solutions tailored to the unique needs and resources of educational institutions. We use customer data to fine-tune data and train AI models that only serve your institution. Your institution’s data only serves them through trained models."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
level: "Level 4",
|
|
212
|
+
title: "Collaborative AI Consortium",
|
|
213
|
+
description: "We established a consortium with educational institutions that shares anonymized data, best practices, and research findings. This fosters collaboration and accelerates the responsible development of AI in education. Specialized AI models are created for better outcomes in education, cost savings, and more."
|
|
214
|
+
},
|
|
215
|
+
]}
|
|
216
|
+
|
|
217
|
+
nutritionFactsModalLabel="This is a modal for AI facts"
|
|
218
|
+
nutritionFactsTitle="Nutrition Facts"
|
|
219
|
+
nutritionFactsFeatureName="Feature Name"
|
|
220
|
+
nutritionFactsCloseButtonText="Close"
|
|
221
|
+
nutritionFactsCloseIconButtonScreenReaderLabel="Close"
|
|
222
|
+
nutritionFactsTriggerText="Nutrition Facts"
|
|
223
|
+
nutritionFactsData={[
|
|
224
|
+
{
|
|
225
|
+
blockTitle: "Model & Data",
|
|
226
|
+
segmentData:[
|
|
227
|
+
{
|
|
228
|
+
segmentTitle: "Base Model",
|
|
229
|
+
description: "The foundational AI on which further training and customizations are built.",
|
|
230
|
+
value: "Value",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
segmentTitle: "Trained with User Data",
|
|
234
|
+
description: "Indicates the AI model has been given customer data in order to improve its results.",
|
|
235
|
+
value: "Value",
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
segmentTitle: "Data Shared with Model",
|
|
239
|
+
description: "Indicates which training or operational content was given to the model.",
|
|
240
|
+
value: "Value",
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
blockTitle: "Privacy & Compliance",
|
|
246
|
+
segmentData:[
|
|
247
|
+
{
|
|
248
|
+
segmentTitle: "Data Retention",
|
|
249
|
+
description: "How long the model stores customer data.",
|
|
250
|
+
value: "Value",
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
segmentTitle: "Data Logging",
|
|
254
|
+
description: "Recording the AI's performance for auditing, analysis, and improvement.",
|
|
255
|
+
value: "Value",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
segmentTitle: "Regions Supported",
|
|
259
|
+
description: "The locations where the AI model is officially available and supported.",
|
|
260
|
+
value: "Value",
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
segmentTitle: "PII",
|
|
264
|
+
description: "Sensitive data that can be used to identify an individual.",
|
|
265
|
+
value: "Value",
|
|
266
|
+
},
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
blockTitle: "Outputs",
|
|
271
|
+
segmentData:[
|
|
272
|
+
{
|
|
273
|
+
segmentTitle: "AI Settings Control",
|
|
274
|
+
description: "The ability to turn the AI on or off within the product.",
|
|
275
|
+
value: "Value",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
segmentTitle: "Human in the Loop",
|
|
279
|
+
description: "Indicates if a human is involved in the AI's process or output.",
|
|
280
|
+
value: "Value",
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
segmentTitle: "Guardrails",
|
|
284
|
+
description: "Preventative safety mechanisms or limitations built into the AI model.",
|
|
285
|
+
value: "Value",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
segmentTitle: "Expected Risks",
|
|
289
|
+
description: "Any risks the model may pose to the user.",
|
|
290
|
+
value: "Value",
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
segmentTitle: "Intended Outcomes",
|
|
294
|
+
description: "The specific results the AI model is meant to achieve.",
|
|
295
|
+
value: "Value",
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
]}
|
|
300
|
+
/>
|
|
301
|
+
</div>
|
|
302
|
+
```
|