@turnipxenon/pineapple 3.0.0-alpha.17 → 3.0.0-alpha.19

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.
@@ -15,4 +15,5 @@ export interface PinyaComboboxProps<T extends string> {
15
15
  onValueChange?: (selectedList: ValueChangeDetails<T>) => void;
16
16
  onValueChangeBase?: (selectedList: ValueChangeDetails<T>) => void;
17
17
  contentZIndex?: string;
18
+ disabled?: boolean;
18
19
  }
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
- import { getLocale, localizeHref } from "../../../../paraglide/runtime";
2
+ import { deLocalizeHref, getLocale, localizeHref } from "../../../../paraglide/runtime";
3
3
  import PinyaCombobox from "../../../elements/pinya-combobox/PinyaCombobox.svelte";
4
+ import { appState } from "../../../templates/index";
4
5
 
5
6
  interface ComboxData {
6
7
  label: string;
@@ -23,9 +24,12 @@
23
24
  const data = comboboxData.find((d) => d.value === e.value[0]);
24
25
  if (data) {
25
26
  selectedCountry = [data.value];
26
- location.href = localizeHref("./", { locale: data.value });
27
+ const pathname = deLocalizeHref(location.href);
28
+ location.href = localizeHref(pathname, { locale: data.value });
27
29
  }
28
30
  };
31
+
32
+ let disabled = $derived(!appState.isLanguagePickerAvailable);
29
33
  </script>
30
34
 
31
35
  <PinyaCombobox
@@ -35,4 +39,5 @@
35
39
  label="Select Language"
36
40
  placeholder="Select Language"
37
41
  {onValueChange}
42
+ {disabled}
38
43
  />
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from "svelte";
2
+ type $$ComponentProps = {
3
+ children: Snippet;
4
+ appBarLead?: Snippet;
5
+ footer?: Snippet;
6
+ };
7
+ declare const PinyaPageLayout: import("svelte").Component<$$ComponentProps, {}, "appBarLead">;
8
+ type PinyaPageLayout = ReturnType<typeof PinyaPageLayout>;
9
+ export default PinyaPageLayout;
@@ -0,0 +1,2 @@
1
+ export { default as PinyaPageLayout } from "./PinyaPageLayout.svelte";
2
+ export * from "./runes.svelte";
@@ -0,0 +1,2 @@
1
+ export { default as PinyaPageLayout } from "./PinyaPageLayout.svelte";
2
+ export * from "./runes.svelte";
@@ -2,6 +2,7 @@ import type { Snippet } from 'svelte';
2
2
  interface AppStore {
3
3
  title: string;
4
4
  lead?: Snippet;
5
+ isLanguagePickerAvailable: boolean;
5
6
  }
6
7
  export declare const appState: AppStore;
7
8
  export {};
@@ -0,0 +1,4 @@
1
+ export const appState = $state({
2
+ title: '',
3
+ isLanguagePickerAvailable: true,
4
+ });
@@ -1,4 +1,4 @@
1
1
  export { default as PinyaBase } from "./PinyaBase.svelte";
2
- export * from "./pinya-page-layout";
2
+ export * from "./PinyaPageLayout";
3
3
  export * from "./seaweed-layout";
4
4
  export * from "./confirmation-modal";
@@ -1,4 +1,4 @@
1
1
  export { default as PinyaBase } from "./PinyaBase.svelte";
2
- export * from "./pinya-page-layout";
2
+ export * from "./PinyaPageLayout";
3
3
  export * from "./seaweed-layout";
4
4
  export * from "./confirmation-modal";
@@ -2,8 +2,8 @@
2
2
  import { fly } from "svelte/transition";
3
3
  import type { ProjectGroup, SeaweedLayoutProps } from "./props";
4
4
  import ChumBucket from "../../modules/seaweed/ChumBucket.svelte";
5
- import { PinyaPageLayout } from "../index";
6
- import { SocialSection } from "../../components/index";
5
+ import { default as PinyaPageLayout } from "../PinyaPageLayout/PinyaPageLayout.svelte";
6
+ import { default as SocialSection } from "../../components/SocialSection.svelte";
7
7
  import EntryGroup from "./EntryGroup.svelte";
8
8
  import PineappleSwitch from "../../elements/PineappleSwitch.svelte";
9
9
  import { CodeBlock, TextChip } from "../../elements/index";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "3.0.0-alpha.17",
4
+ "version": "3.0.0-alpha.19",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -1,9 +0,0 @@
1
- import type { Snippet } from "svelte";
2
- type $$ComponentProps = {
3
- children: Snippet;
4
- appBarLead?: Snippet;
5
- footer?: Snippet;
6
- };
7
- declare const Component: import("svelte").Component<$$ComponentProps, {}, "appBarLead">;
8
- type Component = ReturnType<typeof Component>;
9
- export default Component;
@@ -1,2 +0,0 @@
1
- export { default as PinyaPageLayout } from "./component.svelte";
2
- export * from "./runes.svelte";
@@ -1,2 +0,0 @@
1
- export { default as PinyaPageLayout } from "./component.svelte";
2
- export * from "./runes.svelte";
@@ -1,3 +0,0 @@
1
- export const appState = $state({
2
- title: ''
3
- });