@pingux/astro 2.129.0-alpha.5 → 2.129.0

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 (102) hide show
  1. package/lib/cjs/components/Callout/Callout.js +16 -14
  2. package/lib/cjs/components/Callout/Callout.stories.d.ts +0 -9
  3. package/lib/cjs/components/Callout/Callout.stories.js +1 -24
  4. package/lib/cjs/components/Callout/Callout.styles.d.ts +22 -14
  5. package/lib/cjs/components/Callout/Callout.styles.js +23 -19
  6. package/lib/cjs/components/Card/Card.styles.d.ts +0 -11
  7. package/lib/cjs/components/Card/Card.styles.js +1 -6
  8. package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
  9. package/lib/cjs/components/Table/Table.stories.js +5 -4
  10. package/lib/cjs/components/Table/Table.styles.d.ts +3 -5
  11. package/lib/cjs/components/Table/Table.styles.js +6 -8
  12. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +41 -3
  13. package/lib/cjs/index.d.ts +2 -3
  14. package/lib/cjs/index.js +20 -74
  15. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +0 -48
  16. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +0 -24
  17. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +4 -4
  18. package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.d.ts +4 -4
  19. package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
  20. package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +0 -1
  21. package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -2
  22. package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +0 -1
  23. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +2 -3
  24. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1 -179
  25. package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +1 -14
  26. package/lib/cjs/styles/themes/next-gen/variants/cards.js +2 -7
  27. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +0 -164
  28. package/lib/cjs/styles/themes/next-gen/variants/variants.js +1 -7
  29. package/lib/cjs/styles/variants/variants.js +2 -5
  30. package/lib/cjs/types/callout.d.ts +0 -2
  31. package/lib/components/Callout/Callout.js +16 -14
  32. package/lib/components/Callout/Callout.stories.js +0 -22
  33. package/lib/components/Callout/Callout.styles.js +24 -19
  34. package/lib/components/Card/Card.styles.js +1 -6
  35. package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +1 -1
  36. package/lib/components/Table/Table.stories.js +6 -5
  37. package/lib/components/Table/Table.styles.js +6 -8
  38. package/lib/index.js +2 -3
  39. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +0 -24
  40. package/lib/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
  41. package/lib/styles/themes/next-gen/colors/colors.js +1 -2
  42. package/lib/styles/themes/next-gen/convertedComponentList.js +2 -3
  43. package/lib/styles/themes/next-gen/variants/cards.js +2 -7
  44. package/lib/styles/themes/next-gen/variants/variants.js +1 -7
  45. package/lib/styles/variants/variants.js +2 -5
  46. package/package.json +1 -1
  47. package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.d.ts +0 -2
  48. package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.js +0 -33
  49. package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.d.ts +0 -6
  50. package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.js +0 -22
  51. package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.d.ts +0 -6
  52. package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +0 -22
  53. package/lib/cjs/components/TableBase/TableBase.d.ts +0 -9
  54. package/lib/cjs/components/TableBase/TableBase.js +0 -238
  55. package/lib/cjs/components/TableBase/TableBase.mdx +0 -30
  56. package/lib/cjs/components/TableBase/TableBase.stories.d.ts +0 -6
  57. package/lib/cjs/components/TableBase/TableBase.stories.js +0 -111
  58. package/lib/cjs/components/TableBase/TableBase.styles.d.ts +0 -76
  59. package/lib/cjs/components/TableBase/TableBase.styles.js +0 -80
  60. package/lib/cjs/components/TableBase/TableBase.test.d.ts +0 -1
  61. package/lib/cjs/components/TableBase/TableBase.test.js +0 -122
  62. package/lib/cjs/components/TableBase/index.d.ts +0 -1
  63. package/lib/cjs/components/TableBase/index.js +0 -14
  64. package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.d.ts +0 -6
  65. package/lib/cjs/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +0 -22
  66. package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.d.ts +0 -6
  67. package/lib/cjs/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +0 -22
  68. package/lib/cjs/components/TableBase/stories/NextGenTableBase.d.ts +0 -3
  69. package/lib/cjs/components/TableBase/stories/NextGenTableBase.js +0 -67
  70. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.d.ts +0 -27
  71. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.js +0 -35
  72. package/lib/cjs/styles/themes/next-gen/variants/callout.d.ts +0 -34
  73. package/lib/cjs/styles/themes/next-gen/variants/callout.js +0 -45
  74. package/lib/cjs/styles/themes/next-gen/variants/table.d.ts +0 -45
  75. package/lib/cjs/styles/themes/next-gen/variants/table.js +0 -65
  76. package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +0 -86
  77. package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +0 -99
  78. package/lib/cjs/types/cell.d.ts +0 -12
  79. package/lib/cjs/types/cell.js +0 -6
  80. package/lib/cjs/types/tableBase.d.ts +0 -45
  81. package/lib/cjs/types/tableBase.js +0 -6
  82. package/lib/cjs/utils/devUtils/constants/items.d.ts +0 -10
  83. package/lib/cjs/utils/devUtils/constants/items.js +0 -87
  84. package/lib/components/Callout/stories/CalloutNextGenComponent.js +0 -24
  85. package/lib/components/Callout/stories/NextGenCallout.chromatic.stories.js +0 -12
  86. package/lib/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +0 -12
  87. package/lib/components/TableBase/TableBase.js +0 -221
  88. package/lib/components/TableBase/TableBase.mdx +0 -30
  89. package/lib/components/TableBase/TableBase.stories.js +0 -100
  90. package/lib/components/TableBase/TableBase.styles.js +0 -72
  91. package/lib/components/TableBase/TableBase.test.js +0 -119
  92. package/lib/components/TableBase/index.js +0 -1
  93. package/lib/components/TableBase/stories/NextGenDarkTableBase.chromatic.stories.js +0 -12
  94. package/lib/components/TableBase/stories/NextGenTableBase.chromatic.stories.js +0 -12
  95. package/lib/components/TableBase/stories/NextGenTableBase.js +0 -58
  96. package/lib/styles/themeOverrides/nextGenDarkMode/variants/callout.js +0 -27
  97. package/lib/styles/themes/next-gen/variants/callout.js +0 -36
  98. package/lib/styles/themes/next-gen/variants/table.js +0 -57
  99. package/lib/styles/themes/next-gen/variants/tableBase.js +0 -91
  100. package/lib/types/cell.js +0 -1
  101. package/lib/types/tableBase.js +0 -1
  102. package/lib/utils/devUtils/constants/items.js +0 -79
