@turnipxenon/pineapple 3.0.0 → 3.1.0-alpha.2
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 +85 -0
- package/dist/components/blog_template/BlogTemplate.svelte +15 -18
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +3 -2
- package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/dist/components/dialog_manager/DialogMangerInit.d.ts +1 -1
- package/dist/components/dialog_manager/IDialogManager.d.ts +1 -1
- package/dist/components/dialog_overlay/DialogOverlay.svelte +127 -17
- package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
- package/dist/components/pineapple/PineappleBaseLayout.svelte +0 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/app.css +9 -14
- package/dist/ui/components/ModalBase.svelte +74 -74
- package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte +9 -1
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte +64 -64
- package/dist/ui/elements/ImageIcon.svelte +53 -53
- package/dist/ui/elements/PinyaCard/PinyaCard.svelte +29 -0
- package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
- package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
- package/dist/ui/elements/PinyaCard/index.js +2 -0
- package/dist/ui/elements/Placeholder.svelte +17 -17
- package/dist/ui/elements/TextLink.svelte +16 -16
- package/dist/ui/elements/index.d.ts +1 -1
- package/dist/ui/elements/index.js +1 -1
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
- package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
- package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
- package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
- package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
- package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
- package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
- package/dist/ui/modules/NavigationMenu/index.js +2 -0
- package/dist/ui/modules/index.d.ts +1 -1
- package/dist/ui/modules/index.js +1 -1
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -42
- package/dist/ui/modules/projects/Pengi.svelte +61 -61
- package/dist/ui/modules/projects/ThisWebpage.svelte +10 -8
- package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte +2 -1
- package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +3 -0
- package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +1 -0
- package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
- package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +65 -88
- package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +1 -0
- package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +316 -316
- package/dist/ui/templates/SeaweedLayout/SeaweedLayout.md +3 -3
- package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +278 -276
- package/dist/ui/templates/SeaweedLayout/props.d.ts +2 -2
- package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
- package/package.json +1 -1
- package/src/lib/styles/app.css +9 -14
- package/dist/components/navigation_component/index.d.ts +0 -2
- package/dist/components/navigation_component/index.js +0 -3
- package/dist/ui/elements/pinya-card/component.svelte +0 -21
- package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
- package/dist/ui/elements/pinya-card/index.d.ts +0 -2
- package/dist/ui/elements/pinya-card/index.js +0 -2
- package/dist/ui/modules/seaweed/index.d.ts +0 -3
- package/dist/ui/modules/seaweed/index.js +0 -4
- /package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +0 -0
- /package/dist/ui/elements/{pinya-card/props.js → PinyaCard/PinyaCardProps.js} +0 -0
- /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
- /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
- /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
-
import type { Snippet } from "svelte";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
value = $bindable(),
|
|
7
|
-
children,
|
|
8
|
-
}: {
|
|
9
|
-
value: string[],
|
|
10
|
-
children: Snippet,
|
|
11
|
-
} = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Accordion
|
|
15
|
-
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
-
{value}
|
|
17
|
-
onValueChange={(e) => (value = e.value)}
|
|
18
|
-
collapsible
|
|
19
|
-
>
|
|
20
|
-
{@render children()}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
children,
|
|
8
|
+
}: {
|
|
9
|
+
value: string[],
|
|
10
|
+
children: Snippet,
|
|
11
|
+
} = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Accordion
|
|
15
|
+
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
+
{value}
|
|
17
|
+
onValueChange={(e) => (value = e.value)}
|
|
18
|
+
collapsible
|
|
19
|
+
>
|
|
20
|
+
{@render children()}
|
|
21
21
|
</Accordion>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
// noinspection ES6UnusedImports
|
|
3
|
-
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
-
import type { Snippet } from "svelte";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
value,
|
|
8
|
-
control: controlSnippet,
|
|
9
|
-
panel: panelSnippet,
|
|
10
|
-
}: {
|
|
11
|
-
value: string,
|
|
12
|
-
control: Snippet;
|
|
13
|
-
panel: Snippet;
|
|
14
|
-
} = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Accordion.Item
|
|
18
|
-
{value}
|
|
19
|
-
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
-
>
|
|
21
|
-
<!-- Control -->
|
|
22
|
-
{#snippet control()}
|
|
23
|
-
{@render controlSnippet()}
|
|
24
|
-
{/snippet}
|
|
25
|
-
<!-- Panel -->
|
|
26
|
-
{#snippet panel()}
|
|
27
|
-
{@render panelSnippet()}
|
|
28
|
-
{/snippet}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// noinspection ES6UnusedImports
|
|
3
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
value,
|
|
8
|
+
control: controlSnippet,
|
|
9
|
+
panel: panelSnippet,
|
|
10
|
+
}: {
|
|
11
|
+
value: string,
|
|
12
|
+
control: Snippet;
|
|
13
|
+
panel: Snippet;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Accordion.Item
|
|
18
|
+
{value}
|
|
19
|
+
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
+
>
|
|
21
|
+
<!-- Control -->
|
|
22
|
+
{#snippet control()}
|
|
23
|
+
{@render controlSnippet()}
|
|
24
|
+
{/snippet}
|
|
25
|
+
<!-- Panel -->
|
|
26
|
+
{#snippet panel()}
|
|
27
|
+
{@render panelSnippet()}
|
|
28
|
+
{/snippet}
|
|
29
29
|
</Accordion.Item>
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import BgTiledTurnip from '../../../assets/bg_tiled/bg_tiled_turnip.png';
|
|
10
10
|
import RandomizedImage from './RandomizedImage.svelte';
|
|
11
11
|
import { generatedDailySeed, mulberry32Generator } from '../../../util/util';
|
|
12
|
+
import { appState } from "../../templates/index";
|
|
12
13
|
|
|
13
14
|
let { enabled }: {
|
|
14
15
|
enabled: boolean
|
|
@@ -47,6 +48,8 @@
|
|
|
47
48
|
}
|
|
48
49
|
generatedImageList = gi;
|
|
49
50
|
});
|
|
51
|
+
|
|
52
|
+
let bgStyle = $derived(`opacity: ${appState.bgOpacity}`);
|
|
50
53
|
</script>
|
|
51
54
|
|
|
52
55
|
<svelte:head>
|
|
@@ -63,7 +66,12 @@
|
|
|
63
66
|
|
|
64
67
|
<!--todo: add a letterbox beyond 1960px + 16 rem-->
|
|
65
68
|
{#if enabled && generatedImageList.length > 0}
|
|
66
|
-
<div
|
|
69
|
+
<div
|
|
70
|
+
class="default-background"
|
|
71
|
+
aria-hidden="true"
|
|
72
|
+
style={bgStyle}
|
|
73
|
+
transition:fade
|
|
74
|
+
>
|
|
67
75
|
{#each generatedImageList as imageItem, idx (idx)}
|
|
68
76
|
<RandomizedImage src={imageItem} {rng} />
|
|
69
77
|
{/each}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
<!-- @component Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ -->
|
|
2
|
-
|
|
3
|
-
<script module>
|
|
4
|
-
import { addCopyButton } from "shiki-transformer-copy-button";
|
|
5
|
-
import { createHighlighterCoreSync } from "shiki/core";
|
|
6
|
-
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
7
|
-
// Themes
|
|
8
|
-
// https://shiki.style/themes
|
|
9
|
-
import themeLight from "shiki/themes/catppuccin-latte.mjs";
|
|
10
|
-
import themeDark from "shiki/themes/catppuccin-frappe.mjs";
|
|
11
|
-
// Languages
|
|
12
|
-
// https://shiki.style/languages
|
|
13
|
-
import console from "shiki/langs/console.mjs";
|
|
14
|
-
import html from "shiki/langs/html.mjs";
|
|
15
|
-
import css from "shiki/langs/css.mjs";
|
|
16
|
-
import js from "shiki/langs/javascript.mjs";
|
|
17
|
-
import ts from "shiki/langs/typescript.mjs";
|
|
18
|
-
import markdown from "shiki/langs/markdown.mjs";
|
|
19
|
-
|
|
20
|
-
// https://shiki.style/guide/sync-usage
|
|
21
|
-
const shiki = createHighlighterCoreSync({
|
|
22
|
-
engine: createJavaScriptRegexEngine(),
|
|
23
|
-
// Implement your import theme.
|
|
24
|
-
themes: [themeLight, themeDark],
|
|
25
|
-
// Implement your imported and supported languages.
|
|
26
|
-
langs: [console, html, css, js, ts, markdown]
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<script lang="ts">
|
|
31
|
-
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
32
|
-
|
|
33
|
-
let {
|
|
34
|
-
code = "",
|
|
35
|
-
lang = "console",
|
|
36
|
-
// Base Style Props
|
|
37
|
-
base = " overflow-hidden",
|
|
38
|
-
rounded = "rounded-container",
|
|
39
|
-
shadow = "",
|
|
40
|
-
classes = "",
|
|
41
|
-
// Pre Style Props
|
|
42
|
-
preBase = "",
|
|
43
|
-
prePadding = "[&>pre]:p-4",
|
|
44
|
-
preClasses = ""
|
|
45
|
-
}: CodeBlockProps = $props();
|
|
46
|
-
|
|
47
|
-
// Shiki convert to HTML
|
|
48
|
-
const generatedHtml = $derived(shiki.codeToHtml(code, {
|
|
49
|
-
lang,
|
|
50
|
-
themes: {
|
|
51
|
-
light: "catppuccin-latte",
|
|
52
|
-
dark: "catppuccin-frappe"
|
|
53
|
-
},
|
|
54
|
-
transformers: [
|
|
55
|
-
addCopyButton({ toggle: 2000 })
|
|
56
|
-
]
|
|
57
|
-
}));
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
<div
|
|
61
|
-
class="{base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
62
|
-
>
|
|
63
|
-
<!-- Output Shiki's Generated HTML -->
|
|
64
|
-
{@html generatedHtml}
|
|
1
|
+
<!-- @component Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ -->
|
|
2
|
+
|
|
3
|
+
<script module>
|
|
4
|
+
import { addCopyButton } from "shiki-transformer-copy-button";
|
|
5
|
+
import { createHighlighterCoreSync } from "shiki/core";
|
|
6
|
+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
7
|
+
// Themes
|
|
8
|
+
// https://shiki.style/themes
|
|
9
|
+
import themeLight from "shiki/themes/catppuccin-latte.mjs";
|
|
10
|
+
import themeDark from "shiki/themes/catppuccin-frappe.mjs";
|
|
11
|
+
// Languages
|
|
12
|
+
// https://shiki.style/languages
|
|
13
|
+
import console from "shiki/langs/console.mjs";
|
|
14
|
+
import html from "shiki/langs/html.mjs";
|
|
15
|
+
import css from "shiki/langs/css.mjs";
|
|
16
|
+
import js from "shiki/langs/javascript.mjs";
|
|
17
|
+
import ts from "shiki/langs/typescript.mjs";
|
|
18
|
+
import markdown from "shiki/langs/markdown.mjs";
|
|
19
|
+
|
|
20
|
+
// https://shiki.style/guide/sync-usage
|
|
21
|
+
const shiki = createHighlighterCoreSync({
|
|
22
|
+
engine: createJavaScriptRegexEngine(),
|
|
23
|
+
// Implement your import theme.
|
|
24
|
+
themes: [themeLight, themeDark],
|
|
25
|
+
// Implement your imported and supported languages.
|
|
26
|
+
langs: [console, html, css, js, ts, markdown]
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
code = "",
|
|
35
|
+
lang = "console",
|
|
36
|
+
// Base Style Props
|
|
37
|
+
base = " overflow-hidden",
|
|
38
|
+
rounded = "rounded-container",
|
|
39
|
+
shadow = "",
|
|
40
|
+
classes = "",
|
|
41
|
+
// Pre Style Props
|
|
42
|
+
preBase = "",
|
|
43
|
+
prePadding = "[&>pre]:p-4",
|
|
44
|
+
preClasses = ""
|
|
45
|
+
}: CodeBlockProps = $props();
|
|
46
|
+
|
|
47
|
+
// Shiki convert to HTML
|
|
48
|
+
const generatedHtml = $derived(shiki.codeToHtml(code, {
|
|
49
|
+
lang,
|
|
50
|
+
themes: {
|
|
51
|
+
light: "catppuccin-latte",
|
|
52
|
+
dark: "catppuccin-frappe"
|
|
53
|
+
},
|
|
54
|
+
transformers: [
|
|
55
|
+
addCopyButton({ toggle: 2000 })
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
class="{base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
62
|
+
>
|
|
63
|
+
<!-- Output Shiki's Generated HTML -->
|
|
64
|
+
{@html generatedHtml}
|
|
65
65
|
</div>
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
-
import type { GeneralUIProps } from './GeneralUIProps';
|
|
4
|
-
import { ColorScheme } from './ColorScheme';
|
|
5
|
-
|
|
6
|
-
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
colorScheme = ColorScheme.Primary,
|
|
10
|
-
...props
|
|
11
|
-
}: PinyaButtonProps = $props();
|
|
12
|
-
|
|
13
|
-
const chooseTailwindClass = () => {
|
|
14
|
-
switch (colorScheme) {
|
|
15
|
-
case ColorScheme.Warning:
|
|
16
|
-
return 'btn preset-filled-warning-600-400 text-surface-100 hover:brightness-110';
|
|
17
|
-
case ColorScheme.Surface:
|
|
18
|
-
return 'btn preset-filled-surface-800-200 text-surface-100-900 hover:brightness-110';
|
|
19
|
-
default:
|
|
20
|
-
console.error('Unimplemented color scheme');
|
|
21
|
-
// eslint-disable-next-line no-fallthrough
|
|
22
|
-
case ColorScheme.Primary:
|
|
23
|
-
return 'icon-filter-on-primary-button';
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const tailwindClass = chooseTailwindClass();
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<img
|
|
31
|
-
{...props}
|
|
32
|
-
class={`image-icon ${tailwindClass}`}>
|
|
33
|
-
|
|
34
|
-
<style>
|
|
35
|
-
:global(.image-icon) {
|
|
36
|
-
height: calc(var(--spacing) * 8);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
:global(.small-icon-button .image-icon) {
|
|
40
|
-
height: calc(var(--spacing) * 6);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
:global(.icon-filter-on-primary-button) {
|
|
44
|
-
/* based on secondary-950 */
|
|
45
|
-
filter: brightness(0) saturate(100%) invert(18%) sepia(10%) saturate(4620%) hue-rotate(331deg) brightness(90%) contrast(88%);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@media (prefers-color-scheme: dark) {
|
|
49
|
-
:global(.icon-filter-on-primary-button) {
|
|
50
|
-
/* based on surface-0 */
|
|
51
|
-
filter: brightness(0) saturate(100%) invert(85%) sepia(3%) saturate(993%) hue-rotate(326deg) brightness(113%) contrast(105%);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
+
import type { GeneralUIProps } from './GeneralUIProps';
|
|
4
|
+
import { ColorScheme } from './ColorScheme';
|
|
5
|
+
|
|
6
|
+
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
colorScheme = ColorScheme.Primary,
|
|
10
|
+
...props
|
|
11
|
+
}: PinyaButtonProps = $props();
|
|
12
|
+
|
|
13
|
+
const chooseTailwindClass = () => {
|
|
14
|
+
switch (colorScheme) {
|
|
15
|
+
case ColorScheme.Warning:
|
|
16
|
+
return 'btn preset-filled-warning-600-400 text-surface-100 hover:brightness-110';
|
|
17
|
+
case ColorScheme.Surface:
|
|
18
|
+
return 'btn preset-filled-surface-800-200 text-surface-100-900 hover:brightness-110';
|
|
19
|
+
default:
|
|
20
|
+
console.error('Unimplemented color scheme');
|
|
21
|
+
// eslint-disable-next-line no-fallthrough
|
|
22
|
+
case ColorScheme.Primary:
|
|
23
|
+
return 'icon-filter-on-primary-button';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const tailwindClass = chooseTailwindClass();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<img
|
|
31
|
+
{...props}
|
|
32
|
+
class={`image-icon ${tailwindClass}`}>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
:global(.image-icon) {
|
|
36
|
+
height: calc(var(--spacing) * 8);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(.small-icon-button .image-icon) {
|
|
40
|
+
height: calc(var(--spacing) * 6);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:global(.icon-filter-on-primary-button) {
|
|
44
|
+
/* based on secondary-950 */
|
|
45
|
+
filter: brightness(0) saturate(100%) invert(18%) sepia(10%) saturate(4620%) hue-rotate(331deg) brightness(90%) contrast(88%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:global(.icon-filter-on-primary-button) {
|
|
50
|
+
/* based on surface-0 */
|
|
51
|
+
filter: brightness(0) saturate(100%) invert(85%) sepia(3%) saturate(993%) hue-rotate(326deg) brightness(113%) contrast(105%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
54
|
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">/**
|
|
2
|
+
* When with texts, wrap the text content inside a div so flex wont apply
|
|
3
|
+
*/
|
|
4
|
+
import type { PinyaCardProps } from "./PinyaCardProps";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
paddingClass = "pt-[1lh] pb-[1lh] pl-16 pr-16",
|
|
8
|
+
flexClass = "flex flex-col",
|
|
9
|
+
widthClass = "w-full max-w-md",
|
|
10
|
+
borderClass = "border-[2px] border-primary-500 dark:border-0",
|
|
11
|
+
marginClass = "",
|
|
12
|
+
className,
|
|
13
|
+
includeDataNoSnippet = false,
|
|
14
|
+
children
|
|
15
|
+
}: PinyaCardProps = $props();
|
|
16
|
+
|
|
17
|
+
let cardClass = $derived(`card bg-surface-200 dark:bg-surface-900 text-start rounded-xl
|
|
18
|
+
${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass}`);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
{#if includeDataNoSnippet}
|
|
22
|
+
<div data-nosnippet class={cardClass}>
|
|
23
|
+
{@render children?.()}
|
|
24
|
+
</div>
|
|
25
|
+
{:else }
|
|
26
|
+
<div class={cardClass}>
|
|
27
|
+
{@render children?.()}
|
|
28
|
+
</div>
|
|
29
|
+
{/if}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When with texts, wrap the text content inside a div so flex wont apply
|
|
3
|
+
*/
|
|
4
|
+
import type { PinyaCardProps } from "./PinyaCardProps";
|
|
5
|
+
declare const PinyaCard: import("svelte").Component<PinyaCardProps, {}, "">;
|
|
6
|
+
type PinyaCard = ReturnType<typeof PinyaCard>;
|
|
7
|
+
export default PinyaCard;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let {
|
|
3
|
-
isCircle = false,
|
|
4
|
-
classes = '',
|
|
5
|
-
}: {
|
|
6
|
-
isCircle?: boolean;
|
|
7
|
-
classes?: string;
|
|
8
|
-
} = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<div
|
|
12
|
-
class="
|
|
13
|
-
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
-
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
-
{classes}
|
|
16
|
-
"
|
|
17
|
-
></div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
isCircle = false,
|
|
4
|
+
classes = '',
|
|
5
|
+
}: {
|
|
6
|
+
isCircle?: boolean;
|
|
7
|
+
classes?: string;
|
|
8
|
+
} = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="
|
|
13
|
+
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
+
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
+
{classes}
|
|
16
|
+
"
|
|
17
|
+
></div>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { type Snippet } from 'svelte';
|
|
3
|
-
|
|
4
|
-
let {
|
|
5
|
-
children,
|
|
6
|
-
href
|
|
7
|
-
}: { href: string, children: Snippet } = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<a
|
|
11
|
-
{href}
|
|
12
|
-
class="visited:text-surface-950 dark:visited:text-surface-400">
|
|
13
|
-
{@render children?.()}
|
|
14
|
-
</a>
|
|
15
|
-
|
|
16
|
-
<style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
href
|
|
7
|
+
}: { href: string, children: Snippet } = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<a
|
|
11
|
+
{href}
|
|
12
|
+
class="visited:text-surface-950 dark:visited:text-surface-400">
|
|
13
|
+
{@render children?.()}
|
|
14
|
+
</a>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
17
|
</style>
|
|
@@ -4,7 +4,7 @@ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetecto
|
|
|
4
4
|
export * from "./ColorScheme";
|
|
5
5
|
export * from "./GeneralUIProps";
|
|
6
6
|
export * from "./OnBackground";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./PinyaCard/index";
|
|
8
8
|
export * from "./WrapperProps";
|
|
9
9
|
export * from "./PinyaButton/index";
|
|
10
10
|
export * from "./text-chip";
|
|
@@ -4,7 +4,7 @@ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetecto
|
|
|
4
4
|
export * from "./ColorScheme";
|
|
5
5
|
export * from "./GeneralUIProps";
|
|
6
6
|
export * from "./OnBackground";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./PinyaCard/index";
|
|
8
8
|
export * from "./WrapperProps";
|
|
9
9
|
export * from "./PinyaButton/index";
|
|
10
10
|
export * from "./text-chip";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
<script lang="ts" generics="T extends string">
|
|
2
|
-
import { Combobox } from '@skeletonlabs/skeleton-svelte';
|
|
3
|
-
import { getLocale, localizeHref } from '../../../paraglide/runtime';
|
|
4
|
-
import type { PinyaComboboxProps, ValueChangeDetails } from "./PinyaComboboxProps";
|
|
5
|
-
|
|
6
|
-
let {
|
|
7
|
-
contentZIndex = 'auto',
|
|
8
|
-
value = $bindable(),
|
|
9
|
-
onValueChange = () => {},
|
|
10
|
-
onValueChangeBase = undefined,
|
|
11
|
-
...props
|
|
12
|
-
}: PinyaComboboxProps<T> = $props();
|
|
13
|
-
|
|
14
|
-
const onValueChangeBaseImpl = (e: ValueChangeDetails<T>) => {
|
|
15
|
-
value = e.value as T[];
|
|
16
|
-
onValueChange(e);
|
|
17
|
-
};
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<Combobox
|
|
21
|
-
width="w-full"
|
|
22
|
-
labelText="text-md"
|
|
23
|
-
inputGroupBase="w-full flex items-center border-primary-500 border-2 rounded-xl"
|
|
24
|
-
inputGroupInput="grow bg-transparent border-0 dark:placeholder-surface-50 pl-4"
|
|
25
|
-
inputGroupButton="size-[3rem]"
|
|
26
|
-
inputGroupArrow="size-[2rem] m-auto"
|
|
27
|
-
contentBackground="bg-surface-100-900 border-primary-500 border-2"
|
|
28
|
-
zIndex={contentZIndex}
|
|
29
|
-
optionActive="bg-secondary-400-600"
|
|
30
|
-
optionHover="hover:brightness-75 dark:hover:brightness-125"
|
|
31
|
-
optionClasses='aria-selected:brightness-75 aria-selected:dark:brightness-125'
|
|
32
|
-
onValueChange={onValueChangeBase ?? onValueChangeBaseImpl}
|
|
33
|
-
{value}
|
|
34
|
-
{...props}
|
|
1
|
+
<script lang="ts" generics="T extends string">
|
|
2
|
+
import { Combobox } from '@skeletonlabs/skeleton-svelte';
|
|
3
|
+
import { getLocale, localizeHref } from '../../../paraglide/runtime';
|
|
4
|
+
import type { PinyaComboboxProps, ValueChangeDetails } from "./PinyaComboboxProps";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
contentZIndex = 'auto',
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
onValueChange = () => {},
|
|
10
|
+
onValueChangeBase = undefined,
|
|
11
|
+
...props
|
|
12
|
+
}: PinyaComboboxProps<T> = $props();
|
|
13
|
+
|
|
14
|
+
const onValueChangeBaseImpl = (e: ValueChangeDetails<T>) => {
|
|
15
|
+
value = e.value as T[];
|
|
16
|
+
onValueChange(e);
|
|
17
|
+
};
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<Combobox
|
|
21
|
+
width="w-full"
|
|
22
|
+
labelText="text-md"
|
|
23
|
+
inputGroupBase="w-full flex items-center border-primary-500 border-2 rounded-xl"
|
|
24
|
+
inputGroupInput="grow bg-transparent border-0 dark:placeholder-surface-50 pl-4"
|
|
25
|
+
inputGroupButton="size-[3rem]"
|
|
26
|
+
inputGroupArrow="size-[2rem] m-auto"
|
|
27
|
+
contentBackground="bg-surface-100-900 border-primary-500 border-2"
|
|
28
|
+
zIndex={contentZIndex}
|
|
29
|
+
optionActive="bg-secondary-400-600"
|
|
30
|
+
optionHover="hover:brightness-75 dark:hover:brightness-125"
|
|
31
|
+
optionClasses='aria-selected:brightness-75 aria-selected:dark:brightness-125'
|
|
32
|
+
onValueChange={onValueChangeBase ?? onValueChangeBaseImpl}
|
|
33
|
+
{value}
|
|
34
|
+
{...props}
|
|
35
35
|
/>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { TextChipProps } from "./TextChipProps";
|
|
3
|
-
|
|
4
|
-
let { children, queryClass = "" }: TextChipProps = $props();
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<span class={`chip text-chip font-bold pointer-events-none ${queryClass}`}>{@render children()}</span>
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
/*noinspection CssUnusedSymbol*/
|
|
11
|
-
:global(.highlight-chip.text-chip) {
|
|
12
|
-
background-color: var(--color-secondary-500) /* oklch(55.6% 0 0deg) = #737373 */;
|
|
13
|
-
color: var(--color-secondary-contrast-500) /* var(--color-secondary-contrast-light) */;
|
|
14
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { TextChipProps } from "./TextChipProps";
|
|
3
|
+
|
|
4
|
+
let { children, queryClass = "" }: TextChipProps = $props();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<span class={`chip text-chip font-bold pointer-events-none ${queryClass}`}>{@render children()}</span>
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
/*noinspection CssUnusedSymbol*/
|
|
11
|
+
:global(.highlight-chip.text-chip) {
|
|
12
|
+
background-color: var(--color-secondary-500) /* oklch(55.6% 0 0deg) = #737373 */;
|
|
13
|
+
color: var(--color-secondary-contrast-500) /* var(--color-secondary-contrast-light) */;
|
|
14
|
+
}
|
|
15
15
|
</style>
|