@turnipxenon/pineapple 2.4.62 → 2.4.64
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/.idea/workspace.xml +32 -32
- package/.svelte-kit/__package__/components/chip/Chip.svelte +49 -19
- package/.svelte-kit/__package__/components/chip/Chip.svelte.d.ts +7 -15
- package/.svelte-kit/__package__/index.d.ts +1 -0
- package/.svelte-kit/__package__/index.js +1 -0
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +9 -8
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/chip/Chip.svelte +49 -19
- package/dist/components/chip/Chip.svelte.d.ts +7 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/template/seaweed/SeaweedTemplate.svelte +9 -8
- package/package.json +1 -1
- package/src/lib/components/chip/Chip.svelte +50 -4
- package/src/lib/index.ts +1 -0
- package/src/lib/template/seaweed/SeaweedTemplate.svelte +10 -9
package/.idea/workspace.xml
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Remove tailwind reliance on Chip">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
9
|
</list>
|
|
10
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
11
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -340,31 +340,7 @@
|
|
|
340
340
|
<workItem from="1712570296984" duration="1559000" />
|
|
341
341
|
<workItem from="1712571884570" duration="7000" />
|
|
342
342
|
<workItem from="1712636226857" duration="11130000" />
|
|
343
|
-
<workItem from="1712648417963" duration="
|
|
344
|
-
</task>
|
|
345
|
-
<task id="LOCAL-00129" summary="Write vercel to azure migration">
|
|
346
|
-
<option name="closed" value="true" />
|
|
347
|
-
<created>1712298583241</created>
|
|
348
|
-
<option name="number" value="00129" />
|
|
349
|
-
<option name="presentableId" value="LOCAL-00129" />
|
|
350
|
-
<option name="project" value="LOCAL" />
|
|
351
|
-
<updated>1712298583242</updated>
|
|
352
|
-
</task>
|
|
353
|
-
<task id="LOCAL-00130" summary="Remove vercel module">
|
|
354
|
-
<option name="closed" value="true" />
|
|
355
|
-
<created>1712369624295</created>
|
|
356
|
-
<option name="number" value="00130" />
|
|
357
|
-
<option name="presentableId" value="LOCAL-00130" />
|
|
358
|
-
<option name="project" value="LOCAL" />
|
|
359
|
-
<updated>1712369624295</updated>
|
|
360
|
-
</task>
|
|
361
|
-
<task id="LOCAL-00131" summary="Convert npm to yarn">
|
|
362
|
-
<option name="closed" value="true" />
|
|
363
|
-
<created>1712372282278</created>
|
|
364
|
-
<option name="number" value="00131" />
|
|
365
|
-
<option name="presentableId" value="LOCAL-00131" />
|
|
366
|
-
<option name="project" value="LOCAL" />
|
|
367
|
-
<updated>1712372282278</updated>
|
|
343
|
+
<workItem from="1712648417963" duration="5995000" />
|
|
368
344
|
</task>
|
|
369
345
|
<task id="LOCAL-00132" summary="Change from auto to node adapter">
|
|
370
346
|
<option name="closed" value="true" />
|
|
@@ -734,7 +710,31 @@
|
|
|
734
710
|
<option name="project" value="LOCAL" />
|
|
735
711
|
<updated>1712649815862</updated>
|
|
736
712
|
</task>
|
|
737
|
-
<
|
|
713
|
+
<task id="LOCAL-00178" summary="Extract tailwind css utility class to local-chip">
|
|
714
|
+
<option name="closed" value="true" />
|
|
715
|
+
<created>1712650184366</created>
|
|
716
|
+
<option name="number" value="00178" />
|
|
717
|
+
<option name="presentableId" value="LOCAL-00178" />
|
|
718
|
+
<option name="project" value="LOCAL" />
|
|
719
|
+
<updated>1712650184366</updated>
|
|
720
|
+
</task>
|
|
721
|
+
<task id="LOCAL-00179" summary="Fix chip issue in Advanced Settings">
|
|
722
|
+
<option name="closed" value="true" />
|
|
723
|
+
<created>1712653410765</created>
|
|
724
|
+
<option name="number" value="00179" />
|
|
725
|
+
<option name="presentableId" value="LOCAL-00179" />
|
|
726
|
+
<option name="project" value="LOCAL" />
|
|
727
|
+
<updated>1712653410765</updated>
|
|
728
|
+
</task>
|
|
729
|
+
<task id="LOCAL-00180" summary="Remove tailwind reliance on Chip">
|
|
730
|
+
<option name="closed" value="true" />
|
|
731
|
+
<created>1712654142877</created>
|
|
732
|
+
<option name="number" value="00180" />
|
|
733
|
+
<option name="presentableId" value="LOCAL-00180" />
|
|
734
|
+
<option name="project" value="LOCAL" />
|
|
735
|
+
<updated>1712654142877</updated>
|
|
736
|
+
</task>
|
|
737
|
+
<option name="localTasksCounter" value="181" />
|
|
738
738
|
<servers />
|
|
739
739
|
</component>
|
|
740
740
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -792,9 +792,6 @@
|
|
|
792
792
|
</option>
|
|
793
793
|
</component>
|
|
794
794
|
<component name="VcsManagerConfiguration">
|
|
795
|
-
<MESSAGE value="Extract EntryOrderConfig" />
|
|
796
|
-
<MESSAGE value="Add group swapping" />
|
|
797
|
-
<MESSAGE value="Add serverSideQueryParams in SeaweedTemplate" />
|
|
798
795
|
<MESSAGE value="Add serverSideQueryParams and extraComponent in SeaweedTemplate" />
|
|
799
796
|
<MESSAGE value="Fix removeProxyWrapperOnString" />
|
|
800
797
|
<MESSAGE value="Remove unneeded script check in yarn build" />
|
|
@@ -817,6 +814,9 @@
|
|
|
817
814
|
<MESSAGE value="Export chip" />
|
|
818
815
|
<MESSAGE value="Add border-radius for advanced settings cards" />
|
|
819
816
|
<MESSAGE value="Fix pkg import for Chip" />
|
|
820
|
-
<
|
|
817
|
+
<MESSAGE value="Extract tailwind css utility class to local-chip" />
|
|
818
|
+
<MESSAGE value="Fix chip issue in Advanced Settings" />
|
|
819
|
+
<MESSAGE value="Remove tailwind reliance on Chip" />
|
|
820
|
+
<option name="LAST_COMMIT_MESSAGE" value="Remove tailwind reliance on Chip" />
|
|
821
821
|
</component>
|
|
822
822
|
</project>
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script>import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
2
|
+
export let onClick = void 0;
|
|
3
|
+
export let checked = true;
|
|
4
|
+
$:
|
|
5
|
+
textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
6
|
+
let buttonClass = "variant-filled-tertiary";
|
|
7
|
+
const toggleChipColor = (isLightMode2, checked2) => {
|
|
8
|
+
if (isLightMode2) {
|
|
9
|
+
buttonClass = checked2 ? "normal-bg" : "light-unchecked-bg";
|
|
10
|
+
} else {
|
|
11
|
+
buttonClass = checked2 ? "normal-bg" : "dark-unchecked-bg";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
$:
|
|
15
|
+
toggleChipColor($isLightMode, checked);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
{#if onClick}
|
|
19
|
+
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
20
|
+
on:click={onClick}>
|
|
21
|
+
<slot />
|
|
22
|
+
</button>
|
|
23
|
+
{:else }
|
|
24
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
25
|
+
<slot />
|
|
26
|
+
</span>
|
|
27
|
+
{/if}
|
|
4
28
|
|
|
5
29
|
<style>
|
|
6
|
-
|
|
7
|
-
--tw-bg-opacity: 1;
|
|
8
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
9
|
-
color: rgb(var(--on-tertiary));
|
|
10
|
-
}
|
|
11
|
-
.local-chip {
|
|
30
|
+
.local-chip {
|
|
12
31
|
cursor: pointer;
|
|
13
32
|
white-space: nowrap;
|
|
14
33
|
padding-left: 0.75rem;
|
|
@@ -44,22 +63,33 @@ a.local-chip:hover,
|
|
|
44
63
|
--tw-scale-x: 1;
|
|
45
64
|
--tw-scale-y: 1;
|
|
46
65
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
47
|
-
}
|
|
48
|
-
.local-chip {
|
|
49
|
-
--tw-bg-opacity: 1;
|
|
50
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
51
|
-
color: rgb(var(--on-tertiary));
|
|
52
|
-
}
|
|
53
|
-
:is(.dark .local-chip) {
|
|
54
|
-
--tw-bg-opacity: 1;
|
|
55
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
56
|
-
color: rgb(var(--on-tertiary));
|
|
57
66
|
}
|
|
58
67
|
.local-chip {
|
|
59
68
|
border-radius: 1em;
|
|
60
69
|
margin: 0.25em;
|
|
61
70
|
font-weight: bold;
|
|
62
71
|
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.normal-bg {
|
|
75
|
+
--tw-bg-opacity: 1;
|
|
63
76
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
64
77
|
}
|
|
78
|
+
|
|
79
|
+
.dark-unchecked-bg {
|
|
80
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.light-unchecked-bg {
|
|
84
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.local-light {
|
|
88
|
+
color: rgb(var(--theme-font-color-base));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.local-dark {
|
|
92
|
+
color: whitesmoke;
|
|
93
|
+
/*color: rgb(var(--theme-font-color-dark));*/
|
|
94
|
+
}
|
|
65
95
|
</style>
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ChipProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ChipEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ChipSlots */
|
|
4
|
-
export default class Chip extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type ChipProps = typeof __propDef.props;
|
|
13
|
-
export type ChipEvents = typeof __propDef.events;
|
|
14
|
-
export type ChipSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponent } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
18
|
-
|
|
4
|
+
onClick?: undefined | (() => void);
|
|
5
|
+
checked?: boolean | undefined;
|
|
19
6
|
};
|
|
20
7
|
events: {
|
|
21
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -24,4 +11,9 @@ declare const __propDef: {
|
|
|
24
11
|
default: {};
|
|
25
12
|
};
|
|
26
13
|
};
|
|
14
|
+
export type ChipProps = typeof __propDef.props;
|
|
15
|
+
export type ChipEvents = typeof __propDef.events;
|
|
16
|
+
export type ChipSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Chip extends SvelteComponent<ChipProps, ChipEvents, ChipSlots> {
|
|
18
|
+
}
|
|
27
19
|
export {};
|
|
@@ -3,6 +3,7 @@ export { default as SeaweedTemplate } from "./template/seaweed/SeaweedTemplate.s
|
|
|
3
3
|
export { default as LazyAsset } from "./components/LazyAsset.svelte";
|
|
4
4
|
export { default as Card } from "./components/Card.svelte";
|
|
5
5
|
export { default as Chip } from "./components/chip/Chip.svelte";
|
|
6
|
+
export { default as PineappleSlideToggle } from "./components/PineappleSlideToggle.svelte";
|
|
6
7
|
export { default as SocialSection } from "./components/SocialSection.svelte";
|
|
7
8
|
export * from "./components/overrideable_meta/index";
|
|
8
9
|
export * from "./components/navigation_component/index";
|
|
@@ -4,6 +4,7 @@ export { default as SeaweedTemplate } from "./template/seaweed/SeaweedTemplate.s
|
|
|
4
4
|
export { default as LazyAsset } from "./components/LazyAsset.svelte";
|
|
5
5
|
export { default as Card } from "./components/Card.svelte";
|
|
6
6
|
export { default as Chip } from "./components/chip/Chip.svelte";
|
|
7
|
+
export { default as PineappleSlideToggle } from "./components/PineappleSlideToggle.svelte";
|
|
7
8
|
export { default as SocialSection } from "./components/SocialSection.svelte";
|
|
8
9
|
export * from "./components/overrideable_meta/index";
|
|
9
10
|
export * from "./components/navigation_component/index";
|
|
@@ -4,7 +4,7 @@ import { runChaos } from "./RunChaos";
|
|
|
4
4
|
import SocialSection from "../../components/SocialSection.svelte";
|
|
5
5
|
import "./seaweed.postcss";
|
|
6
6
|
import SeaweedBaseLayout from "../../components/layouts/SeaweedBaseLayout.svelte";
|
|
7
|
-
import { Accordion, AccordionItem, CodeBlock
|
|
7
|
+
import { Accordion, AccordionItem, CodeBlock } from "@skeletonlabs/skeleton";
|
|
8
8
|
import { page } from "$app/stores";
|
|
9
9
|
import Card from "../../components/Card.svelte";
|
|
10
10
|
import ElementVisbilityDetector from "../../components/ElementVisbilityDetector.svelte";
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { parseQueryTerms } from "./ParseQueryTerms";
|
|
18
18
|
import UrlShortenerForm from "./CreateUrlForm.svelte";
|
|
19
19
|
import PineappleSlideToggle from "../../components/PineappleSlideToggle.svelte";
|
|
20
|
+
import { Chip } from "../../index";
|
|
20
21
|
export let letChaos = true;
|
|
21
22
|
export let name = "Turnip";
|
|
22
23
|
export let email = "turnipxenon@gmail.com";
|
|
@@ -345,14 +346,14 @@ $:
|
|
|
345
346
|
<div class="query-term-grid">
|
|
346
347
|
{#each seaweedTemplateData.queryTermMap.entries() as [term, shouldBold]}
|
|
347
348
|
<!--{@const shouldBold = false}-->
|
|
348
|
-
<
|
|
349
|
-
|
|
350
|
-
on:click={() => {toggleTerm(term)}}
|
|
351
|
-
>
|
|
349
|
+
<Chip onClick={() => {toggleTerm(term)}}
|
|
350
|
+
checked={shouldBold}>
|
|
352
351
|
<!-- todo: change shouldBold -->
|
|
353
|
-
{
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
<span style={`font-weight: ${shouldBold ? "bold" : "normal"}`}>
|
|
353
|
+
{#if (shouldBold)}✓{/if}
|
|
354
|
+
{term}
|
|
355
|
+
</span>
|
|
356
|
+
</Chip>
|
|
356
357
|
{/each}
|
|
357
358
|
</div>
|
|
358
359
|
|
|
@@ -21,7 +21,7 @@ export const options = {
|
|
|
21
21
|
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
|
|
22
22
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
23
23
|
},
|
|
24
|
-
version_hash: "
|
|
24
|
+
version_hash: "vhufmd"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script>import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
2
|
+
export let onClick = void 0;
|
|
3
|
+
export let checked = true;
|
|
4
|
+
$:
|
|
5
|
+
textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
6
|
+
let buttonClass = "variant-filled-tertiary";
|
|
7
|
+
const toggleChipColor = (isLightMode2, checked2) => {
|
|
8
|
+
if (isLightMode2) {
|
|
9
|
+
buttonClass = checked2 ? "normal-bg" : "light-unchecked-bg";
|
|
10
|
+
} else {
|
|
11
|
+
buttonClass = checked2 ? "normal-bg" : "dark-unchecked-bg";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
$:
|
|
15
|
+
toggleChipColor($isLightMode, checked);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
{#if onClick}
|
|
19
|
+
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
20
|
+
on:click={onClick}>
|
|
21
|
+
<slot />
|
|
22
|
+
</button>
|
|
23
|
+
{:else }
|
|
24
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
25
|
+
<slot />
|
|
26
|
+
</span>
|
|
27
|
+
{/if}
|
|
4
28
|
|
|
5
29
|
<style>
|
|
6
|
-
|
|
7
|
-
--tw-bg-opacity: 1;
|
|
8
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
9
|
-
color: rgb(var(--on-tertiary));
|
|
10
|
-
}
|
|
11
|
-
.local-chip {
|
|
30
|
+
.local-chip {
|
|
12
31
|
cursor: pointer;
|
|
13
32
|
white-space: nowrap;
|
|
14
33
|
padding-left: 0.75rem;
|
|
@@ -44,22 +63,33 @@ a.local-chip:hover,
|
|
|
44
63
|
--tw-scale-x: 1;
|
|
45
64
|
--tw-scale-y: 1;
|
|
46
65
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
47
|
-
}
|
|
48
|
-
.local-chip {
|
|
49
|
-
--tw-bg-opacity: 1;
|
|
50
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
51
|
-
color: rgb(var(--on-tertiary));
|
|
52
|
-
}
|
|
53
|
-
:is(.dark .local-chip) {
|
|
54
|
-
--tw-bg-opacity: 1;
|
|
55
|
-
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
56
|
-
color: rgb(var(--on-tertiary));
|
|
57
66
|
}
|
|
58
67
|
.local-chip {
|
|
59
68
|
border-radius: 1em;
|
|
60
69
|
margin: 0.25em;
|
|
61
70
|
font-weight: bold;
|
|
62
71
|
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.normal-bg {
|
|
75
|
+
--tw-bg-opacity: 1;
|
|
63
76
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
64
77
|
}
|
|
78
|
+
|
|
79
|
+
.dark-unchecked-bg {
|
|
80
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.light-unchecked-bg {
|
|
84
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.local-light {
|
|
88
|
+
color: rgb(var(--theme-font-color-base));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.local-dark {
|
|
92
|
+
color: whitesmoke;
|
|
93
|
+
/*color: rgb(var(--theme-font-color-dark));*/
|
|
94
|
+
}
|
|
65
95
|
</style>
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ChipProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ChipEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ChipSlots */
|
|
4
|
-
export default class Chip extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type ChipProps = typeof __propDef.props;
|
|
13
|
-
export type ChipEvents = typeof __propDef.events;
|
|
14
|
-
export type ChipSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponent } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
18
|
-
|
|
4
|
+
onClick?: undefined | (() => void);
|
|
5
|
+
checked?: boolean | undefined;
|
|
19
6
|
};
|
|
20
7
|
events: {
|
|
21
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -24,4 +11,9 @@ declare const __propDef: {
|
|
|
24
11
|
default: {};
|
|
25
12
|
};
|
|
26
13
|
};
|
|
14
|
+
export type ChipProps = typeof __propDef.props;
|
|
15
|
+
export type ChipEvents = typeof __propDef.events;
|
|
16
|
+
export type ChipSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Chip extends SvelteComponent<ChipProps, ChipEvents, ChipSlots> {
|
|
18
|
+
}
|
|
27
19
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as SeaweedTemplate } from "./template/seaweed/SeaweedTemplate.s
|
|
|
3
3
|
export { default as LazyAsset } from "./components/LazyAsset.svelte";
|
|
4
4
|
export { default as Card } from "./components/Card.svelte";
|
|
5
5
|
export { default as Chip } from "./components/chip/Chip.svelte";
|
|
6
|
+
export { default as PineappleSlideToggle } from "./components/PineappleSlideToggle.svelte";
|
|
6
7
|
export { default as SocialSection } from "./components/SocialSection.svelte";
|
|
7
8
|
export * from "./components/overrideable_meta/index";
|
|
8
9
|
export * from "./components/navigation_component/index";
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { default as SeaweedTemplate } from "./template/seaweed/SeaweedTemplate.s
|
|
|
4
4
|
export { default as LazyAsset } from "./components/LazyAsset.svelte";
|
|
5
5
|
export { default as Card } from "./components/Card.svelte";
|
|
6
6
|
export { default as Chip } from "./components/chip/Chip.svelte";
|
|
7
|
+
export { default as PineappleSlideToggle } from "./components/PineappleSlideToggle.svelte";
|
|
7
8
|
export { default as SocialSection } from "./components/SocialSection.svelte";
|
|
8
9
|
export * from "./components/overrideable_meta/index";
|
|
9
10
|
export * from "./components/navigation_component/index";
|
|
@@ -4,7 +4,7 @@ import { runChaos } from "./RunChaos";
|
|
|
4
4
|
import SocialSection from "../../components/SocialSection.svelte";
|
|
5
5
|
import "./seaweed.postcss";
|
|
6
6
|
import SeaweedBaseLayout from "../../components/layouts/SeaweedBaseLayout.svelte";
|
|
7
|
-
import { Accordion, AccordionItem, CodeBlock
|
|
7
|
+
import { Accordion, AccordionItem, CodeBlock } from "@skeletonlabs/skeleton";
|
|
8
8
|
import { page } from "$app/stores";
|
|
9
9
|
import Card from "../../components/Card.svelte";
|
|
10
10
|
import ElementVisbilityDetector from "../../components/ElementVisbilityDetector.svelte";
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { parseQueryTerms } from "./ParseQueryTerms";
|
|
18
18
|
import UrlShortenerForm from "./CreateUrlForm.svelte";
|
|
19
19
|
import PineappleSlideToggle from "../../components/PineappleSlideToggle.svelte";
|
|
20
|
+
import { Chip } from "../../index";
|
|
20
21
|
export let letChaos = true;
|
|
21
22
|
export let name = "Turnip";
|
|
22
23
|
export let email = "turnipxenon@gmail.com";
|
|
@@ -345,14 +346,14 @@ $:
|
|
|
345
346
|
<div class="query-term-grid">
|
|
346
347
|
{#each seaweedTemplateData.queryTermMap.entries() as [term, shouldBold]}
|
|
347
348
|
<!--{@const shouldBold = false}-->
|
|
348
|
-
<
|
|
349
|
-
|
|
350
|
-
on:click={() => {toggleTerm(term)}}
|
|
351
|
-
>
|
|
349
|
+
<Chip onClick={() => {toggleTerm(term)}}
|
|
350
|
+
checked={shouldBold}>
|
|
352
351
|
<!-- todo: change shouldBold -->
|
|
353
|
-
{
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
<span style={`font-weight: ${shouldBold ? "bold" : "normal"}`}>
|
|
353
|
+
{#if (shouldBold)}✓{/if}
|
|
354
|
+
{term}
|
|
355
|
+
</span>
|
|
356
|
+
</Chip>
|
|
356
357
|
{/each}
|
|
357
358
|
</div>
|
|
358
359
|
|
package/package.json
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
3
|
+
|
|
4
|
+
export let onClick: undefined | (() => void) = undefined;
|
|
5
|
+
export let checked = true;
|
|
6
|
+
|
|
7
|
+
$: textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
8
|
+
let buttonClass = "variant-filled-tertiary";
|
|
9
|
+
const toggleChipColor = (isLightMode: boolean, checked: boolean) => {
|
|
10
|
+
if (isLightMode) {
|
|
11
|
+
buttonClass = checked ? "normal-bg" : "light-unchecked-bg";
|
|
12
|
+
} else {
|
|
13
|
+
buttonClass = checked ? "normal-bg" : "dark-unchecked-bg";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
$: toggleChipColor($isLightMode, checked);
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
{#if onClick}
|
|
20
|
+
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
21
|
+
on:click={onClick}>
|
|
22
|
+
<slot />
|
|
23
|
+
</button>
|
|
24
|
+
{:else }
|
|
25
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
26
|
+
<slot />
|
|
27
|
+
</span>
|
|
28
|
+
{/if}
|
|
4
29
|
|
|
5
30
|
<style lang="postcss">
|
|
6
31
|
.local-chip {
|
|
7
|
-
@apply chip
|
|
32
|
+
@apply chip;
|
|
8
33
|
border-radius: 1em;
|
|
9
34
|
margin: 0.25em;
|
|
10
35
|
font-weight: bold;
|
|
11
36
|
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.normal-bg {
|
|
40
|
+
--tw-bg-opacity: 1;
|
|
12
41
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
13
42
|
}
|
|
43
|
+
|
|
44
|
+
.dark-unchecked-bg {
|
|
45
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.light-unchecked-bg {
|
|
49
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.local-light {
|
|
53
|
+
color: rgb(var(--theme-font-color-base));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.local-dark {
|
|
57
|
+
color: whitesmoke;
|
|
58
|
+
/*color: rgb(var(--theme-font-color-dark));*/
|
|
59
|
+
}
|
|
14
60
|
</style>
|
package/src/lib/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as SeaweedTemplate } from "$pkg/template/seaweed/SeaweedTemplat
|
|
|
5
5
|
export { default as LazyAsset } from "./components/LazyAsset.svelte";
|
|
6
6
|
export { default as Card } from "./components/Card.svelte";
|
|
7
7
|
export { default as Chip } from "./components/chip/Chip.svelte";
|
|
8
|
+
export { default as PineappleSlideToggle } from "./components/PineappleSlideToggle.svelte";
|
|
8
9
|
export { default as SocialSection } from "./components/SocialSection.svelte";
|
|
9
10
|
|
|
10
11
|
export * from "$pkg/components/overrideable_meta/index";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { afterUpdate,
|
|
2
|
+
import { afterUpdate, onMount } from "svelte";
|
|
3
3
|
import EntryOrderConfig from "$pkg/template/seaweed/entry_order_config/EntryOrderConfig.svelte";
|
|
4
4
|
import { runChaos } from "$pkg/template/seaweed/RunChaos";
|
|
5
5
|
import SocialSection from "$pkg/components/SocialSection.svelte";
|
|
6
6
|
import "./seaweed.postcss";
|
|
7
7
|
import SeaweedBaseLayout from "$pkg/components/layouts/SeaweedBaseLayout.svelte";
|
|
8
|
-
import { Accordion, AccordionItem, CodeBlock
|
|
8
|
+
import { Accordion, AccordionItem, CodeBlock } from "@skeletonlabs/skeleton";
|
|
9
9
|
import { page } from "$app/stores";
|
|
10
10
|
import Card from "$pkg/components/Card.svelte";
|
|
11
11
|
import ElementVisbilityDetector from "$pkg/components/ElementVisbilityDetector.svelte";
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import { parseQueryTerms } from "$pkg/template/seaweed/ParseQueryTerms";
|
|
22
22
|
import UrlShortenerForm from "$pkg/template/seaweed/CreateUrlForm.svelte";
|
|
23
23
|
import PineappleSlideToggle from "$pkg/components/PineappleSlideToggle.svelte";
|
|
24
|
+
import { Chip } from "$pkg/index";
|
|
24
25
|
|
|
25
26
|
export let letChaos = true;
|
|
26
27
|
export let name = "Turnip";
|
|
@@ -406,14 +407,14 @@
|
|
|
406
407
|
<div class="query-term-grid">
|
|
407
408
|
{#each seaweedTemplateData.queryTermMap.entries() as [term, shouldBold]}
|
|
408
409
|
<!--{@const shouldBold = false}-->
|
|
409
|
-
<
|
|
410
|
-
|
|
411
|
-
on:click={() => {toggleTerm(term)}}
|
|
412
|
-
>
|
|
410
|
+
<Chip onClick={() => {toggleTerm(term)}}
|
|
411
|
+
checked={shouldBold}>
|
|
413
412
|
<!-- todo: change shouldBold -->
|
|
414
|
-
{
|
|
415
|
-
|
|
416
|
-
|
|
413
|
+
<span style={`font-weight: ${shouldBold ? "bold" : "normal"}`}>
|
|
414
|
+
{#if (shouldBold)}✓{/if}
|
|
415
|
+
{term}
|
|
416
|
+
</span>
|
|
417
|
+
</Chip>
|
|
417
418
|
{/each}
|
|
418
419
|
</div>
|
|
419
420
|
|