free-astro-components 0.0.9 → 0.0.11

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/README.md CHANGED
@@ -1 +1,47 @@
1
- # Free Astro Components
1
+ # Free Astro Components
2
+
3
+ Welcome to the **Free Astro Components** repository! This project offers a collection of free, open-source components designed to enhance your Astro.js projects.
4
+
5
+ ## Overview
6
+
7
+ Explore and utilize a variety of components that can help you build your web projects faster and more efficiently. Whether you’re a beginner or a seasoned developer, these components are crafted to fit a range of needs and use cases.
8
+
9
+ ## Components
10
+
11
+ ### Available Components
12
+
13
+ - **Icons**
14
+ - A set of customizable icons for various uses.
15
+ - **Buttons**
16
+ - Stylish and functional buttons for your web applications.
17
+ - **Controls**
18
+ - **Checkbox**: A customizable checkbox component.
19
+ - **Radio**: A flexible radio button component.
20
+ - **Switch**: A toggle switch component for user interactions.
21
+
22
+ ## Getting Started
23
+
24
+ 1. **Visit the Website:**
25
+ - [Explore the Collection](https://free-astro-components.vercel.app/)
26
+
27
+ 2. **Installation:**
28
+ - To use these components in your Astro.js project, follow the instructions on the website.
29
+
30
+ 3. **Usage:**
31
+ - Detailed documentation and code examples are available on the website to help you integrate and customize each component.
32
+
33
+ ## Documentation
34
+
35
+ I’m currently working on comprehensive documentation for the components. Please check back soon for detailed guides and information.
36
+
37
+ ## Credits
38
+
39
+ - **Icons Design:** The icons used in this collection are designed by [Ananthanath A](https://nathdesign.in/). Thank you for providing these fantastic resources! You can explore more at [Figma Community File](https://www.figma.com/community/file/1071678557813409125).
40
+
41
+ ## License
42
+
43
+ This project is licensed under the MIT License.
44
+
45
+ ## Contact
46
+
47
+ For any questions or support, please reach out to [dventura017@gmail.com] or open an issue on the [GitHub repository](https://github.com/denv17/free-astro-components.git).
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A collection of free Astro components",
4
4
  "author": "Denis Ventura",
5
5
  "type": "module",
6
- "version": "0.0.9",
6
+ "version": "0.0.11",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": {
@@ -77,6 +77,8 @@ const switchClasses = ['ac-switch', className].filter(Boolean).join(' ')
77
77
  .ac-switch-dot {
78
78
  background-color: rgb(var(--ac-white));
79
79
  border-radius: var(--ac-rounded-full);
80
+ box-shadow: 0 0 var(--ac-spacing-0-5) var(--ac-border)
81
+ rgba(var(--ac-primary), 0.4);
80
82
  height: var(--ac-spacing-5);
81
83
  left: var(--ac-spacing-0-5);
82
84
  pointer-events: none;
@@ -85,8 +87,6 @@ const switchClasses = ['ac-switch', className].filter(Boolean).join(' ')
85
87
  transform: translateY(-50%);
86
88
  transition: all 0.3s ease-in-out;
87
89
  width: var(--ac-spacing-5);
88
- box-shadow: 0 0 var(--ac-spacing-0-5) var(--ac-border)
89
- rgba(var(--ac-primary), 0.25);
90
90
  }
91
91
 
92
92
  .ac-switch-label {
package/src/data/icons.ts CHANGED
@@ -238,5 +238,35 @@ export const icons = [
238
238
  category: 'edit',
239
239
  name: 'delete',
240
240
  path: '<path d="M10 11V17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 11V17" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 7H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 7H12H18V18C18 19.6569 16.6569 21 15 21H9C7.34315 21 6 19.6569 6 18V7Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
241
+ },
242
+ {
243
+ category: 'shapes',
244
+ name: 'ellipse',
245
+ path: '<circle cx="12" cy="12" r="8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
246
+ },
247
+ {
248
+ category: 'shapes',
249
+ name: 'triangle',
250
+ path: '<path d="M3.83827 18.5097L11.1284 5.54947C11.5107 4.86982 12.4893 4.86982 12.8716 5.54947L20.1617 18.5097C20.5367 19.1763 20.055 20 19.2902 20H4.70985C3.94502 20 3.46331 19.1763 3.83827 18.5097Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
251
+ },
252
+ {
253
+ category: 'shapes',
254
+ name: 'square',
255
+ path: '<rect x="4" y="4" width="16" height="16" rx="2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
256
+ },
257
+ {
258
+ category: 'shapes',
259
+ name: 'pentagon',
260
+ path: '<path d="M11.4122 4.42705C11.7627 4.17241 12.2373 4.17241 12.5878 4.42705L19.9717 9.7918C20.3222 10.0464 20.4689 10.4978 20.335 10.9098L17.5146 19.5902C17.3807 20.0022 16.9968 20.2812 16.5635 20.2812H7.43647C7.00325 20.2812 6.61929 20.0022 6.48542 19.5902L3.66501 10.9098C3.53113 10.4978 3.67779 10.0464 4.02828 9.7918L11.4122 4.42705Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
261
+ },
262
+ {
263
+ category: 'shapes',
264
+ name: 'hexagon',
265
+ path: '<path d="M11.5 4.28868C11.8094 4.11004 12.1906 4.11004 12.5 4.28868L18.4282 7.71132C18.7376 7.88996 18.9282 8.22008 18.9282 8.57735V15.4226C18.9282 15.7799 18.7376 16.11 18.4282 16.2887L12.5 19.7113C12.1906 19.89 11.8094 19.89 11.5 19.7113L5.5718 16.2887C5.2624 16.11 5.0718 15.7799 5.0718 15.4226V8.57735C5.0718 8.22008 5.2624 7.88996 5.5718 7.71132L11.5 4.28868Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
266
+ },
267
+ {
268
+ category: 'shapes',
269
+ name: 'star',
270
+ path: '<path d="M11.0489 4.92705C11.3483 4.00574 12.6517 4.00574 12.9511 4.92705L14.2451 8.90983C14.379 9.32185 14.763 9.60081 15.1962 9.60081H19.3839C20.3527 9.60081 20.7554 10.8404 19.9717 11.4098L16.5838 13.8713C16.2333 14.126 16.0866 14.5773 16.2205 14.9894L17.5146 18.9721C17.8139 19.8934 16.7595 20.6596 15.9757 20.0902L12.5878 17.6287C12.2373 17.374 11.7627 17.374 11.4122 17.6287L8.02426 20.0902C7.24054 20.6596 6.18607 19.8934 6.48542 18.9721L7.7795 14.9894C7.91338 14.5773 7.76672 14.126 7.41623 13.8713L4.02827 11.4098C3.24456 10.8404 3.64734 9.60081 4.61606 9.60081H8.8038C9.23703 9.60081 9.62099 9.32185 9.75486 8.90983L11.0489 4.92705Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
241
271
  }
242
- ]
272
+ ]
@@ -0,0 +1,72 @@
1
+ ---
2
+ import Layout from '../layouts/Layout.astro'
3
+ import Checkbox from '../components/Checkbox.astro'
4
+ import Radio from '../components/Radio.astro'
5
+ import Switch from '../components/Switch.astro'
6
+ ---
7
+
8
+ <Layout title="Welcome to Astro.">
9
+ <main class="content">
10
+ <h1>Controls</h1>
11
+
12
+ <div>
13
+ <h2>Checkbox</h2>
14
+ <div>
15
+ <Checkbox label="Checkbox" />
16
+ <br />
17
+ <br />
18
+ <Checkbox label="Checkbox checked" checked />
19
+ <br />
20
+ <br />
21
+ <Checkbox label="Checkbox disabled" disabled />
22
+ <br />
23
+ <br />
24
+ <Checkbox label="Checkbox checked disabled" checked disabled />
25
+ <br />
26
+ <br />
27
+ <Checkbox label="Checkbox error" error />
28
+ </div>
29
+ </div>
30
+ <div>
31
+ <h2>Radiobutton</h2>
32
+ <div>
33
+ <Radio label="Radiobutton" />
34
+ <br />
35
+ <br />
36
+ <Radio label="Radiobutton checked" checked />
37
+ <br />
38
+ <br />
39
+ <Radio label="Radiobutton disabled" disabled />
40
+ <br />
41
+ <br />
42
+ <Radio label="Radiobutton checked disabled" checked disabled />
43
+ <br />
44
+ <br />
45
+ <Radio label="Radiobutton error" error />
46
+ </div>
47
+ </div>
48
+ <div>
49
+ <h2>Switch</h2>
50
+ <div>
51
+ <Switch label="Switch Off" />
52
+ <br />
53
+ <br />
54
+ <Switch label="Switch On" checked />
55
+ <br />
56
+ <br />
57
+ <Switch label="Switch Off disabled" disabled />
58
+ <br />
59
+ <br />
60
+ <Switch label="Switch On disabled" checked disabled />
61
+ </div>
62
+ </div>
63
+ </main>
64
+ </Layout>
65
+
66
+ <style>
67
+ /*@import '../css/preflight.css';*/
68
+
69
+ .content {
70
+ padding: var(--ac-spacing-8);
71
+ }
72
+ </style>
@@ -1,60 +0,0 @@
1
- /** @type {import('tailwindcss').Config} */
2
- export default {
3
- content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
4
- theme: {
5
- colors: {
6
- transparent: 'transparent',
7
- current: 'currentColor',
8
- white: '#FFFFFF',
9
- primary: {
10
- 100: '#73C5FF',
11
- 200: '#3EACFA',
12
- 300: '#0E91EF',
13
- 400: '#0B83D9',
14
- },
15
- secondary: {
16
- 100: '#5865BA',
17
- 200: '#263699',
18
- 300: '#000F73',
19
- 400: '#000C58',
20
- },
21
- tertiary: {
22
- 100: '#FFA96A',
23
- 200: '#FF9040',
24
- 300: '#FF661A',
25
- 400: '#F26C0C',
26
- },
27
- neutral: {
28
- 100: '#F7F8FA',
29
- 200: '#E1E2E6',
30
- 300: '#98A1B3',
31
- 400: '#666E80',
32
- 500: '#17181A',
33
- },
34
- success: {
35
- 100: '#9CF0BD',
36
- 200: '#07D95A',
37
- },
38
- error: {
39
- 100: '#FCA3B2',
40
- 200: '#F8183E',
41
- },
42
- warning: {
43
- 100: '#FFD06E',
44
- 200: '#FFB800',
45
- },
46
- },
47
- fontSize: {
48
- xxs: '0.75rem',
49
- xs: '0.813rem',
50
- sm: '0.875rem',
51
- base: '1rem',
52
- lg: '1.125rem',
53
- xl: '1.25rem',
54
- '2xl': '1.5rem',
55
- '3xl': '2rem',
56
- },
57
- extend: {},
58
- },
59
- plugins: [],
60
- }