@svadmin/ui 0.17.0 → 0.19.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/package.json +20 -2
- package/src/components/AboutSettings.svelte +106 -0
- package/src/components/AdminApp.svelte +5 -1
- package/src/components/AppearanceSettings.svelte +183 -0
- package/src/components/AuditLogViewer.svelte +226 -0
- package/src/components/AutoTable.svelte +12 -6
- package/src/components/CanAccess.svelte +1 -1
- package/src/components/DraggableGrid.svelte +90 -0
- package/src/components/FieldRenderer.svelte +4 -0
- package/src/components/MarkdownRenderer.svelte +0 -4
- package/src/components/PermissionMatrix.svelte +190 -0
- package/src/components/ProfilePage.svelte +139 -25
- package/src/components/RolesSettings.svelte +144 -0
- package/src/components/SettingsPage.svelte +113 -0
- package/src/components/Sidebar.svelte +3 -0
- package/src/components/TaskQueueDrawer.svelte +170 -0
- package/src/components/TenantSwitcher.svelte +90 -0
- package/src/components/buttons/CloneButton.svelte +3 -3
- package/src/components/buttons/CreateButton.svelte +3 -3
- package/src/components/buttons/DeleteButton.svelte +3 -3
- package/src/components/buttons/EditButton.svelte +3 -3
- package/src/components/buttons/ExportButton.svelte +3 -3
- package/src/components/buttons/ImportButton.svelte +3 -3
- package/src/components/buttons/ShowButton.svelte +3 -3
- package/src/components/fields/ArrayField.svelte +86 -0
- package/src/index.ts +14 -0
- package/src/markdown-deps.d.ts +21 -0
- package/src/components/stories/BarChart.stories.ts +0 -43
- package/src/components/stories/LineChart.stories.ts +0 -48
- package/src/components/stories/PieChart.stories.ts +0 -41
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
2
|
-
import BarChart from '../charts/BarChart.svelte';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Charts/BarChart',
|
|
6
|
-
component: BarChart,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
argTypes: {
|
|
9
|
-
height: { control: { type: 'number', min: 100, max: 500 } },
|
|
10
|
-
showValues: { control: 'boolean' },
|
|
11
|
-
},
|
|
12
|
-
} satisfies Meta<BarChart>;
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
|
|
17
|
-
export const Default: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
data: [
|
|
20
|
-
{ label: 'Jan', value: 120 },
|
|
21
|
-
{ label: 'Feb', value: 180 },
|
|
22
|
-
{ label: 'Mar', value: 95 },
|
|
23
|
-
{ label: 'Apr', value: 210 },
|
|
24
|
-
{ label: 'May', value: 165 },
|
|
25
|
-
{ label: 'Jun', value: 245 },
|
|
26
|
-
],
|
|
27
|
-
height: 200,
|
|
28
|
-
showValues: true,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const CustomColors: Story = {
|
|
33
|
-
args: {
|
|
34
|
-
data: [
|
|
35
|
-
{ label: 'Users', value: 1200, color: '#6366f1' },
|
|
36
|
-
{ label: 'Orders', value: 850, color: '#f59e0b' },
|
|
37
|
-
{ label: 'Revenue', value: 2100, color: '#10b981' },
|
|
38
|
-
{ label: 'Returns', value: 120, color: '#ef4444' },
|
|
39
|
-
],
|
|
40
|
-
height: 250,
|
|
41
|
-
showValues: true,
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
2
|
-
import LineChart from '../charts/LineChart.svelte';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Charts/LineChart',
|
|
6
|
-
component: LineChart,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
argTypes: {
|
|
9
|
-
height: { control: { type: 'number', min: 100, max: 500 } },
|
|
10
|
-
showDots: { control: 'boolean' },
|
|
11
|
-
fill: { control: 'boolean' },
|
|
12
|
-
},
|
|
13
|
-
} satisfies Meta<LineChart>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
export const Default: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
data: [
|
|
21
|
-
{ label: 'Mon', value: 120 },
|
|
22
|
-
{ label: 'Tue', value: 180 },
|
|
23
|
-
{ label: 'Wed', value: 150 },
|
|
24
|
-
{ label: 'Thu', value: 210 },
|
|
25
|
-
{ label: 'Fri', value: 190 },
|
|
26
|
-
{ label: 'Sat', value: 250 },
|
|
27
|
-
{ label: 'Sun', value: 220 },
|
|
28
|
-
],
|
|
29
|
-
height: 200,
|
|
30
|
-
showDots: true,
|
|
31
|
-
fill: true,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const NoFill: Story = {
|
|
36
|
-
args: {
|
|
37
|
-
data: [
|
|
38
|
-
{ label: 'Q1', value: 3200 },
|
|
39
|
-
{ label: 'Q2', value: 4100 },
|
|
40
|
-
{ label: 'Q3', value: 3800 },
|
|
41
|
-
{ label: 'Q4', value: 5200 },
|
|
42
|
-
],
|
|
43
|
-
height: 250,
|
|
44
|
-
showDots: true,
|
|
45
|
-
fill: false,
|
|
46
|
-
color: '#10b981',
|
|
47
|
-
},
|
|
48
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/svelte';
|
|
2
|
-
import PieChart from '../charts/PieChart.svelte';
|
|
3
|
-
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Charts/PieChart',
|
|
6
|
-
component: PieChart,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
argTypes: {
|
|
9
|
-
size: { control: { type: 'number', min: 100, max: 400 } },
|
|
10
|
-
donut: { control: { type: 'number', min: 0, max: 0.8, step: 0.1 } },
|
|
11
|
-
},
|
|
12
|
-
} satisfies Meta<PieChart>;
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
|
|
17
|
-
export const Donut: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
data: [
|
|
20
|
-
{ label: 'Desktop', value: 580, color: '#6366f1' },
|
|
21
|
-
{ label: 'Mobile', value: 320, color: '#f59e0b' },
|
|
22
|
-
{ label: 'Tablet', value: 100, color: '#10b981' },
|
|
23
|
-
],
|
|
24
|
-
size: 200,
|
|
25
|
-
donut: 0.6,
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const Pie: Story = {
|
|
30
|
-
args: {
|
|
31
|
-
data: [
|
|
32
|
-
{ label: 'Chrome', value: 64, color: '#4285f4' },
|
|
33
|
-
{ label: 'Safari', value: 19, color: '#5ac8fa' },
|
|
34
|
-
{ label: 'Firefox', value: 10, color: '#ff7139' },
|
|
35
|
-
{ label: 'Edge', value: 4, color: '#0078d7' },
|
|
36
|
-
{ label: 'Other', value: 3, color: '#a0a0a0' },
|
|
37
|
-
],
|
|
38
|
-
size: 220,
|
|
39
|
-
donut: 0,
|
|
40
|
-
},
|
|
41
|
-
};
|