@databricks/design-system 1.12.12 → 1.12.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/{DropdownMenu-06a1051f.js → DropdownMenu-dbeef1b7.js} +611 -298
  2. package/dist/DropdownMenu-dbeef1b7.js.map +1 -0
  3. package/dist/design-system/Button/Button.d.ts +3 -0
  4. package/dist/design-system/Button/Button.d.ts.map +1 -1
  5. package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts +44 -0
  6. package/dist/design-system/DesignSystemEventProvider/DesignSystemEventProvider.d.ts.map +1 -0
  7. package/dist/design-system/DesignSystemEventProvider/index.d.ts +2 -0
  8. package/dist/design-system/DesignSystemEventProvider/index.d.ts.map +1 -0
  9. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
  10. package/dist/design-system/DialogCombobox/DialogComboboxHintRow.d.ts.map +1 -1
  11. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  12. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +9 -0
  13. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  14. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +7 -0
  15. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  16. package/dist/design-system/FormV2/RHFAdapters.d.ts +6 -0
  17. package/dist/design-system/FormV2/RHFAdapters.d.ts.map +1 -1
  18. package/dist/design-system/Icon/Icon.d.ts +1 -1
  19. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  20. package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts +5 -0
  21. package/dist/design-system/Icon/__generated/icons/BarStackedPercentageIcon.d.ts.map +1 -0
  22. package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts +5 -0
  23. package/dist/design-system/Icon/__generated/icons/ErdIcon.d.ts.map +1 -0
  24. package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts +5 -0
  25. package/dist/design-system/Icon/__generated/icons/ListClearIcon.d.ts.map +1 -0
  26. package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts +5 -0
  27. package/dist/design-system/Icon/__generated/icons/PauseIcon.d.ts.map +1 -0
  28. package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts +5 -0
  29. package/dist/design-system/Icon/__generated/icons/SparkleIcon.d.ts.map +1 -0
  30. package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts +5 -0
  31. package/dist/design-system/Icon/__generated/icons/StepIntoIcon.d.ts.map +1 -0
  32. package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts +5 -0
  33. package/dist/design-system/Icon/__generated/icons/StepOutIcon.d.ts.map +1 -0
  34. package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts +5 -0
  35. package/dist/design-system/Icon/__generated/icons/StepOverIcon.d.ts.map +1 -0
  36. package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts +5 -0
  37. package/dist/design-system/Icon/__generated/icons/TableOnlineViewIcon.d.ts.map +1 -0
  38. package/dist/design-system/Icon/__generated/icons/index.d.ts +9 -0
  39. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  40. package/dist/design-system/Label/Label.d.ts +1 -0
  41. package/dist/design-system/Label/Label.d.ts.map +1 -1
  42. package/dist/design-system/Pagination/index.d.ts +1 -0
  43. package/dist/design-system/Pagination/index.d.ts.map +1 -1
  44. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts +1 -0
  45. package/dist/design-system/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  46. package/dist/design-system/Select/Select.d.ts.map +1 -1
  47. package/dist/design-system/Steps/Steps.d.ts +1 -2
  48. package/dist/design-system/Steps/Steps.d.ts.map +1 -1
  49. package/dist/design-system/TableUI/Table.d.ts.map +1 -1
  50. package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
  51. package/dist/design-system/Tag/index.d.ts +2 -2
  52. package/dist/design-system/Tag/index.d.ts.map +1 -1
  53. package/dist/design-system/Tree/Tree.d.ts +24 -0
  54. package/dist/design-system/Tree/Tree.d.ts.map +1 -1
  55. package/dist/design-system/_shared_/Combobox/styles.d.ts +3 -0
  56. package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -1
  57. package/dist/design-system/constants.d.ts +2 -2
  58. package/dist/design-system/constants.d.ts.map +1 -1
  59. package/dist/design-system/index.d.ts +1 -0
  60. package/dist/design-system/index.d.ts.map +1 -1
  61. package/dist/development/Banner/Banner.d.ts +1 -2
  62. package/dist/development/Banner/Banner.d.ts.map +1 -1
  63. package/dist/development/Toolbar/Toolbar.d.ts +15 -0
  64. package/dist/development/Toolbar/Toolbar.d.ts.map +1 -0
  65. package/dist/development/Toolbar/index.d.ts +2 -0
  66. package/dist/development/Toolbar/index.d.ts.map +1 -0
  67. package/dist/development/index.d.ts +3 -2
  68. package/dist/development/index.d.ts.map +1 -1
  69. package/dist/development.js +379 -249
  70. package/dist/development.js.map +1 -1
  71. package/dist/dubois-colors.less +203 -140
  72. package/dist/flags.d.ts +1 -2
  73. package/dist/flags.d.ts.map +1 -1
  74. package/dist/index-dark.css +289 -289
  75. package/dist/index.css +128 -128
  76. package/dist/index.js +672 -244
  77. package/dist/index.js.map +1 -1
  78. package/dist/rollup/less.d.ts.map +1 -1
  79. package/dist/test-utils/enzyme/selectEvent.d.ts +5 -0
  80. package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
  81. package/dist/test-utils/enzyme/table.d.ts.map +1 -1
  82. package/dist/test-utils/enzyme/utils.d.ts +6 -0
  83. package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
  84. package/dist/test-utils/enzyme.js +34 -15
  85. package/dist/test-utils/enzyme.js.map +1 -1
  86. package/dist/test-utils/rtl/selectEvent.d.ts +5 -0
  87. package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
  88. package/dist/test-utils/rtl.js +16 -1
  89. package/dist/test-utils/rtl.js.map +1 -1
  90. package/dist/theme/_generated/PrimitiveColors.d.ts +3 -0
  91. package/dist/theme/_generated/PrimitiveColors.d.ts.map +1 -0
  92. package/dist/theme/_generated/SemanticColors-Dark.d.ts +3 -0
  93. package/dist/theme/_generated/SemanticColors-Dark.d.ts.map +1 -0
  94. package/dist/theme/_generated/SemanticColors-Light.d.ts +3 -0
  95. package/dist/theme/_generated/SemanticColors-Light.d.ts.map +1 -0
  96. package/dist/theme/_generated/ValidPrimitiveColors.d.ts +56 -0
  97. package/dist/theme/_generated/ValidPrimitiveColors.d.ts.map +1 -0
  98. package/dist/theme/_generated/ValidSemanticColors.d.ts +99 -0
  99. package/dist/theme/_generated/ValidSemanticColors.d.ts.map +1 -0
  100. package/dist/theme/colors.d.ts +62 -141
  101. package/dist/theme/colors.d.ts.map +1 -1
  102. package/package.json +13 -15
  103. package/dist/DropdownMenu-06a1051f.js.map +0 -1
  104. package/dist/theme/colorList.d.ts +0 -130
  105. package/dist/theme/colorList.d.ts.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import { css } from '@emotion/react';
