@pingux/astro 1.27.0-alpha.14 → 1.27.0-alpha.16

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 (55) hide show
  1. package/lib/cjs/components/DataTable/DataTable.js +477 -0
  2. package/lib/cjs/components/DataTable/DataTable.stories.js +310 -0
  3. package/lib/cjs/components/DataTable/DataTable.styles.js +156 -0
  4. package/lib/cjs/components/DataTable/DataTable.test.js +1307 -0
  5. package/lib/cjs/components/DataTable/DataTableChip.js +63 -0
  6. package/lib/cjs/components/DataTable/DataTableChip.test.js +38 -0
  7. package/lib/cjs/components/DataTable/DataTableMenu.js +51 -0
  8. package/lib/cjs/components/DataTable/DataTableMenu.test.js +20 -0
  9. package/lib/cjs/components/DataTable/DataTableMultiLine.js +75 -0
  10. package/lib/cjs/components/DataTable/DataTableMultiLine.test.js +30 -0
  11. package/lib/cjs/components/DataTable/DataTableVirtualizer.js +188 -0
  12. package/lib/cjs/components/DataTable/index.js +54 -0
  13. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -2
  14. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +35 -0
  15. package/lib/cjs/components/PageHeader/PageHeader.js +7 -1
  16. package/lib/cjs/context/DataTableContext/index.js +31 -0
  17. package/lib/cjs/index.js +67 -2
  18. package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +38 -30
  19. package/lib/cjs/recipes/ListAndPanel.stories.js +102 -87
  20. package/lib/cjs/recipes/MaskedValue.stories.js +8 -5
  21. package/lib/cjs/recipes/NeutralInput.stories.js +6 -3
  22. package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
  23. package/lib/cjs/recipes/PageHeader.stories.js +73 -0
  24. package/lib/cjs/recipes/RowLineChart.stories.js +58 -70
  25. package/lib/cjs/recipes/SelectedFieldOverlay.story.js +25 -21
  26. package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +81 -72
  27. package/lib/cjs/styles/variants/variants.js +4 -1
  28. package/lib/components/DataTable/DataTable.js +431 -0
  29. package/lib/components/DataTable/DataTable.stories.js +273 -0
  30. package/lib/components/DataTable/DataTable.styles.js +137 -0
  31. package/lib/components/DataTable/DataTable.test.js +1256 -0
  32. package/lib/components/DataTable/DataTableChip.js +33 -0
  33. package/lib/components/DataTable/DataTableChip.test.js +31 -0
  34. package/lib/components/DataTable/DataTableMenu.js +24 -0
  35. package/lib/components/DataTable/DataTableMenu.test.js +13 -0
  36. package/lib/components/DataTable/DataTableMultiLine.js +46 -0
  37. package/lib/components/DataTable/DataTableMultiLine.test.js +22 -0
  38. package/lib/components/DataTable/DataTableVirtualizer.js +157 -0
  39. package/lib/components/DataTable/index.js +5 -0
  40. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +7 -2
  41. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +25 -0
  42. package/lib/components/PageHeader/PageHeader.js +8 -1
  43. package/lib/context/DataTableContext/index.js +5 -0
  44. package/lib/index.js +4 -1
  45. package/lib/recipes/FlippableCaretMenuButton.stories.js +38 -30
  46. package/lib/recipes/ListAndPanel.stories.js +102 -87
  47. package/lib/recipes/MaskedValue.stories.js +8 -5
  48. package/lib/recipes/NeutralInput.stories.js +6 -3
  49. package/lib/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
  50. package/lib/recipes/PageHeader.stories.js +53 -0
  51. package/lib/recipes/RowLineChart.stories.js +58 -70
  52. package/lib/recipes/SelectedFieldOverlay.story.js +25 -21
  53. package/lib/recipes/TrialExperienceStatusBar.stories.js +81 -72
  54. package/lib/styles/variants/variants.js +3 -1
  55. package/package.json +55 -50
