@databricks/design-system 2.0.6 → 2.0.7
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 +28 -0
- package/dist/{RHFControlledTypeaheadComboboxV2-Ct9x3rC1.js → RHFControlledTypeaheadComboboxV2-nSSYj16I.js} +3 -3
- package/dist/{RHFControlledTypeaheadComboboxV2-Ct9x3rC1.js.map → RHFControlledTypeaheadComboboxV2-nSSYj16I.js.map} +1 -1
- package/dist/{WizardStepContentWrapper-6YTjeEaA.js → WizardStepContentWrapper-bbh_CoIf.js} +195 -257
- package/dist/WizardStepContentWrapper-bbh_CoIf.js.map +1 -0
- package/dist/dubois-colors.less +1 -1
- package/dist/icon-metadata.json +5 -0
- package/dist/{index-DiRpSwH2.js → index-CUCuUviS.js} +119 -109
- package/dist/index-CUCuUviS.js.map +1 -0
- package/dist/index-dark.css +135 -1
- package/dist/index-dark.mitigated.css +163 -16
- package/dist/index.css +182 -28
- package/dist/index.js +2 -2
- package/dist/index.mitigated.css +210 -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/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
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-bbh_CoIf.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';
|
|
@@ -1152,12 +1152,27 @@ const SIZE = new Map([
|
|
|
1152
1152
|
]
|
|
1153
1153
|
]);
|
|
1154
1154
|
const DEFAULT_SIZE = 'sm';
|
|
1155
|
+
// TODO(FEINF-6539): adopt a range-specific identity-color system when one lands.
|
|
1156
|
+
const AVATAR_SURFACE_VAR = {
|
|
1157
|
+
indigo: '#434a93',
|
|
1158
|
+
teal: '#04867d',
|
|
1159
|
+
pink: '#b45091',
|
|
1160
|
+
purple: '#8a63bf',
|
|
1161
|
+
brown: '#a6630c'
|
|
1162
|
+
};
|
|
1163
|
+
const AVATAR_SURFACE_ORDER = [
|
|
1164
|
+
'indigo',
|
|
1165
|
+
'teal',
|
|
1166
|
+
'pink',
|
|
1167
|
+
'brown',
|
|
1168
|
+
'purple'
|
|
1169
|
+
];
|
|
1155
1170
|
function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme }) {
|
|
1156
1171
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO(FEINF-3982)
|
|
1157
1172
|
const { avatarSize, fontSize, iconSize } = SIZE.get(size);
|
|
1158
1173
|
return {
|
|
1159
1174
|
abbr: {
|
|
1160
|
-
color:
|
|
1175
|
+
color: 'var(--db-avatar-text)',
|
|
1161
1176
|
textDecoration: 'none',
|
|
1162
1177
|
textTransform: 'uppercase'
|
|
1163
1178
|
},
|
|
@@ -1165,14 +1180,14 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1165
1180
|
height: avatarSize,
|
|
1166
1181
|
width: avatarSize,
|
|
1167
1182
|
fontSize,
|
|
1168
|
-
[`&
|
|
1183
|
+
[`& ${getIconClassName()}`]: {
|
|
1169
1184
|
fontSize: iconSize
|
|
1170
1185
|
}
|
|
1171
1186
|
},
|
|
1172
1187
|
icon: {
|
|
1173
1188
|
alignItems: 'center',
|
|
1174
|
-
color: backgroundColor ?
|
|
1175
|
-
backgroundColor: backgroundColor ?
|
|
1189
|
+
color: backgroundColor ? 'var(--db-avatar-text)' : 'var(--db-avatar-icon)',
|
|
1190
|
+
backgroundColor: backgroundColor ? AVATAR_SURFACE_VAR[backgroundColor] : 'var(--db-avatar-surface)',
|
|
1176
1191
|
display: 'flex',
|
|
1177
1192
|
justifyContent: 'center'
|
|
1178
1193
|
},
|
|
@@ -1181,7 +1196,7 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1181
1196
|
objectPosition: 'center'
|
|
1182
1197
|
},
|
|
1183
1198
|
system: {
|
|
1184
|
-
borderRadius:
|
|
1199
|
+
borderRadius: 'var(--db-avatar-border-radius)',
|
|
1185
1200
|
overflow: 'hidden'
|
|
1186
1201
|
},
|
|
1187
1202
|
user: {
|
|
@@ -1205,24 +1220,12 @@ function getAvatarEmotionStyles({ backgroundColor, size = DEFAULT_SIZE, theme })
|
|
|
1205
1220
|
const idx = Math.abs(hash % maxRange);
|
|
1206
1221
|
return idx;
|
|
1207
1222
|
}
|
|
1208
|
-
function getAvatarBackgroundColor(label
|
|
1209
|
-
const
|
|
1223
|
+
function getAvatarBackgroundColor(label) {
|
|
1224
|
+
const idx = getRandomNumberFromString({
|
|
1210
1225
|
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
|
-
}
|
|
1226
|
+
maxRange: AVATAR_SURFACE_ORDER.length
|
|
1227
|
+
});
|
|
1228
|
+
return AVATAR_SURFACE_VAR[AVATAR_SURFACE_ORDER[idx]];
|
|
1226
1229
|
}
|
|
1227
1230
|
function Avatar(props) {
|
|
1228
1231
|
const { theme } = useDesignSystemTheme();
|
|
@@ -1263,7 +1266,7 @@ function Avatar(props) {
|
|
|
1263
1266
|
styles.system,
|
|
1264
1267
|
styles.icon,
|
|
1265
1268
|
{
|
|
1266
|
-
backgroundColor: getAvatarBackgroundColor(props.label
|
|
1269
|
+
backgroundColor: getAvatarBackgroundColor(props.label)
|
|
1267
1270
|
}
|
|
1268
1271
|
],
|
|
1269
1272
|
children: /*#__PURE__*/ jsx("abbr", {
|
|
@@ -1303,7 +1306,7 @@ function Avatar(props) {
|
|
|
1303
1306
|
styles.user,
|
|
1304
1307
|
styles.icon,
|
|
1305
1308
|
{
|
|
1306
|
-
backgroundColor: getAvatarBackgroundColor(props.label
|
|
1309
|
+
backgroundColor: getAvatarBackgroundColor(props.label)
|
|
1307
1310
|
}
|
|
1308
1311
|
],
|
|
1309
1312
|
children: /*#__PURE__*/ jsx("abbr", {
|
|
@@ -1347,27 +1350,23 @@ function AssistantAvatar({ backgroundColor, size, label }) {
|
|
|
1347
1350
|
});
|
|
1348
1351
|
}
|
|
1349
1352
|
const MAX_AVATAR_GROUP_USERS = 3;
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1353
|
+
const AVATAR_GROUP_STYLES = {
|
|
1354
|
+
container: {
|
|
1355
|
+
display: 'flex',
|
|
1356
|
+
alignItems: 'center',
|
|
1357
|
+
gap: 'var(--db-avatar-group-gap)'
|
|
1358
|
+
},
|
|
1359
|
+
avatarsContainer: {
|
|
1360
|
+
display: 'flex'
|
|
1361
|
+
},
|
|
1362
|
+
avatar: {
|
|
1363
|
+
display: 'flex',
|
|
1364
|
+
borderRadius: '100%',
|
|
1365
|
+
border: 'var(--db-avatar-group-border-width) solid var(--db-avatar-group-border-color)',
|
|
1366
|
+
position: 'relative'
|
|
1367
|
+
}
|
|
1368
|
+
};
|
|
1368
1369
|
function AvatarGroup({ size = DEFAULT_SIZE, users }) {
|
|
1369
|
-
const { theme } = useDesignSystemTheme();
|
|
1370
|
-
const styles = getAvatarGroupEmotionStyles(theme);
|
|
1371
1370
|
const displayedUsers = useMemo(()=>users.slice(0, MAX_AVATAR_GROUP_USERS), [
|
|
1372
1371
|
users
|
|
1373
1372
|
]);
|
|
@@ -1377,16 +1376,16 @@ function AvatarGroup({ size = DEFAULT_SIZE, users }) {
|
|
|
1377
1376
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO(FEINF-3982)
|
|
1378
1377
|
const { avatarSize, groupShift: avatarShift, fontSize } = SIZE.get(size);
|
|
1379
1378
|
return /*#__PURE__*/ jsxs("div", {
|
|
1380
|
-
css:
|
|
1379
|
+
css: AVATAR_GROUP_STYLES.container,
|
|
1381
1380
|
children: [
|
|
1382
1381
|
/*#__PURE__*/ jsx("div", {
|
|
1383
1382
|
css: {
|
|
1384
|
-
...
|
|
1383
|
+
...AVATAR_GROUP_STYLES.avatarsContainer,
|
|
1385
1384
|
width: (avatarSize + 2 - avatarShift) * displayedUsers.length + avatarShift
|
|
1386
1385
|
},
|
|
1387
1386
|
children: displayedUsers.map((user, idx)=>/*#__PURE__*/ jsx("div", {
|
|
1388
1387
|
css: {
|
|
1389
|
-
...
|
|
1388
|
+
...AVATAR_GROUP_STYLES.avatar,
|
|
1390
1389
|
left: -avatarShift * idx
|
|
1391
1390
|
},
|
|
1392
1391
|
children: /*#__PURE__*/ jsx(Avatar, {
|
|
@@ -1435,11 +1434,11 @@ const Breadcrumb = /* #__PURE__ */ (()=>{
|
|
|
1435
1434
|
},
|
|
1436
1435
|
[separatorClass]: {
|
|
1437
1436
|
fontSize: theme.general.iconFontSize,
|
|
1438
|
-
[`&
|
|
1437
|
+
[`& ${getIconClassName()}`]: {
|
|
1439
1438
|
fontSize: theme.typography.fontSizeBase
|
|
1440
1439
|
}
|
|
1441
1440
|
},
|
|
1442
|
-
[`&
|
|
1441
|
+
[`& ${getIconClassName()}`]: {
|
|
1443
1442
|
fontSize: theme.typography.fontSizeBase
|
|
1444
1443
|
},
|
|
1445
1444
|
'& > span': {
|
|
@@ -3138,6 +3137,7 @@ children, dangerouslySetAntdProps, onClick, ...restProps }, ref) {
|
|
|
3138
3137
|
children: /*#__PURE__*/ jsx("input", {
|
|
3139
3138
|
ref: mergedRef,
|
|
3140
3139
|
type: "checkbox",
|
|
3140
|
+
className: "db-switch-input",
|
|
3141
3141
|
// oxlint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
3142
3142
|
role: "switch",
|
|
3143
3143
|
id: uniqueId,
|
|
@@ -3438,17 +3438,16 @@ const getToggleButtonStyles$1 = (theme, disabled)=>{
|
|
|
3438
3438
|
});
|
|
3439
3439
|
});
|
|
3440
3440
|
|
|
3441
|
-
/** Height of the non-inline controls block, for callers that position it themselves. */ const TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT = 16;
|
|
3442
3441
|
const TypeaheadComboboxControls$1 = ({ getDownshiftToggleButtonProps, showClearSelectionButton, showComboboxToggleButton = true, handleClear, disabled, loading = false, inline = false, className })=>{
|
|
3443
3442
|
return /*#__PURE__*/ jsxs("div", {
|
|
3444
3443
|
className: className,
|
|
3445
3444
|
css: {
|
|
3446
|
-
// Centers the 12px clear icon against the 16px toggle button
|
|
3445
|
+
// Centers the 12px clear icon against the 16px toggle button, and (when the caller sizes
|
|
3446
|
+
// this block to the tag row) centers the whole controls block on the row's centerline.
|
|
3447
3447
|
display: 'flex',
|
|
3448
3448
|
alignItems: 'center',
|
|
3449
3449
|
cursor: disabled ? 'not-allowed' : undefined,
|
|
3450
3450
|
...inline ? {} : {
|
|
3451
|
-
height: TYPEAHEAD_COMBOBOX_CONTROLS_HEIGHT,
|
|
3452
3451
|
zIndex: 1
|
|
3453
3452
|
}
|
|
3454
3453
|
},
|
|
@@ -3653,8 +3652,6 @@ const TAG_ROW_HEIGHT = 24;
|
|
|
3653
3652
|
const DEFAULT_VERTICAL_PADDING = 5;
|
|
3654
3653
|
const MIDDLE_VERTICAL_PADDING = 3;
|
|
3655
3654
|
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
3655
|
// Overflow lives on this inner wrapper so the floated, sticky controls
|
|
3659
3656
|
// (rendered as the first child) stay pinned to the top-right of the visible
|
|
3660
3657
|
// scroll viewport while the tag list scrolls.
|
|
@@ -3901,13 +3898,15 @@ size, ...restProps }, ref)=>{
|
|
|
3901
3898
|
showClearSelectionButton: allowClear && (Boolean(inputValue) || selectedItems && selectedItems.length > 0) && !restProps.disabled,
|
|
3902
3899
|
handleClear: handleClear,
|
|
3903
3900
|
disabled: restProps.disabled,
|
|
3904
|
-
//
|
|
3905
|
-
//
|
|
3901
|
+
// The floated controls block is as tall as the tag row and flex-centers its icons (see
|
|
3902
|
+
// TypeaheadComboboxControls), so the clear/chevron sit on the row's centerline regardless
|
|
3903
|
+
// of their exact pixel heights. `top` is the row's top, so scrolling the tag list leaves
|
|
3904
|
+
// the controls pinned on the first row.
|
|
3906
3905
|
css: /*#__PURE__*/ css({
|
|
3907
3906
|
position: 'sticky',
|
|
3908
|
-
top: getVerticalPadding(size)
|
|
3909
|
-
|
|
3910
|
-
|
|
3907
|
+
top: getVerticalPadding(size),
|
|
3908
|
+
float: 'right',
|
|
3909
|
+
height: TAG_ROW_HEIGHT
|
|
3911
3910
|
})
|
|
3912
3911
|
}),
|
|
3913
3912
|
/*#__PURE__*/ jsxs("div", {
|
|
@@ -4415,10 +4414,10 @@ function RHFControlledMultiSelectTypeaheadCombobox({ name, control, rules, allIt
|
|
|
4415
4414
|
// pull the ~175KB chunk. Generics don't flow through React.lazy, so each public wrapper re-declares the
|
|
4416
4415
|
// generic signature and casts its props onto the (default-generic) lazy component; the lazy impl has the
|
|
4417
4416
|
// identical prop shape.
|
|
4418
|
-
const LazyRHFControlledTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-
|
|
4417
|
+
const LazyRHFControlledTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-nSSYj16I.js').then((m)=>({
|
|
4419
4418
|
default: m.RHFControlledTypeaheadComboboxV2
|
|
4420
4419
|
})));
|
|
4421
|
-
const LazyRHFControlledMultiSelectTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-
|
|
4420
|
+
const LazyRHFControlledMultiSelectTypeaheadComboboxV2 = /*#__PURE__*/ React__default.lazy(()=>import('./RHFControlledTypeaheadComboboxV2-nSSYj16I.js').then((m)=>({
|
|
4422
4421
|
default: m.RHFControlledMultiSelectTypeaheadComboboxV2
|
|
4423
4422
|
})));
|
|
4424
4423
|
function RHFControlledTypeaheadComboboxV2(props) {
|
|
@@ -5096,14 +5095,19 @@ const getToastRootStyle = (theme, classNamePrefix)=>{
|
|
|
5096
5095
|
return /*#__PURE__*/ css({
|
|
5097
5096
|
'&&': {
|
|
5098
5097
|
position: 'relative',
|
|
5098
|
+
// Re-enable pointer events the Viewport turns off. `!important` beats the inline
|
|
5099
|
+
// `pointer-events: none` a Radix modal writes on this root when it opens, keeping the toast
|
|
5100
|
+
// clickable over a modal.
|
|
5101
|
+
pointerEvents: 'auto !important',
|
|
5099
5102
|
display: 'grid',
|
|
5100
|
-
background:
|
|
5101
|
-
padding:
|
|
5102
|
-
columnGap:
|
|
5103
|
-
boxShadow:
|
|
5104
|
-
borderRadius:
|
|
5105
|
-
|
|
5106
|
-
|
|
5103
|
+
background: 'var(--db-notification-surface)',
|
|
5104
|
+
padding: 'var(--db-notification-padding)',
|
|
5105
|
+
columnGap: 'var(--db-notification-column-gap)',
|
|
5106
|
+
boxShadow: 'var(--db-notification-shadow)',
|
|
5107
|
+
borderRadius: 'var(--db-notification-border-radius)',
|
|
5108
|
+
// No v2 line-height token. TODO(FEINF-6557): adopt one when it lands.
|
|
5109
|
+
lineHeight: theme.typography.lineHeightBase,
|
|
5110
|
+
borderColor: `1px solid var(--db-notification-border)`,
|
|
5107
5111
|
gridTemplateRows: '[header] auto [content] auto',
|
|
5108
5112
|
gridTemplateColumns: '[icon] auto [content] 1fr [close] auto',
|
|
5109
5113
|
...getDarkModePortalStyles(theme)
|
|
@@ -5120,16 +5124,16 @@ const getToastRootStyle = (theme, classNamePrefix)=>{
|
|
|
5120
5124
|
justifyContent: 'center'
|
|
5121
5125
|
},
|
|
5122
5126
|
[`.${classNamePrefix}-notification-info-icon`]: {
|
|
5123
|
-
color:
|
|
5127
|
+
color: 'var(--db-notification-icon)'
|
|
5124
5128
|
},
|
|
5125
5129
|
[`.${classNamePrefix}-notification-success-icon`]: {
|
|
5126
|
-
color:
|
|
5130
|
+
color: 'var(--db-notification-icon-success)'
|
|
5127
5131
|
},
|
|
5128
5132
|
[`.${classNamePrefix}-notification-warning-icon`]: {
|
|
5129
|
-
color:
|
|
5133
|
+
color: 'var(--db-notification-icon-warning)'
|
|
5130
5134
|
},
|
|
5131
5135
|
[`.${classNamePrefix}-notification-error-icon`]: {
|
|
5132
|
-
color:
|
|
5136
|
+
color: 'var(--db-notification-icon-error)'
|
|
5133
5137
|
},
|
|
5134
5138
|
'&&[data-state="open"]': {
|
|
5135
5139
|
animation: `${slideInAnimation} 300ms cubic-bezier(0.16, 1, 0.3, 1)`
|
|
@@ -5190,7 +5194,7 @@ const Root$2 = // eslint-disable-next-line react-component-name/react-component-
|
|
|
5190
5194
|
...props,
|
|
5191
5195
|
...addDebugOutlineIfEnabled(),
|
|
5192
5196
|
...preventSwipeToClose(),
|
|
5193
|
-
className: classnames(className, themeClass),
|
|
5197
|
+
className: classnames(className, themeClass, DU_BOIS_ENABLE_ANIMATION_CLASSNAME),
|
|
5194
5198
|
style: {
|
|
5195
5199
|
...style,
|
|
5196
5200
|
...themeOverrideStyle
|
|
@@ -5210,6 +5214,16 @@ const Root$2 = // eslint-disable-next-line react-component-name/react-component-
|
|
|
5210
5214
|
});
|
|
5211
5215
|
});
|
|
5212
5216
|
// TODO: Support light and dark mode
|
|
5217
|
+
// Click-through: this fixed viewport band must not intercept clicks meant for content beneath it
|
|
5218
|
+
// (e.g. an open modal); toasts re-enable pointer events on their Root (standard Radix Toast pattern).
|
|
5219
|
+
// This MUST be a css class rather than part of the inline `getViewportStyle` below: the Root
|
|
5220
|
+
// re-enables pointer events via its own css class, and jsdom's getComputedStyle resolves only inline
|
|
5221
|
+
// styles, so an inline `none` here makes @testing-library/user-event treat every toast as
|
|
5222
|
+
// click-blocking in jsdom (it can't see the Root's class-based override) even though the click works
|
|
5223
|
+
// in a real browser. Keeping both declarations on classes stays symmetric across jsdom and browsers.
|
|
5224
|
+
const viewportClickThroughStyle = /*#__PURE__*/ css({
|
|
5225
|
+
pointerEvents: 'none'
|
|
5226
|
+
});
|
|
5213
5227
|
const getViewportStyle$1 = (theme)=>{
|
|
5214
5228
|
return {
|
|
5215
5229
|
position: 'fixed',
|
|
@@ -5217,19 +5231,19 @@ const getViewportStyle$1 = (theme)=>{
|
|
|
5217
5231
|
right: 0,
|
|
5218
5232
|
display: 'flex',
|
|
5219
5233
|
flexDirection: 'column',
|
|
5220
|
-
padding:
|
|
5221
|
-
gap:
|
|
5222
|
-
width:
|
|
5234
|
+
padding: 'var(--db-notification-viewport-padding)',
|
|
5235
|
+
gap: 'var(--db-notification-viewport-gap)',
|
|
5236
|
+
width: 'var(--db-notification-viewport-width)',
|
|
5223
5237
|
listStyle: 'none',
|
|
5224
5238
|
zIndex: theme.options.zIndexBase + 100,
|
|
5225
5239
|
outline: 'none',
|
|
5226
|
-
maxWidth:
|
|
5240
|
+
maxWidth: 'calc(100% - var(--db-notification-viewport-margin))'
|
|
5227
5241
|
};
|
|
5228
5242
|
};
|
|
5229
5243
|
const getTitleStyles = (theme)=>{
|
|
5230
5244
|
return /*#__PURE__*/ css({
|
|
5231
5245
|
fontWeight: theme.typography.typographyBoldFontWeight,
|
|
5232
|
-
color:
|
|
5246
|
+
color: 'var(--db-notification-text)',
|
|
5233
5247
|
gridRow: 'header / header',
|
|
5234
5248
|
gridColumn: 'content / content',
|
|
5235
5249
|
userSelect: 'text'
|
|
@@ -5245,47 +5259,42 @@ const Title = // eslint-disable-next-line react-component-name/react-component-n
|
|
|
5245
5259
|
children: children
|
|
5246
5260
|
});
|
|
5247
5261
|
});
|
|
5248
|
-
const
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
});
|
|
5257
|
-
};
|
|
5262
|
+
const DESCRIPTION_STYLES = /*#__PURE__*/ css({
|
|
5263
|
+
marginTop: 'var(--db-notification-description-gap)',
|
|
5264
|
+
color: 'var(--db-notification-text)',
|
|
5265
|
+
gridRow: 'content / content',
|
|
5266
|
+
gridColumn: 'content / content',
|
|
5267
|
+
userSelect: 'text',
|
|
5268
|
+
wordBreak: 'break-word'
|
|
5269
|
+
});
|
|
5258
5270
|
const Description = /*#__PURE__*/ forwardRef(function({ children, ...props }, ref) {
|
|
5259
|
-
const { theme } = useDesignSystemTheme();
|
|
5260
5271
|
return /*#__PURE__*/ jsx(Toast.Description, {
|
|
5261
5272
|
ref: ref,
|
|
5262
|
-
css:
|
|
5273
|
+
css: DESCRIPTION_STYLES,
|
|
5263
5274
|
...props,
|
|
5264
5275
|
children: children
|
|
5265
5276
|
});
|
|
5266
5277
|
});
|
|
5267
|
-
const
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5278
|
+
const CLOSE_STYLES = /*#__PURE__*/ css({
|
|
5279
|
+
color: 'var(--db-notification-icon)',
|
|
5280
|
+
position: 'absolute',
|
|
5281
|
+
// Offset close button position to align with the title, title uses 20px line height, button has 32px
|
|
5282
|
+
right: 'var(--db-notification-close-offset)',
|
|
5283
|
+
top: 'var(--db-notification-close-offset)'
|
|
5284
|
+
});
|
|
5285
|
+
const CLOSE_WRAPPER_STYLE = {
|
|
5286
|
+
gridColumn: 'close / close',
|
|
5287
|
+
gridRow: 'header / content',
|
|
5288
|
+
width: 'var(--db-notification-close-size)'
|
|
5275
5289
|
};
|
|
5276
5290
|
const Close = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
5277
|
-
const { theme } = useDesignSystemTheme();
|
|
5278
5291
|
const { closeLabel, componentId, analyticsEvents, ...restProps } = props;
|
|
5279
5292
|
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
5293
|
/*#__PURE__*/ jsx("div", {
|
|
5281
|
-
style:
|
|
5282
|
-
gridColumn: 'close / close',
|
|
5283
|
-
gridRow: 'header / content',
|
|
5284
|
-
width: 20
|
|
5285
|
-
},
|
|
5294
|
+
style: CLOSE_WRAPPER_STYLE,
|
|
5286
5295
|
children: /*#__PURE__*/ jsx(Toast.Close, {
|
|
5287
5296
|
ref: ref,
|
|
5288
|
-
css:
|
|
5297
|
+
css: CLOSE_STYLES,
|
|
5289
5298
|
...restProps,
|
|
5290
5299
|
asChild: true,
|
|
5291
5300
|
children: /*#__PURE__*/ jsx(Button$1, {
|
|
@@ -5307,6 +5316,7 @@ const Viewport = (props)=>{
|
|
|
5307
5316
|
const { theme } = useDesignSystemTheme();
|
|
5308
5317
|
return /*#__PURE__*/ jsx(Toast.Viewport, {
|
|
5309
5318
|
className: DU_BOIS_ENABLE_ANIMATION_CLASSNAME,
|
|
5319
|
+
css: viewportClickThroughStyle,
|
|
5310
5320
|
style: getViewportStyle$1(theme),
|
|
5311
5321
|
...props
|
|
5312
5322
|
});
|
|
@@ -5599,7 +5609,7 @@ const snackBarManager = new SnackBarManager();
|
|
|
5599
5609
|
|
|
5600
5610
|
const getCloseButtonStyles = (clsPrefix)=>{
|
|
5601
5611
|
const notLink = `:not(${getBtnClassName(clsPrefix, '-link', '')})`;
|
|
5602
|
-
const iconSelector =
|
|
5612
|
+
const iconSelector = `${getIconClassName()}`;
|
|
5603
5613
|
return /*#__PURE__*/ css({
|
|
5604
5614
|
marginLeft: 'var(--db-snackbar-close-button-spacing)',
|
|
5605
5615
|
flexShrink: 0,
|
|
@@ -5738,7 +5748,7 @@ const SnackBarRoot = /*#__PURE__*/ forwardRef(function SnackBarRoot({ snack }, r
|
|
|
5738
5748
|
return /*#__PURE__*/ jsxs(Toast.Root, {
|
|
5739
5749
|
ref: ref,
|
|
5740
5750
|
css: getSnackBarRootStyle(snack.backgroundColor, snack.textColor),
|
|
5741
|
-
className: themeClass
|
|
5751
|
+
className: `${themeClass} ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`,
|
|
5742
5752
|
style: {
|
|
5743
5753
|
...snack.closeButton === false ? {
|
|
5744
5754
|
cursor: 'pointer'
|
|
@@ -8506,4 +8516,4 @@ const DM_SANS_FONT_FAMILY = "'DM Sans', -apple-system, BlinkMacSystemFont, 'Sego
|
|
|
8506
8516
|
const DM_MONO_FONT_FAMILY = "'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace";
|
|
8507
8517
|
|
|
8508
8518
|
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-
|
|
8519
|
+
//# sourceMappingURL=index-CUCuUviS.js.map
|