2
2
  import React__default, { useState, useEffect, forwardRef } from 'react';
3
- import { u as useDesignSystemTheme, f as Input, B as Button, U as CursorIcon, T as Typography, Y as FaceSmileIcon, X as FaceNeutralIcon, V as FaceFrownIcon, C as CloseIcon, h as CheckIcon, q as ChevronLeftIcon, b as ChevronRightIcon, a3 as dropdownItemStyles, c as useDesignSystemContext, n as dropdownContentStyles, a4 as dropdownSeparatorStyles, Z as MegaphoneIcon, l as DangerIcon } from './DropdownMenu-06a1051f.js';
4
- import { jsxs, jsx, Fragment } from '@emotion/react/jsx-runtime';
5
- import * as RadixSlider from '@radix-ui/react-slider';
3
+ import { a2 as MegaphoneIcon, W as WarningIcon, l as DangerIcon, u as useDesignSystemTheme, B as Button$1, C as CloseIcon, d as Tooltip, T as Typography, a8 as primitiveColors, f as Input, _ as CursorIcon, a1 as FaceSmileIcon, a0 as FaceNeutralIcon, $ as FaceFrownIcon, h as CheckIcon, r as ChevronLeftIcon, b as ChevronRightIcon, a9 as dropdownItemStyles, c as useDesignSystemContext, n as dropdownContentStyles, aa as dropdownSeparatorStyles } from './DropdownMenu-dbeef1b7.js';
4
+ import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
6
5
  import { ContextMenu as ContextMenu$1, ContextMenuTrigger, ContextMenuItemIndicator, ContextMenuGroup, ContextMenuRadioGroup, ContextMenuArrow, ContextMenuSub, ContextMenuSubTrigger, ContextMenuPortal, ContextMenuContent, ContextMenuSubContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator } from '@radix-ui/react-context-menu';
6
+ import * as RadixSlider from '@radix-ui/react-slider';
7
+ import * as RadixToolbar from '@radix-ui/react-toolbar';
7
8
  import 'antd';
8
9
  import '@radix-ui/react-dropdown-menu';
9
- import 'chroma-js';
10
10
  import 'lodash/isNil';
11
11
  import 'lodash/endsWith';
12
12
  import 'lodash/isBoolean';
@@ -18,6 +18,166 @@ import '@emotion/unitless';
18
18
  import '@ant-design/icons';
19
19
 
20
20
  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)."; }
