@databricks/design-system 2.0.6 → 2.0.8
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/AGENTS.md +239 -166
- package/CHANGELOG.md +36 -0
- package/dist/{RHFControlledTypeaheadComboboxV2-Ct9x3rC1.js → RHFControlledTypeaheadComboboxV2-Boee19c1.js} +3 -3
- package/dist/{RHFControlledTypeaheadComboboxV2-Ct9x3rC1.js.map → RHFControlledTypeaheadComboboxV2-Boee19c1.js.map} +1 -1
- package/dist/{WizardStepContentWrapper-6YTjeEaA.js → WizardStepContentWrapper-DfErft8z.js} +201 -257
- package/dist/WizardStepContentWrapper-DfErft8z.js.map +1 -0
- package/dist/dubois-colors.less +3 -1
- package/dist/icon-metadata.json +5 -0
- package/dist/{index-DiRpSwH2.js → index-CUzS-Vjx.js} +121 -109
- package/dist/index-CUzS-Vjx.js.map +1 -0
- package/dist/index-dark.css +136 -1
- package/dist/index-dark.mitigated.css +164 -16
- package/dist/index.css +183 -28
- package/dist/index.js +2 -2
- package/dist/index.mitigated.css +211 -43
- package/dist/patterns.js +1 -1
- package/dist-types/design-system/Alert/Alert.d.ts +21 -4
- package/dist-types/design-system/Button/Button.d.ts +2 -1
- package/dist-types/design-system/Icon/__generated/icons/SlidesIcon.d.ts +4 -0
- package/dist-types/design-system/Icon/__generated/icons/index.d.ts +1 -0
- package/dist-types/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +0 -2
- package/dist-types/design-system/index.d.ts +0 -1
- package/dist-types/design-system/utils/safex.d.ts +4 -2
- package/dist-types/theme/_generated/ValidSemanticColors.d.ts +1 -0
- package/dist-types/theme/generalVariables.d.ts +0 -1
- package/package.json +5 -4
- package/setup.mjs +586 -0
- package/dist/WizardStepContentWrapper-6YTjeEaA.js.map +0 -1
- package/dist/index-DiRpSwH2.js.map +0 -1
- package/dist-types/design-system/LegacyTooltip/LegacyTooltip.d.ts +0 -47
- package/dist-types/design-system/LegacyTooltip/index.d.ts +0 -1
package/dist/dubois-colors.less
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
@dubois-neutral650: #424242;
|
|
57
57
|
@dubois-neutral700: #262626;
|
|
58
58
|
@dubois-neutral800: #161616;
|
|
59
|
-
@dubois-neutralWarm050: #
|
|
59
|
+
@dubois-neutralWarm050: #FCFBF9;
|
|
60
60
|
@dubois-orange: #FF3621;
|
|
61
61
|
@dubois-pink: #B45091;
|
|
62
62
|
@dubois-purple: #8A63BF;
|
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
@dubois-light-borderDanger: #FBD0D8;
|
|
156
156
|
@dubois-light-borderWarning: #F8D4A5;
|
|
157
157
|
@dubois-light-codeBackground: rgba(82, 82, 82, 0.0800);
|
|
158
|
+
@dubois-light-composerBackground: #FFFFFF;
|
|
158
159
|
@dubois-light-iconTrending: #FF3621;
|
|
159
160
|
@dubois-light-overlayOverlay: rgba(0, 0, 0, 0.2600);
|
|
160
161
|
@dubois-light-progressFill: #CBCBCB;
|
|
@@ -263,6 +264,7 @@
|
|
|
263
264
|
@dubois-dark-borderDanger: #E65B77;
|
|
264
265
|
@dubois-dark-borderWarning: #DE7921;
|
|
265
266
|
@dubois-dark-codeBackground: #37444F;
|
|
267
|
+
@dubois-dark-composerBackground: #1F272D;
|
|
266
268
|
@dubois-dark-iconTrending: #FF3621;
|
|
267
269
|
@dubois-dark-overlayOverlay: rgba(0, 0, 0, 0.4500);
|
|
268
270
|
@dubois-dark-progressFill: #5F7281;
|
package/dist/icon-metadata.json
CHANGED
|
@@ -745,6 +745,11 @@
|
|
|
745
745
|
"classification": "Action",
|
|
746
746
|
"description": "Adjust, sliders, controls, tuning, settings"
|
|
747
747
|
},
|
|
748
|
+
"SlidesIcon": {
|
|
749
|
+
"classification": "Object",
|
|
750
|
+
"description": "Slides, presentation, slide deck, deck",
|
|
751
|
+
"productArea": "AI/BI"
|
|
752
|
+
},
|
|
748
753
|
"ArrowsUpDownIcon": {
|
|
749
754
|
"classification": "Component",
|
|
750
755
|
"description": "Sort, reorder, swap, toggle sort"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as primitiveColors, f as DesignSystemEventProvider, g as useDesignSystemTheme, h as DesignTokenScope, i as useDesignSystemContext, I as InfoFillIcon, C as CheckCircleFillIcon, j as WarningFillIcon, k as DangerFillIcon, l as DesignSystemEventProviderAnalyticsEventTypes, m as useDesignSystemEventComponentCallbacks, n as DesignSystemEventProviderComponentTypes, o as DesignSystemEventProviderComponentSubTypeMap, q as useNotifyOnFirstView, r as useStableUuidV4, B as Button$1, T as Typography, s as ChevronDownIcon, t as ChevronRightIcon, v as DesignSystemAntDConfigProvider, w as CloseSmallIcon, x as addDebugOutlineIfEnabled, y as Modal, z as getAnimationCss, A as token, S as ShapeTokens, E as getDarkModePortalStyles, G as useModalContext, R as Root$3, H as Trigger, J as InfoSmallIcon, K as Content, L as Arrow, N as Tooltip, O as SparkleDoubleIcon, P as getIconClassName, Q as LoadingState, U as visuallyHidden, V as genSkeletonAnimatedColor, X as getOffsets, Y as DesignSystemEventSuppressInteractionProviderContext, Z as DesignSystemEventSuppressInteractionTrueContextValue, _ as tableStyles, $ as repeatingElementsStyles, a0 as tableClassNames, a1 as hideIconButtonRowStyles, a2 as hideIconButtonActionCellClassName, a3 as safex, a4 as TitleSkeleton, a5 as useDialogComboboxContext, a6 as PlusIcon, a7 as importantify, a8 as getComboboxOptionItemWrapperStyles, a9 as getFooterStyles, aa as useDialogComboboxOptionListContext, ab as generateUuidV4, ac as getContentOptions, ad as findHighlightedOption, ae as highlightOption, af as Input, ag as SearchIcon, ah as EmptyResults, ai as findClosestOptionSibling, aj as DialogComboboxOptionListCheckboxItem, ak as DialogComboboxOptionListSelectItem, al as DialogComboboxOptionListContextProvider, am as LoadingSpinner, an as DialogComboboxOptionList, ao as useUniqueId, ap as TypeaheadComboboxContextProvider, aq as useTypeaheadComboboxContext, ar as useDuboisThemeClass, as as useDesignTokenOverrideStyles, at as getComboboxContentWrapperStyles, au as ClearSelectionButton, av as TypeaheadComboboxSelectedItem, aw as CountBadge, ax as getValidationStateColor, ay as SectionHeader, az as useComboboxState$1, aA as useMultipleSelectionState$1, aB as Radio, aC as Checkbox, aD as DialogCombobox, aE as DialogComboboxTrigger, aF as DialogComboboxContent, aG as Select, aH as SelectTrigger, aI as SelectContent, aJ as SelectOption, aK as LegacySelect, aL as WarningIcon, aM as CheckCircleIcon, aN as DangerIcon, aO as Hint, aP as Title$1, aQ as CloseIcon, aR as RestoreAntDDefaultClsPrefix, aS as AccessibleContainer, aT as DU_BOIS_ENABLE_ANIMATION_CLASSNAME, aU as Tag, aV as CircleOffIcon, aW as CircleOutlineIcon, aX as CircleIcon, aY as getBtnClassName, aZ as SortAscendingIcon, a_ as SortDescendingIcon, a$ as SortUnsortedIcon, b0 as MinusSquareIcon, b1 as PlusSquareIcon, b2 as TypeaheadComboboxV2ContextProvider, b3 as useTypeaheadComboboxV2Context, b4 as useRadixModalContext, b5 as useIsomorphicLayoutEffect, b6 as useScrollOptionIntoView, b7 as InfoTooltip, b8 as getInfoIconStyles, b9 as HintRow, ba as getCheckboxStyles, bb as getMenuItemStyles, bc as TypeaheadComboboxSelectedItem$1, bd as CountBadge$1, be as TypeaheadComboboxMenuItem } from './WizardStepContentWrapper-
|
|
1
|
+
import { p as primitiveColors, f as DesignSystemEventProvider, g as useDesignSystemTheme, h as DesignTokenScope, i as useDesignSystemContext, I as InfoFillIcon, C as CheckCircleFillIcon, j as WarningFillIcon, k as DangerFillIcon, l as DesignSystemEventProviderAnalyticsEventTypes, m as useDesignSystemEventComponentCallbacks, n as DesignSystemEventProviderComponentTypes, o as DesignSystemEventProviderComponentSubTypeMap, q as useNotifyOnFirstView, r as useStableUuidV4, B as Button$1, T as Typography, s as ChevronDownIcon, t as ChevronRightIcon, v as DesignSystemAntDConfigProvider, w as CloseSmallIcon, x as addDebugOutlineIfEnabled, y as Modal, z as getAnimationCss, A as token, S as ShapeTokens, E as getDarkModePortalStyles, G as useModalContext, R as Root$3, H as Trigger, J as InfoSmallIcon, K as Content, L as Arrow, N as Tooltip, O as SparkleDoubleIcon, P as getIconClassName, Q as LoadingState, U as visuallyHidden, V as genSkeletonAnimatedColor, X as getOffsets, Y as DesignSystemEventSuppressInteractionProviderContext, Z as DesignSystemEventSuppressInteractionTrueContextValue, _ as tableStyles, $ as repeatingElementsStyles, a0 as tableClassNames, a1 as hideIconButtonRowStyles, a2 as hideIconButtonActionCellClassName, a3 as safex, a4 as TitleSkeleton, a5 as useDialogComboboxContext, a6 as PlusIcon, a7 as importantify, a8 as getComboboxOptionItemWrapperStyles, a9 as getFooterStyles, aa as useDialogComboboxOptionListContext, ab as generateUuidV4, ac as getContentOptions, ad as findHighlightedOption, ae as highlightOption, af as Input, ag as SearchIcon, ah as EmptyResults, ai as findClosestOptionSibling, aj as DialogComboboxOptionListCheckboxItem, ak as DialogComboboxOptionListSelectItem, al as DialogComboboxOptionListContextProvider, am as LoadingSpinner, an as DialogComboboxOptionList, ao as useUniqueId, ap as TypeaheadComboboxContextProvider, aq as useTypeaheadComboboxContext, ar as useDuboisThemeClass, as as useDesignTokenOverrideStyles, at as getComboboxContentWrapperStyles, au as ClearSelectionButton, av as TypeaheadComboboxSelectedItem, aw as CountBadge, ax as getValidationStateColor, ay as SectionHeader, az as useComboboxState$1, aA as useMultipleSelectionState$1, aB as Radio, aC as Checkbox, aD as DialogCombobox, aE as DialogComboboxTrigger, aF as DialogComboboxContent, aG as Select, aH as SelectTrigger, aI as SelectContent, aJ as SelectOption, aK as LegacySelect, aL as WarningIcon, aM as CheckCircleIcon, aN as DangerIcon, aO as Hint, aP as Title$1, aQ as CloseIcon, aR as RestoreAntDDefaultClsPrefix, aS as AccessibleContainer, aT as DU_BOIS_ENABLE_ANIMATION_CLASSNAME, aU as Tag, aV as CircleOffIcon, aW as CircleOutlineIcon, aX as CircleIcon, aY as getBtnClassName, aZ as SortAscendingIcon, a_ as SortDescendingIcon, a$ as SortUnsortedIcon, b0 as MinusSquareIcon, b1 as PlusSquareIcon, b2 as TypeaheadComboboxV2ContextProvider, b3 as useTypeaheadComboboxV2Context, b4 as useRadixModalContext, b5 as useIsomorphicLayoutEffect, b6 as useScrollOptionIntoView, b7 as InfoTooltip, b8 as getInfoIconStyles, b9 as HintRow, ba as getCheckboxStyles, bb as getMenuItemStyles, bc as TypeaheadComboboxSelectedItem$1, bd as CountBadge$1, be as TypeaheadComboboxMenuItem } from './WizardStepContentWrapper-DfErft8z.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
3
3
|
import { ThemeProvider, css, Global, createElement, ClassNames, keyframes } from '@emotion/react';
|
|
4
4
|
import { Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, DatePicker, Dropdown as Dropdown$1, Switch as Switch$1, Col as Col$1, Row as Row$1, Space as Space$1, notification, Popover, Skeleton, Menu as Menu$1, Steps as Steps$1 } from 'antd';
|
|
@@ -92,6 +92,7 @@ const consumerDarkColorList = {
|
|
|
92
92
|
borderDanger: primitiveColors.red500,
|
|
93
93
|
borderWarning: primitiveColors.yellow500,
|
|
94
94
|
codeBackground: primitiveColors.grey650,
|
|
95
|
+
composerBackground: primitiveColors.grey700,
|
|
95
96
|
iconTrending: primitiveColors.orange,
|
|
96
97
|
overlayOverlay: 'rgba(0, 0, 0, 0.4500)',
|
|
97
98
|
progressFill: primitiveColors.grey500,
|
|
@@ -178,6 +179,7 @@ const consumerLightColorList = {
|
|
|
178
179
|
borderDanger: primitiveColors.red300,
|
|
179
180
|
borderWarning: primitiveColors.yellow300,
|
|
180
181
|
codeBackground: 'rgba(82, 82, 82, 0.0800)',
|
|
182
|
+
composerBackground: primitiveColors.white,
|
|
181
183
|
iconTrending: primitiveColors.orange,
|
|
182
184
|
overlayOverlay: primitiveColors.blackAlpha26,
|
|
183
185
|
progressFill: primitiveColors.neutral300,
|
|
@@ -1152,12 +1154,27 @@ const SIZE = new Map([
|
|
|
1152
1154
|
]
|
|
1153
1155
|
]);
|
|
1154
1156
|
const DEFAULT_SIZE = 'sm';
|
|
1157
|
+
// TODO(FEINF-6539): adopt a range-specific identity-color system when one lands.
|
|
1158
|
+
const AVATAR_SURFACE_VAR = {
|
|
1159
|
+
indigo: '#434a93',
|
|
1160
|
+
teal: '#04867d',
|
|
1161
|
+
pink: '#b45091',
|
|
1162
|
+
purple: '#8a63bf',
|
|
1163
|
+
brown: '#a6630c'
|
|
1164
|
+
};
|
|
1165
|
+
const AVATAR_SURFACE_ORDER = [
|
|
1166
|
+
'indigo',
|
|
1167
|
+
'teal',
|
|
1168
|
+
'pink',
|
|
1169
|
+
'brown',
|
|
1170
|
+
'purple'
|
|
1171
|
+
];
|
|
1155
1172
|
function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme }) {
|
|
1156
1173
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO(FEINF-3982)
|
|
1157
1174
|
const { avatarSize, fontSize, iconSize } = SIZE.get(size);
|
|
1158
1175
|
return {
|
|
1159
1176
|
abbr: {
|
|
1160
|
-
color:
|
|
1177
|
+
color: 'var(--db-avatar-text)',
|
|
1161
1178
|
textDecoration: 'none',
|
|
1162
1179
|
textTransform: 'uppercase'
|
|
1163
1180
|
},
|
|
@@ -1165,14 +1182,14 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1165
1182
|
height: avatarSize,
|
|
1166
1183
|
width: avatarSize,
|
|
1167
1184
|
fontSize,
|
|
1168
|
-
[`&
|
|
1185
|
+
[`& ${getIconClassName()}`]: {
|
|
1169
1186
|
fontSize: iconSize
|
|
1170
1187
|
}
|
|
1171
1188
|
},
|
|
1172
1189
|
icon: {
|
|
1173
1190
|
alignItems: 'center',
|
|
1174
|
-
color: backgroundColor ?
|
|
1175
|
-
backgroundColor: backgroundColor ?
|
|
1191
|
+
color: backgroundColor ? 'var(--db-avatar-text)' : 'var(--db-avatar-icon)',
|
|
1192
|
+
backgroundColor: backgroundColor ? AVATAR_SURFACE_VAR[backgroundColor] : 'var(--db-avatar-surface)',
|
|
1176
1193
|
display: 'flex',
|
|
1177
1194
|
justifyContent: 'center'
|
|
1178
1195
|
},
|
|
@@ -1181,7 +1198,7 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1181
1198
|
objectPosition: 'center'
|
|
1182
1199
|
},
|
|
1183
1200
|
system: {
|
|
1184
|
-
borderRadius:
|
|
1201
|
+
borderRadius: 'var(--db-avatar-border-radius)',
|
|
1185
1202
|
overflow: 'hidden'
|
|
1186
1203
|
},
|
|
1187
1204
|
user: {
|
|
@@ -1205,24 +1222,12 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1205
1222
|
const idx = Math.abs(hash % maxRange);
|
|
1206
1223
|
return idx;
|
|
1207
1224
|
}
|
|
1208
|
-
function getAvatarBackgroundColor(label
|
|
1209
|
-
const
|
|
1225
|
+
function getAvatarBackgroundColor(label) {
|
|
1226
|
+
const idx = getRandomNumberFromString({
|
|
1210
1227
|
value: label,
|
|
1211
|
-
maxRange:
|
|
1212
|
-
});
|
|
1213
|
-
|
|
1214
|
-
case 0:
|
|
1215
|
-
return theme.colors.indigo;
|
|
1216
|
-
case 1:
|
|
1217
|
-
return theme.colors.teal;
|
|
1218
|
-
case 2:
|
|
1219
|
-
return theme.colors.pink;
|
|
1220
|
-
case 3:
|
|
1221
|
-
return theme.colors.brown;
|
|
1222
|
-
case 4:
|
|
1223
|
-
default:
|
|
1224
|
-
return theme.colors.purple;
|
|
1225
|
-
}
|
|
1228
|
+
maxRange: AVATAR_SURFACE_ORDER.length
|
|
1229
|
+
});
|
|
1230
|
+
return AVATAR_SURFACE_VAR[AVATAR_SURFACE_ORDER[idx]];
|
|
1226
1231
|
}
|
|
1227
1232
|
function Avatar(props) {
|
|
1228
1233
|
const { theme } = useDesignSystemTheme();
|
|
@@ -1263,7 +1268,7 @@ function Avatar(props) {
|
|
|
1263
1268
|
styles.system,
|
|
1264
1269
|
styles.icon,
|
|
1265
1270
|
{
|
|
1266
|
-
backgroundColor: getAvatarBackgroundColor(props.label
|
|
1271
|
+
backgroundColor: getAvatarBackgroundColor(props.label)
|
|
1267
1272
|
}
|
|
1268
1273
|
],
|
|
1269
1274
|
children: /*#__PURE__*/ jsx("abbr", {
|
|
@@ -1303,7 +1308,7 @@ function Avatar(props) {
|
|
|
1303
1308
|
styles.user,
|
|
1304
1309
|
styles.icon,
|
|
1305
1310
|
{
|
|
1306
|
-
backgroundColor: getAvatarBackgroundColor(props.label
|
|
1311
|
+
backgroundColor: getAvatarBackgroundColor(props.label)
|
|
1307
1312
|
}
|
|
1308
1313
|
],
|
|
1309
1314
|
children: /*#__PURE__*/ jsx("abbr", {
|
|
@@ -1347,27 +1352,23 @@ function AssistantAvatar({ backgroundColor, size, label }) {
|
|
|
1347
1352
|
});
|
|
1348
1353
|
}
|
|
1349
1354
|
const MAX_AVATAR_GROUP_USERS = 3;
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1355
|
+
const AVATAR_GROUP_STYLES = {
|
|
1356
|
+
container: {
|
|
1357
|
+
display: 'flex',
|
|
1358
|
+
alignItems: 'center',
|
|
1359
|
+
gap: 'var(--db-avatar-group-gap)'
|
|
1360
|
+
},
|
|
1361
|
+
avatarsContainer: {
|
|
1362
|
+
display: 'flex'
|
|
1363
|
+
},
|
|
1364
|
+
avatar: {
|
|
1365
|
+
display: 'flex',
|
|
1366
|
+
borderRadius: '100%',
|
|
1367
|
+
border: 'var(--db-avatar-group-border-width) solid var(--db-avatar-group-border-color)',
|
|
1368
|
+
position: 'relative'
|
|
1369
|
+
}
|
|
1370
|
+
};
|
|
1368
1371
|
function AvatarGroup({ size = DEFAULT_SIZE, users }) {
|
|
1369
|
-
const { theme } = useDesignSystemTheme();
|
|
1370
|
-
const styles = getAvatarGroupEmotionStyles(theme);
|
|
1371
1372
|
const displayedUsers = useMemo(()=>users.slice(0, MAX_AVATAR_GROUP_USERS), [
|
|
1372
1373
|
users
|
|
1373
1374
|
]);
|
|
@@ -1377,16 +1378,16 @@ function AvatarGroup({ size = DEFAULT_SIZE, users }) {
|
|
|
1377
1378
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO(FEINF-3982)
|
|
1378
1379
|
const { avatarSize, groupShift: avatarShift, fontSize } = SIZE.get(size);
|
|
1379
1380
|
return /*#__PURE__*/ jsxs("div", {
|
|
1380
|
-
css:
|
|
1381
|
+
css: AVATAR_GROUP_STYLES.container,
|
|
1381
1382
|
children: [
|
|
1382
1383
|
/*#__PURE__*/ jsx("div", {
|
|
1383
1384
|
css: {
|
|
1384
|
-
...
|
|
1385
|
+
...AVATAR_GROUP_STYLES.avatarsContainer,
|
|
1385
1386
|
width: (avatarSize + 2 - avatarShift) * displayedUsers.length + avatarShift
|
|
1386
1387
|
},
|
|
1387
1388
|
children: displayedUsers.map((user, idx)=>/*#__PURE__*/ jsx("div", {
|
|
1388
1389
|
css: {
|
|
1389
|
-
...
|
|
1390
|
+
...AVATAR_GROUP_STYLES.avatar,
|
|
1390
1391
|
left: -avatarShift * idx
|
|
1391
1392
|
},
|
|
1392
1393
|
children: /*#__PURE__*/ jsx(Avatar, {
|
|
@@ -1435,11 +1436,11 @@ const Breadcrumb = /* #__PURE__ */ (()=>{
|
|
|
1435
1436
|
},
|
|
1436
1437
|
[separatorClass]: {
|
|
1437
1438
|
fontSize: theme.general.iconFontSize,
|
|
1438
|
-
[`&
|
|
1439
|
+
[`& ${getIconClassName()}`]: {
|
|
1439
1440
|
fontSize: theme.typography.fontSizeBase
|
|
1440
1441
|
}
|
|
1441
1442
|
},
|
|
1442
|
-
[`&
|
|
1443
|
+
[`& ${getIconClassName()}`]: {
|
|
1443
1444
|
fontSize: theme.typography.fontSizeBase
|
|
1444
1445
|
},
|
|
1445
1446
|
'& > span': {
|
|
@@ -3138,6 +3139,7 @@ children, dangerouslySetAntdProps, onClick, ...restProps }, ref) {
|
|
|
3138
3139
|
children: /*#__PURE__*/ jsx("input", {
|
|
3139
3140
|
ref: mergedRef,
|
|
3140
3141
|
type: "checkbox",
|
|
3142
|
+
className: "db-switch-input",
|
|
3141
3143
|
// oxlint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
3142
3144
|
role: "switch",
|
|
3143
3145
|
id: uniqueId,
|
|
@@ -3438,17 +3440,16 @@ const getToggleButtonStyles$1 = (theme, disabled)=>{
|
|
|
3438
3440
|
});
|
|
3439
3441
|
});
|
|
3440
3442
|
|
|
3441
|
-
/** Height of the non-inline controls block, for callers that position it themselves. */ const TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT = 16;
|
|
3442
3443
|
const TypeaheadComboboxControls$1 = ({ getDownshiftToggleButtonProps, showClearSelectionButton, showComboboxToggleButton = true, handleClear, disabled, loading = false, inline = false, className })=>{
|
|
3443
3444
|
return /*#__PURE__*/ jsxs("div", {
|
|
3444
3445
|
className: className,
|
|
3445
3446
|
css: {
|
|
3446
|
-
// Centers the 12px clear icon against the 16px toggle button
|
|
3447
|
+
// Centers the 12px clear icon against the 16px toggle button, and (when the caller sizes
|
|
3448
|
+
// this block to the tag row) centers the whole controls block on the row's centerline.
|
|
3447
3449
|
display: 'flex',
|
|
3448
3450
|
alignItems: 'center',
|
|
3449
3451
|
cursor: disabled ? 'not-allowed' : undefined,
|
|
3450
3452
|
...inline ? {} : {
|
|
3451
|
-
height: TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT,
|
|
3452
3453
|
zIndex: 1
|
|
3453
3454
|
}
|
|
3454
3455
|
},
|
|
@@ -3653,8 +3654,6 @@ const TAG_ROW_HEIGHT = 24;
|
|
|
3653
3654
|
const DEFAULT_VERTICAL_PADDING = 5;
|
|
3654
3655
|
const MIDDLE_VERTICAL_PADDING = 3;
|
|
3655
3656
|
const getVerticalPadding = (size)=>size === 'middle' ? MIDDLE_VERTICAL_PADDING : DEFAULT_VERTICAL_PADDING;
|
|
3656
|
-
// Centers the shorter controls block on the tag row it floats beside.
|
|
3657
|
-
const CONTROLS_ROW_OFFSET = (TAG_ROW_HEIGHT - TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT) / 2;
|
|
3658
3657
|
// Overflow lives on this inner wrapper so the floated, sticky controls
|
|
3659
3658
|
// (rendered as the first child) stay pinned to the top-right of the visible
|
|
3660
3659
|
// scroll viewport while the tag list scrolls.
|
|
@@ -3901,13 +3900,15 @@ size, ...restProps }, ref)=>{
|
|
|
3901
3900
|
showClearSelectionButton: allowClear && (Boolean(inputValue) || selectedItems && selectedItems.length > 0) && !restProps.disabled,
|
|
3902
3901
|
handleClear: handleClear,
|
|
3903
3902
|
disabled: restProps.disabled,
|
|
3904
|
-
//
|
|
3905
|
-
//
|
|
3903
|
+
// The floated controls block is as tall as the tag row and flex-centers its icons (see
|
|
3904
|
+
// TypeaheadComboboxControls), so the clear/chevron sit on the row's centerline regardless
|
|
3905
|
+
// of their exact pixel heights. `top` is the row's top, so scrolling the tag list leaves
|
|
3906
|
+
// the controls pinned on the first row.
|
|
3906
3907
|
css: /*#__PURE__*/ css({
|
|
3907
3908
|
position: 'sticky',
|
|
3908
|
-
top: getVerticalPadding(size)
|
|
3909
|
-
|
|
3910
|
-
|
|
3909
|
+
top: getVerticalPadding(size),
|
|
3910
|
+
float: 'right',
|
|
3911
|
+
height: TAG_ROW_HEIGHT
|
|
3911
3912
|
})
|
|
3912
3913
|
}),
|
|
3913
3914
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -4415,10 +4416,10 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
|
|
|
4415
4416
|
// pull the ~175KB chunk. Generics don't flow through React.lazy, so each public wrapper re-declares the
|
|
4416
4417
|
// generic signature and casts its props onto the (default-generic) lazy component; the lazy impl has the
|
|
4417
4418
|
// identical prop shape.
|
|
4418
|
-
const LazyRHFControlledTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-
|
|
4419
|
+
const LazyRHFControlledTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-Boee19c1.js').then((m)=>({
|
|
4419
4420
|
default: m.RHFControlledTypeaheadComboboxV2
|
|
4420
4421
|
})));
|
|
4421
|
-
const LazyRHFControlledMultiSelectTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-
|
|
4422
|
+
const LazyRHFControlledMultiSelectTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-Boee19c1.js').then((m)=>({
|
|
4422
4423
|
default: m.RHFControlledMultiSelectTypeaheadComboboxV2
|
|
4423
4424
|
})));
|
|
4424
4425
|
function RHFControlledTypeaheadComboboxV2(props) {
|
|
@@ -5096,14 +5097,19 @@ const getToastRootStyle = (theme, classNamePrefix)=>{
|
|
|
5096
5097
|
return /*#__PURE__*/ css({
|
|
5097
5098
|
'&&': {
|
|
5098
5099
|
position: 'relative',
|
|
5100
|
+
// Re-enable pointer events the Viewport turns off. `!important` beats the inline
|
|
5101
|
+
// `pointer-events: none` a Radix modal writes on this root when it opens, keeping the toast
|
|
5102
|
+
// clickable over a modal.
|
|
5103
|
+
pointerEvents: 'auto !important',
|
|
5099
5104
|
display: 'grid',
|
|
5100
|
-
background:
|
|
5101
|
-
padding:
|
|
5102
|
-
columnGap:
|
|
5103
|
-
boxShadow:
|
|
5104
|
-
borderRadius:
|
|
5105
|
-
|
|
5106
|
-
|
|
5105
|
+
background: 'var(--db-notification-surface)',
|
|
5106
|
+
padding: 'var(--db-notification-padding)',
|
|
5107
|
+
columnGap: 'var(--db-notification-column-gap)',
|
|
5108
|
+
boxShadow: 'var(--db-notification-shadow)',
|
|
5109
|
+
borderRadius: 'var(--db-notification-border-radius)',
|
|
5110
|
+
// No v2 line-height token. TODO(FEINF-6557): adopt one when it lands.
|
|
5111
|
+
lineHeight: theme.typography.lineHeightBase,
|
|
5112
|
+
borderColor: `1px solid var(--db-notification-border)`,
|
|
5107
5113
|
gridTemplateRows: '[header] auto [content] auto',
|
|
5108
5114
|
gridTemplateColumns: '[icon] auto [content] 1fr [close] auto',
|
|
5109
5115
|
...getDarkModePortalStyles(theme)
|
|
@@ -5120,16 +5126,16 @@ const getToastRootStyle = (theme, classNamePrefix)=>{
|
|
|
5120
5126
|
justifyContent: 'center'
|
|
5121
5127
|
},
|
|
5122
5128
|
[`.${classNamePrefix}-notification-info-icon`]: {
|
|
5123
|
-
color:
|
|
5129
|
+
color: 'var(--db-notification-icon)'
|
|
5124
5130
|
},
|
|
5125
5131
|
[`.${classNamePrefix}-notification-success-icon`]: {
|
|
5126
|
-
color:
|
|
5132
|
+
color: 'var(--db-notification-icon-success)'
|
|
5127
5133
|
},
|
|
5128
5134
|
[`.${classNamePrefix}-notification-warning-icon`]: {
|
|
5129
|
-
color:
|
|
5135
|
+
color: 'var(--db-notification-icon-warning)'
|
|
5130
5136
|
},
|
|
5131
5137
|
[`.${classNamePrefix}-notification-error-icon`]: {
|
|
5132
|
-
color:
|
|
5138
|
+
color: 'var(--db-notification-icon-error)'
|
|
5133
5139
|
},
|
|
5134
5140
|
'&&[data-state="open"]': {
|
|
5135
5141
|
animation: `${slideInAnimation} 300ms cubic-bezier(0.16, 1, 0.3, 1)`
|
|
@@ -5190,7 +5196,7 @@ const Root$2 = // eslint-disable-next-line react-component-name/react-component-
|
|
|
5190
5196
|
...props,
|
|
5191
5197
|
...addDebugOutlineIfEnabled(),
|
|
5192
5198
|
...preventSwipeToClose(),
|
|
5193
|
-
className: classnames(className, themeClass),
|
|
5199
|
+
className: classnames(className, themeClass, DU_BOIS_ENABLE_ANIMATION_CLASSNAME),
|
|
5194
5200
|
style: {
|
|
5195
5201
|
...style,
|
|
5196
5202
|
...themeOverrideStyle
|
|
@@ -5210,6 +5216,16 @@ const Root$2 = // eslint-disable-next-line react-component-name/react-component-
|
|
|
5210
5216
|
});
|
|
5211
5217
|
});
|
|
5212
5218
|
// TODO: Support light and dark mode
|
|
5219
|
+
// Click-through: this fixed viewport band must not intercept clicks meant for content beneath it
|
|
5220
|
+
// (e.g. an open modal); toasts re-enable pointer events on their Root (standard Radix Toast pattern).
|
|
5221
|
+
// This MUST be a css class rather than part of the inline `getViewportStyle` below: the Root
|
|
5222
|
+
// re-enables pointer events via its own css class, and jsdom's getComputedStyle resolves only inline
|
|
5223
|
+
// styles, so an inline `none` here makes @testing-library/user-event treat every toast as
|
|
5224
|
+
// click-blocking in jsdom (it can't see the Root's class-based override) even though the click works
|
|
5225
|
+
// in a real browser. Keeping both declarations on classes stays symmetric across jsdom and browsers.
|
|
5226
|
+
const viewportClickThroughStyle = /*#__PURE__*/ css({
|
|
5227
|
+
pointerEvents: 'none'
|
|
5228
|
+
});
|
|
5213
5229
|
const getViewportStyle$1 = (theme)=>{
|
|
5214
5230
|
return {
|
|
5215
5231
|
position: 'fixed',
|
|
@@ -5217,19 +5233,19 @@ const getViewportStyle$1 = (theme)=>{
|
|
|
5217
5233
|
right: 0,
|
|
5218
5234
|
display: 'flex',
|
|
5219
5235
|
flexDirection: 'column',
|
|
5220
|
-
padding:
|
|
5221
|
-
gap:
|
|
5222
|
-
width:
|
|
5236
|
+
padding: 'var(--db-notification-viewport-padding)',
|
|
5237
|
+
gap: 'var(--db-notification-viewport-gap)',
|
|
5238
|
+
width: 'var(--db-notification-viewport-width)',
|
|
5223
5239
|
listStyle: 'none',
|
|
5224
5240
|
zIndex: theme.options.zIndexBase + 100,
|
|
5225
5241
|
outline: 'none',
|
|
5226
|
-
maxWidth:
|
|
5242
|
+
maxWidth: 'calc(100% - var(--db-notification-viewport-margin))'
|
|
5227
5243
|
};
|
|
5228
5244
|
};
|
|
5229
5245
|
const getTitleStyles = (theme)=>{
|
|
5230
5246
|
return /*#__PURE__*/ css({
|
|
5231
5247
|
fontWeight: theme.typography.typographyBoldFontWeight,
|
|
5232
|
-
color:
|
|
5248
|
+
color: 'var(--db-notification-text)',
|
|
5233
5249
|
gridRow: 'header / header',
|
|
5234
5250
|
gridColumn: 'content / content',
|
|
5235
5251
|
userSelect: 'text'
|
|
@@ -5245,47 +5261,42 @@ const Title = // eslint-disable-next-line react-component-name/react-component-n
|
|
|
5245
5261
|
children: children
|
|
5246
5262
|
});
|
|
5247
5263
|
});
|
|
5248
|
-
const
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
});
|
|
5257
|
-
};
|
|
5264
|
+
const DESCRIPTION_STYLES = /*#__PURE__*/ css({
|
|
5265
|
+
marginTop: 'var(--db-notification-description-gap)',
|
|
5266
|
+
color: 'var(--db-notification-text)',
|
|
5267
|
+
gridRow: 'content / content',
|
|
5268
|
+
gridColumn: 'content / content',
|
|
5269
|
+
userSelect: 'text',
|
|
5270
|
+
wordBreak: 'break-word'
|
|
5271
|
+
});
|
|
5258
5272
|
const Description = /*#__PURE__*/ forwardRef(function({ children, ...props }, ref) {
|
|
5259
|
-
const { theme } = useDesignSystemTheme();
|
|
5260
5273
|
return /*#__PURE__*/ jsx(Toast.Description, {
|
|
5261
5274
|
ref: ref,
|
|
5262
|
-
css:
|
|
5275
|
+
css: DESCRIPTION_STYLES,
|
|
5263
5276
|
...props,
|
|
5264
5277
|
children: children
|
|
5265
5278
|
});
|
|
5266
5279
|
});
|
|
5267
|
-
const
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5280
|
+
const CLOSE_STYLES = /*#__PURE__*/ css({
|
|
5281
|
+
color: 'var(--db-notification-icon)',
|
|
5282
|
+
position: 'absolute',
|
|
5283
|
+
// Offset close button position to align with the title, title uses 20px line height, button has 32px
|
|
5284
|
+
right: 'var(--db-notification-close-offset)',
|
|
5285
|
+
top: 'var(--db-notification-close-offset)'
|
|
5286
|
+
});
|
|
5287
|
+
const CLOSE_WRAPPER_STYLE = {
|
|
5288
|
+
gridColumn: 'close / close',
|
|
5289
|
+
gridRow: 'header / content',
|
|
5290
|
+
width: 'var(--db-notification-close-size)'
|
|
5275
5291
|
};
|
|
5276
5292
|
const Close = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
5277
|
-
const { theme } = useDesignSystemTheme();
|
|
5278
5293
|
const { closeLabel, componentId, analyticsEvents, ...restProps } = props;
|
|
5279
5294
|
return(// Wrapper to keep close column width for content sizing, close button positioned absolute for alignment without affecting the grid's first row height (title)
|
|
5280
5295
|
/*#__PURE__*/ jsx("div", {
|
|
5281
|
-
style:
|
|
5282
|
-
gridColumn: 'close / close',
|
|
5283
|
-
gridRow: 'header / content',
|
|
5284
|
-
width: 20
|
|
5285
|
-
},
|
|
5296
|
+
style: CLOSE_WRAPPER_STYLE,
|
|
5286
5297
|
children: /*#__PURE__*/ jsx(Toast.Close, {
|
|
5287
5298
|
ref: ref,
|
|
5288
|
-
css:
|
|
5299
|
+
css: CLOSE_STYLES,
|
|
5289
5300
|
...restProps,
|
|
5290
5301
|
asChild: true,
|
|
5291
5302
|
children: /*#__PURE__*/ jsx(Button$1, {
|
|
@@ -5307,6 +5318,7 @@ const Viewport = (props)=>{
|
|
|
5307
5318
|
const { theme } = useDesignSystemTheme();
|
|
5308
5319
|
return /*#__PURE__*/ jsx(Toast.Viewport, {
|
|
5309
5320
|
className: DU_BOIS_ENABLE_ANIMATION_CLASSNAME,
|
|
5321
|
+
css: viewportClickThroughStyle,
|
|
5310
5322
|
style: getViewportStyle$1(theme),
|
|
5311
5323
|
...props
|
|
5312
5324
|
});
|
|
@@ -5599,7 +5611,7 @@ const snackBarManager = new SnackBarManager();
|
|
|
5599
5611
|
|
|
5600
5612
|
const getCloseButtonStyles = (clsPrefix)=>{
|
|
5601
5613
|
const notLink = `:not(${getBtnClassName(clsPrefix, '-link', '')})`;
|
|
5602
|
-
const iconSelector =
|
|
5614
|
+
const iconSelector = `${getIconClassName()}`;
|
|
5603
5615
|
return /*#__PURE__*/ css({
|
|
5604
5616
|
marginLeft: 'var(--db-snackbar-close-button-spacing)',
|
|
5605
5617
|
flexShrink: 0,
|
|
@@ -5738,7 +5750,7 @@ const SnackBarRoot = /*#__PURE__*/ forwardRef(function SnackBarRoot({ snack }, r
|
|
|
5738
5750
|
return /*#__PURE__*/ jsxs(Toast.Root, {
|
|
5739
5751
|
ref: ref,
|
|
5740
5752
|
css: getSnackBarRootStyle(snack.backgroundColor, snack.textColor),
|
|
5741
|
-
className: themeClass
|
|
5753
|
+
className: `${themeClass} ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`,
|
|
5742
5754
|
style: {
|
|
5743
5755
|
...snack.closeButton === false ? {
|
|
5744
5756
|
cursor: 'pointer'
|
|
@@ -8506,4 +8518,4 @@ const DM_SANS_FONT_FAMILY = "'DM Sans', -apple-system, BlinkMacSystemFont, 'Sego
|
|
|
8506
8518
|
const DM_MONO_FONT_FAMILY = "'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace";
|
|
8507
8519
|
|
|
8508
8520
|
export { TableFilterLayout as $, Alert as A, Breadcrumb as B, Card as C, DBAssistantAvatar as D, ROW_GUTTER_SIZE as E, FormUI as F, GenericSkeleton as G, Header as H, InfoPopover as I, ResourceStatusIndicator as J, Row as K, LegacyDatePicker as L, Menu as M, Notification as N, Overflow as O, PageWrapper as P, SnackBar as Q, RHFControlledComponents as R, Slider as S, TypeaheadComboboxRoot as T, Space as U, Steps as V, Switch as W, Table as X, TableCell as Y, TableContext as Z, TableFilterInput as _, TypeaheadComboboxMultiSelectInput as a, TableHeader as a0, TableRow as a1, TableRowAction as a2, TableRowActionHeader as a3, TableRowContext as a4, TableRowMenuContainer as a5, TableRowMultiAction as a6, TableRowSelectCell as a7, TableSkeleton as a8, TableSkeletonRows as a9, useDesignSystemFlags as aA, useFastDom as aB, useLegacyNotification as aC, useSnackBar as aD, useThemedStyles as aE, withNotifications as aF, Toolbar as aa, TreeGrid as ab, TruncationTooltip as ac, TypeaheadComboboxAddButton$1 as ad, TypeaheadComboboxInput$1 as ae, TypeaheadComboboxMenu$1 as af, TypeaheadComboboxMultiSelectInput$1 as ag, TypeaheadComboboxRoot$1 as ah, TypeaheadComboboxSectionHeader$1 as ai, TypeaheadComboboxSeparator$1 as aj, TypeaheadComboboxToggleButton$1 as ak, index as al, consumerDarkColorList as am, consumerLightColorList as an, flushFastdomForTesting as ao, getGlobalResetStyles as ap, getGlobalStyles as aq, getSwitchWithLabelStyles as ar, isSafeRelativeUrl as as, isSafeUrl as at, measure as au, sanitizeNextUrl as av, setupDesignSystemEventProviderForTesting as aw, snackBarManager as ax, update as ay, useDefaultTreeGridState as az, TypeaheadComboboxMenu as b, TypeaheadComboboxInput as c, ApplyGlobalStyles as d, AssistantAvatar as e, AutoComplete as f, Avatar as g, AvatarGroup as h, Col as i, DM_MONO_FONT_FAMILY as j, DM_SANS_FONT_FAMILY as k, DesignTokenScopeWithEmotionTheme as l, DialogComboboxAddButton as m, DialogComboboxFooter as n, DialogComboboxHintRow as o, DialogComboboxOptionControlledList as p, DialogComboboxOptionListSearch as q, DialogComboboxSeparator as r, Dropdown as s, DuboisDatePicker as t, useComboboxState as u, HoverCard as v, LegacyPopover as w, LegacySkeleton as x, OverflowPopover as y, ParagraphSkeleton as z };
|
|
8509
|
-
//# sourceMappingURL=index-
|
|
8521
|
+
//# sourceMappingURL=index-CUzS-Vjx.js.map
|