@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,14 +7,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.AiInformation = 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 _IconExternalLinkLine2 = require("@instructure/ui-icons/lib/IconExternalLinkLine.js");
|
|
10
|
+
var _v11_ = require("@instructure/ui-popover/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");
|
|
15
|
+
var _IconExternalLinkLine2 = require("@instructure/ui-icons/lib/generated/IconExternalLinkLine.js");
|
|
16
16
|
var _emotion = require("@instructure/emotion");
|
|
17
|
-
var
|
|
17
|
+
var _v = require("../../NutritionFacts/v1");
|
|
18
|
+
var _v2 = require("../../DataPermissionLevels/v1");
|
|
18
19
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
19
20
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
20
21
|
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
@@ -70,14 +71,14 @@ const AiInformation = ({
|
|
|
70
71
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
71
72
|
open = _useState2[0],
|
|
72
73
|
setOpen = _useState2[1];
|
|
73
|
-
const styles = (0, _emotion.
|
|
74
|
+
const styles = (0, _emotion.useStyleLegacy)({
|
|
74
75
|
generateStyle: _styles.default,
|
|
75
76
|
generateComponentTheme: _theme.default,
|
|
76
77
|
componentId: 'AiInformation',
|
|
77
78
|
displayName: 'AiInformation'
|
|
78
79
|
});
|
|
79
80
|
return (0, _jsxRuntime.jsx)("div", {
|
|
80
|
-
children: (0, _jsxRuntime.jsx)(
|
|
81
|
+
children: (0, _jsxRuntime.jsx)(_v11_.Popover, {
|
|
81
82
|
renderTrigger: trigger,
|
|
82
83
|
isShowingContent: open,
|
|
83
84
|
on: "click",
|
|
@@ -92,12 +93,12 @@ const AiInformation = ({
|
|
|
92
93
|
css: styles === null || styles === void 0 ? void 0 : styles.aiInformation,
|
|
93
94
|
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
94
95
|
css: styles === null || styles === void 0 ? void 0 : styles.header,
|
|
95
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
96
|
+
children: [(0, _jsxRuntime.jsx)(_v11_3.Heading, {
|
|
96
97
|
level: "h2",
|
|
97
98
|
aiVariant: "stacked",
|
|
98
99
|
variant: "titleModule",
|
|
99
100
|
children: title
|
|
100
|
-
}), (0, _jsxRuntime.jsx)(
|
|
101
|
+
}), (0, _jsxRuntime.jsx)(_v11_2.CloseButton, {
|
|
101
102
|
placement: "end",
|
|
102
103
|
offset: "small",
|
|
103
104
|
onClick: () => setOpen(false),
|
|
@@ -118,7 +119,7 @@ const AiInformation = ({
|
|
|
118
119
|
}, index) => (0, _jsxRuntime.jsxs)("div", {
|
|
119
120
|
children: [(0, _jsxRuntime.jsx)("div", {
|
|
120
121
|
css: styles === null || styles === void 0 ? void 0 : styles.privacyNotice,
|
|
121
|
-
children: (0, _jsxRuntime.jsx)(
|
|
122
|
+
children: (0, _jsxRuntime.jsx)(_v11_5.Link, {
|
|
122
123
|
href: privacyNoticeUrl,
|
|
123
124
|
renderIcon: _IconExternalLinkLine || (_IconExternalLinkLine = (0, _jsxRuntime.jsx)(_IconExternalLinkLine2.IconExternalLinkLine, {})),
|
|
124
125
|
iconPlacement: "end",
|
|
@@ -128,33 +129,33 @@ const AiInformation = ({
|
|
|
128
129
|
})
|
|
129
130
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
130
131
|
css: styles === null || styles === void 0 ? void 0 : styles.featureName,
|
|
131
|
-
children: (0, _jsxRuntime.jsx)(
|
|
132
|
+
children: (0, _jsxRuntime.jsx)(_v11_3.Heading, {
|
|
132
133
|
level: "h3",
|
|
133
134
|
variant: "titleCardRegular",
|
|
134
135
|
children: featureName
|
|
135
136
|
})
|
|
136
137
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
137
138
|
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelText,
|
|
138
|
-
children: (0, _jsxRuntime.jsx)(
|
|
139
|
+
children: (0, _jsxRuntime.jsx)(_v11_3.Heading, {
|
|
139
140
|
level: "h4",
|
|
140
141
|
variant: "label",
|
|
141
142
|
children: permissionLevelText
|
|
142
143
|
})
|
|
143
144
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
144
145
|
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevel,
|
|
145
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
146
|
+
children: (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
146
147
|
variant: "legend",
|
|
147
148
|
children: [" ", permissionLevel, " "]
|
|
148
149
|
})
|
|
149
150
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
150
151
|
css: styles === null || styles === void 0 ? void 0 : styles.description,
|
|
151
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
152
|
+
children: (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
152
153
|
variant: "contentSmall",
|
|
153
154
|
children: [" ", description, " "]
|
|
154
155
|
})
|
|
155
156
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
156
157
|
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelsModalTriggerText,
|
|
157
|
-
children: (0, _jsxRuntime.jsx)(
|
|
158
|
+
children: (0, _jsxRuntime.jsx)(_v2.DataPermissionLevels, {
|
|
158
159
|
fullscreen: fullscreenModals,
|
|
159
160
|
title: dataPermissionLevelsTitle,
|
|
160
161
|
currentFeatureText: dataPermissionLevelsCurrentFeatureText,
|
|
@@ -167,18 +168,18 @@ const AiInformation = ({
|
|
|
167
168
|
})
|
|
168
169
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
169
170
|
css: styles === null || styles === void 0 ? void 0 : styles.modelNameText,
|
|
170
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
171
|
+
children: (0, _jsxRuntime.jsxs)(_v11_3.Heading, {
|
|
171
172
|
level: "h3",
|
|
172
173
|
variant: "label",
|
|
173
174
|
children: [' ', modelNameText, ' ']
|
|
174
175
|
})
|
|
175
176
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
176
177
|
css: styles === null || styles === void 0 ? void 0 : styles.modelName,
|
|
177
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
178
|
+
children: (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
178
179
|
variant: "contentSmall",
|
|
179
180
|
children: [" ", modelName, " "]
|
|
180
181
|
})
|
|
181
|
-
}), (0, _jsxRuntime.jsx)(
|
|
182
|
+
}), (0, _jsxRuntime.jsx)(_v.NutritionFacts, {
|
|
182
183
|
fullscreen: fullscreenModals,
|
|
183
184
|
modalLabel: nutritionFactsModalLabel,
|
|
184
185
|
title: nutritionFactsTitle,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.AiInformation = void 0;
|
|
8
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _latest = require("@instructure/ui-popover/latest");
|
|
11
|
+
var _latest2 = require("@instructure/ui-buttons/latest");
|
|
12
|
+
var _latest3 = require("@instructure/ui-heading/latest");
|
|
13
|
+
var _latest4 = require("@instructure/ui-text/latest");
|
|
14
|
+
var _latest5 = require("@instructure/ui-link/latest");
|
|
15
|
+
var _uiIcons = require("@instructure/ui-icons");
|
|
16
|
+
var _emotion = require("@instructure/emotion");
|
|
17
|
+
var _v = require("../../NutritionFacts/v1");
|
|
18
|
+
var _v2 = require("../../DataPermissionLevels/v1");
|
|
19
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
20
|
+
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
21
|
+
var _ExternalLinkInstUIIc;
|
|
22
|
+
/*
|
|
23
|
+
* The MIT License (MIT)
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
26
|
+
*
|
|
27
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
29
|
+
* in the Software without restriction, including without limitation the rights
|
|
30
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
31
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
32
|
+
* furnished to do so, subject to the following conditions:
|
|
33
|
+
*
|
|
34
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
35
|
+
* copies or substantial portions of the Software.
|
|
36
|
+
*
|
|
37
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
38
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
39
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
40
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
41
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
42
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
43
|
+
* SOFTWARE.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
---
|
|
47
|
+
category: components/AI Components
|
|
48
|
+
---
|
|
49
|
+
**/
|
|
50
|
+
const AiInformation = ({
|
|
51
|
+
title,
|
|
52
|
+
data,
|
|
53
|
+
trigger,
|
|
54
|
+
fullscreenModals = false,
|
|
55
|
+
dataPermissionLevelsModalLabel,
|
|
56
|
+
dataPermissionLevelsTitle,
|
|
57
|
+
dataPermissionLevelsData,
|
|
58
|
+
dataPermissionLevelsCloseButtonText,
|
|
59
|
+
dataPermissionLevelsCloseIconButtonScreenReaderLabel,
|
|
60
|
+
dataPermissionLevelsCurrentFeature,
|
|
61
|
+
dataPermissionLevelsCurrentFeatureText,
|
|
62
|
+
nutritionFactsModalLabel,
|
|
63
|
+
nutritionFactsTitle,
|
|
64
|
+
nutritionFactsFeatureName,
|
|
65
|
+
nutritionFactsData,
|
|
66
|
+
nutritionFactsCloseButtonText,
|
|
67
|
+
nutritionFactsCloseIconButtonScreenReaderLabel,
|
|
68
|
+
themeOverride
|
|
69
|
+
}) => {
|
|
70
|
+
const _useState = (0, _react.useState)(false),
|
|
71
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
72
|
+
open = _useState2[0],
|
|
73
|
+
setOpen = _useState2[1];
|
|
74
|
+
const styles = (0, _emotion.useStyle)({
|
|
75
|
+
generateStyle: _styles.default,
|
|
76
|
+
themeOverride,
|
|
77
|
+
componentId: 'AiInformation',
|
|
78
|
+
displayName: 'AiInformation'
|
|
79
|
+
});
|
|
80
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
81
|
+
children: (0, _jsxRuntime.jsx)(_latest.Popover, {
|
|
82
|
+
renderTrigger: trigger,
|
|
83
|
+
isShowingContent: open,
|
|
84
|
+
on: "click",
|
|
85
|
+
screenReaderLabel: "Popover Dialog Example",
|
|
86
|
+
shouldContainFocus: true,
|
|
87
|
+
shouldReturnFocus: true,
|
|
88
|
+
shouldCloseOnDocumentClick: true,
|
|
89
|
+
offsetY: "1rem",
|
|
90
|
+
onShowContent: () => setOpen(true),
|
|
91
|
+
onHideContent: () => setOpen(false),
|
|
92
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
93
|
+
css: styles === null || styles === void 0 ? void 0 : styles.aiInformation,
|
|
94
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
95
|
+
css: styles === null || styles === void 0 ? void 0 : styles.header,
|
|
96
|
+
children: [(0, _jsxRuntime.jsx)(_latest3.Heading, {
|
|
97
|
+
level: "h2",
|
|
98
|
+
aiVariant: "stacked",
|
|
99
|
+
variant: "titleModule",
|
|
100
|
+
children: title
|
|
101
|
+
}), (0, _jsxRuntime.jsx)(_latest2.CloseButton, {
|
|
102
|
+
placement: "end",
|
|
103
|
+
offset: "small",
|
|
104
|
+
onClick: () => setOpen(false),
|
|
105
|
+
screenReaderLabel: "Close"
|
|
106
|
+
})]
|
|
107
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
108
|
+
children: data.map(({
|
|
109
|
+
featureName,
|
|
110
|
+
privacyNoticeText,
|
|
111
|
+
privacyNoticeUrl,
|
|
112
|
+
permissionLevelText,
|
|
113
|
+
permissionLevel,
|
|
114
|
+
description,
|
|
115
|
+
permissionLevelsModalTriggerText,
|
|
116
|
+
modelNameText,
|
|
117
|
+
modelName,
|
|
118
|
+
nutritionFactsModalTriggerText
|
|
119
|
+
}, index) => (0, _jsxRuntime.jsxs)("div", {
|
|
120
|
+
children: [(0, _jsxRuntime.jsx)("div", {
|
|
121
|
+
css: styles === null || styles === void 0 ? void 0 : styles.privacyNotice,
|
|
122
|
+
children: (0, _jsxRuntime.jsx)(_latest5.Link, {
|
|
123
|
+
href: privacyNoticeUrl,
|
|
124
|
+
renderIcon: _ExternalLinkInstUIIc || (_ExternalLinkInstUIIc = (0, _jsxRuntime.jsx)(_uiIcons.ExternalLinkInstUIIcon, {
|
|
125
|
+
size: "sm"
|
|
126
|
+
})),
|
|
127
|
+
iconPlacement: "end",
|
|
128
|
+
variant: "standalone",
|
|
129
|
+
children: privacyNoticeText
|
|
130
|
+
})
|
|
131
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
132
|
+
css: styles === null || styles === void 0 ? void 0 : styles.featureName,
|
|
133
|
+
children: (0, _jsxRuntime.jsx)(_latest3.Heading, {
|
|
134
|
+
level: "h3",
|
|
135
|
+
variant: "titleCardRegular",
|
|
136
|
+
children: featureName
|
|
137
|
+
})
|
|
138
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
139
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelText,
|
|
140
|
+
children: (0, _jsxRuntime.jsx)(_latest3.Heading, {
|
|
141
|
+
level: "h4",
|
|
142
|
+
variant: "label",
|
|
143
|
+
children: permissionLevelText
|
|
144
|
+
})
|
|
145
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
146
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevel,
|
|
147
|
+
children: (0, _jsxRuntime.jsxs)(_latest4.Text, {
|
|
148
|
+
variant: "legend",
|
|
149
|
+
children: [" ", permissionLevel, " "]
|
|
150
|
+
})
|
|
151
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
152
|
+
css: styles === null || styles === void 0 ? void 0 : styles.description,
|
|
153
|
+
children: (0, _jsxRuntime.jsxs)(_latest4.Text, {
|
|
154
|
+
variant: "contentSmall",
|
|
155
|
+
children: [" ", description, " "]
|
|
156
|
+
})
|
|
157
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
158
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelsModalTriggerText,
|
|
159
|
+
children: (0, _jsxRuntime.jsx)(_v2.DataPermissionLevels, {
|
|
160
|
+
fullscreen: fullscreenModals,
|
|
161
|
+
title: dataPermissionLevelsTitle,
|
|
162
|
+
currentFeatureText: dataPermissionLevelsCurrentFeatureText,
|
|
163
|
+
currentFeature: dataPermissionLevelsCurrentFeature,
|
|
164
|
+
closeIconButtonScreenReaderLabel: dataPermissionLevelsCloseIconButtonScreenReaderLabel,
|
|
165
|
+
closeButtonText: dataPermissionLevelsCloseButtonText,
|
|
166
|
+
modalLabel: dataPermissionLevelsModalLabel,
|
|
167
|
+
triggerText: permissionLevelsModalTriggerText,
|
|
168
|
+
data: dataPermissionLevelsData
|
|
169
|
+
})
|
|
170
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
171
|
+
css: styles === null || styles === void 0 ? void 0 : styles.modelNameText,
|
|
172
|
+
children: (0, _jsxRuntime.jsxs)(_latest3.Heading, {
|
|
173
|
+
level: "h3",
|
|
174
|
+
variant: "label",
|
|
175
|
+
children: [' ', modelNameText, ' ']
|
|
176
|
+
})
|
|
177
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
178
|
+
css: styles === null || styles === void 0 ? void 0 : styles.modelName,
|
|
179
|
+
children: (0, _jsxRuntime.jsxs)(_latest4.Text, {
|
|
180
|
+
variant: "contentSmall",
|
|
181
|
+
children: [" ", modelName, " "]
|
|
182
|
+
})
|
|
183
|
+
}), (0, _jsxRuntime.jsx)(_v.NutritionFacts, {
|
|
184
|
+
fullscreen: fullscreenModals,
|
|
185
|
+
modalLabel: nutritionFactsModalLabel,
|
|
186
|
+
title: nutritionFactsTitle,
|
|
187
|
+
featureName: nutritionFactsFeatureName,
|
|
188
|
+
closeButtonText: nutritionFactsCloseButtonText,
|
|
189
|
+
closeIconButtonScreenReaderLabel: nutritionFactsCloseIconButtonScreenReaderLabel,
|
|
190
|
+
triggerText: nutritionFactsModalTriggerText,
|
|
191
|
+
data: nutritionFactsData
|
|
192
|
+
}), data.length !== index + 1 ? (0, _jsxRuntime.jsx)("div", {
|
|
193
|
+
css: styles === null || styles === void 0 ? void 0 : styles.divider
|
|
194
|
+
}) : null]
|
|
195
|
+
}, index))
|
|
196
|
+
})]
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
exports.AiInformation = AiInformation;
|
|
202
|
+
var _default = exports.default = AiInformation;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.allowedProps = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
const allowedProps = exports.allowedProps = ['fullscreenModals', 'title', 'data', 'trigger', 'dataPermissionLevelsModalLabel', 'dataPermissionLevelsTitle', 'dataPermissionLevelsData', 'dataPermissionLevelsCloseButtonText', 'dataPermissionLevelsCloseIconButtonScreenReaderLabel', 'dataPermissionLevelsCurrentFeatureText', 'dataPermissionLevelsCurrentFeature', 'nutritionFactsModalLabel', 'nutritionFactsTitle', 'nutritionFactsFeatureName', 'nutritionFactsData', 'nutritionFactsCloseButtonText', 'nutritionFactsCloseIconButtonScreenReaderLabel'];
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* The MIT License (MIT)
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
+
*
|
|
12
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
* in the Software without restriction, including without limitation the rights
|
|
15
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
* furnished to do so, subject to the following conditions:
|
|
18
|
+
*
|
|
19
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
* copies or substantial portions of the Software.
|
|
21
|
+
*
|
|
22
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
* SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* ---
|
|
33
|
+
* private: true
|
|
34
|
+
* ---
|
|
35
|
+
* Generates the style object from the theme and provided additional information
|
|
36
|
+
* @param componentTheme The theme variable object.
|
|
37
|
+
* @param params Additional parameters to customize the style.
|
|
38
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
39
|
+
* @return The final style object, which will be used in the component
|
|
40
|
+
*/
|
|
41
|
+
const generateStyle = (componentTheme, _params, _sharedTokens) => {
|
|
42
|
+
return {
|
|
43
|
+
aiInformation: {
|
|
44
|
+
label: 'ai-information',
|
|
45
|
+
width: '18.5rem',
|
|
46
|
+
padding: componentTheme.bodyPadding,
|
|
47
|
+
boxSizing: 'border-box'
|
|
48
|
+
},
|
|
49
|
+
header: {
|
|
50
|
+
label: 'ai-information__header',
|
|
51
|
+
marginBottom: componentTheme.headingBottomMargin
|
|
52
|
+
},
|
|
53
|
+
privacyNotice: {
|
|
54
|
+
label: 'ai-information__privacyNotice',
|
|
55
|
+
marginBottom: componentTheme.headingBottomMargin
|
|
56
|
+
},
|
|
57
|
+
featureName: {
|
|
58
|
+
label: 'ai-information__feature-name',
|
|
59
|
+
marginBottom: componentTheme.featureNameBottomMargin
|
|
60
|
+
},
|
|
61
|
+
permissionLevelText: {
|
|
62
|
+
label: 'ai-information__permission-level-text',
|
|
63
|
+
marginBottom: componentTheme.permissionLevelTextBottomMargin
|
|
64
|
+
},
|
|
65
|
+
permissionLevel: {
|
|
66
|
+
label: 'ai-information__permission-level',
|
|
67
|
+
marginBottom: componentTheme.permissionLevelBottomMargin,
|
|
68
|
+
color: componentTheme.levelColor,
|
|
69
|
+
'& > *': {
|
|
70
|
+
color: `${componentTheme.levelColor} !important`
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
description: {
|
|
74
|
+
label: 'ai-information__description',
|
|
75
|
+
marginBottom: componentTheme.descriptionBottomMargin
|
|
76
|
+
},
|
|
77
|
+
permissionLevelsModalTriggerText: {
|
|
78
|
+
label: 'ai-information__permission-levels-modal-trigger-text',
|
|
79
|
+
marginBottom: componentTheme.permissionLevelsModalTriggerBottomMargin
|
|
80
|
+
},
|
|
81
|
+
modelNameText: {
|
|
82
|
+
label: 'ai-information__model-name-text',
|
|
83
|
+
marginBottom: componentTheme.modelNameTextBottomMargin
|
|
84
|
+
},
|
|
85
|
+
modelName: {
|
|
86
|
+
label: 'ai-information__model-name',
|
|
87
|
+
marginBottom: componentTheme.modelNameBottomMargin
|
|
88
|
+
},
|
|
89
|
+
divider: {
|
|
90
|
+
label: 'ai-information__divider',
|
|
91
|
+
marginBottom: componentTheme.dividerMargin,
|
|
92
|
+
marginTop: componentTheme.dividerMargin,
|
|
93
|
+
borderTop: 'solid 1px',
|
|
94
|
+
width: '100%',
|
|
95
|
+
borderColor: componentTheme.dividerColor
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
var _default = exports.default = generateStyle;
|
|
@@ -7,12 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.DataPermissionLevels = 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"));
|
|
@@ -61,14 +60,14 @@ category: components/AI Components
|
|
|
61
60
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
62
61
|
open = _useState2[0],
|
|
63
62
|
setOpen = _useState2[1];
|
|
64
|
-
const styles = (0, _emotion.
|
|
63
|
+
const styles = (0, _emotion.useStyleLegacy)({
|
|
65
64
|
generateStyle: _styles.default,
|
|
66
65
|
generateComponentTheme: _theme.default,
|
|
67
66
|
componentId: 'DataPermissionLevels',
|
|
68
67
|
displayName: 'DataPermissionLevels'
|
|
69
68
|
});
|
|
70
69
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
71
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
70
|
+
children: [(0, _jsxRuntime.jsx)(_v11_5.Link, {
|
|
72
71
|
variant: "standalone",
|
|
73
72
|
onClick: e => {
|
|
74
73
|
e.preventDefault();
|
|
@@ -77,7 +76,7 @@ category: components/AI Components
|
|
|
77
76
|
forceButtonRole: false,
|
|
78
77
|
href: "#",
|
|
79
78
|
children: triggerText
|
|
80
|
-
}), (0, _jsxRuntime.jsxs)(
|
|
79
|
+
}), (0, _jsxRuntime.jsxs)(_v11_.Modal, {
|
|
81
80
|
size: fullscreen ? 'fullscreen' : 'medium',
|
|
82
81
|
open: open,
|
|
83
82
|
onDismiss: () => {
|
|
@@ -85,19 +84,19 @@ category: components/AI Components
|
|
|
85
84
|
},
|
|
86
85
|
label: modalLabel,
|
|
87
86
|
shouldCloseOnDocumentClick: true,
|
|
88
|
-
children: [(0, _jsxRuntime.jsxs)(
|
|
87
|
+
children: [(0, _jsxRuntime.jsxs)(_v11_.Modal.Header, {
|
|
89
88
|
spacing: "compact",
|
|
90
|
-
children: [(0, _jsxRuntime.jsx)(
|
|
89
|
+
children: [(0, _jsxRuntime.jsx)(_v11_3.Heading, {
|
|
91
90
|
aiVariant: "stacked",
|
|
92
91
|
children: title
|
|
93
|
-
}), (0, _jsxRuntime.jsx)(
|
|
92
|
+
}), (0, _jsxRuntime.jsx)(_v11_2.CloseButton, {
|
|
94
93
|
size: "medium",
|
|
95
94
|
placement: "end",
|
|
96
95
|
offset: "small",
|
|
97
96
|
onClick: () => setOpen(false),
|
|
98
97
|
screenReaderLabel: closeIconButtonScreenReaderLabel
|
|
99
98
|
})]
|
|
100
|
-
}), (0, _jsxRuntime.jsx)(
|
|
99
|
+
}), (0, _jsxRuntime.jsx)(_v11_.Modal.Body, {
|
|
101
100
|
children: (0, _jsxRuntime.jsx)("div", {
|
|
102
101
|
css: styles === null || styles === void 0 ? void 0 : styles.body,
|
|
103
102
|
children: data.map(({
|
|
@@ -109,12 +108,12 @@ category: components/AI Components
|
|
|
109
108
|
css: highlighted ? styles === null || styles === void 0 ? void 0 : styles.highlightedCard : styles === null || styles === void 0 ? void 0 : styles.card,
|
|
110
109
|
children: [highlighted ? (0, _jsxRuntime.jsxs)("div", {
|
|
111
110
|
css: styles === null || styles === void 0 ? void 0 : styles.currentFeature,
|
|
112
|
-
children: [_Heading || (_Heading = (0, _jsxRuntime.jsxs)(
|
|
111
|
+
children: [_Heading || (_Heading = (0, _jsxRuntime.jsxs)(_v11_3.Heading, {
|
|
113
112
|
color: "primary-inverse",
|
|
114
113
|
level: "reset",
|
|
115
114
|
variant: "labelInline",
|
|
116
115
|
children: [currentFeatureText, ' ']
|
|
117
|
-
})), _Text || (_Text = (0, _jsxRuntime.jsx)(
|
|
116
|
+
})), _Text || (_Text = (0, _jsxRuntime.jsx)(_v11_4.Text, {
|
|
118
117
|
color: "primary-inverse",
|
|
119
118
|
variant: "content",
|
|
120
119
|
children: currentFeature
|
|
@@ -126,11 +125,11 @@ category: components/AI Components
|
|
|
126
125
|
children: level
|
|
127
126
|
}), (0, _jsxRuntime.jsx)("div", {
|
|
128
127
|
css: styles === null || styles === void 0 ? void 0 : styles.permissionTitle,
|
|
129
|
-
children: (0, _jsxRuntime.jsxs)(
|
|
128
|
+
children: (0, _jsxRuntime.jsxs)(_v11_4.Text, {
|
|
130
129
|
variant: "descriptionPage",
|
|
131
130
|
children: [title, " "]
|
|
132
131
|
})
|
|
133
|
-
}), (0, _jsxRuntime.jsx)(
|
|
132
|
+
}), (0, _jsxRuntime.jsx)(_v11_4.Text, {
|
|
134
133
|
variant: "content",
|
|
135
134
|
color: "secondary",
|
|
136
135
|
children: description
|
|
@@ -138,8 +137,8 @@ category: components/AI Components
|
|
|
138
137
|
})]
|
|
139
138
|
}, index))
|
|
140
139
|
})
|
|
141
|
-
}), (0, _jsxRuntime.jsx)(
|
|
142
|
-
children: (0, _jsxRuntime.jsx)(
|
|
140
|
+
}), (0, _jsxRuntime.jsx)(_v11_.Modal.Footer, {
|
|
141
|
+
children: (0, _jsxRuntime.jsx)(_v11_2.Button, {
|
|
143
142
|
onClick: () => setOpen(false),
|
|
144
143
|
children: closeButtonText
|
|
145
144
|
})
|