sdocs 0.0.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/README.md +43 -0
- package/bin/sdocs.js +2 -0
- package/dist/Sdocs.svelte +1210 -0
- package/dist/Sdocs.svelte.d.ts +5 -0
- package/dist/cli/app-plugin.d.ts +7 -0
- package/dist/cli/app-plugin.js +69 -0
- package/dist/cli/config.d.ts +12 -0
- package/dist/cli/config.js +34 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +72 -0
- package/dist/cli/server.d.ts +2 -0
- package/dist/cli/server.js +62 -0
- package/dist/docgen.d.ts +47 -0
- package/dist/docgen.js +463 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/internal/ComponentPreview.svelte +58 -0
- package/dist/internal/ComponentPreview.svelte.d.ts +17 -0
- package/dist/internal/CssPropsTable.svelte +239 -0
- package/dist/internal/CssPropsTable.svelte.d.ts +11 -0
- package/dist/internal/Home.svelte +92 -0
- package/dist/internal/Home.svelte.d.ts +9 -0
- package/dist/internal/MethodsTable.svelte +72 -0
- package/dist/internal/MethodsTable.svelte.d.ts +7 -0
- package/dist/internal/PropsTable.svelte +342 -0
- package/dist/internal/PropsTable.svelte.d.ts +12 -0
- package/dist/internal/Showcase.svelte +130 -0
- package/dist/internal/Showcase.svelte.d.ts +21 -0
- package/dist/types.d.ts +162 -0
- package/dist/types.js +1 -0
- package/dist/ui/Badge/Badge.docs.svelte +46 -0
- package/dist/ui/Badge/Badge.docs.svelte.d.ts +26 -0
- package/dist/ui/Badge/Badge.svelte +59 -0
- package/dist/ui/Badge/Badge.svelte.d.ts +17 -0
- package/dist/ui/Badge/index.d.ts +1 -0
- package/dist/ui/Badge/index.js +1 -0
- package/dist/ui/Checkbox/Checkbox.docs.svelte +51 -0
- package/dist/ui/Checkbox/Checkbox.docs.svelte.d.ts +27 -0
- package/dist/ui/Checkbox/Checkbox.svelte +169 -0
- package/dist/ui/Checkbox/Checkbox.svelte.d.ts +18 -0
- package/dist/ui/Checkbox/index.d.ts +1 -0
- package/dist/ui/Checkbox/index.js +1 -0
- package/dist/ui/CodeBlock/CodeBlock.docs.svelte +28 -0
- package/dist/ui/CodeBlock/CodeBlock.docs.svelte.d.ts +24 -0
- package/dist/ui/CodeBlock/CodeBlock.svelte +101 -0
- package/dist/ui/CodeBlock/CodeBlock.svelte.d.ts +7 -0
- package/dist/ui/CodeBlock/index.d.ts +1 -0
- package/dist/ui/CodeBlock/index.js +1 -0
- package/dist/ui/Frame/Frame.docs.svelte +140 -0
- package/dist/ui/Frame/Frame.docs.svelte.d.ts +26 -0
- package/dist/ui/Frame/Frame.svelte +88 -0
- package/dist/ui/Frame/Frame.svelte.d.ts +15 -0
- package/dist/ui/Frame/index.d.ts +1 -0
- package/dist/ui/Frame/index.js +1 -0
- package/dist/ui/InputNumber/InputNumber.docs.svelte +50 -0
- package/dist/ui/InputNumber/InputNumber.docs.svelte.d.ts +26 -0
- package/dist/ui/InputNumber/InputNumber.svelte +275 -0
- package/dist/ui/InputNumber/InputNumber.svelte.d.ts +26 -0
- package/dist/ui/InputNumber/index.d.ts +1 -0
- package/dist/ui/InputNumber/index.js +1 -0
- package/dist/ui/InputText/InputText.docs.svelte +43 -0
- package/dist/ui/InputText/InputText.docs.svelte.d.ts +26 -0
- package/dist/ui/InputText/InputText.svelte +116 -0
- package/dist/ui/InputText/InputText.svelte.d.ts +22 -0
- package/dist/ui/InputText/index.d.ts +1 -0
- package/dist/ui/InputText/index.js +1 -0
- package/dist/ui/Panel/CollapsiblePanel.docs.svelte +45 -0
- package/dist/ui/Panel/CollapsiblePanel.docs.svelte.d.ts +25 -0
- package/dist/ui/Panel/CollapsiblePanel.svelte +93 -0
- package/dist/ui/Panel/CollapsiblePanel.svelte.d.ts +14 -0
- package/dist/ui/Panel/index.d.ts +1 -0
- package/dist/ui/Panel/index.js +1 -0
- package/dist/ui/Placeholder/Placeholder.docs.svelte +49 -0
- package/dist/ui/Placeholder/Placeholder.docs.svelte.d.ts +26 -0
- package/dist/ui/Placeholder/Placeholder.svelte +99 -0
- package/dist/ui/Placeholder/Placeholder.svelte.d.ts +21 -0
- package/dist/ui/Placeholder/index.d.ts +1 -0
- package/dist/ui/Placeholder/index.js +1 -0
- package/dist/ui/Radio/Radio.docs.svelte +67 -0
- package/dist/ui/Radio/Radio.docs.svelte.d.ts +27 -0
- package/dist/ui/Radio/Radio.svelte +165 -0
- package/dist/ui/Radio/Radio.svelte.d.ts +22 -0
- package/dist/ui/Radio/RadioGroup.docs.svelte +70 -0
- package/dist/ui/Radio/RadioGroup.docs.svelte.d.ts +27 -0
- package/dist/ui/Radio/RadioGroup.svelte +98 -0
- package/dist/ui/Radio/RadioGroup.svelte.d.ts +27 -0
- package/dist/ui/Radio/index.d.ts +2 -0
- package/dist/ui/Radio/index.js +2 -0
- package/dist/ui/SegmentControl/SegmentControl.docs.svelte +54 -0
- package/dist/ui/SegmentControl/SegmentControl.docs.svelte.d.ts +25 -0
- package/dist/ui/SegmentControl/SegmentControl.svelte +120 -0
- package/dist/ui/SegmentControl/SegmentControl.svelte.d.ts +18 -0
- package/dist/ui/SegmentControl/index.d.ts +1 -0
- package/dist/ui/SegmentControl/index.js +1 -0
- package/dist/ui/Stack/Stack.docs.svelte +63 -0
- package/dist/ui/Stack/Stack.docs.svelte.d.ts +26 -0
- package/dist/ui/Stack/Stack.svelte +45 -0
- package/dist/ui/Stack/Stack.svelte.d.ts +19 -0
- package/dist/ui/Stack/index.d.ts +1 -0
- package/dist/ui/Stack/index.js +1 -0
- package/dist/ui/Table/Body.svelte +17 -0
- package/dist/ui/Table/Body.svelte.d.ts +11 -0
- package/dist/ui/Table/Caption.svelte +17 -0
- package/dist/ui/Table/Caption.svelte.d.ts +11 -0
- package/dist/ui/Table/Cell.svelte +24 -0
- package/dist/ui/Table/Cell.svelte.d.ts +15 -0
- package/dist/ui/Table/Foot.svelte +17 -0
- package/dist/ui/Table/Foot.svelte.d.ts +11 -0
- package/dist/ui/Table/Head.svelte +17 -0
- package/dist/ui/Table/Head.svelte.d.ts +11 -0
- package/dist/ui/Table/Header.svelte +27 -0
- package/dist/ui/Table/Header.svelte.d.ts +17 -0
- package/dist/ui/Table/Row.svelte +19 -0
- package/dist/ui/Table/Row.svelte.d.ts +13 -0
- package/dist/ui/Table/Table.docs.svelte +197 -0
- package/dist/ui/Table/Table.docs.svelte.d.ts +28 -0
- package/dist/ui/Table/Table.svelte +140 -0
- package/dist/ui/Table/Table.svelte.d.ts +27 -0
- package/dist/ui/Table/index.js +10 -0
- package/dist/ui/css/colors.css +377 -0
- package/dist/ui/css/global.css +10 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/index.js +12 -0
- package/dist/virtual-sdocs.d.ts +20 -0
- package/dist/vite-plugin.d.ts +18 -0
- package/dist/vite-plugin.js +206 -0
- package/dist/vite.d.ts +2 -0
- package/dist/vite.js +2 -0
- package/package.json +76 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A compound table component with semantic HTML sub-components.
|
|
6
|
+
*
|
|
7
|
+
* @cssvar {color} --table-border - Border color (default: var(--color-border))
|
|
8
|
+
* @cssvar {color} --table-bg - Background color (default: white)
|
|
9
|
+
* @cssvar {color} --table-header-bg - Header background (default: var(--color-bg))
|
|
10
|
+
* @cssvar {color} --table-hover-bg - Row hover background (default: var(--color-bg-hover))
|
|
11
|
+
* @cssvar {color} --table-stripe-bg - Striped row background (default: var(--color-bg))
|
|
12
|
+
*/
|
|
13
|
+
interface Props {
|
|
14
|
+
/** Table content (Head, Body, Foot, Caption) */
|
|
15
|
+
children: Snippet;
|
|
16
|
+
/** Show alternating row colors */
|
|
17
|
+
striped?: boolean;
|
|
18
|
+
/** Compact padding */
|
|
19
|
+
compact?: boolean;
|
|
20
|
+
/** Fixed table layout */
|
|
21
|
+
fixed?: boolean;
|
|
22
|
+
/** Remove outer border */
|
|
23
|
+
borderless?: boolean;
|
|
24
|
+
/** Additional CSS class */
|
|
25
|
+
class?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let {
|
|
29
|
+
children,
|
|
30
|
+
striped = false,
|
|
31
|
+
compact = false,
|
|
32
|
+
fixed = false,
|
|
33
|
+
borderless = false,
|
|
34
|
+
class: className = ''
|
|
35
|
+
}: Props = $props();
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div class="Table-wrapper {className}" class:striped class:compact class:fixed class:borderless>
|
|
39
|
+
<table>
|
|
40
|
+
{@render children()}
|
|
41
|
+
</table>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.Table-wrapper {
|
|
46
|
+
width: 100%;
|
|
47
|
+
overflow-x: auto;
|
|
48
|
+
border: 1px solid var(--table-border, var(--color-border));
|
|
49
|
+
border-radius: 0;
|
|
50
|
+
background: var(--table-bg, white);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Table-wrapper table {
|
|
54
|
+
width: 100%;
|
|
55
|
+
border-collapse: collapse;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Table-wrapper.fixed table {
|
|
60
|
+
table-layout: fixed;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Head */
|
|
64
|
+
.Table-wrapper :global(thead th) {
|
|
65
|
+
text-align: left;
|
|
66
|
+
padding: 10px 12px;
|
|
67
|
+
background: var(--table-header-bg, var(--color-bg));
|
|
68
|
+
border-bottom: 1px solid var(--table-border, var(--color-border));
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
color: var(--color-text-secondary);
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
text-transform: uppercase;
|
|
73
|
+
letter-spacing: 0.05em;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Body cells */
|
|
77
|
+
.Table-wrapper :global(tbody td),
|
|
78
|
+
.Table-wrapper :global(tbody th) {
|
|
79
|
+
padding: 10px 12px;
|
|
80
|
+
border-bottom: 1px solid var(--color-border-subtle);
|
|
81
|
+
vertical-align: middle;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.Table-wrapper :global(tbody tr:last-child td),
|
|
85
|
+
.Table-wrapper :global(tbody tr:last-child th) {
|
|
86
|
+
border-bottom: none;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.Table-wrapper :global(tbody tr:hover) {
|
|
90
|
+
background: var(--table-hover-bg, var(--base-50));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Foot */
|
|
94
|
+
.Table-wrapper :global(tfoot td),
|
|
95
|
+
.Table-wrapper :global(tfoot th) {
|
|
96
|
+
padding: 10px 12px;
|
|
97
|
+
background: var(--table-header-bg, var(--color-bg));
|
|
98
|
+
border-top: 1px solid var(--table-border, var(--color-border));
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
font-size: 13px;
|
|
101
|
+
color: var(--color-text-secondary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Caption */
|
|
105
|
+
.Table-wrapper :global(caption) {
|
|
106
|
+
padding: 10px 12px;
|
|
107
|
+
font-size: 13px;
|
|
108
|
+
color: var(--color-text-secondary);
|
|
109
|
+
text-align: left;
|
|
110
|
+
caption-side: top;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Compact variant */
|
|
114
|
+
.Table-wrapper.compact :global(thead th) {
|
|
115
|
+
padding: 6px 10px;
|
|
116
|
+
font-size: 11px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.Table-wrapper.compact :global(tbody td),
|
|
120
|
+
.Table-wrapper.compact :global(tbody th),
|
|
121
|
+
.Table-wrapper.compact :global(tfoot td),
|
|
122
|
+
.Table-wrapper.compact :global(tfoot th) {
|
|
123
|
+
padding: 6px 10px;
|
|
124
|
+
font-size: 13px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Borderless variant */
|
|
128
|
+
.Table-wrapper.borderless {
|
|
129
|
+
border: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Striped variant */
|
|
133
|
+
.Table-wrapper.striped :global(tbody tr:nth-child(even)) {
|
|
134
|
+
background: var(--table-stripe-bg, var(--color-bg));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.Table-wrapper.striped :global(tbody tr:nth-child(even):hover) {
|
|
138
|
+
background: var(--table-hover-bg, var(--base-50));
|
|
139
|
+
}
|
|
140
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
/**
|
|
3
|
+
* A compound table component with semantic HTML sub-components.
|
|
4
|
+
*
|
|
5
|
+
* @cssvar {color} --table-border - Border color (default: var(--color-border))
|
|
6
|
+
* @cssvar {color} --table-bg - Background color (default: white)
|
|
7
|
+
* @cssvar {color} --table-header-bg - Header background (default: var(--color-bg))
|
|
8
|
+
* @cssvar {color} --table-hover-bg - Row hover background (default: var(--color-bg-hover))
|
|
9
|
+
* @cssvar {color} --table-stripe-bg - Striped row background (default: var(--color-bg))
|
|
10
|
+
*/
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Table content (Head, Body, Foot, Caption) */
|
|
13
|
+
children: Snippet;
|
|
14
|
+
/** Show alternating row colors */
|
|
15
|
+
striped?: boolean;
|
|
16
|
+
/** Compact padding */
|
|
17
|
+
compact?: boolean;
|
|
18
|
+
/** Fixed table layout */
|
|
19
|
+
fixed?: boolean;
|
|
20
|
+
/** Remove outer border */
|
|
21
|
+
borderless?: boolean;
|
|
22
|
+
/** Additional CSS class */
|
|
23
|
+
class?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const Table: import("svelte").Component<Props, {}, "">;
|
|
26
|
+
type Table = ReturnType<typeof Table>;
|
|
27
|
+
export default Table;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import TableRoot from './Table.svelte';
|
|
2
|
+
import Head from './Head.svelte';
|
|
3
|
+
import Body from './Body.svelte';
|
|
4
|
+
import Foot from './Foot.svelte';
|
|
5
|
+
import Row from './Row.svelte';
|
|
6
|
+
import Header from './Header.svelte';
|
|
7
|
+
import Cell from './Cell.svelte';
|
|
8
|
+
import Caption from './Caption.svelte';
|
|
9
|
+
const Table = Object.assign(TableRoot, { Head, Body, Foot, Row, Header, Cell, Caption });
|
|
10
|
+
export { Table, Head, Body, Foot, Row, Header, Cell, Caption };
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/* sdocs Color System */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* ========================================
|
|
5
|
+
* Base Colors - for layout (links to zinc)
|
|
6
|
+
* ======================================== */
|
|
7
|
+
--base-0: #ffffff;
|
|
8
|
+
--base-50: var(--zinc-50);
|
|
9
|
+
--base-100: var(--zinc-100);
|
|
10
|
+
--base-200: var(--zinc-200);
|
|
11
|
+
--base-300: var(--zinc-300);
|
|
12
|
+
--base-400: var(--zinc-400);
|
|
13
|
+
--base-500: var(--zinc-500);
|
|
14
|
+
--base-600: var(--zinc-600);
|
|
15
|
+
--base-700: var(--zinc-700);
|
|
16
|
+
--base-800: var(--zinc-800);
|
|
17
|
+
--base-900: var(--zinc-900);
|
|
18
|
+
--base-950: var(--zinc-950);
|
|
19
|
+
--base-1000: #000000;
|
|
20
|
+
|
|
21
|
+
/* ========================================
|
|
22
|
+
* Action Colors - for buttons (links to blue)
|
|
23
|
+
* ======================================== */
|
|
24
|
+
--action-50: var(--blue-50);
|
|
25
|
+
--action-100: var(--blue-100);
|
|
26
|
+
--action-200: var(--blue-200);
|
|
27
|
+
--action-300: var(--blue-300);
|
|
28
|
+
--action-400: var(--blue-400);
|
|
29
|
+
--action-500: var(--blue-500);
|
|
30
|
+
--action-600: var(--blue-600);
|
|
31
|
+
--action-700: var(--blue-700);
|
|
32
|
+
--action-800: var(--blue-800);
|
|
33
|
+
--action-900: var(--blue-900);
|
|
34
|
+
--action-950: var(--blue-950);
|
|
35
|
+
|
|
36
|
+
/* ========================================
|
|
37
|
+
* Focus Colors - for selections (links to amber)
|
|
38
|
+
* ======================================== */
|
|
39
|
+
--focus-50: var(--amber-50);
|
|
40
|
+
--focus-100: var(--amber-100);
|
|
41
|
+
--focus-200: var(--amber-200);
|
|
42
|
+
--focus-300: var(--amber-300);
|
|
43
|
+
--focus-400: var(--amber-400);
|
|
44
|
+
--focus-500: var(--amber-500);
|
|
45
|
+
--focus-600: var(--amber-600);
|
|
46
|
+
--focus-700: var(--amber-700);
|
|
47
|
+
--focus-800: var(--amber-800);
|
|
48
|
+
--focus-900: var(--amber-900);
|
|
49
|
+
--focus-950: var(--amber-950);
|
|
50
|
+
|
|
51
|
+
/* ========================================
|
|
52
|
+
* Success Colors (links to green)
|
|
53
|
+
* ======================================== */
|
|
54
|
+
--success-50: var(--green-50);
|
|
55
|
+
--success-100: var(--green-100);
|
|
56
|
+
--success-200: var(--green-200);
|
|
57
|
+
--success-300: var(--green-300);
|
|
58
|
+
--success-400: var(--green-400);
|
|
59
|
+
--success-500: var(--green-500);
|
|
60
|
+
--success-600: var(--green-600);
|
|
61
|
+
--success-700: var(--green-700);
|
|
62
|
+
--success-800: var(--green-800);
|
|
63
|
+
--success-900: var(--green-900);
|
|
64
|
+
--success-950: var(--green-950);
|
|
65
|
+
|
|
66
|
+
/* ========================================
|
|
67
|
+
* Warning Colors (links to orange)
|
|
68
|
+
* ======================================== */
|
|
69
|
+
--warning-50: var(--orange-50);
|
|
70
|
+
--warning-100: var(--orange-100);
|
|
71
|
+
--warning-200: var(--orange-200);
|
|
72
|
+
--warning-300: var(--orange-300);
|
|
73
|
+
--warning-400: var(--orange-400);
|
|
74
|
+
--warning-500: var(--orange-500);
|
|
75
|
+
--warning-600: var(--orange-600);
|
|
76
|
+
--warning-700: var(--orange-700);
|
|
77
|
+
--warning-800: var(--orange-800);
|
|
78
|
+
--warning-900: var(--orange-900);
|
|
79
|
+
--warning-950: var(--orange-950);
|
|
80
|
+
|
|
81
|
+
/* ========================================
|
|
82
|
+
* Danger Colors - for errors (links to red)
|
|
83
|
+
* ======================================== */
|
|
84
|
+
--danger-50: var(--red-50);
|
|
85
|
+
--danger-100: var(--red-100);
|
|
86
|
+
--danger-200: var(--red-200);
|
|
87
|
+
--danger-300: var(--red-300);
|
|
88
|
+
--danger-400: var(--red-400);
|
|
89
|
+
--danger-500: var(--red-500);
|
|
90
|
+
--danger-600: var(--red-600);
|
|
91
|
+
--danger-700: var(--red-700);
|
|
92
|
+
--danger-800: var(--red-800);
|
|
93
|
+
--danger-900: var(--red-900);
|
|
94
|
+
--danger-950: var(--red-950);
|
|
95
|
+
|
|
96
|
+
/* ========================================
|
|
97
|
+
* Info Colors (links to teal)
|
|
98
|
+
* ======================================== */
|
|
99
|
+
--info-50: var(--teal-50);
|
|
100
|
+
--info-100: var(--teal-100);
|
|
101
|
+
--info-200: var(--teal-200);
|
|
102
|
+
--info-300: var(--teal-300);
|
|
103
|
+
--info-400: var(--teal-400);
|
|
104
|
+
--info-500: var(--teal-500);
|
|
105
|
+
--info-600: var(--teal-600);
|
|
106
|
+
--info-700: var(--teal-700);
|
|
107
|
+
--info-800: var(--teal-800);
|
|
108
|
+
--info-900: var(--teal-900);
|
|
109
|
+
--info-950: var(--teal-950);
|
|
110
|
+
|
|
111
|
+
/* ========================================
|
|
112
|
+
* Accent Colors - for non-interactive highlights (links to violet)
|
|
113
|
+
* ======================================== */
|
|
114
|
+
--accent-50: var(--violet-50);
|
|
115
|
+
--accent-100: var(--violet-100);
|
|
116
|
+
--accent-200: var(--violet-200);
|
|
117
|
+
--accent-300: var(--violet-300);
|
|
118
|
+
--accent-400: var(--violet-400);
|
|
119
|
+
--accent-500: var(--violet-500);
|
|
120
|
+
--accent-600: var(--violet-600);
|
|
121
|
+
--accent-700: var(--violet-700);
|
|
122
|
+
--accent-800: var(--violet-800);
|
|
123
|
+
--accent-900: var(--violet-900);
|
|
124
|
+
--accent-950: var(--violet-950);
|
|
125
|
+
|
|
126
|
+
/* ========================================
|
|
127
|
+
* UI Theme - backgrounds, borders, text
|
|
128
|
+
* ======================================== */
|
|
129
|
+
--color-bg: var(--base-50);
|
|
130
|
+
--color-bg-elevated: var(--base-0);
|
|
131
|
+
--color-bg-hover: var(--base-100);
|
|
132
|
+
--color-border: var(--base-200);
|
|
133
|
+
--color-border-subtle: var(--base-100);
|
|
134
|
+
--color-text: var(--base-900);
|
|
135
|
+
--color-text-secondary: var(--base-600);
|
|
136
|
+
--color-text-muted: var(--base-400);
|
|
137
|
+
--color-primary: var(--action-500);
|
|
138
|
+
--color-primary-hover: var(--action-600);
|
|
139
|
+
|
|
140
|
+
/* ========================================
|
|
141
|
+
* Tailwind Colors
|
|
142
|
+
* ======================================== */
|
|
143
|
+
|
|
144
|
+
/* Zinc */
|
|
145
|
+
--zinc-50: #fafafa;
|
|
146
|
+
--zinc-100: #f4f4f5;
|
|
147
|
+
--zinc-200: #e4e4e7;
|
|
148
|
+
--zinc-300: #d4d4d8;
|
|
149
|
+
--zinc-400: #a1a1aa;
|
|
150
|
+
--zinc-500: #71717a;
|
|
151
|
+
--zinc-600: #52525b;
|
|
152
|
+
--zinc-700: #3f3f46;
|
|
153
|
+
--zinc-800: #27272a;
|
|
154
|
+
--zinc-900: #18181b;
|
|
155
|
+
--zinc-950: #09090b;
|
|
156
|
+
|
|
157
|
+
/* Red */
|
|
158
|
+
--red-50: #fef2f2;
|
|
159
|
+
--red-100: #fee2e2;
|
|
160
|
+
--red-200: #fecaca;
|
|
161
|
+
--red-300: #fca5a5;
|
|
162
|
+
--red-400: #f87171;
|
|
163
|
+
--red-500: #ef4444;
|
|
164
|
+
--red-600: #dc2626;
|
|
165
|
+
--red-700: #b91c1c;
|
|
166
|
+
--red-800: #991b1b;
|
|
167
|
+
--red-900: #7f1d1d;
|
|
168
|
+
--red-950: #450a0a;
|
|
169
|
+
|
|
170
|
+
/* Orange */
|
|
171
|
+
--orange-50: #fff7ed;
|
|
172
|
+
--orange-100: #ffedd5;
|
|
173
|
+
--orange-200: #fed7aa;
|
|
174
|
+
--orange-300: #fdba74;
|
|
175
|
+
--orange-400: #fb923c;
|
|
176
|
+
--orange-500: #f97316;
|
|
177
|
+
--orange-600: #ea580c;
|
|
178
|
+
--orange-700: #c2410c;
|
|
179
|
+
--orange-800: #9a3412;
|
|
180
|
+
--orange-900: #7c2d12;
|
|
181
|
+
--orange-950: #431407;
|
|
182
|
+
|
|
183
|
+
/* Amber */
|
|
184
|
+
--amber-50: #fffbeb;
|
|
185
|
+
--amber-100: #fef3c7;
|
|
186
|
+
--amber-200: #fde68a;
|
|
187
|
+
--amber-300: #fcd34d;
|
|
188
|
+
--amber-400: #fbbf24;
|
|
189
|
+
--amber-500: #f59e0b;
|
|
190
|
+
--amber-600: #d97706;
|
|
191
|
+
--amber-700: #b45309;
|
|
192
|
+
--amber-800: #92400e;
|
|
193
|
+
--amber-900: #78350f;
|
|
194
|
+
--amber-950: #451a03;
|
|
195
|
+
|
|
196
|
+
/* Yellow */
|
|
197
|
+
--yellow-50: #fefce8;
|
|
198
|
+
--yellow-100: #fef9c3;
|
|
199
|
+
--yellow-200: #fef08a;
|
|
200
|
+
--yellow-300: #fde047;
|
|
201
|
+
--yellow-400: #facc15;
|
|
202
|
+
--yellow-500: #eab308;
|
|
203
|
+
--yellow-600: #ca8a04;
|
|
204
|
+
--yellow-700: #a16207;
|
|
205
|
+
--yellow-800: #854d0e;
|
|
206
|
+
--yellow-900: #713f12;
|
|
207
|
+
--yellow-950: #422006;
|
|
208
|
+
|
|
209
|
+
/* Lime */
|
|
210
|
+
--lime-50: #f7fee7;
|
|
211
|
+
--lime-100: #ecfccb;
|
|
212
|
+
--lime-200: #d9f99d;
|
|
213
|
+
--lime-300: #bef264;
|
|
214
|
+
--lime-400: #a3e635;
|
|
215
|
+
--lime-500: #84cc16;
|
|
216
|
+
--lime-600: #65a30d;
|
|
217
|
+
--lime-700: #4d7c0f;
|
|
218
|
+
--lime-800: #3f6212;
|
|
219
|
+
--lime-900: #365314;
|
|
220
|
+
--lime-950: #1a2e05;
|
|
221
|
+
|
|
222
|
+
/* Green */
|
|
223
|
+
--green-50: #f0fdf4;
|
|
224
|
+
--green-100: #dcfce7;
|
|
225
|
+
--green-200: #bbf7d0;
|
|
226
|
+
--green-300: #86efac;
|
|
227
|
+
--green-400: #4ade80;
|
|
228
|
+
--green-500: #22c55e;
|
|
229
|
+
--green-600: #16a34a;
|
|
230
|
+
--green-700: #15803d;
|
|
231
|
+
--green-800: #166534;
|
|
232
|
+
--green-900: #14532d;
|
|
233
|
+
--green-950: #052e16;
|
|
234
|
+
|
|
235
|
+
/* Emerald */
|
|
236
|
+
--emerald-50: #ecfdf5;
|
|
237
|
+
--emerald-100: #d1fae5;
|
|
238
|
+
--emerald-200: #a7f3d0;
|
|
239
|
+
--emerald-300: #6ee7b7;
|
|
240
|
+
--emerald-400: #34d399;
|
|
241
|
+
--emerald-500: #10b981;
|
|
242
|
+
--emerald-600: #059669;
|
|
243
|
+
--emerald-700: #047857;
|
|
244
|
+
--emerald-800: #065f46;
|
|
245
|
+
--emerald-900: #064e3b;
|
|
246
|
+
--emerald-950: #022c22;
|
|
247
|
+
|
|
248
|
+
/* Teal */
|
|
249
|
+
--teal-50: #f0fdfa;
|
|
250
|
+
--teal-100: #ccfbf1;
|
|
251
|
+
--teal-200: #99f6e4;
|
|
252
|
+
--teal-300: #5eead4;
|
|
253
|
+
--teal-400: #2dd4bf;
|
|
254
|
+
--teal-500: #14b8a6;
|
|
255
|
+
--teal-600: #0d9488;
|
|
256
|
+
--teal-700: #0f766e;
|
|
257
|
+
--teal-800: #115e59;
|
|
258
|
+
--teal-900: #134e4a;
|
|
259
|
+
--teal-950: #042f2e;
|
|
260
|
+
|
|
261
|
+
/* Cyan */
|
|
262
|
+
--cyan-50: #ecfeff;
|
|
263
|
+
--cyan-100: #cffafe;
|
|
264
|
+
--cyan-200: #a5f3fc;
|
|
265
|
+
--cyan-300: #67e8f9;
|
|
266
|
+
--cyan-400: #22d3ee;
|
|
267
|
+
--cyan-500: #06b6d4;
|
|
268
|
+
--cyan-600: #0891b2;
|
|
269
|
+
--cyan-700: #0e7490;
|
|
270
|
+
--cyan-800: #155e75;
|
|
271
|
+
--cyan-900: #164e63;
|
|
272
|
+
--cyan-950: #083344;
|
|
273
|
+
|
|
274
|
+
/* Sky */
|
|
275
|
+
--sky-50: #f0f9ff;
|
|
276
|
+
--sky-100: #e0f2fe;
|
|
277
|
+
--sky-200: #bae6fd;
|
|
278
|
+
--sky-300: #7dd3fc;
|
|
279
|
+
--sky-400: #38bdf8;
|
|
280
|
+
--sky-500: #0ea5e9;
|
|
281
|
+
--sky-600: #0284c7;
|
|
282
|
+
--sky-700: #0369a1;
|
|
283
|
+
--sky-800: #075985;
|
|
284
|
+
--sky-900: #0c4a6e;
|
|
285
|
+
--sky-950: #082f49;
|
|
286
|
+
|
|
287
|
+
/* Blue */
|
|
288
|
+
--blue-50: #eff6ff;
|
|
289
|
+
--blue-100: #dbeafe;
|
|
290
|
+
--blue-200: #bfdbfe;
|
|
291
|
+
--blue-300: #93c5fd;
|
|
292
|
+
--blue-400: #60a5fa;
|
|
293
|
+
--blue-500: #3b82f6;
|
|
294
|
+
--blue-600: #2563eb;
|
|
295
|
+
--blue-700: #1d4ed8;
|
|
296
|
+
--blue-800: #1e40af;
|
|
297
|
+
--blue-900: #1e3a8a;
|
|
298
|
+
--blue-950: #172554;
|
|
299
|
+
|
|
300
|
+
/* Indigo */
|
|
301
|
+
--indigo-50: #eef2ff;
|
|
302
|
+
--indigo-100: #e0e7ff;
|
|
303
|
+
--indigo-200: #c7d2fe;
|
|
304
|
+
--indigo-300: #a5b4fc;
|
|
305
|
+
--indigo-400: #818cf8;
|
|
306
|
+
--indigo-500: #6366f1;
|
|
307
|
+
--indigo-600: #4f46e5;
|
|
308
|
+
--indigo-700: #4338ca;
|
|
309
|
+
--indigo-800: #3730a3;
|
|
310
|
+
--indigo-900: #312e81;
|
|
311
|
+
--indigo-950: #1e1b4b;
|
|
312
|
+
|
|
313
|
+
/* Violet */
|
|
314
|
+
--violet-50: #f5f3ff;
|
|
315
|
+
--violet-100: #ede9fe;
|
|
316
|
+
--violet-200: #ddd6fe;
|
|
317
|
+
--violet-300: #c4b5fd;
|
|
318
|
+
--violet-400: #a78bfa;
|
|
319
|
+
--violet-500: #8b5cf6;
|
|
320
|
+
--violet-600: #7c3aed;
|
|
321
|
+
--violet-700: #6d28d9;
|
|
322
|
+
--violet-800: #5b21b6;
|
|
323
|
+
--violet-900: #4c1d95;
|
|
324
|
+
--violet-950: #2e1065;
|
|
325
|
+
|
|
326
|
+
/* Purple */
|
|
327
|
+
--purple-50: #faf5ff;
|
|
328
|
+
--purple-100: #f3e8ff;
|
|
329
|
+
--purple-200: #e9d5ff;
|
|
330
|
+
--purple-300: #d8b4fe;
|
|
331
|
+
--purple-400: #c084fc;
|
|
332
|
+
--purple-500: #a855f7;
|
|
333
|
+
--purple-600: #9333ea;
|
|
334
|
+
--purple-700: #7e22ce;
|
|
335
|
+
--purple-800: #6b21a8;
|
|
336
|
+
--purple-900: #581c87;
|
|
337
|
+
--purple-950: #3b0764;
|
|
338
|
+
|
|
339
|
+
/* Fuchsia */
|
|
340
|
+
--fuchsia-50: #fdf4ff;
|
|
341
|
+
--fuchsia-100: #fae8ff;
|
|
342
|
+
--fuchsia-200: #f5d0fe;
|
|
343
|
+
--fuchsia-300: #f0abfc;
|
|
344
|
+
--fuchsia-400: #e879f9;
|
|
345
|
+
--fuchsia-500: #d946ef;
|
|
346
|
+
--fuchsia-600: #c026d3;
|
|
347
|
+
--fuchsia-700: #a21caf;
|
|
348
|
+
--fuchsia-800: #86198f;
|
|
349
|
+
--fuchsia-900: #701a75;
|
|
350
|
+
--fuchsia-950: #4a044e;
|
|
351
|
+
|
|
352
|
+
/* Pink */
|
|
353
|
+
--pink-50: #fdf2f8;
|
|
354
|
+
--pink-100: #fce7f3;
|
|
355
|
+
--pink-200: #fbcfe8;
|
|
356
|
+
--pink-300: #f9a8d4;
|
|
357
|
+
--pink-400: #f472b6;
|
|
358
|
+
--pink-500: #ec4899;
|
|
359
|
+
--pink-600: #db2777;
|
|
360
|
+
--pink-700: #be185d;
|
|
361
|
+
--pink-800: #9d174d;
|
|
362
|
+
--pink-900: #831843;
|
|
363
|
+
--pink-950: #500724;
|
|
364
|
+
|
|
365
|
+
/* Rose */
|
|
366
|
+
--rose-50: #fff1f2;
|
|
367
|
+
--rose-100: #ffe4e6;
|
|
368
|
+
--rose-200: #fecdd3;
|
|
369
|
+
--rose-300: #fda4af;
|
|
370
|
+
--rose-400: #fb7185;
|
|
371
|
+
--rose-500: #f43f5e;
|
|
372
|
+
--rose-600: #e11d48;
|
|
373
|
+
--rose-700: #be123c;
|
|
374
|
+
--rose-800: #9f1239;
|
|
375
|
+
--rose-900: #881337;
|
|
376
|
+
--rose-950: #4c0519;
|
|
377
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* sdocs Global Styles */
|
|
2
|
+
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
|
|
4
|
+
@import './colors.css';
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
/* Font Families */
|
|
8
|
+
--font-sans: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
|
9
|
+
--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Badge } from './Badge/index.js';
|
|
2
|
+
export { SegmentControl } from './SegmentControl/index.js';
|
|
3
|
+
export { InputText } from './InputText/index.js';
|
|
4
|
+
export { InputNumber } from './InputNumber/index.js';
|
|
5
|
+
export { Frame } from './Frame/index.js';
|
|
6
|
+
export { CodeBlock } from './CodeBlock/index.js';
|
|
7
|
+
export { Checkbox } from './Checkbox/index.js';
|
|
8
|
+
export { Radio, RadioGroup } from './Radio/index.js';
|
|
9
|
+
export { Placeholder } from './Placeholder/index.js';
|
|
10
|
+
export { Stack } from './Stack/index.js';
|
|
11
|
+
export { CollapsiblePanel } from './Panel/index.js';
|
|
12
|
+
export { Table } from './Table/index.js';
|
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { Badge } from './Badge/index.js';
|
|
2
|
+
export { SegmentControl } from './SegmentControl/index.js';
|
|
3
|
+
export { InputText } from './InputText/index.js';
|
|
4
|
+
export { InputNumber } from './InputNumber/index.js';
|
|
5
|
+
export { Frame } from './Frame/index.js';
|
|
6
|
+
export { CodeBlock } from './CodeBlock/index.js';
|
|
7
|
+
export { Checkbox } from './Checkbox/index.js';
|
|
8
|
+
export { Radio, RadioGroup } from './Radio/index.js';
|
|
9
|
+
export { Placeholder } from './Placeholder/index.js';
|
|
10
|
+
export { Stack } from './Stack/index.js';
|
|
11
|
+
export { CollapsiblePanel } from './Panel/index.js';
|
|
12
|
+
export { Table } from './Table/index.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for the virtual:sdocs module.
|
|
3
|
+
*
|
|
4
|
+
* To use in your project, add to your tsconfig.json:
|
|
5
|
+
* {
|
|
6
|
+
* "compilerOptions": {
|
|
7
|
+
* "types": ["sdocs/virtual"]
|
|
8
|
+
* }
|
|
9
|
+
* }
|
|
10
|
+
*
|
|
11
|
+
* Or reference directly in a .d.ts file:
|
|
12
|
+
* /// <reference types="sdocs/virtual" />
|
|
13
|
+
*/
|
|
14
|
+
declare module 'virtual:sdocs' {
|
|
15
|
+
/**
|
|
16
|
+
* Doc modules loaded via import.meta.glob by the sdocs vite plugin.
|
|
17
|
+
* Contains all .docs.svelte and .docs.svx files matching the configured pattern.
|
|
18
|
+
*/
|
|
19
|
+
export const docs: Record<string, unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
import { type ComponentDocgen } from './docgen.js';
|
|
3
|
+
export interface SdocsPluginOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Glob pattern(s) to find doc files.
|
|
6
|
+
* @default '$lib/**\/*.docs.{svelte,svx}'
|
|
7
|
+
*/
|
|
8
|
+
include?: string | string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Vite plugin that extracts prop information from Svelte 5 components
|
|
12
|
+
* and attaches it as __docgen metadata for runtime access.
|
|
13
|
+
* Also extracts snippet source code from doc files.
|
|
14
|
+
* Provides a virtual module for auto-loading doc files.
|
|
15
|
+
*/
|
|
16
|
+
export declare function sdocsPlugin(options?: SdocsPluginOptions): Plugin;
|
|
17
|
+
export type { ComponentDocgen };
|
|
18
|
+
export default sdocsPlugin;
|