@coinbase/cds-mobile 8.61.0 → 8.62.1
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 +10 -0
- package/dts/accordion/Accordion.d.ts +1 -9
- package/dts/accordion/Accordion.d.ts.map +1 -1
- package/dts/alpha/combobox/Combobox.d.ts.map +1 -1
- package/dts/alpha/select/Select.d.ts.map +1 -1
- package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -1
- package/dts/alpha/tabbed-chips/TabbedChips.d.ts.map +1 -1
- package/dts/banner/Banner.d.ts.map +1 -1
- package/dts/buttons/AvatarButton.d.ts +6 -3
- package/dts/buttons/AvatarButton.d.ts.map +1 -1
- package/dts/buttons/Button.d.ts.map +1 -1
- package/dts/buttons/ButtonGroup.d.ts +3 -1
- package/dts/buttons/ButtonGroup.d.ts.map +1 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/buttons/IconCounterButton.d.ts.map +1 -1
- package/dts/buttons/SlideButton.d.ts.map +1 -1
- package/dts/cards/LikeButton.d.ts.map +1 -1
- package/dts/carousel/Carousel.d.ts.map +1 -1
- package/dts/cells/Cell.d.ts.map +1 -1
- package/dts/cells/ListCell.d.ts.map +1 -1
- package/dts/cells/ListCellFallback.d.ts.map +1 -1
- package/dts/chips/Chip.d.ts.map +1 -1
- package/dts/chips/ChipProps.d.ts +10 -8
- package/dts/chips/ChipProps.d.ts.map +1 -1
- package/dts/chips/InputChip.d.ts.map +1 -1
- package/dts/chips/MediaChip.d.ts +3 -2
- package/dts/chips/MediaChip.d.ts.map +1 -1
- package/dts/chips/TabbedChips.d.ts.map +1 -1
- package/dts/coachmark/Coachmark.d.ts.map +1 -1
- package/dts/collapsible/Collapsible.d.ts.map +1 -1
- package/dts/controls/Checkbox.d.ts.map +1 -1
- package/dts/controls/CheckboxCell.d.ts.map +1 -1
- package/dts/controls/Control.d.ts.map +1 -1
- package/dts/controls/ControlGroup.d.ts +13 -4
- package/dts/controls/ControlGroup.d.ts.map +1 -1
- package/dts/controls/InputStack.d.ts.map +1 -1
- package/dts/controls/Radio.d.ts.map +1 -1
- package/dts/controls/RadioCell.d.ts.map +1 -1
- package/dts/controls/SearchInput.d.ts.map +1 -1
- package/dts/controls/SelectOption.d.ts +3 -1
- package/dts/controls/SelectOption.d.ts.map +1 -1
- package/dts/controls/Switch.d.ts.map +1 -1
- package/dts/controls/TextInput.d.ts.map +1 -1
- package/dts/core/componentConfig.d.ts +166 -0
- package/dts/core/componentConfig.d.ts.map +1 -0
- package/dts/dates/Calendar.d.ts.map +1 -1
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/dts/dots/DotCount.d.ts +1 -11
- package/dts/dots/DotCount.d.ts.map +1 -1
- package/dts/dots/DotStatusColor.d.ts +1 -8
- package/dts/dots/DotStatusColor.d.ts.map +1 -1
- package/dts/dots/DotSymbol.d.ts +1 -17
- package/dts/dots/DotSymbol.d.ts.map +1 -1
- package/dts/hooks/useComponentConfig.d.ts +22 -0
- package/dts/hooks/useComponentConfig.d.ts.map +1 -0
- package/dts/icons/Icon.d.ts +11 -1
- package/dts/icons/Icon.d.ts.map +1 -1
- package/dts/index.d.ts +2 -0
- package/dts/index.d.ts.map +1 -1
- package/dts/layout/Divider.d.ts +3 -1
- package/dts/layout/Divider.d.ts.map +1 -1
- package/dts/layout/Fallback.d.ts +3 -1
- package/dts/layout/Fallback.d.ts.map +1 -1
- package/dts/media/Avatar.d.ts +1 -14
- package/dts/media/Avatar.d.ts.map +1 -1
- package/dts/media/RemoteImage.d.ts.map +1 -1
- package/dts/media/RemoteImageGroup.d.ts +3 -10
- package/dts/media/RemoteImageGroup.d.ts.map +1 -1
- package/dts/navigation/BrowserBar.d.ts +5 -14
- package/dts/navigation/BrowserBar.d.ts.map +1 -1
- package/dts/navigation/NavigationTitle.d.ts +4 -7
- package/dts/navigation/NavigationTitle.d.ts.map +1 -1
- package/dts/navigation/NavigationTitleSelect.d.ts +5 -11
- package/dts/navigation/NavigationTitleSelect.d.ts.map +1 -1
- package/dts/navigation/TopNavBar.d.ts +3 -13
- package/dts/navigation/TopNavBar.d.ts.map +1 -1
- package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/dts/numpad/Numpad.d.ts +41 -38
- package/dts/numpad/Numpad.d.ts.map +1 -1
- package/dts/overlays/Alert.d.ts.map +1 -1
- package/dts/overlays/Toast.d.ts.map +1 -1
- package/dts/overlays/drawer/Drawer.d.ts.map +1 -1
- package/dts/overlays/modal/Modal.d.ts.map +1 -1
- package/dts/overlays/modal/ModalBody.d.ts.map +1 -1
- package/dts/overlays/modal/ModalFooter.d.ts +3 -8
- package/dts/overlays/modal/ModalFooter.d.ts.map +1 -1
- package/dts/overlays/modal/ModalHeader.d.ts.map +1 -1
- package/dts/overlays/overlay/Overlay.d.ts +7 -3
- package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts +2 -20
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/dts/overlays/tray/Tray.d.ts.map +1 -1
- package/dts/page/PageFooter.d.ts.map +1 -1
- package/dts/page/PageHeader.d.ts.map +1 -1
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts +2 -0
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +1 -0
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +2 -0
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +1 -0
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +2 -0
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +1 -0
- package/dts/stepper/Stepper.d.ts.map +1 -1
- package/dts/system/ComponentConfigProvider.d.ts +26 -0
- package/dts/system/ComponentConfigProvider.d.ts.map +1 -0
- package/dts/system/index.d.ts +1 -0
- package/dts/system/index.d.ts.map +1 -1
- package/dts/tabs/SegmentedTab.d.ts +6 -3
- package/dts/tabs/SegmentedTab.d.ts.map +1 -1
- package/dts/tabs/SegmentedTabs.d.ts +6 -3
- package/dts/tabs/SegmentedTabs.d.ts.map +1 -1
- package/dts/tabs/Tabs.d.ts +25 -24
- package/dts/tabs/Tabs.d.ts.map +1 -1
- package/dts/tag/Tag.d.ts.map +1 -1
- package/dts/tour/Tour.d.ts +42 -41
- package/dts/tour/Tour.d.ts.map +1 -1
- package/dts/typography/Link.d.ts +1 -14
- package/dts/typography/Link.d.ts.map +1 -1
- package/dts/utils/mergeComponentProps.d.ts +34 -0
- package/dts/utils/mergeComponentProps.d.ts.map +1 -0
- package/dts/visualizations/ProgressBar.d.ts.map +1 -1
- package/dts/visualizations/ProgressBarWithFixedLabels.d.ts +5 -3
- package/dts/visualizations/ProgressBarWithFixedLabels.d.ts.map +1 -1
- package/dts/visualizations/ProgressBarWithFloatLabel.d.ts +3 -1
- package/dts/visualizations/ProgressBarWithFloatLabel.d.ts.map +1 -1
- package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
- package/esm/accordion/Accordion.js +5 -3
- package/esm/alpha/combobox/Combobox.js +8 -6
- package/esm/alpha/select/Select.js +6 -4
- package/esm/alpha/select-chip/SelectChip.js +6 -4
- package/esm/alpha/tabbed-chips/TabbedChips.js +6 -4
- package/esm/banner/Banner.js +6 -4
- package/esm/buttons/AvatarButton.js +6 -4
- package/esm/buttons/Button.js +6 -4
- package/esm/buttons/ButtonGroup.js +5 -3
- package/esm/buttons/IconButton.js +6 -4
- package/esm/buttons/IconCounterButton.js +6 -4
- package/esm/buttons/SlideButton.js +10 -8
- package/esm/cards/LikeButton.js +6 -4
- package/esm/carousel/Carousel.js +10 -8
- package/esm/cells/Cell.js +6 -4
- package/esm/cells/ListCell.js +6 -4
- package/esm/cells/ListCellFallback.js +6 -4
- package/esm/chips/Chip.js +6 -4
- package/esm/chips/InputChip.js +6 -4
- package/esm/chips/MediaChip.js +6 -4
- package/esm/chips/TabbedChips.js +6 -4
- package/esm/coachmark/Coachmark.js +6 -4
- package/esm/collapsible/Collapsible.js +10 -8
- package/esm/controls/Checkbox.js +6 -4
- package/esm/controls/CheckboxCell.js +6 -4
- package/esm/controls/Control.js +8 -6
- package/esm/controls/ControlGroup.js +6 -4
- package/esm/controls/InputStack.js +6 -4
- package/esm/controls/Radio.js +6 -4
- package/esm/controls/RadioCell.js +6 -4
- package/esm/controls/SearchInput.js +6 -4
- package/esm/controls/SelectOption.js +6 -4
- package/esm/controls/Switch.js +6 -4
- package/esm/controls/TextInput.js +6 -4
- package/esm/core/componentConfig.js +1 -0
- package/esm/dates/Calendar.js +8 -6
- package/esm/dates/DateInput.js +6 -4
- package/esm/dates/DatePicker.js +9 -6
- package/esm/dots/DotCount.js +6 -4
- package/esm/dots/DotStatusColor.js +6 -4
- package/esm/dots/DotSymbol.js +6 -4
- package/esm/hooks/useComponentConfig.js +27 -0
- package/esm/icons/Icon.js +10 -8
- package/esm/index.js +2 -0
- package/esm/layout/Divider.js +6 -4
- package/esm/layout/Fallback.js +6 -4
- package/esm/media/Avatar.js +6 -4
- package/esm/media/RemoteImage.js +6 -4
- package/esm/media/RemoteImageGroup.js +6 -4
- package/esm/navigation/BrowserBar.js +6 -4
- package/esm/navigation/NavigationTitle.js +6 -4
- package/esm/navigation/NavigationTitleSelect.js +8 -6
- package/esm/navigation/TopNavBar.js +5 -3
- package/esm/numbers/RollingNumber/RollingNumber.js +6 -4
- package/esm/numpad/Numpad.js +8 -6
- package/esm/overlays/Alert.js +7 -5
- package/esm/overlays/Toast.js +10 -8
- package/esm/overlays/drawer/Drawer.js +12 -10
- package/esm/overlays/modal/Modal.js +4 -1
- package/esm/overlays/modal/ModalBody.js +8 -6
- package/esm/overlays/modal/ModalFooter.js +8 -6
- package/esm/overlays/modal/ModalHeader.js +6 -4
- package/esm/overlays/overlay/Overlay.js +6 -4
- package/esm/overlays/tooltip/Tooltip.js +5 -3
- package/esm/overlays/tray/Tray.js +13 -11
- package/esm/page/PageFooter.js +6 -4
- package/esm/page/PageHeader.js +6 -4
- package/esm/perf/component-config/Button.component-config.perf-test.js +35 -0
- package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +147 -0
- package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +326 -0
- package/esm/perf/component-config/README.md +8 -0
- package/esm/stepper/Stepper.js +11 -9
- package/esm/system/ComponentConfigProvider.js +39 -0
- package/esm/system/__stories__/ComponentConfigProvider.stories.js +12 -0
- package/esm/system/__stories__/ComponentConfigProviderCustom.stories.js +22 -0
- package/esm/system/__stories__/componentConfigStickerSheet/Container.js +27 -0
- package/esm/system/__stories__/componentConfigStickerSheet/StickerSheet.js +94 -0
- package/esm/system/__stories__/componentConfigStickerSheet/customComponentConfig.js +116 -0
- package/esm/system/__stories__/componentConfigStickerSheet/customTheme.js +520 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Accordion.js +67 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Avatar.js +48 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Banner.js +43 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Button.js +77 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Coachmark.js +15 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Controls.js +29 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/DatePicker.js +15 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/DotCount.js +28 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Icon.js +57 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/InputChip.js +17 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/ListCell.js +48 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Search.js +20 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/SegmentedTabs.js +12 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Select.js +24 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/SelectChip.js +22 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Tag.js +35 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/TextInput.js +46 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/constants.js +33 -0
- package/esm/system/__stories__/componentConfigStickerSheet/themeVars.js +2 -0
- package/esm/system/index.js +1 -0
- package/esm/tabs/SegmentedTab.js +7 -5
- package/esm/tabs/SegmentedTabs.js +9 -4
- package/esm/tabs/Tabs.js +12 -10
- package/esm/tag/Tag.js +6 -4
- package/esm/tour/Tour.js +5 -3
- package/esm/typography/Link.js +6 -4
- package/esm/utils/mergeComponentProps.js +35 -0
- package/esm/visualizations/ProgressBar.js +7 -5
- package/esm/visualizations/ProgressBarWithFixedLabels.js +5 -3
- package/esm/visualizations/ProgressBarWithFloatLabel.js +5 -3
- package/esm/visualizations/ProgressCircle.js +7 -5
- package/package.json +4 -3
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
2
|
+
import { ComponentConfigProvider, ThemeProvider } from '..';
|
|
3
|
+
import { customComponentConfig } from './componentConfigStickerSheet/customComponentConfig';
|
|
4
|
+
import { customTheme } from './componentConfigStickerSheet/customTheme';
|
|
5
|
+
import { StickerSheet } from './componentConfigStickerSheet/StickerSheet';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const ComponentConfigProviderCustomStory = () => {
|
|
8
|
+
return /*#__PURE__*/_jsx(ExampleScreen, {
|
|
9
|
+
children: /*#__PURE__*/_jsx(Example, {
|
|
10
|
+
title: "ComponentConfigProviderCustom",
|
|
11
|
+
children: /*#__PURE__*/_jsx(ThemeProvider, {
|
|
12
|
+
activeColorScheme: "dark",
|
|
13
|
+
theme: customTheme,
|
|
14
|
+
children: /*#__PURE__*/_jsx(ComponentConfigProvider, {
|
|
15
|
+
value: customComponentConfig,
|
|
16
|
+
children: /*#__PURE__*/_jsx(StickerSheet, {})
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
export default ComponentConfigProviderCustomStory;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const _excluded = ["paddingX", "gap", "title", "children"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
import { VStack } from '../../../layout/VStack';
|
|
6
|
+
import { Text } from '../../../typography/Text';
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
export const Container = /*#__PURE__*/memo(_ref => {
|
|
9
|
+
let {
|
|
10
|
+
paddingX = 2,
|
|
11
|
+
gap = 2,
|
|
12
|
+
title,
|
|
13
|
+
children
|
|
14
|
+
} = _ref,
|
|
15
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
16
|
+
return /*#__PURE__*/_jsxs(VStack, _extends({
|
|
17
|
+
gap: gap,
|
|
18
|
+
maxWidth: "100%",
|
|
19
|
+
paddingX: paddingX
|
|
20
|
+
}, props, {
|
|
21
|
+
children: [title && /*#__PURE__*/_jsx(Text, {
|
|
22
|
+
font: "title3",
|
|
23
|
+
width: "100%",
|
|
24
|
+
children: title
|
|
25
|
+
}), children]
|
|
26
|
+
}));
|
|
27
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { HStack } from '../../../layout/HStack';
|
|
3
|
+
import { VStack } from '../../../layout/VStack';
|
|
4
|
+
import { AccordionExample } from './examples/Accordion';
|
|
5
|
+
import { AvatarExample } from './examples/Avatar';
|
|
6
|
+
import { BannerExample } from './examples/Banner';
|
|
7
|
+
import { ButtonExample } from './examples/Button';
|
|
8
|
+
import { CoachmarkExample } from './examples/Coachmark';
|
|
9
|
+
import { ControlsExample } from './examples/Controls';
|
|
10
|
+
import { DatePickerExample } from './examples/DatePicker';
|
|
11
|
+
import { DotCountExample } from './examples/DotCount';
|
|
12
|
+
import { IconExample } from './examples/Icon';
|
|
13
|
+
import { InputChipExample } from './examples/InputChip';
|
|
14
|
+
import { ListCellExample } from './examples/ListCell';
|
|
15
|
+
import { SearchExample } from './examples/Search';
|
|
16
|
+
import { SegmentedTabsExample } from './examples/SegmentedTabs';
|
|
17
|
+
import { SelectExample } from './examples/Select';
|
|
18
|
+
import { SelectChipExample } from './examples/SelectChip';
|
|
19
|
+
import { TagExample } from './examples/Tag';
|
|
20
|
+
import { TextInputExample } from './examples/TextInput';
|
|
21
|
+
import { Container } from './Container';
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
export const StickerSheet = /*#__PURE__*/memo(() => {
|
|
24
|
+
return /*#__PURE__*/_jsx(VStack, {
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
background: "bg",
|
|
27
|
+
gap: 2,
|
|
28
|
+
padding: 2,
|
|
29
|
+
children: /*#__PURE__*/_jsxs(HStack, {
|
|
30
|
+
alignItems: "flex-start",
|
|
31
|
+
flexWrap: "wrap",
|
|
32
|
+
gap: 2,
|
|
33
|
+
children: [/*#__PURE__*/_jsxs(VStack, {
|
|
34
|
+
gap: 2,
|
|
35
|
+
children: [/*#__PURE__*/_jsx(Container, {
|
|
36
|
+
title: "Switch / Checkbox / Radio",
|
|
37
|
+
children: /*#__PURE__*/_jsx(ControlsExample, {})
|
|
38
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
39
|
+
title: "Segmented Tabs",
|
|
40
|
+
children: /*#__PURE__*/_jsx(SegmentedTabsExample, {})
|
|
41
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
42
|
+
title: "Select Input (SelectOption)",
|
|
43
|
+
children: /*#__PURE__*/_jsx(SelectExample, {})
|
|
44
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
45
|
+
title: "SearchInput",
|
|
46
|
+
children: /*#__PURE__*/_jsx(SearchExample, {})
|
|
47
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
48
|
+
title: "SelectChip / InputChip",
|
|
49
|
+
children: /*#__PURE__*/_jsxs(HStack, {
|
|
50
|
+
flexWrap: "wrap",
|
|
51
|
+
gap: 1,
|
|
52
|
+
children: [/*#__PURE__*/_jsx(SelectChipExample, {}), /*#__PURE__*/_jsx(InputChipExample, {})]
|
|
53
|
+
})
|
|
54
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
55
|
+
title: "Accordion",
|
|
56
|
+
children: /*#__PURE__*/_jsx(AccordionExample, {})
|
|
57
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
58
|
+
title: "DatePicker",
|
|
59
|
+
children: /*#__PURE__*/_jsx(DatePickerExample, {})
|
|
60
|
+
})]
|
|
61
|
+
}), /*#__PURE__*/_jsxs(VStack, {
|
|
62
|
+
gap: 2,
|
|
63
|
+
children: [/*#__PURE__*/_jsx(Container, {
|
|
64
|
+
title: "Tag",
|
|
65
|
+
children: /*#__PURE__*/_jsx(TagExample, {})
|
|
66
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
67
|
+
title: "Icon",
|
|
68
|
+
children: /*#__PURE__*/_jsx(IconExample, {})
|
|
69
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
70
|
+
title: "Button / IconButton",
|
|
71
|
+
children: /*#__PURE__*/_jsx(ButtonExample, {})
|
|
72
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
73
|
+
title: "Avatar",
|
|
74
|
+
children: /*#__PURE__*/_jsx(AvatarExample, {})
|
|
75
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
76
|
+
title: "TextInput",
|
|
77
|
+
children: /*#__PURE__*/_jsx(TextInputExample, {})
|
|
78
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
79
|
+
title: "ListCell",
|
|
80
|
+
children: /*#__PURE__*/_jsx(ListCellExample, {})
|
|
81
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
82
|
+
title: "Banner",
|
|
83
|
+
children: /*#__PURE__*/_jsx(BannerExample, {})
|
|
84
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
85
|
+
title: "DotCount",
|
|
86
|
+
children: /*#__PURE__*/_jsx(DotCountExample, {})
|
|
87
|
+
}), /*#__PURE__*/_jsx(Container, {
|
|
88
|
+
title: "Coachmark",
|
|
89
|
+
children: /*#__PURE__*/_jsx(CoachmarkExample, {})
|
|
90
|
+
})]
|
|
91
|
+
})]
|
|
92
|
+
})
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
const _excluded = ["label", "labelNode"];
|
|
2
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
3
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
import { Text } from '../../../typography/Text';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export const customComponentConfig = {
|
|
7
|
+
Banner: {
|
|
8
|
+
borderRadius: 0
|
|
9
|
+
},
|
|
10
|
+
Button: props => ({
|
|
11
|
+
borderRadius: 200,
|
|
12
|
+
height: props.compact ? 24 : 32,
|
|
13
|
+
font: props.compact ? 'label1' : 'headline',
|
|
14
|
+
progressCircleSize: props.compact ? 12 : 16,
|
|
15
|
+
paddingY: 0
|
|
16
|
+
}),
|
|
17
|
+
IconButton: props => {
|
|
18
|
+
var _props$compact;
|
|
19
|
+
const isCompact = (_props$compact = props.compact) != null ? _props$compact : true;
|
|
20
|
+
return _extends({
|
|
21
|
+
borderRadius: 200,
|
|
22
|
+
height: isCompact ? 24 : 32,
|
|
23
|
+
width: isCompact ? 24 : 32
|
|
24
|
+
}, props.variant === 'tertiary' ? {
|
|
25
|
+
background: 'bgAlternate',
|
|
26
|
+
color: 'fg',
|
|
27
|
+
borderColor: 'bgAlternate'
|
|
28
|
+
} : {});
|
|
29
|
+
},
|
|
30
|
+
TextInput: _ref => {
|
|
31
|
+
let {
|
|
32
|
+
label,
|
|
33
|
+
labelNode
|
|
34
|
+
} = _ref,
|
|
35
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
36
|
+
return {
|
|
37
|
+
labelNode: (labelNode != null ? labelNode : label) ? /*#__PURE__*/_jsx(Text, {
|
|
38
|
+
color: "fgMuted",
|
|
39
|
+
font: "label2",
|
|
40
|
+
children: label
|
|
41
|
+
}) : undefined,
|
|
42
|
+
bordered: false,
|
|
43
|
+
inputBackground: 'bgAlternate',
|
|
44
|
+
font: props.compact ? 'label2' : 'body',
|
|
45
|
+
variant: 'foregroundMuted',
|
|
46
|
+
focusedBorderWidth: 100
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
Switch: props => ({
|
|
50
|
+
background: props.checked ? 'bgPrimary' : undefined,
|
|
51
|
+
controlColor: props.checked ? 'bgAlternate' : 'fg'
|
|
52
|
+
}),
|
|
53
|
+
Tooltip: {
|
|
54
|
+
invertColorScheme: false
|
|
55
|
+
},
|
|
56
|
+
Radio: props => ({
|
|
57
|
+
background: 'bg',
|
|
58
|
+
borderWidth: props.checked ? 200 : 100,
|
|
59
|
+
borderColor: props.checked ? 'bgPrimary' : 'bgLinePrimarySubtle',
|
|
60
|
+
controlColor: 'bgPrimary',
|
|
61
|
+
dotSize: 20 / 3
|
|
62
|
+
}),
|
|
63
|
+
/**
|
|
64
|
+
* Advanced parity gap: we use 4px border radius instead of 2px border radius, could be fixed by adding borderRadius of 50
|
|
65
|
+
*/
|
|
66
|
+
Checkbox: props => ({
|
|
67
|
+
borderWidth: 200,
|
|
68
|
+
controlColor: 'fg',
|
|
69
|
+
background: props.checked ? 'bgSecondary' : undefined,
|
|
70
|
+
borderColor: props.checked ? 'bgSecondary' : 'bgLinePrimarySubtle'
|
|
71
|
+
}),
|
|
72
|
+
ModalHeader: {
|
|
73
|
+
paddingX: 4,
|
|
74
|
+
paddingY: 3
|
|
75
|
+
},
|
|
76
|
+
ModalFooter: {
|
|
77
|
+
paddingX: 4,
|
|
78
|
+
paddingY: 4
|
|
79
|
+
},
|
|
80
|
+
ModalBody: {
|
|
81
|
+
paddingX: 4
|
|
82
|
+
},
|
|
83
|
+
SegmentedTabs: {
|
|
84
|
+
activeBackground: 'bgSecondary',
|
|
85
|
+
background: 'bgAlternate',
|
|
86
|
+
borderRadius: 300
|
|
87
|
+
},
|
|
88
|
+
SegmentedTab: {
|
|
89
|
+
activeColor: 'fg',
|
|
90
|
+
borderRadius: 200,
|
|
91
|
+
font: 'headline'
|
|
92
|
+
},
|
|
93
|
+
Chip: {
|
|
94
|
+
borderRadius: 200
|
|
95
|
+
},
|
|
96
|
+
Link: {
|
|
97
|
+
underline: true
|
|
98
|
+
},
|
|
99
|
+
ControlGroup: {
|
|
100
|
+
gap: 1
|
|
101
|
+
},
|
|
102
|
+
SearchInput: props => ({
|
|
103
|
+
borderRadius: 200,
|
|
104
|
+
height: props.compact ? 24 : 32
|
|
105
|
+
}),
|
|
106
|
+
Select: props => ({
|
|
107
|
+
bordered: false,
|
|
108
|
+
variant: 'foregroundMuted',
|
|
109
|
+
inputBackground: 'bgAlternate',
|
|
110
|
+
focusedBorderWidth: 100,
|
|
111
|
+
height: props.compact ? 24 : props.labelVariant === 'inside' ? 40 : 32,
|
|
112
|
+
font: props.compact ? 'label2' : 'body',
|
|
113
|
+
labelColor: 'fgMuted',
|
|
114
|
+
labelFont: props.compact ? props.align === 'end' ? 'label1' : 'label2' : 'body'
|
|
115
|
+
})
|
|
116
|
+
};
|