@heymantle/litho 0.0.13 → 0.0.15
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/README.md +52 -0
- package/dist/cjs/components/Card.js +1 -1
- package/dist/cjs/components/Disclosure.js +46 -15
- package/dist/cjs/components/DropZone.js +93 -37
- package/dist/cjs/components/Layout.js +4 -2
- package/dist/cjs/components/Modal.js +14 -3
- package/dist/cjs/components/Navigation.js +4 -3
- package/dist/cjs/components/Popover.js +58 -13
- package/dist/cjs/components/Select.js +4 -0
- package/dist/cjs/components/TabNavigation.js +65 -11
- package/dist/cjs/components/Table.js +27 -11
- package/dist/cjs/components/Tabs.js +33 -2
- package/dist/cjs/components/TextField.js +4 -2
- package/dist/cjs/components/ToastNotification.js +368 -0
- package/dist/cjs/components/ToastProvider.js +342 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/playwright.config.js +114 -0
- package/dist/cjs/styles/Table.js +2 -7
- package/dist/cjs/tests/visual/stories.spec.js +637 -0
- package/dist/cjs/utilities/dates.js +7 -7
- package/dist/esm/components/Card.js +1 -1
- package/dist/esm/components/Disclosure.js +36 -5
- package/dist/esm/components/DropZone.js +94 -38
- package/dist/esm/components/Layout.js +4 -2
- package/dist/esm/components/Modal.js +14 -3
- package/dist/esm/components/Navigation.js +4 -3
- package/dist/esm/components/Popover.js +58 -13
- package/dist/esm/components/Select.js +5 -1
- package/dist/esm/components/TabNavigation.js +65 -11
- package/dist/esm/components/Table.js +27 -11
- package/dist/esm/components/Tabs.js +33 -2
- package/dist/esm/components/TextField.js +4 -2
- package/dist/esm/components/ToastNotification.js +353 -0
- package/dist/esm/components/ToastProvider.js +336 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/playwright.config.js +104 -0
- package/dist/esm/styles/Table.js +2 -7
- package/dist/esm/tests/visual/stories.spec.js +633 -0
- package/dist/esm/utilities/dates.js +7 -7
- package/dist/types/components/Disclosure.d.ts.map +1 -1
- package/dist/types/components/DropZone.d.ts +2 -0
- package/dist/types/components/DropZone.d.ts.map +1 -1
- package/dist/types/components/Layout.d.ts.map +1 -1
- package/dist/types/components/Modal.d.ts.map +1 -1
- package/dist/types/components/Navigation.d.ts +1 -0
- package/dist/types/components/Navigation.d.ts.map +1 -1
- package/dist/types/components/Popover.d.ts +2 -0
- package/dist/types/components/Popover.d.ts.map +1 -1
- package/dist/types/components/Select.d.ts.map +1 -1
- package/dist/types/components/TabNavigation.d.ts.map +1 -1
- package/dist/types/components/Table.d.ts.map +1 -1
- package/dist/types/components/Tabs.d.ts +45 -1
- package/dist/types/components/Tabs.d.ts.map +1 -1
- package/dist/types/components/TextField.d.ts +2 -0
- package/dist/types/components/TextField.d.ts.map +1 -1
- package/dist/types/components/ToastNotification.d.ts +36 -0
- package/dist/types/components/ToastNotification.d.ts.map +1 -0
- package/dist/types/components/ToastProvider.d.ts +21 -0
- package/dist/types/components/ToastProvider.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/styles/Table.d.ts.map +1 -1
- package/index.css +3 -0
- package/package.json +12 -3
package/dist/esm/index.js
CHANGED
|
@@ -58,6 +58,8 @@ export { default as TextField } from "./components/TextField.js";
|
|
|
58
58
|
export { default as Thumbnail } from "./components/Thumbnail.js";
|
|
59
59
|
export { default as TimePicker } from "./components/TimePicker.js";
|
|
60
60
|
export { default as Tip } from "./components/Tip.js";
|
|
61
|
+
export { default as ToastNotification } from "./components/ToastNotification.js";
|
|
62
|
+
export { default as ToastProvider, useToast } from "./components/ToastProvider.js";
|
|
61
63
|
export { default as Tooltip } from "./components/Tooltip.js";
|
|
62
64
|
export { default as TopBar } from "./components/TopBar.js";
|
|
63
65
|
export { default as VerticalStack } from "./components/VerticalStack.js";
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
function ownKeys(object, enumerableOnly) {
|
|
30
|
+
var keys = Object.keys(object);
|
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
|
32
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
+
if (enumerableOnly) {
|
|
34
|
+
symbols = symbols.filter(function(sym) {
|
|
35
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
keys.push.apply(keys, symbols);
|
|
39
|
+
}
|
|
40
|
+
return keys;
|
|
41
|
+
}
|
|
42
|
+
function _object_spread_props(target, source) {
|
|
43
|
+
source = source != null ? source : {};
|
|
44
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
+
} else {
|
|
47
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
import { defineConfig, devices } from "@playwright/test";
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
testDir: './tests/visual',
|
|
56
|
+
// Run tests in parallel
|
|
57
|
+
fullyParallel: true,
|
|
58
|
+
// Fail the build on CI if you accidentally left test.only in the source code
|
|
59
|
+
forbidOnly: !!process.env.CI,
|
|
60
|
+
// Retry failed tests on CI
|
|
61
|
+
retries: process.env.CI ? 2 : 0,
|
|
62
|
+
// Limit parallel workers on CI
|
|
63
|
+
workers: process.env.CI ? 1 : undefined,
|
|
64
|
+
// Reporter configuration
|
|
65
|
+
reporter: process.env.CI ? 'github' : 'list',
|
|
66
|
+
// Shared settings for all projects
|
|
67
|
+
use: {
|
|
68
|
+
// Base URL for Storybook
|
|
69
|
+
baseURL: 'http://127.0.0.1:6006',
|
|
70
|
+
// Capture trace on failure
|
|
71
|
+
trace: 'on-first-retry'
|
|
72
|
+
},
|
|
73
|
+
// Snapshot naming - remove platform suffix for cross-platform baselines
|
|
74
|
+
snapshotPathTemplate: '{testDir}/{testFileDir}/{testFileName}-snapshots/{arg}{ext}',
|
|
75
|
+
// Visual comparison settings
|
|
76
|
+
expect: {
|
|
77
|
+
toHaveScreenshot: {
|
|
78
|
+
// Allow differences for anti-aliasing and sub-pixel text positioning
|
|
79
|
+
maxDiffPixelRatio: 0.04,
|
|
80
|
+
// Animation settings
|
|
81
|
+
animations: 'disabled'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// Configure projects for major browsers
|
|
85
|
+
projects: [
|
|
86
|
+
{
|
|
87
|
+
name: 'chromium',
|
|
88
|
+
use: _object_spread_props(_object_spread({}, devices['Desktop Chrome']), {
|
|
89
|
+
// Consistent viewport
|
|
90
|
+
viewport: {
|
|
91
|
+
width: 1280,
|
|
92
|
+
height: 720
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
// Web server configuration - start Storybook before running tests
|
|
98
|
+
webServer: {
|
|
99
|
+
command: 'npm run storybook -- --ci --quiet',
|
|
100
|
+
url: 'http://127.0.0.1:6006',
|
|
101
|
+
reuseExistingServer: !process.env.CI,
|
|
102
|
+
timeout: 120000
|
|
103
|
+
}
|
|
104
|
+
});
|
package/dist/esm/styles/Table.js
CHANGED
|
@@ -24,7 +24,7 @@ var headingStyles = tv({
|
|
|
24
24
|
base: "Litho-Table-Heading py-0 px-2 @md:first:pl-3 whitespace-nowrap font-semibold! text-high text-sm dark:text-normal",
|
|
25
25
|
variants: {
|
|
26
26
|
hidden: {
|
|
27
|
-
true: "hidden opacity-0 pointer-events-none @md:
|
|
27
|
+
true: "hidden opacity-0 pointer-events-none @md:table-cell @md:opacity-100 @md:pointer-events-auto"
|
|
28
28
|
},
|
|
29
29
|
verticalAlign: {
|
|
30
30
|
top: "align-top",
|
|
@@ -464,7 +464,7 @@ var fixedColumnsStyles = tv({
|
|
|
464
464
|
false: ""
|
|
465
465
|
},
|
|
466
466
|
firstColumns: {
|
|
467
|
-
true: "left-0",
|
|
467
|
+
true: "left-0 hidden @md:block",
|
|
468
468
|
false: "right-0 hidden @md:block"
|
|
469
469
|
},
|
|
470
470
|
selectable: {
|
|
@@ -481,11 +481,6 @@ var fixedColumnsStyles = tv({
|
|
|
481
481
|
}
|
|
482
482
|
},
|
|
483
483
|
compoundVariants: [
|
|
484
|
-
{
|
|
485
|
-
firstColumns: true,
|
|
486
|
-
selectable: false,
|
|
487
|
-
className: "hidden @md:block"
|
|
488
|
-
},
|
|
489
484
|
{
|
|
490
485
|
firstColumns: true,
|
|
491
486
|
canScrollLeft: true,
|