@@ -0,0 +1,137 @@
1
+ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
2
+ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
3
+ import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
4
+ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
5
+ import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
6
+ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
7
+ import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
8
+ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
+
11
+ 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; }
12
+
13
+ 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) { _defineProperty(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; }
14
+
15
+ import { text } from './../../styles/variants/text';
16
+
17
+ var tableCell = _objectSpread(_objectSpread({}, text.tableData), {}, {
18
+ color: 'text.primary',
19
+ position: 'relative',
20
+ display: 'flex',
21
+ fontSize: '13px',
22
+ height: '100%',
23
+ '&.is-key-focused': {
24
+ outline: '1px',
25
+ outlineStyle: 'solid',
26
+ outlineColor: 'accent.50',
27
+ outlineOffset: '-1px',
28
+ backgroundColor: 'white'
29
+ },
30
+ '&.is-align-start': {
31
+ alignItems: 'flex-start'
32
+ },
33
+ '&.is-align-center': {
34
+ alignItems: 'center'
35
+ },
36
+ '&.is-align-end': {
37
+ alignItems: 'flex-end'
38
+ }
39
+ });
40
+
41
+ var tableCellContents = {
42
+ flex: '1 1 0%',
43
+ minWidth: '0px',
44
+ overflow: 'hidden',
45
+ whiteSpace: 'nowrap',
46
+ textOverflow: 'ellipsis',
47
+ fontWeight: '400',
48
+ justifyContent: 'center'
49
+ };
50
+ var tableRow = {
51
+ position: 'relative',
52
+ cursor: 'default',
53
+ borderBottom: '1px',
54
+ outline: '0',
55
+ borderBottomStyle: 'solid !important',
56
+ backgroundColor: 'accent.99',
57
+ borderBottomColor: 'neutral.80',
58
+ '&:hover': {
59
+ backgroundColor: 'white'
60
+ },
61
+ '&.is-row-focus-visible': {
62
+ border: '1px solid',
63
+ borderColor: 'accent.50',
64
+ borderBottom: '1px',
65
+ borderBottomColor: 'accent.50',
66
+ backgroundColor: 'white'
67
+ }
68
+ };
69
+ var tableHeadWrapper = {
70
+ borderLeftWidth: '0px',
71
+ borderLeftStyle: 'solid',
72
+ borderRightWidth: '0px',
73
+ borderRightStyle: 'solid',
74
+ flex: '0 0 auto',
75
+ borderBottom: '1px',
76
+ borderBottomStyle: 'solid',
77
+ borderBottomColor: 'neutral.80'
78
+ };
79
+ var tableCenteredWrapper = {
80
+ display: 'flex',
81
+ alignItems: 'center',
82
+ justifyContent: 'center',
83
+ width: '100%',
84
+ height: '100%'
85
+ };
86
+
87
+ var tableHeadCell = _objectSpread(_objectSpread({}, text.label), {}, {
88
+ cursor: 'default',
89
+ backgroundColor: 'accent.99',
90
+ flexDirection: 'row !important',
91
+ alignItems: 'flex-end',
92
+ fontWeight: 500,
93
+ height: '100%',
94
+ py: '10px',
95
+ '&.is-click-focused': {
96
+ outline: '0'
97
+ },
98
+ '&.is-key-focused': {
99
+ outline: '1px',
100
+ outlineStyle: 'solid',
101
+ outlineColor: 'accent.50 !important',
102
+ outlineOffset: '-1px',
103
+ backgroundColor: 'accent.99 !important'
104
+ },
105
+ '&.is-column-sortable': {
106
+ color: 'text.active',
107
+ cursor: 'pointer'
108
+ },
109
+ '&.is-align-start': {
110
+ justifyContent: 'flex-start'
111
+ },
112
+ '&.is-align-center': {
113
+ justifyContent: 'center'
114
+ },
115
+ '&.is-align-end': {
116
+ justifyContent: 'flex-end'
117
+ }
118
+ });
119
+
120
+ var tableBody = {
121
+ position: 'relative',
122
+ overflow: 'auto'
123
+ };
124
+ var tableMenu = {
125
+ p: '5px',
126
+ borderRadius: '50px'
127
+ };
128
+ export default {
129
+ tableBody: tableBody,
130
+ tableHeadWrapper: tableHeadWrapper,
131
+ tableCenteredWrapper: tableCenteredWrapper,
132
+ tableCellContents: tableCellContents,
133
+ tableCell: tableCell,
134
+ tableRow: tableRow,
135
+ tableHeadCell: tableHeadCell,
136
+ tableMenu: tableMenu
137
+ };