@turnipxenon/pineapple 3.0.0 → 3.1.0-alpha.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.
Files changed (62) hide show
  1. package/dist/components/blog_template/BlogTemplate.svelte +1 -1
  2. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
  3. package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
  4. package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
  5. package/dist/components/dialog_manager/DialogMangerInit.d.ts +1 -1
  6. package/dist/components/dialog_manager/IDialogManager.d.ts +1 -1
  7. package/dist/components/dialog_overlay/DialogOverlay.svelte +127 -17
  8. package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
  9. package/dist/components/pineapple/PineappleBaseLayout.svelte +0 -19
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/styles/app.css +9 -14
  13. package/dist/ui/components/ModalBase.svelte +74 -74
  14. package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
  15. package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
  16. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +64 -64
  17. package/dist/ui/elements/ImageIcon.svelte +53 -53
  18. package/dist/ui/elements/{pinya-card/component.svelte → PinyaCard/PinyaCard.svelte} +21 -20
  19. package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
  20. package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
  21. package/dist/ui/elements/PinyaCard/index.js +2 -0
  22. package/dist/ui/elements/Placeholder.svelte +17 -17
  23. package/dist/ui/elements/TextLink.svelte +16 -16
  24. package/dist/ui/elements/index.d.ts +1 -1
  25. package/dist/ui/elements/index.js +1 -1
  26. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
  27. package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
  28. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
  29. package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
  30. package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
  31. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
  32. package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
  33. package/dist/ui/modules/NavigationMenu/index.js +2 -0
  34. package/dist/ui/modules/index.d.ts +1 -1
  35. package/dist/ui/modules/index.js +1 -1
  36. package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
  37. package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -42
  38. package/dist/ui/modules/projects/Pengi.svelte +61 -61
  39. package/dist/ui/modules/projects/ThisWebpage.svelte +10 -8
  40. package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +2 -0
  41. package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
  42. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +65 -88
  43. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +1 -0
  44. package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +316 -316
  45. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.md +3 -3
  46. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +278 -276
  47. package/dist/ui/templates/SeaweedLayout/props.d.ts +2 -2
  48. package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
  49. package/package.json +1 -1
  50. package/src/lib/styles/app.css +9 -14
  51. package/dist/components/navigation_component/index.d.ts +0 -2
  52. package/dist/components/navigation_component/index.js +0 -3
  53. package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
  54. package/dist/ui/elements/pinya-card/index.d.ts +0 -2
  55. package/dist/ui/elements/pinya-card/index.js +0 -2
  56. package/dist/ui/modules/seaweed/index.d.ts +0 -3
  57. package/dist/ui/modules/seaweed/index.js +0 -4
  58. /package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +0 -0
  59. /package/dist/ui/elements/{pinya-card/props.js → PinyaCard/PinyaCardProps.js} +0 -0
  60. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
  61. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
  62. /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
@@ -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>
@@ -1,21 +1,22 @@
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 "./props";
5
-
6
- let {
7
- paddingClass = "pt-[1lh] pb-[1lh] pl-16 pr-16",
8
- flexClass = "flex flex-col",
9
- widthClass = "max-w-md",
10
- borderClass = "border-[2px] border-primary-500 dark:border-0",
11
- marginClass = "",
12
- className,
13
- children
14
- }: PinyaCardProps = $props();
15
- </script>
16
-
17
- <div
18
- class={`card bg-surface-200 dark:bg-surface-900 w-full text-start rounded-xl ${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass}`}
19
- >
20
- {@render children?.()}
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
+ children
14
+ }: PinyaCardProps = $props();
15
+ </script>
16
+
17
+ <div
18
+ class={`card bg-surface-200 dark:bg-surface-900 text-start rounded-xl
19
+ ${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass}`}
20
+ >
21
+ {@render children?.()}
21
22
  </div>
@@ -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;
@@ -0,0 +1,2 @@
1
+ export { default as PinyaCard } from "./PinyaCard.svelte";
2
+ export * from "./PinyaCardProps";
@@ -0,0 +1,2 @@
1
+ export { default as PinyaCard } from "./PinyaCard.svelte";
2
+ export * from "./PinyaCardProps";
@@ -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 "./pinya-card/index";
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 "./pinya-card/index";
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>
@@ -1,9 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from "svelte";
3
3
  import { page } from "$app/state";
4
-
5
- import { Card } from "../index";
6
4
  import { goto } from "$app/navigation";
5
+ import { PinyaButton, PinyaCard } from "../../elements/index";
7
6
 
8
7
  interface Props {
9
8
  currentIndex?: number;
@@ -11,7 +10,11 @@
11
10
  pageSize: number;
12
11
  }
13
12
 
14
- let { currentIndex = $bindable(0), contentLength, pageSize = $bindable() }: Props = $props();
13
+ let {
14
+ currentIndex = $bindable(0),
15
+ contentLength,
16
+ pageSize = $bindable()
17
+ }: Props = $props();
15
18
 
16
19
  const queryIndex = page.url.searchParams.get("index");
17
20
  if (queryIndex) {
@@ -43,28 +46,29 @@
43
46
  </script>
44
47
 
45
48
  <div class="navigation-control-container">
46
- <button class="navigation-control-button"
47
- disabled={currentIndex <= 0}
48
- onclick={() => {movePage(false)}}>{"<"}</button>
49
- <Card marginBottom="0">
50
- {#snippet content()}
51
- <p style="margin: 1em">Page {currentIndex + 1}</p>
52
- {/snippet}
53
- </Card>
54
- <button class="navigation-control-button"
55
- disabled={(currentIndex + 1) * pageSize >= contentLength}
56
- onclick={() => {movePage(true)}}>{">"}</button>
49
+ <PinyaButton
50
+ classes="w-12 h-12"
51
+ disabled={currentIndex <= 0}
52
+ onclick={() => {movePage(false)}}
53
+ >&lt;
54
+ </PinyaButton>
55
+ <div>
56
+ <PinyaCard widthClass="" paddingClass="pt-2 pb-2 pl-8 pr-8">
57
+ <span class="fake-h2">Page {currentIndex + 1}</span>
58
+ </PinyaCard>
59
+ </div>
60
+ <PinyaButton
61
+ classes="w-12 h-12"
62
+ disabled={(currentIndex + 1) * pageSize >= contentLength}
63
+ onclick={() => {movePage(true)}}
64
+ >&gt;
65
+ </PinyaButton>
57
66
  </div>
58
67
 
59
68
  <style>
60
69
  .navigation-control-container {
61
70
  display: flex;
62
71
  justify-content: space-between;
63
- margin: 1lh 0;
64
- }
65
-
66
- .navigation-control-button {
67
- /* todo: migration */
68
- /*@apply btn preset-filled-secondary-500;*/
72
+ align-items: center;
69
73
  }
70
74
  </style>