@instructure/ui-instructure 11.6.1-snapshot-0 → 11.6.1-snapshot-130
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 +27 -80
- 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
package/CHANGELOG.md
CHANGED
|
@@ -3,159 +3,106 @@
|
|
|
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
|
-
## [11.6.1-snapshot-
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @instructure/ui-instructure
|
|
6
|
+
## [11.6.1-snapshot-130](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-snapshot-130) (2026-03-16)
|
|
9
7
|
|
|
10
8
|
|
|
9
|
+
### Bug Fixes
|
|
11
10
|
|
|
11
|
+
* **ui-many:** fix imports of the multiversion support ([ff5f2b3](https://github.com/instructure/instructure-ui/commit/ff5f2b38660ddae432edd32b98eedae586589977))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
### Features
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
* **ui-instructure:** migrate aiinformation to the new theming system ([419de61](https://github.com/instructure/instructure-ui/commit/419de618bb76b0fd4e71f1bfa8481b54b3c0af6e))
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
# [11.
|
|
22
|
+
# [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
25
25
|
|
|
26
|
+
# [11.5.0](https://github.com/instructure/instructure-ui/compare/v11.4.0...v11.5.0) (2026-02-03)
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
**Note:** Version bump only for package @instructure/ui-instructure
|
|
29
29
|
|
|
30
30
|
# [11.4.0](https://github.com/instructure/instructure-ui/compare/v11.3.0...v11.4.0) (2026-01-20)
|
|
31
31
|
|
|
32
|
-
|
|
33
32
|
### Features
|
|
34
33
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
- **ui-instructure:** add privacy notice link to the ai information panel ([447e40b](https://github.com/instructure/instructure-ui/commit/447e40b8ef1a5b776e01e831b2c5a6d45ca8274e))
|
|
40
35
|
|
|
41
36
|
# [11.3.0](https://github.com/instructure/instructure-ui/compare/v11.2.0...v11.3.0) (2026-01-12)
|
|
42
37
|
|
|
43
38
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
40
|
# [11.2.0](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.2.0) (2025-11-06)
|
|
50
41
|
|
|
51
|
-
|
|
52
42
|
### Features
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
44
|
+
- **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
|
|
59
45
|
|
|
60
46
|
# [11.1.0](https://github.com/instructure/instructure-ui/compare/v11.0.1...v11.1.0) (2025-11-05)
|
|
61
47
|
|
|
62
|
-
|
|
63
48
|
### Features
|
|
64
49
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
50
|
+
- **many:** migrate from npm to pnpm ([f7bb16e](https://github.com/instructure/instructure-ui/commit/f7bb16e114df83984c67d5a6e07fb4d9c65efc53))
|
|
70
51
|
|
|
71
52
|
## [11.0.1](https://github.com/instructure/instructure-ui/compare/v11.0.0...v11.0.1) (2025-10-13)
|
|
72
53
|
|
|
73
54
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
74
55
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
56
|
# [11.0.0](https://github.com/instructure/instructure-ui/compare/v10.26.0...v11.0.0) (2025-10-06)
|
|
80
57
|
|
|
81
|
-
|
|
82
58
|
### Features
|
|
83
59
|
|
|
84
|
-
|
|
85
|
-
|
|
60
|
+
- **many:** instUI v11 release ([36f5438](https://github.com/instructure/instructure-ui/commit/36f54382669186227ba24798bbf7201ef2f5cd4c))
|
|
86
61
|
|
|
87
62
|
### BREAKING CHANGES
|
|
88
63
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
64
|
+
- **many:** InstUI v11 contains the following breaking changes:
|
|
65
|
+
|
|
66
|
+
* React 16 and 17 are no longer supported
|
|
67
|
+
* remove `PropTypes` from all packages
|
|
68
|
+
* remove `CodeEditor` component
|
|
69
|
+
* remove `@instui/theme-registry` package
|
|
70
|
+
* remove `@testable`, `@experimental`, `@hack` decorators
|
|
71
|
+
* InstUISettingsProvider's `as` prop is removed
|
|
72
|
+
* `canvas.use()`, `canvasHighContrast.use()` functions are removed
|
|
73
|
+
* `canvasThemeLocal`, `canvasHighContrastThemeLocal` are removed
|
|
74
|
+
* `variables` field on theme objects are removed
|
|
75
|
+
* remove deprecated props from Table: Row's `isStacked`, Body's
|
|
100
76
|
`isStacked`, `hover`, and `headers`
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
77
|
+
* `Table`'s `caption` prop is now required
|
|
78
|
+
* `ui-dom-utils`'s `getComputedStyle` can now return `undefined`
|
|
107
79
|
|
|
108
80
|
# [10.26.0](https://github.com/instructure/instructure-ui/compare/v10.25.0...v10.26.0) (2025-10-01)
|
|
109
81
|
|
|
110
82
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
111
83
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
84
|
# [10.25.0](https://github.com/instructure/instructure-ui/compare/v10.24.2...v10.25.0) (2025-09-09)
|
|
117
85
|
|
|
118
86
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
119
87
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
88
|
## [10.24.2](https://github.com/instructure/instructure-ui/compare/v10.24.1...v10.24.2) (2025-08-11)
|
|
125
89
|
|
|
126
90
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
127
91
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
92
|
## [10.24.1](https://github.com/instructure/instructure-ui/compare/v10.24.0...v10.24.1) (2025-07-30)
|
|
133
93
|
|
|
134
94
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
135
95
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
96
|
# [10.24.0](https://github.com/instructure/instructure-ui/compare/v10.23.0...v10.24.0) (2025-07-18)
|
|
141
97
|
|
|
142
98
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
143
99
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
100
|
# [10.23.0](https://github.com/instructure/instructure-ui/compare/v10.22.0...v10.23.0) (2025-07-09)
|
|
149
101
|
|
|
150
102
|
**Note:** Version bump only for package @instructure/ui-instructure
|
|
151
103
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
104
|
# [10.22.0](https://github.com/instructure/instructure-ui/compare/v10.21.0...v10.22.0) (2025-07-04)
|
|
157
105
|
|
|
158
|
-
|
|
159
106
|
### Features
|
|
160
107
|
|
|
161
|
-
|
|
108
|
+
- **many:** add new package (instructure) and three new components: AiInformation, NutritionFacts and DataPermissionLevels ([073be7b](https://github.com/instructure/instructure-ui/commit/073be7b50893e9ab77158ee8a83506eddfbd4113))
|
|
@@ -24,14 +24,15 @@ var _IconExternalLinkLine;
|
|
|
24
24
|
* SOFTWARE.
|
|
25
25
|
*/
|
|
26
26
|
import { useState } from 'react';
|
|
27
|
-
import { Popover } from '@instructure/ui-popover';
|
|
28
|
-
import { CloseButton } from '@instructure/ui-buttons';
|
|
29
|
-
import { Heading } from '@instructure/ui-heading';
|
|
30
|
-
import { Text } from '@instructure/ui-text';
|
|
31
|
-
import { Link } from '@instructure/ui-link';
|
|
27
|
+
import { Popover } from '@instructure/ui-popover/v11_6';
|
|
28
|
+
import { CloseButton } from '@instructure/ui-buttons/v11_6';
|
|
29
|
+
import { Heading } from '@instructure/ui-heading/v11_6';
|
|
30
|
+
import { Text } from '@instructure/ui-text/v11_6';
|
|
31
|
+
import { Link } from '@instructure/ui-link/v11_6';
|
|
32
32
|
import { IconExternalLinkLine } from '@instructure/ui-icons';
|
|
33
|
-
import { useStyle } from '@instructure/emotion';
|
|
34
|
-
import { NutritionFacts
|
|
33
|
+
import { useStyleLegacy as useStyle } from '@instructure/emotion';
|
|
34
|
+
import { NutritionFacts } from "../../NutritionFacts/v1/index.js";
|
|
35
|
+
import { DataPermissionLevels } from "../../DataPermissionLevels/v1/index.js";
|
|
35
36
|
import generateStyle from "./styles.js";
|
|
36
37
|
import generateComponentTheme from "./theme.js";
|
|
37
38
|
/**
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
var _ExternalLinkInstUIIc;
|
|
3
|
+
/*
|
|
4
|
+
* The MIT License (MIT)
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
import { useState } from 'react';
|
|
27
|
+
import { Popover } from '@instructure/ui-popover/latest';
|
|
28
|
+
import { CloseButton } from '@instructure/ui-buttons/latest';
|
|
29
|
+
import { Heading } from '@instructure/ui-heading/latest';
|
|
30
|
+
import { Text } from '@instructure/ui-text/latest';
|
|
31
|
+
import { Link } from '@instructure/ui-link/latest';
|
|
32
|
+
import { ExternalLinkInstUIIcon } from '@instructure/ui-icons';
|
|
33
|
+
import { useStyle } from '@instructure/emotion';
|
|
34
|
+
import { NutritionFacts } from "../../NutritionFacts/v1/index.js";
|
|
35
|
+
import { DataPermissionLevels } from "../../DataPermissionLevels/v1/index.js";
|
|
36
|
+
import generateStyle from "./styles.js";
|
|
37
|
+
/**
|
|
38
|
+
---
|
|
39
|
+
category: components/AI Components
|
|
40
|
+
---
|
|
41
|
+
**/
|
|
42
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
43
|
+
const AiInformation = ({
|
|
44
|
+
title,
|
|
45
|
+
data,
|
|
46
|
+
trigger,
|
|
47
|
+
fullscreenModals = false,
|
|
48
|
+
dataPermissionLevelsModalLabel,
|
|
49
|
+
dataPermissionLevelsTitle,
|
|
50
|
+
dataPermissionLevelsData,
|
|
51
|
+
dataPermissionLevelsCloseButtonText,
|
|
52
|
+
dataPermissionLevelsCloseIconButtonScreenReaderLabel,
|
|
53
|
+
dataPermissionLevelsCurrentFeature,
|
|
54
|
+
dataPermissionLevelsCurrentFeatureText,
|
|
55
|
+
nutritionFactsModalLabel,
|
|
56
|
+
nutritionFactsTitle,
|
|
57
|
+
nutritionFactsFeatureName,
|
|
58
|
+
nutritionFactsData,
|
|
59
|
+
nutritionFactsCloseButtonText,
|
|
60
|
+
nutritionFactsCloseIconButtonScreenReaderLabel,
|
|
61
|
+
themeOverride
|
|
62
|
+
}) => {
|
|
63
|
+
const _useState = useState(false),
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
open = _useState2[0],
|
|
66
|
+
setOpen = _useState2[1];
|
|
67
|
+
const styles = useStyle({
|
|
68
|
+
generateStyle,
|
|
69
|
+
themeOverride,
|
|
70
|
+
componentId: 'AiInformation',
|
|
71
|
+
displayName: 'AiInformation'
|
|
72
|
+
});
|
|
73
|
+
return _jsx("div", {
|
|
74
|
+
children: _jsx(Popover, {
|
|
75
|
+
renderTrigger: trigger,
|
|
76
|
+
isShowingContent: open,
|
|
77
|
+
on: "click",
|
|
78
|
+
screenReaderLabel: "Popover Dialog Example",
|
|
79
|
+
shouldContainFocus: true,
|
|
80
|
+
shouldReturnFocus: true,
|
|
81
|
+
shouldCloseOnDocumentClick: true,
|
|
82
|
+
offsetY: "1rem",
|
|
83
|
+
onShowContent: () => setOpen(true),
|
|
84
|
+
onHideContent: () => setOpen(false),
|
|
85
|
+
children: _jsxs("div", {
|
|
86
|
+
css: styles === null || styles === void 0 ? void 0 : styles.aiInformation,
|
|
87
|
+
children: [_jsxs("div", {
|
|
88
|
+
css: styles === null || styles === void 0 ? void 0 : styles.header,
|
|
89
|
+
children: [_jsx(Heading, {
|
|
90
|
+
level: "h2",
|
|
91
|
+
aiVariant: "stacked",
|
|
92
|
+
variant: "titleModule",
|
|
93
|
+
children: title
|
|
94
|
+
}), _jsx(CloseButton, {
|
|
95
|
+
placement: "end",
|
|
96
|
+
offset: "small",
|
|
97
|
+
onClick: () => setOpen(false),
|
|
98
|
+
screenReaderLabel: "Close"
|
|
99
|
+
})]
|
|
100
|
+
}), _jsx("div", {
|
|
101
|
+
children: data.map(({
|
|
102
|
+
featureName,
|
|
103
|
+
privacyNoticeText,
|
|
104
|
+
privacyNoticeUrl,
|
|
105
|
+
permissionLevelText,
|
|
106
|
+
permissionLevel,
|
|
107
|
+
description,
|
|
108
|
+
permissionLevelsModalTriggerText,
|
|
109
|
+
modelNameText,
|
|
110
|
+
modelName,
|
|
111
|
+
nutritionFactsModalTriggerText
|
|
112
|
+
}, index) => _jsxs("div", {
|
|
113
|
+
children: [_jsx("div", {
|
|
114
|
+
css: styles === null || styles === void 0 ? void 0 : styles.privacyNotice,
|
|
115
|
+
children: _jsx(Link, {
|
|
116
|
+
href: privacyNoticeUrl,
|
|
117
|
+
renderIcon: _ExternalLinkInstUIIc || (_ExternalLinkInstUIIc = _jsx(ExternalLinkInstUIIcon, {
|
|
118
|
+
size: "sm"
|
|
119
|
+
})),
|
|
120
|
+
iconPlacement: "end",
|
|
121
|
+
variant: "standalone",
|
|
122
|
+
children: privacyNoticeText
|
|
123
|
+
})
|
|
124
|
+
}), _jsx("div", {
|
|
125
|
+
css: styles === null || styles === void 0 ? void 0 : styles.featureName,
|
|
126
|
+
children: _jsx(Heading, {
|
|
127
|
+
level: "h3",
|
|
128
|
+
variant: "titleCardRegular",
|
|
129
|
+
children: featureName
|
|
130
|
+
})
|
|
131
|
+
}), _jsx("div", {
|
|
132
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelText,
|
|
133
|
+
children: _jsx(Heading, {
|
|
134
|
+
level: "h4",
|
|
135
|
+
variant: "label",
|
|
136
|
+
children: permissionLevelText
|
|
137
|
+
})
|
|
138
|
+
}), _jsx("div", {
|
|
139
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevel,
|
|
140
|
+
children: _jsxs(Text, {
|
|
141
|
+
variant: "legend",
|
|
142
|
+
children: [" ", permissionLevel, " "]
|
|
143
|
+
})
|
|
144
|
+
}), _jsx("div", {
|
|
145
|
+
css: styles === null || styles === void 0 ? void 0 : styles.description,
|
|
146
|
+
children: _jsxs(Text, {
|
|
147
|
+
variant: "contentSmall",
|
|
148
|
+
children: [" ", description, " "]
|
|
149
|
+
})
|
|
150
|
+
}), _jsx("div", {
|
|
151
|
+
css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelsModalTriggerText,
|
|
152
|
+
children: _jsx(DataPermissionLevels, {
|
|
153
|
+
fullscreen: fullscreenModals,
|
|
154
|
+
title: dataPermissionLevelsTitle,
|
|
155
|
+
currentFeatureText: dataPermissionLevelsCurrentFeatureText,
|
|
156
|
+
currentFeature: dataPermissionLevelsCurrentFeature,
|
|
157
|
+
closeIconButtonScreenReaderLabel: dataPermissionLevelsCloseIconButtonScreenReaderLabel,
|
|
158
|
+
closeButtonText: dataPermissionLevelsCloseButtonText,
|
|
159
|
+
modalLabel: dataPermissionLevelsModalLabel,
|
|
160
|
+
triggerText: permissionLevelsModalTriggerText,
|
|
161
|
+
data: dataPermissionLevelsData
|
|
162
|
+
})
|
|
163
|
+
}), _jsx("div", {
|
|
164
|
+
css: styles === null || styles === void 0 ? void 0 : styles.modelNameText,
|
|
165
|
+
children: _jsxs(Heading, {
|
|
166
|
+
level: "h3",
|
|
167
|
+
variant: "label",
|
|
168
|
+
children: [' ', modelNameText, ' ']
|
|
169
|
+
})
|
|
170
|
+
}), _jsx("div", {
|
|
171
|
+
css: styles === null || styles === void 0 ? void 0 : styles.modelName,
|
|
172
|
+
children: _jsxs(Text, {
|
|
173
|
+
variant: "contentSmall",
|
|
174
|
+
children: [" ", modelName, " "]
|
|
175
|
+
})
|
|
176
|
+
}), _jsx(NutritionFacts, {
|
|
177
|
+
fullscreen: fullscreenModals,
|
|
178
|
+
modalLabel: nutritionFactsModalLabel,
|
|
179
|
+
title: nutritionFactsTitle,
|
|
180
|
+
featureName: nutritionFactsFeatureName,
|
|
181
|
+
closeButtonText: nutritionFactsCloseButtonText,
|
|
182
|
+
closeIconButtonScreenReaderLabel: nutritionFactsCloseIconButtonScreenReaderLabel,
|
|
183
|
+
triggerText: nutritionFactsModalTriggerText,
|
|
184
|
+
data: nutritionFactsData
|
|
185
|
+
}), data.length !== index + 1 ? _jsx("div", {
|
|
186
|
+
css: styles === null || styles === void 0 ? void 0 : styles.divider
|
|
187
|
+
}) : null]
|
|
188
|
+
}, index))
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
})
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
export default AiInformation;
|
|
195
|
+
export { AiInformation };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const allowedProps = ['fullscreenModals', 'title', 'data', 'trigger', 'dataPermissionLevelsModalLabel', 'dataPermissionLevelsTitle', 'dataPermissionLevelsData', 'dataPermissionLevelsCloseButtonText', 'dataPermissionLevelsCloseIconButtonScreenReaderLabel', 'dataPermissionLevelsCurrentFeatureText', 'dataPermissionLevelsCurrentFeature', 'nutritionFactsModalLabel', 'nutritionFactsTitle', 'nutritionFactsFeatureName', 'nutritionFactsData', 'nutritionFactsCloseButtonText', 'nutritionFactsCloseIconButtonScreenReaderLabel'];
|
|
26
|
+
export { allowedProps };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* ---
|
|
27
|
+
* private: true
|
|
28
|
+
* ---
|
|
29
|
+
* Generates the style object from the theme and provided additional information
|
|
30
|
+
* @param componentTheme The theme variable object.
|
|
31
|
+
* @param params Additional parameters to customize the style.
|
|
32
|
+
* @param sharedTokens Shared token object that stores common values for the theme.
|
|
33
|
+
* @return The final style object, which will be used in the component
|
|
34
|
+
*/
|
|
35
|
+
const generateStyle = (componentTheme, _params, _sharedTokens) => {
|
|
36
|
+
return {
|
|
37
|
+
aiInformation: {
|
|
38
|
+
label: 'ai-information',
|
|
39
|
+
width: '18.5rem',
|
|
40
|
+
padding: componentTheme.bodyPadding,
|
|
41
|
+
boxSizing: 'border-box'
|
|
42
|
+
},
|
|
43
|
+
header: {
|
|
44
|
+
label: 'ai-information__header',
|
|
45
|
+
marginBottom: componentTheme.headingBottomMargin
|
|
46
|
+
},
|
|
47
|
+
privacyNotice: {
|
|
48
|
+
label: 'ai-information__privacyNotice',
|
|
49
|
+
marginBottom: componentTheme.headingBottomMargin
|
|
50
|
+
},
|
|
51
|
+
featureName: {
|
|
52
|
+
label: 'ai-information__feature-name',
|
|
53
|
+
marginBottom: componentTheme.featureNameBottomMargin
|
|
54
|
+
},
|
|
55
|
+
permissionLevelText: {
|
|
56
|
+
label: 'ai-information__permission-level-text',
|
|
57
|
+
marginBottom: componentTheme.permissionLevelTextBottomMargin
|
|
58
|
+
},
|
|
59
|
+
permissionLevel: {
|
|
60
|
+
label: 'ai-information__permission-level',
|
|
61
|
+
marginBottom: componentTheme.permissionLevelBottomMargin,
|
|
62
|
+
color: componentTheme.levelColor,
|
|
63
|
+
'& > *': {
|
|
64
|
+
color: `${componentTheme.levelColor} !important`
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
description: {
|
|
68
|
+
label: 'ai-information__description',
|
|
69
|
+
marginBottom: componentTheme.descriptionBottomMargin
|
|
70
|
+
},
|
|
71
|
+
permissionLevelsModalTriggerText: {
|
|
72
|
+
label: 'ai-information__permission-levels-modal-trigger-text',
|
|
73
|
+
marginBottom: componentTheme.permissionLevelsModalTriggerBottomMargin
|
|
74
|
+
},
|
|
75
|
+
modelNameText: {
|
|
76
|
+
label: 'ai-information__model-name-text',
|
|
77
|
+
marginBottom: componentTheme.modelNameTextBottomMargin
|
|
78
|
+
},
|
|
79
|
+
modelName: {
|
|
80
|
+
label: 'ai-information__model-name',
|
|
81
|
+
marginBottom: componentTheme.modelNameBottomMargin
|
|
82
|
+
},
|
|
83
|
+
divider: {
|
|
84
|
+
label: 'ai-information__divider',
|
|
85
|
+
marginBottom: componentTheme.dividerMargin,
|
|
86
|
+
marginTop: componentTheme.dividerMargin,
|
|
87
|
+
borderTop: 'solid 1px',
|
|
88
|
+
width: '100%',
|
|
89
|
+
borderColor: componentTheme.dividerColor
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export default generateStyle;
|
|
@@ -23,12 +23,12 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
import { useState } from 'react';
|
|
26
|
-
import { Modal } from '@instructure/ui-modal';
|
|
27
|
-
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
28
|
-
import { Heading } from '@instructure/ui-heading';
|
|
29
|
-
import { Text } from '@instructure/ui-text';
|
|
30
|
-
import { Link } from '@instructure/ui-link';
|
|
31
|
-
import { useStyle } from '@instructure/emotion';
|
|
26
|
+
import { Modal } from '@instructure/ui-modal/v11_6';
|
|
27
|
+
import { Button, CloseButton } from '@instructure/ui-buttons/v11_6';
|
|
28
|
+
import { Heading } from '@instructure/ui-heading/v11_6';
|
|
29
|
+
import { Text } from '@instructure/ui-text/v11_6';
|
|
30
|
+
import { Link } from '@instructure/ui-link/v11_6';
|
|
31
|
+
import { useStyleLegacy as useStyle } from '@instructure/emotion';
|
|
32
32
|
import generateStyle from "./styles.js";
|
|
33
33
|
import generateComponentTheme from "./theme.js";
|
|
34
34
|
/**
|
|
@@ -23,12 +23,12 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
23
23
|
* SOFTWARE.
|
|
24
24
|
*/
|
|
25
25
|
import { useState } from 'react';
|
|
26
|
-
import { Modal } from '@instructure/ui-modal';
|
|
27
|
-
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
28
|
-
import { Heading } from '@instructure/ui-heading';
|
|
29
|
-
import { Text } from '@instructure/ui-text';
|
|
30
|
-
import { Link } from '@instructure/ui-link';
|
|
31
|
-
import { useStyle } from '@instructure/emotion';
|
|
26
|
+
import { Modal } from '@instructure/ui-modal/v11_6';
|
|
27
|
+
import { Button, CloseButton } from '@instructure/ui-buttons/v11_6';
|
|
28
|
+
import { Heading } from '@instructure/ui-heading/v11_6';
|
|
29
|
+
import { Text } from '@instructure/ui-text/v11_6';
|
|
30
|
+
import { Link } from '@instructure/ui-link/v11_6';
|
|
31
|
+
import { useStyleLegacy as useStyle } from '@instructure/emotion';
|
|
32
32
|
import generateStyle from "./styles.js";
|
|
33
33
|
import generateComponentTheme from "./theme.js";
|
|
34
34
|
/**
|
|
@@ -21,6 +21,6 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { NutritionFacts } from "
|
|
25
|
-
export { DataPermissionLevels } from "
|
|
26
|
-
export { AiInformation } from "
|
|
24
|
+
export { NutritionFacts } from "../NutritionFacts/v1/index.js";
|
|
25
|
+
export { DataPermissionLevels } from "../DataPermissionLevels/v1/index.js";
|
|
26
|
+
export { AiInformation } from "../AiInformation/v1/index.js";
|
package/es/exports/b.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
export { NutritionFacts } from "../NutritionFacts/v1/index.js";
|
|
25
|
+
export { DataPermissionLevels } from "../DataPermissionLevels/v1/index.js";
|
|
26
|
+
export { AiInformation } from "../AiInformation/v2/index.js";
|