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/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.1",
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-scss": "^4.0.1",
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.
@@ -1,8 +0,0 @@
1
- import { JSX, Component, Accessor } from "solid-js";
2
- interface TabProps {
3
- children: JSX.Element;
4
- name: string;
5
- hidden?: Accessor<boolean>;
6
- }
7
- declare const Tab: Component<TabProps>;
8
- export { Tab };