@databricks/design-system 1.9.1 → 1.9.2

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 (58) hide show
  1. package/dist/Typography-04e40f87.js +1465 -0
  2. package/dist/Typography-04e40f87.js.map +1 -0
  3. package/dist/Typography-74e19785.js +1472 -0
  4. package/dist/Typography-74e19785.js.map +1 -0
  5. package/dist/design-system/AutoComplete/AutoComplete.d.ts.map +1 -1
  6. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +3 -1
  7. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  8. package/dist/design-system/Drawer/Drawer.d.ts +7 -1
  9. package/dist/design-system/Drawer/Drawer.d.ts.map +1 -1
  10. package/dist/design-system/FormMessage/FormMessage.d.ts.map +1 -1
  11. package/dist/design-system/Hooks/useDesignSystemTheme.d.ts.map +1 -1
  12. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts +4 -0
  13. package/dist/design-system/Icon/__generated/icons/BracketsXIcon.v2.d.ts.map +1 -0
  14. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts +4 -0
  15. package/dist/design-system/Icon/__generated/icons/CloudModelIcon.v2.d.ts.map +1 -0
  16. package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts +4 -0
  17. package/dist/design-system/Icon/__generated/icons/CursorIcon.v2.d.ts.map +1 -0
  18. package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts +4 -0
  19. package/dist/design-system/Icon/__generated/icons/DagIcon.v2.d.ts.map +1 -0
  20. package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts +4 -0
  21. package/dist/design-system/Icon/__generated/icons/DecimalIcon.v2.d.ts.map +1 -0
  22. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts +4 -0
  23. package/dist/design-system/Icon/__generated/icons/DotsCircleIcon.v2.d.ts.map +1 -0
  24. package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts +4 -0
  25. package/dist/design-system/Icon/__generated/icons/LettersIcon.v2.d.ts.map +1 -0
  26. package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts +4 -0
  27. package/dist/design-system/Icon/__generated/icons/NumbersIcon.v2.d.ts.map +1 -0
  28. package/dist/design-system/Icon/__generated/icons/index.d.ts +43 -1
  29. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  30. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  31. package/dist/design-system/Popover/Popover.d.ts +2 -1
  32. package/dist/design-system/Popover/Popover.d.ts.map +1 -1
  33. package/dist/design-system/Select/Select.d.ts.map +1 -1
  34. package/dist/design-system/Sidebar/Sidebar.d.ts +1 -1
  35. package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
  36. package/dist/design-system/ToggleButton/ToggleButton.d.ts.map +1 -1
  37. package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
  38. package/dist/development/Slider/Slider.d.ts.map +1 -1
  39. package/dist/development/TableUI/index.d.ts +14 -0
  40. package/dist/development/TableUI/index.d.ts.map +1 -1
  41. package/dist/development.js +70 -445
  42. package/dist/development.js.map +1 -1
  43. package/dist/index-dark.css +1 -0
  44. package/dist/index-mfe-dark.css +1 -0
  45. package/dist/index-mfe.css +1 -0
  46. package/dist/index.css +1 -0
  47. package/dist/index.js +259 -31
  48. package/dist/index.js.map +1 -1
  49. package/dist/theme/colorList.d.ts +1 -1
  50. package/dist/theme/colors.d.ts +3 -4
  51. package/dist/theme/colors.d.ts.map +1 -1
  52. package/dist/theme/convertToLessVars.d.ts +3 -4
  53. package/dist/theme/convertToLessVars.d.ts.map +1 -1
  54. package/dist/theme/generalVariables.d.ts +4 -0
  55. package/dist/theme/generalVariables.d.ts.map +1 -1
  56. package/dist/theme/index.d.ts +7 -3
  57. package/dist/theme/index.d.ts.map +1 -1
  58. package/package.json +3 -3
@@ -1,11 +1,11 @@
1
- import { useTheme, css } from '@emotion/react';
1
+ import { css } from '@emotion/react';
2
2
  import { useContext, createContext, forwardRef } from 'react';
3
3
  import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
