@hkdigital/lib-sveltekit 0.0.94 → 0.0.96
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/dist/components/buttons/index.d.ts +1 -0
- package/dist/components/buttons/index.js +1 -0
- package/dist/components/buttons/plain-button/PlainButton.svelte +37 -0
- package/dist/components/buttons/plain-button/PlainButton.svelte.d.ts +10 -0
- package/dist/components/icon/HkIcon.svelte +1 -1
- package/dist/components/icon/HkIcon.svelte.d.ts +1 -1
- package/dist/components/image/ImageBox.svelte +2 -2
- package/dist/components/image/ResponsiveImage.svelte +1 -2
- package/dist/components/inputs/index.d.ts +1 -0
- package/dist/components/inputs/index.js +1 -0
- package/dist/components/inputs/text-input/TestTextInput.svelte__ +102 -0
- package/dist/components/inputs/text-input/TextInput.svelte +226 -0
- package/dist/components/inputs/text-input/TextInput.svelte.d.ts +26 -0
- package/dist/components/inputs/text-input/TextInput.svelte___ +83 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte +14 -0
- package/dist/components/inputs/text-input/assets/IconInvalid.svelte.d.ts +26 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte +12 -0
- package/dist/components/inputs/text-input/assets/IconValid.svelte.d.ts +26 -0
- package/dist/components/panels/index.d.ts +1 -0
- package/dist/components/panels/index.js +1 -0
- package/dist/components/panels/plain-panel/PlainPanel.svelte +33 -0
- package/dist/components/panels/plain-panel/PlainPanel.svelte.d.ts +10 -0
- package/dist/components/rows/index.d.ts +2 -0
- package/dist/components/rows/index.js +3 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte +104 -0
- package/dist/components/rows/panel-grid-row/PanelGridRow.svelte.d.ts +12 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte +40 -0
- package/dist/components/rows/panel-row-2/PanelRow2.svelte.d.ts +12 -0
- package/dist/components/widgets/compare-left-right/CompareLeftRight.svelte +13 -9
- package/dist/components/widgets/scale-control/ScaleControl.svelte +0 -0
- package/dist/components/widgets/scale-control/ScaleControl.svelte.d.ts +26 -0
- package/dist/components/widgets/scale-control/index.d.ts +1 -0
- package/dist/components/widgets/scale-control/index.js +1 -0
- package/dist/config/tailwind.extend.d.ts +49 -0
- package/dist/config/tailwind.extend.js +56 -0
- package/dist/constants/css-states/index.d.ts +1 -0
- package/dist/constants/css-states/index.js +1 -0
- package/dist/constants/css-states/input-states.d.ts +8 -0
- package/dist/constants/css-states/input-states.js +11 -0
- package/dist/constants/index.js +1 -0
- package/dist/css/tw-prose.postcss__ +259 -0
- package/dist/index.js +0 -9
- package/dist/themes/hkdev/components/boxes/game-box.postcss +13 -0
- package/dist/themes/hkdev/components/buttons/plain-button.postcss +73 -0
- package/dist/themes/hkdev/components/buttons/skip-button.postcss +8 -0
- package/dist/themes/hkdev/components/inputs/text-input.postcss +108 -0
- package/dist/themes/hkdev/components/panels/plain-panel.postcss +46 -0
- package/dist/themes/hkdev/components/panels/speech-bubble.postcss +52 -0
- package/dist/themes/hkdev/components/rows/panel-grid-row.postcss +7 -0
- package/dist/themes/hkdev/components/rows/panel-row-2.postcss +9 -0
- package/dist/themes/hkdev/components.postcss +49 -0
- package/dist/themes/hkdev/debug.postcss +2 -0
- package/dist/themes/hkdev/global/layout.postcss +39 -0
- package/dist/themes/hkdev/global/on-colors.postcss +53 -0
- package/dist/themes/hkdev/global/text.postcss__ +35 -0
- package/dist/themes/hkdev/global/vars.postcss__ +7 -0
- package/dist/themes/hkdev/globals.postcss +12 -0
- package/dist/themes/hkdev/responsive.postcss +12 -0
- package/dist/themes/hkdev/theme-ext.d.ts +4 -0
- package/dist/themes/hkdev/theme-ext.js +15 -0
- package/dist/themes/hkdev/theme.d.ts +226 -0
- package/dist/themes/hkdev/theme.js +227 -0
- package/dist/themes/index.d.ts +1 -0
- package/dist/themes/index.js +1 -0
- package/package.json +5 -2
- package/dist/components/input/HkInputField.svelte +0 -50
- package/dist/components/input/HkInputField.svelte.d.ts +0 -14
- package/dist/components/input/index.d.ts +0 -1
- package/dist/components/input/index.js +0 -1
@@ -0,0 +1,104 @@
|
|
1
|
+
<script>
|
2
|
+
/**
|
3
|
+
* @example
|
4
|
+
*
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @type {{
|
9
|
+
* base?: string,
|
10
|
+
* bg?: string,
|
11
|
+
* justify?: 'start'|'center'|'end'|'between'|'around'|'evenly'|'stretch'|'normal',
|
12
|
+
* justifyItems?: 'start'|'center'|'end'|'stretch',
|
13
|
+
* gap?: string,
|
14
|
+
* classes?: string,
|
15
|
+
* children?: import('svelte').Snippet,
|
16
|
+
* } & { [attr: string]: * }}
|
17
|
+
*/
|
18
|
+
const {
|
19
|
+
// Style
|
20
|
+
base,
|
21
|
+
bg,
|
22
|
+
justify,
|
23
|
+
justifyItems,
|
24
|
+
flow = 'col',
|
25
|
+
gap,
|
26
|
+
classes,
|
27
|
+
|
28
|
+
// Snippets
|
29
|
+
children,
|
30
|
+
|
31
|
+
// Attributes
|
32
|
+
...attrs
|
33
|
+
} = $props();
|
34
|
+
|
35
|
+
let colsCls = $derived.by(() => {
|
36
|
+
//
|
37
|
+
// The CSS classes to apply for the desired column layout
|
38
|
+
//
|
39
|
+
let out = '';
|
40
|
+
|
41
|
+
/* @note justify-end won't work with auto-cols-fr! */
|
42
|
+
|
43
|
+
if (justifyItems && justify !== 'end') {
|
44
|
+
out += 'auto-cols-fr';
|
45
|
+
} else {
|
46
|
+
out += 'auto-cols-auto';
|
47
|
+
}
|
48
|
+
|
49
|
+
if (flow) {
|
50
|
+
out += ` grid-flow-${flow}`;
|
51
|
+
}
|
52
|
+
|
53
|
+
// TODO: CSS for a specific number of columns
|
54
|
+
|
55
|
+
return out.replace(/\s{2,}/g, ' ').trim();
|
56
|
+
});
|
57
|
+
|
58
|
+
let justifyCls = $derived.by(() => {
|
59
|
+
//
|
60
|
+
// Determine justify classes
|
61
|
+
//
|
62
|
+
if (justify) {
|
63
|
+
return `justify-${justify}`;
|
64
|
+
}
|
65
|
+
|
66
|
+
return '';
|
67
|
+
});
|
68
|
+
|
69
|
+
let justifyItemsCls = $derived.by(() => {
|
70
|
+
//
|
71
|
+
// Determine justify-items classes
|
72
|
+
//
|
73
|
+
if (justifyItems) {
|
74
|
+
return `justify-items-${justifyItems}`;
|
75
|
+
}
|
76
|
+
|
77
|
+
return '';
|
78
|
+
});
|
79
|
+
</script>
|
80
|
+
|
81
|
+
<div
|
82
|
+
data-row="panel-grid-row"
|
83
|
+
class="{base} {bg} {gap} {classes} grid {colsCls} {justifyCls} {justifyItemsCls}"
|
84
|
+
{...attrs}
|
85
|
+
>
|
86
|
+
{@render children()}
|
87
|
+
</div>
|
88
|
+
|
89
|
+
<style>
|
90
|
+
/* This rule makes justify-items-start behave like
|
91
|
+
justify-items-center and justify-items-end */
|
92
|
+
/*[data-row='panel-grid-row'] {
|
93
|
+
& > :global(*) {
|
94
|
+
width: fit-content;
|
95
|
+
height: fit-content;
|
96
|
+
}
|
97
|
+
}*/
|
98
|
+
|
99
|
+
/*[data-row='panel-grid-row'] {
|
100
|
+
& > :global(*) {
|
101
|
+
min-width: 0;
|
102
|
+
}
|
103
|
+
}*/
|
104
|
+
</style>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export default PanelGridRow;
|
2
|
+
declare const PanelGridRow: import("svelte").Component<{
|
3
|
+
base?: string;
|
4
|
+
bg?: string;
|
5
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | "normal";
|
6
|
+
justifyItems?: "start" | "center" | "end" | "stretch";
|
7
|
+
gap?: string;
|
8
|
+
classes?: string;
|
9
|
+
children?: import("svelte").Snippet;
|
10
|
+
} & {
|
11
|
+
[attr: string]: any;
|
12
|
+
}, {}, "">;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<script>
|
2
|
+
import { PanelGridRow } from '../index.js';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @example
|
6
|
+
*/
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @type {{
|
10
|
+
* base?: string,
|
11
|
+
* bg?: string,
|
12
|
+
* justify?: 'start'|'center'|'end'|'between'|'around'|'evenly'|'stretch'|'normal',
|
13
|
+
* justifyItems?: 'start'|'center'|'end'|'stretch',
|
14
|
+
* gap?: string,
|
15
|
+
* classes?: string,
|
16
|
+
* children?: import('svelte').Snippet,
|
17
|
+
* } & { [attr: string]: * }}
|
18
|
+
*/
|
19
|
+
const {
|
20
|
+
// Style
|
21
|
+
// base,
|
22
|
+
// bg,
|
23
|
+
// justify,
|
24
|
+
// justifyItems,
|
25
|
+
// flow = 'col',
|
26
|
+
// gap,
|
27
|
+
// classes,
|
28
|
+
|
29
|
+
// // Snippets
|
30
|
+
// children,
|
31
|
+
|
32
|
+
// Attributes
|
33
|
+
...attrs
|
34
|
+
} = $props();
|
35
|
+
</script>
|
36
|
+
|
37
|
+
<!-- class="test-small mb-8p mt-8 grid auto-cols-fr grid-flow-col justify-stretch gap-20p" -->
|
38
|
+
|
39
|
+
<PanelGridRow data-wrapper="panel-row-2" gap="gap-20p" {...attrs}
|
40
|
+
></PanelGridRow>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export default PanelRow2;
|
2
|
+
declare const PanelRow2: import("svelte").Component<{
|
3
|
+
base?: string;
|
4
|
+
bg?: string;
|
5
|
+
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | "stretch" | "normal";
|
6
|
+
justifyItems?: "start" | "center" | "end" | "stretch";
|
7
|
+
gap?: string;
|
8
|
+
classes?: string;
|
9
|
+
children?: import("svelte").Snippet;
|
10
|
+
} & {
|
11
|
+
[attr: string]: any;
|
12
|
+
}, {}, "">;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<!-- CompareLeftRight.svelte -->
|
2
1
|
<script>
|
3
2
|
/** @type {HTMLElement | null} */
|
4
3
|
let container = $state(null);
|
@@ -13,11 +12,16 @@
|
|
13
12
|
handleColor?: string
|
14
13
|
} & Record<string, any>} */
|
15
14
|
let {
|
16
|
-
|
17
|
-
|
15
|
+
width='w-[100vw]',
|
16
|
+
height='aspect-video',
|
17
|
+
border='border border-surface-500',
|
18
18
|
classes = '',
|
19
19
|
dividerColor = 'bg-surface-500',
|
20
20
|
handleColor = 'bg-surface-700',
|
21
|
+
|
22
|
+
// Snippets
|
23
|
+
leftContent,
|
24
|
+
rightContent,
|
21
25
|
...attrs
|
22
26
|
} = $props();
|
23
27
|
|
@@ -114,7 +118,7 @@
|
|
114
118
|
|
115
119
|
<div
|
116
120
|
bind:this={container}
|
117
|
-
class="relative
|
121
|
+
class="relative {width} {height} {border} {classes}"
|
118
122
|
role="group"
|
119
123
|
aria-label="Content comparison"
|
120
124
|
{...attrs}
|
@@ -140,16 +144,16 @@
|
|
140
144
|
|
141
145
|
<!-- Slider control -->
|
142
146
|
<div
|
143
|
-
class="absolute inset-y-0 z-10 flex w-1
|
147
|
+
class="absolute inset-y-0 z-10 flex w-1 items-center justify-center {dividerColor}"
|
144
148
|
style={dividerStyle}
|
145
149
|
>
|
146
150
|
<!-- Vertical separator line -->
|
147
|
-
<div class="absolute inset-y-0 w-0.5 bg-current opacity-50"></div>
|
151
|
+
<div class="absolute inset-y-0 w-0.5 bg-current opacity-50 pointer-events-none"></div>
|
148
152
|
|
149
153
|
<button
|
150
|
-
class="flex h-10 w-10 items-center justify-center rounded-full shadow-lg
|
151
|
-
|
152
|
-
|
154
|
+
class="flex h-10 w-10 items-center justify-center rounded-full shadow-lg transition-transform {handleColor}"
|
155
|
+
onmousedown={handleMouseDown}
|
156
|
+
onkeydown={handleKeyDown}
|
153
157
|
role="slider"
|
154
158
|
aria-orientation="vertical"
|
155
159
|
aria-valuenow={position}
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export default ScaleControl;
|
2
|
+
type ScaleControl = SvelteComponent<{
|
3
|
+
[x: string]: never;
|
4
|
+
}, {
|
5
|
+
[evt: string]: CustomEvent<any>;
|
6
|
+
}, {}> & {
|
7
|
+
$$bindings?: string;
|
8
|
+
};
|
9
|
+
declare const ScaleControl: $$__sveltets_2_IsomorphicComponent<{
|
10
|
+
[x: string]: never;
|
11
|
+
}, {
|
12
|
+
[evt: string]: CustomEvent<any>;
|
13
|
+
}, {}, {}, string>;
|
14
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
15
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
16
|
+
$$bindings?: Bindings;
|
17
|
+
} & Exports;
|
18
|
+
(internal: unknown, props: {
|
19
|
+
$$events?: Events;
|
20
|
+
$$slots?: Slots;
|
21
|
+
}): Exports & {
|
22
|
+
$set?: any;
|
23
|
+
$on?: any;
|
24
|
+
};
|
25
|
+
z_$$bindings?: Bindings;
|
26
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as ScaleControl } from "./ScaleControl.svelte";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as ScaleControl } from './ScaleControl.svelte';
|
@@ -0,0 +1,49 @@
|
|
1
|
+
export const spacing: {
|
2
|
+
'5p': string;
|
3
|
+
'10p': string;
|
4
|
+
'20p': string;
|
5
|
+
'30p': string;
|
6
|
+
'40p': string;
|
7
|
+
'50p': string;
|
8
|
+
'60p': string;
|
9
|
+
'80p': string;
|
10
|
+
'100p': string;
|
11
|
+
'120p': string;
|
12
|
+
'160p': string;
|
13
|
+
'180p': string;
|
14
|
+
'1p': string;
|
15
|
+
'2p': string;
|
16
|
+
'4p': string;
|
17
|
+
'6p': string;
|
18
|
+
'8p': string;
|
19
|
+
'16p': string;
|
20
|
+
'24p': string;
|
21
|
+
};
|
22
|
+
export const fontSize: {
|
23
|
+
'12p': string;
|
24
|
+
'14p': string;
|
25
|
+
'16p': string;
|
26
|
+
'18p': string;
|
27
|
+
'20p': string;
|
28
|
+
'24p': string;
|
29
|
+
'32p': string;
|
30
|
+
'50p': string;
|
31
|
+
sm: string;
|
32
|
+
base: string;
|
33
|
+
lg: string;
|
34
|
+
xl: string;
|
35
|
+
};
|
36
|
+
export namespace borderRadius {
|
37
|
+
let none: number;
|
38
|
+
let xs: string;
|
39
|
+
let sm: string;
|
40
|
+
let md: string;
|
41
|
+
let lg: string;
|
42
|
+
let xl: string;
|
43
|
+
let full: string;
|
44
|
+
}
|
45
|
+
export const borderWidth: {
|
46
|
+
'1p': string;
|
47
|
+
'2p': string;
|
48
|
+
'4p': string;
|
49
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
export const spacing = {
|
2
|
+
// Between elements spacing
|
3
|
+
'5p': '0.3125rem',
|
4
|
+
'10p': '0.625rem',
|
5
|
+
'20p': '1.25rem',
|
6
|
+
'30p': '1.875rem',
|
7
|
+
'40p': '2.5rem',
|
8
|
+
'50p': '3.125rem',
|
9
|
+
'60p': '3.75rem',
|
10
|
+
'80p': '5rem',
|
11
|
+
'100p': '6.25rem',
|
12
|
+
'120p': '7.5rem',
|
13
|
+
'160p': '10rem',
|
14
|
+
'180p': '11.25rem',
|
15
|
+
|
16
|
+
// Text related spacing
|
17
|
+
'1p': '0.0625rem',
|
18
|
+
'2p': '0.125rem',
|
19
|
+
'4p': '0.25rem',
|
20
|
+
'6p': '0.375rem',
|
21
|
+
'8p': '0.5rem',
|
22
|
+
'16p': '1rem',
|
23
|
+
'24p': '1.5rem'
|
24
|
+
};
|
25
|
+
|
26
|
+
export const fontSize = {
|
27
|
+
'12p': '0.75rem',
|
28
|
+
'14p': '0.875rem',
|
29
|
+
'16p': '1rem',
|
30
|
+
'18p': '1.125rem',
|
31
|
+
'20p': '1.25rem',
|
32
|
+
'24p': '1.5rem',
|
33
|
+
'32p': '2rem',
|
34
|
+
'50p': '3.125rem',
|
35
|
+
|
36
|
+
sm: '0.875rem',
|
37
|
+
base: '1rem',
|
38
|
+
lg: '1.125rem',
|
39
|
+
xl: '1.25rem'
|
40
|
+
};
|
41
|
+
|
42
|
+
export const borderRadius = {
|
43
|
+
none: 0,
|
44
|
+
xs: '0.250rem',
|
45
|
+
sm: '0.875rem',
|
46
|
+
md: '1.25rem',
|
47
|
+
lg: '2rem',
|
48
|
+
xl: '3.125rem',
|
49
|
+
full: '9999px'
|
50
|
+
};
|
51
|
+
|
52
|
+
export const borderWidth = {
|
53
|
+
'1p': '0.0625rem',
|
54
|
+
'2p': '0.125rem',
|
55
|
+
'4p': '0.250rem'
|
56
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./input-states.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './input-states.js';
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export const PRISTINE: "pristine";
|
2
|
+
export const DIRTY: "dirty";
|
3
|
+
export const FOCUSED: "focused";
|
4
|
+
export const UNFOCUSED: "unfocused";
|
5
|
+
export const VALID: "valid";
|
6
|
+
export const INVALID: "invalid";
|
7
|
+
export const REQUIRED: "required";
|
8
|
+
export const DISABLED: "disabled";
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export const PRISTINE = 'pristine';
|
2
|
+
export const DIRTY = 'dirty';
|
3
|
+
|
4
|
+
export const FOCUSED = 'focused';
|
5
|
+
export const UNFOCUSED = 'unfocused';
|
6
|
+
|
7
|
+
export const VALID = 'valid';
|
8
|
+
export const INVALID = 'invalid';
|
9
|
+
|
10
|
+
export const REQUIRED = 'required';
|
11
|
+
export const DISABLED = 'disabled';
|
package/dist/constants/index.js
CHANGED
@@ -0,0 +1,259 @@
|
|
1
|
+
/* Base prose styles */
|
2
|
+
.prose {
|
3
|
+
font-size: 1rem;
|
4
|
+
line-height: 1.75;
|
5
|
+
max-width: 65ch;
|
6
|
+
}
|
7
|
+
|
8
|
+
.prose > * + * {
|
9
|
+
margin-top: 1.25em;
|
10
|
+
}
|
11
|
+
|
12
|
+
/* Headings */
|
13
|
+
.prose h1 {
|
14
|
+
font-size: 2.25em;
|
15
|
+
line-height: 1.1111111;
|
16
|
+
margin-top: 0;
|
17
|
+
margin-bottom: 0.8888889em;
|
18
|
+
font-weight: 800;
|
19
|
+
}
|
20
|
+
|
21
|
+
.prose h2 {
|
22
|
+
font-size: 1.5em;
|
23
|
+
line-height: 1.3333333;
|
24
|
+
margin-top: 2em;
|
25
|
+
margin-bottom: 1em;
|
26
|
+
font-weight: 700;
|
27
|
+
}
|
28
|
+
|
29
|
+
.prose h3 {
|
30
|
+
font-size: 1.25em;
|
31
|
+
line-height: 1.6;
|
32
|
+
margin-top: 1.6em;
|
33
|
+
margin-bottom: 0.6em;
|
34
|
+
font-weight: 600;
|
35
|
+
}
|
36
|
+
|
37
|
+
.prose h4 {
|
38
|
+
font-size: 1.125em;
|
39
|
+
line-height: 1.5;
|
40
|
+
margin-top: 1.5em;
|
41
|
+
margin-bottom: 0.5em;
|
42
|
+
font-weight: 600;
|
43
|
+
}
|
44
|
+
|
45
|
+
/* Paragraphs */
|
46
|
+
.prose p {
|
47
|
+
margin-top: 1.25em;
|
48
|
+
margin-bottom: 1.25em;
|
49
|
+
}
|
50
|
+
|
51
|
+
/* Lists */
|
52
|
+
.prose ul,
|
53
|
+
.prose ol {
|
54
|
+
padding-left: 1.625em;
|
55
|
+
margin-top: 1.25em;
|
56
|
+
margin-bottom: 1.25em;
|
57
|
+
}
|
58
|
+
|
59
|
+
.prose li {
|
60
|
+
margin-top: 0.5em;
|
61
|
+
margin-bottom: 0.5em;
|
62
|
+
}
|
63
|
+
|
64
|
+
.prose > ul > li p {
|
65
|
+
margin-top: 0.75em;
|
66
|
+
margin-bottom: 0.75em;
|
67
|
+
}
|
68
|
+
|
69
|
+
.prose > ul > li > *:first-child {
|
70
|
+
margin-top: 1.25em;
|
71
|
+
}
|
72
|
+
|
73
|
+
.prose > ul > li > *:last-child {
|
74
|
+
margin-bottom: 1.25em;
|
75
|
+
}
|
76
|
+
|
77
|
+
/* Nested lists */
|
78
|
+
.prose ul ul,
|
79
|
+
.prose ul ol,
|
80
|
+
.prose ol ul,
|
81
|
+
.prose ol ol {
|
82
|
+
margin-top: 0.75em;
|
83
|
+
margin-bottom: 0.75em;
|
84
|
+
}
|
85
|
+
|
86
|
+
/* Links */
|
87
|
+
.prose a {
|
88
|
+
color: #111827;
|
89
|
+
text-decoration: underline;
|
90
|
+
font-weight: 500;
|
91
|
+
}
|
92
|
+
|
93
|
+
.prose a:hover {
|
94
|
+
text-decoration-thickness: 2px;
|
95
|
+
}
|
96
|
+
|
97
|
+
/* Code blocks */
|
98
|
+
.prose code {
|
99
|
+
color: #111827;
|
100
|
+
font-weight: 600;
|
101
|
+
font-size: 0.875em;
|
102
|
+
}
|
103
|
+
|
104
|
+
.prose pre {
|
105
|
+
color: #e5e7eb;
|
106
|
+
background-color: #1f2937;
|
107
|
+
overflow-x: auto;
|
108
|
+
font-size: 0.875em;
|
109
|
+
line-height: 1.7142857;
|
110
|
+
margin-top: 1.7142857em;
|
111
|
+
margin-bottom: 1.7142857em;
|
112
|
+
border-radius: 0.375rem;
|
113
|
+
padding: 0.8571429em 1.1428571em;
|
114
|
+
}
|
115
|
+
|
116
|
+
.prose pre code {
|
117
|
+
background-color: transparent;
|
118
|
+
border-radius: 0;
|
119
|
+
padding: 0;
|
120
|
+
font-weight: 400;
|
121
|
+
color: inherit;
|
122
|
+
font-size: inherit;
|
123
|
+
font-family: inherit;
|
124
|
+
line-height: inherit;
|
125
|
+
}
|
126
|
+
|
127
|
+
/* Blockquotes */
|
128
|
+
.prose blockquote {
|
129
|
+
font-weight: 500;
|
130
|
+
font-style: italic;
|
131
|
+
color: #111827;
|
132
|
+
border-left-width: 0.25rem;
|
133
|
+
border-left-color: #e5e7eb;
|
134
|
+
margin-top: 1.6em;
|
135
|
+
margin-bottom: 1.6em;
|
136
|
+
padding-left: 1em;
|
137
|
+
}
|
138
|
+
|
139
|
+
/* Tables */
|
140
|
+
.prose table {
|
141
|
+
width: 100%;
|
142
|
+
table-layout: auto;
|
143
|
+
text-align: left;
|
144
|
+
margin-top: 2em;
|
145
|
+
margin-bottom: 2em;
|
146
|
+
font-size: 0.875em;
|
147
|
+
line-height: 1.7142857;
|
148
|
+
}
|
149
|
+
|
150
|
+
.prose thead {
|
151
|
+
font-weight: 600;
|
152
|
+
border-bottom-width: 1px;
|
153
|
+
border-bottom-color: #d1d5db;
|
154
|
+
}
|
155
|
+
|
156
|
+
.prose thead th {
|
157
|
+
vertical-align: bottom;
|
158
|
+
padding-right: 0.5714286em;
|
159
|
+
padding-bottom: 0.5714286em;
|
160
|
+
padding-left: 0.5714286em;
|
161
|
+
}
|
162
|
+
|
163
|
+
.prose tbody tr {
|
164
|
+
border-bottom-width: 1px;
|
165
|
+
border-bottom-color: #e5e7eb;
|
166
|
+
}
|
167
|
+
|
168
|
+
.prose tbody td {
|
169
|
+
vertical-align: top;
|
170
|
+
padding: 0.5714286em;
|
171
|
+
}
|
172
|
+
|
173
|
+
/* Size variations */
|
174
|
+
.prose-sm {
|
175
|
+
font-size: 0.875rem;
|
176
|
+
line-height: 1.7142857;
|
177
|
+
}
|
178
|
+
|
179
|
+
.prose-lg {
|
180
|
+
font-size: 1.125rem;
|
181
|
+
line-height: 1.7777778;
|
182
|
+
}
|
183
|
+
|
184
|
+
.prose-xl {
|
185
|
+
font-size: 1.25rem;
|
186
|
+
line-height: 1.8;
|
187
|
+
}
|
188
|
+
|
189
|
+
/* Dark mode */
|
190
|
+
.prose-invert {
|
191
|
+
color: #d1d5db;
|
192
|
+
}
|
193
|
+
|
194
|
+
.prose-invert a {
|
195
|
+
color: #fff;
|
196
|
+
}
|
197
|
+
|
198
|
+
.prose-invert strong {
|
199
|
+
color: #fff;
|
200
|
+
}
|
201
|
+
|
202
|
+
.prose-invert code {
|
203
|
+
color: #fff;
|
204
|
+
}
|
205
|
+
|
206
|
+
.prose-invert thead {
|
207
|
+
border-bottom-color: #4b5563;
|
208
|
+
}
|
209
|
+
|
210
|
+
.prose-invert tbody tr {
|
211
|
+
border-bottom-color: #374151;
|
212
|
+
}
|
213
|
+
|
214
|
+
.prose-invert blockquote {
|
215
|
+
color: #9ca3af;
|
216
|
+
border-left-color: #4b5563;
|
217
|
+
}
|
218
|
+
|
219
|
+
/* Images */
|
220
|
+
.prose img {
|
221
|
+
margin-top: 2em;
|
222
|
+
margin-bottom: 2em;
|
223
|
+
}
|
224
|
+
|
225
|
+
.prose figure > * {
|
226
|
+
margin-top: 0;
|
227
|
+
margin-bottom: 0;
|
228
|
+
}
|
229
|
+
|
230
|
+
.prose figure figcaption {
|
231
|
+
color: #6b7280;
|
232
|
+
font-size: 0.875em;
|
233
|
+
line-height: 1.4285714;
|
234
|
+
margin-top: 0.8571429em;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* Custom elements */
|
238
|
+
.prose hr {
|
239
|
+
border-color: #e5e7eb;
|
240
|
+
border-top-width: 1px;
|
241
|
+
margin-top: 3em;
|
242
|
+
margin-bottom: 3em;
|
243
|
+
}
|
244
|
+
|
245
|
+
.prose strong {
|
246
|
+
font-weight: 600;
|
247
|
+
color: #111827;
|
248
|
+
}
|
249
|
+
|
250
|
+
.prose em {
|
251
|
+
font-style: italic;
|
252
|
+
}
|
253
|
+
|
254
|
+
/* Focus styles */
|
255
|
+
.prose a:focus {
|
256
|
+
outline: 2px solid transparent;
|
257
|
+
outline-offset: 2px;
|
258
|
+
text-decoration-thickness: 2px;
|
259
|
+
}
|
package/dist/index.js
CHANGED