@pingux/astro 2.206.2-alpha.0 → 2.207.0-alpha.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.
- package/lib/cjs/components/Button/Buttons.styles.d.ts +14 -0
- package/lib/cjs/components/Button/Buttons.styles.js +11 -1
- package/lib/cjs/components/TableBase/TableBase.js +138 -32
- package/lib/cjs/components/TableBase/TableBase.mdx +46 -13
- package/lib/cjs/components/TableBase/TableBase.stories.js +52 -2
- package/lib/cjs/components/TableBase/TableBase.styles.d.ts +84 -9
- package/lib/cjs/components/TableBase/TableBase.styles.js +61 -10
- package/lib/cjs/components/TableBase/TableBase.test.js +585 -105
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +14 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +16 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +10 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +7 -0
- package/lib/cjs/styles/themes/next-gen/variants/button.js +4 -1
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +3 -0
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +6 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +3 -0
- package/lib/cjs/types/tableBase.d.ts +21 -5
- package/lib/components/Button/Buttons.styles.js +11 -1
- package/lib/components/TableBase/TableBase.js +139 -33
- package/lib/components/TableBase/TableBase.mdx +46 -13
- package/lib/components/TableBase/TableBase.stories.js +51 -1
- package/lib/components/TableBase/TableBase.styles.js +61 -10
- package/lib/components/TableBase/TableBase.test.js +585 -105
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +16 -2
- package/lib/styles/themes/next-gen/variants/button.js +4 -1
- package/lib/styles/themes/next-gen/variants/tableBase.js +6 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
14
14
|
});
|
|
15
15
|
exports["default"] = void 0;
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
+
var _onyxTokens = require("@pingux/onyx-tokens");
|
|
17
18
|
var _Text = require("../Text/Text.styles");
|
|
18
19
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -24,6 +25,37 @@ var defaultFocus = {
|
|
|
24
25
|
outlineOffset: '-1px',
|
|
25
26
|
zIndex: 2
|
|
26
27
|
};
|
|
28
|
+
|
|
29
|
+
// Pseudo-element styles for the sticky last column separator and shadow.
|
|
30
|
+
// Using ::after/::before instead of border-left + box-shadow because:
|
|
31
|
+
// - border-collapse:collapse absorbs border-left (invisible until adjacent cell scrolls away)
|
|
32
|
+
// - overflow:auto on the scroll container clips outward box-shadow
|
|
33
|
+
// Pseudo-elements live inside the sticky cell's stacking context and render
|
|
34
|
+
// within the visible viewport, so neither constraint applies.
|
|
35
|
+
var stickyColumnSeparator = {
|
|
36
|
+
// 1px left border line — unaffected by border-collapse
|
|
37
|
+
'&::after': {
|
|
38
|
+
content: '""',
|
|
39
|
+
position: 'absolute',
|
|
40
|
+
top: 0,
|
|
41
|
+
bottom: 0,
|
|
42
|
+
left: 0,
|
|
43
|
+
width: '1px',
|
|
44
|
+
backgroundColor: _onyxTokens.astroTokens.color.common.border,
|
|
45
|
+
pointerEvents: 'none'
|
|
46
|
+
},
|
|
47
|
+
// drop shadow extending left into the scrolling area — unaffected by overflow clipping
|
|
48
|
+
'&::before': {
|
|
49
|
+
content: '""',
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
top: 0,
|
|
52
|
+
bottom: 0,
|
|
53
|
+
left: '-6px',
|
|
54
|
+
width: '6px',
|
|
55
|
+
background: 'linear-gradient(to right, transparent, rgba(0, 0, 0, 0.13))',
|
|
56
|
+
pointerEvents: 'none'
|
|
57
|
+
}
|
|
58
|
+
};
|
|
27
59
|
var container = {
|
|
28
60
|
width: '100%',
|
|
29
61
|
height: '100%',
|
|
@@ -31,43 +63,48 @@ var container = {
|
|
|
31
63
|
borderCollapse: 'collapse',
|
|
32
64
|
position: 'relative',
|
|
33
65
|
'&.is-last-column-sticky': {
|
|
34
|
-
'thead tr th:last-of-type': {
|
|
66
|
+
'thead tr th:last-of-type': _objectSpread(_objectSpread({
|
|
35
67
|
position: 'sticky',
|
|
36
68
|
right: 0,
|
|
37
69
|
backgroundColor: 'white',
|
|
38
|
-
zIndex: 2
|
|
70
|
+
zIndex: 2
|
|
71
|
+
}, stickyColumnSeparator), {}, {
|
|
39
72
|
'&.is-focused': {
|
|
40
73
|
borderStyle: 'solid',
|
|
41
74
|
borderColor: 'transparent',
|
|
42
75
|
borderWidth: '2px'
|
|
43
76
|
}
|
|
44
|
-
},
|
|
77
|
+
}),
|
|
45
78
|
'tbody tr': {
|
|
46
79
|
'&.is-focused td:last-of-type': {
|
|
47
80
|
borderStyle: 'solid',
|
|
48
81
|
borderColor: 'transparent',
|
|
49
82
|
borderWidth: '4px 2px'
|
|
50
83
|
},
|
|
51
|
-
'&:nth-of-type(odd) td:last-of-type': {
|
|
84
|
+
'&:nth-of-type(odd) td:last-of-type': _objectSpread(_objectSpread({
|
|
52
85
|
position: 'sticky',
|
|
53
86
|
right: 0,
|
|
54
|
-
|
|
87
|
+
zIndex: 1,
|
|
88
|
+
backgroundColor: 'inherit'
|
|
89
|
+
}, stickyColumnSeparator), {}, {
|
|
55
90
|
'&.is-focused': {
|
|
56
91
|
borderStyle: 'solid',
|
|
57
92
|
borderColor: 'transparent',
|
|
58
93
|
borderWidth: '2px'
|
|
59
94
|
}
|
|
60
|
-
},
|
|
61
|
-
'&:nth-of-type(even) td:last-of-type': {
|
|
95
|
+
}),
|
|
96
|
+
'&:nth-of-type(even) td:last-of-type': _objectSpread(_objectSpread({
|
|
62
97
|
position: 'sticky',
|
|
63
98
|
right: 0,
|
|
64
|
-
|
|
99
|
+
zIndex: 1,
|
|
100
|
+
backgroundColor: 'white'
|
|
101
|
+
}, stickyColumnSeparator), {}, {
|
|
65
102
|
'&.is-focused': {
|
|
66
103
|
borderStyle: 'solid',
|
|
67
104
|
borderColor: 'transparent',
|
|
68
105
|
borderWidth: '2px'
|
|
69
106
|
}
|
|
70
|
-
}
|
|
107
|
+
})
|
|
71
108
|
}
|
|
72
109
|
}
|
|
73
110
|
};
|
|
@@ -99,6 +136,19 @@ var head = _objectSpread(_objectSpread({}, _Text.text.label), {}, {
|
|
|
99
136
|
},
|
|
100
137
|
'&.is-focused': _objectSpread({}, defaultFocus)
|
|
101
138
|
});
|
|
139
|
+
var resizer = {
|
|
140
|
+
cursor: 'col-resize',
|
|
141
|
+
display: 'inline-block',
|
|
142
|
+
width: '2px',
|
|
143
|
+
height: '100%',
|
|
144
|
+
backgroundColor: 'neutral.10',
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
right: '0px',
|
|
147
|
+
top: '0',
|
|
148
|
+
'&.is-focused': {
|
|
149
|
+
backgroundColor: 'focus'
|
|
150
|
+
}
|
|
151
|
+
};
|
|
102
152
|
var tbody = {
|
|
103
153
|
borderBottom: '1px solid',
|
|
104
154
|
borderBottomColor: 'neutral.80',
|
|
@@ -139,5 +189,6 @@ var _default = exports["default"] = {
|
|
|
139
189
|
container: container,
|
|
140
190
|
data: data,
|
|
141
191
|
head: head,
|
|
142
|
-
row: row
|
|
192
|
+
row: row,
|
|
193
|
+
resizer: resizer
|
|
143
194
|
};
|