@spaced-out/ui-design-system 0.0.38 → 0.0.40

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 (45) hide show
  1. package/.cspell/custom-words.txt +3 -0
  2. package/.storybook/public/images/personas/1.png +0 -0
  3. package/.storybook/public/images/personas/2.png +0 -0
  4. package/.storybook/public/images/personas/3.png +0 -0
  5. package/.storybook/public/images/personas/4.png +0 -0
  6. package/.storybook/public/images/personas/5.png +0 -0
  7. package/.storybook/public/images/personas/6.png +0 -0
  8. package/CHANGELOG.md +20 -0
  9. package/design-tokens/color/base-color.json +128 -0
  10. package/design-tokens/size/base-size.json +9 -0
  11. package/lib/components/Checkbox/Checkbox.js.flow +5 -0
  12. package/lib/components/Checkbox/Checkbox.module.css +1 -1
  13. package/lib/components/Input/Input.js +22 -2
  14. package/lib/components/Input/Input.js.flow +37 -1
  15. package/lib/components/Input/Input.module.css +27 -1
  16. package/lib/components/Input/index.js +11 -7
  17. package/lib/components/Input/index.js.flow +1 -2
  18. package/lib/components/Menu/Menu.js +1 -1
  19. package/lib/components/Menu/Menu.js.flow +2 -2
  20. package/lib/components/Menu/MenuOptionButton.js.flow +1 -1
  21. package/lib/components/Menu/index.js +1 -1
  22. package/lib/components/Menu/index.js.flow +1 -1
  23. package/lib/components/Table/Cell.js +114 -0
  24. package/lib/components/Table/Cell.js.flow +123 -0
  25. package/lib/components/Table/Row.js +96 -0
  26. package/lib/components/Table/Row.js.flow +145 -0
  27. package/lib/components/Table/StaticTable.js +124 -0
  28. package/lib/components/Table/StaticTable.js.flow +170 -0
  29. package/lib/components/Table/Table.js +61 -0
  30. package/lib/components/Table/Table.js.flow +101 -0
  31. package/lib/components/Table/Table.module.css +252 -0
  32. package/lib/components/Table/TableHeader.js +146 -0
  33. package/lib/components/Table/TableHeader.js.flow +236 -0
  34. package/lib/components/Table/hooks.js +68 -0
  35. package/lib/components/Table/hooks.js.flow +91 -0
  36. package/lib/components/Table/index.js +63 -0
  37. package/lib/components/Table/index.js.flow +14 -0
  38. package/lib/components/Tabs/TabList/TabList.js +1 -1
  39. package/lib/components/Tabs/TabList/TabList.js.flow +1 -1
  40. package/lib/styles/variables/_size.css +6 -0
  41. package/lib/styles/variables/_size.js +8 -2
  42. package/lib/styles/variables/_size.js.flow +6 -0
  43. package/lib/utils/makeClassNameComponent.js +1 -1
  44. package/lib/utils/makeClassNameComponent.js.flow +1 -1
  45. package/package.json +4 -3
@@ -5,6 +5,7 @@ CODEOWNERS
5
5
  commitlint
6
6
  contributorsrc
7
7
  Crespo
8
+ datetime
8
9
  DEFAULTTEXT
9
10
  dismissable
10
11
  eqeqeq
@@ -15,6 +16,8 @@ Gaurav
15
16
  Lipsey
16
17
  Neue
17
18
  Nishant
19
+ nonbreaking
20
+ nonstrict
18
21
  OPACITYS
19
22
  partialformat
