@instructure/ui-instructure 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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