@slyxup/ui 0.2.0 → 0.2.1
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/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/dist/components/BillingPortal/BillingPortal.d.ts +22 -0
- package/dist/components/BillingPortal/BillingPortal.d.ts.map +1 -0
- package/dist/components/BillingPortal/BillingPortal.js +59 -0
- package/dist/components/BillingPortal/BillingPortal.js.map +1 -0
- package/dist/components/PricingTable/PricingTable.d.ts +19 -0
- package/dist/components/PricingTable/PricingTable.d.ts.map +1 -0
- package/dist/components/PricingTable/PricingTable.js +52 -0
- package/dist/components/PricingTable/PricingTable.js.map +1 -0
- package/dist/components/SignIn/SignIn.d.ts.map +1 -1
- package/dist/components/SignIn/SignIn.js +13 -2
- package/dist/components/SignIn/SignIn.js.map +1 -1
- package/dist/components/SignUp/SignUp.d.ts.map +1 -1
- package/dist/components/SignUp/SignUp.js +13 -2
- package/dist/components/SignUp/SignUp.js.map +1 -1
- package/dist/styles.d.ts +3 -2
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +37 -16
- package/dist/styles.js.map +1 -1
- package/package.json +13 -9
- package/src/components/BillingPortal/BillingPortal.tsx +182 -0
- package/src/components/PricingTable/PricingTable.tsx +155 -0
- package/src/components/SignIn/SignIn.tsx +26 -1
- package/src/components/SignUp/SignUp.tsx +26 -1
- package/src/styles.ts +38 -16
- package/test/components.test.tsx +135 -0
- package/test/icons.test.tsx +32 -0
- package/test/styles.test.ts +47 -0
- package/vitest.config.ts +2 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { KeyholeMark, GoogleIcon, GitHubIcon, CheckIcon } from '../src/icons';
|
|
5
|
+
|
|
6
|
+
describe('KeyholeMark', () => {
|
|
7
|
+
it('renders an SVG', () => {
|
|
8
|
+
const { container } = render(<KeyholeMark />);
|
|
9
|
+
expect(container.querySelector('svg')).toBeTruthy();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
describe('GoogleIcon', () => {
|
|
14
|
+
it('renders an SVG', () => {
|
|
15
|
+
const { container } = render(<GoogleIcon />);
|
|
16
|
+
expect(container.querySelector('svg')).toBeTruthy();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe('GitHubIcon', () => {
|
|
21
|
+
it('renders an SVG', () => {
|
|
22
|
+
const { container } = render(<GitHubIcon />);
|
|
23
|
+
expect(container.querySelector('svg')).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
describe('CheckIcon', () => {
|
|
28
|
+
it('renders an SVG', () => {
|
|
29
|
+
const { container } = render(<CheckIcon />);
|
|
30
|
+
expect(container.querySelector('svg')).toBeTruthy();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { CSS, injectStyles } from '../src/styles';
|
|
3
|
+
|
|
4
|
+
describe('CSS', () => {
|
|
5
|
+
it('is a non-empty string', () => {
|
|
6
|
+
expect(typeof CSS).toBe('string');
|
|
7
|
+
expect(CSS.length).toBeGreaterThan(0);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('contains .slyxup-root', () => {
|
|
11
|
+
expect(CSS).toContain('.slyxup-root');
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('contains --slx-accent', () => {
|
|
15
|
+
expect(CSS).toContain('--slx-accent');
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('contains dark mode media query', () => {
|
|
19
|
+
expect(CSS).toContain('prefers-color-scheme: dark');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('contains @keyframes slx-shake', () => {
|
|
23
|
+
expect(CSS).toContain('@keyframes slx-shake');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('contains @keyframes slx-spin', () => {
|
|
27
|
+
expect(CSS).toContain('@keyframes slx-spin');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('contains prefers-reduced-motion', () => {
|
|
31
|
+
expect(CSS).toContain('prefers-reduced-motion');
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('contains card styles', () => {
|
|
35
|
+
expect(CSS).toContain('.slx-card');
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('contains button styles', () => {
|
|
39
|
+
expect(CSS).toContain('.slx-btn');
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
describe('injectStyles', () => {
|
|
44
|
+
it('is a function', () => {
|
|
45
|
+
expect(typeof injectStyles).toBe('function');
|
|
46
|
+
});
|
|
47
|
+
});
|
package/vitest.config.ts
ADDED