@turnipxenon/pineapple 3.0.0 → 3.1.0-alpha.10

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 (101) hide show
  1. package/README.md +103 -0
  2. package/dist/components/RandomizedBackground.svelte +4 -0
  3. package/dist/components/RandomizedBackground.svelte.d.ts +1 -0
  4. package/dist/components/blog_template/BlogTemplate.svelte +15 -18
  5. package/dist/components/blog_template/BlogTemplate.svelte.d.ts +3 -2
  6. package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
  7. package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
  8. package/dist/components/dialog_manager/DialogManager.d.ts +3 -2
  9. package/dist/components/dialog_manager/DialogManager.js +6 -4
  10. package/dist/components/dialog_manager/DialogProcessor.d.ts +4 -2
  11. package/dist/components/dialog_manager/DialogProcessor.js +23 -18
  12. package/dist/components/dialog_manager/IDialogManager.d.ts +1 -2
  13. package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.d.ts +2 -2
  14. package/dist/components/dialog_manager/behavior_tree/line_processors/commands/JumpCommand.js +4 -5
  15. package/dist/components/dialog_overlay/DialogOverlay.svelte +149 -51
  16. package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -6
  17. package/dist/components/pineapple/PineappleBaseLayout.svelte +3 -23
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +2 -2
  20. package/dist/scripts/pineapple_fiber/PineappleWeaver.js +1 -2
  21. package/dist/styles/app.css +11 -14
  22. package/dist/styles/turnip-theme.css +17 -7
  23. package/dist/ui/components/ModalBase.svelte +74 -74
  24. package/dist/ui/components/SocialSection.svelte +2 -1
  25. package/dist/ui/components/accordion/PinyaAccordion.svelte +20 -20
  26. package/dist/ui/components/accordion/PinyaAccordionItem.svelte +28 -28
  27. package/dist/ui/components/randomized-background/RandomizedBackground.svelte +9 -1
  28. package/dist/ui/elements/CodeBlock/CodeBlock.svelte +65 -64
  29. package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +1 -1
  30. package/dist/ui/elements/ImageIcon.svelte +53 -53
  31. package/dist/ui/elements/ImageIcon.svelte.d.ts +1 -1
  32. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButton.svelte +25 -0
  33. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButton.svelte.d.ts +4 -0
  34. package/dist/ui/elements/PinyaAnchorButton/PinyaAnchorButtonProps.d.ts +4 -0
  35. package/dist/ui/elements/PinyaAnchorButton/index.d.ts +2 -0
  36. package/dist/ui/elements/PinyaAnchorButton/index.js +2 -0
  37. package/dist/ui/elements/PinyaButton/PinyaButton.svelte +8 -31
  38. package/dist/ui/elements/PinyaButton/PinyaButton.svelte.d.ts +1 -1
  39. package/dist/ui/elements/PinyaButton/PinyaButtonProps.d.ts +4 -14
  40. package/dist/ui/elements/PinyaButton/PinyaButtonProps.js +1 -6
  41. package/dist/ui/elements/PinyaButtonCommon/ButtonVariant.d.ts +5 -0
  42. package/dist/ui/elements/PinyaButtonCommon/ButtonVariant.js +6 -0
  43. package/dist/ui/elements/PinyaButtonCommon/PinyaButtonCommonProps.d.ts +8 -0
  44. package/dist/ui/elements/PinyaButtonCommon/PinyaButtonCommonProps.js +2 -0
  45. package/dist/ui/elements/PinyaButtonCommon/createButtonClass.d.ts +2 -0
  46. package/dist/ui/elements/PinyaButtonCommon/createButtonClass.js +31 -0
  47. package/dist/ui/elements/PinyaButtonCommon/index.d.ts +3 -0
  48. package/dist/ui/elements/PinyaButtonCommon/index.js +3 -0
  49. package/dist/ui/elements/PinyaCard/PinyaCard.svelte +30 -0
  50. package/dist/ui/elements/PinyaCard/PinyaCard.svelte.d.ts +7 -0
  51. package/dist/ui/elements/{pinya-card/props.d.ts → PinyaCard/PinyaCardProps.d.ts} +1 -0
  52. package/dist/ui/elements/PinyaCard/PinyaCardProps.js +1 -0
  53. package/dist/ui/elements/PinyaCard/index.d.ts +2 -0
  54. package/dist/ui/elements/PinyaCard/index.js +2 -0
  55. package/dist/ui/elements/Placeholder.svelte +17 -17
  56. package/dist/ui/elements/TextLink.svelte +16 -16
  57. package/dist/ui/elements/index.d.ts +7 -5
  58. package/dist/ui/elements/index.js +9 -5
  59. package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +34 -34
  60. package/dist/ui/elements/text-chip/TextChip.svelte +14 -14
  61. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte +24 -20
  62. package/dist/{components/navigation_component/NavigationComponent.svelte → ui/modules/NavigationMenu/NavigationMenu.svelte} +69 -43
  63. package/dist/{components/navigation_component/NavigationComponent.svelte.d.ts → ui/modules/NavigationMenu/NavigationMenu.svelte.d.ts} +6 -6
  64. package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.d.ts +4 -4
  65. package/dist/ui/modules/NavigationMenu/index.d.ts +2 -0
  66. package/dist/ui/modules/NavigationMenu/index.js +2 -0
  67. package/dist/ui/modules/index.d.ts +1 -1
  68. package/dist/ui/modules/index.js +1 -1
  69. package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +109 -109
  70. package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +42 -42
  71. package/dist/ui/modules/projects/Hepcat.svelte +1 -1
  72. package/dist/ui/modules/projects/Pengi.svelte +61 -61
  73. package/dist/ui/modules/projects/Soulwork.svelte +1 -1
  74. package/dist/ui/modules/projects/ThisWebpage.svelte +11 -9
  75. package/dist/ui/templates/PinyaPageLayout/PinyaPageLayout.svelte +7 -3
  76. package/dist/ui/templates/PinyaPageLayout/runes.svelte.d.ts +3 -0
  77. package/dist/ui/templates/PinyaPageLayout/runes.svelte.js +1 -0
  78. package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte +1 -1
  79. package/dist/ui/templates/SeaweedLayout/EntryGroup.svelte +65 -88
  80. package/dist/ui/templates/SeaweedLayout/ProjectComponentProps.d.ts +1 -0
  81. package/dist/ui/templates/SeaweedLayout/ProjectGroupConfig.svelte +316 -316
  82. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.md +3 -3
  83. package/dist/ui/templates/SeaweedLayout/SeaweedLayout.svelte +278 -276
  84. package/dist/ui/templates/SeaweedLayout/props.d.ts +2 -2
  85. package/dist/ui/templates/confirmation-modal/component.svelte +46 -46
  86. package/package.json +1 -1
  87. package/src/lib/styles/app.css +11 -14
  88. package/dist/components/dialog_manager/DialogMangerInit.d.ts +0 -2
  89. package/dist/components/dialog_manager/DialogMangerInit.js +0 -21
  90. package/dist/components/navigation_component/index.d.ts +0 -2
  91. package/dist/components/navigation_component/index.js +0 -3
  92. package/dist/ui/elements/pinya-card/component.svelte +0 -21
  93. package/dist/ui/elements/pinya-card/component.svelte.d.ts +0 -7
  94. package/dist/ui/elements/pinya-card/index.d.ts +0 -2
  95. package/dist/ui/elements/pinya-card/index.js +0 -2
  96. package/dist/ui/modules/seaweed/index.d.ts +0 -3
  97. package/dist/ui/modules/seaweed/index.js +0 -4
  98. /package/dist/ui/elements/{pinya-card/props.js → PinyaAnchorButton/PinyaAnchorButtonProps.js} +0 -0
  99. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/NavigationControl.svelte.d.ts +0 -0
  100. /package/dist/{components/navigation_component → ui/modules/NavigationMenu}/PageMeta.js +0 -0
  101. /package/dist/ui/{modules/seaweed → templates/SeaweedLayout}/ChumBucket.svelte.d.ts +0 -0
