@carbon/react 0.10.1 → 0.11.0-rc.0
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/es/index.js +1 -3
- package/lib/index.js +86 -13
- package/package.json +6 -6
- package/scss/fonts/_index.scss +9 -0
- package/scss/fonts/_mono.scss +9 -0
- package/scss/fonts/_sans-arabic.scss +9 -0
- package/scss/fonts/_sans-devanagari.scss +9 -0
- package/scss/fonts/_sans-hebrew.scss +9 -0
- package/scss/fonts/_sans-thai-looped.scss +9 -0
- package/scss/fonts/_sans-thai.scss +9 -0
- package/scss/fonts/_sans.scss +9 -0
- package/scss/fonts/_serif.scss +9 -0
- package/es/_virtual/_commonjsHelpers.js +0 -13
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -93
- package/es/components/Layer/index.js +0 -47
- package/es/components/Theme/index.js +0 -76
- package/es/internal/usePrefix.js +0 -12
- package/es/node_modules/classnames/index.js +0 -61
- package/lib/_virtual/_commonjsHelpers.js +0 -17
- package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -101
- package/lib/components/Layer/index.js +0 -56
- package/lib/components/Theme/index.js +0 -86
- package/lib/internal/usePrefix.js +0 -16
- package/lib/node_modules/classnames/index.js +0 -63
package/es/index.js
CHANGED
|
@@ -7,6 +7,4 @@
|
|
|
7
7
|
|
|
8
8
|
import './prefix.js';
|
|
9
9
|
import './feature-flags.js';
|
|
10
|
-
export { Accordion, AccordionItem, AccordionSkeleton, ActionableNotification, AspectRatio, Breadcrumb, BreadcrumbItem, BreadcrumbSkeleton, Button, ButtonSet, ButtonSkeleton, Checkbox, CheckboxSkeleton, ClickableTile, CodeSnippet, CodeSnippetSkeleton, Column, ComboBox, ComposedModal, Content, ContentSwitcher, Copy, CopyButton, DangerButton, DataTable, DataTableSkeleton, DatePicker, DatePickerInput, DatePickerSkeleton, Dropdown, DropdownSkeleton, ErrorBoundary, ErrorBoundaryContext, ExpandableSearch, ExpandableTile, FileUploader, FileUploaderButton, FileUploaderDropContainer, FileUploaderItem, FileUploaderSkeleton, Filename, FluidForm, Form, FormGroup, FormItem, FormLabel, Grid, unstable_HStack as HStack, Header, HeaderContainer, HeaderGlobalAction, HeaderGlobalBar, HeaderMenu, HeaderMenuButton, HeaderMenuItem, HeaderName, HeaderNavigation, HeaderPanel, HeaderSideNavItems, unstable_IconButton as IconButton, IconSkeleton, InlineLoading, InlineNotification, Link, ListItem, Loading, Modal, ModalBody, ModalFooter, ModalHeader, MultiSelect, NotificationActionButton, NotificationButton, NotificationTextDetails, NumberInput, NumberInputSkeleton, OrderedList, OverflowMenu, OverflowMenuItem, Pagination, PaginationNav, PaginationSkeleton, PasswordInput, unstable_Popover as Popover, unstable_PopoverContent as PopoverContent, PrimaryButton, ProgressIndicator, ProgressIndicatorSkeleton, ProgressStep, RadioButton, RadioButtonGroup, RadioButtonSkeleton, RadioTile, Row, Search, SearchFilterButton, SearchLayoutButton, SearchSkeleton, SecondaryButton, Select, SelectItem, SelectItemGroup, SelectSkeleton, SelectableTile, SideNav, SideNavDetails, SideNavDivider, SideNavFooter, SideNavHeader, SideNavIcon, SideNavItem, SideNavItems, SideNavLink, SideNavLinkText, SideNavMenu, SideNavMenuItem, SideNavSwitcher, SkeletonPlaceholder, SkeletonText, SkipToContent, Slider, SliderSkeleton, unstable_Stack as Stack, StructuredListBody, StructuredListCell, StructuredListHead, StructuredListInput, StructuredListRow, StructuredListSkeleton, StructuredListWrapper, Switch, Switcher, SwitcherDivider, SwitcherItem, Tab, TabContent, Table, TableActionList, TableBatchAction, TableBatchActions, TableBody, TableCell, TableContainer, TableExpandHeader, TableExpandRow, TableExpandedRow, TableHead, TableHeader, TableRow, TableSelectAll, TableSelectRow, TableToolbar, TableToolbarAction, TableToolbarContent, TableToolbarMenu, TableToolbarSearch, Tabs, TabsSkeleton, Tag, TagSkeleton, TextArea, TextAreaSkeleton, TextInput, TextInputSkeleton, Tile, TileAboveTheFoldContent, TileBelowTheFoldContent, TileGroup, TimePicker, TimePickerSelect, ToastNotification, Toggle, ToggleSkeleton, ToggleSmall, ToggleSmallSkeleton, Toolbar, ToolbarDivider, ToolbarItem, ToolbarOption, ToolbarSearch, ToolbarTitle, unstable_Tooltip as Tooltip, UnorderedList, unstable_VStack as VStack,
|
|
11
|
-
export { Theme, useTheme } from './components/Theme/index.js';
|
|
12
|
-
export { Layer } from './components/Layer/index.js';
|
|
10
|
+
export { Accordion, AccordionItem, AccordionSkeleton, ActionableNotification, AspectRatio, Breadcrumb, BreadcrumbItem, BreadcrumbSkeleton, Button, ButtonSet, ButtonSkeleton, Checkbox, CheckboxSkeleton, ClickableTile, CodeSnippet, CodeSnippetSkeleton, Column, ComboBox, ComposedModal, Content, ContentSwitcher, Copy, CopyButton, DangerButton, DataTable, DataTableSkeleton, DatePicker, DatePickerInput, DatePickerSkeleton, Dropdown, DropdownSkeleton, ErrorBoundary, ErrorBoundaryContext, ExpandableSearch, ExpandableTile, unstable_FeatureFlags as FeatureFlags, FileUploader, FileUploaderButton, FileUploaderDropContainer, FileUploaderItem, FileUploaderSkeleton, Filename, FluidForm, Form, FormGroup, FormItem, FormLabel, Grid, unstable_HStack as HStack, Header, HeaderContainer, HeaderGlobalAction, HeaderGlobalBar, HeaderMenu, HeaderMenuButton, HeaderMenuItem, HeaderName, HeaderNavigation, HeaderPanel, HeaderSideNavItems, unstable_Heading as Heading, unstable_IconButton as IconButton, IconSkeleton, InlineLoading, InlineNotification, unstable_Layer as Layer, Link, ListItem, Loading, Modal, ModalBody, ModalFooter, ModalHeader, MultiSelect, NotificationActionButton, NotificationButton, NotificationTextDetails, NumberInput, NumberInputSkeleton, OrderedList, OverflowMenu, OverflowMenuItem, Pagination, PaginationNav, PaginationSkeleton, PasswordInput, unstable_Popover as Popover, unstable_PopoverContent as PopoverContent, PrimaryButton, ProgressIndicator, ProgressIndicatorSkeleton, ProgressStep, RadioButton, RadioButtonGroup, RadioButtonSkeleton, RadioTile, Row, Search, SearchFilterButton, SearchLayoutButton, SearchSkeleton, SecondaryButton, unstable_Section as Section, Select, SelectItem, SelectItemGroup, SelectSkeleton, SelectableTile, SideNav, SideNavDetails, SideNavDivider, SideNavFooter, SideNavHeader, SideNavIcon, SideNavItem, SideNavItems, SideNavLink, SideNavLinkText, SideNavMenu, SideNavMenuItem, SideNavSwitcher, SkeletonPlaceholder, SkeletonText, SkipToContent, Slider, SliderSkeleton, unstable_Stack as Stack, StructuredListBody, StructuredListCell, StructuredListHead, StructuredListInput, StructuredListRow, StructuredListSkeleton, StructuredListWrapper, Switch, Switcher, SwitcherDivider, SwitcherItem, Tab, TabContent, Table, TableActionList, TableBatchAction, TableBatchActions, TableBody, TableCell, TableContainer, TableExpandHeader, TableExpandRow, TableExpandedRow, TableHead, TableHeader, TableRow, TableSelectAll, TableSelectRow, TableToolbar, TableToolbarAction, TableToolbarContent, TableToolbarMenu, TableToolbarSearch, Tabs, TabsSkeleton, Tag, TagSkeleton, TextArea, TextAreaSkeleton, TextInput, TextInputSkeleton, unstable_Theme as Theme, Tile, TileAboveTheFoldContent, TileBelowTheFoldContent, TileGroup, TimePicker, TimePickerSelect, ToastNotification, Toggle, ToggleSkeleton, ToggleSmall, ToggleSmallSkeleton, Toolbar, ToolbarDivider, ToolbarItem, ToolbarOption, ToolbarSearch, ToolbarTitle, unstable_Tooltip as Tooltip, UnorderedList, unstable_VStack as VStack, unstable_Menu, unstable_MenuDivider, unstable_MenuGroup, unstable_MenuItem, unstable_MenuRadioGroup, unstable_MenuSelectableItem, unstable_PageSelector, unstable_Pagination, unstable_ProgressBar, unstable_TreeNode, unstable_TreeView, unstable_useContextMenu, unstable_useFeatureFlag as useFeatureFlag, unstable_useFeatureFlags as useFeatureFlags, unstable_usePrefix as usePrefix, unstable_useTheme as useTheme } from 'carbon-components-react';
|
package/lib/index.js
CHANGED
|
@@ -12,8 +12,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
require('./prefix.js');
|
|
13
13
|
require('./feature-flags.js');
|
|
14
14
|
var carbonComponentsReact = require('carbon-components-react');
|
|
15
|
-
var index = require('./components/Theme/index.js');
|
|
16
|
-
var index$1 = require('./components/Layer/index.js');
|
|
17
15
|
|
|
18
16
|
|
|
19
17
|
|
|
@@ -227,6 +225,12 @@ Object.defineProperty(exports, 'ExpandableTile', {
|
|
|
227
225
|
return carbonComponentsReact.ExpandableTile;
|
|
228
226
|
}
|
|
229
227
|
});
|
|
228
|
+
Object.defineProperty(exports, 'FeatureFlags', {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return carbonComponentsReact.unstable_FeatureFlags;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
230
234
|
Object.defineProperty(exports, 'FileUploader', {
|
|
231
235
|
enumerable: true,
|
|
232
236
|
get: function () {
|
|
@@ -371,6 +375,12 @@ Object.defineProperty(exports, 'HeaderSideNavItems', {
|
|
|
371
375
|
return carbonComponentsReact.HeaderSideNavItems;
|
|
372
376
|
}
|
|
373
377
|
});
|
|
378
|
+
Object.defineProperty(exports, 'Heading', {
|
|
379
|
+
enumerable: true,
|
|
380
|
+
get: function () {
|
|
381
|
+
return carbonComponentsReact.unstable_Heading;
|
|
382
|
+
}
|
|
383
|
+
});
|
|
374
384
|
Object.defineProperty(exports, 'IconButton', {
|
|
375
385
|
enumerable: true,
|
|
376
386
|
get: function () {
|
|
@@ -395,6 +405,12 @@ Object.defineProperty(exports, 'InlineNotification', {
|
|
|
395
405
|
return carbonComponentsReact.InlineNotification;
|
|
396
406
|
}
|
|
397
407
|
});
|
|
408
|
+
Object.defineProperty(exports, 'Layer', {
|
|
409
|
+
enumerable: true,
|
|
410
|
+
get: function () {
|
|
411
|
+
return carbonComponentsReact.unstable_Layer;
|
|
412
|
+
}
|
|
413
|
+
});
|
|
398
414
|
Object.defineProperty(exports, 'Link', {
|
|
399
415
|
enumerable: true,
|
|
400
416
|
get: function () {
|
|
@@ -611,6 +627,12 @@ Object.defineProperty(exports, 'SecondaryButton', {
|
|
|
611
627
|
return carbonComponentsReact.SecondaryButton;
|
|
612
628
|
}
|
|
613
629
|
});
|
|
630
|
+
Object.defineProperty(exports, 'Section', {
|
|
631
|
+
enumerable: true,
|
|
632
|
+
get: function () {
|
|
633
|
+
return carbonComponentsReact.unstable_Section;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
614
636
|
Object.defineProperty(exports, 'Select', {
|
|
615
637
|
enumerable: true,
|
|
616
638
|
get: function () {
|
|
@@ -1001,6 +1023,12 @@ Object.defineProperty(exports, 'TextInputSkeleton', {
|
|
|
1001
1023
|
return carbonComponentsReact.TextInputSkeleton;
|
|
1002
1024
|
}
|
|
1003
1025
|
});
|
|
1026
|
+
Object.defineProperty(exports, 'Theme', {
|
|
1027
|
+
enumerable: true,
|
|
1028
|
+
get: function () {
|
|
1029
|
+
return carbonComponentsReact.unstable_Theme;
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1004
1032
|
Object.defineProperty(exports, 'Tile', {
|
|
1005
1033
|
enumerable: true,
|
|
1006
1034
|
get: function () {
|
|
@@ -1121,10 +1149,40 @@ Object.defineProperty(exports, 'VStack', {
|
|
|
1121
1149
|
return carbonComponentsReact.unstable_VStack;
|
|
1122
1150
|
}
|
|
1123
1151
|
});
|
|
1124
|
-
Object.defineProperty(exports, '
|
|
1152
|
+
Object.defineProperty(exports, 'unstable_Menu', {
|
|
1125
1153
|
enumerable: true,
|
|
1126
1154
|
get: function () {
|
|
1127
|
-
return carbonComponentsReact.
|
|
1155
|
+
return carbonComponentsReact.unstable_Menu;
|
|
1156
|
+
}
|
|
1157
|
+
});
|
|
1158
|
+
Object.defineProperty(exports, 'unstable_MenuDivider', {
|
|
1159
|
+
enumerable: true,
|
|
1160
|
+
get: function () {
|
|
1161
|
+
return carbonComponentsReact.unstable_MenuDivider;
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
Object.defineProperty(exports, 'unstable_MenuGroup', {
|
|
1165
|
+
enumerable: true,
|
|
1166
|
+
get: function () {
|
|
1167
|
+
return carbonComponentsReact.unstable_MenuGroup;
|
|
1168
|
+
}
|
|
1169
|
+
});
|
|
1170
|
+
Object.defineProperty(exports, 'unstable_MenuItem', {
|
|
1171
|
+
enumerable: true,
|
|
1172
|
+
get: function () {
|
|
1173
|
+
return carbonComponentsReact.unstable_MenuItem;
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
Object.defineProperty(exports, 'unstable_MenuRadioGroup', {
|
|
1177
|
+
enumerable: true,
|
|
1178
|
+
get: function () {
|
|
1179
|
+
return carbonComponentsReact.unstable_MenuRadioGroup;
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
Object.defineProperty(exports, 'unstable_MenuSelectableItem', {
|
|
1183
|
+
enumerable: true,
|
|
1184
|
+
get: function () {
|
|
1185
|
+
return carbonComponentsReact.unstable_MenuSelectableItem;
|
|
1128
1186
|
}
|
|
1129
1187
|
});
|
|
1130
1188
|
Object.defineProperty(exports, 'unstable_PageSelector', {
|
|
@@ -1145,12 +1203,6 @@ Object.defineProperty(exports, 'unstable_ProgressBar', {
|
|
|
1145
1203
|
return carbonComponentsReact.unstable_ProgressBar;
|
|
1146
1204
|
}
|
|
1147
1205
|
});
|
|
1148
|
-
Object.defineProperty(exports, 'unstable_Section', {
|
|
1149
|
-
enumerable: true,
|
|
1150
|
-
get: function () {
|
|
1151
|
-
return carbonComponentsReact.unstable_Section;
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
1206
|
Object.defineProperty(exports, 'unstable_TreeNode', {
|
|
1155
1207
|
enumerable: true,
|
|
1156
1208
|
get: function () {
|
|
@@ -1169,6 +1221,27 @@ Object.defineProperty(exports, 'unstable_useContextMenu', {
|
|
|
1169
1221
|
return carbonComponentsReact.unstable_useContextMenu;
|
|
1170
1222
|
}
|
|
1171
1223
|
});
|
|
1172
|
-
exports
|
|
1173
|
-
|
|
1174
|
-
|
|
1224
|
+
Object.defineProperty(exports, 'useFeatureFlag', {
|
|
1225
|
+
enumerable: true,
|
|
1226
|
+
get: function () {
|
|
1227
|
+
return carbonComponentsReact.unstable_useFeatureFlag;
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
Object.defineProperty(exports, 'useFeatureFlags', {
|
|
1231
|
+
enumerable: true,
|
|
1232
|
+
get: function () {
|
|
1233
|
+
return carbonComponentsReact.unstable_useFeatureFlags;
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
Object.defineProperty(exports, 'usePrefix', {
|
|
1237
|
+
enumerable: true,
|
|
1238
|
+
get: function () {
|
|
1239
|
+
return carbonComponentsReact.unstable_usePrefix;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
Object.defineProperty(exports, 'useTheme', {
|
|
1243
|
+
enumerable: true,
|
|
1244
|
+
get: function () {
|
|
1245
|
+
return carbonComponentsReact.unstable_useTheme;
|
|
1246
|
+
}
|
|
1247
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@carbon/feature-flags": "^0.6.0",
|
|
46
46
|
"@carbon/icons-react": "^10.44.0",
|
|
47
|
-
"@carbon/styles": "^0.
|
|
47
|
+
"@carbon/styles": "^0.11.0-rc.0",
|
|
48
48
|
"@carbon/telemetry": "0.0.0-alpha.6",
|
|
49
|
-
"carbon-components": "^10.
|
|
50
|
-
"carbon-components-react": "^7.
|
|
49
|
+
"carbon-components": "^10.50.0-rc.0",
|
|
50
|
+
"carbon-components-react": "^7.50.0-rc.0",
|
|
51
51
|
"carbon-icons": "^7.0.7"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@babel/plugin-transform-react-constant-elements": "^7.14.5",
|
|
59
59
|
"@babel/preset-env": "^7.14.7",
|
|
60
60
|
"@babel/preset-react": "^7.14.5",
|
|
61
|
-
"@carbon/themes": "^10.
|
|
61
|
+
"@carbon/themes": "^10.48.0-rc.0",
|
|
62
62
|
"@rollup/plugin-babel": "^5.3.0",
|
|
63
63
|
"@rollup/plugin-commonjs": "^18.0.0",
|
|
64
64
|
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"es/prefix.js",
|
|
99
99
|
"lib/prefix.js"
|
|
100
100
|
],
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "f6e5dd2362aa2970add45c7fb7fc32841c252671"
|
|
102
102
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/mono';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans-arabic';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans-devanagari';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans-hebrew';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans-thai-looped';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans-thai';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/sans';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by @carbon/react. DO NOT EDIT.
|
|
2
|
+
//
|
|
3
|
+
// Copyright IBM Corp. 2018, 2018
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
@forward '@carbon/styles/scss/fonts/serif';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
function createCommonjsModule(fn) {
|
|
9
|
-
var module = { exports: {} };
|
|
10
|
-
return fn(module, module.exports), module.exports;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { createCommonjsModule };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
function _typeof(obj) {
|
|
9
|
-
"@babel/helpers - typeof";
|
|
10
|
-
|
|
11
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
12
|
-
_typeof = function (obj) {
|
|
13
|
-
return typeof obj;
|
|
14
|
-
};
|
|
15
|
-
} else {
|
|
16
|
-
_typeof = function (obj) {
|
|
17
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return _typeof(obj);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _defineProperty(obj, key, value) {
|
|
25
|
-
if (key in obj) {
|
|
26
|
-
Object.defineProperty(obj, key, {
|
|
27
|
-
value: value,
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true
|
|
31
|
-
});
|
|
32
|
-
} else {
|
|
33
|
-
obj[key] = value;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return obj;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function _extends() {
|
|
40
|
-
_extends = Object.assign || function (target) {
|
|
41
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = arguments[i];
|
|
43
|
-
|
|
44
|
-
for (var key in source) {
|
|
45
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
46
|
-
target[key] = source[key];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return target;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return _extends.apply(this, arguments);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
58
|
-
if (source == null) return {};
|
|
59
|
-
var target = {};
|
|
60
|
-
var sourceKeys = Object.keys(source);
|
|
61
|
-
var key, i;
|
|
62
|
-
|
|
63
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
64
|
-
key = sourceKeys[i];
|
|
65
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
66
|
-
target[key] = source[key];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return target;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _objectWithoutProperties(source, excluded) {
|
|
73
|
-
if (source == null) return {};
|
|
74
|
-
|
|
75
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
76
|
-
|
|
77
|
-
var key, i;
|
|
78
|
-
|
|
79
|
-
if (Object.getOwnPropertySymbols) {
|
|
80
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
81
|
-
|
|
82
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
83
|
-
key = sourceSymbolKeys[i];
|
|
84
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
85
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
86
|
-
target[key] = source[key];
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return target;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { _defineProperty as defineProperty, _extends as extends, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _typeof as typeof };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import classnames from '../../node_modules/classnames/index.js';
|
|
12
|
-
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
-
|
|
14
|
-
var _excluded = ["as", "className", "children"];
|
|
15
|
-
function Layer(_ref) {
|
|
16
|
-
var _ref$as = _ref.as,
|
|
17
|
-
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
18
|
-
customClassName = _ref.className,
|
|
19
|
-
children = _ref.children,
|
|
20
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
-
|
|
22
|
-
var prefix = usePrefix();
|
|
23
|
-
var className = classnames("".concat(prefix, "--layer"), customClassName);
|
|
24
|
-
return /*#__PURE__*/React.createElement(BaseComponent, _extends({}, rest, {
|
|
25
|
-
className: className
|
|
26
|
-
}), children);
|
|
27
|
-
}
|
|
28
|
-
Layer.propTypes = {
|
|
29
|
-
/**
|
|
30
|
-
* Specify a custom component or element to be rendered as the top-level
|
|
31
|
-
* element in the component
|
|
32
|
-
*/
|
|
33
|
-
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Provide child elements to be rendered inside of `Theme`
|
|
37
|
-
*/
|
|
38
|
-
children: PropTypes.node,
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Provide a custom class name to be used on the outermost element rendered by
|
|
42
|
-
* the component
|
|
43
|
-
*/
|
|
44
|
-
className: PropTypes.string
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export { Layer };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties, defineProperty as _defineProperty, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import React from 'react';
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
11
|
-
import classnames from '../../node_modules/classnames/index.js';
|
|
12
|
-
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
-
|
|
14
|
-
var _excluded = ["as", "children", "className", "theme"];
|
|
15
|
-
var ThemeContext = /*#__PURE__*/React.createContext({
|
|
16
|
-
theme: 'white'
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* Specify the theme to be applied to a page, or a region in a page
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
function Theme(_ref) {
|
|
23
|
-
var _cx;
|
|
24
|
-
|
|
25
|
-
var _ref$as = _ref.as,
|
|
26
|
-
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
27
|
-
children = _ref.children,
|
|
28
|
-
customClassName = _ref.className,
|
|
29
|
-
theme = _ref.theme,
|
|
30
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
-
|
|
32
|
-
var prefix = usePrefix();
|
|
33
|
-
var className = classnames(customClassName, (_cx = {}, _defineProperty(_cx, "".concat(prefix, "--white"), theme === 'white'), _defineProperty(_cx, "".concat(prefix, "--g10"), theme === 'g10'), _defineProperty(_cx, "".concat(prefix, "--g90"), theme === 'g90'), _defineProperty(_cx, "".concat(prefix, "--g100"), theme === 'g100'), _cx));
|
|
34
|
-
var value = React.useMemo(function () {
|
|
35
|
-
return {
|
|
36
|
-
theme: theme
|
|
37
|
-
};
|
|
38
|
-
}, [theme]);
|
|
39
|
-
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
|
|
40
|
-
value: value
|
|
41
|
-
}, /*#__PURE__*/React.createElement(BaseComponent, _extends({}, rest, {
|
|
42
|
-
className: className
|
|
43
|
-
}), children));
|
|
44
|
-
}
|
|
45
|
-
Theme.propTypes = {
|
|
46
|
-
/**
|
|
47
|
-
* Specify a custom component or element to be rendered as the top-level
|
|
48
|
-
* element in the component
|
|
49
|
-
*/
|
|
50
|
-
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Provide child elements to be rendered inside of `Theme`
|
|
54
|
-
*/
|
|
55
|
-
children: PropTypes.node,
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Provide a custom class name to be used on the outermost element rendered by
|
|
59
|
-
* the component
|
|
60
|
-
*/
|
|
61
|
-
className: PropTypes.string,
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Specify the theme
|
|
65
|
-
*/
|
|
66
|
-
theme: PropTypes.oneOf(['white', 'g10', 'g90', 'g100'])
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Get access to the current theme
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
function useTheme() {
|
|
73
|
-
return React.useContext(ThemeContext);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { Theme, useTheme };
|
package/es/internal/usePrefix.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { unstable_usePrefix } from 'carbon-components-react';
|
|
9
|
-
|
|
10
|
-
var usePrefix = unstable_usePrefix;
|
|
11
|
-
|
|
12
|
-
export { usePrefix };
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { typeof as _typeof } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
|
-
import { createCommonjsModule } from '../../_virtual/_commonjsHelpers.js';
|
|
10
|
-
|
|
11
|
-
var classnames = createCommonjsModule(function (module) {
|
|
12
|
-
/* global define */
|
|
13
|
-
(function () {
|
|
14
|
-
|
|
15
|
-
var hasOwn = {}.hasOwnProperty;
|
|
16
|
-
|
|
17
|
-
function classNames() {
|
|
18
|
-
var classes = [];
|
|
19
|
-
|
|
20
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
21
|
-
var arg = arguments[i];
|
|
22
|
-
if (!arg) continue;
|
|
23
|
-
|
|
24
|
-
var argType = _typeof(arg);
|
|
25
|
-
|
|
26
|
-
if (argType === 'string' || argType === 'number') {
|
|
27
|
-
classes.push(arg);
|
|
28
|
-
} else if (Array.isArray(arg)) {
|
|
29
|
-
if (arg.length) {
|
|
30
|
-
var inner = classNames.apply(null, arg);
|
|
31
|
-
|
|
32
|
-
if (inner) {
|
|
33
|
-
classes.push(inner);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
} else if (argType === 'object') {
|
|
37
|
-
if (arg.toString === Object.prototype.toString) {
|
|
38
|
-
for (var key in arg) {
|
|
39
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
40
|
-
classes.push(key);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} else {
|
|
44
|
-
classes.push(arg.toString());
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return classes.join(' ');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (module.exports) {
|
|
53
|
-
classNames.default = classNames;
|
|
54
|
-
module.exports = classNames;
|
|
55
|
-
} else {
|
|
56
|
-
window.classNames = classNames;
|
|
57
|
-
}
|
|
58
|
-
})();
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export default classnames;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
function createCommonjsModule(fn) {
|
|
13
|
-
var module = { exports: {} };
|
|
14
|
-
return fn(module, module.exports), module.exports;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.createCommonjsModule = createCommonjsModule;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
function _typeof(obj) {
|
|
13
|
-
"@babel/helpers - typeof";
|
|
14
|
-
|
|
15
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
16
|
-
_typeof = function (obj) {
|
|
17
|
-
return typeof obj;
|
|
18
|
-
};
|
|
19
|
-
} else {
|
|
20
|
-
_typeof = function (obj) {
|
|
21
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return _typeof(obj);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function _defineProperty(obj, key, value) {
|
|
29
|
-
if (key in obj) {
|
|
30
|
-
Object.defineProperty(obj, key, {
|
|
31
|
-
value: value,
|
|
32
|
-
enumerable: true,
|
|
33
|
-
configurable: true,
|
|
34
|
-
writable: true
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return obj;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function _extends() {
|
|
44
|
-
_extends = Object.assign || function (target) {
|
|
45
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
46
|
-
var source = arguments[i];
|
|
47
|
-
|
|
48
|
-
for (var key in source) {
|
|
49
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
50
|
-
target[key] = source[key];
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return target;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
return _extends.apply(this, arguments);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
62
|
-
if (source == null) return {};
|
|
63
|
-
var target = {};
|
|
64
|
-
var sourceKeys = Object.keys(source);
|
|
65
|
-
var key, i;
|
|
66
|
-
|
|
67
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
68
|
-
key = sourceKeys[i];
|
|
69
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
70
|
-
target[key] = source[key];
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return target;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function _objectWithoutProperties(source, excluded) {
|
|
77
|
-
if (source == null) return {};
|
|
78
|
-
|
|
79
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
80
|
-
|
|
81
|
-
var key, i;
|
|
82
|
-
|
|
83
|
-
if (Object.getOwnPropertySymbols) {
|
|
84
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
85
|
-
|
|
86
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
87
|
-
key = sourceSymbolKeys[i];
|
|
88
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
89
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
90
|
-
target[key] = source[key];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return target;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
exports.defineProperty = _defineProperty;
|
|
98
|
-
exports.extends = _extends;
|
|
99
|
-
exports.objectWithoutProperties = _objectWithoutProperties;
|
|
100
|
-
exports.objectWithoutPropertiesLoose = _objectWithoutPropertiesLoose;
|
|
101
|
-
exports.typeof = _typeof;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
|
-
var React = require('react');
|
|
14
|
-
var PropTypes = require('prop-types');
|
|
15
|
-
var index = require('../../node_modules/classnames/index.js');
|
|
16
|
-
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
-
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
|
|
23
|
-
var _excluded = ["as", "className", "children"];
|
|
24
|
-
function Layer(_ref) {
|
|
25
|
-
var _ref$as = _ref.as,
|
|
26
|
-
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
27
|
-
customClassName = _ref.className,
|
|
28
|
-
children = _ref.children,
|
|
29
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
30
|
-
|
|
31
|
-
var prefix = usePrefix.usePrefix();
|
|
32
|
-
var className = index("".concat(prefix, "--layer"), customClassName);
|
|
33
|
-
return /*#__PURE__*/React__default['default'].createElement(BaseComponent, _rollupPluginBabelHelpers['extends']({}, rest, {
|
|
34
|
-
className: className
|
|
35
|
-
}), children);
|
|
36
|
-
}
|
|
37
|
-
Layer.propTypes = {
|
|
38
|
-
/**
|
|
39
|
-
* Specify a custom component or element to be rendered as the top-level
|
|
40
|
-
* element in the component
|
|
41
|
-
*/
|
|
42
|
-
as: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].string, PropTypes__default['default'].elementType]),
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Provide child elements to be rendered inside of `Theme`
|
|
46
|
-
*/
|
|
47
|
-
children: PropTypes__default['default'].node,
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Provide a custom class name to be used on the outermost element rendered by
|
|
51
|
-
* the component
|
|
52
|
-
*/
|
|
53
|
-
className: PropTypes__default['default'].string
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
exports.Layer = Layer;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
|
-
var React = require('react');
|
|
14
|
-
var PropTypes = require('prop-types');
|
|
15
|
-
var index = require('../../node_modules/classnames/index.js');
|
|
16
|
-
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
-
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
|
|
23
|
-
var _excluded = ["as", "children", "className", "theme"];
|
|
24
|
-
var ThemeContext = /*#__PURE__*/React__default['default'].createContext({
|
|
25
|
-
theme: 'white'
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Specify the theme to be applied to a page, or a region in a page
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
function Theme(_ref) {
|
|
32
|
-
var _cx;
|
|
33
|
-
|
|
34
|
-
var _ref$as = _ref.as,
|
|
35
|
-
BaseComponent = _ref$as === void 0 ? 'div' : _ref$as,
|
|
36
|
-
children = _ref.children,
|
|
37
|
-
customClassName = _ref.className,
|
|
38
|
-
theme = _ref.theme,
|
|
39
|
-
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
|
|
41
|
-
var prefix = usePrefix.usePrefix();
|
|
42
|
-
var className = index(customClassName, (_cx = {}, _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--white"), theme === 'white'), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--g10"), theme === 'g10'), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--g90"), theme === 'g90'), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--g100"), theme === 'g100'), _cx));
|
|
43
|
-
var value = React__default['default'].useMemo(function () {
|
|
44
|
-
return {
|
|
45
|
-
theme: theme
|
|
46
|
-
};
|
|
47
|
-
}, [theme]);
|
|
48
|
-
return /*#__PURE__*/React__default['default'].createElement(ThemeContext.Provider, {
|
|
49
|
-
value: value
|
|
50
|
-
}, /*#__PURE__*/React__default['default'].createElement(BaseComponent, _rollupPluginBabelHelpers['extends']({}, rest, {
|
|
51
|
-
className: className
|
|
52
|
-
}), children));
|
|
53
|
-
}
|
|
54
|
-
Theme.propTypes = {
|
|
55
|
-
/**
|
|
56
|
-
* Specify a custom component or element to be rendered as the top-level
|
|
57
|
-
* element in the component
|
|
58
|
-
*/
|
|
59
|
-
as: PropTypes__default['default'].oneOfType([PropTypes__default['default'].func, PropTypes__default['default'].string, PropTypes__default['default'].elementType]),
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Provide child elements to be rendered inside of `Theme`
|
|
63
|
-
*/
|
|
64
|
-
children: PropTypes__default['default'].node,
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Provide a custom class name to be used on the outermost element rendered by
|
|
68
|
-
* the component
|
|
69
|
-
*/
|
|
70
|
-
className: PropTypes__default['default'].string,
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Specify the theme
|
|
74
|
-
*/
|
|
75
|
-
theme: PropTypes__default['default'].oneOf(['white', 'g10', 'g90', 'g100'])
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* Get access to the current theme
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
function useTheme() {
|
|
82
|
-
return React__default['default'].useContext(ThemeContext);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
exports.Theme = Theme;
|
|
86
|
-
exports.useTheme = useTheme;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var carbonComponentsReact = require('carbon-components-react');
|
|
13
|
-
|
|
14
|
-
var usePrefix = carbonComponentsReact.unstable_usePrefix;
|
|
15
|
-
|
|
16
|
-
exports.usePrefix = usePrefix;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2016, 2021
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
11
|
-
var _commonjsHelpers = require('../../_virtual/_commonjsHelpers.js');
|
|
12
|
-
|
|
13
|
-
var classnames = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
14
|
-
/* global define */
|
|
15
|
-
(function () {
|
|
16
|
-
|
|
17
|
-
var hasOwn = {}.hasOwnProperty;
|
|
18
|
-
|
|
19
|
-
function classNames() {
|
|
20
|
-
var classes = [];
|
|
21
|
-
|
|
22
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
23
|
-
var arg = arguments[i];
|
|
24
|
-
if (!arg) continue;
|
|
25
|
-
|
|
26
|
-
var argType = _rollupPluginBabelHelpers['typeof'](arg);
|
|
27
|
-
|
|
28
|
-
if (argType === 'string' || argType === 'number') {
|
|
29
|
-
classes.push(arg);
|
|
30
|
-
} else if (Array.isArray(arg)) {
|
|
31
|
-
if (arg.length) {
|
|
32
|
-
var inner = classNames.apply(null, arg);
|
|
33
|
-
|
|
34
|
-
if (inner) {
|
|
35
|
-
classes.push(inner);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
} else if (argType === 'object') {
|
|
39
|
-
if (arg.toString === Object.prototype.toString) {
|
|
40
|
-
for (var key in arg) {
|
|
41
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
42
|
-
classes.push(key);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
} else {
|
|
46
|
-
classes.push(arg.toString());
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return classes.join(' ');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (module.exports) {
|
|
55
|
-
classNames.default = classNames;
|
|
56
|
-
module.exports = classNames;
|
|
57
|
-
} else {
|
|
58
|
-
window.classNames = classNames;
|
|
59
|
-
}
|
|
60
|
-
})();
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
module.exports = classnames;
|