notionsoft-ui 1.0.2 → 1.0.3

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 (45) hide show
  1. package/.storybook/main.ts +19 -0
  2. package/.storybook/preview.css +160 -0
  3. package/.storybook/preview.ts +21 -0
  4. package/.storybook/vitest.setup.ts +7 -0
  5. package/cli/index.cjs +1 -1
  6. package/package.json +23 -2
  7. package/src/stories/Button.stories.ts +54 -0
  8. package/src/stories/Button.tsx +37 -0
  9. package/src/stories/Configure.mdx +364 -0
  10. package/src/stories/Header.stories.ts +34 -0
  11. package/src/stories/Header.tsx +56 -0
  12. package/src/stories/Page.stories.ts +33 -0
  13. package/src/stories/Page.tsx +73 -0
  14. package/src/stories/assets/accessibility.png +0 -0
  15. package/src/stories/assets/accessibility.svg +1 -0
  16. package/src/stories/assets/addon-library.png +0 -0
  17. package/src/stories/assets/assets.png +0 -0
  18. package/src/stories/assets/avif-test-image.avif +0 -0
  19. package/src/stories/assets/context.png +0 -0
  20. package/src/stories/assets/discord.svg +1 -0
  21. package/src/stories/assets/docs.png +0 -0
  22. package/src/stories/assets/figma-plugin.png +0 -0
  23. package/src/stories/assets/github.svg +1 -0
  24. package/src/stories/assets/share.png +0 -0
  25. package/src/stories/assets/styling.png +0 -0
  26. package/src/stories/assets/testing.png +0 -0
  27. package/src/stories/assets/theming.png +0 -0
  28. package/src/stories/assets/tutorials.svg +1 -0
  29. package/src/stories/assets/youtube.svg +1 -0
  30. package/src/stories/button.css +30 -0
  31. package/src/stories/header.css +32 -0
  32. package/src/stories/page.css +68 -0
  33. package/src/templates/button/BooleanStatusButton.stories.tsx +90 -0
  34. package/src/templates/button/BooleanStatusButton.tsx +29 -0
  35. package/src/templates/button/Button.stories.tsx +51 -0
  36. package/src/templates/button/button.tsx +31 -20
  37. package/src/templates/sheet/AnimatedSheet.stories.tsx +103 -0
  38. package/src/templates/sheet/AnimatedSheet.tsx +163 -0
  39. package/src/templates/text/ShinyText.stories.tsx +43 -0
  40. package/src/templates/text/ShinyText.tsx +35 -0
  41. package/tsconfig.json +2 -1
  42. package/vite.config.ts +36 -0
  43. package/vitest.shims.d.ts +1 -0
  44. package/src/templates/card/card.tsx +0 -20
  45. package/src/utils/cn.js +0 -15
package/vite.config.ts ADDED
@@ -0,0 +1,36 @@
1
+ /// <reference types="vitest/config" />
2
+ import { defineConfig } from "vite";
3
+ import tailwindcss from "@tailwindcss/vite";
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
7
+ import { playwright } from '@vitest/browser-playwright';
8
+ const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
9
+
10
+ // More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
11
+ export default defineConfig({
12
+ plugins: [tailwindcss()],
13
+ test: {
14
+ projects: [{
15
+ extends: true,
16
+ plugins: [
17
+ // The plugin will run tests for the stories defined in your Storybook config
18
+ // See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
19
+ storybookTest({
20
+ configDir: path.join(dirname, '.storybook')
21
+ })],
22
+ test: {
23
+ name: 'storybook',
24
+ browser: {
25
+ enabled: true,
26
+ headless: true,
27
+ provider: playwright({}),
28
+ instances: [{
29
+ browser: 'chromium'
30
+ }]
31
+ },
32
+ setupFiles: ['.storybook/vitest.setup.ts']
33
+ }
34
+ }]
35
+ }
36
+ });
@@ -0,0 +1 @@
1
+ /// <reference types="@vitest/browser-playwright" />
@@ -1,20 +0,0 @@
1
- import { cn } from "@/utils/cn";
2
- import React from "react";
3
-
4
- interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}
5
-
6
- const Card: React.FC<CardProps> = ({ className, children, ...props }) => {
7
- return (
8
- <div
9
- className={cn(
10
- "bg-card text-card-foreground border border-border rounded-lg p-4 shadow-sm",
11
- className
12
- )}
13
- {...props}
14
- >
15
- {children}
16
- </div>
17
- );
18
- };
19
-
20
- export default Card;
package/src/utils/cn.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cn = cn;
4
- var clsx_1 = require("clsx");
5
- var tailwind_merge_1 = require("tailwind-merge");
6
- /**
7
- * Merge Tailwind classes intelligently
8
- */
9
- function cn() {
10
- var inputs = [];
11
- for (var _i = 0; _i < arguments.length; _i++) {
12
- inputs[_i] = arguments[_i];
13
- }
14
- return (0, tailwind_merge_1.twMerge)(clsx_1.clsx.apply(void 0, inputs));
15
- }