@instructure/ui-instructure 11.7.2-snapshot-9 → 11.7.2-snapshot-11

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +5 -2
  2. package/es/AiInformation/v2/index.js +2 -2
  3. package/es/DataPermissionLevels/v2/index.js +143 -0
  4. package/es/DataPermissionLevels/v2/props.js +26 -0
  5. package/es/DataPermissionLevels/v2/styles.js +99 -0
  6. package/es/NutritionFacts/v2/index.js +151 -0
  7. package/es/NutritionFacts/v2/props.js +26 -0
  8. package/es/NutritionFacts/v2/styles.js +73 -0
  9. package/es/exports/b.js +2 -2
  10. package/lib/AiInformation/v2/index.js +2 -2
  11. package/lib/DataPermissionLevels/v2/index.js +150 -0
  12. package/lib/DataPermissionLevels/v2/props.js +31 -0
  13. package/lib/DataPermissionLevels/v2/styles.js +105 -0
  14. package/lib/NutritionFacts/v2/index.js +158 -0
  15. package/lib/NutritionFacts/v2/props.js +31 -0
  16. package/lib/NutritionFacts/v2/styles.js +79 -0
  17. package/lib/exports/b.js +2 -2
  18. package/package.json +16 -16
  19. package/src/AiInformation/v2/index.tsx +2 -2
  20. package/src/AiInformation/v2/styles.ts +2 -2
  21. package/src/DataPermissionLevels/v2/README.md +47 -0
  22. package/src/DataPermissionLevels/v2/index.tsx +137 -0
  23. package/src/DataPermissionLevels/v2/props.ts +106 -0
  24. package/src/DataPermissionLevels/v2/styles.ts +110 -0
  25. package/src/NutritionFacts/v2/README.md +99 -0
  26. package/src/NutritionFacts/v2/index.tsx +147 -0
  27. package/src/NutritionFacts/v2/props.ts +103 -0
  28. package/src/NutritionFacts/v2/styles.ts +81 -0
  29. package/src/exports/b.ts +4 -4
  30. package/tsconfig.build.tsbuildinfo +1 -1
  31. package/types/AiInformation/v2/styles.d.ts +2 -2
  32. package/types/AiInformation/v2/styles.d.ts.map +1 -1
  33. package/types/DataPermissionLevels/v2/index.d.ts +10 -0
  34. package/types/DataPermissionLevels/v2/index.d.ts.map +1 -0
  35. package/types/DataPermissionLevels/v2/props.d.ts +57 -0
  36. package/types/DataPermissionLevels/v2/props.d.ts.map +1 -0
  37. package/types/DataPermissionLevels/v2/styles.d.ts +15 -0
  38. package/types/DataPermissionLevels/v2/styles.d.ts.map +1 -0
  39. package/types/NutritionFacts/v2/index.d.ts +10 -0
  40. package/types/NutritionFacts/v2/index.d.ts.map +1 -0
  41. package/types/NutritionFacts/v2/props.d.ts +57 -0
  42. package/types/NutritionFacts/v2/props.d.ts.map +1 -0
  43. package/types/NutritionFacts/v2/styles.d.ts +15 -0
  44. package/types/NutritionFacts/v2/styles.d.ts.map +1 -0
  45. package/types/exports/b.d.ts +4 -4