@@ -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,5 +1,5 @@
1
1
  import type { HTMLImgAttributes } from 'svelte/elements';
2
- import type { GeneralUIProps } from './GeneralUIProps';
2
+ import type { GeneralUIProps } from "./GeneralUIProps";
3
3
  type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
4
4
  declare const ImageIcon: import("svelte").Component<PinyaButtonProps, {}, "">;
5
5
  type ImageIcon = ReturnType<typeof ImageIcon>;
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ import { ColorScheme } from "../ColorScheme";
3
+ import { ButtonVariant } from "../PinyaButtonCommon/ButtonVariant";
4
+ import { createButtonClass } from "../PinyaButtonCommon/createButtonClass";
5
+ import type { PinyaAnchorButtonProps } from "./PinyaAnchorButtonProps";
6
+
7
+ let {
8
+ children,
9
+ colorScheme = ColorScheme.Primary,
10
+ paddingClass = "",
11
+ buttonVariant = ButtonVariant.Default,
12
+ colorClass = "",
13
+ classes = "",
14
+ ...props
15
+ }: PinyaAnchorButtonProps = $props();
16
+
17
+ let tailwindClass = $derived(createButtonClass({ colorScheme, paddingClass, buttonVariant, colorClass, classes }));
18
+ </script>
19
+
20
+ <a
21
+ {...props}
22
+ class={`a-as-btn ${tailwindClass}}`}
23
+ >
24
+ {@render children()}
25
+ </a>
@@ -0,0 +1,4 @@
1
+ import type { PinyaAnchorButtonProps } from "./PinyaAnchorButtonProps";
2
+ declare const PinyaAnchorButton: import("svelte").Component<PinyaAnchorButtonProps, {}, "">;
3
+ type PinyaAnchorButton = ReturnType<typeof PinyaAnchorButton>;
4
+ export default PinyaAnchorButton;
@@ -0,0 +1,4 @@
1
+ import type { HTMLAnchorAttributes } from "svelte/elements";
2
+ import type { PinyaButtonCommonProps } from "../PinyaButtonCommon/PinyaButtonCommonProps";
3
+ import type { WrapperProps } from "../index";
4
+ export type PinyaAnchorButtonProps = WrapperProps & HTMLAnchorAttributes & PinyaButtonCommonProps;
@@ -0,0 +1,2 @@
1
+ export { default as PinyaAnchorButton } from "./PinyaAnchorButton.svelte";
2
+ export * from "./PinyaAnchorButtonProps";
@@ -0,0 +1,2 @@
1
+ export { default as PinyaAnchorButton } from "./PinyaAnchorButton.svelte";
2
+ export * from "./PinyaAnchorButtonProps";
@@ -1,48 +1,25 @@
1
1
  <script lang="ts">