@@ -1,86 +0,0 @@
1
- export declare const tableBase: {
2
- caption: {
3
- backgroundColor: string;
4
- px: string;
5
- color: string;
6
- borderBottom: string;
7
- borderBottomColor: string;
8
- borderTopLeftRadius: string;
9
- borderTopRightRadius: string;
10
- };
11
- row: {
12
- borderBottom: string;
13
- borderBottomColor: string;
14
- '&.is-focused': {
15
- outlineOffset: string;
16
- outline: string;
17
- outlineColor: string;
18
- };
19
- '&.is-hovered': {
20
- bg: string;
21
- };
22
- '&:nth-of-type(odd)': {
23
- bg: string;
24
- '&.is-hovered': {
25
- bg: string;
26
- };
27
- };
28
- };
29
- thead: {
30
- backgroundColor: string;
31
- '&:not(.has-caption)': {
32
- '& > tr:first-child': {
33
- borderTopLeftRadius: string;
34
- borderTopRightRadius: string;
35
- '& > th:first-of-type': {
36
- borderTopLeftRadius: string;
37
- };
38
- '& > th:last-of-type': {
39
- borderTopRightRadius: string;
40
- };
41
- };
42
- };
43
- };
44
- head: {
45
- px: string;
46
- py: string;
47
- fontSize: string;
48
- fontWeight: string;
49
- color: string;
50
- lineHeight: string;
51
- '&.is-focused': {
52
- outlineOffset: string;
53
- outline: string;
54
- outlineColor: string;
55
- };
56
- };
57
- tbody: {
58
- borderTopColor: string;
59
- borderBottom: string;
60
- backgroundColor: string;
61
- '& > tr:last-child': {
62
- borderBottom: string;
63
- borderBottomLeftRadius: string;
64
- borderBottomRightRadius: string;
65
- '& > td:first-of-type': {
66
- borderBottomLeftRadius: string;
67
- };
68
- '& > td:last-of-type': {
69
- borderBottomRightRadius: string;
70
- };
71
- };
72
- };
73
- data: {
74
- py: string;
75
- fontWeight: string;
76
- px: string;
77
- fontSize: string;
78
- color: string;
79
- lineHeight: string;
80
- '&.is-focused': {
81
- outlineOffset: string;
82
- outline: string;
83
- outlineColor: string;
84
- };
85
- };
86
- };
@@ -1,99 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
4
- var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
5
- var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
6
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
7
- var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
8
- var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
9
- var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
10
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
11
- var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
- _Object$defineProperty(exports, "__esModule", {
13
- value: true
14
- });
15
- exports.tableBase = void 0;
16
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
- var _button = require("./button");
18
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
19
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
20
- var borderRadius = '16px';
21
- var defaultFocus = _objectSpread(_objectSpread({}, _button.defaultFocus), {}, {
22
- outlineOffset: '-2px'
23
- });
24
- var caption = {
25
- backgroundColor: 'background.base',
26
- px: 'lg',
27
- color: 'text.primary',
28
- borderBottom: '1px solid',
29
- borderBottomColor: 'border.base',
30
- borderTopLeftRadius: borderRadius,
31
- borderTopRightRadius: borderRadius
32
- };
33
- var row = {
34
- borderBottom: '1px solid',
35
- borderBottomColor: 'border.base',
36
- '&.is-focused': _objectSpread({}, defaultFocus),
37
- '&.is-hovered': {
38
- bg: 'background.hover'
39
- },
40
- '&:nth-of-type(odd)': {
41
- bg: 'background.base',
42
- '&.is-hovered': {
43
- bg: 'background.hover'
44
- }
45
- }
46
- };
47
- var thead = {
48
- backgroundColor: 'background.base',
49
- '&:not(.has-caption)': {
50
- '& > tr:first-child': {
51
- borderTopLeftRadius: borderRadius,
52
- borderTopRightRadius: borderRadius,
53
- '& > th:first-of-type': {
54
- borderTopLeftRadius: borderRadius
55
- },
56
- '& > th:last-of-type': {
57
- borderTopRightRadius: borderRadius
58
- }
59
- }
60
- }
61
- };
62
- var head = {
63
- px: 'lg',
64
- py: 'sm',
65
- fontSize: 'md',
66
- fontWeight: '2',
67
- color: 'text.primary',
68
- lineHeight: 'body',
69
- '&.is-focused': _objectSpread({}, defaultFocus)
70
- };
71
- var tbody = {
72
- borderTopColor: 'border.base',
73
- borderBottom: 'unset',
74
- backgroundColor: 'background.base',
75
- '& > tr:last-child': {
76
- borderBottom: 'unset',
77
- borderBottomLeftRadius: borderRadius,
78
- borderBottomRightRadius: borderRadius,
79
- '& > td:first-of-type': {
80
- borderBottomLeftRadius: borderRadius
81
- },
82
- '& > td:last-of-type': {
83
- borderBottomRightRadius: borderRadius
84
- }
85
- }
86
- };
87
- var data = _objectSpread(_objectSpread({}, head), {}, {
88
- py: 'md',
89
- fontWeight: '1'
90
- });
91
- var tableBase = {
92
- caption: caption,
93
- row: row,
94
- thead: thead,
95
- head: head,
96
- tbody: tbody,
97
- data: data
98
- };
99
- exports.tableBase = tableBase;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { StyleProps } from './shared';
3
- declare module '@react-types/table' {
4
- interface CellProps extends StyleProps {
5
- /** Whether the cell should not wrap its contents. */
6
- noWrap?: boolean;
7
- /** The contents of the cell. */
8
- children: React.ReactNode;
9
- /** A string representation of the cell's contents, used for features like typeahead. */
10
- textValue?: string;
11
- }
12
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
@@ -1,45 +0,0 @@
1
- import { Key, ReactNode } from 'react';
2
- import type { TableState } from '@react-stately/table';
3
- import type { GridNode } from '@react-types/grid';
4
- import type { Node } from '@react-types/shared';
5
- import { TestingAttributes } from './shared/test';
6
- import { BoxProps } from './box';
7
- import { DOMAttributes } from './shared';
8
- export interface TableBaseProp extends BoxProps, TestingAttributes, DOMAttributes {
9
- }
10
- export interface TableBaseProps extends TableBaseProp {
11
- 'aria-label'?: string;
12
- selectedKeys?: Key[];
13
- defaultSelectedKeys?: Key[];
14
- selectionMode?: 'single' | 'none';
15
- 'data-testid'?: string;
16
- caption?: ReactNode | string;
17
- tableBodyProps?: Record<string, unknown>;
18
- }
19
- export interface TableRowGroupProps extends TableBaseProp {
20
- type: 'thead' | 'tbody' | 'tfoot';
21
- children: ReactNode;
22
- hasCaption?: boolean;
23
- }
24
- export interface TableHeaderRowProps extends TableBaseProp {
25
- item: Node<object>;
26
- state: TableState<object>;
27
- children: ReactNode;
28
- className?: string;
29
- }
30
- export interface TableColumnHeaderProps extends TableBaseProp {
31
- column: GridNode<object>;
32
- state: TableState<object>;
33
- className?: string;
34
- }
35
- export interface TableRowProps extends TableBaseProp {
36
- item: Node<object>;
37
- state: TableState<object>;
38
- children: ReactNode;
39
- className?: string;
40
- }
41
- export interface TableCellProps extends TableBaseProp {
42
- cell: GridNode<object>;
43
- state: TableState<object>;
44
- className?: string;
45
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
@@ -1,10 +0,0 @@
1
- import { Key } from 'react';
2
- interface Item {
3
- id: Key;
4
- email: string;
5
- firstName: string;
6
- lastName: string;
7
- status: 'Pending' | 'Active' | 'Failed' | 'Rejected';
8
- }
9
- export declare const items: Item[];
10
- export {};
@@ -1,87 +0,0 @@
1
- "use strict";
2
-
3
- var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
- _Object$defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.items = void 0;
8
- var items = [{
9
- id: '1',
10
- email: 'dburkitt5@columbia.edu',
11
- firstName: 'Nicola',
12
- lastName: 'Burkitt',
13
- status: 'Failed'
14
- }, {
15
- id: '2',
16
- email: 'idixie2@elegantthemes.com',
17
- firstName: 'Cacilia',
18
- lastName: 'Dixie',
19
- status: 'Active'
20
- }, {
21
- id: '3',
22
- email: 'dfowler0@rambler.ru',
23
- firstName: 'Stavro',
24
- lastName: 'Fowler',
25
- status: 'Active'
26
- }, {
27
- id: '4',
28
- email: 'jgolde8@jimdo.com',
29
- firstName: 'Celisse',
30
- lastName: 'Golde',
31
- status: 'Active'
32
- }, {
33
- id: '5',
34
- email: 'shearst9@answers.com',
35
- firstName: 'Jeth',
36
- lastName: 'Hearst',
37
- status: 'Pending'
38
- }, {
39
- id: '6',
40
- email: 'ajinaa@mapquest.com',
41
- firstName: 'Kaycee',
42
- lastName: 'Jina',
43
- status: 'Active'
44
- }, {
45
- id: '7',
46
- email: 'vmalster4@biblegateway.com',
47
- firstName: 'Lorry',
48
- lastName: 'Malster',
49
- status: 'Pending'
50
- }, {
51
- id: '8',
52
- email: 'yphipp6@yellowpages.com',
53
- firstName: 'Stanley',
54
- lastName: 'Phipp',
55
- status: 'Active'
56
- }, {
57
- id: '9',
58
- email: 'mskilbeck3@bbc.co.uk',
59
- firstName: 'Gradey',
60
- lastName: 'Skilbeck',
61
- status: 'Pending'
62
- }, {
63
- id: '10',
64
- email: 'dstebbing1@msu.edu',
65
- firstName: 'Marnia',
66
- lastName: 'Stebbing',
67
- status: 'Rejected'
68
- }, {
69
- id: '11',
70
- email: 'lsterley7@lulu.com',
71
- firstName: 'Joshua',
72
- lastName: 'Sterley',
73
- status: 'Pending'
74
- }, {
75
- id: '12',
76
- email: 'luttleyb@hugedomains.com',
77
- firstName: 'Jarrod',
78
- lastName: 'Uttley',
79
- status: 'Active'
80
- }, {
81
- id: '13',
82
- email: 'lidelc@yelp.com',
83
- firstName: 'Andromache',
84
- lastName: 'Idel',
85
- status: 'Pending'
86
- }];
87
- exports.items = items;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import LightbulbOutlineIcon from '@pingux/mdi-react/LightbulbOutlineIcon';
3
- import { Box, Callout, Icon, Text } from '../../..';
4
- import statuses from '../../../utils/devUtils/constants/statuses';
5
- import { jsx as ___EmotionJSX } from "@emotion/react";
6
- export var CalloutNextGenComponent = function CalloutNextGenComponent() {
7
- return ___EmotionJSX(Box, {
8
- gap: "md"
9
- }, ___EmotionJSX(Callout, null, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
10
- status: statuses.SUCCESS
11
- }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
12
- status: statuses.WARNING
13
- }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
14
- status: statuses.ERROR
15
- }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
16
- status: statuses.SUCCESS,
17
- icon: ___EmotionJSX(Icon, {
18
- icon: LightbulbOutlineIcon,
19
- size: "sm",
20
- color: "success.bright",
21
- mr: "md"
22
- })
23
- }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")));
24
- };
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { AstroProvider, NextGenTheme } from '../../..';
3
- import { CalloutNextGenComponent } from './CalloutNextGenComponent';
4
- import { jsx as ___EmotionJSX } from "@emotion/react";
5
- export default {
6
- title: 'Chromatic Only Onyx Callout'
7
- };
8
- export var Default = function Default() {
9
- return ___EmotionJSX(AstroProvider, {
10
- theme: NextGenTheme
11
- }, ___EmotionJSX(CalloutNextGenComponent, null));
12
- };
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { AstroProvider, NextGenDarkTheme } from '../../..';
3
- import { CalloutNextGenComponent } from './CalloutNextGenComponent';
4
- import { jsx as ___EmotionJSX } from "@emotion/react";
5
- export default {
6
- title: 'Chromatic Only Onyx Dark Callout'
7
- };
8
- export var Default = function Default() {
9
- return ___EmotionJSX(AstroProvider, {
10
- themeOverrides: [NextGenDarkTheme]
11
- }, ___EmotionJSX(CalloutNextGenComponent, null));
12
- };
@@ -1,221 +0,0 @@
1
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
- import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
- import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
- import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
12
- var _excluded = ["caption", "selectionMode", "selectedKeys", "defaultSelectedKeys", "tableBodyProps"],
13
- _excluded2 = ["type", "children", "hasCaption", "className"];
14
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
15
- import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
16
- function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
17
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context5, _context6; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context5 = ownKeys(Object(source), !0)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context6 = ownKeys(Object(source))).call(_context6, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
18
- import React, { forwardRef, useRef } from 'react';
19
- import { useFocusRing } from '@react-aria/focus';
20
- import { useHover, usePress } from '@react-aria/interactions';
21
- import { useTable, useTableCell, useTableColumnHeader, useTableHeaderRow, useTableRow, useTableRowGroup } from '@react-aria/table';
22
- import { mergeProps } from '@react-aria/utils';
23
- import { useTableState } from '@react-stately/table';
24
- import { Box } from '../..';
25
- import { useLocalOrForwardRef, useStatusClasses } from '../../hooks';
26
- import { jsx as ___EmotionJSX } from "@emotion/react";
27
- var TableBase = /*#__PURE__*/forwardRef(function (props, ref) {
28
- var _context, _context3;
29
- var caption = props.caption,
30
- selectionMode = props.selectionMode,
31
- selectedKeys = props.selectedKeys,
32
- _props$defaultSelecte = props.defaultSelectedKeys,
33
- defaultSelectedKeys = _props$defaultSelecte === void 0 ? [] : _props$defaultSelecte,
34
- tableBodyProps = props.tableBodyProps,
35
- others = _objectWithoutProperties(props, _excluded);
36
- var state = useTableState(_objectSpread(_objectSpread({}, props), {}, {
37
- selectionMode: selectionMode,
38
- selectedKeys: selectedKeys,
39
- defaultSelectedKeys: selectedKeys ? undefined : defaultSelectedKeys
40
- }));
41
- var tableRef = useLocalOrForwardRef(ref);
42
- var bodyRef = useRef(null);
43
- var collection = state.collection;
44
- var _useTable = useTable(_objectSpread(_objectSpread({}, props), {}, {
45
- 'aria-describedby': props['aria-describedby'] || 'table-caption',
46
- scrollRef: bodyRef
47
- }), state, tableRef),
48
- gridProps = _useTable.gridProps;
49
- return ___EmotionJSX(Box, _extends({
50
- as: "table",
51
- display: "table",
52
- variant: "tableBase.container",
53
- ref: tableRef
54
- }, gridProps, others), caption && ___EmotionJSX(Box, {
55
- as: "caption",
56
- display: "table-caption",
57
- variant: "tableBase.caption",
58
- textAlign: "left",
59
- id: props['aria-describedby'] || 'table-caption'
60
- }, caption), ___EmotionJSX(TableRowGroup, {
61
- type: "thead",
62
- hasCaption: !!caption
63
- }, _mapInstanceProperty(_context = collection.headerRows).call(_context, function (headerRow) {
64
- var _context2, _state$collection$get, _state$collection;
65
- return ___EmotionJSX(TableHeaderRow, {
66
- key: headerRow.key,
67
- item: headerRow,
68
- state: state
69
- }, _mapInstanceProperty(_context2 = _Array$from(((_state$collection$get = (_state$collection = state.collection).getChildren) === null || _state$collection$get === void 0 ? void 0 : _state$collection$get.call(_state$collection, headerRow.key)) || [])).call(_context2, function (column) {
70
- return ___EmotionJSX(TableColumnHeader, {
71
- key: column.key,
72
- column: column,
73
- state: state
74
- });
75
- }));
76
- })), ___EmotionJSX(TableRowGroup, _extends({
77
- ref: bodyRef,
78
- type: "tbody"
79
- }, tableBodyProps), _mapInstanceProperty(_context3 = _Array$from(collection)).call(_context3, function (row) {
80
- var _context4;
81
- return ___EmotionJSX(TableRow, {
82
- key: row.key,
83
- item: row,
84
- state: state
85
- }, _mapInstanceProperty(_context4 = _Array$from(state.collection.getChildren(row.key))).call(_context4, function (cell) {
86
- return ___EmotionJSX(TableCell, {
87
- key: cell.key,
88
- cell: cell,
89
- state: state
90
- });
91
- }));
92
- })));
93
- });
94
- export default TableBase;
95
- export var TableRowGroup = /*#__PURE__*/forwardRef(function (props, ref) {
96
- var type = props.type,
97
- children = props.children,
98
- hasCaption = props.hasCaption,
99
- className = props.className,
100
- others = _objectWithoutProperties(props, _excluded2);
101
- var _useTableRowGroup = useTableRowGroup(),
102
- rowGroupProps = _useTableRowGroup.rowGroupProps;
103
- var _useStatusClasses = useStatusClasses(className, {
104
- hasCaption: hasCaption
105
- }),
106
- classNames = _useStatusClasses.classNames;
107
- return ___EmotionJSX(Box, _extends({
108
- ref: ref
109
- }, rowGroupProps, {
110
- as: type,
111
- className: classNames,
112
- display: "table-row-group",
113
- variant: "tableBase.".concat(type)
114
- }, others), children);
115
- });
116
- export var TableHeaderRow = function TableHeaderRow(props) {
117
- var item = props.item,
118
- state = props.state,
119
- children = props.children;
120
- var ref = useRef(null);
121
- var _useTableHeaderRow = useTableHeaderRow({
122
- node: item
123
- }, state, ref),
124
- rowProps = _useTableHeaderRow.rowProps;
125
- return ___EmotionJSX(Box, _extends({
126
- as: "tr",
127
- display: "table-row"
128
- }, rowProps, {
129
- ref: ref
130
- }), children);
131
- };
132
- export var TableColumnHeader = function TableColumnHeader(props) {
133
- var column = props.column,
134
- state = props.state,
135
- className = props.className;
136
- var ref = useRef(null);
137
- var _useTableColumnHeader = useTableColumnHeader({
138
- node: column
139
- }, state, ref),
140
- columnHeaderProps = _useTableColumnHeader.columnHeaderProps;
141
- var _useFocusRing = useFocusRing(),
142
- isFocusVisible = _useFocusRing.isFocusVisible,
143
- focusProps = _useFocusRing.focusProps;
144
- var _useStatusClasses2 = useStatusClasses(className, {
145
- isFocused: isFocusVisible
146
- }),
147
- classNames = _useStatusClasses2.classNames;
148
- return ___EmotionJSX(Box, _extends({
149
- as: "th",
150
- display: "table-cell",
151
- variant: "tableBase.head",
152
- className: classNames
153
- }, mergeProps(columnHeaderProps, focusProps), {
154
- ref: ref
155
- }, column.props), column.rendered);
156
- };
157
- export var TableRow = function TableRow(props) {
158
- var item = props.item,
159
- state = props.state,
160
- children = props.children,
161
- className = props.className;
162
- var ref = useRef(null);
163
- var _useTableRow = useTableRow({
164
- node: item
165
- }, state, ref),
166
- rowProps = _useTableRow.rowProps;
167
- var isSelected = state.selectionManager.isSelected(item.key);
168
- var _useFocusRing2 = useFocusRing(),
169
- isFocusVisible = _useFocusRing2.isFocusVisible,
170
- focusProps = _useFocusRing2.focusProps;
171
- var _useHover = useHover({}),
172
- hoverProps = _useHover.hoverProps,
173
- isHovered = _useHover.isHovered;
174
- var _usePress = usePress({
175
- ref: ref
176
- }),
177
- pressProps = _usePress.pressProps,
178
- isPressed = _usePress.isPressed;
179
- var _useStatusClasses3 = useStatusClasses(className, {
180
- isSelected: isSelected,
181
- isHovered: isHovered,
182
- isPressed: isPressed,
183
- isFocused: isFocusVisible
184
- }),
185
- classNames = _useStatusClasses3.classNames;
186
- return ___EmotionJSX(Box, _extends({
187
- display: "table-row",
188
- as: "tr",
189
- className: classNames,
190
- variant: "tableBase.row"
191
- }, mergeProps(rowProps, focusProps, hoverProps, pressProps), {
192
- ref: ref
193
- }), children);
194
- };
195
- export function TableCell(props) {
196
- var _cell$props$noWrap;
197
- var cell = props.cell,
198
- state = props.state,
199
- className = props.className;
200
- var ref = useRef(null);
201
- var _useTableCell = useTableCell({
202
- node: cell
203
- }, state, ref),
204
- gridCellProps = _useTableCell.gridCellProps;
205
- var _useFocusRing3 = useFocusRing(),
206
- isFocusVisible = _useFocusRing3.isFocusVisible,
207
- focusProps = _useFocusRing3.focusProps;
208
- var _useStatusClasses4 = useStatusClasses(className, {
209
- isFocused: isFocusVisible,
210
- noWrap: (_cell$props$noWrap = cell.props.noWrap) !== null && _cell$props$noWrap !== void 0 ? _cell$props$noWrap : false
211
- }),
212
- classNames = _useStatusClasses4.classNames;
213
- return ___EmotionJSX(Box, _extends({
214
- as: "td",
215
- display: "table-cell",
216
- className: classNames
217
- }, mergeProps(gridCellProps, focusProps), {
218
- variant: "tableBase.data",
219
- ref: ref
220
- }, cell.props), cell.rendered);
221
- }
@@ -1,30 +0,0 @@
1
- import { Meta } from '@storybook/addon-docs';
2
-
3
- <Meta title="Components/Table/Table" />
4
-
5
- # Table
6
-
7
- Data tables display information in a grid-like format of rows and columns.
8
- They organize information in a way that’s easy to scan so that users can look for patterns and develop insights from data.
9
-
10
- Column header names describe the type of content displayed in each column.
11
- Each row contains data related to a single entity.
12
-
13
- Tables should:
14
- - Have consistently aligned content.
15
- - Use multiple heading rows for higher-level grouping of the columns.
16
- - Use column dividers sparingly.
17
-
18
- Tables shouldn’t use different indicators to represent empty fields.
19
-
20
- This basic component is rendered as an HTML `<table>`, which accepts the `<TableBody>` component and the `<TableHead>` as children.
21
-
22
- ### Required Components
23
-
24
- This component requires these additional components:
25
-
26
- - TableCaption
27
- - TableHead
28
- - TableRow
29
- - TableCell
30
- - TableBody