4
- import { u as useDesignSystemTheme$1, T as Typography, S as SortAscendingIcon, n as SortDescendingIcon, o as SortUnsortedIcon, C as Checkbox } from './Typography-84a00e02.js';
4
+ import { u as useDesignSystemTheme, T as Typography, S as SortAscendingIcon, n as SortDescendingIcon, o as SortUnsortedIcon, C as Checkbox } from './Typography-74e19785.js';
5
5
  import * as RadixSlider from '@radix-ui/react-slider';
6
6
  import 'antd';
7
7
  import 'classnames';
8
- import chroma from 'chroma-js';
8
+ import 'chroma-js';
9
9
  import '@ant-design/icons';
10
10
  import 'lodash/isNil';
11
11
  import 'lodash/endsWith';
@@ -20,19 +20,19 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return "You have tried to string
20
20
  // We're also using CSS Variables rather than any dynamic styles so that the style object remains static.
21
21
  const tableStyles = {
22
22
  row: process.env.NODE_ENV === "production" ? {
23
- name: "q4mdqg",
24
- styles: "display:flex;border-bottom:1px solid;border-color:var(--table-border);.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{[role=\"cell\"]{background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}"
23
+ name: "ky51lg",
24
+ styles: "display:flex;border-bottom:1px solid;border-color:var(--table-separator-color);.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{[role=\"cell\"]{background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}"
25
25
  } : {
26
- name: "1218dqd-row",
27
- styles: "display:flex;border-bottom:1px solid;border-color:var(--table-border);.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{[role=\"cell\"]{background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;};label:row;",
26
+ name: "1d4iyc6-row",
27
+ styles: "display:flex;border-bottom:1px solid;border-color:var(--table-separator-color);.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{[role=\"cell\"]{background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;};label:row;",
28
28
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
29
29
  },
30
30
  cell: process.env.NODE_ENV === "production" ? {
31
- name: "1844uvd",
32
- styles: "display:inline-grid;align-items:var(--table-row-vertical-alignment, flex-start);flex:1;line-height:initial;padding:6px 8px;&[role=\"columnheader\"]{padding:8px;}"
31
+ name: "f9sm18",
32
+ styles: "display:inline-grid;position:relative;align-items:var(--table-row-vertical-alignment, flex-start);flex:1;line-height:initial;padding:6px 8px;box-sizing:border-box;&[role=\"columnheader\"]{padding:8px;}"
33
33
  } : {
34
- name: "oqyg7z-cell",
35
- styles: "display:inline-grid;align-items:var(--table-row-vertical-alignment, flex-start);flex:1;line-height:initial;padding:6px 8px;&[role=\"columnheader\"]{padding:8px;};label:cell;",
34
+ name: "10m9yho-cell",
35
+ styles: "display:inline-grid;position:relative;align-items:var(--table-row-vertical-alignment, flex-start);flex:1;line-height:initial;padding:6px 8px;box-sizing:border-box;&[role=\"columnheader\"]{padding:8px;};label:cell;",
36
36
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
37
37
  },
38
38
  cellSmall: process.env.NODE_ENV === "production" ? {
@@ -66,6 +66,27 @@ const tableStyles = {
66
66
  name: "177274n-checkboxCell",
67
67
  styles: "padding:0 0 0 8px;display:flex;align-items:center;flex:0;label:checkboxCell;",
68
68
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
69
+ },
70
+ resizeHandleContainer: /*#__PURE__*/css({
71
+ position: 'absolute',
72
+ right: -3,
73
+ top: 8,
74
+ bottom: 8,
75
+ width: 8,
76
+ display: 'flex',
77
+ justifyContent: 'center',
78
+ cursor: 'col-resize',
79
+ userSelect: 'none',
80
+ touchAction: 'none',
81
+ zIndex: 1
82
+ }, process.env.NODE_ENV === "production" ? "" : ";label:resizeHandleContainer;"),
83
+ resizeHandle: process.env.NODE_ENV === "production" ? {
84
+ name: "gpjshw",
85
+ styles: "width:1px;background:var(--table-separator-color)"
86
+ } : {
87
+ name: "1n6mwr7-resizeHandle",
88
+ styles: "width:1px;background:var(--table-separator-color);label:resizeHandle;",
89
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
69
90
  }
70
91
  };
71
92
  const TableContext = /*#__PURE__*/createContext({
@@ -75,23 +96,26 @@ const Table = _ref => {
75
96
  let {
76
97
  children,
77
98
  size = 'default',
78
- someRowsSelected
99
+ someRowsSelected,
100
+ style
79
101
  } = _ref;
80
102
  const {
81
103
  theme
82
- } = useDesignSystemTheme$1();
104
+ } = useDesignSystemTheme();
83
105
  return jsx(TableContext.Provider, {
84
106
  value: {
85
107
  size,
86
108
  someRowsSelected
87
109
  },
88
110
  children: jsx("div", {
89
- role: "table" // This is a performance optimization; we want to statically create the styles for the table,
111
+ role: "table"
112
+ // This is a performance optimization; we want to statically create the styles for the table,
90
113
  // but for the dynamic theme values, we need to use CSS variables.
91
114
  // See: https://emotion.sh/docs/best-practices#advanced-css-variables-with-style
92
115
  ,
93
116
  style: {
94
- ['--table-border']: theme.colors.tableBorder,
117
+ ...style,
118
+ ['--table-separator-color']: theme.colors.tableSeparatorColor,
95
119
  ['--table-row-hover']: theme.colors.tableRowHover
96
120
  },
97
121
  children: children
@@ -124,7 +148,8 @@ const TableRow = _ref2 => {
124
148
  const TableCell = _ref3 => {
125
149
  let {
126
150
  children,
127
- ellipsis = false
151
+ ellipsis = false,
152
+ style
128
153
  } = _ref3;
129
154
  const {
130
155
  size
@@ -136,6 +161,7 @@ const TableCell = _ref3 => {
136
161
  return jsx("div", {
137
162
  css: [tableStyles.cell, size === 'small' && tableStyles.cellSmall, process.env.NODE_ENV === "production" ? "" : ";label:TableCell;"],
138
163
  role: "cell",
164
+ style: style,
139
165
  children: jsx(Typography.Text, {
140
166
  ellipsis: ellipsis,
141
167
  size: typographySize,
@@ -150,11 +176,12 @@ const TableHeader = _ref4 => {
150
176
  ellipsis = false,
151
177
  sortable,
152
178
  sortDirection,
153
- onToggleSort
179
+ onToggleSort,
180
+ style
154
181
  } = _ref4;
155
182
  const {
156
183
  theme
157
- } = useDesignSystemTheme$1();
184
+ } = useDesignSystemTheme();
158
185
  const {
159
186
  size
160
187
  } = useContext(TableContext);
@@ -195,6 +222,7 @@ const TableHeader = _ref4 => {
195
222
  css: [tableStyles.cell, tableStyles.header, size === 'small' && tableStyles.cellSmall, process.env.NODE_ENV === "production" ? "" : ";label:TableHeader;"],
196
223
  role: "columnheader",
197
224
  "aria-sort": sortable && ariaSort || undefined,
225
+ style: style,
198
226
  children: sortable ? jsxs("div", {
199
227
  css: [tableStyles.headerButtonTarget, process.env.NODE_ENV === "production" ? "" : ";label:TableHeader;"],
200
228
  role: "button",
@@ -215,13 +243,34 @@ const TableHeader = _ref4 => {
215
243
  }) : textContents
216
244
  });
217
245
  };
218
- const TableRowSelectCell = _ref5 => {
246
+ const TableHeaderResizeHandle = _ref5 => {
247
+ let {
248
+ style,
249
+ resizeHandler
250
+ } = _ref5;
251
+ const {
252
+ isHeader
253
+ } = useContext(TableRowContext);
254
+ if (!isHeader) {
255
+ throw new Error('`TableHeaderResizeHandle` must be used within a `TableRow` with `isHeader` set to true.');
256
+ }
257
+ return jsx("div", {
258
+ onMouseDown: resizeHandler,
259
+ onTouchStart: resizeHandler,
260
+ css: tableStyles.resizeHandleContainer,
261
+ style: style,
262
+ children: jsx("div", {
263
+ css: tableStyles.resizeHandle
264
+ })
265
+ });
266
+ };
267
+ const TableRowSelectCell = _ref6 => {
219
268
  let {
220
269
  onChange,
221
270
  checked,
222
271
  indeterminate,
223
272
  noCheckbox
224
- } = _ref5;
273
+ } = _ref6;
225
274
  const {
226
275
  isHeader
227
276
  } = useContext(TableRowContext);
@@ -257,430 +306,6 @@ const TableRowSelectCell = _ref5 => {
257
306
  });
258
307
  };
259
308
 
260
- // Border variables
261
- const borders = {
262
- borderRadiusMd: 4
263
- };
264
-
265
- // eslint-disable-next-line import/no-anonymous-default-export
266
- var borders$1 = {
267
- ...borders
268
- };
269
-
270
- // Exported from go/designsystem/colorsheet
271
- const colorPalettePrimary = {
272
- primary: '#2272B4',
273
- blue100: '#F0F8FF',
274
- blue200: '#D7EDFE',
275
- blue300: '#BAE1FC',
276
- blue400: '#8ACAFF',
277
- blue500: '#4299E0',
278
- blue600: '#2272B4',
279
- blue700: '#0E538B',
280
- blue800: '#04355D',
281
- green100: '#F3FCF6',
282
- green200: '#D4F7DF',
283
- green300: '#B1ECC5',
284
- green400: '#8DDDA8',
285
- green500: '#3CAA60',
286
- green600: '#277C43',
287
- green700: '#115026',
288
- green800: '#093919',
289
- white: '#FFFFFF',
290
- grey100: '#F2F5F7',
291
- grey200: '#E4ECF1',
292
- grey300: '#CDDAE5',
293
- grey400: '#BDCDDB',
294
- grey500: '#8196A7',
295
- grey600: '#5D7283',
296
- grey700: '#44535F',
297
- grey800: '#1F272D',
298
- red100: '#FFF5F7',
299
- red200: '#FDE2E8',
300
- red300: '#FBD0D8',
301
- red400: '#F792A6',
302
- red500: '#E65B77',
303
- red600: '#C82D4C',
304
- red700: '#9E102C',
305
- red800: '#630316',
306
- yellow100: '#FFF9EB',
307
- yellow200: '#FCEACA',
308
- yellow300: '#F8D4A5',
309
- yellow400: '#F2BE88',
310
- yellow500: '#DE7921',
311
- yellow600: '#BE501E',
312
- yellow700: '#93320B',
313
- yellow800: '#5F1B02'
314
- };
315
- const colorPaletteSecondary = {
316
- brown: '#A6630C',
317
- coral: '#C83243',
318
- charcoal: '#5D7283',
319
- indigo: '#434A93',
320
- lemon: '#FACB66',
321
- lime: '#308613',
322
- pink: '#B45091',
323
- purple: '#8A63BF',
324
- teal: '#04867D',
325
- turquoise: '#157CBC'
326
- };
327
-
328
- // Colors taken from figma designs but not part of official list (yet)
329
- const unstableColors = {
330
- textValidationInfo: '#64727D',
331
- backgroundValidationDanger: colorPalettePrimary.red100,
332
- backgroundValidationSuccess: colorPalettePrimary.blue100,
333
- backgroundValidationWarning: colorPalettePrimary.yellow100,
334
- borderValidationDanger: colorPalettePrimary.red300,
335
- borderValidationSuccess: colorPalettePrimary.blue300,
336
- borderValidationWarning: colorPalettePrimary.yellow300
337
- };
338
- const lightColorList = {
339
- backgroundPrimary: colorPalettePrimary.white,
340
- actionDangerPrimaryBackgroundDefault: colorPalettePrimary.red600,
341
- actionDangerPrimaryBackgroundHover: colorPalettePrimary.red700,
342
- actionDangerPrimaryBackgroundPress: colorPalettePrimary.red800,
343
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red600).alpha(0).hex(),
344
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red600).alpha(0.08).hex(),
345
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red600).alpha(0.16).hex(),
346
- actionDangerDefaultBorderDefault: colorPalettePrimary.red600,
347
- actionDangerDefaultBorderHover: colorPalettePrimary.red700,
348
- actionDangerDefaultBorderPress: colorPalettePrimary.red800,
349
- actionDangerDefaultTextDefault: colorPalettePrimary.red600,
350
- actionDangerDefaultTextHover: colorPalettePrimary.red700,
351
- actionDangerDefaultTextPress: colorPalettePrimary.red800,
352
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue800).alpha(0).hex(),
353
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
354
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
355
- actionDefaultBorderDefault: colorPalettePrimary.grey300,
356
- actionDefaultBorderFocus: colorPalettePrimary.blue600,
357
- actionDefaultBorderHover: colorPalettePrimary.blue700,
358
- actionDefaultBorderPress: colorPalettePrimary.blue800,
359
- actionDefaultTextDefault: colorPalettePrimary.grey800,
360
- actionDefaultTextHover: colorPalettePrimary.blue700,
361
- actionDefaultTextPress: colorPalettePrimary.blue800,
362
- actionDisabledBackground: colorPalettePrimary.grey200,
363
- actionDisabledText: colorPalettePrimary.grey400,
364
- actionPrimaryBackgroundDefault: colorPalettePrimary.blue600,
365
- actionPrimaryBackgroundHover: colorPalettePrimary.blue700,
366
- actionPrimaryBackgroundPress: colorPalettePrimary.blue800,
367
- actionPrimaryTextDefault: colorPalettePrimary.white,
368
- actionPrimaryTextHover: colorPalettePrimary.white,
369
- actionPrimaryTextPress: colorPalettePrimary.white,
370
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue600).alpha(0).hex(),
371
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue600).alpha(0.08).hex(),
372
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue600).alpha(0.16).hex(),
373
- actionTertiaryTextDefault: colorPalettePrimary.blue600,
374
- actionTertiaryTextHover: colorPalettePrimary.blue700,
375
- actionTertiaryTextPress: colorPalettePrimary.blue800,
376
- backgroundDanger: chroma(colorPalettePrimary.red100).alpha(0.08).hex(),
377
- backgroundSecondary: colorPalettePrimary.grey100,
378
- backgroundWarning: chroma(colorPalettePrimary.yellow100).alpha(0.08).hex(),
379
- border: colorPalettePrimary.grey300,
380
- borderDecorative: colorPalettePrimary.grey300,
381
- textPrimary: colorPalettePrimary.grey800,
382
- textSecondary: colorPalettePrimary.grey600,
383
- textPlaceholder: colorPalettePrimary.grey400,
384
- textValidationDanger: colorPalettePrimary.red600,
385
- textValidationSuccess: colorPalettePrimary.green600,
386
- textValidationWarning: colorPalettePrimary.yellow600,
387
- overlayOverlay: chroma(colorPalettePrimary.grey100).alpha(0.72).hex(),
388
- // Tags
389
- tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
390
- tagBrown: colorPaletteSecondary.brown,
391
- tagCoral: colorPaletteSecondary.coral,
392
- tagCharcoal: colorPalettePrimary.grey600,
393
- tagIndigo: colorPaletteSecondary.indigo,
394
- tagLemon: colorPaletteSecondary.lemon,
395
- tagLime: colorPaletteSecondary.lime,
396
- tagPink: colorPaletteSecondary.pink,
397
- tagPurple: colorPaletteSecondary.purple,
398
- tagTeal: colorPaletteSecondary.teal,
399
- tagTurquoise: colorPaletteSecondary.turquoise,
400
- tagText: colorPalettePrimary.white,
401
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
402
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
403
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
404
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
405
- // Typography
406
- typographyCodeBg: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
407
- // Table
408
- tableBorder: colorPalettePrimary.grey200,
409
- tableRowHover: chroma(colorPalettePrimary.grey600).alpha(0.04).hex(),
410
- tooltipBackgroundTooltip: colorPalettePrimary.grey800,
411
- ...unstableColors
412
- };
413
- const darkColorList = {
414
- actionDangerPrimaryBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
415
- actionDangerPrimaryBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
416
- actionDangerPrimaryBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
417
- actionDangerDefaultBackgroundDefault: chroma(colorPalettePrimary.red400).alpha(0).hex(),
418
- actionDangerDefaultBackgroundHover: chroma(colorPalettePrimary.red400).alpha(0.08).hex(),
419
- actionDangerDefaultBackgroundPress: chroma(colorPalettePrimary.red400).alpha(0.16).hex(),
420
- actionDangerDefaultBorderDefault: colorPalettePrimary.red400,
421
- actionDangerDefaultBorderHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
422
- actionDangerDefaultBorderPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
423
- actionDangerDefaultTextDefault: colorPalettePrimary.red400,
424
- actionDangerDefaultTextHover: chroma(colorPalettePrimary.red400).alpha(0.72).hex(),
425
- actionDangerDefaultTextPress: chroma(colorPalettePrimary.red400).alpha(0.6).hex(),
426
- actionDefaultBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
427
- actionDefaultBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
428
- actionDefaultBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
429
- actionDefaultBorderDefault: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
430
- actionDefaultBorderFocus: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
431
- actionDefaultBorderHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
432
- actionDefaultBorderPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
433
- actionDefaultTextDefault: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
434
- actionDefaultTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
435
- actionDefaultTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
436
- actionDisabledBackground: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
437
- actionDisabledText: chroma(colorPalettePrimary.white).alpha(0.4).hex(),
438
- actionPrimaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
439
- actionPrimaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
440
- actionPrimaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
441
- actionPrimaryTextDefault: colorPalettePrimary.grey800,
442
- actionPrimaryTextHover: colorPalettePrimary.grey800,
443
- actionPrimaryTextPress: colorPalettePrimary.grey800,
444
- actionTertiaryBackgroundDefault: chroma(colorPalettePrimary.blue400).alpha(0).hex(),
445
- actionTertiaryBackgroundHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
446
- actionTertiaryBackgroundPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
447
- actionTertiaryTextDefault: chroma(colorPalettePrimary.blue400).alpha(0.84).hex(),
448
- actionTertiaryTextHover: chroma(colorPalettePrimary.blue400).alpha(0.8).hex(),
449
- actionTertiaryTextPress: chroma(colorPalettePrimary.blue400).alpha(0.76).hex(),
450
- backgroundPrimary: colorPalettePrimary.grey800,
451
- backgroundSecondary: chroma(colorPalettePrimary.white).alpha(0.04).hex(),
452
- border: chroma(colorPalettePrimary.white).alpha(0.48).hex(),
453
- borderDecorative: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
454
- textPrimary: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
455
- textSecondary: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
456
- textPlaceholder: chroma(colorPalettePrimary.grey400).alpha(0.84).hex(),
457
- textValidationDanger: chroma(colorPalettePrimary.red400).alpha(0.84).hex(),
458
- textValidationSuccess: chroma(colorPalettePrimary.green400).alpha(0.84).hex(),
459
- textValidationWarning: chroma(colorPalettePrimary.yellow400).alpha(0.84).hex(),
460
- overlayOverlay: chroma(colorPalettePrimary.grey800).alpha(0.72).hex(),
461
- // Tags
462
- tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
463
- tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
464
- tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
465
- tagCharcoal: chroma(colorPalettePrimary.grey600).alpha(0.84).hex(),
466
- tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
467
- tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
468
- tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
469
- tagPink: chroma(colorPaletteSecondary.pink).alpha(0.84).hex(),
470
- tagPurple: chroma(colorPaletteSecondary.purple).alpha(0.84).hex(),
471
- tagTeal: chroma(colorPaletteSecondary.teal).alpha(0.84).hex(),
472
- tagTurquoise: chroma(colorPaletteSecondary.turquoise).alpha(0.84).hex(),
473
- tagText: chroma(colorPalettePrimary.white).alpha(0.84).hex(),
474
- tagHover: chroma(colorPalettePrimary.blue400).alpha(0.08).hex(),
475
- tagPress: chroma(colorPalettePrimary.blue400).alpha(0.16).hex(),
476
- tagIconHover: chroma(colorPalettePrimary.white).alpha(0.8).hex(),
477
- tagIconPress: chroma(colorPalettePrimary.white).alpha(0.76).hex(),
478
- // Typography
479
- typographyCodeBg: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
480
- // Table
481
- tableBorder: chroma(colorPalettePrimary.white).alpha(0.24).hex(),
482
- tableRowHover: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
483
- tooltipBackgroundTooltip: chroma(colorPalettePrimary.white).alpha(0.6).hex(),
484
- // Missing in list
485
- backgroundDanger: 'rgba(200,45,76,0.08)',
486
- backgroundWarning: 'rgba(222,121,33,0.08)',
487
- // Missing in light list
488
- // "background-validation-danger": "rgba(229,110,134,0)",
489
- // "background-validation-warning": "rgba(252,234,202,0)",
490
- ...unstableColors
491
- };
492
- const darkColors = {
493
- ...darkColorList,
494
- ...colorPalettePrimary,
495
- ...colorPaletteSecondary
496
- };
497
- const lightColors = {
498
- ...lightColorList,
499
- ...colorPalettePrimary,
500
- ...colorPaletteSecondary
501
- };
502
- function getSemanticColors(theme) {
503
- switch (theme) {
504
- case 'dark':
505
- return {
506
- ...darkColors
507
- };
508
- default:
509
- return {
510
- ...lightColors
511
- };
512
- }
513
- }
514
-
515
- // TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
516
- /*
517
- Colors that need to be replaced by semantic colors.
518
- */
519
- const deprecatedColors = {
520
- // Radio Colors
521
- radioInteractiveAvailable: colorPalettePrimary.primary,
522
- radioInteractiveHover: '#186099',
523
- radioInteractivePress: '#0D4F85',
524
- radioDisabled: '#A2AEB8',
525
- radioDefaultBorder: '#64727D',
526
- radioDefaultBackground: '#FFFFFF',
527
- radioInteractiveHoverSecondary: 'rgba(34, 115, 181, 0.08)',
528
- // Fade of Interactive Available
529
- radioInteractivePressSecondary: 'rgba(34, 115, 181, 0.16)' // Fade of Interactive Available
530
- };
531
-
532
- function getColors(theme) {
533
- return {
534
- ...deprecatedColors,
535
- ...getSemanticColors(theme)
536
- };
537
- }
538
-
539
- // eslint-disable-next-line import/no-anonymous-default-export
540
- var antdVars = {
541
- // IMPORTANT: Do not read this directly from components. Use `React.useContext`.
542
- 'ant-prefix': 'du-bois'
543
- };
544
- const DEFAULT_SPACING_UNIT = 8;
545
- const MODAL_PADDING = 40;
546
- const spacing = {
547
- xs: DEFAULT_SPACING_UNIT / 2,
548
- sm: DEFAULT_SPACING_UNIT,
549
- md: DEFAULT_SPACING_UNIT * 2,
550
- lg: DEFAULT_SPACING_UNIT * 3
551
- };
552
-
553
- // Less variables that are used by AntD
554
- ({
555
- defaultPaddingLg: spacing.lg,
556
- defaultPaddingMd: spacing.md,
557
- defaultPaddingSm: spacing.sm,
558
- defaultPaddingXs: spacing.sm,
559
- defaultPaddingXss: spacing.xs,
560
- paddingLg: spacing.md,
561
- // TODO: Check if there is a better alternative with team
562
- paddingMd: spacing.sm,
563
- paddingSm: spacing.sm,
564
- paddingXs: spacing.xs,
565
- paddingXss: 0,
566
- marginSm: 12,
567
- marginLg: spacing.lg,
568
- // Button
569
- btnPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 2,
570
- btnPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 2,
571
- btnPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 2,
572
- // Input
573
- inputPaddingHorizontal: DEFAULT_SPACING_UNIT * 1.5,
574
- inputPaddingHorizontalBase: DEFAULT_SPACING_UNIT * 1.5,
575
- inputPaddingHorizontalSm: DEFAULT_SPACING_UNIT * 1.5,
576
- inputPaddingHorizontalLg: DEFAULT_SPACING_UNIT * 1.5,
577
- inputPaddingVertical: spacing.xs + 1,
578
- inputPaddingVerticalBase: spacing.xs + 1,
579
- inputPaddingVerticalSm: spacing.xs + 1,
580
- inputPaddingVerticalLg: spacing.xs + 1,
581
- // Modal
582
- modalPadding: MODAL_PADDING,
583
- modalLessPadding: MODAL_PADDING - 20,
584
- modalHeaderPadding: "".concat(MODAL_PADDING, "px ").concat(MODAL_PADDING, "px ").concat(MODAL_PADDING - 20, "px"),
585
- modalHeaderCloseSize: MODAL_PADDING * 2 + 22,
586
- modalHeaderBorderWidth: 0,
587
- modalBodyPadding: "0 ".concat(MODAL_PADDING, "px"),
588
- modalFooterPaddingVertical: 0,
589
- modalFooterPaddingHorizontal: 0,
590
- modalFooterBorderWidth: 0,
591
- // Switch
592
- switchPadding: 0,
593
- switchHeight: 16,
594
- switchMinWidth: 28,
595
- switchPinSize: 14
596
- });
597
- var spacing$1 = spacing;
598
- const heightBase = 40;
599
- const borderWidth = 1;
600
- const antdGeneralVariables = {
601
- classnamePrefix: antdVars['ant-prefix'],
602
- iconfontCssPrefix: 'anticon',
603
- borderRadiusBase: 4,
604
- borderWidth: borderWidth,
605
- heightSm: 32,
606
- heightBase: heightBase,
607
- iconSize: 24,
608
- // TODO (FEINF-1545): Update with icon overhaul to 16px
609
- iconFontSize: 13,
610
- iconFontSizeNew: 16,
611
- buttonHeight: heightBase,
612
- // Height available within button (for label and icon). Same for middle and small buttons.
613
- buttonInnerHeight: heightBase - spacing$1.sm * 2 - borderWidth * 2
614
- };
615
- var generalVariables = antdGeneralVariables;
616
- const FONT_SIZE_BASE = 13;
617
-
618
- // Less variables that are used by AntD
619
- const antdTypography = {
620
- fontSizeSm: 12,
621
- fontSizeBase: FONT_SIZE_BASE,
622
- fontSizeMd: FONT_SIZE_BASE,
623
- fontSizeLg: 18,
624
- fontSizeXl: 22,
625
- fontSizeXxl: 32,
626
- lineHeightSm: '16px',
627
- lineHeightBase: '20px',
628
- lineHeightMd: '20px',
629
- lineHeightLg: '24px',
630
- lineHeightXl: '28px',
631
- lineHeightXxl: '40px',
632
- typographyBoldFontWeight: 600
633
- };
634
-
635
- // eslint-disable-next-line import/no-anonymous-default-export
636
- var typography = {
637
- ...antdTypography
638
- };
639
-
640
- // TODO(giles): fix this
641
- // eslint-disable-next-line import/no-named-as-default
642
-
643
- const defaultOptions = {
644
- enableAnimation: false,
645
- zIndexBase: 1000
646
- };
647
-
648
- // Function to get variables for a certain theme.
649
- // End users should use useDesignSystemTheme instead.
650
- function getTheme(themeName) {
651
- let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOptions;
652
- return {
653
- colors: getColors(themeName),
654
- spacing: spacing$1,
655
- general: generalVariables,
656
- typography,
657
- borders: borders$1,
658
- themeName,
659
- options
660
- };
661
- }
662
- const themeNameToAntdName = {
663
- dark: 'dark',
664
- default: 'light'
665
- };
666
- function getClassNamePrefix(theme) {
667
- const antdThemeName = themeNameToAntdName[theme.themeName];
668
- return "".concat(theme.general.classnamePrefix, "-").concat(antdThemeName);
669
- }
670
- function getPrefixedClassNameFromTheme(theme, className) {
671
- return [getClassNamePrefix(theme), className].filter(Boolean).join('-');
672
- }
673
- function useDesignSystemTheme() {
674
- const emotionTheme = useTheme();
675
- // Graceful fallback to default theme in case a test or developer forgot context.
676
- const theme = emotionTheme && emotionTheme.general ? emotionTheme : getTheme('default');
677
- return {
678
- theme: theme,
679
- classNamePrefix: getClassNamePrefix(theme),
680
- getPrefixedClassName: className => getPrefixedClassNameFromTheme(theme, className)
681
- };
682
- }
683
-
684
309
  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)."; }
685
310
  var _ref = process.env.NODE_ENV === "production" ? {
686
311
  name: "1tciq3q",
@@ -785,5 +410,5 @@ var Slider = /*#__PURE__*/Object.freeze({
785
410
  Thumb: Thumb
786
411
  });
787
412
 
788
- export { Slider, Table, TableCell, TableHeader, TableRow, TableRowSelectCell };
413
+ export { Slider, Table, TableCell, TableHeader, TableHeaderResizeHandle, TableRow, TableRowSelectCell };
789
414
  //# sourceMappingURL=development.js.map