@c-rex/components 0.1.21 → 0.1.23

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 (53) hide show
  1. package/package.json +78 -62
  2. package/src/article/article-action-bar.tsx +89 -0
  3. package/src/article/article-content.tsx +55 -0
  4. package/src/autocomplete.tsx +55 -50
  5. package/src/breadcrumb.tsx +3 -1
  6. package/src/directoryNodes/tree-of-content.tsx +49 -0
  7. package/src/{bookmark-button.tsx → favorites/bookmark-button.tsx} +12 -3
  8. package/src/{favorite-button.tsx → favorites/favorite-button.tsx} +1 -1
  9. package/src/generated/client-components.tsx +1350 -0
  10. package/src/generated/create-client-request.tsx +105 -0
  11. package/src/generated/create-server-request.tsx +61 -0
  12. package/src/generated/create-suggestions-request.tsx +56 -0
  13. package/src/generated/server-components.tsx +1056 -0
  14. package/src/generated/suggestions.tsx +299 -0
  15. package/src/info/bookmark.tsx +51 -0
  16. package/src/info/info-table.tsx +127 -60
  17. package/src/info/shared.tsx +1 -1
  18. package/src/navbar/language-switcher/shared.tsx +1 -1
  19. package/src/navbar/navbar.tsx +1 -1
  20. package/src/{stories → navbar/stories}/navbar.stories.tsx +1 -1
  21. package/src/page-wrapper.tsx +1 -1
  22. package/src/renditions/file-download.tsx +84 -0
  23. package/src/renditions/html.tsx +55 -0
  24. package/src/renditions/image/container.tsx +52 -0
  25. package/src/renditions/image/rendition.tsx +61 -0
  26. package/src/{dialog-filter.tsx → results/dialog-filter.tsx} +22 -23
  27. package/src/results/filter-navbar.tsx +241 -0
  28. package/src/results/filter-sidebar/index.tsx +125 -0
  29. package/src/results/filter-sidebar/utils.ts +164 -0
  30. package/src/{pagination.tsx → results/pagination.tsx} +12 -10
  31. package/src/results/result-container.tsx +70 -0
  32. package/src/{stories/blog-view.stories.tsx → results/stories/cards.stories.tsx} +1 -1
  33. package/src/{stories/table-view.stories.tsx → results/stories/table.stories.tsx} +1 -1
  34. package/src/results/table-with-images.tsx +140 -0
  35. package/src/{result-view → results}/table.tsx +1 -2
  36. package/src/results/utils.ts +67 -0
  37. package/src/{navbar/search-input.tsx → search-input.tsx} +9 -6
  38. package/src/share-button.tsx +49 -0
  39. package/src/stores/search-settings-store.ts +1 -1
  40. package/src/blur-image.tsx +0 -23
  41. package/src/left-sidebar.tsx +0 -90
  42. package/src/result-list.tsx +0 -43
  43. package/src/result-view/table-with-images.tsx +0 -199
  44. package/src/right-sidebar.tsx +0 -70
  45. package/src/search-modal.tsx +0 -140
  46. package/src/stories/blur-image.stories.tsx +0 -51
  47. package/src/stories/sidebar.stories.tsx +0 -94
  48. /package/src/{file-icon.tsx → icons/file-icon.tsx} +0 -0
  49. /package/src/{flag.tsx → icons/flag-icon.tsx} +0 -0
  50. /package/src/{loading.tsx → icons/loading.tsx} +0 -0
  51. /package/src/{result-view/blog.tsx → results/cards.tsx} +0 -0
  52. /package/src/{empty.tsx → results/empty.tsx} +0 -0
  53. /package/src/{stories → results/stories}/empty.stories.tsx +0 -0
