@instructure/ui-instructure 11.6.0 → 11.6.1-pr-snapshot-1779894247159

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-instructure
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-instructure
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,4 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- const allowedProps = exports.allowedProps = ['fullscreen', 'modalLabel', 'title', 'data', 'closeButtonText', 'closeIconButtonScreenReaderLabel', 'currentFeatureText', 'currentFeature', 'triggerText'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-instructure",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "Collection of specific components for Instructure products",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,26 +15,26 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/emotion": "11.6.0",
19
- "@instructure/shared-types": "11.6.0",
20
- "@instructure/ui-buttons": "11.6.0",
21
- "@instructure/ui-heading": "11.6.0",
22
- "@instructure/ui-icons": "11.6.0",
23
- "@instructure/ui-link": "11.6.0",
24
- "@instructure/ui-modal": "11.6.0",
25
- "@instructure/ui-text": "11.6.0",
26
- "@instructure/ui-view": "11.6.0",
27
- "@instructure/ui-popover": "11.6.0",
28
- "@instructure/ui-react-utils": "11.6.0"
18
+ "@instructure/emotion": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/ui-buttons": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/ui-heading": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/ui-icons": "11.6.1-pr-snapshot-1779894247159",
23
+ "@instructure/ui-link": "11.6.1-pr-snapshot-1779894247159",
24
+ "@instructure/ui-popover": "11.6.1-pr-snapshot-1779894247159",
25
+ "@instructure/ui-text": "11.6.1-pr-snapshot-1779894247159",
26
+ "@instructure/ui-modal": "11.6.1-pr-snapshot-1779894247159",
27
+ "@instructure/ui-react-utils": "11.6.1-pr-snapshot-1779894247159",
28
+ "@instructure/ui-view": "11.6.1-pr-snapshot-1779894247159"
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-babel-preset": "11.6.0",
35
- "@instructure/ui-axe-check": "11.6.0",
36
- "@instructure/ui-color-utils": "11.6.0",
37
- "@instructure/ui-themes": "11.6.0"
34
+ "@instructure/ui-axe-check": "11.6.1-pr-snapshot-1779894247159",
35
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159",
36
+ "@instructure/ui-color-utils": "11.6.1-pr-snapshot-1779894247159",
37
+ "@instructure/ui-themes": "11.6.1-pr-snapshot-1779894247159"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=18 <=19"
@@ -47,10 +47,8 @@
47
47
  ".": {
48
48
  "types": "./types/index.d.ts",
49
49
  "import": "./es/index.js",
50
- "require": "./lib/index.js",
51
50
  "default": "./es/index.js"
52
51
  },
53
- "./lib/*": "./lib/*",
54
52
  "./es/*": "./es/*",
55
53
  "./types/*": "./types/*",
56
54
  "./package.json": "./package.json",
@@ -60,7 +58,7 @@
60
58
  "lint": "ui-scripts lint",
61
59
  "lint:fix": "ui-scripts lint --fix",
62
60
  "clean": "ui-scripts clean",
63
- "build": "ui-scripts build --modules es,cjs",
61
+ "build": "ui-scripts build",
64
62
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
65
63
  "build:types": "tsc -p tsconfig.build.json",
66
64
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -1,200 +0,0 @@
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 _Popover = require("@instructure/ui-popover/lib/Popover");
11
- var _CloseButton = require("@instructure/ui-buttons/lib/CloseButton");
12
- var _Heading = require("@instructure/ui-heading/lib/Heading");
13
- var _Text = require("@instructure/ui-text/lib/Text");
14
- var _Link = require("@instructure/ui-link/lib/Link");
15
- var _IconExternalLinkLine2 = require("@instructure/ui-icons/lib/IconExternalLinkLine.js");
16
- var _emotion = require("@instructure/emotion");
17
- var _ = require("../");
18
- var _styles = _interopRequireDefault(require("./styles"));
19
- var _theme = _interopRequireDefault(require("./theme"));
20
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
21
- var _IconExternalLinkLine;
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
- }) => {
69
- const _useState = (0, _react.useState)(false),
70
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
71
- open = _useState2[0],
72
- setOpen = _useState2[1];
73
- const styles = (0, _emotion.useStyle)({
74
- generateStyle: _styles.default,
75
- generateComponentTheme: _theme.default,
76
- componentId: 'AiInformation',
77
- displayName: 'AiInformation'
78
- });
79
- return (0, _jsxRuntime.jsx)("div", {
80
- children: (0, _jsxRuntime.jsx)(_Popover.Popover, {
81
- renderTrigger: trigger,
82
- isShowingContent: open,
83
- on: "click",
84
- screenReaderLabel: "Popover Dialog Example",
85
- shouldContainFocus: true,
86
- shouldReturnFocus: true,
87
- shouldCloseOnDocumentClick: true,
88
- offsetY: "1rem",
89
- onShowContent: () => setOpen(true),
90
- onHideContent: () => setOpen(false),
91
- children: (0, _jsxRuntime.jsxs)("div", {
92
- css: styles === null || styles === void 0 ? void 0 : styles.aiInformation,
93
- children: [(0, _jsxRuntime.jsxs)("div", {
94
- css: styles === null || styles === void 0 ? void 0 : styles.header,
95
- children: [(0, _jsxRuntime.jsx)(_Heading.Heading, {
96
- level: "h2",
97
- aiVariant: "stacked",
98
- variant: "titleModule",
99
- children: title
100
- }), (0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
101
- placement: "end",
102
- offset: "small",
103
- onClick: () => setOpen(false),
104
- screenReaderLabel: "Close"
105
- })]
106
- }), (0, _jsxRuntime.jsx)("div", {
107
- children: data.map(({
108
- featureName,
109
- privacyNoticeText,
110
- privacyNoticeUrl,
111
- permissionLevelText,
112
- permissionLevel,
113
- description,
114
- permissionLevelsModalTriggerText,
115
- modelNameText,
116
- modelName,
117
- nutritionFactsModalTriggerText
118
- }, index) => (0, _jsxRuntime.jsxs)("div", {
119
- children: [(0, _jsxRuntime.jsx)("div", {
120
- css: styles === null || styles === void 0 ? void 0 : styles.privacyNotice,
121
- children: (0, _jsxRuntime.jsx)(_Link.Link, {
122
- href: privacyNoticeUrl,
123
- renderIcon: _IconExternalLinkLine || (_IconExternalLinkLine = (0, _jsxRuntime.jsx)(_IconExternalLinkLine2.IconExternalLinkLine, {})),
124
- iconPlacement: "end",
125
- variant: "standalone",
126
- target: "_blank",
127
- children: privacyNoticeText
128
- })
129
- }), (0, _jsxRuntime.jsx)("div", {
130
- css: styles === null || styles === void 0 ? void 0 : styles.featureName,
131
- children: (0, _jsxRuntime.jsx)(_Heading.Heading, {
132
- level: "h3",
133
- variant: "titleCardRegular",
134
- children: featureName
135
- })
136
- }), (0, _jsxRuntime.jsx)("div", {
137
- css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelText,
138
- children: (0, _jsxRuntime.jsx)(_Heading.Heading, {
139
- level: "h4",
140
- variant: "label",
141
- children: permissionLevelText
142
- })
143
- }), (0, _jsxRuntime.jsx)("div", {
144
- css: styles === null || styles === void 0 ? void 0 : styles.permissionLevel,
145
- children: (0, _jsxRuntime.jsxs)(_Text.Text, {
146
- variant: "legend",
147
- children: [" ", permissionLevel, " "]
148
- })
149
- }), (0, _jsxRuntime.jsx)("div", {
150
- css: styles === null || styles === void 0 ? void 0 : styles.description,
151
- children: (0, _jsxRuntime.jsxs)(_Text.Text, {
152
- variant: "contentSmall",
153
- children: [" ", description, " "]
154
- })
155
- }), (0, _jsxRuntime.jsx)("div", {
156
- css: styles === null || styles === void 0 ? void 0 : styles.permissionLevelsModalTriggerText,
157
- children: (0, _jsxRuntime.jsx)(_.DataPermissionLevels, {
158
- fullscreen: fullscreenModals,
159
- title: dataPermissionLevelsTitle,
160
- currentFeatureText: dataPermissionLevelsCurrentFeatureText,
161
- currentFeature: dataPermissionLevelsCurrentFeature,
162
- closeIconButtonScreenReaderLabel: dataPermissionLevelsCloseIconButtonScreenReaderLabel,
163
- closeButtonText: dataPermissionLevelsCloseButtonText,
164
- modalLabel: dataPermissionLevelsModalLabel,
165
- triggerText: permissionLevelsModalTriggerText,
166
- data: dataPermissionLevelsData
167
- })
168
- }), (0, _jsxRuntime.jsx)("div", {
169
- css: styles === null || styles === void 0 ? void 0 : styles.modelNameText,
170
- children: (0, _jsxRuntime.jsxs)(_Heading.Heading, {
171
- level: "h3",
172
- variant: "label",
173
- children: [' ', modelNameText, ' ']
174
- })
175
- }), (0, _jsxRuntime.jsx)("div", {
176
- css: styles === null || styles === void 0 ? void 0 : styles.modelName,
177
- children: (0, _jsxRuntime.jsxs)(_Text.Text, {
178
- variant: "contentSmall",
179
- children: [" ", modelName, " "]
180
- })
181
- }), (0, _jsxRuntime.jsx)(_.NutritionFacts, {
182
- fullscreen: fullscreenModals,
183
- modalLabel: nutritionFactsModalLabel,
184
- title: nutritionFactsTitle,
185
- featureName: nutritionFactsFeatureName,
186
- closeButtonText: nutritionFactsCloseButtonText,
187
- closeIconButtonScreenReaderLabel: nutritionFactsCloseIconButtonScreenReaderLabel,
188
- triggerText: nutritionFactsModalTriggerText,
189
- data: nutritionFactsData
190
- }), data.length !== index + 1 ? (0, _jsxRuntime.jsx)("div", {
191
- css: styles === null || styles === void 0 ? void 0 : styles.divider
192
- }) : null]
193
- }, index))
194
- })]
195
- })
196
- })
197
- });
198
- };
199
- exports.AiInformation = AiInformation;
200
- var _default = exports.default = AiInformation;
@@ -1,31 +0,0 @@
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'];
@@ -1,95 +0,0 @@
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 {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @return {Object} The final style object, which will be used in the component
39
- */
40
- const generateStyle = (componentTheme, _props) => {
41
- return {
42
- aiInformation: {
43
- label: 'ai-information',
44
- width: '18.5rem',
45
- padding: componentTheme.bodyPadding,
46
- boxSizing: 'border-box'
47
- },
48
- header: {
49
- label: 'ai-information__header',
50
- marginBottom: componentTheme.headingBottomMargin
51
- },
52
- privacyNotice: {
53
- label: 'ai-information__privacyNotice',
54
- marginBottom: componentTheme.headingBottomMargin
55
- },
56
- featureName: {
57
- label: 'ai-information__feature-name',
58
- marginBottom: componentTheme.featureNameBottomMargin
59
- },
60
- permissionLevelText: {
61
- label: 'ai-information__permission-level-text',
62
- marginBottom: componentTheme.permissionLevelTextBottomMargin
63
- },
64
- permissionLevel: {
65
- label: 'ai-information__permission-level',
66
- marginBottom: componentTheme.permissionLevelBottomMargin,
67
- color: componentTheme.levelColor
68
- },
69
- description: {
70
- label: 'ai-information__description',
71
- marginBottom: componentTheme.descriptionBottomMargin
72
- },
73
- permissionLevelsModalTriggerText: {
74
- label: 'ai-information__permission-levels-modal-trigger-text',
75
- marginBottom: componentTheme.permissionLevelsModalTriggerBottomMargin
76
- },
77
- modelNameText: {
78
- label: 'ai-information__model-name-text',
79
- marginBottom: componentTheme.modelNameTextBottomMargin
80
- },
81
- modelName: {
82
- label: 'ai-information__model-name',
83
- marginBottom: componentTheme.modelNameBottomMargin
84
- },
85
- divider: {
86
- label: 'ai-information__divider',
87
- marginBottom: componentTheme.dividerMargin,
88
- marginTop: componentTheme.dividerMargin,
89
- borderTop: 'solid 1px',
90
- width: '100%',
91
- borderColor: componentTheme.dividerColor
92
- }
93
- };
94
- };
95
- var _default = exports.default = generateStyle;
@@ -1,58 +0,0 @@
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
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- var _colors$ui, _colors$contrasts;
38
- const colors = theme.colors,
39
- spacing = theme.spacing;
40
- const componentVariables = {
41
- bodyPadding: spacing === null || spacing === void 0 ? void 0 : spacing.paddingCardLarge,
42
- headingBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.sectionElements,
43
- featureNameBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.moduleElements,
44
- permissionLevelTextBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
45
- permissionLevelBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
46
- descriptionBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
47
- permissionLevelsModalTriggerBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.moduleElements,
48
- modelNameTextBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space4,
49
- modelNameBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space4,
50
- dividerMargin: spacing === null || spacing === void 0 ? void 0 : spacing.moduleElements,
51
- dividerColor: colors === null || colors === void 0 ? void 0 : (_colors$ui = colors.ui) === null || _colors$ui === void 0 ? void 0 : _colors$ui.surfaceDivider,
52
- levelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.violet5790
53
- };
54
- return {
55
- ...componentVariables
56
- };
57
- };
58
- var _default = exports.default = generateComponentTheme;
@@ -1,151 +0,0 @@
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.DataPermissionLevels = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _react = require("react");
10
- var _Modal = require("@instructure/ui-modal/lib/Modal");
11
- var _Button = require("@instructure/ui-buttons/lib/Button");
12
- var _CloseButton = require("@instructure/ui-buttons/lib/CloseButton");
13
- var _Heading2 = require("@instructure/ui-heading/lib/Heading");
14
- var _Text2 = require("@instructure/ui-text/lib/Text");
15
- var _Link = require("@instructure/ui-link/lib/Link");
16
- var _emotion = require("@instructure/emotion");
17
- var _styles = _interopRequireDefault(require("./styles"));
18
- var _theme = _interopRequireDefault(require("./theme"));
19
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
20
- /*
21
- * The MIT License (MIT)
22
- *
23
- * Copyright (c) 2015 - present Instructure, Inc.
24
- *
25
- * Permission is hereby granted, free of charge, to any person obtaining a copy
26
- * of this software and associated documentation files (the "Software"), to deal
27
- * in the Software without restriction, including without limitation the rights
28
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
- * copies of the Software, and to permit persons to whom the Software is
30
- * furnished to do so, subject to the following conditions:
31
- *
32
- * The above copyright notice and this permission notice shall be included in all
33
- * copies or substantial portions of the Software.
34
- *
35
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
- * SOFTWARE.
42
- */
43
-
44
- /**
45
- ---
46
- category: components/AI Components
47
- ---
48
- **/const DataPermissionLevels = ({
49
- modalLabel,
50
- title,
51
- data,
52
- closeButtonText,
53
- closeIconButtonScreenReaderLabel,
54
- currentFeature,
55
- currentFeatureText,
56
- triggerText,
57
- fullscreen = false
58
- }) => {
59
- var _Heading, _Text;
60
- const _useState = (0, _react.useState)(false),
61
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
62
- open = _useState2[0],
63
- setOpen = _useState2[1];
64
- const styles = (0, _emotion.useStyle)({
65
- generateStyle: _styles.default,
66
- generateComponentTheme: _theme.default,
67
- componentId: 'DataPermissionLevels',
68
- displayName: 'DataPermissionLevels'
69
- });
70
- return (0, _jsxRuntime.jsxs)("div", {
71
- children: [(0, _jsxRuntime.jsx)(_Link.Link, {
72
- variant: "standalone",
73
- onClick: e => {
74
- e.preventDefault();
75
- setOpen(true);
76
- },
77
- forceButtonRole: false,
78
- href: "#",
79
- children: triggerText
80
- }), (0, _jsxRuntime.jsxs)(_Modal.Modal, {
81
- size: fullscreen ? 'fullscreen' : 'medium',
82
- open: open,
83
- onDismiss: () => {
84
- setOpen(false);
85
- },
86
- label: modalLabel,
87
- shouldCloseOnDocumentClick: true,
88
- children: [(0, _jsxRuntime.jsxs)(_Modal.Modal.Header, {
89
- spacing: "compact",
90
- children: [(0, _jsxRuntime.jsx)(_Heading2.Heading, {
91
- aiVariant: "stacked",
92
- children: title
93
- }), (0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
94
- size: "medium",
95
- placement: "end",
96
- offset: "small",
97
- onClick: () => setOpen(false),
98
- screenReaderLabel: closeIconButtonScreenReaderLabel
99
- })]
100
- }), (0, _jsxRuntime.jsx)(_Modal.Modal.Body, {
101
- children: (0, _jsxRuntime.jsx)("div", {
102
- css: styles === null || styles === void 0 ? void 0 : styles.body,
103
- children: data.map(({
104
- level,
105
- title,
106
- description,
107
- highlighted
108
- }, index) => (0, _jsxRuntime.jsxs)("div", {
109
- css: highlighted ? styles === null || styles === void 0 ? void 0 : styles.highlightedCard : styles === null || styles === void 0 ? void 0 : styles.card,
110
- children: [highlighted ? (0, _jsxRuntime.jsxs)("div", {
111
- css: styles === null || styles === void 0 ? void 0 : styles.currentFeature,
112
- children: [_Heading || (_Heading = (0, _jsxRuntime.jsxs)(_Heading2.Heading, {
113
- color: "primary-inverse",
114
- level: "reset",
115
- variant: "labelInline",
116
- children: [currentFeatureText, ' ']
117
- })), _Text || (_Text = (0, _jsxRuntime.jsx)(_Text2.Text, {
118
- color: "primary-inverse",
119
- variant: "content",
120
- children: currentFeature
121
- }))]
122
- }) : null, (0, _jsxRuntime.jsxs)("div", {
123
- css: styles === null || styles === void 0 ? void 0 : styles.contentContainer,
124
- children: [(0, _jsxRuntime.jsx)("div", {
125
- css: styles === null || styles === void 0 ? void 0 : styles.level,
126
- children: level
127
- }), (0, _jsxRuntime.jsx)("div", {
128
- css: styles === null || styles === void 0 ? void 0 : styles.permissionTitle,
129
- children: (0, _jsxRuntime.jsxs)(_Text2.Text, {
130
- variant: "descriptionPage",
131
- children: [title, " "]
132
- })
133
- }), (0, _jsxRuntime.jsx)(_Text2.Text, {
134
- variant: "content",
135
- color: "secondary",
136
- children: description
137
- })]
138
- })]
139
- }, index))
140
- })
141
- }), (0, _jsxRuntime.jsx)(_Modal.Modal.Footer, {
142
- children: (0, _jsxRuntime.jsx)(_Button.Button, {
143
- onClick: () => setOpen(false),
144
- children: closeButtonText
145
- })
146
- })]
147
- })]
148
- });
149
- };
150
- exports.DataPermissionLevels = DataPermissionLevels;
151
- var _default = exports.default = DataPermissionLevels;
@@ -1,102 +0,0 @@
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 {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @return {Object} The final style object, which will be used in the component
39
- */
40
- const generateStyle = (componentTheme, _props) => {
41
- return {
42
- dataPermissionLevels: {
43
- label: 'data-permission-levels'
44
- },
45
- body: {
46
- label: 'data-permission-levels__body',
47
- display: 'flex',
48
- flexDirection: 'column',
49
- padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.bodyPadding
50
- },
51
- card: {
52
- label: 'data-permission-levels__card',
53
- padding: '2px',
54
- borderStyle: 'solid',
55
- borderColor: 'transparent',
56
- borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
57
- display: 'flex',
58
- flexDirection: 'column'
59
- },
60
- highlightedCard: {
61
- label: 'data-permission-levels__highlighted-card',
62
- borderStyle: 'solid',
63
- borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
64
- borderColor: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderColor,
65
- borderRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius,
66
- padding: '2px',
67
- display: 'flex',
68
- flexDirection: 'column',
69
- background: `
70
- linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%) padding-box,
71
- linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%) border-box`,
72
- border: 'solid transparent'
73
- },
74
- level: {
75
- label: 'data-permission-levels__level',
76
- color: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.levelColor
77
- },
78
- currentFeature: {
79
- label: 'data-permission-levels__current-feature',
80
- background: `
81
- linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%)`,
82
- paddingLeft: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingSides,
83
- paddingRight: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingSides,
84
- paddingTop: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingTopBottom,
85
- paddingBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingTopBottom,
86
- borderTopLeftRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius,
87
- borderTopRightRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius
88
- },
89
- contentContainer: {
90
- label: 'data-permission-levels__content-container',
91
- background: 'white',
92
- padding: '10px',
93
- display: 'flex',
94
- flexDirection: 'column'
95
- },
96
- permissionTitle: {
97
- label: 'data-permission-levels__permission-title',
98
- marginBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.permissionTitleBottomMargin
99
- }
100
- };
101
- };
102
- var _default = exports.default = generateStyle;
@@ -1,60 +0,0 @@
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
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- var _colors$ui, _colors$contrasts, _colors$contrasts2, _colors$contrasts3;
38
- const colors = theme.colors,
39
- spacing = theme.spacing,
40
- borders = theme.borders;
41
- const componentVariables = {
42
- cardBorderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
43
- cardBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$ui = colors.ui) === null || _colors$ui === void 0 ? void 0 : _colors$ui.lineStroke,
44
- cardBorderWidth: borders === null || borders === void 0 ? void 0 : borders.widthMedium,
45
- cardPadding: spacing === null || spacing === void 0 ? void 0 : spacing.space12,
46
- cardExplainerContainerBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
47
- cardGap: spacing === null || spacing === void 0 ? void 0 : spacing.modalElements,
48
- currentFeaturePaddingSides: spacing === null || spacing === void 0 ? void 0 : spacing.space12,
49
- currentFeaturePaddingTopBottom: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
50
- permissionTitleBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
51
- levelColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts = colors.contrasts) === null || _colors$contrasts === void 0 ? void 0 : _colors$contrasts.violet5790,
52
- bodyPadding: spacing === null || spacing === void 0 ? void 0 : spacing.paddingCardLarge,
53
- aiTextLeftGradientColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts2 = colors.contrasts) === null || _colors$contrasts2 === void 0 ? void 0 : _colors$contrasts2.violet4570,
54
- aiTextRightGradientColor: colors === null || colors === void 0 ? void 0 : (_colors$contrasts3 = colors.contrasts) === null || _colors$contrasts3 === void 0 ? void 0 : _colors$contrasts3.sea4570
55
- };
56
- return {
57
- ...componentVariables
58
- };
59
- };
60
- var _default = exports.default = generateComponentTheme;
@@ -1,159 +0,0 @@
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.NutritionFacts = void 0;
8
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- var _react = require("react");
10
- var _Modal = require("@instructure/ui-modal/lib/Modal");
11
- var _Button = require("@instructure/ui-buttons/lib/Button");
12
- var _CloseButton = require("@instructure/ui-buttons/lib/CloseButton");
13
- var _Heading = require("@instructure/ui-heading/lib/Heading");
14
- var _Text = require("@instructure/ui-text/lib/Text");
15
- var _Link = require("@instructure/ui-link/lib/Link");
16
- var _emotion = require("@instructure/emotion");
17
- var _styles = _interopRequireDefault(require("./styles"));
18
- var _theme = _interopRequireDefault(require("./theme"));
19
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
20
- /*
21
- * The MIT License (MIT)
22
- *
23
- * Copyright (c) 2015 - present Instructure, Inc.
24
- *
25
- * Permission is hereby granted, free of charge, to any person obtaining a copy
26
- * of this software and associated documentation files (the "Software"), to deal
27
- * in the Software without restriction, including without limitation the rights
28
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
29
- * copies of the Software, and to permit persons to whom the Software is
30
- * furnished to do so, subject to the following conditions:
31
- *
32
- * The above copyright notice and this permission notice shall be included in all
33
- * copies or substantial portions of the Software.
34
- *
35
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
38
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
41
- * SOFTWARE.
42
- */
43
-
44
- /**
45
- ---
46
- category: components/AI Components
47
- ---
48
- **/const NutritionFacts = ({
49
- modalLabel,
50
- title,
51
- featureName,
52
- data,
53
- closeButtonText,
54
- closeIconButtonScreenReaderLabel,
55
- triggerText,
56
- fullscreen = false
57
- }) => {
58
- const _useState = (0, _react.useState)(false),
59
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
60
- open = _useState2[0],
61
- setOpen = _useState2[1];
62
- const styles = (0, _emotion.useStyle)({
63
- generateStyle: _styles.default,
64
- generateComponentTheme: _theme.default,
65
- componentId: 'NutritionFacts',
66
- displayName: 'NutritionFacts'
67
- });
68
- return (0, _jsxRuntime.jsxs)("div", {
69
- children: [(0, _jsxRuntime.jsx)(_Link.Link, {
70
- variant: "standalone",
71
- onClick: e => {
72
- e.preventDefault();
73
- setOpen(true);
74
- },
75
- forceButtonRole: false,
76
- href: "#",
77
- children: triggerText
78
- }), (0, _jsxRuntime.jsxs)(_Modal.Modal, {
79
- open: open,
80
- onDismiss: () => {
81
- setOpen(false);
82
- },
83
- label: modalLabel,
84
- shouldCloseOnDocumentClick: true,
85
- size: fullscreen ? 'fullscreen' : 'medium',
86
- children: [(0, _jsxRuntime.jsxs)(_Modal.Modal.Header, {
87
- spacing: "compact",
88
- children: [(0, _jsxRuntime.jsx)(_Heading.Heading, {
89
- aiVariant: "stacked",
90
- children: title
91
- }), (0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
92
- size: "medium",
93
- placement: "end",
94
- offset: "small",
95
- onClick: () => setOpen(false),
96
- screenReaderLabel: closeIconButtonScreenReaderLabel
97
- })]
98
- }), (0, _jsxRuntime.jsx)(_Modal.Modal.Body, {
99
- children: (0, _jsxRuntime.jsxs)("div", {
100
- css: styles === null || styles === void 0 ? void 0 : styles.body,
101
- children: [(0, _jsxRuntime.jsxs)(_Heading.Heading, {
102
- variant: "titleSection",
103
- level: "h3",
104
- children: [' ', featureName, ' ']
105
- }), data.map(({
106
- blockTitle,
107
- segmentData
108
- }, index) => {
109
- return (0, _jsxRuntime.jsxs)("div", {
110
- css: styles === null || styles === void 0 ? void 0 : styles.blockContainer,
111
- children: [(0, _jsxRuntime.jsxs)(_Heading.Heading, {
112
- variant: "titleModule",
113
- level: "h4",
114
- children: [' ', blockTitle, ' ']
115
- }), (0, _jsxRuntime.jsx)("div", {
116
- css: styles === null || styles === void 0 ? void 0 : styles.segmentContainer,
117
- children: segmentData.map(({
118
- segmentTitle,
119
- description,
120
- value,
121
- valueDescription
122
- }, index) => {
123
- return (0, _jsxRuntime.jsxs)("div", {
124
- css: styles === null || styles === void 0 ? void 0 : styles.segmentCard,
125
- children: [(0, _jsxRuntime.jsxs)("div", {
126
- css: styles === null || styles === void 0 ? void 0 : styles.segmentCardExplainerContainer,
127
- children: [(0, _jsxRuntime.jsxs)(_Heading.Heading, {
128
- variant: "label",
129
- children: [' ', segmentTitle, ' ']
130
- }), (0, _jsxRuntime.jsxs)(_Text.Text, {
131
- variant: "contentSmall",
132
- color: "secondary",
133
- children: [' ', description, ' ']
134
- })]
135
- }), (0, _jsxRuntime.jsxs)(_Text.Text, {
136
- variant: "content",
137
- children: [" ", value, " "]
138
- }), (0, _jsxRuntime.jsxs)(_Text.Text, {
139
- variant: "contentSmall",
140
- color: "secondary",
141
- children: [' ', valueDescription, ' ']
142
- })]
143
- }, index);
144
- })
145
- })]
146
- }, index);
147
- })]
148
- })
149
- }), (0, _jsxRuntime.jsx)(_Modal.Modal.Footer, {
150
- children: (0, _jsxRuntime.jsx)(_Button.Button, {
151
- onClick: () => setOpen(false),
152
- children: closeButtonText
153
- })
154
- })]
155
- })]
156
- });
157
- };
158
- exports.NutritionFacts = NutritionFacts;
159
- var _default = exports.default = NutritionFacts;
@@ -1,31 +0,0 @@
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 = ['fullscreen', 'modalLabel', 'title', 'featureName', 'data', 'closeButtonText', 'closeIconButtonScreenReaderLabel', 'triggerText'];
@@ -1,78 +0,0 @@
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 {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @return {Object} The final style object, which will be used in the component
39
- */
40
- const generateStyle = (componentTheme, _props) => {
41
- return {
42
- segmentCard: {
43
- label: 'nutrition-facts__segment-card',
44
- borderStyle: 'solid',
45
- borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
46
- borderColor: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderColor,
47
- borderRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius,
48
- padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardPadding,
49
- display: 'flex',
50
- flexDirection: 'column'
51
- },
52
- segmentCardExplainerContainer: {
53
- label: 'nutrition-facts__segment-card-explainer-container',
54
- marginBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardExplainerContainerBottomMargin
55
- },
56
- segmentContainer: {
57
- label: 'nutrition-facts__segment-container',
58
- display: 'flex',
59
- flexDirection: 'column',
60
- gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardGap
61
- },
62
- blockContainer: {
63
- label: 'nutrition-facts__block-container',
64
- display: 'flex',
65
- flexDirection: 'column',
66
- gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardGap
67
- },
68
- body: {
69
- label: 'nutrition-facts__body',
70
- display: 'flex',
71
- flexDirection: 'column',
72
- gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.blockGap,
73
- padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.bodyPadding,
74
- boxSizing: 'border-box'
75
- }
76
- };
77
- };
78
- var _default = exports.default = generateStyle;
@@ -1,55 +0,0 @@
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
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- var _colors$ui;
38
- const colors = theme.colors,
39
- spacing = theme.spacing,
40
- borders = theme.borders;
41
- const componentVariables = {
42
- cardBorderRadius: borders === null || borders === void 0 ? void 0 : borders.radiusMedium,
43
- cardBorderColor: colors === null || colors === void 0 ? void 0 : (_colors$ui = colors.ui) === null || _colors$ui === void 0 ? void 0 : _colors$ui.lineStroke,
44
- cardBorderWidth: borders === null || borders === void 0 ? void 0 : borders.widthSmall,
45
- cardPadding: spacing === null || spacing === void 0 ? void 0 : spacing.space12,
46
- cardExplainerContainerBottomMargin: spacing === null || spacing === void 0 ? void 0 : spacing.space8,
47
- cardGap: spacing === null || spacing === void 0 ? void 0 : spacing.modalElements,
48
- bodyPadding: spacing === null || spacing === void 0 ? void 0 : spacing.paddingCardLarge,
49
- blockGap: spacing === null || spacing === void 0 ? void 0 : spacing.sectionElements
50
- };
51
- return {
52
- ...componentVariables
53
- };
54
- };
55
- var _default = exports.default = generateComponentTheme;
package/lib/index.js DELETED
@@ -1,26 +0,0 @@
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 _AiInformation.AiInformation;
10
- }
11
- });
12
- Object.defineProperty(exports, "DataPermissionLevels", {
13
- enumerable: true,
14
- get: function () {
15
- return _DataPermissionLevels.DataPermissionLevels;
16
- }
17
- });
18
- Object.defineProperty(exports, "NutritionFacts", {
19
- enumerable: true,
20
- get: function () {
21
- return _NutritionFacts.NutritionFacts;
22
- }
23
- });
24
- var _NutritionFacts = require("./NutritionFacts");
25
- var _DataPermissionLevels = require("./DataPermissionLevels");
26
- var _AiInformation = require("./AiInformation");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}