@@ -0,0 +1,150 @@
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 _latest = require("@instructure/ui-modal/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 _emotion = require("@instructure/emotion");
16
+ var _styles = _interopRequireDefault(require("./styles"));
17
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
18
+ /*
19
+ * The MIT License (MIT)
20
+ *
21
+ * Copyright (c) 2015 - present Instructure, Inc.
22
+ *
23
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ * of this software and associated documentation files (the "Software"), to deal
25
+ * in the Software without restriction, including without limitation the rights
26
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ * copies of the Software, and to permit persons to whom the Software is
28
+ * furnished to do so, subject to the following conditions:
29
+ *
30
+ * The above copyright notice and this permission notice shall be included in all
31
+ * copies or substantial portions of the Software.
32
+ *
33
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ * SOFTWARE.
40
+ */
41
+
42
+ /**
43
+ ---
44
+ category: components/AI Components
45
+ ---
46
+ **/const DataPermissionLevels = ({
47
+ modalLabel,
48
+ title,
49
+ data,
50
+ closeButtonText,
51
+ closeIconButtonScreenReaderLabel,
52
+ currentFeature,
53
+ currentFeatureText,
54
+ triggerText,
55
+ fullscreen = false,
56
+ themeOverride
57
+ }) => {
58
+ var _Heading, _Text;
59
+ const _useState = (0, _react.useState)(false),
60
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
61
+ open = _useState2[0],
62
+ setOpen = _useState2[1];
63
+ const styles = (0, _emotion.useStyle)({
64
+ generateStyle: _styles.default,
65
+ themeOverride,
66
+ componentId: 'DataPermissionLevels',
67
+ displayName: 'DataPermissionLevels'
68
+ });
69
+ return (0, _jsxRuntime.jsxs)("div", {
70
+ children: [(0, _jsxRuntime.jsx)(_latest5.Link, {
71
+ variant: "standalone",
72
+ onClick: e => {
73
+ e.preventDefault();
74
+ setOpen(true);
75
+ },
76
+ forceButtonRole: false,
77
+ href: "#",
78
+ children: triggerText
79
+ }), (0, _jsxRuntime.jsxs)(_latest.Modal, {
80
+ size: fullscreen ? 'fullscreen' : 'medium',
81
+ open: open,
82
+ onDismiss: () => {
83
+ setOpen(false);
84
+ },
85
+ label: modalLabel,
86
+ shouldCloseOnDocumentClick: true,
87
+ children: [(0, _jsxRuntime.jsxs)(_latest.Modal.Header, {
88
+ spacing: "compact",
89
+ children: [(0, _jsxRuntime.jsx)(_latest3.Heading, {
90
+ aiVariant: "stacked",
91
+ children: title
92
+ }), (0, _jsxRuntime.jsx)(_latest2.CloseButton, {
93
+ size: "medium",
94
+ placement: "end",
95
+ offset: "small",
96
+ onClick: () => setOpen(false),
97
+ screenReaderLabel: closeIconButtonScreenReaderLabel
98
+ })]
99
+ }), (0, _jsxRuntime.jsx)(_latest.Modal.Body, {
100
+ children: (0, _jsxRuntime.jsx)("div", {
101
+ css: styles === null || styles === void 0 ? void 0 : styles.body,
102
+ children: data.map(({
103
+ level,
104
+ title,
105
+ description,
106
+ highlighted
107
+ }, index) => (0, _jsxRuntime.jsxs)("div", {
108
+ css: highlighted ? styles === null || styles === void 0 ? void 0 : styles.highlightedCard : styles === null || styles === void 0 ? void 0 : styles.card,
109
+ children: [highlighted ? (0, _jsxRuntime.jsxs)("div", {
110
+ css: styles === null || styles === void 0 ? void 0 : styles.currentFeature,
111
+ children: [_Heading || (_Heading = (0, _jsxRuntime.jsxs)(_latest3.Heading, {
112
+ color: "primary-on",
113
+ level: "reset",
114
+ variant: "labelInline",
115
+ children: [currentFeatureText, ' ']
116
+ })), _Text || (_Text = (0, _jsxRuntime.jsx)(_latest4.Text, {
117
+ color: "primary-on",
118
+ variant: "content",
119
+ children: currentFeature
120
+ }))]
121
+ }) : null, (0, _jsxRuntime.jsxs)("div", {
122
+ css: styles === null || styles === void 0 ? void 0 : styles.contentContainer,
123
+ children: [(0, _jsxRuntime.jsx)("div", {
124
+ css: styles === null || styles === void 0 ? void 0 : styles.level,
125
+ children: level
126
+ }), (0, _jsxRuntime.jsx)("div", {
127
+ css: styles === null || styles === void 0 ? void 0 : styles.permissionTitle,
128
+ children: (0, _jsxRuntime.jsxs)(_latest4.Text, {
129
+ variant: "descriptionPage",
130
+ children: [title, " "]
131
+ })
132
+ }), (0, _jsxRuntime.jsx)(_latest4.Text, {
133
+ variant: "content",
134
+ color: "secondary",
135
+ children: description
136
+ })]
137
+ })]
138
+ }, index))
139
+ })
140
+ }), (0, _jsxRuntime.jsx)(_latest.Modal.Footer, {
141
+ children: (0, _jsxRuntime.jsx)(_latest2.Button, {
142
+ onClick: () => setOpen(false),
143
+ children: closeButtonText
144
+ })
145
+ })]
146
+ })]
147
+ });
148
+ };
149
+ exports.DataPermissionLevels = DataPermissionLevels;
150
+ var _default = exports.default = DataPermissionLevels;
@@ -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 = ['fullscreen', 'modalLabel', 'title', 'data', 'closeButtonText', 'closeIconButtonScreenReaderLabel', 'currentFeatureText', 'currentFeature', 'triggerText'];
@@ -0,0 +1,105 @@
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
+ dataPermissionLevels: {
44
+ label: 'data-permission-levels'
45
+ },
46
+ body: {
47
+ label: 'data-permission-levels__body',
48
+ display: 'flex',
49
+ flexDirection: 'column',
50
+ padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.bodyPadding
51
+ },
52
+ card: {
53
+ label: 'data-permission-levels__card',
54
+ padding: '2px',
55
+ borderStyle: 'solid',
56
+ borderColor: 'transparent',
57
+ borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
58
+ display: 'flex',
59
+ flexDirection: 'column'
60
+ },
61
+ highlightedCard: {
62
+ label: 'data-permission-levels__highlighted-card',
63
+ borderStyle: 'solid',
64
+ borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
65
+ borderColor: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderColor,
66
+ borderRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius,
67
+ padding: '2px',
68
+ display: 'flex',
69
+ flexDirection: 'column',
70
+ background: `
71
+ linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%) padding-box,
72
+ linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%) border-box`,
73
+ border: 'solid transparent'
74
+ },
75
+ level: {
76
+ label: 'data-permission-levels__level',
77
+ color: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.levelColor
78
+ },
79
+ currentFeature: {
80
+ label: 'data-permission-levels__current-feature',
81
+ background: `
82
+ linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%)`,
83
+ paddingLeft: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingSides,
84
+ paddingRight: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingSides,
85
+ paddingTop: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingTopBottom,
86
+ paddingBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.currentFeaturePaddingTopBottom,
87
+ borderTopLeftRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius,
88
+ borderTopRightRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderRadius
89
+ },
90
+ contentContainer: {
91
+ label: 'data-permission-levels__content-container',
92
+ background: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.contentContainerColor,
93
+ borderBottomLeftRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.contentContainerBorderRadius,
94
+ borderBottomRightRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.contentContainerBorderRadius,
95
+ padding: '10px',
96
+ display: 'flex',
97
+ flexDirection: 'column'
98
+ },
99
+ permissionTitle: {
100
+ label: 'data-permission-levels__permission-title',
101
+ marginBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.permissionTitleBottomMargin
102
+ }
103
+ };
104
+ };
105
+ var _default = exports.default = generateStyle;
@@ -0,0 +1,158 @@
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 _latest = require("@instructure/ui-modal/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 _emotion = require("@instructure/emotion");
16
+ var _styles = _interopRequireDefault(require("./styles"));
17
+ var _jsxRuntime = require("@emotion/react/jsx-runtime");
18
+ /*
19
+ * The MIT License (MIT)
20
+ *
21
+ * Copyright (c) 2015 - present Instructure, Inc.
22
+ *
23
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ * of this software and associated documentation files (the "Software"), to deal
25
+ * in the Software without restriction, including without limitation the rights
26
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ * copies of the Software, and to permit persons to whom the Software is
28
+ * furnished to do so, subject to the following conditions:
29
+ *
30
+ * The above copyright notice and this permission notice shall be included in all
31
+ * copies or substantial portions of the Software.
32
+ *
33
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ * SOFTWARE.
40
+ */
41
+
42
+ /**
43
+ ---
44
+ category: components/AI Components
45
+ ---
46
+ **/const NutritionFacts = ({
47
+ modalLabel,
48
+ title,
49
+ featureName,
50
+ data,
51
+ closeButtonText,
52
+ closeIconButtonScreenReaderLabel,
53
+ triggerText,
54
+ fullscreen = false,
55
+ themeOverride
56
+ }) => {
57
+ const _useState = (0, _react.useState)(false),
58
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
59
+ open = _useState2[0],
60
+ setOpen = _useState2[1];
61
+ const styles = (0, _emotion.useStyle)({
62
+ generateStyle: _styles.default,
63
+ themeOverride,
64
+ componentId: 'NutritionFacts',
65
+ displayName: 'NutritionFacts'
66
+ });
67
+ return (0, _jsxRuntime.jsxs)("div", {
68
+ children: [(0, _jsxRuntime.jsx)(_latest5.Link, {
69
+ variant: "standalone",
70
+ onClick: e => {
71
+ e.preventDefault();
72
+ setOpen(true);
73
+ },
74
+ forceButtonRole: false,
75
+ href: "#",
76
+ children: triggerText
77
+ }), (0, _jsxRuntime.jsxs)(_latest.Modal, {
78
+ open: open,
79
+ onDismiss: () => {
80
+ setOpen(false);
81
+ },
82
+ label: modalLabel,
83
+ shouldCloseOnDocumentClick: true,
84
+ size: fullscreen ? 'fullscreen' : 'medium',
85
+ children: [(0, _jsxRuntime.jsxs)(_latest.Modal.Header, {
86
+ spacing: "compact",
87
+ children: [(0, _jsxRuntime.jsx)(_latest3.Heading, {
88
+ aiVariant: "stacked",
89
+ children: title
90
+ }), (0, _jsxRuntime.jsx)(_latest2.CloseButton, {
91
+ size: "medium",
92
+ placement: "end",
93
+ offset: "small",
94
+ onClick: () => setOpen(false),
95
+ screenReaderLabel: closeIconButtonScreenReaderLabel
96
+ })]
97
+ }), (0, _jsxRuntime.jsx)(_latest.Modal.Body, {
98
+ children: (0, _jsxRuntime.jsxs)("div", {
99
+ css: styles === null || styles === void 0 ? void 0 : styles.body,
100
+ children: [(0, _jsxRuntime.jsxs)(_latest3.Heading, {
101
+ variant: "titleSection",
102
+ level: "h3",
103
+ children: [' ', featureName, ' ']
104
+ }), data.map(({
105
+ blockTitle,
106
+ segmentData
107
+ }, index) => {
108
+ return (0, _jsxRuntime.jsxs)("div", {
109
+ css: styles === null || styles === void 0 ? void 0 : styles.blockContainer,
110
+ children: [(0, _jsxRuntime.jsxs)(_latest3.Heading, {
111
+ variant: "titleModule",
112
+ level: "h4",
113
+ children: [' ', blockTitle, ' ']
114
+ }), (0, _jsxRuntime.jsx)("div", {
115
+ css: styles === null || styles === void 0 ? void 0 : styles.segmentContainer,
116
+ children: segmentData.map(({
117
+ segmentTitle,
118
+ description,
119
+ value,
120
+ valueDescription
121
+ }, index) => {
122
+ return (0, _jsxRuntime.jsxs)("div", {
123
+ css: styles === null || styles === void 0 ? void 0 : styles.segmentCard,
124
+ children: [(0, _jsxRuntime.jsxs)("div", {
125
+ css: styles === null || styles === void 0 ? void 0 : styles.segmentCardExplainerContainer,
126
+ children: [(0, _jsxRuntime.jsxs)(_latest3.Heading, {
127
+ variant: "label",
128
+ children: [' ', segmentTitle, ' ']
129
+ }), (0, _jsxRuntime.jsxs)(_latest4.Text, {
130
+ variant: "contentSmall",
131
+ color: "secondary",
132
+ children: [' ', description, ' ']
133
+ })]
134
+ }), (0, _jsxRuntime.jsxs)(_latest4.Text, {
135
+ variant: "content",
136
+ children: [" ", value, " "]
137
+ }), (0, _jsxRuntime.jsxs)(_latest4.Text, {
138
+ variant: "contentSmall",
139
+ color: "secondary",
140
+ children: [' ', valueDescription, ' ']
141
+ })]
142
+ }, index);
143
+ })
144
+ })]
145
+ }, index);
146
+ })]
147
+ })
148
+ }), (0, _jsxRuntime.jsx)(_latest.Modal.Footer, {
149
+ children: (0, _jsxRuntime.jsx)(_latest2.Button, {
150
+ onClick: () => setOpen(false),
151
+ children: closeButtonText
152
+ })
153
+ })]
154
+ })]
155
+ });
156
+ };
157
+ exports.NutritionFacts = NutritionFacts;
158
+ var _default = exports.default = NutritionFacts;
@@ -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 = ['fullscreen', 'modalLabel', 'title', 'featureName', 'data', 'closeButtonText', 'closeIconButtonScreenReaderLabel', 'triggerText'];
@@ -0,0 +1,79 @@
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
+ segmentCard: {
44
+ label: 'nutrition-facts__segment-card',
45
+ borderStyle: 'solid',
46
+ borderWidth: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderWidth,
47
+ borderColor: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardBorderColor,
48
+ borderRadius: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.borderRadius,
49
+ padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardPadding,
50
+ display: 'flex',
51
+ flexDirection: 'column'
52
+ },
53
+ segmentCardExplainerContainer: {
54
+ label: 'nutrition-facts__segment-card-explainer-container',
55
+ marginBottom: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardExplainerContainerBottomMargin
56
+ },
57
+ segmentContainer: {
58
+ label: 'nutrition-facts__segment-container',
59
+ display: 'flex',
60
+ flexDirection: 'column',
61
+ gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardGap
62
+ },
63
+ blockContainer: {
64
+ label: 'nutrition-facts__block-container',
65
+ display: 'flex',
66
+ flexDirection: 'column',
67
+ gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.cardGap
68
+ },
69
+ body: {
70
+ label: 'nutrition-facts__body',
71
+ display: 'flex',
72
+ flexDirection: 'column',
73
+ gap: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.blockGap,
74
+ padding: componentTheme === null || componentTheme === void 0 ? void 0 : componentTheme.bodyPadding,
75
+ boxSizing: 'border-box'
76
+ }
77
+ };
78
+ };
79
+ var _default = exports.default = generateStyle;
package/lib/exports/b.js CHANGED
@@ -21,6 +21,6 @@ Object.defineProperty(exports, "NutritionFacts", {
21
21
  return _v.NutritionFacts;
22
22
  }
23
23
  });