@@ -1,51 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { BlurImage } from '../blur-image';
3
-
4
- const meta = {
5
- title: 'Components/BlurImage',
6
- component: BlurImage,
7
- tags: ['autodocs'],
8
- parameters: {
9
- layout: 'centered',
10
- },
11
- argTypes: {
12
- src: { control: 'text' },
13
- alt: { control: 'text' },
14
- width: { control: 'number' },
15
- height: { control: 'number' },
16
- className: { control: 'text' },
17
- },
18
- } satisfies Meta<typeof BlurImage>;
19
-
20
- export default meta;
21
- type Story = StoryObj<typeof meta>;
22
-
23
- export const Default: Story = {
24
- args: {
25
- src: 'https://images.pexels.com/photos/31712301/pexels-photo-31712301/free-photo-of-scenic-cycling-tour-in-andernach-fields.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
26
- alt: 'Sample image with blur effect',
27
- width: 400,
28
- height: 300,
29
- className: 'rounded-lg',
30
- },
31
- };
32
-
33
- export const SmallImage: Story = {
34
- args: {
35
- src: 'https://images.pexels.com/photos/31712301/pexels-photo-31712301/free-photo-of-scenic-cycling-tour-in-andernach-fields.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
36
- alt: 'Small sample image with blur effect',
37
- width: 200,
38
- height: 150,
39
- className: 'rounded-lg',
40
- },
41
- };
42
-
43
- export const RoundedImage: Story = {
44
- args: {
45
- src: 'https://images.pexels.com/photos/31712301/pexels-photo-31712301/free-photo-of-scenic-cycling-tour-in-andernach-fields.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
46
- alt: 'Rounded sample image with blur effect',
47
- width: 300,
48
- height: 300,
49
- className: 'rounded-full',
50
- },
51
- };
@@ -1,94 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { AppSidebar } from '../sidebar';
3
- import { SidebarInset, SidebarProvider, SidebarTrigger } from "@c-rex/ui/sidebar";
4
-
5
- const meta = {
6
- title: 'Components/Sidebar',
7
- component: AppSidebar,
8
- tags: ['autodocs'],
9
- parameters: {
10
- layout: 'centered',
11
- },
12
- argTypes: {
13
- data: { control: 'object' },
14
- loading: { control: 'boolean' },
15
- },
16
- decorators: [
17
- (Story: any) => (
18
- <SidebarProvider>
19
- <SidebarTrigger />
20
-
21
- <div className="flex">
22
- <SidebarInset>
23
- <Story />
24
- </SidebarInset>
25
- </div>
26
- </SidebarProvider>
27
-
28
- ),
29
- ]
30
- } satisfies Meta<typeof AppSidebar>;
31
-
32
- export default meta;
33
- type Story = StoryObj<typeof meta>;
34
-
35
- const mockData = [
36
- {
37
- id: '1',
38
- label: 'Getting Started',
39
- link: '/docs/getting-started',
40
- active: true,
41
- children: [
42
- {
43
- id: '1-1',
44
- label: 'Installation',
45
- link: '/docs/getting-started/installation',
46
- active: false,
47
- children: [],
48
- },
49
- {
50
- id: '1-2',
51
- label: 'Configuration',
52
- link: '/docs/getting-started/configuration',
53
- active: false,
54
- children: [],
55
- },
56
- ],
57
- },
58
- {
59
- id: '2',
60
- label: 'Components',
61
- link: '/docs/components',
62
- active: false,
63
- children: [
64
- {
65
- id: '2-1',
66
- label: 'Sidebar',
67
- link: '/docs/components/sidebar',
68
- active: false,
69
- children: [],
70
- },
71
- {
72
- id: '2-2',
73
- label: 'Navbar',
74
- link: '/docs/components/navbar',
75
- active: false,
76
- children: [],
77
- },
78
- ],
79
- },
80
- ];
81
-
82
- export const Default: Story = {
83
- args: {
84
- data: mockData,
85
- loading: false,
86
- },
87
- };
88
-
89
- export const Loading: Story = {
90
- args: {
91
- data: [],
92
- loading: true,
93
- },
94
- };
File without changes
File without changes
File without changes
File without changes
File without changes