2
- import { ButtonVariant, type PinyaButtonProps } from './PinyaButtonProps';
2
+ import { type PinyaButtonProps } from "./PinyaButtonProps";
3
3
  import { ColorScheme } from "../ColorScheme";
4
+ import { ButtonVariant } from "../PinyaButtonCommon/ButtonVariant";
5
+ import { createButtonClass } from "../PinyaButtonCommon/createButtonClass";
4
6
 
5
7
  let {
6
8
  children,
7
9
  colorScheme = ColorScheme.Primary,
8
- paddingClass = '',
10
+ paddingClass = "",
9
11
  buttonVariant = ButtonVariant.Default,
10
- colorClass = '',
11
- classes = '',
12
+ colorClass = "",
13
+ classes = "",
12
14
  ...props
13
15
  }: PinyaButtonProps = $props();
14
16
 
15
- paddingClass = paddingClass
16
- ? paddingClass
17
- : (
18
- buttonVariant === ButtonVariant.Image
19
- ? 'pl-3 pr-3 pt-2 pb-2'
20
- : 'pl-3 pr-3'
21
- );
22
-
23
- const chooseTailwindClass = () => {
24
- switch (colorScheme) {
25
- case ColorScheme.Custom:
26
- return colorClass;
27
- case ColorScheme.Warning:
28
- return 'bg-warning-700 dark:bg-warning-400 text-secondary-0 dark:text-secondary-950 hover:brightness-110';
29
- case ColorScheme.Surface:
30
- return 'bg-surface-700 dark:bg-surface-600 text-surface-50-950 hover:brightness-110';
31
- default:
32
- console.error(`Unimplemented color scheme: ${colorScheme.toString()}`);
33
- // eslint-disable-next-line no-fallthrough
34
- case ColorScheme.Primary:
35
- return 'bg-primary-400-600 text-secondary-950 dark:text-secondary-0 hover:brightness-110';
36
- }
37
- };
38
-
39
- const tailwindClass = chooseTailwindClass();
17
+ let tailwindClass = $derived(createButtonClass({ colorScheme, paddingClass, buttonVariant, colorClass, classes }));
40
18
  </script>
41
19
 