24
- var _v = require("../NutritionFacts/v1");
25
- var _v2 = require("../DataPermissionLevels/v1");
24
+ var _v = require("../NutritionFacts/v2");
25
+ var _v2 = require("../DataPermissionLevels/v2");
26
26
  var _v3 = require("../AiInformation/v2");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-instructure",
3
- "version": "11.7.2-snapshot-9",
3
+ "version": "11.7.2-snapshot-11",
4
4
  "description": "Collection of specific components for Instructure products",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -15,26 +15,26 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/emotion": "11.7.2-snapshot-9",
19
- "@instructure/shared-types": "11.7.2-snapshot-9",
20
- "@instructure/ui-heading": "11.7.2-snapshot-9",
21
- "@instructure/ui-buttons": "11.7.2-snapshot-9",
22
- "@instructure/ui-icons": "11.7.2-snapshot-9",
23
- "@instructure/ui-modal": "11.7.2-snapshot-9",
24
- "@instructure/ui-link": "11.7.2-snapshot-9",
25
- "@instructure/ui-popover": "11.7.2-snapshot-9",
26
- "@instructure/ui-react-utils": "11.7.2-snapshot-9",
27
- "@instructure/ui-text": "11.7.2-snapshot-9",
28
- "@instructure/ui-view": "11.7.2-snapshot-9"
18
+ "@instructure/emotion": "11.7.2-snapshot-11",
19
+ "@instructure/ui-buttons": "11.7.2-snapshot-11",
20
+ "@instructure/ui-icons": "11.7.2-snapshot-11",
21
+ "@instructure/shared-types": "11.7.2-snapshot-11",
22
+ "@instructure/ui-heading": "11.7.2-snapshot-11",
23
+ "@instructure/ui-link": "11.7.2-snapshot-11",
24
+ "@instructure/ui-modal": "11.7.2-snapshot-11",
25
+ "@instructure/ui-popover": "11.7.2-snapshot-11",
26
+ "@instructure/ui-react-utils": "11.7.2-snapshot-11",
27
+ "@instructure/ui-text": "11.7.2-snapshot-11",
28
+ "@instructure/ui-view": "11.7.2-snapshot-11"
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-axe-check": "11.7.2-snapshot-9",
35
- "@instructure/ui-babel-preset": "11.7.2-snapshot-9",
36
- "@instructure/ui-color-utils": "11.7.2-snapshot-9",
37
- "@instructure/ui-themes": "11.7.2-snapshot-9"
34
+ "@instructure/ui-axe-check": "11.7.2-snapshot-11",
35
+ "@instructure/ui-color-utils": "11.7.2-snapshot-11",
36
+ "@instructure/ui-themes": "11.7.2-snapshot-11",
37
+ "@instructure/ui-babel-preset": "11.7.2-snapshot-11"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=18 <=19"
@@ -29,8 +29,8 @@ import { Text } from '@instructure/ui-text/latest'
29
29
  import { Link } from '@instructure/ui-link/latest'
