-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: CV/Job offer form #126
Changes from 7 commits
b5b6631
6d5f8c2
5766eb1
05bd5fa
5860b91
85b9de9
d04db59
5aa3f06
059866e
769b094
bdbd510
697d0f3
dbfdbdf
e8ae530
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"tailwindCSS.experimental.classRegex": [["class:([^=]*)"]] | ||
"tailwindCSS.experimental.classRegex": [["class:([^=]*)"], ["region.+=\"([^\"]*)\""]] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,14 @@ | |
"openapi-gen": "tsx --tsconfig scripts/tsconfig.json scripts/openapi-gen.ts", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"analyze": "pnpm vite-bundle-visualizer", | ||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", | ||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", | ||
"lint": "prettier --plugin-search-dir . --check . && eslint .", | ||
"format": "prettier . -l -w --plugin prettier-plugin-svelte --plugin prettier-plugin-tailwindcss" | ||
}, | ||
"dependencies": { | ||
"@floating-ui/dom": "^1.5.1", | ||
"@skeletonlabs/skeleton": "^2.0.0", | ||
"@skeletonlabs/tw-plugin": "^0.1.0", | ||
"@tanstack/svelte-query": "5.0.0-beta.20", | ||
|
@@ -32,11 +34,14 @@ | |
"@types/node": "^20.5.6", | ||
"@typescript-eslint/eslint-plugin": "^6.4.1", | ||
"@typescript-eslint/parser": "^6.4.1", | ||
"autoprefixer": "^10.4.14", | ||
"eslint": "^8.47.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-svelte": "^2.33.0", | ||
"nodemon": "^3.0.1", | ||
"openapi-typescript": "^6.5.3", | ||
"postcss": "^8.4.24", | ||
"postcss-load-config": "^4.0.1", | ||
"prettier": "^3.0.2", | ||
"prettier-plugin-svelte": "^3.0.3", | ||
"prettier-plugin-tailwindcss": "^0.5.3", | ||
|
@@ -45,11 +50,14 @@ | |
"tslib": "^2.6.2", | ||
"tsx": "^3.12.7", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9" | ||
"vite": "^4.4.9", | ||
"vite-bundle-visualizer": "^0.10.0" | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
"[email protected]": "patches/[email protected]", | ||
"@sveltejs/[email protected]": "patches/@[email protected]", | ||
"@skeletonlabs/[email protected]": "patches/@[email protected]" | ||
} | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Пропатчил пока компонент с Автокомплитом, чтобы тип значения из ивента выбора из списка совпадал с переданным значением в инпут.
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
diff --git a/dist/components/Autocomplete/Autocomplete.svelte b/dist/components/Autocomplete/Autocomplete.svelte | ||
index 75b8b949c1e26d9c7b78ff01fb99140ce4ac983e..21ac8498fbbe15999fe5585031d580cc1b08113c 100644 | ||
--- a/dist/components/Autocomplete/Autocomplete.svelte | ||
+++ b/dist/components/Autocomplete/Autocomplete.svelte | ||
@@ -74,14 +74,14 @@ $: | ||
{#if optionsFiltered.length > 0} | ||
<nav class="autocomplete-nav {classesNav}"> | ||
<ul class="autocomplete-list {classesList}"> | ||
- {#each optionsFiltered.slice(0, sliceLimit) as option (option)} | ||
+ {#each sliceLimit ? optionsFiltered.slice(0, sliceLimit) : optionsFiltered as option (option)} | ||
<li | ||
class="autocomplete-item {classesItem}" | ||
in:dynamicTransition|local={{ transition: transitionIn, params: transitionInParams, enabled: transitions }} | ||
out:dynamicTransition|local={{ transition: transitionOut, params: transitionOutParams, enabled: transitions }} | ||
> | ||
<button class="autocomplete-button {classesButton}" type="button" on:click={() => onSelection(option)} on:click on:keypress> | ||
- {@html option.label} | ||
+ {option.label} | ||
</button> | ||
</li> | ||
{/each} | ||
diff --git a/dist/components/Autocomplete/Autocomplete.svelte.d.ts b/dist/components/Autocomplete/Autocomplete.svelte.d.ts | ||
index e4f3b4dd9ae4983bba4c7c84fa807ea68d03d07e..a8cc2e6cd4051d866ad56675ba51acaa25e190fe 100644 | ||
--- a/dist/components/Autocomplete/Autocomplete.svelte.d.ts | ||
+++ b/dist/components/Autocomplete/Autocomplete.svelte.d.ts | ||
@@ -1,16 +1,16 @@ | ||
-import { SvelteComponentTyped } from "svelte"; | ||
+import { SvelteComponent } from "svelte"; | ||
import { slide } from 'svelte/transition'; | ||
import { type Transition, type TransitionParams } from '../../index.js'; | ||
-type SlideTransition = typeof slide; | ||
import type { AutocompleteOption } from './types.js'; | ||
-declare class __sveltets_Render<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> { | ||
+type SlideTransition = typeof slide; | ||
+declare class __sveltets_Render<Value, TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> { | ||
props(): { | ||
[x: string]: any; | ||
- input?: unknown; | ||
- options?: AutocompleteOption[] | undefined; | ||
+ input?: Value; | ||
+ options?: AutocompleteOption<Value>[] | undefined; | ||
limit?: number | undefined; | ||
- allowlist?: unknown[] | undefined; | ||
- denylist?: unknown[] | undefined; | ||
+ allowlist?: Value[] | undefined; | ||
+ denylist?: Value[] | undefined; | ||
emptyState?: string | undefined; | ||
regionNav?: string | undefined; | ||
regionList?: string | undefined; | ||
@@ -26,15 +26,16 @@ declare class __sveltets_Render<TransitionIn extends Transition = SlideTransitio | ||
events(): { | ||
click: MouseEvent; | ||
keypress: KeyboardEvent; | ||
- selection: CustomEvent<AutocompleteOption>; | ||
+ selection: CustomEvent<AutocompleteOption<Value>>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots(): {}; | ||
} | ||
-export type AutocompleteProps<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['props']>; | ||
-export type AutocompleteEvents<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['events']>; | ||
-export type AutocompleteSlots<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<TransitionIn, TransitionOut>['slots']>; | ||
-export default class Autocomplete<TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> extends SvelteComponentTyped<AutocompleteProps<TransitionIn, TransitionOut>, AutocompleteEvents<TransitionIn, TransitionOut>, AutocompleteSlots<TransitionIn, TransitionOut>> { | ||
+export type AutocompleteProps<Value, TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<Value, TransitionIn, TransitionOut>['props']>; | ||
+export type AutocompleteEvents<Value, TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<Value, TransitionIn, TransitionOut>['events']>; | ||
+export type AutocompleteSlots<Value, TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> = ReturnType<__sveltets_Render<Value, TransitionIn, TransitionOut>['slots']>; | ||
+export default class Autocomplete<Value, TransitionIn extends Transition = SlideTransition, TransitionOut extends Transition = SlideTransition> extends SvelteComponent<AutocompleteProps<Value, TransitionIn, TransitionOut>, AutocompleteEvents<Value, TransitionIn, TransitionOut>, AutocompleteSlots<Value, TransitionIn, TransitionOut>> { | ||
} | ||
-export {}; | ||
+export { }; | ||
+ | ||
diff --git a/dist/components/Autocomplete/types.d.ts b/dist/components/Autocomplete/types.d.ts | ||
index f3c35163bc4d6c9b20a7fd2e29a0b8b98cdf3f25..14649c466c40b2d74aec3428ae4554dd0109768c 100644 | ||
--- a/dist/components/Autocomplete/types.d.ts | ||
+++ b/dist/components/Autocomplete/types.d.ts | ||
@@ -1,8 +1,8 @@ | ||
-export interface AutocompleteOption { | ||
- /** provide a unique display label per option. Supports HTML. */ | ||
+export interface AutocompleteOption<Value = unknown> { | ||
+ /** Provide a unique display label per option. */ | ||
label: string; | ||
/** Provide a unique option value. */ | ||
- value: unknown; | ||
+ value: Value; | ||
/** Provide a comma separated list of keywords. */ | ||
keywords?: any; | ||
/** Pass arbitrary data per option. */ |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Добавил небольшой патч, чтоб СвелтКит генерил тсконфиг с включенным тейлвинд конфигом - либо так, либо руками копировать инклюды из сгенеренного свелткитом тсконфига. так проще и надежнее имхо |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/core/sync/write_tsconfig.js b/src/core/sync/write_tsconfig.js | ||
index 9f3a083649fe8645380e9a3558c6bef5c44530ff..cbda8cdc76ba32282c2975a60d2adf70dedce05a 100644 | ||
--- a/src/core/sync/write_tsconfig.js | ||
+++ b/src/core/sync/write_tsconfig.js | ||
@@ -88,7 +88,8 @@ export function get_tsconfig(kit, include_base_url) { | ||
const include = new Set([ | ||
'ambient.d.ts', | ||
'./types/**/$types.d.ts', | ||
- config_relative('vite.config.ts') | ||
+ config_relative('vite.config.ts'), | ||
+ config_relative('tailwind.config.ts') | ||
]); | ||
// TODO(v2): find a better way to include all src files. We can't just use routes/lib only because | ||
// people might have other folders/files in src that they want included. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У скелетона вообще нередко встречаются пропсы для модификации классов компонентов, но тк у них свои названия - интеллисенс для тейлвинда их не видит, но это можно кастомизировать. Можно на примере этого в будущем добавлять сюда по необходимости новые паттерны, чтоб было удобнее работать.
Жаль, преттиер не сортирует классы в этих кейсах все равно, к сожалению