20
23
  premajor
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.40](https://github.com/spaced-out/ui-design-system/compare/v0.0.39...v0.0.40) (2023-03-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * base color swatches story with tertiary colors ([06ba3ef](https://github.com/spaced-out/ui-design-system/commit/06ba3efb8cb04513ae3e4f996bfca4801a102ef8))
11
+ * navite color and date pickers ([4924edc](https://github.com/spaced-out/ui-design-system/commit/4924edccb91ff0616c3ed644491221d29c0c70a8))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * added static images as personas ([a42bbd2](https://github.com/spaced-out/ui-design-system/commit/a42bbd2c9cf1a9390ab839bd8f489d3be63883e8))
17
+
18
+ ### [0.0.39](https://github.com/spaced-out/ui-design-system/compare/v0.0.38...v0.0.39) (2023-03-03)
19
+
20
+
21
+ ### Features
22
+
23
+ * (GDS-145) table component ([#70](https://github.com/spaced-out/ui-design-system/issues/70)) ([5d4ccf8](https://github.com/spaced-out/ui-design-system/commit/5d4ccf8c8097cdb545ad9b1086569146b072d761))
24
+
5
25
  ### [0.0.38](https://github.com/spaced-out/ui-design-system/compare/v0.0.37...v0.0.38) (2023-03-03)
6
26
 
7
27
 
@@ -251,6 +251,134 @@
251
251
  "value": "#5f0c20"
252
252
  }
253
253
  },
254
+ "yellow": {
255
+ "50": {
256
+ "value": "#FCF8E7"
257
+ },
258
+ "100": {
259
+ "value": "#F5EBB4"
260
+ },
261
+ "200": {
262
+ "value": "#F0E190"
263
+ },
264
+ "300": {
265
+ "value": "#EAD35D"
266
+ },
267
+ "400": {
268
+ "value": "#E5CA3D"
269
+ },
270
+ "500": {
271
+ "value": "#DFBD0D"
272
+ },
273
+ "600": {
274
+ "value": "#CBAC0C"
275
+ },
276
+ "700": {
277
+ "value": "#9E8609"
278
+ },
279
+ "800": {
280
+ "value": "#7B6807"
281
+ },
282
+ "900": {
283
+ "value": "#5E4F05"
284
+ }
285
+ },
286
+ "teal": {
287
+ "50": {
288
+ "value": "#E6FAF6"
289
+ },
290
+ "100": {
291
+ "value": "#B0F0E3"
292
+ },
293
+ "200": {
294
+ "value": "#8AE9D6"
295
+ },
296
+ "300": {
297
+ "value": "#54E0C3"
298
+ },
299
+ "400": {
300
+ "value": "#33D9B8"
301
+ },
302
+ "500": {
303
+ "value": "#00D0A6"
304
+ },
305
+ "600": {
306
+ "value": "#00BD97"
307
+ },
308
+ "700": {
309
+ "value": "#009476"
310
+ },
311
+ "800": {
312
+ "value": "#00725B"
313
+ },
314
+ "900": {
315
+ "value": "#005746"
316
+ }
317
+ },
318
+ "violet": {
319
+ "50": {
320
+ "value": "#F7E9FB"
321
+ },
322
+ "100": {
323
+ "value": "#E7BCF2"
324
+ },
325
+ "200": {
326
+ "value": "#DC9CEB"
327
+ },
328
+ "300": {
329
+ "value": "#CC6EE2"
330
+ },
331
+ "400": {
332
+ "value": "#C252DD"
333
+ },
334
+ "500": {
335
+ "value": "#B327D4"
336
+ },
337
+ "600": {
338
+ "value": "#A323C1"
339
+ },
340
+ "700": {
341
+ "value": "#7F1C97"
342
+ },
343
+ "800": {
344
+ "value": "#621575"
345
+ },
346
+ "900": {
347
+ "value": "#4B1059"
348
+ }
349
+ },
350
+ "pink": {
351
+ "50": {
352
+ "value": "#FCE8F5"
353
+ },
354
+ "100": {
355
+ "value": "#F5B8E1"
356
+ },
357
+ "200": {
358
+ "value": "#F196D2"
359
+ },
360
+ "300": {
361
+ "value": "#EA66BD"
362
+ },
363
+ "400": {
364
+ "value": "#E648B1"
365
+ },
366
+ "500": {
367
+ "value": "#E01A9D"
368
+ },
369
+ "600": {
370
+ "value": "#CC188F"
371
+ },
372
+ "700": {
373
+ "value": "#9F126F"
374
+ },
375
+ "800": {
376
+ "value": "#7B0E56"
377
+ },
378
+ "900": {
379
+ "value": "#5E0B42"
380
+ }
381
+ },
254
382
  "white": {
255
383
  "100": {
256
384
  "value": "#ffffff"
@@ -51,12 +51,18 @@
51
51
  "42": {
52
52
  "value": "42px"
53
53
  },
54
+ "48": {
55
+ "value": "48px"
56
+ },
54
57
  "58": {
55
58
  "value": "58px"
56
59
  },
57
60
  "60": {
58
61
  "value": "60px"
59
62
  },
63
+ "90": {
64
+ "value": "90px"
65
+ },
60
66
  "100": {
61
67
  "value": "100px"
62
68
  },
@@ -110,6 +116,9 @@
110
116
  },
111
117
  "fullViewportHeight": {
112
118
  "value": "100vh"
119
+ },
120
+ "fullViewportWidth": {
121
+ "value": "100vw"
113
122
  }
114
123
  }
115
124
  }
@@ -12,6 +12,11 @@ import css from './Checkbox.module.css';
12
12
 
13
13
  type ClassNames = $ReadOnly<{wrapper?: string, label?: string}>;
14
14
 
15
+ /*
16
+ Note: An indeterminate state has a higher priority.
17
+ If true checkbox would be in an indeterminate state. If indeterminate is false, it will owner checked value.
18
+ */
19
+
15
20
  export type CheckboxProps = {
16
21
  name?: string,
17
22
  value?: string,
@@ -66,6 +66,7 @@
66
66
 
67
67
  .checkboxSquare .disabled {
68
68
  cursor: not-allowed;
69
+ border: borderWidthTertiary solid colorFillDisabled;
69
70
  }
70
71
 
71
72
  .inputCheckbox {
@@ -124,7 +125,6 @@ input[type='checkbox']:disabled {
124
125
  }
125
126
 
126
127
  .disabled {
127
- border: borderWidthTertiary solid colorFillDisabled;
128
128
  pointer-events: none;
129
129
  cursor: not-allowed;
130
130
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Input = void 0;
6
+ exports.Input = exports.INPUT_TYPES = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = require("../../utils/classify");
9
9
  var _Icon = require("../Icon");
@@ -13,6 +13,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ const INPUT_TYPES = Object.freeze({
17
+ text: 'text',
18
+ number: 'number',
19
+ password: 'password',
20
+ email: 'email',
21
+ tel: 'tel',
22
+ url: 'url',
23
+ date: 'date',
24
+ 'datetime-local': 'datetime-local',
25
+ time: 'time',
26
+ week: 'week',
27
+ month: 'month',
28
+ color: 'color',
29
+ search: 'search'
30
+ });
31
+ exports.INPUT_TYPES = INPUT_TYPES;
16
32
  const Input_ = (props, ref) => {
17
33
  const {
18
34
  value,
@@ -91,7 +107,11 @@ const Input_ = (props, ref) => {
91
107
  onBlur: onBlur,
92
108
  type: showPassword ? 'text' : type,
93
109
  readOnly: readOnly && 'readOnly'
94
- }, inputProps)), /*#__PURE__*/React.createElement(RightInputIcon, {
110
+ }, inputProps)), type === 'color' && /*#__PURE__*/React.createElement("div", {
111
+ className: (0, _classify.classify)(_InputModule.default.colorText, _InputModule.default[size], {
112
+ [_InputModule.default.hasValue]: value
113
+ })
114
+ }, value ? value : placeholder), /*#__PURE__*/React.createElement(RightInputIcon, {
95
115
  isEmail: type === 'email',
96
116
  isPassword: type === 'password',
97
117
  showPassword: showPassword,
@@ -15,6 +15,24 @@ type ClassNames = $ReadOnly<{
15
15
  iconRight?: string,
16
16
  }>;
17
17
 
18
+ export const INPUT_TYPES = Object.freeze({
19
+ text: 'text',
20
+ number: 'number',
21
+ password: 'password',
22
+ email: 'email',
23
+ tel: 'tel',
24
+ url: 'url',
25
+ date: 'date',
26
+ 'datetime-local': 'datetime-local',
27
+ time: 'time',
28
+ week: 'week',
29
+ month: 'month',
30
+ color: 'color',
31
+ search: 'search',
32
+ });
33
+
34
+ export type InputType = $Values<typeof INPUT_TYPES>;
35
+
18
36
  export type InputProps = {
19
37
  value?: string,
20
38
  onChange?: (
@@ -36,7 +54,7 @@ export type InputProps = {
36
54
  errorText?: string,
37
55
  label?: string | React.Node,
38
56
  helperText?: string | React.Node,
39
- type?: 'text' | 'number' | 'password' | 'email' | 'tel' | 'url',
57
+ type?: InputType,
40
58
  size?: 'medium' | 'small',
41
59
  iconLeftName?: string,
42
60
  iconLeftType?: IconType,
@@ -45,6 +63,15 @@ export type InputProps = {
45
63
  required?: boolean,
46
64
  readOnly?: boolean,
47
65
  boxRef?: (?HTMLElement) => mixed,
66
+ minLength?: string,
67
+ maxLength?: string,
68
+ pattern?: string,
69
+ min?: string,
70
+ max?: string,
71
+ /** The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any.
72
+ * Only values which are equal to the basis for stepping (min if specified, value otherwise, and an
73
+ * appropriate default value if neither of those is provided) are valid. */
74
+ step?: string,
48
75
  };
49
76
 
50
77
  const Input_ = (props: InputProps, ref): React.Node => {
@@ -140,6 +167,15 @@ const Input_ = (props: InputProps, ref): React.Node => {
140
167
  readOnly={readOnly && 'readOnly'}
141
168
  {...inputProps}
142
169
  />
170
+ {type === 'color' && (
171
+ <div
172
+ className={classify(css.colorText, css[size], {
173
+ [css.hasValue]: value,
174
+ })}
175
+ >
176
+ {value ? value : placeholder}
177
+ </div>
178
+ )}
143
179
  <RightInputIcon
144
180
  isEmail={type === 'email'}
145
181
  isPassword={type === 'password'}
@@ -1,5 +1,6 @@
1
1
  @value (
2
2
  size42,
3
+ size30,
3
4
  size34,
4
5
  sizeFluid
5
6
  ) from '../../styles/variables/_size.css';
@@ -16,7 +17,8 @@
16
17
  borderRadiusSmall,
17
18
  borderWidthSecondary,
18
19
  borderWidthTertiary,
19
- borderWidthNone
20
+ borderWidthNone,
21
+ borderRadiusXSmall
20
22
  ) from '../../styles/variables/_border.css';
21
23
 
22
24
  @value (
@@ -56,6 +58,15 @@
56
58
  border-radius: borderRadiusMedium;
57
59
  }
58
60
 
61
+ .colorText {
62
+ composes: formInputMedium from '../../styles/typography.module.css';
63
+ color: colorTextSecondary;
64
+ }
65
+
66
+ .hasValue {
67
+ color: colorTextPrimary;
68
+ }
69
+
59
70
  .small {
60
71
  composes: formInputSmall from '../../styles/typography.module.css';
61
72
  height: size34;
@@ -120,3 +131,18 @@ input::placeholder {
120
131
  .rightClickableIcon.disabled {
121
132
  pointer-events: none;
122
133
  }
134
+
135
+ .box > input[type='color'] {
136
+ display: flex;
137
+ cursor: pointer;
138
+ align-items: center;
139
+ width: fit-content;
140
+ gap: spaceXSmall;
141
+ }
142
+
143
+ .box > input[type='color']::-webkit-color-swatch {
144
+ border: none;
145
+ min-width: size30;
146
+ max-width: size30;
147
+ border-radius: borderRadiusXSmall;
148
+ }
@@ -3,10 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "Input", {
7
- enumerable: true,
8
- get: function () {
9
- return _Input.Input;
10
- }
11
- });
12
- var _Input = require("./Input");
6
+ var _Input = require("./Input");
7
+ Object.keys(_Input).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Input[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Input[key];
14
+ }
15
+ });
16
+ });
@@ -1,4 +1,3 @@
1
1
  // @flow strict
2
2
 
3
- export type {InputProps} from './Input';
4
- export {Input} from './Input';
3
+ export * from './Input';
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Menu = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = require("../../utils/classify");
9
- var _MenuOptionButton = require("./MenuOptionButton.js");
9
+ var _MenuOptionButton = require("./MenuOptionButton");
10
10
  var _MenuModule = _interopRequireDefault(require("./Menu.module.css"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -2,9 +2,9 @@
2
2
  import * as React from 'react';
3
3
 
4
4
  import {classify} from '../../utils/classify';
5
- import type {IconType} from '../Icon/Icon.js';
5
+ import type {IconType} from '../Icon/Icon';
6
6
 
7
- import {MenuOptionButton} from './MenuOptionButton.js';
7
+ import {MenuOptionButton} from './MenuOptionButton';
8
8
 
9
9
  import css from './Menu.module.css';
10
10
 
@@ -6,7 +6,7 @@ import {UnstyledButton} from '../Button';
6
6
  import {Icon} from '../Icon';
7
7
  import {Truncate} from '../Truncate';
8
8
 
9
- import type {MenuOption} from './Menu.js';
9
+ import type {MenuOption} from './Menu';
10
10
 
11
11
  import css from './Menu.module.css';
12
12
 
@@ -16,4 +16,4 @@ Object.defineProperty(exports, "MenuOptionButton", {
16
16
  }
17
17
  });
18
18
  var _Menu = require("./Menu");
19
- var _MenuOptionButton = require("./MenuOptionButton.js");
19
+ var _MenuOptionButton = require("./MenuOptionButton");
@@ -2,4 +2,4 @@
2
2
 
3
3
  export type {MenuOption, MenuProps} from './Menu';
4
4
  export {Menu} from './Menu';
5
- export {MenuOptionButton} from './MenuOptionButton.js';
5
+ export {MenuOptionButton} from './MenuOptionButton';
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SingleCell = exports.Row = exports.PaddedDoubleContentCell = exports.PaddedContentCell = exports.MonogramCell = exports.Monogram = exports.DoubleCell = exports.DateCell = exports.Cells = exports.Cell = exports.BasicSingleCell = exports.BasicDoubleCell = void 0;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _formatDistance = _interopRequireDefault(require("date-fns/formatDistance"));
9
+ var _parseISO = _interopRequireDefault(require("date-fns/parseISO"));
10
+ var _classify = require("../../utils/classify");
11
+ var _makeClassNameComponent = require("../../utils/makeClassNameComponent");
12
+ var _Avatar = require("../Avatar");
13
+ var _Text = require("../Text");
14
+ var _TableModule = _interopRequireDefault(require("./Table.module.css"));
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+ const Cells = _ref => {
20
+ let {
21
+ children,
22
+ className,
23
+ ...rest
24
+ } = _ref;
25
+ return /*#__PURE__*/React.createElement("div", _extends({
26
+ className: (0, _classify.classify)(_TableModule.default.row, className)
27
+ }, rest), children);
28
+ };
29
+ exports.Cells = Cells;
30
+ const Row = Cells;
31
+ exports.Row = Row;
32
+ const Cell = _ref2 => {
33
+ let {
34
+ children,
35
+ className
36
+ } = _ref2;
37
+ return /*#__PURE__*/React.createElement("div", {
38
+ className: (0, _classify.classify)(_TableModule.default.cell, className)
39
+ }, children);
40
+ };
41
+ exports.Cell = Cell;
42
+ const BasicSingleCell = (0, _makeClassNameComponent.makeClassNameComponent)(_TableModule.default.defaultSingleCell, 'td');
43
+ exports.BasicSingleCell = BasicSingleCell;
44
+ const BasicDoubleCell = (0, _makeClassNameComponent.makeClassNameComponent)(_TableModule.default.defaultDoubleCell, 'td');
45
+ exports.BasicDoubleCell = BasicDoubleCell;
46
+ const PaddedContentCell = (0, _makeClassNameComponent.makeClassNameComponent)(_TableModule.default.singleContentCell, 'td');
47
+ exports.PaddedContentCell = PaddedContentCell;
48
+ const PaddedDoubleContentCell = (0, _makeClassNameComponent.makeClassNameComponent)(_TableModule.default.doubleContentCell, 'td');
49
+ exports.PaddedDoubleContentCell = PaddedDoubleContentCell;
50
+ const SingleCell = _ref3 => {
51
+ let {
52
+ title,
53
+ className
54
+ } = _ref3;
55
+ return /*#__PURE__*/React.createElement(PaddedContentCell, {
56
+ className: className
57
+ }, /*#__PURE__*/React.createElement(_Text.BodyMedium, {
58
+ className: _TableModule.default.paddedTitleBlock
59
+ }, title));
60
+ };
61
+ exports.SingleCell = SingleCell;
62
+ const DoubleCell = _ref4 => {
63
+ let {
64
+ title,
65
+ subtitle,
66
+ className
67
+ } = _ref4;
68
+ return /*#__PURE__*/React.createElement(PaddedDoubleContentCell, {
69
+ className: className
70
+ }, /*#__PURE__*/React.createElement("div", {
71
+ className: _TableModule.default.paddedTitleBlock
72
+ }, /*#__PURE__*/React.createElement(_Text.BodyMedium, {
73
+ className: _TableModule.default.doubleTitle
74
+ }, title), /*#__PURE__*/React.createElement(_Text.BodySmall, {
75
+ color: _Text.TEXT_COLORS.tertiary,
76
+ className: _TableModule.default.doubleSubtitle
77
+ }, subtitle ?? '')));
78
+ };
79
+ exports.DoubleCell = DoubleCell;
80
+ const DateCell = _ref5 => {
81
+ let {
82
+ date,
83
+ className
84
+ } = _ref5;
85
+ const parsedDate = typeof date === 'object' ? date : (0, _parseISO.default)(date);
86
+ return /*#__PURE__*/React.createElement(DoubleCell, {
87
+ title: `${parsedDate.getMonth() + 1} / ${parsedDate.getDate() + 1} / ${parsedDate.getFullYear()}`,
88
+ subtitle: `${(0, _formatDistance.default)(parsedDate, new Date())} ago`,
89
+ className: className
90
+ });
91
+ };
92
+ exports.DateCell = DateCell;
93
+ const Monogram = _ref6 => {
94
+ let {
95
+ initials
96
+ } = _ref6;
97
+ return /*#__PURE__*/React.createElement(_Avatar.Avatar, {
98
+ size: "small",
99
+ text: initials
100
+ });
101
+ };
102
+ exports.Monogram = Monogram;
103
+ const MonogramCell = _ref7 => {
104
+ let {
105
+ initials,
106
+ className
107
+ } = _ref7;
108
+ return /*#__PURE__*/React.createElement(PaddedContentCell, {
109
+ className: className
110
+ }, /*#__PURE__*/React.createElement(Monogram, {
111
+ initials: initials
112
+ }));
113
+ };
114
+ exports.MonogramCell = MonogramCell;