30
30
  import { ExternalLinkInstUIIcon } from '@instructure/ui-icons'
31
31
  import { useStyle } from '@instructure/emotion'
32
- import { NutritionFacts } from '../../NutritionFacts/v1'
33
- import { DataPermissionLevels } from '../../DataPermissionLevels/v1'
32
+ import { NutritionFacts } from '../../NutritionFacts/v2'
33
+ import { DataPermissionLevels } from '../../DataPermissionLevels/v2'
34
34
 
35
35
  import { AiInformationProps } from './props'
36
36
  import generateStyle from './styles'
@@ -23,7 +23,7 @@
23
23
  */
24
24
 
25
25
  import type { NewComponentTypes, SharedTokens } from '@instructure/ui-themes'
26
- import type { AiInformationStyle } from './props'
26
+ import type { AiInformationStyle, AiInformationProps } from './props'
27
27
 
28
28
  /**
29
29
  * ---
@@ -37,7 +37,7 @@ import type { AiInformationStyle } from './props'
37
37
  */
38
38
  const generateStyle = (
39
39
  componentTheme: NewComponentTypes['AiInformation'],
40
- _params: Record<string, never>,
40
+ _params: AiInformationProps,
41
41
  _sharedTokens: SharedTokens
42
42
  ): AiInformationStyle => {
43
43
  return {