@databricks/design-system 1.12.12 → 1.12.14
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/dist/{DropdownMenu-06a1051f.js → Stepper-839336b1.js} +951 -873
- package/dist/Stepper-839336b1.js.map +1 -0
- package/dist/design-system/AutoComplete/AutoComplete.d.ts +3 -0
- package/dist/design-system/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/design-system/Button/Button.d.ts +13 -1
- package/dist/design-system/Button/Button.d.ts.map +1 -1
- package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/design-system/ContextMenu/ContextMenu.d.ts.map +1 -0
- package/dist/design-system/ContextMenu/index.d.ts +2 -0
- package/dist/design-system/ContextMenu/index.d.ts.map +1 -0
- package/dist/design-system/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts +45 -0
- package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts.map +1 -0
- package/dist/design-system/DesignSystemEventProvider/index.d.ts +2 -0
- package/dist/design-system/DesignSystemEventProvider/index.d.ts.map +1 -0
- package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxAddButton.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts +9 -5
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +9 -0
- package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +7 -0
- package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
- package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts +1 -2
- package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/design-system/FormV2/RHFAdapters.d.ts +7 -1
- package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
- package/dist/design-system/Header/Header.d.ts.map +1 -1
- package/dist/design-system/Icon/Icon.d.ts +1 -1
- package/dist/design-system/Icon/Icon.d.ts.map +1 -1
- package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts +5 -0
- package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts.map +1 -0
- package/dist/design-system/Icon/__generated/icons/index.d.ts +9 -0
- package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
- package/dist/design-system/Input/Input.d.ts +9 -1
- package/dist/design-system/Input/Input.d.ts.map +1 -1
- package/dist/design-system/Input/index.d.ts +2 -1
- package/dist/design-system/Input/index.d.ts.map +1 -1
- package/dist/design-system/Label/Label.d.ts +1 -0
- package/dist/design-system/Label/Label.d.ts.map +1 -1
- package/dist/design-system/Modal/Modal.d.ts +2 -2
- package/dist/design-system/Modal/Modal.d.ts.map +1 -1
- package/dist/design-system/Notification/Notification.d.ts.map +1 -1
- package/dist/design-system/Pagination/index.d.ts +9 -1
- package/dist/design-system/Pagination/index.d.ts.map +1 -1
- package/dist/design-system/Popover/InfoPopover.d.ts +2 -1
- package/dist/design-system/Popover/InfoPopover.d.ts.map +1 -1
- package/dist/design-system/SegmentedControl/SegmentedControl.d.ts +1 -0
- package/dist/design-system/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/design-system/Select/Select.d.ts.map +1 -1
- package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/design-system/SplitButton/Dropdown/DropdownButton.d.ts.map +1 -1
- package/dist/design-system/SplitButton/SplitButton.d.ts.map +1 -1
- package/dist/design-system/Steps/Steps.d.ts +1 -2
- package/dist/design-system/Steps/Steps.d.ts.map +1 -1
- package/dist/design-system/Switch/Switch.d.ts.map +1 -1
- package/dist/design-system/TableUI/Table.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterInput.d.ts +2 -1
- package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
- package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
- package/dist/design-system/Tag/index.d.ts +2 -2
- package/dist/design-system/Tag/index.d.ts.map +1 -1
- package/dist/design-system/Tooltip/Tooltip.d.ts +6 -0
- package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/design-system/Tree/Tree.d.ts +24 -0
- package/dist/design-system/Tree/Tree.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts +3 -0
- package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxAddButton.d.ts.map +1 -0
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +3 -1
- package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -1
- package/dist/design-system/TypeaheadCombobox/index.d.ts +1 -0
- package/dist/design-system/TypeaheadCombobox/index.d.ts.map +1 -1
- package/dist/design-system/Wizard/Wizard.d.ts +74 -0
- package/dist/design-system/Wizard/Wizard.d.ts.map +1 -0
- package/dist/design-system/Wizard/WizardFooter.d.ts +15 -0
- package/dist/design-system/Wizard/WizardFooter.d.ts.map +1 -0
- package/dist/design-system/Wizard/WizardModal.d.ts +7 -0
- package/dist/design-system/Wizard/WizardModal.d.ts.map +1 -0
- package/dist/design-system/Wizard/WizardStep.d.ts +71 -0
- package/dist/design-system/Wizard/WizardStep.d.ts.map +1 -0
- package/dist/design-system/Wizard/WizardStepsContent.d.ts +10 -0
- package/dist/design-system/Wizard/WizardStepsContent.d.ts.map +1 -0
- package/dist/design-system/Wizard/index.d.ts +5 -0
- package/dist/design-system/Wizard/index.d.ts.map +1 -0
- package/dist/design-system/Wizard/useWizardCurrentStep.d.ts +20 -0
- package/dist/design-system/Wizard/useWizardCurrentStep.d.ts.map +1 -0
- package/dist/design-system/_shared_/Combobox/styles.d.ts +12 -0
- package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -1
- package/dist/design-system/constants.d.ts +2 -2
- package/dist/design-system/constants.d.ts.map +1 -1
- package/dist/design-system/index.d.ts +3 -0
- package/dist/design-system/index.d.ts.map +1 -1
- package/dist/design-system/utils/safex.d.ts +3 -2
- package/dist/design-system/utils/safex.d.ts.map +1 -1
- package/dist/design-system/utils/useNotifyOnFirstView.d.ts +15 -0
- package/dist/design-system/utils/useNotifyOnFirstView.d.ts.map +1 -0
- package/dist/development/Banner/Banner.d.ts +16 -6
- package/dist/development/Banner/Banner.d.ts.map +1 -1
- package/dist/development/ChatUI/ChatInput.d.ts.map +1 -1
- package/dist/development/ChatUI/Feedback.d.ts.map +1 -1
- package/dist/development/Stepper/Stepper.d.ts +62 -0
- package/dist/development/Stepper/Stepper.d.ts.map +1 -0
- package/dist/development/Stepper/index.d.ts +2 -0
- package/dist/development/Stepper/index.d.ts.map +1 -0
- package/dist/development/Toolbar/Toolbar.d.ts +15 -0
- package/dist/development/Toolbar/Toolbar.d.ts.map +1 -0
- package/dist/development/Toolbar/index.d.ts +2 -0
- package/dist/development/Toolbar/index.d.ts.map +1 -0
- package/dist/development/index.d.ts +3 -2
- package/dist/development/index.d.ts.map +1 -1
- package/dist/development.js +340 -327
- package/dist/development.js.map +1 -1
- package/dist/dubois-colors.less +203 -142
- package/dist/flags.d.ts +1 -2
- package/dist/flags.d.ts.map +1 -1
- package/dist/index-dark.css +289 -289
- package/dist/index.css +196 -196
- package/dist/index.js +2588 -937
- package/dist/index.js.map +1 -1
- package/dist/rollup/less.d.ts.map +1 -1
- package/dist/test-utils/enzyme/selectEvent.d.ts +5 -0
- package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
- package/dist/test-utils/enzyme/table.d.ts.map +1 -1
- package/dist/test-utils/enzyme/utils.d.ts +6 -0
- package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
- package/dist/test-utils/enzyme.js +34 -15
- package/dist/test-utils/enzyme.js.map +1 -1
- package/dist/test-utils/rtl/selectEvent.d.ts +5 -0
- package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
- package/dist/test-utils/rtl.js +16 -1
- package/dist/test-utils/rtl.js.map +1 -1
- package/dist/theme/_generated/PrimitiveColors.d.ts +3 -0
- package/dist/theme/_generated/PrimitiveColors.d.ts.map +1 -0
- package/dist/theme/_generated/SemanticColors-Dark.d.ts +3 -0
- package/dist/theme/_generated/SemanticColors-Dark.d.ts.map +1 -0
- package/dist/theme/_generated/SemanticColors-Light.d.ts +3 -0
- package/dist/theme/_generated/SemanticColors-Light.d.ts.map +1 -0
- package/dist/theme/_generated/ValidPrimitiveColors.d.ts +56 -0
- package/dist/theme/_generated/ValidPrimitiveColors.d.ts.map +1 -0
- package/dist/theme/_generated/ValidSemanticColors.d.ts +98 -0
- package/dist/theme/_generated/ValidSemanticColors.d.ts.map +1 -0
- package/dist/theme/colors.d.ts +62 -141
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/theme/spacing.d.ts +1 -0
- package/dist/theme/spacing.d.ts.map +1 -1
- package/package.json +13 -15
- package/dist/DropdownMenu-06a1051f.js.map +0 -1
- package/dist/development/ContextMenu/ContextMenu.d.ts.map +0 -1
- package/dist/development/ContextMenu/index.d.ts +0 -2
- package/dist/development/ContextMenu/index.d.ts.map +0 -1
- package/dist/theme/colorList.d.ts +0 -130
- package/dist/theme/colorList.d.ts.map +0 -1
- /package/dist/{development → design-system}/ContextMenu/ContextMenu.d.ts +0 -0
package/dist/development.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import React__default, {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import React__default, { useRef, useEffect, useState, forwardRef } from 'react';
|
|
3
|
+
import { Z as MegaphoneIcon, W as WarningIcon, k as DangerIcon, u as useDesignSystemTheme, G as useDesignSystemEventComponentCallbacks, E as DesignSystemEventProviderComponentTypes, F as DesignSystemEventProviderAnalyticsEventTypes, B as Button$1, C as CloseIcon, T as Typography, a4 as primitiveColors, f as Input, U as CursorIcon, Y as FaceSmileIcon, X as FaceNeutralIcon, V as FaceFrownIcon, e as CheckIcon, o as ChevronLeftIcon, b as ChevronRightIcon } from './Stepper-839336b1.js';
|
|
4
|
+
export { y as Stepper } from './Stepper-839336b1.js';
|
|
5
|
+
import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
|
|
5
6
|
import * as RadixSlider from '@radix-ui/react-slider';
|
|
6
|
-
import
|
|
7
|
+
import * as RadixToolbar from '@radix-ui/react-toolbar';
|
|
7
8
|
import 'antd';
|
|
8
|
-
import '@
|
|
9
|
-
import 'chroma-js';
|
|
9
|
+
import '@ant-design/icons';
|
|
10
10
|
import 'lodash/isNil';
|
|
11
11
|
import 'lodash/endsWith';
|
|
12
12
|
import 'lodash/isBoolean';
|
|
@@ -15,9 +15,233 @@ import 'lodash/isString';
|
|
|
15
15
|
import 'lodash/mapValues';
|
|
16
16
|
import 'lodash/memoize';
|
|
17
17
|
import '@emotion/unitless';
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
// Define a module-global observer and a WeakMap on elements to hold callbacks
|
|
20
|
+
let sharedObserver = null;
|
|
21
|
+
const entryCallbackMap = new WeakMap();
|
|
22
|
+
const ensureSharedObserverExists = () => {
|
|
23
|
+
if (!sharedObserver) {
|
|
24
|
+
sharedObserver = new IntersectionObserver(entries => {
|
|
25
|
+
entries.forEach(entry => {
|
|
26
|
+
if (entry.isIntersecting) {
|
|
27
|
+
const entryCallback = entryCallbackMap.get(entry.target);
|
|
28
|
+
if (entryCallback) {
|
|
29
|
+
entryCallback();
|
|
30
|
+
entryCallbackMap.delete(entry.target);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function observeElement(element, callback) {
|
|
38
|
+
var _sharedObserver;
|
|
39
|
+
ensureSharedObserverExists();
|
|
40
|
+
entryCallbackMap.set(element, callback);
|
|
41
|
+
(_sharedObserver = sharedObserver) === null || _sharedObserver === void 0 || _sharedObserver.observe(element);
|
|
42
|
+
return () => {
|
|
43
|
+
if (element) {
|
|
44
|
+
var _sharedObserver2;
|
|
45
|
+
(_sharedObserver2 = sharedObserver) === null || _sharedObserver2 === void 0 || _sharedObserver2.unobserve(element);
|
|
46
|
+
entryCallbackMap.delete(element);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Checks if the element was viewed and calls the onView callback.
|
|
52
|
+
* NOTE: This hook only triggers the onView callback once for the element.
|
|
53
|
+
* @param onView - callback to be called when the element is viewed
|
|
54
|
+
* @typeParam T - extends Element to specify the type of element being observed
|
|
55
|
+
*/
|
|
56
|
+
const useNotifyOnFirstView = _ref => {
|
|
57
|
+
let {
|
|
58
|
+
onView
|
|
59
|
+
} = _ref;
|
|
60
|
+
const isViewedRef = useRef(false);
|
|
61
|
+
const elementRef = useRef(null);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const element = elementRef.current;
|
|
64
|
+
// If already viewed or element is not available, do nothing
|
|
65
|
+
if (!element || isViewedRef.current) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const callback = () => {
|
|
69
|
+
isViewedRef.current = true;
|
|
70
|
+
onView();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// If IntersectionObserver is not available, assume that the element is visible
|
|
74
|
+
if (!window.IntersectionObserver) {
|
|
75
|
+
callback();
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
return observeElement(element, callback);
|
|
79
|
+
}, [onView]);
|
|
80
|
+
return {
|
|
81
|
+
elementRef
|
|
82
|
+
};
|
|
83
|
+
};
|
|
19
84
|
|
|
20
85
|
function _EMOTION_STRINGIFIED_CSS_ERROR__$7() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
86
|
+
const {
|
|
87
|
+
Text,
|
|
88
|
+
Paragraph
|
|
89
|
+
} = Typography;
|
|
90
|
+
const BANNER_MIN_HEIGHT = 68;
|
|
91
|
+
// Max height will allow 2 lines of description (3 lines total)
|
|
92
|
+
const BANNER_MAX_HEIGHT = 82;
|
|
93
|
+
var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
94
|
+
name: "1te1whx",
|
|
95
|
+
styles: "margin-left:auto;display:flex;align-items:center"
|
|
96
|
+
} : {
|
|
97
|
+
name: "13c4h59-rightContainer",
|
|
98
|
+
styles: "margin-left:auto;display:flex;align-items:center;label:rightContainer;",
|
|
99
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$7
|
|
100
|
+
};
|
|
101
|
+
const useStyles = (props, theme) => {
|
|
102
|
+
const bannerLevelToBannerColors = {
|
|
103
|
+
info: {
|
|
104
|
+
backgroundDefaultColor: theme.colors.actionPrimaryBackgroundDefault,
|
|
105
|
+
actionButtonBackgroundHoverColor: theme.colors.actionPrimaryBackgroundHover,
|
|
106
|
+
actionButtonBackgroundPressColor: theme.colors.actionPrimaryBackgroundPress,
|
|
107
|
+
textColor: theme.colors.actionPrimaryTextDefault,
|
|
108
|
+
textHoverColor: theme.colors.actionPrimaryTextHover,
|
|
109
|
+
textPressColor: theme.colors.actionPrimaryTextPress
|
|
110
|
+
},
|
|
111
|
+
// TODO (PLAT-80558, zack.brody) Update hover and press states once we have colors for these
|
|
112
|
+
warning: {
|
|
113
|
+
backgroundDefaultColor: theme.colors.tagLemon,
|
|
114
|
+
actionButtonBackgroundHoverColor: theme.colors.tagLemon,
|
|
115
|
+
actionButtonBackgroundPressColor: theme.colors.tagLemon,
|
|
116
|
+
textColor: primitiveColors.grey800,
|
|
117
|
+
textHoverColor: primitiveColors.grey800,
|
|
118
|
+
textPressColor: primitiveColors.grey800
|
|
119
|
+
},
|
|
120
|
+
error: {
|
|
121
|
+
backgroundDefaultColor: theme.colors.actionDangerPrimaryBackgroundDefault,
|
|
122
|
+
actionButtonBackgroundHoverColor: theme.colors.actionDangerPrimaryBackgroundHover,
|
|
123
|
+
actionButtonBackgroundPressColor: theme.colors.actionDangerPrimaryBackgroundPress,
|
|
124
|
+
textColor: theme.colors.actionPrimaryTextDefault,
|
|
125
|
+
textHoverColor: theme.colors.actionPrimaryTextHover,
|
|
126
|
+
textPressColor: theme.colors.actionPrimaryTextPress
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const colorScheme = bannerLevelToBannerColors[props.level];
|
|
130
|
+
return {
|
|
131
|
+
banner: /*#__PURE__*/css("max-height:", BANNER_MAX_HEIGHT, "px;display:flex;align-items:center;width:100%;padding:8px;box-sizing:border-box;background-color:", colorScheme.backgroundDefaultColor, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:banner;")),
|
|
132
|
+
iconContainer: /*#__PURE__*/css("display:flex;color:", colorScheme.textColor, ";align-self:", props.description ? 'flex-start' : 'center', ";box-sizing:border-box;max-width:60px;padding-top:4px;padding-bottom:4px;padding-right:", theme.spacing.xs, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:iconContainer;")),
|
|
133
|
+
mainContent: /*#__PURE__*/css("flex-direction:column;align-self:", props.description ? 'flex-start' : 'center', ";display:flex;box-sizing:border-box;padding-right:", theme.spacing.sm, "px;padding-top:2px;padding-bottom:2px;min-width:", theme.spacing.lg, "px;width:100%;" + (process.env.NODE_ENV === "production" ? "" : ";label:mainContent;")),
|
|
134
|
+
messageTextBlock: /*#__PURE__*/css("display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:messageTextBlock;")),
|
|
135
|
+
descriptionBlock: /*#__PURE__*/css("display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:descriptionBlock;")),
|
|
136
|
+
rightContainer: _ref$1,
|
|
137
|
+
closeIconContainer: /*#__PURE__*/css("display:flex;margin-left:", theme.spacing.xs, "px;box-sizing:border-box;line-height:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIconContainer;")),
|
|
138
|
+
closeButton: /*#__PURE__*/css("cursor:pointer;background:none;border:none;margin:0;&&{height:24px!important;width:24px!important;padding:", theme.spacing.xs, "px!important;}&&:hover{background-color:transparent!important;}" + (process.env.NODE_ENV === "production" ? "" : ";label:closeButton;")),
|
|
139
|
+
closeIcon: /*#__PURE__*/css("color:", colorScheme.textColor, "!important;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIcon;")),
|
|
140
|
+
actionButtonContainer: /*#__PURE__*/css("margin-right:", theme.spacing.xs, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:actionButtonContainer;")),
|
|
141
|
+
// Override design system colors to show the use the action text color for text and border.
|
|
142
|
+
// Also overrides text for links.
|
|
143
|
+
actionButton: /*#__PURE__*/css("color:", colorScheme.textColor, "!important;border-color:", colorScheme.textColor, "!important;&:focus,&:hover{border-color:", colorScheme.textHoverColor, "!important;color:", colorScheme.textHoverColor, "!important;background-color:", colorScheme.actionButtonBackgroundHoverColor, "!important;}&:active{border-color:", colorScheme.textPressColor, "!important;color:", colorScheme.textPressColor, "!important;background-color:", colorScheme.actionButtonBackgroundPressColor, "!important;}a{color:", theme.colors.actionPrimaryTextDefault, ";}a:focus,a:hover{color:", colorScheme.textHoverColor, ";text-decoration:none;}a:active{color:", colorScheme.textPressColor, " text-decoration:none;}" + (process.env.NODE_ENV === "production" ? "" : ";label:actionButton;"))
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
const levelToIconMap = {
|
|
147
|
+
info: jsx(MegaphoneIcon, {
|
|
148
|
+
"data-testid": "level-info-icon"
|
|
149
|
+
}),
|
|
150
|
+
warning: jsx(WarningIcon, {
|
|
151
|
+
"data-testid": "level-warning-icon"
|
|
152
|
+
}),
|
|
153
|
+
error: jsx(DangerIcon, {
|
|
154
|
+
"data-testid": "level-error-icon"
|
|
155
|
+
})
|
|
156
|
+
};
|
|
157
|
+
const Banner = props => {
|
|
158
|
+
const {
|
|
159
|
+
level,
|
|
160
|
+
message,
|
|
161
|
+
description,
|
|
162
|
+
ctaText,
|
|
163
|
+
onAccept,
|
|
164
|
+
closable,
|
|
165
|
+
onClose,
|
|
166
|
+
closeButtonAriaLabel,
|
|
167
|
+
componentId,
|
|
168
|
+
analyticsEvents
|
|
169
|
+
} = props;
|
|
170
|
+
const [closed, setClosed] = React__default.useState(false);
|
|
171
|
+
const {
|
|
172
|
+
theme
|
|
173
|
+
} = useDesignSystemTheme();
|
|
174
|
+
const styles = useStyles(props, theme);
|
|
175
|
+
const eventContext = useDesignSystemEventComponentCallbacks({
|
|
176
|
+
componentType: DesignSystemEventProviderComponentTypes.Banner,
|
|
177
|
+
componentId,
|
|
178
|
+
analyticsEvents: analyticsEvents !== null && analyticsEvents !== void 0 ? analyticsEvents : [DesignSystemEventProviderAnalyticsEventTypes.OnView]
|
|
179
|
+
});
|
|
180
|
+
const {
|
|
181
|
+
elementRef
|
|
182
|
+
} = useNotifyOnFirstView({
|
|
183
|
+
onView: eventContext.onView
|
|
184
|
+
});
|
|
185
|
+
const actionButton = onAccept && ctaText ? jsx("div", {
|
|
186
|
+
css: styles.actionButtonContainer,
|
|
187
|
+
children: jsx(Button$1, {
|
|
188
|
+
componentId: `${componentId}.accept`,
|
|
189
|
+
onClick: onAccept,
|
|
190
|
+
css: styles.actionButton,
|
|
191
|
+
size: "small",
|
|
192
|
+
children: ctaText
|
|
193
|
+
})
|
|
194
|
+
}) : null;
|
|
195
|
+
const close = closable !== false ? jsx("div", {
|
|
196
|
+
css: styles.closeIconContainer,
|
|
197
|
+
children: jsx(Button$1, {
|
|
198
|
+
componentId: `${componentId}.close`,
|
|
199
|
+
css: styles.closeButton,
|
|
200
|
+
onClick: () => {
|
|
201
|
+
if (onClose) {
|
|
202
|
+
onClose();
|
|
203
|
+
}
|
|
204
|
+
setClosed(true);
|
|
205
|
+
},
|
|
206
|
+
"aria-label": closeButtonAriaLabel !== null && closeButtonAriaLabel !== void 0 ? closeButtonAriaLabel : 'Close',
|
|
207
|
+
"data-testid": "banner-dismiss",
|
|
208
|
+
children: jsx(CloseIcon, {
|
|
209
|
+
css: styles.closeIcon
|
|
210
|
+
})
|
|
211
|
+
})
|
|
212
|
+
}) : null;
|
|
213
|
+
return jsx(Fragment, {
|
|
214
|
+
children: !closed && jsxs("div", {
|
|
215
|
+
ref: elementRef,
|
|
216
|
+
css: styles.banner,
|
|
217
|
+
className: "banner",
|
|
218
|
+
"data-testid": props['data-testid'],
|
|
219
|
+
children: [jsx("div", {
|
|
220
|
+
css: styles.iconContainer,
|
|
221
|
+
children: levelToIconMap[level]
|
|
222
|
+
}), jsxs("div", {
|
|
223
|
+
css: styles.mainContent,
|
|
224
|
+
children: [jsx(Text, {
|
|
225
|
+
size: "md",
|
|
226
|
+
bold: true,
|
|
227
|
+
css: styles.messageTextBlock,
|
|
228
|
+
title: message,
|
|
229
|
+
children: message
|
|
230
|
+
}), description && jsx(Paragraph, {
|
|
231
|
+
withoutMargins: true,
|
|
232
|
+
css: styles.descriptionBlock,
|
|
233
|
+
title: description,
|
|
234
|
+
children: description
|
|
235
|
+
})]
|
|
236
|
+
}), jsxs("div", {
|
|
237
|
+
css: styles.rightContainer,
|
|
238
|
+
children: [actionButton, close]
|
|
239
|
+
})]
|
|
240
|
+
})
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$6() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
21
245
|
const chatInputStyles = {
|
|
22
246
|
container: process.env.NODE_ENV === "production" ? {
|
|
23
247
|
name: "ets5eq",
|
|
@@ -25,7 +249,7 @@ const chatInputStyles = {
|
|
|
25
249
|
} : {
|
|
26
250
|
name: "t01lrg-container",
|
|
27
251
|
styles: "background-color:var(--background-primary);padding:var(--spacing-sm);position:relative;label:container;",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
252
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
|
|
29
253
|
},
|
|
30
254
|
suggestionButtons: process.env.NODE_ENV === "production" ? {
|
|
31
255
|
name: "zsd1o9",
|
|
@@ -33,7 +257,7 @@ const chatInputStyles = {
|
|
|
33
257
|
} : {
|
|
34
258
|
name: "3tz5r6-suggestionButtons",
|
|
35
259
|
styles: "display:flex;gap:var(--spacing-sm);margin-bottom:var(--spacing-sm);label:suggestionButtons;",
|
|
36
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
260
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
|
|
37
261
|
},
|
|
38
262
|
textArea: process.env.NODE_ENV === "production" ? {
|
|
39
263
|
name: "ge1ym1",
|
|
@@ -41,7 +265,7 @@ const chatInputStyles = {
|
|
|
41
265
|
} : {
|
|
42
266
|
name: "hcagyb-textArea",
|
|
43
267
|
styles: "min-width:100%;max-height:150px !important;label:textArea;",
|
|
44
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
268
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
|
|
45
269
|
},
|
|
46
270
|
button: process.env.NODE_ENV === "production" ? {
|
|
47
271
|
name: "1c60og2",
|
|
@@ -49,7 +273,7 @@ const chatInputStyles = {
|
|
|
49
273
|
} : {
|
|
50
274
|
name: "1h7quuz-button",
|
|
51
275
|
styles: "position:absolute;bottom:calc(var(--spacing-sm) + 4px);right:calc(var(--spacing-sm) + 4px);transform:scaleX(-1);label:button;",
|
|
52
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
276
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
|
|
53
277
|
}
|
|
54
278
|
};
|
|
55
279
|
const ChatInput = _ref => {
|
|
@@ -94,7 +318,8 @@ const ChatInput = _ref => {
|
|
|
94
318
|
}
|
|
95
319
|
},
|
|
96
320
|
...textAreaProps
|
|
97
|
-
}), jsx(Button, {
|
|
321
|
+
}), jsx(Button$1, {
|
|
322
|
+
componentId: "codegen_design-system_src_development_chatui_chatinput.tsx_83",
|
|
98
323
|
size: "small",
|
|
99
324
|
css: chatInputStyles.button,
|
|
100
325
|
icon: jsx(CursorIcon, {}),
|
|
@@ -104,7 +329,7 @@ const ChatInput = _ref => {
|
|
|
104
329
|
};
|
|
105
330
|
var ChatInput$1 = ChatInput;
|
|
106
331
|
|
|
107
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
332
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$5() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
108
333
|
const snippetStyles = {
|
|
109
334
|
container: process.env.NODE_ENV === "production" ? {
|
|
110
335
|
name: "emyse7",
|
|
@@ -112,7 +337,7 @@ const snippetStyles = {
|
|
|
112
337
|
} : {
|
|
113
338
|
name: "15luuk2-container",
|
|
114
339
|
styles: "margin:var(--spacing-md) 0;label:container;",
|
|
115
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
340
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
116
341
|
},
|
|
117
342
|
header: process.env.NODE_ENV === "production" ? {
|
|
118
343
|
name: "dtwnbh",
|
|
@@ -120,7 +345,7 @@ const snippetStyles = {
|
|
|
120
345
|
} : {
|
|
121
346
|
name: "1o07vd-header",
|
|
122
347
|
styles: "background-color:var(--color-grey700);color:var(--color-grey300);border-radius:var(--border-radius) var(--border-radius) 0 0;padding:var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-md);display:flex;justify-content:space-between;align-items:center;label:header;",
|
|
123
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
348
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
124
349
|
},
|
|
125
350
|
buttonSvg: process.env.NODE_ENV === "production" ? {
|
|
126
351
|
name: "s8x62f",
|
|
@@ -128,7 +353,7 @@ const snippetStyles = {
|
|
|
128
353
|
} : {
|
|
129
354
|
name: "g0ytlm-buttonSvg",
|
|
130
355
|
styles: "svg{color:var(--color-grey300);};label:buttonSvg;",
|
|
131
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
356
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
132
357
|
},
|
|
133
358
|
code: process.env.NODE_ENV === "production" ? {
|
|
134
359
|
name: "u1l3ou",
|
|
@@ -136,7 +361,7 @@ const snippetStyles = {
|
|
|
136
361
|
} : {
|
|
137
362
|
name: "gdk9wh-code",
|
|
138
363
|
styles: "padding:var(--spacing-sm) var(--spacing-md);margin:0;border-radius:0 0 var(--border-radius) var(--border-radius);background-color:var(--color-grey800);color:var(--color-grey300);label:code;",
|
|
139
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
364
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
|
|
140
365
|
}
|
|
141
366
|
};
|
|
142
367
|
const CodeSnippet = _ref => {
|
|
@@ -174,7 +399,7 @@ const CodeSnippet = _ref => {
|
|
|
174
399
|
};
|
|
175
400
|
var CodeSnippet$1 = CodeSnippet;
|
|
176
401
|
|
|
177
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
402
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$4() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
178
403
|
const feedbackStyles = {
|
|
179
404
|
container: process.env.NODE_ENV === "production" ? {
|
|
180
405
|
name: "1laz9o6",
|
|
@@ -182,7 +407,7 @@ const feedbackStyles = {
|
|
|
182
407
|
} : {
|
|
183
408
|
name: "1dbf7uj-container",
|
|
184
409
|
styles: "display:flex;justify-content:space-between;align-items:flex-end;label:container;",
|
|
185
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
410
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
|
|
186
411
|
},
|
|
187
412
|
feedbackPrompt: process.env.NODE_ENV === "production" ? {
|
|
188
413
|
name: "1hsyf68",
|
|
@@ -190,7 +415,7 @@ const feedbackStyles = {
|
|
|
190
415
|
} : {
|
|
191
416
|
name: "1yi757f-feedbackPrompt",
|
|
192
417
|
styles: "display:flex;flex-direction:column;gap:var(--spacing-sm);label:feedbackPrompt;",
|
|
193
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
418
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
|
|
194
419
|
},
|
|
195
420
|
feedbackOptions: process.env.NODE_ENV === "production" ? {
|
|
196
421
|
name: "1s3radb",
|
|
@@ -198,7 +423,7 @@ const feedbackStyles = {
|
|
|
198
423
|
} : {
|
|
199
424
|
name: "125q18r-feedbackOptions",
|
|
200
425
|
styles: "display:flex;gap:var(--spacing-sm);label:feedbackOptions;",
|
|
201
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
426
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
|
|
202
427
|
}
|
|
203
428
|
};
|
|
204
429
|
const Feedback = _ref => {
|
|
@@ -227,21 +452,24 @@ const Feedback = _ref => {
|
|
|
227
452
|
children: "Was this response:"
|
|
228
453
|
}), jsxs("div", {
|
|
229
454
|
css: feedbackStyles.feedbackOptions,
|
|
230
|
-
children: [jsx(Button, {
|
|
455
|
+
children: [jsx(Button$1, {
|
|
456
|
+
componentId: "codegen_design-system_src_development_chatui_feedback.tsx_57",
|
|
231
457
|
icon: jsx(FaceSmileIcon, {}),
|
|
232
458
|
onClick: () => {
|
|
233
459
|
onFeedback('Better');
|
|
234
460
|
setIsVisible(false);
|
|
235
461
|
},
|
|
236
462
|
children: "Better"
|
|
237
|
-
}), jsx(Button, {
|
|
463
|
+
}), jsx(Button$1, {
|
|
464
|
+
componentId: "codegen_design-system_src_development_chatui_feedback.tsx_66",
|
|
238
465
|
icon: jsx(FaceNeutralIcon, {}),
|
|
239
466
|
onClick: () => {
|
|
240
467
|
onFeedback('Same');
|
|
241
468
|
setIsVisible(false);
|
|
242
469
|
},
|
|
243
470
|
children: "Same"
|
|
244
|
-
}), jsx(Button, {
|
|
471
|
+
}), jsx(Button$1, {
|
|
472
|
+
componentId: "codegen_design-system_src_development_chatui_feedback.tsx_75",
|
|
245
473
|
icon: jsx(FaceFrownIcon, {}),
|
|
246
474
|
onClick: () => {
|
|
247
475
|
onFeedback('Worse');
|
|
@@ -250,7 +478,8 @@ const Feedback = _ref => {
|
|
|
250
478
|
children: "Worse"
|
|
251
479
|
})]
|
|
252
480
|
})]
|
|
253
|
-
}), jsx(Button, {
|
|
481
|
+
}), jsx(Button$1, {
|
|
482
|
+
componentId: "codegen_design-system_src_development_chatui_feedback.tsx_86",
|
|
254
483
|
icon: jsx(CloseIcon, {}),
|
|
255
484
|
onClick: () => setIsVisible(false)
|
|
256
485
|
})]
|
|
@@ -292,7 +521,7 @@ const Message = _ref => {
|
|
|
292
521
|
};
|
|
293
522
|
var Message$1 = Message;
|
|
294
523
|
|
|
295
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
524
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$3() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
296
525
|
const buttonStyles = {
|
|
297
526
|
container: process.env.NODE_ENV === "production" ? {
|
|
298
527
|
name: "f9548c",
|
|
@@ -300,7 +529,7 @@ const buttonStyles = {
|
|
|
300
529
|
} : {
|
|
301
530
|
name: "12rixe4-container",
|
|
302
531
|
styles: "position:relative;display:inline-block;width:max-content;label:container;",
|
|
303
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
532
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
|
|
304
533
|
},
|
|
305
534
|
checkIcon: process.env.NODE_ENV === "production" ? {
|
|
306
535
|
name: "441ysl",
|
|
@@ -308,7 +537,7 @@ const buttonStyles = {
|
|
|
308
537
|
} : {
|
|
309
538
|
name: "hmgfz4-checkIcon",
|
|
310
539
|
styles: "position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none;svg{color:var(--checkmark-color);};label:checkIcon;",
|
|
311
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
540
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
|
|
312
541
|
}
|
|
313
542
|
};
|
|
314
543
|
const MessageActionButton = props => {
|
|
@@ -340,7 +569,7 @@ const MessageActionButton = props => {
|
|
|
340
569
|
style: {
|
|
341
570
|
['--checkmark-color']: theme.colors.green500
|
|
342
571
|
},
|
|
343
|
-
children: [jsx(Button, {
|
|
572
|
+
children: [jsx(Button$1, {
|
|
344
573
|
size: "small",
|
|
345
574
|
...props,
|
|
346
575
|
onClick: handleClick,
|
|
@@ -380,7 +609,7 @@ const MessageBody = _ref => {
|
|
|
380
609
|
};
|
|
381
610
|
var MessageBody$1 = MessageBody;
|
|
382
611
|
|
|
383
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
612
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$2() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
384
613
|
const headerStyles = {
|
|
385
614
|
container: process.env.NODE_ENV === "production" ? {
|
|
386
615
|
name: "30lgt6",
|
|
@@ -388,7 +617,7 @@ const headerStyles = {
|
|
|
388
617
|
} : {
|
|
389
618
|
name: "10tss9b-container",
|
|
390
619
|
styles: "display:flex;justify-content:space-between;align-items:center;position:relative;label:container;",
|
|
391
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
620
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
392
621
|
},
|
|
393
622
|
leftContent: process.env.NODE_ENV === "production" ? {
|
|
394
623
|
name: "sz7nmf",
|
|
@@ -396,7 +625,7 @@ const headerStyles = {
|
|
|
396
625
|
} : {
|
|
397
626
|
name: "11wiry4-leftContent",
|
|
398
627
|
styles: "display:flex;align-items:center;gap:var(--spacing-sm);label:leftContent;",
|
|
399
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
628
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
400
629
|
},
|
|
401
630
|
rightContent: process.env.NODE_ENV === "production" ? {
|
|
402
631
|
name: "s5xdrg",
|
|
@@ -404,7 +633,7 @@ const headerStyles = {
|
|
|
404
633
|
} : {
|
|
405
634
|
name: "6oh64j-rightContent",
|
|
406
635
|
styles: "display:flex;align-items:center;label:rightContent;",
|
|
407
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
636
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
408
637
|
},
|
|
409
638
|
avatar: /*#__PURE__*/css({
|
|
410
639
|
position: 'absolute',
|
|
@@ -454,7 +683,7 @@ const MessageHeader = _ref => {
|
|
|
454
683
|
};
|
|
455
684
|
var MessageHeader$1 = MessageHeader;
|
|
456
685
|
|
|
457
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
686
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
458
687
|
const paginationStyles = {
|
|
459
688
|
container: process.env.NODE_ENV === "production" ? {
|
|
460
689
|
name: "1lyitb8",
|
|
@@ -462,7 +691,7 @@ const paginationStyles = {
|
|
|
462
691
|
} : {
|
|
463
692
|
name: "tx606a-container",
|
|
464
693
|
styles: "display:flex;align-items:center;justify-items:center;gap:var(--spacing-sm);label:container;",
|
|
465
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
694
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
466
695
|
},
|
|
467
696
|
button: process.env.NODE_ENV === "production" ? {
|
|
468
697
|
name: "waw0s4",
|
|
@@ -470,7 +699,7 @@ const paginationStyles = {
|
|
|
470
699
|
} : {
|
|
471
700
|
name: "18u25xw-button",
|
|
472
701
|
styles: "border:none;background-color:transparent;padding:0;display:flex;height:var(--spacing-md);align-items:center;label:button;",
|
|
473
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$
|
|
702
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
474
703
|
}
|
|
475
704
|
};
|
|
476
705
|
const MessagePagination = _ref => {
|
|
@@ -526,21 +755,21 @@ const ChatUI = {
|
|
|
526
755
|
ChatInput: ChatInput$1
|
|
527
756
|
};
|
|
528
757
|
|
|
529
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
530
|
-
var _ref
|
|
758
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
759
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
531
760
|
name: "1tciq3q",
|
|
532
761
|
styles: "position:relative;display:flex;align-items:center;&[data-orientation=\"vertical\"]{flex-direction:column;width:20px;height:100px;}&[data-orientation=\"horizontal\"]{height:20px;width:200px;}"
|
|
533
762
|
} : {
|
|
534
763
|
name: "18im58f-getRootStyles",
|
|
535
764
|
styles: "position:relative;display:flex;align-items:center;&[data-orientation=\"vertical\"]{flex-direction:column;width:20px;height:100px;}&[data-orientation=\"horizontal\"]{height:20px;width:200px;};label:getRootStyles;",
|
|
536
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
765
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
537
766
|
};
|
|
538
|
-
const getRootStyles = () => {
|
|
539
|
-
return _ref
|
|
767
|
+
const getRootStyles$1 = () => {
|
|
768
|
+
return _ref;
|
|
540
769
|
};
|
|
541
770
|
const Root$1 = /*#__PURE__*/forwardRef((props, ref) => {
|
|
542
771
|
return jsx(RadixSlider.Root, {
|
|
543
|
-
css: getRootStyles(),
|
|
772
|
+
css: getRootStyles$1(),
|
|
544
773
|
...props,
|
|
545
774
|
ref: ref
|
|
546
775
|
});
|
|
@@ -630,314 +859,98 @@ var Slider = /*#__PURE__*/Object.freeze({
|
|
|
630
859
|
Track: Track
|
|
631
860
|
});
|
|
632
861
|
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}
|
|
645
|
-
const {
|
|
646
|
-
theme
|
|
647
|
-
} = useDesignSystemTheme();
|
|
648
|
-
return jsx(ContextMenuSubTrigger, {
|
|
649
|
-
...props,
|
|
650
|
-
css: dropdownItemStyles(theme),
|
|
651
|
-
children: children
|
|
652
|
-
});
|
|
653
|
-
};
|
|
654
|
-
const Content = _ref2 => {
|
|
655
|
-
let {
|
|
656
|
-
children,
|
|
657
|
-
minWidth,
|
|
658
|
-
...childrenProps
|
|
659
|
-
} = _ref2;
|
|
660
|
-
const {
|
|
661
|
-
getPopupContainer
|
|
662
|
-
} = useDesignSystemContext();
|
|
663
|
-
const {
|
|
664
|
-
theme
|
|
665
|
-
} = useDesignSystemTheme();
|
|
666
|
-
return jsx(ContextMenuPortal, {
|
|
667
|
-
container: getPopupContainer && getPopupContainer(),
|
|
668
|
-
children: jsx(ContextMenuContent, {
|
|
669
|
-
...childrenProps,
|
|
670
|
-
css: [dropdownContentStyles(theme), {
|
|
671
|
-
minWidth
|
|
672
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
|
|
673
|
-
children: children
|
|
674
|
-
})
|
|
675
|
-
});
|
|
676
|
-
};
|
|
677
|
-
const SubContent = _ref3 => {
|
|
678
|
-
let {
|
|
679
|
-
children,
|
|
680
|
-
minWidth,
|
|
681
|
-
...childrenProps
|
|
682
|
-
} = _ref3;
|
|
683
|
-
const {
|
|
684
|
-
getPopupContainer
|
|
685
|
-
} = useDesignSystemContext();
|
|
686
|
-
const {
|
|
687
|
-
theme
|
|
688
|
-
} = useDesignSystemTheme();
|
|
689
|
-
return jsx(ContextMenuPortal, {
|
|
690
|
-
container: getPopupContainer && getPopupContainer(),
|
|
691
|
-
children: jsx(ContextMenuSubContent, {
|
|
692
|
-
...childrenProps,
|
|
693
|
-
css: [dropdownContentStyles(theme), {
|
|
694
|
-
minWidth
|
|
695
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:SubContent;"],
|
|
696
|
-
children: children
|
|
697
|
-
})
|
|
698
|
-
});
|
|
862
|
+
const getRootStyles = theme => {
|
|
863
|
+
return /*#__PURE__*/css({
|
|
864
|
+
alignItems: 'center',
|
|
865
|
+
backgroundColor: theme.colors.backgroundSecondary,
|
|
866
|
+
border: `1px solid ${theme.colors.borderDecorative}`,
|
|
867
|
+
borderRadius: theme.borders.borderRadiusMd,
|
|
868
|
+
boxShadow: theme.general.shadowLow,
|
|
869
|
+
display: 'flex',
|
|
870
|
+
gap: theme.spacing.md,
|
|
871
|
+
width: 'max-content',
|
|
872
|
+
padding: theme.spacing.sm
|
|
873
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getRootStyles;");
|
|
699
874
|
};
|
|
700
|
-
const
|
|
701
|
-
let {
|
|
702
|
-
children,
|
|
703
|
-
...props
|
|
704
|
-
} = _ref4;
|
|
875
|
+
const Root = /*#__PURE__*/forwardRef((props, ref) => {
|
|
705
876
|
const {
|
|
706
877
|
theme
|
|
707
878
|
} = useDesignSystemTheme();
|
|
708
|
-
return jsx(
|
|
879
|
+
return jsx(RadixToolbar.Root, {
|
|
880
|
+
css: getRootStyles(theme),
|
|
709
881
|
...props,
|
|
710
|
-
|
|
711
|
-
children: children
|
|
882
|
+
ref: ref
|
|
712
883
|
});
|
|
713
|
-
};
|
|
714
|
-
const
|
|
715
|
-
|
|
716
|
-
children,
|
|
717
|
-
...props
|
|
718
|
-
} = _ref5;
|
|
719
|
-
const {
|
|
720
|
-
theme
|
|
721
|
-
} = useDesignSystemTheme();
|
|
722
|
-
return jsxs(ContextMenuCheckboxItem, {
|
|
884
|
+
});
|
|
885
|
+
const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
886
|
+
return jsx(RadixToolbar.Button, {
|
|
723
887
|
...props,
|
|
724
|
-
|
|
725
|
-
children: [jsx(ContextMenuItemIndicator, {
|
|
726
|
-
css: itemIndicatorStyles(theme),
|
|
727
|
-
children: jsx(CheckIcon, {})
|
|
728
|
-
}), !props.checked && jsx("div", {
|
|
729
|
-
style: {
|
|
730
|
-
width: theme.general.iconFontSize + theme.spacing.xs
|
|
731
|
-
}
|
|
732
|
-
}), children]
|
|
888
|
+
ref: ref
|
|
733
889
|
});
|
|
890
|
+
});
|
|
891
|
+
const getSeparatorStyles = theme => {
|
|
892
|
+
return /*#__PURE__*/css({
|
|
893
|
+
alignSelf: 'stretch',
|
|
894
|
+
backgroundColor: theme.colors.borderDecorative,
|
|
895
|
+
width: 1
|
|
896
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getSeparatorStyles;");
|
|
734
897
|
};
|
|
735
|
-
const
|
|
736
|
-
let {
|
|
737
|
-
children,
|
|
738
|
-
...props
|
|
739
|
-
} = _ref6;
|
|
898
|
+
const Separator = /*#__PURE__*/forwardRef((props, ref) => {
|
|
740
899
|
const {
|
|
741
900
|
theme
|
|
742
901
|
} = useDesignSystemTheme();
|
|
743
|
-
return
|
|
902
|
+
return jsx(RadixToolbar.Separator, {
|
|
903
|
+
css: getSeparatorStyles(theme),
|
|
744
904
|
...props,
|
|
745
|
-
|
|
746
|
-
'&[data-state="unchecked"]': {
|
|
747
|
-
paddingLeft: theme.general.iconFontSize + theme.spacing.xs + theme.spacing.sm
|
|
748
|
-
}
|
|
749
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:RadioItem;"],
|
|
750
|
-
children: [jsx(ContextMenuItemIndicator, {
|
|
751
|
-
css: itemIndicatorStyles(theme),
|
|
752
|
-
children: jsx(CheckIcon, {})
|
|
753
|
-
}), children]
|
|
905
|
+
ref: ref
|
|
754
906
|
});
|
|
755
|
-
};
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
children,
|
|
759
|
-
...props
|
|
760
|
-
} = _ref7;
|
|
761
|
-
const {
|
|
762
|
-
theme
|
|
763
|
-
} = useDesignSystemTheme();
|
|
764
|
-
return jsx(ContextMenuLabel, {
|
|
907
|
+
});
|
|
908
|
+
const Link = /*#__PURE__*/forwardRef((props, ref) => {
|
|
909
|
+
return jsx(RadixToolbar.Link, {
|
|
765
910
|
...props,
|
|
766
|
-
|
|
767
|
-
color: theme.colors.textSecondary,
|
|
768
|
-
padding: `${theme.spacing.sm - 2}px ${theme.spacing.sm}px`
|
|
769
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:Label;"),
|
|
770
|
-
children: children
|
|
771
|
-
});
|
|
772
|
-
};
|
|
773
|
-
const Hint = _ref8 => {
|
|
774
|
-
let {
|
|
775
|
-
children
|
|
776
|
-
} = _ref8;
|
|
777
|
-
const {
|
|
778
|
-
theme
|
|
779
|
-
} = useDesignSystemTheme();
|
|
780
|
-
return jsx("span", {
|
|
781
|
-
css: /*#__PURE__*/css({
|
|
782
|
-
display: 'inline-flex',
|
|
783
|
-
marginLeft: 'auto',
|
|
784
|
-
paddingLeft: theme.spacing.sm
|
|
785
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:Hint;"),
|
|
786
|
-
children: children
|
|
911
|
+
ref: ref
|
|
787
912
|
});
|
|
788
|
-
};
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
return jsx(ContextMenuSeparator, {
|
|
794
|
-
css: dropdownSeparatorStyles(theme)
|
|
913
|
+
});
|
|
914
|
+
const ToggleGroup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
915
|
+
return jsx(RadixToolbar.ToggleGroup, {
|
|
916
|
+
...props,
|
|
917
|
+
ref: ref
|
|
795
918
|
});
|
|
796
|
-
};
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
Item,
|
|
806
|
-
Group,
|
|
807
|
-
RadioGroup,
|
|
808
|
-
CheckboxItem,
|
|
809
|
-
RadioItem,
|
|
810
|
-
Arrow,
|
|
811
|
-
Separator,
|
|
812
|
-
Sub,
|
|
813
|
-
SubTrigger,
|
|
814
|
-
SubContent,
|
|
815
|
-
Content,
|
|
816
|
-
Hint
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
820
|
-
const {
|
|
821
|
-
Text,
|
|
822
|
-
Paragraph
|
|
823
|
-
} = Typography;
|
|
824
|
-
const BANNER_MIN_HEIGHT = 68;
|
|
825
|
-
// Max height will allow 2 lines of description (3 lines total)
|
|
826
|
-
const BANNER_MAX_HEIGHT = 82;
|
|
827
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
828
|
-
name: "1te1whx",
|
|
829
|
-
styles: "margin-left:auto;display:flex;align-items:center"
|
|
830
|
-
} : {
|
|
831
|
-
name: "13c4h59-rightContainer",
|
|
832
|
-
styles: "margin-left:auto;display:flex;align-items:center;label:rightContainer;",
|
|
833
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
834
|
-
};
|
|
835
|
-
const useStyles = (props, theme) => {
|
|
836
|
-
const bannerLevelToBannerColors = {
|
|
837
|
-
info: {
|
|
838
|
-
backgroundDefaultColor: theme.colors.actionPrimaryBackgroundDefault,
|
|
839
|
-
backgroundHoverColor: theme.colors.actionPrimaryBackgroundHover,
|
|
840
|
-
backgroundPressColor: theme.colors.actionPrimaryBackgroundPress,
|
|
841
|
-
textColor: theme.colors.actionPrimaryTextDefault
|
|
919
|
+
});
|
|
920
|
+
const getToggleItemStyles = theme => {
|
|
921
|
+
return /*#__PURE__*/css({
|
|
922
|
+
background: 'none',
|
|
923
|
+
color: theme.colors.textPrimary,
|
|
924
|
+
border: 'none',
|
|
925
|
+
cursor: 'pointer',
|
|
926
|
+
'&:hover': {
|
|
927
|
+
color: theme.colors.actionDefaultTextHover
|
|
842
928
|
},
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
backgroundHoverColor: theme.colors.actionDangerPrimaryBackgroundHover,
|
|
846
|
-
backgroundPressColor: theme.colors.actionDangerPrimaryBackgroundPress,
|
|
847
|
-
textColor: theme.colors.actionPrimaryTextDefault
|
|
929
|
+
'&[data-state="on"]': {
|
|
930
|
+
color: theme.colors.actionDefaultTextPress
|
|
848
931
|
}
|
|
849
|
-
};
|
|
850
|
-
const colorScheme = bannerLevelToBannerColors[props.level];
|
|
851
|
-
return {
|
|
852
|
-
banner: /*#__PURE__*/css("max-height:", BANNER_MAX_HEIGHT, "px;min-height:", BANNER_MIN_HEIGHT, "px;display:flex;align-items:center;width:100%;padding:12px;box-sizing:border-box;background-color:", colorScheme.backgroundDefaultColor, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:banner;")),
|
|
853
|
-
iconContainer: /*#__PURE__*/css("display:flex;color:", colorScheme.textColor, ";padding:2px ", theme.spacing.sm, "px;align-self:", props.description ? 'flex-start' : 'center', ";box-sizing:border-box;max-width:60px;" + (process.env.NODE_ENV === "production" ? "" : ";label:iconContainer;")),
|
|
854
|
-
mainContent: /*#__PURE__*/css("flex-direction:column;align-self:", props.description ? 'flex-start' : 'center', ";display:flex;box-sizing:border-box;padding-right:", theme.spacing.sm, "px;min-width:", theme.spacing.lg, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:mainContent;")),
|
|
855
|
-
messageTextBlock: /*#__PURE__*/css("&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:messageTextBlock;")),
|
|
856
|
-
descriptionBlock: /*#__PURE__*/css("&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:descriptionBlock;")),
|
|
857
|
-
rightContainer: _ref,
|
|
858
|
-
closeIconContainer: /*#__PURE__*/css("display:flex;padding:", theme.spacing.sm, "px ", theme.spacing.sm, "px ", theme.spacing.sm, "px ", theme.spacing.md, "px;box-sizing:border-box;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIconContainer;")),
|
|
859
|
-
closeIcon: /*#__PURE__*/css("color:", colorScheme.textColor, "!important;cursor:pointer;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIcon;")),
|
|
860
|
-
// Override design system colors to show the use the action text color for text and border.
|
|
861
|
-
// Also overrides text for links.
|
|
862
|
-
actionButton: /*#__PURE__*/css("color:", colorScheme.textColor, "!important;border-color:", colorScheme.textColor, "!important;&:focus,&:hover{border-color:", theme.colors.actionPrimaryTextHover, "!important;color:", theme.colors.actionPrimaryTextHover, "!important;background-color:", colorScheme.backgroundHoverColor, "!important;}&:active{border-color:", theme.colors.actionPrimaryTextPress, "!important;color:", theme.colors.actionPrimaryTextPress, "!important;background-color:", theme.colors.actionPrimaryBackgroundPress, "!important;}a{color:", theme.colors.actionPrimaryTextDefault, ";}a:focus,a:hover{color:", theme.colors.actionPrimaryTextHover, ";text-decoration:none;}a:active{color:", theme.colors.actionPrimaryTextPress, " text-decoration:none;}" + (process.env.NODE_ENV === "production" ? "" : ";label:actionButton;"))
|
|
863
|
-
};
|
|
932
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:getToggleItemStyles;");
|
|
864
933
|
};
|
|
865
|
-
const
|
|
866
|
-
info: jsx(MegaphoneIcon, {
|
|
867
|
-
"data-testid": "level-info-icon"
|
|
868
|
-
}),
|
|
869
|
-
error: jsx(DangerIcon, {
|
|
870
|
-
"data-testid": "level-error-icon"
|
|
871
|
-
})
|
|
872
|
-
};
|
|
873
|
-
const Banner = props => {
|
|
874
|
-
const {
|
|
875
|
-
level,
|
|
876
|
-
message,
|
|
877
|
-
description,
|
|
878
|
-
ctaText,
|
|
879
|
-
onAccept,
|
|
880
|
-
closable,
|
|
881
|
-
onClose,
|
|
882
|
-
closeButtonAriaLabel
|
|
883
|
-
} = props;
|
|
884
|
-
const [closed, setClosed] = React__default.useState(false);
|
|
934
|
+
const ToggleItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
885
935
|
const {
|
|
886
936
|
theme
|
|
887
937
|
} = useDesignSystemTheme();
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
children: ctaText
|
|
893
|
-
}) : null;
|
|
894
|
-
const close = closable !== false ? jsx("div", {
|
|
895
|
-
css: styles.closeIconContainer,
|
|
896
|
-
children: jsx("a", {
|
|
897
|
-
onClick: () => {
|
|
898
|
-
if (onClose) {
|
|
899
|
-
onClose();
|
|
900
|
-
}
|
|
901
|
-
setClosed(true);
|
|
902
|
-
},
|
|
903
|
-
"aria-label": closeButtonAriaLabel !== null && closeButtonAriaLabel !== void 0 ? closeButtonAriaLabel : 'Close',
|
|
904
|
-
"data-testid": "banner-dismiss",
|
|
905
|
-
children: jsx(CloseIcon, {
|
|
906
|
-
css: styles.closeIcon
|
|
907
|
-
})
|
|
908
|
-
})
|
|
909
|
-
}) : null;
|
|
910
|
-
return jsx(Fragment, {
|
|
911
|
-
children: !closed && jsxs("div", {
|
|
912
|
-
css: styles.banner,
|
|
913
|
-
className: "banner",
|
|
914
|
-
"data-testid": props['data-testid'],
|
|
915
|
-
children: [jsx("div", {
|
|
916
|
-
css: styles.iconContainer,
|
|
917
|
-
children: levelToIconMap[level]
|
|
918
|
-
}), jsxs("div", {
|
|
919
|
-
css: styles.mainContent,
|
|
920
|
-
children: [jsx(Text, {
|
|
921
|
-
size: "md",
|
|
922
|
-
ellipsis: true,
|
|
923
|
-
bold: true,
|
|
924
|
-
css: styles.messageTextBlock,
|
|
925
|
-
children: message
|
|
926
|
-
}), description && jsx(Paragraph, {
|
|
927
|
-
ellipsis: {
|
|
928
|
-
rows: 2
|
|
929
|
-
},
|
|
930
|
-
withoutMargins: true,
|
|
931
|
-
css: styles.descriptionBlock,
|
|
932
|
-
children: description
|
|
933
|
-
})]
|
|
934
|
-
}), jsxs("div", {
|
|
935
|
-
css: styles.rightContainer,
|
|
936
|
-
children: [actionButton, close]
|
|
937
|
-
})]
|
|
938
|
-
})
|
|
938
|
+
return jsx(RadixToolbar.ToggleItem, {
|
|
939
|
+
css: getToggleItemStyles(theme),
|
|
940
|
+
...props,
|
|
941
|
+
ref: ref
|
|
939
942
|
});
|
|
940
|
-
};
|
|
943
|
+
});
|
|
944
|
+
|
|
945
|
+
var Toolbar = /*#__PURE__*/Object.freeze({
|
|
946
|
+
__proto__: null,
|
|
947
|
+
Button: Button,
|
|
948
|
+
Link: Link,
|
|
949
|
+
Root: Root,
|
|
950
|
+
Separator: Separator,
|
|
951
|
+
ToggleGroup: ToggleGroup,
|
|
952
|
+
ToggleItem: ToggleItem
|
|
953
|
+
});
|
|
941
954
|
|
|
942
|
-
export {
|
|
955
|
+
export { BANNER_MAX_HEIGHT, BANNER_MIN_HEIGHT, Banner, ChatUI, Slider, Toolbar };
|
|
943
956
|
//# sourceMappingURL=development.js.map
|