@instructure/ui-instructure 11.7.3-snapshot-25 → 11.7.3-snapshot-26
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 +5 -2
- package/es/AiInformation/v1/index.js +13 -18
- package/es/AiInformation/v1/theme.js +16 -15
- package/es/AiInformation/v2/index.js +14 -19
- package/es/DataPermissionLevels/v1/index.js +10 -15
- package/es/DataPermissionLevels/v1/styles.js +13 -13
- package/es/DataPermissionLevels/v1/theme.js +18 -17
- package/es/DataPermissionLevels/v2/index.js +10 -15
- package/es/DataPermissionLevels/v2/styles.js +16 -16
- package/es/NutritionFacts/v1/index.js +6 -10
- package/es/NutritionFacts/v1/styles.js +9 -9
- package/es/NutritionFacts/v1/theme.js +13 -12
- package/es/NutritionFacts/v2/index.js +6 -10
- package/es/NutritionFacts/v2/styles.js +9 -9
- package/lib/AiInformation/v1/index.js +16 -21
- package/lib/AiInformation/v1/theme.js +16 -15
- package/lib/AiInformation/v2/index.js +16 -21
- package/lib/DataPermissionLevels/v1/index.js +10 -15
- package/lib/DataPermissionLevels/v1/styles.js +13 -13
- package/lib/DataPermissionLevels/v1/theme.js +18 -17
- package/lib/DataPermissionLevels/v2/index.js +10 -15
- package/lib/DataPermissionLevels/v2/styles.js +16 -16
- package/lib/NutritionFacts/v1/index.js +6 -10
- package/lib/NutritionFacts/v1/styles.js +9 -9
- package/lib/NutritionFacts/v1/theme.js +13 -12
- package/lib/NutritionFacts/v2/index.js +6 -10
- package/lib/NutritionFacts/v2/styles.js +9 -9
- package/package.json +17 -17
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
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.7.3-snapshot-
|
|
6
|
+
## [11.7.3-snapshot-26](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3-snapshot-26) (2026-05-05)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **many:** update dependencies, remove lots of Babel plugins, remove Webpack 4 support ([f916fca](https://github.com/instructure/instructure-ui/commit/f916fcafdddcb2d7de401f93e8ff92cfdfa47bba))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
var _IconExternalLinkLine;
|
|
3
1
|
/*
|
|
4
2
|
* The MIT License (MIT)
|
|
5
3
|
*
|
|
@@ -60,10 +58,7 @@ const AiInformation = ({
|
|
|
60
58
|
nutritionFactsCloseButtonText,
|
|
61
59
|
nutritionFactsCloseIconButtonScreenReaderLabel
|
|
62
60
|
}) => {
|
|
63
|
-
const
|
|
64
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
-
open = _useState2[0],
|
|
66
|
-
setOpen = _useState2[1];
|
|
61
|
+
const [open, setOpen] = useState(false);
|
|
67
62
|
const styles = useStyle({
|
|
68
63
|
generateStyle,
|
|
69
64
|
generateComponentTheme,
|
|
@@ -83,9 +78,9 @@ const AiInformation = ({
|
|
|
83
78
|
onShowContent: () => setOpen(true),
|
|
84
79
|
onHideContent: () => setOpen(false),
|
|
85
80
|
children: _jsxs("div", {
|
|
86
|
-
css: styles
|
|
81
|
+
css: styles?.aiInformation,
|
|
87
82
|
children: [_jsxs("div", {
|
|
88
|
-
css: styles
|
|
83
|
+
css: styles?.header,
|
|
89
84
|
children: [_jsx(Heading, {
|
|
90
85
|
level: "h2",
|
|
91
86
|
aiVariant: "stacked",
|
|
@@ -111,43 +106,43 @@ const AiInformation = ({
|
|
|
111
106
|
nutritionFactsModalTriggerText
|
|
112
107
|
}, index) => _jsxs("div", {
|
|
113
108
|
children: [_jsx("div", {
|
|
114
|
-
css: styles
|
|
109
|
+
css: styles?.privacyNotice,
|
|
115
110
|
children: _jsx(Link, {
|
|
116
111
|
href: privacyNoticeUrl,
|
|
117
|
-
renderIcon:
|
|
112
|
+
renderIcon: _jsx(IconExternalLinkLine, {}),
|
|
118
113
|
iconPlacement: "end",
|
|
119
114
|
variant: "standalone",
|
|
120
115
|
target: "_blank",
|
|
121
116
|
children: privacyNoticeText
|
|
122
117
|
})
|
|
123
118
|
}), _jsx("div", {
|
|
124
|
-
css: styles
|
|
119
|
+
css: styles?.featureName,
|
|
125
120
|
children: _jsx(Heading, {
|
|
126
121
|
level: "h3",
|
|
127
122
|
variant: "titleCardRegular",
|
|
128
123
|
children: featureName
|
|
129
124
|
})
|
|
130
125
|
}), _jsx("div", {
|
|
131
|
-
css: styles
|
|
126
|
+
css: styles?.permissionLevelText,
|
|
132
127
|
children: _jsx(Heading, {
|
|
133
128
|
level: "h4",
|
|
134
129
|
variant: "label",
|
|
135
130
|
children: permissionLevelText
|
|
136
131
|
})
|
|
137
132
|
}), _jsx("div", {
|
|
138
|
-
css: styles
|
|
133
|
+
css: styles?.permissionLevel,
|
|
139
134
|
children: _jsxs(Text, {
|
|
140
135
|
variant: "legend",
|
|
141
136
|
children: [" ", permissionLevel, " "]
|
|
142
137
|
})
|
|
143
138
|
}), _jsx("div", {
|
|
144
|
-
css: styles
|
|
139
|
+
css: styles?.description,
|
|
145
140
|
children: _jsxs(Text, {
|
|
146
141
|
variant: "contentSmall",
|
|
147
142
|
children: [" ", description, " "]
|
|
148
143
|
})
|
|
149
144
|
}), _jsx("div", {
|
|
150
|
-
css: styles
|
|
145
|
+
css: styles?.permissionLevelsModalTriggerText,
|
|
151
146
|
children: _jsx(DataPermissionLevels, {
|
|
152
147
|
fullscreen: fullscreenModals,
|
|
153
148
|
title: dataPermissionLevelsTitle,
|
|
@@ -160,14 +155,14 @@ const AiInformation = ({
|
|
|
160
155
|
data: dataPermissionLevelsData
|
|
161
156
|
})
|
|
162
157
|
}), _jsx("div", {
|
|
163
|
-
css: styles
|
|
158
|
+
css: styles?.modelNameText,
|
|
164
159
|
children: _jsxs(Heading, {
|
|
165
160
|
level: "h3",
|
|
166
161
|
variant: "label",
|
|
167
162
|
children: [' ', modelNameText, ' ']
|
|
168
163
|
})
|
|
169
164
|
}), _jsx("div", {
|
|
170
|
-
css: styles
|
|
165
|
+
css: styles?.modelName,
|
|
171
166
|
children: _jsxs(Text, {
|
|
172
167
|
variant: "contentSmall",
|
|
173
168
|
children: [" ", modelName, " "]
|
|
@@ -182,7 +177,7 @@ const AiInformation = ({
|
|
|
182
177
|
triggerText: nutritionFactsModalTriggerText,
|
|
183
178
|
data: nutritionFactsData
|
|
184
179
|
}), data.length !== index + 1 ? _jsx("div", {
|
|
185
|
-
css: styles
|
|
180
|
+
css: styles?.divider
|
|
186
181
|
}) : null]
|
|
187
182
|
}, index))
|
|
188
183
|
})]
|
|
@@ -28,22 +28,23 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
spacing
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
spacing
|
|
34
|
+
} = theme;
|
|
34
35
|
const componentVariables = {
|
|
35
|
-
bodyPadding: spacing
|
|
36
|
-
headingBottomMargin: spacing
|
|
37
|
-
featureNameBottomMargin: spacing
|
|
38
|
-
permissionLevelTextBottomMargin: spacing
|
|
39
|
-
permissionLevelBottomMargin: spacing
|
|
40
|
-
descriptionBottomMargin: spacing
|
|
41
|
-
permissionLevelsModalTriggerBottomMargin: spacing
|
|
42
|
-
modelNameTextBottomMargin: spacing
|
|
43
|
-
modelNameBottomMargin: spacing
|
|
44
|
-
dividerMargin: spacing
|
|
45
|
-
dividerColor: colors
|
|
46
|
-
levelColor: colors
|
|
36
|
+
bodyPadding: spacing?.paddingCardLarge,
|
|
37
|
+
headingBottomMargin: spacing?.sectionElements,
|
|
38
|
+
featureNameBottomMargin: spacing?.moduleElements,
|
|
39
|
+
permissionLevelTextBottomMargin: spacing?.space8,
|
|
40
|
+
permissionLevelBottomMargin: spacing?.space8,
|
|
41
|
+
descriptionBottomMargin: spacing?.space8,
|
|
42
|
+
permissionLevelsModalTriggerBottomMargin: spacing?.moduleElements,
|
|
43
|
+
modelNameTextBottomMargin: spacing?.space4,
|
|
44
|
+
modelNameBottomMargin: spacing?.space4,
|
|
45
|
+
dividerMargin: spacing?.moduleElements,
|
|
46
|
+
dividerColor: colors?.ui?.surfaceDivider,
|
|
47
|
+
levelColor: colors?.contrasts?.violet5790
|
|
47
48
|
};
|
|
48
49
|
return {
|
|
49
50
|
...componentVariables
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
var _ExternalLinkInstUIIc;
|
|
3
1
|
/*
|
|
4
2
|
* The MIT License (MIT)
|
|
5
3
|
*
|
|
@@ -60,10 +58,7 @@ const AiInformation = ({
|
|
|
60
58
|
nutritionFactsCloseIconButtonScreenReaderLabel,
|
|
61
59
|
themeOverride
|
|
62
60
|
}) => {
|
|
63
|
-
const
|
|
64
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
-
open = _useState2[0],
|
|
66
|
-
setOpen = _useState2[1];
|
|
61
|
+
const [open, setOpen] = useState(false);
|
|
67
62
|
const styles = useStyle({
|
|
68
63
|
generateStyle,
|
|
69
64
|
themeOverride,
|
|
@@ -83,9 +78,9 @@ const AiInformation = ({
|
|
|
83
78
|
onShowContent: () => setOpen(true),
|
|
84
79
|
onHideContent: () => setOpen(false),
|
|
85
80
|
children: _jsxs("div", {
|
|
86
|
-
css: styles
|
|
81
|
+
css: styles?.aiInformation,
|
|
87
82
|
children: [_jsxs("div", {
|
|
88
|
-
css: styles
|
|
83
|
+
css: styles?.header,
|
|
89
84
|
children: [_jsx(Heading, {
|
|
90
85
|
level: "h2",
|
|
91
86
|
aiVariant: "stacked",
|
|
@@ -111,44 +106,44 @@ const AiInformation = ({
|
|
|
111
106
|
nutritionFactsModalTriggerText
|
|
112
107
|
}, index) => _jsxs("div", {
|
|
113
108
|
children: [_jsx("div", {
|
|
114
|
-
css: styles
|
|
109
|
+
css: styles?.privacyNotice,
|
|
115
110
|
children: _jsx(Link, {
|
|
116
111
|
href: privacyNoticeUrl,
|
|
117
|
-
renderIcon:
|
|
112
|
+
renderIcon: _jsx(ExternalLinkInstUIIcon, {
|
|
118
113
|
size: "sm"
|
|
119
|
-
})
|
|
114
|
+
}),
|
|
120
115
|
iconPlacement: "end",
|
|
121
116
|
variant: "standalone",
|
|
122
117
|
children: privacyNoticeText
|
|
123
118
|
})
|
|
124
119
|
}), _jsx("div", {
|
|
125
|
-
css: styles
|
|
120
|
+
css: styles?.featureName,
|
|
126
121
|
children: _jsx(Heading, {
|
|
127
122
|
level: "h3",
|
|
128
123
|
variant: "titleCardRegular",
|
|
129
124
|
children: featureName
|
|
130
125
|
})
|
|
131
126
|
}), _jsx("div", {
|
|
132
|
-
css: styles
|
|
127
|
+
css: styles?.permissionLevelText,
|
|
133
128
|
children: _jsx(Heading, {
|
|
134
129
|
level: "h4",
|
|
135
130
|
variant: "label",
|
|
136
131
|
children: permissionLevelText
|
|
137
132
|
})
|
|
138
133
|
}), _jsx("div", {
|
|
139
|
-
css: styles
|
|
134
|
+
css: styles?.permissionLevel,
|
|
140
135
|
children: _jsxs(Text, {
|
|
141
136
|
variant: "legend",
|
|
142
137
|
children: [" ", permissionLevel, " "]
|
|
143
138
|
})
|
|
144
139
|
}), _jsx("div", {
|
|
145
|
-
css: styles
|
|
140
|
+
css: styles?.description,
|
|
146
141
|
children: _jsxs(Text, {
|
|
147
142
|
variant: "contentSmall",
|
|
148
143
|
children: [" ", description, " "]
|
|
149
144
|
})
|
|
150
145
|
}), _jsx("div", {
|
|
151
|
-
css: styles
|
|
146
|
+
css: styles?.permissionLevelsModalTriggerText,
|
|
152
147
|
children: _jsx(DataPermissionLevels, {
|
|
153
148
|
fullscreen: fullscreenModals,
|
|
154
149
|
title: dataPermissionLevelsTitle,
|
|
@@ -161,14 +156,14 @@ const AiInformation = ({
|
|
|
161
156
|
data: dataPermissionLevelsData
|
|
162
157
|
})
|
|
163
158
|
}), _jsx("div", {
|
|
164
|
-
css: styles
|
|
159
|
+
css: styles?.modelNameText,
|
|
165
160
|
children: _jsxs(Heading, {
|
|
166
161
|
level: "h3",
|
|
167
162
|
variant: "label",
|
|
168
163
|
children: [' ', modelNameText, ' ']
|
|
169
164
|
})
|
|
170
165
|
}), _jsx("div", {
|
|
171
|
-
css: styles
|
|
166
|
+
css: styles?.modelName,
|
|
172
167
|
children: _jsxs(Text, {
|
|
173
168
|
variant: "contentSmall",
|
|
174
169
|
children: [" ", modelName, " "]
|
|
@@ -183,7 +178,7 @@ const AiInformation = ({
|
|
|
183
178
|
triggerText: nutritionFactsModalTriggerText,
|
|
184
179
|
data: nutritionFactsData
|
|
185
180
|
}), data.length !== index + 1 ? _jsx("div", {
|
|
186
|
-
css: styles
|
|
181
|
+
css: styles?.divider
|
|
187
182
|
}) : null]
|
|
188
183
|
}, index))
|
|
189
184
|
})]
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -48,11 +47,7 @@ const DataPermissionLevels = ({
|
|
|
48
47
|
triggerText,
|
|
49
48
|
fullscreen = false
|
|
50
49
|
}) => {
|
|
51
|
-
|
|
52
|
-
const _useState = useState(false),
|
|
53
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
-
open = _useState2[0],
|
|
55
|
-
setOpen = _useState2[1];
|
|
50
|
+
const [open, setOpen] = useState(false);
|
|
56
51
|
const styles = useStyle({
|
|
57
52
|
generateStyle,
|
|
58
53
|
generateComponentTheme,
|
|
@@ -91,33 +86,33 @@ const DataPermissionLevels = ({
|
|
|
91
86
|
})]
|
|
92
87
|
}), _jsx(Modal.Body, {
|
|
93
88
|
children: _jsx("div", {
|
|
94
|
-
css: styles
|
|
89
|
+
css: styles?.body,
|
|
95
90
|
children: data.map(({
|
|
96
91
|
level,
|
|
97
92
|
title,
|
|
98
93
|
description,
|
|
99
94
|
highlighted
|
|
100
95
|
}, index) => _jsxs("div", {
|
|
101
|
-
css: highlighted ? styles
|
|
96
|
+
css: highlighted ? styles?.highlightedCard : styles?.card,
|
|
102
97
|
children: [highlighted ? _jsxs("div", {
|
|
103
|
-
css: styles
|
|
104
|
-
children: [
|
|
98
|
+
css: styles?.currentFeature,
|
|
99
|
+
children: [_jsxs(Heading, {
|
|
105
100
|
color: "primary-inverse",
|
|
106
101
|
level: "reset",
|
|
107
102
|
variant: "labelInline",
|
|
108
103
|
children: [currentFeatureText, ' ']
|
|
109
|
-
})
|
|
104
|
+
}), _jsx(Text, {
|
|
110
105
|
color: "primary-inverse",
|
|
111
106
|
variant: "content",
|
|
112
107
|
children: currentFeature
|
|
113
|
-
})
|
|
108
|
+
})]
|
|
114
109
|
}) : null, _jsxs("div", {
|
|
115
|
-
css: styles
|
|
110
|
+
css: styles?.contentContainer,
|
|
116
111
|
children: [_jsx("div", {
|
|
117
|
-
css: styles
|
|
112
|
+
css: styles?.level,
|
|
118
113
|
children: level
|
|
119
114
|
}), _jsx("div", {
|
|
120
|
-
css: styles
|
|
115
|
+
css: styles?.permissionTitle,
|
|
121
116
|
children: _jsxs(Text, {
|
|
122
117
|
variant: "descriptionPage",
|
|
123
118
|
children: [title, " "]
|
|
@@ -40,23 +40,23 @@ const generateStyle = (componentTheme, _props) => {
|
|
|
40
40
|
label: 'data-permission-levels__body',
|
|
41
41
|
display: 'flex',
|
|
42
42
|
flexDirection: 'column',
|
|
43
|
-
padding: componentTheme
|
|
43
|
+
padding: componentTheme?.bodyPadding
|
|
44
44
|
},
|
|
45
45
|
card: {
|
|
46
46
|
label: 'data-permission-levels__card',
|
|
47
47
|
padding: '2px',
|
|
48
48
|
borderStyle: 'solid',
|
|
49
49
|
borderColor: 'transparent',
|
|
50
|
-
borderWidth: componentTheme
|
|
50
|
+
borderWidth: componentTheme?.cardBorderWidth,
|
|
51
51
|
display: 'flex',
|
|
52
52
|
flexDirection: 'column'
|
|
53
53
|
},
|
|
54
54
|
highlightedCard: {
|
|
55
55
|
label: 'data-permission-levels__highlighted-card',
|
|
56
56
|
borderStyle: 'solid',
|
|
57
|
-
borderWidth: componentTheme
|
|
58
|
-
borderColor: componentTheme
|
|
59
|
-
borderRadius: componentTheme
|
|
57
|
+
borderWidth: componentTheme?.cardBorderWidth,
|
|
58
|
+
borderColor: componentTheme?.cardBorderColor,
|
|
59
|
+
borderRadius: componentTheme?.cardBorderRadius,
|
|
60
60
|
padding: '2px',
|
|
61
61
|
display: 'flex',
|
|
62
62
|
flexDirection: 'column',
|
|
@@ -67,18 +67,18 @@ const generateStyle = (componentTheme, _props) => {
|
|
|
67
67
|
},
|
|
68
68
|
level: {
|
|
69
69
|
label: 'data-permission-levels__level',
|
|
70
|
-
color: componentTheme
|
|
70
|
+
color: componentTheme?.levelColor
|
|
71
71
|
},
|
|
72
72
|
currentFeature: {
|
|
73
73
|
label: 'data-permission-levels__current-feature',
|
|
74
74
|
background: `
|
|
75
75
|
linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%)`,
|
|
76
|
-
paddingLeft: componentTheme
|
|
77
|
-
paddingRight: componentTheme
|
|
78
|
-
paddingTop: componentTheme
|
|
79
|
-
paddingBottom: componentTheme
|
|
80
|
-
borderTopLeftRadius: componentTheme
|
|
81
|
-
borderTopRightRadius: componentTheme
|
|
76
|
+
paddingLeft: componentTheme?.currentFeaturePaddingSides,
|
|
77
|
+
paddingRight: componentTheme?.currentFeaturePaddingSides,
|
|
78
|
+
paddingTop: componentTheme?.currentFeaturePaddingTopBottom,
|
|
79
|
+
paddingBottom: componentTheme?.currentFeaturePaddingTopBottom,
|
|
80
|
+
borderTopLeftRadius: componentTheme?.cardBorderRadius,
|
|
81
|
+
borderTopRightRadius: componentTheme?.cardBorderRadius
|
|
82
82
|
},
|
|
83
83
|
contentContainer: {
|
|
84
84
|
label: 'data-permission-levels__content-container',
|
|
@@ -89,7 +89,7 @@ const generateStyle = (componentTheme, _props) => {
|
|
|
89
89
|
},
|
|
90
90
|
permissionTitle: {
|
|
91
91
|
label: 'data-permission-levels__permission-title',
|
|
92
|
-
marginBottom: componentTheme
|
|
92
|
+
marginBottom: componentTheme?.permissionTitleBottomMargin
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
};
|
|
@@ -28,24 +28,25 @@
|
|
|
28
28
|
* @return {Object} The final theme object with the overrides and component variables
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
spacing
|
|
34
|
-
borders
|
|
31
|
+
const {
|
|
32
|
+
colors,
|
|
33
|
+
spacing,
|
|
34
|
+
borders
|
|
35
|
+
} = theme;
|
|
35
36
|
const componentVariables = {
|
|
36
|
-
cardBorderRadius: borders
|
|
37
|
-
cardBorderColor: colors
|
|
38
|
-
cardBorderWidth: borders
|
|
39
|
-
cardPadding: spacing
|
|
40
|
-
cardExplainerContainerBottomMargin: spacing
|
|
41
|
-
cardGap: spacing
|
|
42
|
-
currentFeaturePaddingSides: spacing
|
|
43
|
-
currentFeaturePaddingTopBottom: spacing
|
|
44
|
-
permissionTitleBottomMargin: spacing
|
|
45
|
-
levelColor: colors
|
|
46
|
-
bodyPadding: spacing
|
|
47
|
-
aiTextLeftGradientColor: colors
|
|
48
|
-
aiTextRightGradientColor: colors
|
|
37
|
+
cardBorderRadius: borders?.radiusMedium,
|
|
38
|
+
cardBorderColor: colors?.ui?.lineStroke,
|
|
39
|
+
cardBorderWidth: borders?.widthMedium,
|
|
40
|
+
cardPadding: spacing?.space12,
|
|
41
|
+
cardExplainerContainerBottomMargin: spacing?.space8,
|
|
42
|
+
cardGap: spacing?.modalElements,
|
|
43
|
+
currentFeaturePaddingSides: spacing?.space12,
|
|
44
|
+
currentFeaturePaddingTopBottom: spacing?.space8,
|
|
45
|
+
permissionTitleBottomMargin: spacing?.space8,
|
|
46
|
+
levelColor: colors?.contrasts?.violet5790,
|
|
47
|
+
bodyPadding: spacing?.paddingCardLarge,
|
|
48
|
+
aiTextLeftGradientColor: colors?.contrasts?.violet4570,
|
|
49
|
+
aiTextRightGradientColor: colors?.contrasts?.sea4570
|
|
49
50
|
};
|
|
50
51
|
return {
|
|
51
52
|
...componentVariables
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -48,11 +47,7 @@ const DataPermissionLevels = ({
|
|
|
48
47
|
fullscreen = false,
|
|
49
48
|
themeOverride
|
|
50
49
|
}) => {
|
|
51
|
-
|
|
52
|
-
const _useState = useState(false),
|
|
53
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
-
open = _useState2[0],
|
|
55
|
-
setOpen = _useState2[1];
|
|
50
|
+
const [open, setOpen] = useState(false);
|
|
56
51
|
const styles = useStyle({
|
|
57
52
|
generateStyle,
|
|
58
53
|
themeOverride,
|
|
@@ -91,33 +86,33 @@ const DataPermissionLevels = ({
|
|
|
91
86
|
})]
|
|
92
87
|
}), _jsx(Modal.Body, {
|
|
93
88
|
children: _jsx("div", {
|
|
94
|
-
css: styles
|
|
89
|
+
css: styles?.body,
|
|
95
90
|
children: data.map(({
|
|
96
91
|
level,
|
|
97
92
|
title,
|
|
98
93
|
description,
|
|
99
94
|
highlighted
|
|
100
95
|
}, index) => _jsxs("div", {
|
|
101
|
-
css: highlighted ? styles
|
|
96
|
+
css: highlighted ? styles?.highlightedCard : styles?.card,
|
|
102
97
|
children: [highlighted ? _jsxs("div", {
|
|
103
|
-
css: styles
|
|
104
|
-
children: [
|
|
98
|
+
css: styles?.currentFeature,
|
|
99
|
+
children: [_jsxs(Heading, {
|
|
105
100
|
color: "primary-on",
|
|
106
101
|
level: "reset",
|
|
107
102
|
variant: "labelInline",
|
|
108
103
|
children: [currentFeatureText, ' ']
|
|
109
|
-
})
|
|
104
|
+
}), _jsx(Text, {
|
|
110
105
|
color: "primary-on",
|
|
111
106
|
variant: "content",
|
|
112
107
|
children: currentFeature
|
|
113
|
-
})
|
|
108
|
+
})]
|
|
114
109
|
}) : null, _jsxs("div", {
|
|
115
|
-
css: styles
|
|
110
|
+
css: styles?.contentContainer,
|
|
116
111
|
children: [_jsx("div", {
|
|
117
|
-
css: styles
|
|
112
|
+
css: styles?.level,
|
|
118
113
|
children: level
|
|
119
114
|
}), _jsx("div", {
|
|
120
|
-
css: styles
|
|
115
|
+
css: styles?.permissionTitle,
|
|
121
116
|
children: _jsxs(Text, {
|
|
122
117
|
variant: "descriptionPage",
|
|
123
118
|
children: [title, " "]
|
|
@@ -39,23 +39,23 @@ const generateStyle = componentTheme => {
|
|
|
39
39
|
label: 'data-permission-levels__body',
|
|
40
40
|
display: 'flex',
|
|
41
41
|
flexDirection: 'column',
|
|
42
|
-
padding: componentTheme
|
|
42
|
+
padding: componentTheme?.bodyPadding
|
|
43
43
|
},
|
|
44
44
|
card: {
|
|
45
45
|
label: 'data-permission-levels__card',
|
|
46
46
|
padding: '2px',
|
|
47
47
|
borderStyle: 'solid',
|
|
48
48
|
borderColor: 'transparent',
|
|
49
|
-
borderWidth: componentTheme
|
|
49
|
+
borderWidth: componentTheme?.cardBorderWidth,
|
|
50
50
|
display: 'flex',
|
|
51
51
|
flexDirection: 'column'
|
|
52
52
|
},
|
|
53
53
|
highlightedCard: {
|
|
54
54
|
label: 'data-permission-levels__highlighted-card',
|
|
55
55
|
borderStyle: 'solid',
|
|
56
|
-
borderWidth: componentTheme
|
|
57
|
-
borderColor: componentTheme
|
|
58
|
-
borderRadius: componentTheme
|
|
56
|
+
borderWidth: componentTheme?.cardBorderWidth,
|
|
57
|
+
borderColor: componentTheme?.cardBorderColor,
|
|
58
|
+
borderRadius: componentTheme?.cardBorderRadius,
|
|
59
59
|
padding: '2px',
|
|
60
60
|
display: 'flex',
|
|
61
61
|
flexDirection: 'column',
|
|
@@ -66,31 +66,31 @@ const generateStyle = componentTheme => {
|
|
|
66
66
|
},
|
|
67
67
|
level: {
|
|
68
68
|
label: 'data-permission-levels__level',
|
|
69
|
-
color: componentTheme
|
|
69
|
+
color: componentTheme?.levelColor
|
|
70
70
|
},
|
|
71
71
|
currentFeature: {
|
|
72
72
|
label: 'data-permission-levels__current-feature',
|
|
73
73
|
background: `
|
|
74
74
|
linear-gradient(to right, ${componentTheme.aiTextLeftGradientColor} 0%, ${componentTheme.aiTextRightGradientColor} 100%)`,
|
|
75
|
-
paddingLeft: componentTheme
|
|
76
|
-
paddingRight: componentTheme
|
|
77
|
-
paddingTop: componentTheme
|
|
78
|
-
paddingBottom: componentTheme
|
|
79
|
-
borderTopLeftRadius: componentTheme
|
|
80
|
-
borderTopRightRadius: componentTheme
|
|
75
|
+
paddingLeft: componentTheme?.currentFeaturePaddingSides,
|
|
76
|
+
paddingRight: componentTheme?.currentFeaturePaddingSides,
|
|
77
|
+
paddingTop: componentTheme?.currentFeaturePaddingTopBottom,
|
|
78
|
+
paddingBottom: componentTheme?.currentFeaturePaddingTopBottom,
|
|
79
|
+
borderTopLeftRadius: componentTheme?.cardBorderRadius,
|
|
80
|
+
borderTopRightRadius: componentTheme?.cardBorderRadius
|
|
81
81
|
},
|
|
82
82
|
contentContainer: {
|
|
83
83
|
label: 'data-permission-levels__content-container',
|
|
84
|
-
background: componentTheme
|
|
85
|
-
borderBottomLeftRadius: componentTheme
|
|
86
|
-
borderBottomRightRadius: componentTheme
|
|
84
|
+
background: componentTheme?.contentContainerColor,
|
|
85
|
+
borderBottomLeftRadius: componentTheme?.contentContainerBorderRadius,
|
|
86
|
+
borderBottomRightRadius: componentTheme?.contentContainerBorderRadius,
|
|
87
87
|
padding: '10px',
|
|
88
88
|
display: 'flex',
|
|
89
89
|
flexDirection: 'column'
|
|
90
90
|
},
|
|
91
91
|
permissionTitle: {
|
|
92
92
|
label: 'data-permission-levels__permission-title',
|
|
93
|
-
marginBottom: componentTheme
|
|
93
|
+
marginBottom: componentTheme?.permissionTitleBottomMargin
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
/*
|
|
3
2
|
* The MIT License (MIT)
|
|
4
3
|
*
|
|
@@ -47,10 +46,7 @@ const NutritionFacts = ({
|
|
|
47
46
|
triggerText,
|
|
48
47
|
fullscreen = false
|
|
49
48
|
}) => {
|
|
50
|
-
const
|
|
51
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
-
open = _useState2[0],
|
|
53
|
-
setOpen = _useState2[1];
|
|
49
|
+
const [open, setOpen] = useState(false);
|
|
54
50
|
const styles = useStyle({
|
|
55
51
|
generateStyle,
|
|
56
52
|
generateComponentTheme,
|
|
@@ -89,7 +85,7 @@ const NutritionFacts = ({
|
|
|
89
85
|
})]
|
|
90
86
|
}), _jsx(Modal.Body, {
|
|
91
87
|
children: _jsxs("div", {
|
|
92
|
-
css: styles
|
|
88
|
+
css: styles?.body,
|
|
93
89
|
children: [_jsxs(Heading, {
|
|
94
90
|
variant: "titleSection",
|
|
95
91
|
level: "h3",
|
|
@@ -99,13 +95,13 @@ const NutritionFacts = ({
|
|
|
99
95
|
segmentData
|
|
100
96
|
}, index) => {
|
|
101
97
|
return _jsxs("div", {
|
|
102
|
-
css: styles
|
|
98
|
+
css: styles?.blockContainer,
|
|
103
99
|
children: [_jsxs(Heading, {
|
|
104
100
|
variant: "titleModule",
|
|
105
101
|
level: "h4",
|
|
106
102
|
children: [' ', blockTitle, ' ']
|
|
107
103
|
}), _jsx("div", {
|
|
108
|
-
css: styles
|
|
104
|
+
css: styles?.segmentContainer,
|
|
109
105
|
children: segmentData.map(({
|
|
110
106
|
segmentTitle,
|
|
111
107
|
description,
|
|
@@ -113,9 +109,9 @@ const NutritionFacts = ({
|
|
|
113
109
|
valueDescription
|
|
114
110
|
}, index) => {
|
|
115
111
|
return _jsxs("div", {
|
|
116
|
-
css: styles
|
|
112
|
+
css: styles?.segmentCard,
|
|
117
113
|
children: [_jsxs("div", {
|
|
118
|
-
css: styles
|
|
114
|
+
css: styles?.segmentCardExplainerContainer,
|
|
119
115
|
children: [_jsxs(Heading, {
|
|
120
116
|
variant: "label",
|
|
121
117
|
children: [' ', segmentTitle, ' ']
|