coles-solid-library 0.0.1 → 0.0.8
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/dist/components/Button/Button.d.ts +0 -1
- package/dist/components/Carosel/Carosel.d.ts +12 -2
- package/dist/components/Carosel/Slide.d.ts +7 -0
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chipbar/chipbar.d.ts +7 -3
- package/dist/components/ComponentBody/body.component.d.ts +0 -1
- package/dist/components/FormField/formField.d.ts +0 -1
- package/dist/components/Input/Input.d.ts +0 -1
- package/dist/components/Select/option.component.d.ts +0 -1
- package/dist/components/Select/select.component.d.ts +1 -1
- package/dist/components/Snackbar/snackbar.d.ts +0 -1
- package/dist/components/Tabs/tabs.d.ts +6 -2
- package/dist/components/TextArea/TextArea.d.ts +0 -1
- package/dist/components/expansion/expansion.d.ts +1 -1
- package/dist/components/popup/popup.component.d.ts +5 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.esm.js +746 -254
- package/dist/tools.d.ts +6 -0
- package/package.json +12 -7
- package/readme.md +58 -0
- package/dist/components/Tabs/tab.d.ts +0 -8
- package/dist/index.cjs.js +0 -1866
- package/dist/styles.css +0 -752
package/dist/tools.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Accessor } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* Sets the theme attribute on the document body.
|
|
4
|
+
* - 'dark' or 'light'
|
|
5
|
+
* @param theme - The theme to set. Defaults to 'dark'.
|
|
6
|
+
*/
|
|
7
|
+
export declare function addTheme(theme?: string): void;
|
|
2
8
|
export type AllHTMLElements = HTMLElement | HTMLDivElement | HTMLButtonElement | HTMLAnchorElement | HTMLInputElement | HTMLFormElement | HTMLImageElement | HTMLLabelElement | HTMLSelectElement | HTMLTextAreaElement | HTMLUListElement | HTMLLIElement | HTMLSpanElement | HTMLTableElement | HTMLTableRowElement | HTMLTableCellElement | HTMLTableSectionElement | HTMLTableColElement | HTMLTableCaptionElement | HTMLTableColElement;
|
|
3
9
|
export declare function useClickOutside(ref: Accessor<AllHTMLElements | undefined | null>, handler: (e: MouseEvent) => void): () => void;
|
|
4
10
|
export declare function getMouse(): () => {
|
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coles-solid-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "dist/index.cjs.js",
|
|
6
5
|
"module": "dist/index.esm.js",
|
|
7
6
|
"types": "dist/index.d.ts",
|
|
8
7
|
"files": [
|
|
9
|
-
"dist"
|
|
8
|
+
"dist/styles.css",
|
|
9
|
+
"dist/index.esm.js",
|
|
10
|
+
"dist/index.d.ts",
|
|
11
|
+
"dist/tools.d.ts",
|
|
12
|
+
"dist/components",
|
|
13
|
+
"theme"
|
|
10
14
|
],
|
|
11
15
|
"scripts": {
|
|
12
|
-
"build": "rollup -c"
|
|
16
|
+
"build": "rollup -c --bundleConfigAsCjs"
|
|
13
17
|
},
|
|
14
18
|
"keywords": [],
|
|
15
19
|
"author": "",
|
|
@@ -18,7 +22,8 @@
|
|
|
18
22
|
"solid-js": "^1.8.11"
|
|
19
23
|
},
|
|
20
24
|
"dependencies": {
|
|
21
|
-
"solid-js": "^1.8.11"
|
|
25
|
+
"solid-js": "^1.8.11",
|
|
26
|
+
"sass": "^1.85.1"
|
|
22
27
|
},
|
|
23
28
|
"devDependencies": {
|
|
24
29
|
"@babel/core": "^7.26.9",
|
|
@@ -27,11 +32,11 @@
|
|
|
27
32
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
28
33
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
29
34
|
"@types/node": "^22.13.9",
|
|
35
|
+
"autoprefixer": "^10.4.20",
|
|
30
36
|
"babel": "^6.23.0",
|
|
31
37
|
"babel-preset-solid": "^1.9.5",
|
|
32
38
|
"rollup": "^4.34.9",
|
|
33
|
-
"rollup-plugin-
|
|
34
|
-
"sass": "^1.85.1",
|
|
39
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
35
40
|
"tslib": "^2.8.1",
|
|
36
41
|
"typescript": "^5.8.2"
|
|
37
42
|
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Cole's Solid Library
|
|
2
|
+
|
|
3
|
+
Welcome to Cole's Solid Library, a pre-alpha UI library for Solid.js.
|
|
4
|
+
Probably shouldn't be used isn't ready for use.
|
|
5
|
+
|
|
6
|
+
## Requirements
|
|
7
|
+
You will need the following packages.
|
|
8
|
+
- SolidJS
|
|
9
|
+
- Sass
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
To install the library, use npm or yarn:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install coles-solid-library
|
|
17
|
+
# or
|
|
18
|
+
yarn add coles-solid-library
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Import and add use the following line in App.tsx from the library.
|
|
22
|
+
It defaults to 'dark' but also has a default value of 'light'.
|
|
23
|
+
And updates reactively.
|
|
24
|
+
```ts
|
|
25
|
+
addTheme()
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
At the top of index.scss place the following line.
|
|
29
|
+
```scss
|
|
30
|
+
@use 'coles-solid-library/themes/themes.scss';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
Here's a basic example of how to use the library:
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
import { Button, addTheme } from 'coles-solid-library';
|
|
39
|
+
|
|
40
|
+
function App() {
|
|
41
|
+
addTheme('light');
|
|
42
|
+
return (
|
|
43
|
+
<div>
|
|
44
|
+
<Button />
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default App;
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Contributing
|
|
53
|
+
|
|
54
|
+
We welcome contributions! Please fork the repository and submit a pull request.
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
This project is licensed under the MIT License.
|