Comments (7)
Thanks for the input @brandiqa!
We've made online playground demo Preline UI + QWIK here: https://stackblitz.com/edit/preline-qwik?file=tailwind.config.js
Step by step Framework Guides will be available soon with the next update.
Cheers!
Jaha
from preline.
Hey folks,
We've just shipped v1.9.0 update with Framework Guides for Qwik here. Thanks a lot @brandiqa for the request and sharing your work around solutions.
Cheers!
from preline.
I've realized PartyTown is not applicable in this context since preline.js
is a first party script required for the functioning of the web app, hence I've updated the proposal.
I would also suggest having typescript support. Can discuss that on a separate thread
from preline.
In QWIK @types/preline is required to run properly.
from preline.
In QWIK @types/preline is required to run properly.
Couldn't find the package or code for @types/preline
. Kindly clarify what you mean?
from preline.
In regards to TypeScript support, I've come up with a workaround.
I've created the file src/types/preline/index.d.ts
within my Qwik project with the following code:
export {};
declare global {
interface Window {
HSAccordion: {
show(accordionEL: HTMLElement): void;
hide(accordionEL: HTMLElement): void;
};
HSCollapse: {
toggle(collapseEL: HTMLElement): void;
show(collapseEL: HTMLElement): void;
hide(collapseEL: HTMLElement): void;
};
HSDropdown: {
open(dropdownEl: HTMLElement): void;
close(dropdownEl: HTMLElement, noAnimation: boolean): void;
toggle(dropdownEl: HTMLElement): void;
};
HSOverlay: {
toggle(overlayEL: HTMLElement): void;
open(overlayEL: HTMLElement): void;
close(overlayEL: HTMLElement): Promise;
};
HSTabs: {
open(tabToggleEL: HTMLElement): void;
};
HSTooltip: {
show(tooltipEL: HTMLElement): void;
hide(tooltipEL: HTMLElement): void;
};
}
}
Then I've updated tsconfig.json
to include the above defintion:
{
"compilerOptions": {
"allowJs": true,
"target": "ES2017",
"module": "ES2022",
"lib": ["es2022", "DOM", "WebWorker", "DOM.Iterable"],
"jsx": "react-jsx",
"jsxImportSource": "@builder.io/qwik",
"strict": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"incremental": true,
"isolatedModules": true,
"outDir": "tmp",
"noEmit": true,
"types": ["node", "vite/client", "./src/types/preline"],
"paths": {
"~/*": ["./src/*"]
}
},
"files": ["./.eslintrc.cjs"],
"include": ["src", "./*.d.ts"]
}
VSCode Eslint plugin no longer throws warnings when programmatically calling HS functions. Below is an example of how I've used it in Qwik:
export const closeSidebar = () => {
const sidebarEl = document.getElementById("application-sidebar");
if (sidebarEl) window.HSOverlay.close(sidebarEl);
};
from preline.
There's a typo in the description:
"Qwick is an instant-loading framework with minimal overhead"
from preline.
Related Issues (20)
- Initialize preline JS components in a page displayed with ajax HOT 3
- Unable to work with SSR on Laravel - Inertia.js HOT 1
- 3-grids with an Overlay Card Link Being Cut off from overflow-hidden HOT 2
- Dropdown plugin doesn't work HOT 5
- ReferenceError: HSPinInput is not defined HOT 4
- Is the Svelte setup guide still correct? HOT 1
- Uncaught TypeError: Cannot read properties of undefined (reading ) at preline_overlay.js?v=94156e5f:130 HOT 2
- Uncaught TypeError: Cannot read properties of undefined (reading 'push') HOT 4
- All input forms in sign up modal component do not have border HOT 3
- [feature] Tag editor HOT 4
- Advanced Select and removing items HOT 1
- HSTabs.getInstance not working : Cannot read properties of null (reading 'on') HOT 4
- Modal focus trap multiple key event listeners. HOT 1
- Preline with Laravel and Livewire not working HOT 3
- Cannot find module 'preline/preline' or its corresponding type declarations. (Nextjs) HOT 3
- AdvancedSelect data-hs-select -- how to detect change/ input? HOT 4
- Stacked Overlays issue on Example page HOT 2
- Initialization Event Listener Timing HOT 3
- Cannot read properties of undefined (reading 'autoInit') HOT 11
- Add and edit form with same select field id causing problem. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preline.