├── .npmrc
├── src
├── lib
│ ├── pages
│ │ ├── students
│ │ │ ├── ViewProfile.svelte
│ │ │ ├── AllStudents.svelte
│ │ │ └── RegisterStudent.svelte
│ │ ├── student
│ │ │ ├── AllStudents.svelte
│ │ │ ├── RegistrationPage.svelte
│ │ │ └── RegistrationForm.ts
│ │ ├── PageTwo.svelte
│ │ ├── fees
│ │ │ └── FeesRecords.svelte
│ │ ├── PageOne.svelte
│ │ └── FormOne.ts
│ ├── card
│ │ └── Card.svelte
│ ├── app_bar
│ │ ├── icons.ts
│ │ └── AppBar.svelte
│ ├── dtp
│ │ ├── DateTile.svelte
│ │ ├── DateArrows.svelte
│ │ ├── DatePicker.svelte
│ │ ├── DateColumn.svelte
│ │ └── DateField.svelte
│ ├── button
│ │ └── Button.svelte
│ ├── tab_tage
│ │ └── TabPage.svelte
│ ├── chip_input
│ │ ├── Chip.svelte
│ │ ├── ChipInput.svelte
│ │ └── ChipsInput.svelte
│ ├── avartar
│ │ └── Avartar.svelte
│ ├── toggle_switch
│ │ └── ToggleSwitch.svelte
│ ├── radio_button
│ │ └── RadioButton.svelte
│ ├── table
│ │ ├── Table.svelte
│ │ └── TableRow.svelte
│ ├── calendar
│ │ ├── Cell.svelte
│ │ └── Calendar.svelte
│ ├── CollapsibleList.svelte
│ ├── form_builder
│ │ ├── FormBuilder.svelte
│ │ └── form_options.ts
│ ├── forms
│ │ ├── FeesPayment.ts
│ │ └── StudentRegistration.ts
│ ├── side_nav
│ │ ├── MenuList.svelte
│ │ ├── MenuHeader.svelte
│ │ ├── MenuItem.svelte
│ │ ├── SideNav.svelte
│ │ └── menu.ts
│ ├── input_field
│ │ ├── TypeAheadField.svelte
│ │ ├── DateFormatter.ts
│ │ └── TextField.svelte
│ └── breadcrumb
│ │ └── Breadcrumb.svelte
├── routes
│ └── index.svelte
├── app.d.ts
└── app.html
├── static
└── favicon.png
├── .prettierrc
├── .gitignore
├── .timetracker
├── .eslintignore
├── .prettierignore
├── tests
└── test.ts
├── playwright.config.ts
├── tsconfig.json
├── svelte.config.js
├── .eslintrc.cjs
├── README.md
└── package.json
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/src/lib/pages/students/ViewProfile.svelte:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/static/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Parables/svelta/HEAD/static/favicon.png
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "singleQuote": true,
4 | "trailingComma": "none",
5 | "printWidth": 100
6 | }
7 |
--------------------------------------------------------------------------------
/src/routes/index.svelte:
--------------------------------------------------------------------------------
1 |
Welcome to SvelteKit
2 | Visit kit.svelte.dev to read the documentation
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 | yarn-error.log
10 | /.history
11 |
--------------------------------------------------------------------------------
/src/lib/card/Card.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/src/lib/app_bar/icons.ts:
--------------------------------------------------------------------------------
1 | import { icon_name } from "src/assets/svgs";
2 |
3 | export interface FavIcon{
4 | name: icon_name
5 | classNames?: string
6 | callback?: any
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/.timetracker:
--------------------------------------------------------------------------------
1 | {"total":509,"sessions":[{"begin":"2022-05-28T04:19:39+00:00","end":"2022-05-28T04:22:36+00:00","duration":176},{"begin":"2022-05-28T04:37:47+00:00","end":"2022-05-28T04:43:20+00:00","duration":333}]}
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
10 | # Ignore files for PNPM, NPM and YARN
11 | pnpm-lock.yaml
12 | package-lock.json
13 | yarn.lock
14 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /build
4 | /.svelte-kit
5 | /package
6 | .env
7 | .env.*
8 | !.env.example
9 |
10 | # Ignore files for PNPM, NPM and YARN
11 | pnpm-lock.yaml
12 | package-lock.json
13 | yarn.lock
14 |
--------------------------------------------------------------------------------
/tests/test.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 |
3 | test('index page has expected h1', async ({ page }) => {
4 | await page.goto('/');
5 | expect(await page.textContent('h1')).toBe('Welcome to SvelteKit');
6 | });
7 |
--------------------------------------------------------------------------------
/playwright.config.ts:
--------------------------------------------------------------------------------
1 | import type { PlaywrightTestConfig } from '@playwright/test';
2 |
3 | const config: PlaywrightTestConfig = {
4 | webServer: {
5 | command: 'npm run build && npm run preview',
6 | port: 3000
7 | }
8 | };
9 |
10 | export default config;
11 |
--------------------------------------------------------------------------------
/src/lib/pages/students/AllStudents.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 | Register Student
7 |
--------------------------------------------------------------------------------
/src/app.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
3 | // See https://kit.svelte.dev/docs/types#app
4 | // for information about these interfaces
5 | declare namespace App {
6 | // interface Locals {}
7 | // interface Platform {}
8 | // interface Session {}
9 | // interface Stuff {}
10 | }
11 |
--------------------------------------------------------------------------------
/src/lib/pages/student/AllStudents.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 | Register Student
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./.svelte-kit/tsconfig.json",
3 | "compilerOptions": {
4 | "allowJs": true,
5 | "checkJs": true,
6 | "esModuleInterop": true,
7 | "forceConsistentCasingInFileNames": true,
8 | "resolveJsonModule": true,
9 | "skipLibCheck": true,
10 | "sourceMap": true,
11 | "strict": true
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/app.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | %sveltekit.head%
8 |
9 |
10 | %sveltekit.body%
11 |
12 |
13 |
--------------------------------------------------------------------------------
/svelte.config.js:
--------------------------------------------------------------------------------
1 | import adapter from '@sveltejs/adapter-auto';
2 | import preprocess from 'svelte-preprocess';
3 |
4 | /** @type {import('@sveltejs/kit').Config} */
5 | const config = {
6 | // Consult https://github.com/sveltejs/svelte-preprocess
7 | // for more information about preprocessors
8 | preprocess: preprocess(),
9 |
10 | kit: {
11 | adapter: adapter()
12 | }
13 | };
14 |
15 | export default config;
16 |
--------------------------------------------------------------------------------
/src/lib/pages/PageTwo.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
Welcome to Page 2
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: '@typescript-eslint/parser',
4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
5 | plugins: ['svelte3', '@typescript-eslint'],
6 | ignorePatterns: ['*.cjs'],
7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
8 | settings: {
9 | 'svelte3/typescript': () => require('typescript')
10 | },
11 | parserOptions: {
12 | sourceType: 'module',
13 | ecmaVersion: 2020
14 | },
15 | env: {
16 | browser: true,
17 | es2017: true,
18 | node: true
19 | }
20 | };
21 |
--------------------------------------------------------------------------------
/src/lib/dtp/DateTile.svelte:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 | {if(callback) callback()} }>
12 |
13 | {value}
14 |
--------------------------------------------------------------------------------
/src/lib/pages/students/RegisterStudent.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 | Cancel
12 | Save
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/lib/button/Button.svelte:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/lib/pages/fees/FeesRecords.svelte:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 | New Payment
15 |
16 | Save
17 |
18 |
19 |
20 | Recent Payments
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/lib/tab_tage/TabPage.svelte:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 | {#each tabs as t, i}
15 |
18 | {t}
19 |
20 |
21 | {/each}
22 |
23 |
24 | YOur content goes here
25 |
26 |
27 |
--------------------------------------------------------------------------------
/src/lib/chip_input/Chip.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | {#if dismissable}
24 |
25 |
26 | {@html SVG('close', 'w-4 h-4')}
27 |
28 |
29 | {/if}
30 |
31 |
--------------------------------------------------------------------------------
/src/lib/pages/student/RegistrationPage.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
15 | Submit
16 |
17 |
21 | Cancel
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/lib/avartar/Avartar.svelte:
--------------------------------------------------------------------------------
1 |
13 |
14 |
20 |
21 | {#if image !== ''}
22 |
23 | {:else if text !== ''}
24 |
25 | {text}
26 |
27 | {:else}
28 | {@html SVG(icon, iconClass)}
29 | {/if}
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/lib/toggle_switch/ToggleSwitch.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
19 | {#if withText}
20 | on
21 | off
22 | {/if}
23 |
27 |
28 |
--------------------------------------------------------------------------------
/src/lib/dtp/DateArrows.svelte:
--------------------------------------------------------------------------------
1 |
5 |
6 | {if(callback) callback() } }>
7 | {#if direction === "up"}
8 |
9 | {:else}
10 |
11 | {/if}
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # create-svelte
2 |
3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
4 |
5 | ## Creating a project
6 |
7 | If you're seeing this, you've probably already done this step. Congrats!
8 |
9 | ```bash
10 | # create a new project in the current directory
11 | npm init svelte
12 |
13 | # create a new project in my-app
14 | npm init svelte my-app
15 | ```
16 |
17 | ## Developing
18 |
19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
20 |
21 | ```bash
22 | npm run dev
23 |
24 | # or start the server and open the app in a new browser tab
25 | npm run dev -- --open
26 | ```
27 |
28 | ## Building
29 |
30 | To create a production version of your app:
31 |
32 | ```bash
33 | npm run build
34 | ```
35 |
36 | You can preview the production build with `npm run preview`.
37 |
38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
39 |
--------------------------------------------------------------------------------
/src/lib/radio_button/RadioButton.svelte:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 | {#each items as item, i}
15 |
25 |
29 |
30 | {item.label ? item.label : item.value}
31 |
32 |
33 | {/each}
34 |
35 |
--------------------------------------------------------------------------------
/src/lib/table/Table.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
13 |
14 |
15 |
16 | Name
17 | Payment Date
18 | Amount
19 | Status
20 |
21 |
22 |
23 | {#each Array(10) as d, i}
24 |
25 | {:else}
26 | No data available
27 | {/each}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/lib/calendar/Cell.svelte:
--------------------------------------------------------------------------------
1 |
10 |
11 |
32 |
33 |
40 | {text}
41 |
42 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelta",
3 | "version": "0.0.1",
4 | "scripts": {
5 | "dev": "svelte-kit dev",
6 | "build": "svelte-kit build",
7 | "package": "svelte-kit package",
8 | "preview": "svelte-kit preview",
9 | "prepare": "svelte-kit sync",
10 | "test": "playwright test",
11 | "check": "svelte-check --tsconfig ./tsconfig.json",
12 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
13 | "lint": "prettier --check --plugin-search-dir=. . && eslint .",
14 | "format": "prettier --write --plugin-search-dir=. ."
15 | },
16 | "devDependencies": {
17 | "@playwright/test": "^1.21.0",
18 | "@sveltejs/adapter-auto": "next",
19 | "@sveltejs/kit": "next",
20 | "@typescript-eslint/eslint-plugin": "^5.10.1",
21 | "@typescript-eslint/parser": "^5.10.1",
22 | "cz-conventional-changelog": "3.3.0",
23 | "eslint": "^8.12.0",
24 | "eslint-config-prettier": "^8.3.0",
25 | "eslint-plugin-svelte3": "^4.0.0",
26 | "prettier": "^2.5.1",
27 | "prettier-plugin-svelte": "^2.5.0",
28 | "svelte": "^3.49.0",
29 | "svelte-check": "^2.2.6",
30 | "svelte-preprocess": "^4.10.1",
31 | "tslib": "^2.3.1",
32 | "typescript": "~4.6.2"
33 | },
34 | "type": "module",
35 | "config": {
36 | "commitizen": {
37 | "path": "./node_modules/cz-conventional-changelog"
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/lib/pages/PageOne.svelte:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | I'm a big useles card just taking up space
28 |
29 |
static
30 |
31 |
sticky
32 |
33 |
float
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/lib/CollapsibleList.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
11 |
12 |
13 |
14 |
{label}
15 |
22 |
31 |
32 |
33 |
34 | {#if expand }
35 |
36 |
37 |
38 | {/if}
39 |
--------------------------------------------------------------------------------
/src/lib/table/TableRow.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Jane Cooper Emmanuel BOtchey
10 |
11 |
12 | 4180360124
13 |
14 |
15 |
16 |
17 |
18 |
19 | 12/06/2020
20 |
21 |
22 | GHc 1000.00
23 |
24 |
25 |
26 | {i%4 === 0? 'Part' : 'Paid' }
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/lib/form_builder/FormBuilder.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
38 |
--------------------------------------------------------------------------------
/src/lib/form_builder/form_options.ts:
--------------------------------------------------------------------------------
1 | import { number } from "yup"
2 |
3 | export type FieldType = "text" | "email" | "password" | "tel" | "date" | "number" |
4 | "typeahead" | "radio" | "checkbox" | "chip" | "chipinput" | "select" | "range"
5 |
6 | export interface Field {
7 | id: string
8 | name: string
9 | label: string
10 | type?: FieldType
11 | placeholder?: string
12 | colors?: any
13 | width?: string
14 | height?: string
15 | margin?: string
16 | min?: number
17 | max?: number
18 | step?: number
19 | items?: Items[] | []
20 | passwordChar?: string
21 | multiSelect?: boolean
22 | readonly?: boolean
23 | variant?: "outlined" | "material" | "default"
24 | mask?: Mask
25 | validate?: string[]
26 | startIcon?: boolean
27 | endIcon?: boolean
28 | validators?: any[]
29 |
30 | }
31 |
32 |
33 | interface Items {
34 | id: string
35 | value: string
36 | label?: string
37 | }
38 |
39 | export interface Row{
40 | class?: string
41 | fields: Field[]
42 | }
43 | export interface Section {
44 | title?: string
45 | class?: string
46 | rows?: Row[]
47 | }
48 |
49 | export interface Mask{
50 | prefix?: string
51 | mask?: "phone"|"email"|"money"|"date"
52 | delimiters:[] //['.', '.', '-'],
53 | blocks: [] //[3, 3, 3, 2],
54 | pattern: string
55 | placeholder?: string
56 | suffix?: string
57 | }
58 |
59 | export interface FormOption {
60 | id: string
61 | sections: Section[]
62 | class?: string
63 | store?: any
64 | validateSchema?: any
65 | }
66 |
--------------------------------------------------------------------------------
/src/lib/forms/FeesPayment.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Section,
3 | FormOption,
4 | } from "../form_builder/form_options";
5 |
6 | let sections: Section[] = [
7 |
8 | {
9 | // class: 'inline-block w-40p',
10 | rows: [
11 | {
12 | fields: [
13 | {
14 | id: 'date',
15 | name: 'date',
16 | type: "date",
17 | label: 'Payment Date',
18 | width: 'w-full md:w-25p',
19 | },
20 | {
21 | id: 'type',
22 | name: 'type',
23 | type: "text",
24 | label: 'Fee Type',
25 | width: 'w-full md:w-25p',
26 | items: [{ id: 'school fees', value: 'School Fees' }]
27 | },
28 | {
29 | id: 'bank',
30 | name: 'bank',
31 | type: "text",
32 | label: 'Bank',
33 | width: 'w-full md:w-25p',
34 | },
35 | {
36 | id: 'branch',
37 | name: 'branch',
38 | type: "text",
39 | label: 'Brach',
40 | width: 'w-full md:w-20p',
41 | },
42 | ]
43 | },
44 | {
45 | fields: [
46 | {
47 | id: 'transactionID',
48 | name: 'transactionID',
49 | type: "number",
50 | label: 'Transaction ID',
51 | width: 'w-full md:w-35p',
52 | },
53 | {
54 | id: 'studentID',
55 | name: 'studentID',
56 | label: 'Student ID',
57 | width: 'w-full md:w-40p',
58 | },
59 | {
60 | id: 'amount',
61 | name: 'amount',
62 | label: 'Amount',
63 | width: 'w-45p md:w-20p',
64 | type: "number",
65 | step: 1
66 | },
67 | ]
68 | },
69 | ]
70 | }
71 |
72 | ]
73 |
74 | let formOptions: FormOption = {
75 | id: 'FeesPayment',
76 | sections: sections,
77 | };
78 |
79 | export const options = formOptions
--------------------------------------------------------------------------------
/src/lib/side_nav/MenuList.svelte:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 | {#each Menu as g, h}
11 |
35 | {/each}
36 |
37 |
38 | {#if $MENU_WIDTH === '70'}
39 |
53 | {/if}
54 |
--------------------------------------------------------------------------------
/src/lib/dtp/DatePicker.svelte:
--------------------------------------------------------------------------------
1 |
29 |
30 |
33 |
34 |
{yv}
35 |
36 | {moment(selectedDate, 'DD-MM-YYYY').format('ddd, MMMM Do')}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/lib/side_nav/MenuHeader.svelte:
--------------------------------------------------------------------------------
1 |
21 |
22 |
23 |
64 |
65 |
--------------------------------------------------------------------------------
/src/lib/dtp/DateColumn.svelte:
--------------------------------------------------------------------------------
1 |
79 |
80 |
81 | { event.deltaY > 0 ? increaseValue():
82 | decreaseValue()}}>
83 |
86 |
87 |
setValue(prev)} />
88 |
89 | setValue(next)}/>
90 |
91 |
--------------------------------------------------------------------------------
/src/lib/side_nav/MenuItem.svelte:
--------------------------------------------------------------------------------
1 |
28 |
29 |
76 |
--------------------------------------------------------------------------------
/src/lib/side_nav/SideNav.svelte:
--------------------------------------------------------------------------------
1 |
40 |
41 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
70 |
71 |
72 |
76 |
84 |
85 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/src/lib/input_field/TypeAheadField.svelte:
--------------------------------------------------------------------------------
1 |
53 |
54 |
55 |
56 | {@html SVG('chevron_right', 'w-5 h-5 transform rotate-90 text-cadettblue')}
77 |
78 |
84 | {#if active}
85 | {#each Array(10) as a, i}
86 |
No items
87 | {/each}
88 | {/if}
89 |
90 |
91 |
--------------------------------------------------------------------------------
/src/lib/breadcrumb/Breadcrumb.svelte:
--------------------------------------------------------------------------------
1 |
58 |
59 | {#if paths.length === 0}
60 | {@html SVG('home', 'w-5 h-5 py-3 cursor-pointer inline-flex text-primary')}
61 | {:else}
62 |
63 |
64 |
67 | {paths[paths.length - 1]}
68 |
69 |
70 |
71 | {#each paths as p, i}
72 | {#if i === 0}
73 |
74 |
79 | {@html SVG('home', 'w-5 h-5 cursor-pointer inline-flex text-primary')}
80 |
81 |
82 | {/if}
83 |
84 | {#if i > 0 && i < paths.length}
85 |
86 | {@html SVG('chevrons_right', 'w-4 h-4 inline-flex text-cararra cursor-default')}
87 |
88 | {/if}
89 |
90 |
97 | {#if p !== ''}{titleCase(p)}{/if}
98 |
99 |
100 | {/each}
101 |
102 |
103 | {/if}
104 |
--------------------------------------------------------------------------------
/src/lib/dtp/DateField.svelte:
--------------------------------------------------------------------------------
1 |
12 |
13 |
71 |
72 |
73 |
{active = true; dispatch('focus', {active: true}) }}
85 | class="{defaultInputClass} {active && value !== '' ? `text-${color} border-${color} ` : `${value !== '' ? 'border-primary text-primary' : ' border-gray-400 text-gray-400'}`} {inputClass} "
86 | type="text"
87 | />
88 |
97 | {active ? label : placeholder}
98 |
99 | {#if error !== ''}
100 |
103 | {/if}
104 |
105 | {#if active || hovering }
106 |
107 | hovering = event.detail.hovering }
108 | on:mouse-leave={(event) => hovering = !event.detail.leave}
109 | on:date-selected= {(event) => {
110 | active = false
111 | value = event.detail.date} }/>
112 |
113 | {/if}
114 |
115 |
116 |
117 |
--------------------------------------------------------------------------------
/src/lib/pages/FormOne.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Section,
3 | FormOption,
4 | Row
5 | } from "../form_builder/form_options";
6 |
7 | let sections: Section[] = [
8 |
9 | {
10 | title: 'Academic Information',
11 | // class: 'inline-block w-40p',
12 | rows: [
13 | {
14 | fields: [
15 | {
16 | id: 'appID',
17 | name: 'appID',
18 | label: 'Application ID',
19 | width: 'w-full md:w-45p',
20 | },
21 | {
22 | id: 'examsNo',
23 | name: 'examsNo',
24 | label: 'Exams Number',
25 | width: 'w-full md:w-50p',
26 | }
27 | ]
28 | },
29 | {
30 | fields: [
31 | {
32 | id: 'programme',
33 | name: 'programme',
34 | label: 'Programme',
35 | width: 'w-full md:w-50p',
36 | },
37 | {
38 | id: 'entryLevel',
39 | name: 'entryLevel',
40 | label: 'Entry Level',
41 | width: 'w-45p md:w-20p',
42 | type: "number",
43 | min: 100,
44 | max: 600,
45 | step: 100
46 | },
47 | {
48 | id: 'currentLevel',
49 | name: 'currentLevel',
50 | label: 'Current Level',
51 | width: 'w-45p md:w-20p',
52 | type: "number",
53 | min: 100,
54 | max: 600,
55 | step: 100
56 | }
57 | ]
58 | },
59 | {
60 | fields: [
61 | {
62 | id: 'booksGiven',
63 | name: 'booksGiven',
64 | label: 'Books Given',
65 | width: 'w-100p',
66 | }
67 | ]
68 | }
69 | ]
70 | },
71 | {
72 | title: 'Personal Information',
73 | // class: 'inline-block w-40p',
74 | rows: [
75 | {
76 | fields: [
77 | {
78 | id: 'surname',
79 | name: 'surname',
80 | label: 'Surname',
81 | width: 'w-full md:w-45p',
82 | },
83 | {
84 | id: 'othernames',
85 | name: 'othernames',
86 | label: 'Other Names',
87 | width: 'w-full md:w-50p',
88 | }
89 | ]
90 | },
91 | {
92 | fields: [
93 | {
94 | id: 'dob',
95 | name: 'dob',
96 | label: 'Date of birth',
97 | width: 'w-full md:w-25p',
98 | type: "date"
99 | },
100 | {
101 | id: 'gender',
102 | name: 'gender',
103 | label: 'Gender',
104 | width: 'w-full md:w-25p',
105 | }, {
106 | id: 'qualification',
107 | name: 'qualification',
108 | label: 'Qualification',
109 | width: 'w-full md:w-40p',
110 | }
111 | ]
112 | },
113 |
114 | ]
115 | },
116 | {
117 | title: 'Contact',
118 | // class: 'inline-block w-40p',
119 | rows: [
120 | {
121 | fields: [
122 | {
123 | id: 'phoneNo',
124 | name: 'phoneNo',
125 | label: 'Phone Number',
126 | width: 'w-full md:w-30p',
127 | },
128 | {
129 | id: 'email',
130 | name: 'email',
131 | label: 'Email',
132 | width: 'w-full md:w-30p',
133 | }, {
134 | id: 'address',
135 | name: 'address',
136 | label: 'Address',
137 | width: 'w-full md:w-30p',
138 | }
139 | ]
140 | },
141 | ]
142 | }
143 |
144 | ]
145 |
146 | let formOptions: FormOption = {
147 | id: 'Form1',
148 | sections: sections,
149 | // class : " flex justify-betwen w-full items-start"
150 | };
151 |
152 | export const options = formOptions
--------------------------------------------------------------------------------
/src/lib/pages/student/RegistrationForm.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Section,
3 | FormOption,
4 | } from "../../form_builder/form_options";
5 |
6 | let sections: Section[] = [
7 |
8 | {
9 | title: 'Academic Information',
10 | // class: 'inline-block w-40p',
11 | rows: [
12 | {
13 | fields: [
14 | {
15 | id: 'appID',
16 | name: 'appID',
17 | label: 'Application ID',
18 | width: 'w-full md:w-45p',
19 | },
20 | {
21 | id: 'examsNo',
22 | name: 'examsNo',
23 | label: 'Exams Number',
24 | width: 'w-full md:w-50p',
25 | }
26 | ]
27 | },
28 | {
29 | fields: [
30 | {
31 | id: 'programme',
32 | name: 'programme',
33 | label: 'Programme',
34 | width: 'w-full md:w-50p',
35 | },
36 | {
37 | id: 'entryLevel',
38 | name: 'entryLevel',
39 | label: 'Entry Level',
40 | width: 'w-45p md:w-20p',
41 | type: "number",
42 | min: 100,
43 | max: 600,
44 | step: 100
45 | },
46 | {
47 | id: 'currentLevel',
48 | name: 'currentLevel',
49 | label: 'Current Level',
50 | width: 'w-45p md:w-20p',
51 | type: "number",
52 | min: 100,
53 | max: 600,
54 | step: 100
55 | }
56 | ]
57 | },
58 | {
59 | fields: [
60 | {
61 | id: 'booksGiven',
62 | name: 'booksGiven',
63 | label: 'Books Given',
64 | width: 'w-100p',
65 | }
66 | ]
67 | }
68 | ]
69 | },
70 | {
71 | title: 'Personal Information',
72 | // class: 'inline-block w-40p',
73 | rows: [
74 | {
75 | fields: [
76 | {
77 | id: 'surname',
78 | name: 'surname',
79 | label: 'Surname',
80 | width: 'w-full md:w-45p',
81 | },
82 | {
83 | id: 'othernames',
84 | name: 'othernames',
85 | label: 'Other Names',
86 | width: 'w-full md:w-50p',
87 | }
88 | ]
89 | },
90 | {
91 | fields: [
92 | {
93 | id: 'dob',
94 | name: 'dob',
95 | label: 'Date of birth',
96 | width: 'w-full md:w-25p',
97 | type: "date"
98 | },
99 | {
100 | id: 'gender',
101 | name: 'gender',
102 | label: 'Gender',
103 | width: 'w-full md:w-25p',
104 | }, {
105 | id: 'qualification',
106 | name: 'qualification',
107 | label: 'Qualification',
108 | width: 'w-full md:w-40p',
109 | }
110 | ]
111 | },
112 |
113 | ]
114 | },
115 | {
116 | title: 'Contact',
117 | // class: 'inline-block w-40p',
118 | rows: [
119 | {
120 | fields: [
121 | {
122 | id: 'phoneNo',
123 | name: 'phoneNo',
124 | label: 'Phone Number',
125 | width: 'w-full md:w-30p',
126 | },
127 | {
128 | id: 'email',
129 | name: 'email',
130 | label: 'Email',
131 | width: 'w-full md:w-30p',
132 | }, {
133 | id: 'address',
134 | name: 'address',
135 | label: 'Address',
136 | width: 'w-full md:w-30p',
137 | }
138 | ]
139 | },
140 | ]
141 | }
142 |
143 | ]
144 |
145 | let formOptions: FormOption = {
146 | id: 'Form1',
147 | sections: sections,
148 | // class : " flex justify-betwen w-full items-start"
149 | };
150 |
151 | export const options = formOptions
--------------------------------------------------------------------------------
/src/lib/input_field/DateFormatter.ts:
--------------------------------------------------------------------------------
1 | export let days = [
2 | { s: 'Sun', l: 'Sunday' },
3 | { s: 'Mon', l: "Monday" },
4 | { s: 'Tue', l: 'Tuesday' },
5 | { s: 'Wed', l: 'Wednesday' },
6 | { s: 'Thu', l: 'Thursday' },
7 | { s: 'Fri', l: 'Friday' },
8 | { s: 'Sat', l: 'Saturday' }
9 | ];
10 |
11 | export let months = [
12 | { s: 'Jan', l: 'January' },
13 | { s: 'Feb', l: 'February' },
14 | { s: 'Mar', l: 'March' },
15 | { s: 'Apr', l: 'April' },
16 | { s: 'May', l: 'May' },
17 | { s: 'Jun', l: 'June' },
18 | { s: 'Jul', l: 'July' },
19 | { s: 'Aug', l: 'August' },
20 | { s: 'Sep', l: 'September' },
21 | { s: 'Oct', l: 'October' },
22 | { s: 'Nov', l: 'November' },
23 | { s: 'Dec', l: 'December' },
24 | ];
25 |
26 |
27 |
28 | // Got from StackOverflow....
29 | export function getOrdinal(day = 0) {
30 | let selector;
31 | if (day <= 0) selector = 4;
32 | else if ((day > 3 && day < 21) || day % 10 > 3) selector = 0;
33 | else selector = day % 10;
34 | return ['th', 'st', 'nd', 'rd', ''][selector];
35 | };
36 |
37 | // Gets the full or short name of the day or month or the nth day of the week
38 | function getName(year: number, month: number, day: number, token: string) {
39 | let dayIndex = new Date(year, month, day).getDay()
40 | let monthIndex = new Date(year, month - 1, day).getMonth()
41 | return token === "MMMM" ? months[monthIndex].l :
42 | token === "MMM" ? months[monthIndex].s :
43 | token === "DDDD" ? days[dayIndex].l :
44 | token === "DDD" ? days[dayIndex].s : (dayIndex + 1).toString()
45 | }
46 |
47 | export function formatDate(year: number, month: number, day: number, pattern: string) {
48 | // these are the accepted tokens
49 | let formatTokens = ["dd", "d", "o", "O", "DDDD", "DDD", "DW", "mm", "m", "MMMM", "MMM", "yyyy", "yy"]
50 |
51 | formatTokens.forEach(t => {
52 | switch (t) {
53 | case "dd": // replace with day of the month in 2-digits
54 | pattern = pattern.replace(/[dd]{2}/g, day < 10 ? `0${day}` : `${day}`)
55 | break;
56 | case "d": // replace with day of the month in 1-digit
57 | pattern = pattern.replace(/[d]{1}/g, `${day}`)
58 | break;
59 | case "o": // replace with ordinal day of the month value
60 | pattern = pattern.replace(/[o]{1}/g, getOrdinal(day))
61 | break;
62 | case "DDDD": // replace with the full name of the day of the Week
63 | pattern = pattern.replace(/[DDDD]{4}/g, getName(year, month, day, "DDDD"))
64 | break;
65 | case "DDD": // replace with the short name of the day of the week
66 | pattern = pattern.replace(/[DDD]{3}/g, getName(year, month, day, "DDD"))
67 | break;
68 | case "DW": // replace with the nth day of the the Week
69 | pattern = pattern.replace(/[DW]{2}/g, getName(year, month, day, "DW"))
70 | break;
71 | case "mm": // replace with the month of the year in 2 digits
72 | pattern = pattern.replace(/[mm]{2}/g, month < 10 ? `0${month}` : `${month}`)
73 | break;
74 | case "m": // replace with the month of the year in 2 digits
75 | pattern = pattern.replace(/[m]{1}/g, `${month}`)
76 | break;
77 | case "MMMM": // replace with the full name of the month
78 | pattern = pattern.replace(/[MMMM]{4}/g, getName(year, month, day, "MMMM"))
79 | break;
80 | case "MMM": // replace with the short name of the month
81 | pattern = pattern.replace(/[MMM]{3}/g, getName(year, month, day, "MMM"))
82 |
83 | case "yyyy": // replace with the year in 4 digit
84 | pattern = pattern.replace(/[yyyy]{4}/g, `${year}`)
85 | break;
86 | case "yy": // replace with the yeaar in 2 digits
87 | pattern = pattern.replace(/[yy]{2}/g, `${year.toString().substring(2)}`)
88 | break;
89 | default:
90 | }
91 | })
92 | return pattern
93 | }
94 |
--------------------------------------------------------------------------------
/src/lib/forms/StudentRegistration.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Section,
3 | FormOption,
4 | Row
5 | } from "../form_builder/form_options";
6 |
7 | let sections: Section[] = [
8 |
9 | {
10 | title: 'Academic Information',
11 | // class: 'inline-block w-40p',
12 | rows: [
13 | {
14 | fields: [
15 | {
16 | id: 'appID',
17 | name: 'appID',
18 | label: 'Application ID',
19 | width: 'w-full md:w-45p',
20 | },
21 | {
22 | id: 'examsNo',
23 | name: 'examsNo',
24 | label: 'Exams Number',
25 | width: 'w-full md:w-50p',
26 | }
27 | ]
28 | },
29 | {
30 | fields: [
31 | {
32 | id: 'programme',
33 | name: 'programme',
34 | label: 'Programme',
35 | width: 'w-full md:w-50p',
36 | },
37 | {
38 | id: 'entryLevel',
39 | name: 'entryLevel',
40 | label: 'Entry Level',
41 | width: 'w-45p md:w-20p',
42 | type: "number",
43 | min: 100,
44 | max: 600,
45 | step: 100
46 | },
47 | {
48 | id: 'currentLevel',
49 | name: 'currentLevel',
50 | label: 'Current Level',
51 | width: 'w-45p md:w-20p',
52 | type: "number",
53 | min: 100,
54 | max: 600,
55 | step: 100
56 | }
57 | ]
58 | },
59 | {
60 | fields: [
61 | {
62 | id: 'booksGiven',
63 | name: 'booksGiven',
64 | label: 'Books Given',
65 | width: 'w-100p',
66 | }
67 | ]
68 | }
69 | ]
70 | },
71 | {
72 | title: 'Personal Information',
73 | // class: 'inline-block w-40p',
74 | rows: [
75 | {
76 | fields: [
77 | {
78 | id: 'surname',
79 | name: 'surname',
80 | label: 'Surname',
81 | width: 'w-full md:w-45p',
82 | },
83 | {
84 | id: 'othernames',
85 | name: 'othernames',
86 | label: 'Other Names',
87 | width: 'w-full md:w-50p',
88 | }
89 | ]
90 | },
91 | {
92 | fields: [
93 | {
94 | id: 'dob',
95 | name: 'dob',
96 | label: 'Date of birth',
97 | width: 'w-full md:w-25p',
98 | type: "date"
99 | },
100 | {
101 | id: 'gender',
102 | name: 'gender',
103 | label: 'Gender',
104 | width: 'w-full md:w-25p',
105 | }, {
106 | id: 'qualification',
107 | name: 'qualification',
108 | label: 'Qualification',
109 | width: 'w-full md:w-40p',
110 | }
111 | ]
112 | },
113 |
114 | ]
115 | },
116 | {
117 | title: 'Contact',
118 | // class: 'inline-block w-40p',
119 | rows: [
120 | {
121 | fields: [
122 | {
123 | id: 'phoneNo',
124 | name: 'phoneNo',
125 | label: 'Phone Number',
126 | width: 'w-full md:w-30p',
127 | },
128 | {
129 | id: 'email',
130 | name: 'email',
131 | label: 'Email',
132 | width: 'w-full md:w-30p',
133 | }, {
134 | id: 'address',
135 | name: 'address',
136 | label: 'Address',
137 | width: 'w-full md:w-30p',
138 | }
139 | ]
140 | },
141 | ]
142 | }
143 |
144 | ]
145 |
146 | let formOptions: FormOption = {
147 | id: 'StudentRegistartion',
148 | sections: sections,
149 | // class : " flex justify-betwen w-full items-start"
150 | };
151 |
152 | export const options = formOptions
--------------------------------------------------------------------------------
/src/lib/app_bar/AppBar.svelte:
--------------------------------------------------------------------------------
1 |
12 |
13 |
44 |
45 |
46 |
47 | {#if searching}
48 |
49 |
50 |
51 | {@html SVG('search', 'text-cadetblue w-6 h-6 ')}
52 |
53 |
63 |
64 |
65 |
72 | {@html SVG('close', 'text-cadetblue w-6 h-6 hover:text-primary')}
73 |
74 |
75 |
76 | {:else}
77 |
81 |
82 | {@html SVG('menu', 'text-cadetblue w-6 h-6 hover:text-primary')}
83 |
84 |
85 |
86 | {#each favoriteIcons as icon}
87 |
88 | {@html SVG(icon.name, `text-cadetblue w-6 h-6 hover:text-primary ${icon.classNames}`)}
89 |
90 | {/each}
91 |
92 |
93 |
94 |
95 |
99 |
105 | {@html SVG('search', 'text-cadetblue w-6 h-6 hover:text-primary ')}
106 |
107 |
108 | {@html SVG('bell', 'text-cadetblue w-6 h-6 hover:text-primary ')}
109 |
110 |
111 |
114 | {currentUser}
115 |
116 |
119 | {status}
120 |
121 |
122 |
123 |
124 | {/if}
125 |
126 |
--------------------------------------------------------------------------------
/src/lib/calendar/Calendar.svelte:
--------------------------------------------------------------------------------
1 |
64 |
65 |
66 |
67 | {#if display === 'days'}
68 |
69 |
70 |
71 |
72 | (display = 'months')}"
74 | >
75 | {months[month].l}
76 |
77 | {year}
78 |
79 |
80 |
81 | {@html SVG('chevron_right', 'transform rotate-180 mx-0')}
82 |
83 |
84 | {@html SVG('chevron_right', 'mx-0')}
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | {#each days as day}
94 | |
95 | {/each}
96 |
97 |
98 |
99 |
100 |
101 |
102 | {#each Array(sumOfDays) as d, i}
103 | |
110 | {/each}
111 |
112 |
113 | {:else if display === 'months'}
114 |
115 |
116 | {#each months as m, i}
117 | |
126 | {/each}
127 |
128 |
129 | {:else}
130 |
131 |
132 | {#each Array(20) as day, i}
133 | |
134 | {/each}
135 |
136 |
137 | {/if}
138 |
139 |
--------------------------------------------------------------------------------
/src/lib/side_nav/menu.ts:
--------------------------------------------------------------------------------
1 | import { icon_name } from "src/assets/svgs"
2 | import PageOne from "../pages/PageOne.svelte";
3 | import PageTwo from '../pages/PageTwo.svelte'
4 | import AllStudents from "../pages/students/AllStudents.svelte";
5 | import RegisterStudent from '../pages/students/RegisterStudent.svelte'
6 | import FeesRecords from '../pages/fees/FeesRecords.svelte';
7 |
8 | export interface MenuList {
9 | group: string
10 | routes: Route[]
11 | }
12 |
13 | export interface Param {
14 | param: string
15 | name: string
16 | component: any
17 | }
18 |
19 | export interface Route {
20 | path: string
21 | name: string
22 | icon?: icon_name
23 | title?: string
24 | component?: any
25 | subRoutes?: Route[]
26 | data?: any
27 | params?: Param[]
28 | query?: any
29 | }
30 |
31 | const MenuList: Array = [
32 | {
33 | group: "HOME",
34 | routes: [
35 | {
36 | path: "/",
37 | name: "Dashboard", icon: "activity", component: PageTwo,
38 | title: "View statistics of attendance and overview , events, notifications and issues"
39 | }]
40 | },
41 | {
42 | group: "FINANCIAL",
43 | routes: [
44 | {
45 | path: "/fees",
46 | name: "Fees Records", icon: "circle", component: FeesRecords,
47 | title: "Record installments of fee payment, search reciepts, generate reports",
48 | },
49 | {
50 | path: "/transactions",
51 | name: "Transactions", icon: "circle",
52 | title: "Record expenses and revenue and generate reports",
53 | }
54 |
55 | ]
56 | },
57 | {
58 | group: "INVENTORY",
59 | routes: [
60 | {
61 | path: "/books",
62 | name: "Books", icon: "book",
63 | title: "View, add and record stock of books",
64 | params: [{ param: '/:id/:new?', name: 'New Book,Edit Book,Book Info', component: PageTwo }],
65 | subRoutes: [
66 | {
67 | path: "/issueBooks",
68 | name: "Issue Books", icon: "circle",
69 | title: "Record books given to students"
70 | },
71 | {
72 | path: "/newStock",
73 | name: "New Stock", icon: "circle",
74 | title: "Record books recieved"
75 | }
76 | ]
77 | }
78 | , {
79 | path: "/Past Questions",
80 | name: "Past Questions", icon: "book",
81 | title: "Manage past examination questions",
82 | }
83 | ]
84 | },
85 | {
86 | group: "ACADEMICS",
87 | routes: [
88 | {
89 | path: "/courses",
90 | name: "Courses", icon: "atom",
91 | title: "View, create, manage, assign and schedule courses",
92 | params: [{ param: '/:id/:new?', name: 'New Course,Edit Course,Course Info', component: PageOne }],
93 | }, {
94 | path: "/programmes",
95 | name: "Programmes", icon: "certificate",
96 | title: "View, create and manage programmes",
97 | params: [{ param: '/:id/:new?', name: 'New Programme,Edit Programme,Programme Info', component: PageOne }],
98 | }]
99 | },
100 | {
101 | group: "PEOPLE",
102 | routes: [{
103 | path: "/messages",
104 | name: "Messsages", icon: "message",
105 | title: "Communicate with people, resolve issues and complains, address sugggestions"
106 | },
107 | {
108 | path: "/students",
109 | name: "Students", icon: "student",
110 | title: "View and manage students data", component: AllStudents,
111 | params: [{ param: '/:id/:new?', name: 'Register Student,Edit Student,Student Profile', component: RegisterStudent }]
112 | }, {
113 | path: "/teachers",
114 | name: "Lecturers", icon: "teacher",
115 | title: "View and manage teachers data",
116 | params: [{ param: '/:id/:new?', name: 'New Lecturer,Edit Lecturer,Lecturer Profile', component: PageOne }],
117 | subRoutes: [
118 | {
119 | path: '/manage-schedule',
120 | name: 'Manage Schedule',
121 | }
122 | ]
123 | }, {
124 | path: "/staff",
125 | name: "Staff", icon: "staff",
126 | title: "View and manage staff data",
127 | params: [{ param: '/:id/:new?', name: 'New Lecturer,Edit Lecturer,Lecturer Profile', component: PageOne }],
128 | }]
129 | }, {
130 | group: "SCHEDULE",
131 | routes: [
132 | {
133 | path: "/timetable",
134 | name: "Timetable", icon: "clock",
135 | title: "organise lecturers for the acadaemic year",
136 | }, {
137 | path: "/events",
138 | name: "Events", icon: "calendar",
139 | title: "Create and management events",
140 | params: [{ param: '/:id/:new?', name: 'New Event,Edit Event,Event Details', component: PageOne }],
141 | },
142 | {
143 | path: "/todos",
144 | name: "Todos", icon: "check_square",
145 | title: "Create reminders for important things to be done",
146 | params: [{ param: '/:id/:new?', name: 'New Todo,Edit Todo,View Todos', component: PageOne }]
147 | }]
148 | },
149 | ]
150 |
151 |
152 | export const Menu = MenuList;
--------------------------------------------------------------------------------
/src/lib/chip_input/ChipInput.svelte:
--------------------------------------------------------------------------------
1 |
71 |
72 |
73 |
74 | {#if variant === 'normal'}
75 |
79 | {label}
80 |
81 | {/if}
82 |
86 | {#if startIcon}
87 |
96 |
97 |
98 |
99 |
100 | {/if}
101 | {#if variant !== 'normal'}
102 |
110 | {label}
111 |
112 | {/if}
113 |
114 | {#each items as i}
115 | {i}
116 | {/each}
117 |
148 |
149 |
150 | {#if endIcon}
151 |
160 |
161 |
162 |
163 |
164 | {/if}
165 |
166 | {#if hint !== ''}
167 |
170 | {/if}
171 |
172 |
--------------------------------------------------------------------------------
/src/lib/chip_input/ChipsInput.svelte:
--------------------------------------------------------------------------------
1 |
214 |
215 |
216 |
246 |
247 |
256 | {active ? label : placeholder}
257 |
258 | {#if error !== ''}
259 |
262 | {/if}
263 |
264 |
265 | {#if active && dropOptions.length > 0}
266 |
270 | {#each dropOptions as item, index (item._id)}
271 |
279 | {item.title}
280 |
281 | {/each}
282 |
283 |
284 | {/if}
285 |
286 |
--------------------------------------------------------------------------------
/src/lib/input_field/TextField.svelte:
--------------------------------------------------------------------------------
1 |
233 |
234 |
235 |
242 | {#if variant === 'default'}
243 |
247 | {label}
248 |
249 | {/if}
250 |
251 |
258 |
259 |
260 |
261 | {#if startIcon}
262 |
267 |
268 | {@html SVG('home', 'w-4 h-4')}
269 |
270 |
271 | {/if}
272 |
273 |
274 |
275 |
291 |
292 | {#if variant !== 'default'}
293 |
300 | {label}
301 |
302 | {/if}
303 |
304 |
305 | {#if endIcon || type === 'typeahead' || type === 'date'}
306 |
307 |
308 | {@html SVG('chevron_right', `w-5 h-5 transition duration-300 transform ${dropdown ? 'rotate-90' : '-rotate-90'} `)}
309 |
310 |
311 | {/if}
312 | {#if hint !== ''}
313 |
{hint}
314 | {/if}
315 |
316 |
317 | {#if dropdown}
318 |
327 |
328 | {#if type === 'typeahead'}
329 |
333 | {#each filteredItems as f, i (i)}
334 |
335 |
340 | {f}
341 |
342 |
343 | {/each}
344 |
345 | {:else if type === 'date'}
346 |
347 | {/if}
348 |
349 |
350 | {/if}
351 |
352 |
353 |
354 |
355 |
356 |
362 |
--------------------------------------------------------------------------------