42
20
  <button
43
21
  {...props}
44
- class:small-icon-button={buttonVariant === ButtonVariant.SmallIcon}
45
- class={`btn rounded-2xl text-xl font-bold ${tailwindClass} ${paddingClass} ${classes}`}
22
+ class={tailwindClass}
46
23
  >
47
24
  {@render children()}
48
25
  </button>
@@ -1,4 +1,4 @@
1
- import { type PinyaButtonProps } from './PinyaButtonProps';
1
+ import { type PinyaButtonProps } from "./PinyaButtonProps";
2
2
  declare const PinyaButton: import("svelte").Component<PinyaButtonProps, {}, "">;
3
3
  type PinyaButton = ReturnType<typeof PinyaButton>;
4
4
  export default PinyaButton;
@@ -1,14 +1,4 @@
1
- import type { HTMLButtonAttributes } from 'svelte/elements';
2
- import type { GeneralUIProps } from '../GeneralUIProps';
3
- import type { WrapperProps } from '../WrapperProps';
4
- export declare enum ButtonVariant {
5
- Default = 0,
6
- Image = 1,
7
- SmallIcon = 2
8
- }
9
- export type PinyaButtonProps = WrapperProps & HTMLButtonAttributes & GeneralUIProps & {
10
- paddingClass?: string;
11
- buttonVariant?: ButtonVariant;
12
- colorClass?: string;
13
- classes?: string;
14
- };
1
+ import type { HTMLButtonAttributes } from "svelte/elements";
2
+ import type { PinyaButtonCommonProps } from "../PinyaButtonCommon/PinyaButtonCommonProps";
3
+ import type { WrapperProps } from "../index";
4
+ export type PinyaButtonProps = WrapperProps & HTMLButtonAttributes & PinyaButtonCommonProps;
@@ -1,6 +1 @@
1
- export var ButtonVariant;
2
- (function (ButtonVariant) {
3
- ButtonVariant[ButtonVariant["Default"] = 0] = "Default";
4
- ButtonVariant[ButtonVariant["Image"] = 1] = "Image";
5
- ButtonVariant[ButtonVariant["SmallIcon"] = 2] = "SmallIcon";
6
- })(ButtonVariant || (ButtonVariant = {}));
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare enum ButtonVariant {
2
+ Default = 0,
3
+ Image = 1,
4
+ SmallIcon = 2
5
+ }
@@ -0,0 +1,6 @@
1
+ export var ButtonVariant;
2
+ (function (ButtonVariant) {
3
+ ButtonVariant[ButtonVariant["Default"] = 0] = "Default";
4
+ ButtonVariant[ButtonVariant["Image"] = 1] = "Image";
5
+ ButtonVariant[ButtonVariant["SmallIcon"] = 2] = "SmallIcon";
6
+ })(ButtonVariant || (ButtonVariant = {}));
@@ -0,0 +1,8 @@
1
+ import { type GeneralUIProps } from "../index";
2
+ import { ButtonVariant } from "./ButtonVariant";
3
+ export type PinyaButtonCommonProps = GeneralUIProps & {
4
+ paddingClass?: string;
5
+ buttonVariant?: ButtonVariant;
6
+ colorClass?: string;
7
+ classes?: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ import {} from "../index";
2
+ import { ButtonVariant } from "./ButtonVariant";
@@ -0,0 +1,2 @@
1
+ import type { PinyaButtonCommonProps } from "./PinyaButtonCommonProps";
2
+ export declare const createButtonClass: (props: PinyaButtonCommonProps) => string;
@@ -0,0 +1,31 @@
1
+ import { ColorScheme } from "../ColorScheme";
2
+ import { ButtonVariant } from "./ButtonVariant";
3
+ export const createButtonClass = (props) => {
4
+ let { colorScheme, paddingClass, buttonVariant, colorClass, classes } = props;
5
+ colorScheme ??= ColorScheme.Primary;
6
+ buttonVariant ??= ButtonVariant.Default;
7
+ paddingClass ??= buttonVariant === ButtonVariant.Image
8
+ ? "pl-3 pr-3 pt-2 pb-2"
9
+ : "pl-3 pr-3";
10
+ colorClass ??= "";
11
+ classes ??= "";
12
+ const chooseTailwindClass = () => {
13
+ switch (colorScheme) {
14
+ case ColorScheme.Custom:
15
+ return colorClass;
16
+ case ColorScheme.Warning:
17
+ return "bg-warning-700 dark:bg-warning-400 text-secondary-0 dark:text-secondary-950 hover:brightness-110";
18
+ case ColorScheme.Surface:
19
+ return "bg-surface-700 dark:bg-surface-600 text-surface-50-950 hover:brightness-110";
20
+ default:
21
+ console.error(`Unimplemented color scheme: ${colorScheme.toString()}`);
22
+ // eslint-disable-next-line no-fallthrough
23
+ case ColorScheme.Primary:
24
+ return "bg-primary-400-600 text-secondary-950 dark:text-secondary-0 hover:brightness-110";
25
+ }
26
+ };
27
+ const tailwindClass = chooseTailwindClass();
28
+ return `btn rounded-2xl text-xl font-bold
29
+ ${buttonVariant === ButtonVariant.SmallIcon ? 'small-icon-button' : ''}
30
+ ${tailwindClass} ${paddingClass} ${classes}`;
31
+ };
@@ -0,0 +1,3 @@
1
+ export * from "./ButtonVariant";
2
+ export * from "./createButtonClass";
3
+ export * from "./PinyaButtonCommonProps";
@@ -0,0 +1,3 @@
1
+ export * from "./ButtonVariant";
2
+ export * from "./createButtonClass";
3
+ export * from "./PinyaButtonCommonProps";
@@ -0,0 +1,30 @@
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
+ colorClass = "bg-surface-200 dark:bg-surface-900",
12
+ marginClass = "",
13
+ className,
14
+ includeDataNoSnippet = false,
15
+ children
16
+ }: PinyaCardProps = $props();
17
+
18
+ let cardClass = $derived(`card text-start rounded-xl
19
+ ${paddingClass} ${flexClass} ${className} ${widthClass} ${borderClass} ${marginClass} ${colorClass}`);
20
+ </script>
21
+
22
+ {#if includeDataNoSnippet}
23
+ <div data-nosnippet class={cardClass}>
24
+ {@render children?.()}
25
+ </div>
26
+ {:else }
27
+ <div class={cardClass}>
28
+ {@render children?.()}
29
+ </div>
30
+ {/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;
@@ -6,5 +6,6 @@ export interface PinyaCardProps extends WrapperProps {
6
6
  widthClass?: string;
7
7
  borderClass?: string;
8
8
  marginClass?: string;
9
+ colorClass?: string;
9
10
  includeDataNoSnippet?: boolean;
10
11
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -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>
@@ -1,11 +1,13 @@
1
- export { default as ImageIcon } from "./ImageIcon.svelte";
2
- export { default as TextLink } from "./TextLink.svelte";
3
- export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
4
1
  export * from "./ColorScheme";
5
2
  export * from "./GeneralUIProps";
6
3
  export * from "./OnBackground";
7
- export * from "./pinya-card/index";
4
+ export * from "./PinyaButtonCommon";
5
+ export { default as ImageIcon } from "./ImageIcon.svelte";
6
+ export { default as TextLink } from "./TextLink.svelte";
7
+ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
8
+ export * from "./PinyaCard/index";
8
9
  export * from "./WrapperProps";
9
- export * from "./PinyaButton/index";
10
+ export * from "./PinyaButton";
11
+ export * from "./PinyaAnchorButton";
10
12
  export * from "./text-chip";
11
13
  export * from "./CodeBlock";
@@ -1,11 +1,15 @@
1
- export { default as ImageIcon } from "./ImageIcon.svelte";
2
- export { default as TextLink } from "./TextLink.svelte";
3
- export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
1
+ // types
4
2
  export * from "./ColorScheme";
5
3
  export * from "./GeneralUIProps";
6
4
  export * from "./OnBackground";
7
- export * from "./pinya-card/index";
5
+ export * from "./PinyaButtonCommon";
6
+ // components
7
+ export { default as ImageIcon } from "./ImageIcon.svelte";
8
+ export { default as TextLink } from "./TextLink.svelte";
9
+ export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
10
+ export * from "./PinyaCard/index";
8
11
  export * from "./WrapperProps";
9
- export * from "./PinyaButton/index";
12
+ export * from "./PinyaButton";
13
+ export * from "./PinyaAnchorButton";
10
14
  export * from "./text-chip";
11
15
  export * from "./CodeBlock";
@@ -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>