21
+ const {
22
+ Text,
23
+ Paragraph
24
+ } = Typography;
25
+ const BANNER_MIN_HEIGHT = 68;
26
+ // Max height will allow 2 lines of description (3 lines total)
27
+ const BANNER_MAX_HEIGHT = 82;
28
+ var _ref$1 = process.env.NODE_ENV === "production" ? {
29
+ name: "1te1whx",
30
+ styles: "margin-left:auto;display:flex;align-items:center"
31
+ } : {
32
+ name: "13c4h59-rightContainer",
33
+ styles: "margin-left:auto;display:flex;align-items:center;label:rightContainer;",
34
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$7
35
+ };
36
+ const useStyles = (props, theme) => {
37
+ const bannerLevelToBannerColors = {
38
+ info: {
39
+ backgroundDefaultColor: theme.colors.actionPrimaryBackgroundDefault,
40
+ actionButtonBackgroundHoverColor: theme.colors.actionPrimaryBackgroundHover,
41
+ actionButtonBackgroundPressColor: theme.colors.actionPrimaryBackgroundPress,
42
+ textColor: theme.colors.actionPrimaryTextDefault,
43
+ textHoverColor: theme.colors.actionPrimaryTextHover,
44
+ textPressColor: theme.colors.actionPrimaryTextPress
45
+ },
46
+ // TODO (PLAT-80558, zack.brody) Update hover and press states once we have colors for these
47
+ warning: {
48
+ backgroundDefaultColor: theme.colors.tagLemon,
49
+ actionButtonBackgroundHoverColor: theme.colors.tagLemon,
50
+ actionButtonBackgroundPressColor: theme.colors.tagLemon,
51
+ textColor: primitiveColors.grey800,
52
+ textHoverColor: primitiveColors.grey800,
53
+ textPressColor: primitiveColors.grey800
54
+ },
55
+ error: {
56
+ backgroundDefaultColor: theme.colors.actionDangerPrimaryBackgroundDefault,
57
+ actionButtonBackgroundHoverColor: theme.colors.actionDangerPrimaryBackgroundHover,
58
+ actionButtonBackgroundPressColor: theme.colors.actionDangerPrimaryBackgroundPress,
59
+ textColor: theme.colors.actionPrimaryTextDefault,
60
+ textHoverColor: theme.colors.actionPrimaryTextHover,
61
+ textPressColor: theme.colors.actionPrimaryTextPress
62
+ }
63
+ };
64
+ const colorScheme = bannerLevelToBannerColors[props.level];
65
+ return {
66
+ 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;")),
67
+ 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;")),
68
+ 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;" + (process.env.NODE_ENV === "production" ? "" : ";label:mainContent;")),
69
+ messageTextBlock: /*#__PURE__*/css("&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:messageTextBlock;")),
70
+ descriptionBlock: /*#__PURE__*/css("&&{color:", colorScheme.textColor, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:descriptionBlock;")),
71
+ rightContainer: _ref$1,
72
+ closeIconContainer: /*#__PURE__*/css("display:flex;padding:", theme.spacing.xs, "px ", theme.spacing.xs, "px ", theme.spacing.xs, "px ", theme.spacing.xs, "px;margin-left:", theme.spacing.xs, "px;box-sizing:border-box;line-height:0;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIconContainer;")),
73
+ closeIcon: /*#__PURE__*/css("color:", colorScheme.textColor, "!important;cursor:pointer;" + (process.env.NODE_ENV === "production" ? "" : ";label:closeIcon;")),
74
+ actionButtonContainer: /*#__PURE__*/css("margin-right:", theme.spacing.xs, "px;" + (process.env.NODE_ENV === "production" ? "" : ";label:actionButtonContainer;")),
75
+ // Override design system colors to show the use the action text color for text and border.
76
+ // Also overrides text for links.
77
+ 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;"))
78
+ };
79
+ };
80
+ const levelToIconMap = {
81
+ info: jsx(MegaphoneIcon, {
82
+ "data-testid": "level-info-icon"
83
+ }),
84
+ warning: jsx(WarningIcon, {
85
+ "data-testid": "level-warning-icon"
86
+ }),
87
+ error: jsx(DangerIcon, {
88
+ "data-testid": "level-error-icon"
89
+ })
90
+ };
91
+ const Banner = props => {
92
+ const {
93
+ level,
94
+ message,
95
+ description,
96
+ ctaText,
97
+ onAccept,
98
+ closable,
99
+ onClose,
100
+ closeButtonAriaLabel
101
+ } = props;
102
+ const [closed, setClosed] = React__default.useState(false);
103
+ const [showingDescriptionEllipses, setShowingDescriptionEllipses] = React__default.useState(false);
104
+ const [showingMessageEllipses, setShowingMessageEllipses] = React__default.useState(false);
105
+ const {
106
+ theme
107
+ } = useDesignSystemTheme();
108
+ const styles = useStyles(props, theme);
109
+ const actionButton = onAccept && ctaText ? jsx("div", {
110
+ css: styles.actionButtonContainer,
111
+ children: jsx(Button$1, {
112
+ onClick: onAccept,
113
+ css: styles.actionButton,
114
+ size: "small",
115
+ children: ctaText
116
+ })
117
+ }) : null;
118
+ const close = closable !== false ? jsx("div", {
119
+ css: styles.closeIconContainer,
120
+ children: jsx("a", {
121
+ onClick: () => {
122
+ if (onClose) {
123
+ onClose();
124
+ }
125
+ setClosed(true);
126
+ },
127
+ "aria-label": closeButtonAriaLabel !== null && closeButtonAriaLabel !== void 0 ? closeButtonAriaLabel : 'Close',
128
+ "data-testid": "banner-dismiss",
129
+ children: jsx(CloseIcon, {
130
+ css: styles.closeIcon
131
+ })
132
+ })
133
+ }) : null;
134
+ const messageElement = jsx(Text, {
135
+ size: "md",
136
+ ellipsis: {
137
+ onEllipsis: setShowingMessageEllipses
138
+ },
139
+ bold: true,
140
+ css: styles.messageTextBlock,
141
+ children: message
142
+ });
143
+ const descriptionElement = jsx(Paragraph, {
144
+ ellipsis: {
145
+ rows: 2,
146
+ onEllipsis: setShowingDescriptionEllipses
147
+ },
148
+ withoutMargins: true,
149
+ css: styles.descriptionBlock,
150
+ children: description
151
+ });
152
+ const descriptionElementWithConditionalTooltip = showingDescriptionEllipses ? jsx(Tooltip, {
153
+ title: description,
154
+ placement: "bottom",
155
+ children: descriptionElement
156
+ }) : descriptionElement;
157
+ return jsx(Fragment, {
158
+ children: !closed && jsxs("div", {
159
+ css: styles.banner,
160
+ className: "banner",
161
+ "data-testid": props['data-testid'],
162
+ children: [jsx("div", {
163
+ css: styles.iconContainer,
164
+ children: levelToIconMap[level]
165
+ }), jsxs("div", {
166
+ css: styles.mainContent,
167
+ children: [showingMessageEllipses ? jsx(Tooltip, {
168
+ title: message,
169
+ placement: "bottom",
170
+ children: messageElement
171
+ }) : messageElement, description && descriptionElementWithConditionalTooltip]
172
+ }), jsxs("div", {
173
+ css: styles.rightContainer,
174
+ children: [actionButton, close]
175
+ })]
176
+ })
177
+ });
178
+ };
179
+
180
+ 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
181
  const chatInputStyles = {
22
182
  container: process.env.NODE_ENV === "production" ? {
23
183
  name: "ets5eq",
@@ -25,7 +185,7 @@ const chatInputStyles = {
25
185
  } : {
26
186
  name: "t01lrg-container",
27
187
  styles: "background-color:var(--background-primary);padding:var(--spacing-sm);position:relative;label:container;",
28
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$7
188
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
29
189
  },
30
190
  suggestionButtons: process.env.NODE_ENV === "production" ? {
31
191
  name: "zsd1o9",
@@ -33,7 +193,7 @@ const chatInputStyles = {
33
193
  } : {
34
194
  name: "3tz5r6-suggestionButtons",
35
195
  styles: "display:flex;gap:var(--spacing-sm);margin-bottom:var(--spacing-sm);label:suggestionButtons;",
36
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$7
196
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
37
197
  },
38
198
  textArea: process.env.NODE_ENV === "production" ? {
39
199
  name: "ge1ym1",
@@ -41,7 +201,7 @@ const chatInputStyles = {
41
201
  } : {
42
202
  name: "hcagyb-textArea",
43
203
  styles: "min-width:100%;max-height:150px !important;label:textArea;",
44
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$7
204
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
45
205
  },
46
206
  button: process.env.NODE_ENV === "production" ? {
47
207
  name: "1c60og2",
@@ -49,7 +209,7 @@ const chatInputStyles = {
49
209
  } : {
50
210
  name: "1h7quuz-button",
51
211
  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__$7
212
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
53
213
  }
54
214
  };
55
215
  const ChatInput = _ref => {
@@ -94,7 +254,7 @@ const ChatInput = _ref => {
94
254
  }
95
255
  },
96
256
  ...textAreaProps
97
- }), jsx(Button, {
257
+ }), jsx(Button$1, {
98
258
  size: "small",
99
259
  css: chatInputStyles.button,
100
260
  icon: jsx(CursorIcon, {}),
@@ -104,7 +264,7 @@ const ChatInput = _ref => {
104
264
  };
105
265
  var ChatInput$1 = ChatInput;
106
266
 
107
- 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)."; }
267
+ 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
268
  const snippetStyles = {
109
269
  container: process.env.NODE_ENV === "production" ? {
110
270
  name: "emyse7",
@@ -112,7 +272,7 @@ const snippetStyles = {
112
272
  } : {
113
273
  name: "15luuk2-container",
114
274
  styles: "margin:var(--spacing-md) 0;label:container;",
115
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
275
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
116
276
  },
117
277
  header: process.env.NODE_ENV === "production" ? {
118
278
  name: "dtwnbh",
@@ -120,7 +280,7 @@ const snippetStyles = {
120
280
  } : {
121
281
  name: "1o07vd-header",
122
282
  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__$6
283
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
124
284
  },
125
285
  buttonSvg: process.env.NODE_ENV === "production" ? {
126
286
  name: "s8x62f",
@@ -128,7 +288,7 @@ const snippetStyles = {
128
288
  } : {
129
289
  name: "g0ytlm-buttonSvg",
130
290
  styles: "svg{color:var(--color-grey300);};label:buttonSvg;",
131
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$6
291
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
132
292
  },
133
293
  code: process.env.NODE_ENV === "production" ? {
134
294
  name: "u1l3ou",
@@ -136,7 +296,7 @@ const snippetStyles = {
136
296
  } : {
137
297
  name: "gdk9wh-code",
138
298
  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__$6
299
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
140
300
  }
141
301
  };
142
302
  const CodeSnippet = _ref => {
@@ -174,7 +334,7 @@ const CodeSnippet = _ref => {
174
334
  };
175
335
  var CodeSnippet$1 = CodeSnippet;
176
336
 
177
- 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)."; }
337
+ 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
338
  const feedbackStyles = {
179
339
  container: process.env.NODE_ENV === "production" ? {
180
340
  name: "1laz9o6",
@@ -182,7 +342,7 @@ const feedbackStyles = {
182
342
  } : {
183
343
  name: "1dbf7uj-container",
184
344
  styles: "display:flex;justify-content:space-between;align-items:flex-end;label:container;",
185
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
345
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
186
346
  },
187
347
  feedbackPrompt: process.env.NODE_ENV === "production" ? {
188
348
  name: "1hsyf68",
@@ -190,7 +350,7 @@ const feedbackStyles = {
190
350
  } : {
191
351
  name: "1yi757f-feedbackPrompt",
192
352
  styles: "display:flex;flex-direction:column;gap:var(--spacing-sm);label:feedbackPrompt;",
193
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
353
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
194
354
  },
195
355
  feedbackOptions: process.env.NODE_ENV === "production" ? {
196
356
  name: "1s3radb",
@@ -198,7 +358,7 @@ const feedbackStyles = {
198
358
  } : {
199
359
  name: "125q18r-feedbackOptions",
200
360
  styles: "display:flex;gap:var(--spacing-sm);label:feedbackOptions;",
201
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$5
361
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
202
362
  }
203
363
  };
204
364
  const Feedback = _ref => {
@@ -227,21 +387,21 @@ const Feedback = _ref => {
227
387
  children: "Was this response:"
228
388
  }), jsxs("div", {
229
389
  css: feedbackStyles.feedbackOptions,
230
- children: [jsx(Button, {
390
+ children: [jsx(Button$1, {
231
391
  icon: jsx(FaceSmileIcon, {}),
232
392
  onClick: () => {
233
393
  onFeedback('Better');
234
394
  setIsVisible(false);
235
395
  },
236
396
  children: "Better"
237
- }), jsx(Button, {
397
+ }), jsx(Button$1, {
238
398
  icon: jsx(FaceNeutralIcon, {}),
239
399
  onClick: () => {
240
400
  onFeedback('Same');
241
401
  setIsVisible(false);
242
402
  },
243
403
  children: "Same"
244
- }), jsx(Button, {
404
+ }), jsx(Button$1, {
245
405
  icon: jsx(FaceFrownIcon, {}),
246
406
  onClick: () => {
247
407
  onFeedback('Worse');
@@ -250,7 +410,7 @@ const Feedback = _ref => {
250
410
  children: "Worse"
251
411
  })]
252
412
  })]
253
- }), jsx(Button, {
413
+ }), jsx(Button$1, {
254
414
  icon: jsx(CloseIcon, {}),
255
415
  onClick: () => setIsVisible(false)
256
416
  })]
@@ -292,7 +452,7 @@ const Message = _ref => {
292
452
  };
293
453
  var Message$1 = Message;
294
454
 
295
- 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)."; }
455
+ 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
456
  const buttonStyles = {
297
457
  container: process.env.NODE_ENV === "production" ? {
298
458
  name: "f9548c",
@@ -300,7 +460,7 @@ const buttonStyles = {
300
460
  } : {
301
461
  name: "12rixe4-container",
302
462
  styles: "position:relative;display:inline-block;width:max-content;label:container;",
303
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
463
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
304
464
  },
305
465
  checkIcon: process.env.NODE_ENV === "production" ? {
306
466
  name: "441ysl",
@@ -308,7 +468,7 @@ const buttonStyles = {
308
468
  } : {
309
469
  name: "hmgfz4-checkIcon",
310
470
  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__$4
471
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
312
472
  }
313
473
  };
314
474
  const MessageActionButton = props => {
@@ -340,7 +500,7 @@ const MessageActionButton = props => {
340
500
  style: {
341
501
  ['--checkmark-color']: theme.colors.green500
342
502
  },
343
- children: [jsx(Button, {
503
+ children: [jsx(Button$1, {
344
504
  size: "small",
345
505
  ...props,
346
506
  onClick: handleClick,
@@ -380,7 +540,7 @@ const MessageBody = _ref => {
380
540
  };
381
541
  var MessageBody$1 = MessageBody;
382
542
 
383
- 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)."; }
543
+ 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
544
  const headerStyles = {
385
545
  container: process.env.NODE_ENV === "production" ? {
386
546
  name: "30lgt6",
@@ -388,7 +548,7 @@ const headerStyles = {
388
548
  } : {
389
549
  name: "10tss9b-container",
390
550
  styles: "display:flex;justify-content:space-between;align-items:center;position:relative;label:container;",
391
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
551
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
392
552
  },
393
553
  leftContent: process.env.NODE_ENV === "production" ? {
394
554
  name: "sz7nmf",
@@ -396,7 +556,7 @@ const headerStyles = {
396
556
  } : {
397
557
  name: "11wiry4-leftContent",
398
558
  styles: "display:flex;align-items:center;gap:var(--spacing-sm);label:leftContent;",
399
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
559
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
400
560
  },
401
561
  rightContent: process.env.NODE_ENV === "production" ? {
402
562
  name: "s5xdrg",
@@ -404,7 +564,7 @@ const headerStyles = {
404
564
  } : {
405
565
  name: "6oh64j-rightContent",
406
566
  styles: "display:flex;align-items:center;label:rightContent;",
407
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
567
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
408
568
  },
409
569
  avatar: /*#__PURE__*/css({
410
570
  position: 'absolute',
@@ -454,7 +614,7 @@ const MessageHeader = _ref => {
454
614
  };
455
615
  var MessageHeader$1 = MessageHeader;
456
616
 
457
- 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)."; }
617
+ 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
618
  const paginationStyles = {
459
619
  container: process.env.NODE_ENV === "production" ? {
460
620
  name: "1lyitb8",
@@ -462,7 +622,7 @@ const paginationStyles = {
462
622
  } : {
463
623
  name: "tx606a-container",
464
624
  styles: "display:flex;align-items:center;justify-items:center;gap:var(--spacing-sm);label:container;",
465
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
625
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
466
626
  },
467
627
  button: process.env.NODE_ENV === "production" ? {
468
628
  name: "waw0s4",
@@ -470,7 +630,7 @@ const paginationStyles = {
470
630
  } : {
471
631
  name: "18u25xw-button",
472
632
  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__$2
633
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
474
634
  }
475
635
  };
476
636
  const MessagePagination = _ref => {
@@ -526,111 +686,7 @@ const ChatUI = {
526
686
  ChatInput: ChatInput$1
527
687
  };
528
688
 
529
- 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)."; }
530
- var _ref$1 = process.env.NODE_ENV === "production" ? {
531
- name: "1tciq3q",
532
- 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
- } : {
534
- name: "18im58f-getRootStyles",
535
- 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__$1
537
- };
538
- const getRootStyles = () => {
539
- return _ref$1;
540
- };
541
- const Root$1 = /*#__PURE__*/forwardRef((props, ref) => {
542
- return jsx(RadixSlider.Root, {
543
- css: getRootStyles(),
544
- ...props,
545
- ref: ref
546
- });
547
- });
548
- const getTrackStyles = theme => {
549
- return /*#__PURE__*/css({
550
- backgroundColor: theme.colors.grey100,
551
- position: 'relative',
552
- flexGrow: 1,
553
- borderRadius: 9999,
554
- '&[data-orientation="vertical"]': {
555
- width: 3
556
- },
557
- '&[data-orientation="horizontal"]': {
558
- height: 3
559
- }
560
- }, process.env.NODE_ENV === "production" ? "" : ";label:getTrackStyles;");
561
- };
562
- const Track = /*#__PURE__*/forwardRef((props, ref) => {
563
- const {
564
- theme
565
- } = useDesignSystemTheme();
566
- return jsx(RadixSlider.Track, {
567
- css: getTrackStyles(theme),
568
- ...props,
569
- ref: ref
570
- });
571
- });
572
- const getRangeStyles = theme => {
573
- return /*#__PURE__*/css({
574
- backgroundColor: theme.colors.primary,
575
- position: 'absolute',
576
- borderRadius: 9999,
577
- height: '100%',
578
- '&[data-disabled]': {
579
- backgroundColor: theme.colors.grey100
580
- }
581
- }, process.env.NODE_ENV === "production" ? "" : ";label:getRangeStyles;");
582
- };
583
- const Range = /*#__PURE__*/forwardRef((props, ref) => {
584
- const {
585
- theme
586
- } = useDesignSystemTheme();
587
- return jsx(RadixSlider.Range, {
588
- css: getRangeStyles(theme),
589
- ...props,
590
- ref: ref
591
- });
592
- });
593
- const getThumbStyles = theme => {
594
- return /*#__PURE__*/css({
595
- display: 'block',
596
- width: 20,
597
- height: 20,
598
- backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
599
- boxShadow: `0 2px 4px 0 ${theme.colors.grey400}`,
600
- borderRadius: 10,
601
- outline: 'none',
602
- '&:hover': {
603
- backgroundColor: theme.colors.actionPrimaryBackgroundHover
604
- },
605
- '&:focus': {
606
- backgroundColor: theme.colors.actionPrimaryBackgroundPress
607
- },
608
- '&[data-disabled]': {
609
- backgroundColor: theme.colors.grey200,
610
- boxShadow: 'none'
611
- }
612
- }, process.env.NODE_ENV === "production" ? "" : ";label:getThumbStyles;");
613
- };
614
- const Thumb = /*#__PURE__*/forwardRef((props, ref) => {
615
- const {
616
- theme
617
- } = useDesignSystemTheme();
618
- return jsx(RadixSlider.Thumb, {
619
- css: getThumbStyles(theme),
620
- ...props,
621
- ref: ref
622
- });
623
- });
624
-
625
- var Slider = /*#__PURE__*/Object.freeze({
626
- __proto__: null,
627
- Range: Range,
628
- Root: Root$1,
629
- Thumb: Thumb,
630
- Track: Track
631
- });
632
-
633
- const Root = ContextMenu$1;
689
+ const Root$2 = ContextMenu$1;
634
690
  const Trigger = ContextMenuTrigger;
635
691
  const ItemIndicator = ContextMenuItemIndicator;
636
692
  const Group = ContextMenuGroup;
@@ -786,7 +842,7 @@ const Hint = _ref8 => {
786
842
  children: children
787
843
  });
788
844
  };
789
- const Separator = () => {
845
+ const Separator$1 = () => {
790
846
  const {
791
847
  theme
792
848
  } = useDesignSystemTheme();
@@ -799,7 +855,7 @@ const itemIndicatorStyles = theme => /*#__PURE__*/css({
799
855
  paddingRight: theme.spacing.xs
800
856
  }, process.env.NODE_ENV === "production" ? "" : ";label:itemIndicatorStyles;");
801
857
  const ContextMenu = {
802
- Root,
858
+ Root: Root$2,
803
859
  Trigger,
804
860
  Label,
805
861
  Item,
@@ -808,7 +864,7 @@ const ContextMenu = {
808
864
  CheckboxItem,
809
865
  RadioItem,
810
866
  Arrow,
811
- Separator,
867
+ Separator: Separator$1,
812
868
  Sub,
813
869
  SubTrigger,
814
870
  SubContent,
@@ -817,127 +873,201 @@ const ContextMenu = {
817
873
  };
818
874
 
819
875
  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
876
  var _ref = process.env.NODE_ENV === "production" ? {
828
- name: "1te1whx",
829
- styles: "margin-left:auto;display:flex;align-items:center"
877
+ name: "1tciq3q",
878
+ 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;}"
830
879
  } : {
831
- name: "13c4h59-rightContainer",
832
- styles: "margin-left:auto;display:flex;align-items:center;label:rightContainer;",
880
+ name: "18im58f-getRootStyles",
881
+ 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;",
833
882
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
834
883
  };
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
884
+ const getRootStyles$1 = () => {
885
+ return _ref;
886
+ };
887
+ const Root$1 = /*#__PURE__*/forwardRef((props, ref) => {
888
+ return jsx(RadixSlider.Root, {
889
+ css: getRootStyles$1(),
890
+ ...props,
891
+ ref: ref
892
+ });
893
+ });
894
+ const getTrackStyles = theme => {
895
+ return /*#__PURE__*/css({
896
+ backgroundColor: theme.colors.grey100,
897
+ position: 'relative',
898
+ flexGrow: 1,
899
+ borderRadius: 9999,
900
+ '&[data-orientation="vertical"]': {
901
+ width: 3
842
902
  },
843
- error: {
844
- backgroundDefaultColor: theme.colors.actionDangerPrimaryBackgroundDefault,
845
- backgroundHoverColor: theme.colors.actionDangerPrimaryBackgroundHover,
846
- backgroundPressColor: theme.colors.actionDangerPrimaryBackgroundPress,
847
- textColor: theme.colors.actionPrimaryTextDefault
903
+ '&[data-orientation="horizontal"]': {
904
+ height: 3
848
905
  }
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
- };
906
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getTrackStyles;");
864
907
  };
865
- const levelToIconMap = {
866
- info: jsx(MegaphoneIcon, {
867
- "data-testid": "level-info-icon"
868
- }),
869
- error: jsx(DangerIcon, {
870
- "data-testid": "level-error-icon"
871
- })
908
+ const Track = /*#__PURE__*/forwardRef((props, ref) => {
909
+ const {
910
+ theme
911
+ } = useDesignSystemTheme();
912
+ return jsx(RadixSlider.Track, {
913
+ css: getTrackStyles(theme),
914
+ ...props,
915
+ ref: ref
916
+ });
917
+ });
918
+ const getRangeStyles = theme => {
919
+ return /*#__PURE__*/css({
920
+ backgroundColor: theme.colors.primary,
921
+ position: 'absolute',
922
+ borderRadius: 9999,
923
+ height: '100%',
924
+ '&[data-disabled]': {
925
+ backgroundColor: theme.colors.grey100
926
+ }
927
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getRangeStyles;");
872
928
  };
873
- const Banner = props => {
929
+ const Range = /*#__PURE__*/forwardRef((props, ref) => {
874
930
  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);
931
+ theme
932
+ } = useDesignSystemTheme();
933
+ return jsx(RadixSlider.Range, {
934
+ css: getRangeStyles(theme),
935
+ ...props,
936
+ ref: ref
937
+ });
938
+ });
939
+ const getThumbStyles = theme => {
940
+ return /*#__PURE__*/css({
941
+ display: 'block',
942
+ width: 20,
943
+ height: 20,
944
+ backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
945
+ boxShadow: `0 2px 4px 0 ${theme.colors.grey400}`,
946
+ borderRadius: 10,
947
+ outline: 'none',
948
+ '&:hover': {
949
+ backgroundColor: theme.colors.actionPrimaryBackgroundHover
950
+ },
951
+ '&:focus': {
952
+ backgroundColor: theme.colors.actionPrimaryBackgroundPress
953
+ },
954
+ '&[data-disabled]': {
955
+ backgroundColor: theme.colors.grey200,
956
+ boxShadow: 'none'
957
+ }
958
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getThumbStyles;");
959
+ };
960
+ const Thumb = /*#__PURE__*/forwardRef((props, ref) => {
885
961
  const {
886
962
  theme
887
963
  } = useDesignSystemTheme();
888
- const styles = useStyles(props, theme);
889
- const actionButton = onAccept && ctaText ? jsx(Button, {
890
- onClick: onAccept,
891
- css: styles.actionButton,
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
- })
964
+ return jsx(RadixSlider.Thumb, {
965
+ css: getThumbStyles(theme),
966
+ ...props,
967
+ ref: ref
968
+ });
969
+ });
970
+
971
+ var Slider = /*#__PURE__*/Object.freeze({
972
+ __proto__: null,
973
+ Range: Range,
974
+ Root: Root$1,
975
+ Thumb: Thumb,
976
+ Track: Track
977
+ });
978
+
979
+ const getRootStyles = theme => {
980
+ return /*#__PURE__*/css({
981
+ alignItems: 'center',
982
+ backgroundColor: theme.colors.backgroundSecondary,
983
+ border: `1px solid ${theme.colors.borderDecorative}`,
984
+ borderRadius: theme.borders.borderRadiusMd,
985
+ boxShadow: theme.general.shadowLow,
986
+ display: 'flex',
987
+ gap: theme.spacing.md,
988
+ width: 'max-content',
989
+ padding: theme.spacing.sm
990
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getRootStyles;");
991
+ };
992
+ const Root = /*#__PURE__*/forwardRef((props, ref) => {
993
+ const {
994
+ theme
995
+ } = useDesignSystemTheme();
996
+ return jsx(RadixToolbar.Root, {
997
+ css: getRootStyles(theme),
998
+ ...props,
999
+ ref: ref
1000
+ });
1001
+ });
1002
+ const Button = /*#__PURE__*/forwardRef((props, ref) => {
1003
+ return jsx(RadixToolbar.Button, {
1004
+ ...props,
1005
+ ref: ref
1006
+ });
1007
+ });
1008
+ const getSeparatorStyles = theme => {
1009
+ return /*#__PURE__*/css({
1010
+ alignSelf: 'stretch',
1011
+ backgroundColor: theme.colors.borderDecorative,
1012
+ width: 1
1013
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getSeparatorStyles;");
1014
+ };
1015
+ const Separator = /*#__PURE__*/forwardRef((props, ref) => {
1016
+ const {
1017
+ theme
1018
+ } = useDesignSystemTheme();
1019
+ return jsx(RadixToolbar.Separator, {
1020
+ css: getSeparatorStyles(theme),
1021
+ ...props,
1022
+ ref: ref
1023
+ });
1024
+ });
1025
+ const Link = /*#__PURE__*/forwardRef((props, ref) => {
1026
+ return jsx(RadixToolbar.Link, {
1027
+ ...props,
1028
+ ref: ref
939
1029
  });
1030
+ });
1031
+ const ToggleGroup = /*#__PURE__*/forwardRef((props, ref) => {
1032
+ return jsx(RadixToolbar.ToggleGroup, {
1033
+ ...props,
1034
+ ref: ref
1035
+ });
1036
+ });
1037
+ const getToggleItemStyles = theme => {
1038
+ return /*#__PURE__*/css({
1039
+ background: 'none',
1040
+ color: theme.colors.textPrimary,
1041
+ border: 'none',
1042
+ cursor: 'pointer',
1043
+ '&:hover': {
1044
+ color: theme.colors.actionDefaultTextHover
1045
+ },
1046
+ '&[data-state="on"]': {
1047
+ color: theme.colors.actionDefaultTextPress
1048
+ }
1049
+ }, process.env.NODE_ENV === "production" ? "" : ";label:getToggleItemStyles;");
940
1050
  };
1051
+ const ToggleItem = /*#__PURE__*/forwardRef((props, ref) => {
1052
+ const {
1053
+ theme
1054
+ } = useDesignSystemTheme();
1055
+ return jsx(RadixToolbar.ToggleItem, {
1056
+ css: getToggleItemStyles(theme),
1057
+ ...props,
1058
+ ref: ref
1059
+ });
1060
+ });
1061
+
1062
+ var Toolbar = /*#__PURE__*/Object.freeze({
1063
+ __proto__: null,
1064
+ Button: Button,
1065
+ Link: Link,
1066
+ Root: Root,
1067
+ Separator: Separator,
1068
+ ToggleGroup: ToggleGroup,
1069
+ ToggleItem: ToggleItem
1070
+ });
941
1071
 
942
- export { Arrow, BANNER_MAX_HEIGHT, BANNER_MIN_HEIGHT, Banner, ChatUI, CheckboxItem, Content, ContextMenu, Group, Hint, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root, Separator, Slider, Sub, SubContent, SubTrigger, Trigger, itemIndicatorStyles };
1072
+ export { Arrow, BANNER_MAX_HEIGHT, BANNER_MIN_HEIGHT, Banner, ChatUI, CheckboxItem, Content, ContextMenu, Group, Hint, Item, ItemIndicator, Label, RadioGroup, RadioItem, Root$2 as Root, Separator$1 as Separator, Slider, Sub, SubContent, SubTrigger, Toolbar, Trigger, itemIndicatorStyles };
943
1073
  //# sourceMappingURL=development.js.map