@als-tp/als-react-ts-ui 0.1.0
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/LICENSE +21 -0
- package/README.md +172 -0
- package/dist/als-react-ts-ui.cjs +21 -0
- package/dist/als-react-ts-ui.cjs.map +1 -0
- package/dist/als-react-ts-ui.css +1 -0
- package/dist/als-react-ts-ui.js +11369 -0
- package/dist/als-react-ts-ui.js.map +1 -0
- package/dist/components/ALSAccordion/index.d.ts +67 -0
- package/dist/components/ALSAccordion/index.d.ts.map +1 -0
- package/dist/components/ALSAlertDialog/index.d.ts +5 -0
- package/dist/components/ALSAlertDialog/index.d.ts.map +1 -0
- package/dist/components/ALSAutocomplete/index.d.ts +5 -0
- package/dist/components/ALSAutocomplete/index.d.ts.map +1 -0
- package/dist/components/ALSAvatar/index.d.ts +5 -0
- package/dist/components/ALSAvatar/index.d.ts.map +1 -0
- package/dist/components/ALSButton/index.d.ts +14 -0
- package/dist/components/ALSButton/index.d.ts.map +1 -0
- package/dist/components/ALSCheckbox/index.d.ts +5 -0
- package/dist/components/ALSCheckbox/index.d.ts.map +1 -0
- package/dist/components/ALSCheckboxGroup/index.d.ts +5 -0
- package/dist/components/ALSCheckboxGroup/index.d.ts.map +1 -0
- package/dist/components/ALSCollapsible/index.d.ts +5 -0
- package/dist/components/ALSCollapsible/index.d.ts.map +1 -0
- package/dist/components/ALSCombobox/index.d.ts +5 -0
- package/dist/components/ALSCombobox/index.d.ts.map +1 -0
- package/dist/components/ALSContextMenu/index.d.ts +5 -0
- package/dist/components/ALSContextMenu/index.d.ts.map +1 -0
- package/dist/components/ALSDialog/index.d.ts +79 -0
- package/dist/components/ALSDialog/index.d.ts.map +1 -0
- package/dist/components/ALSField/index.d.ts +5 -0
- package/dist/components/ALSField/index.d.ts.map +1 -0
- package/dist/components/ALSFieldset/index.d.ts +5 -0
- package/dist/components/ALSFieldset/index.d.ts.map +1 -0
- package/dist/components/ALSForm/index.d.ts +5 -0
- package/dist/components/ALSForm/index.d.ts.map +1 -0
- package/dist/components/ALSInput/index.d.ts +51 -0
- package/dist/components/ALSInput/index.d.ts.map +1 -0
- package/dist/components/ALSMenu/index.d.ts +5 -0
- package/dist/components/ALSMenu/index.d.ts.map +1 -0
- package/dist/components/ALSMenubar/index.d.ts +5 -0
- package/dist/components/ALSMenubar/index.d.ts.map +1 -0
- package/dist/components/ALSMeter/index.d.ts +5 -0
- package/dist/components/ALSMeter/index.d.ts.map +1 -0
- package/dist/components/ALSNavigationMenu/index.d.ts +5 -0
- package/dist/components/ALSNavigationMenu/index.d.ts.map +1 -0
- package/dist/components/ALSNumberField/index.d.ts +5 -0
- package/dist/components/ALSNumberField/index.d.ts.map +1 -0
- package/dist/components/ALSPopover/index.d.ts +50 -0
- package/dist/components/ALSPopover/index.d.ts.map +1 -0
- package/dist/components/ALSPreviewCard/index.d.ts +5 -0
- package/dist/components/ALSPreviewCard/index.d.ts.map +1 -0
- package/dist/components/ALSProgress/index.d.ts +5 -0
- package/dist/components/ALSProgress/index.d.ts.map +1 -0
- package/dist/components/ALSRadio/index.d.ts +5 -0
- package/dist/components/ALSRadio/index.d.ts.map +1 -0
- package/dist/components/ALSScrollArea/index.d.ts +5 -0
- package/dist/components/ALSScrollArea/index.d.ts.map +1 -0
- package/dist/components/ALSSelect/index.d.ts +41 -0
- package/dist/components/ALSSelect/index.d.ts.map +1 -0
- package/dist/components/ALSSeparator/index.d.ts +5 -0
- package/dist/components/ALSSeparator/index.d.ts.map +1 -0
- package/dist/components/ALSSlider/index.d.ts +5 -0
- package/dist/components/ALSSlider/index.d.ts.map +1 -0
- package/dist/components/ALSSwitch/index.d.ts +5 -0
- package/dist/components/ALSSwitch/index.d.ts.map +1 -0
- package/dist/components/ALSTabs/index.d.ts +5 -0
- package/dist/components/ALSTabs/index.d.ts.map +1 -0
- package/dist/components/ALSToast/index.d.ts +94 -0
- package/dist/components/ALSToast/index.d.ts.map +1 -0
- package/dist/components/ALSToggle/index.d.ts +5 -0
- package/dist/components/ALSToggle/index.d.ts.map +1 -0
- package/dist/components/ALSToggleGroup/index.d.ts +5 -0
- package/dist/components/ALSToggleGroup/index.d.ts.map +1 -0
- package/dist/components/ALSToolbar/index.d.ts +5 -0
- package/dist/components/ALSToolbar/index.d.ts.map +1 -0
- package/dist/components/ALSTooltip/index.d.ts +5 -0
- package/dist/components/ALSTooltip/index.d.ts.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/layout/MainLayout/index.d.ts +68 -0
- package/dist/layout/MainLayout/index.d.ts.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +89 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ALS TP
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# @als-tp/als-react-ts-ui
|
|
2
|
+
|
|
3
|
+
A comprehensive React TypeScript UI component library built on top of [Base UI](https://base-ui.com/), providing 35+ accessible, customizable components with full TypeScript support.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 **35+ Components**: Comprehensive set of UI components
|
|
8
|
+
- 💪 **TypeScript First**: Full type safety and IntelliSense support
|
|
9
|
+
- ♿ **Accessible**: Built on Base UI with ARIA compliance
|
|
10
|
+
- 🎭 **Customizable**: CSS Modules with CSS variables for theming
|
|
11
|
+
- 📦 **Tree-shakeable**: Import only what you need
|
|
12
|
+
- 🔧 **Modern Stack**: React 19, TypeScript 5.9, Vite 7
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# npm
|
|
18
|
+
npm install @als-tp/als-react-ts-ui
|
|
19
|
+
|
|
20
|
+
# pnpm
|
|
21
|
+
pnpm add @als-tp/als-react-ts-ui
|
|
22
|
+
|
|
23
|
+
# yarn
|
|
24
|
+
yarn add @als-tp/als-react-ts-ui
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Peer Dependencies
|
|
28
|
+
|
|
29
|
+
This library requires the following peer dependencies:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install react@^19.0.0 react-dom@^19.0.0 @base-ui-components/react@^1.0.0-beta.7
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
### Import Styles
|
|
38
|
+
|
|
39
|
+
First, import the CSS in your application entry point:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import '@als-tp/als-react-ts-ui/styles';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Import Components
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
import { ALSButton, ALSDialog, ALSInput } from '@als-tp/als-react-ts-ui';
|
|
49
|
+
|
|
50
|
+
function App() {
|
|
51
|
+
return (
|
|
52
|
+
<div>
|
|
53
|
+
<ALSButton variant="primary" size="md">
|
|
54
|
+
Click me
|
|
55
|
+
</ALSButton>
|
|
56
|
+
|
|
57
|
+
<ALSInput placeholder="Enter text..." />
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### TypeScript Support
|
|
64
|
+
|
|
65
|
+
All components are fully typed. TypeScript will provide autocomplete and type checking:
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import type { ALSButtonProps } from '@als-tp/als-react-ts-ui';
|
|
69
|
+
|
|
70
|
+
const buttonProps: ALSButtonProps = {
|
|
71
|
+
variant: 'primary',
|
|
72
|
+
size: 'lg',
|
|
73
|
+
onClick: () => console.log('clicked')
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Available Components
|
|
78
|
+
|
|
79
|
+
### Form Components
|
|
80
|
+
- `ALSButton` - Versatile button with variants and sizes
|
|
81
|
+
- `ALSInput` - Text input field
|
|
82
|
+
- `ALSCheckbox` - Checkbox with label
|
|
83
|
+
- `ALSCheckboxGroup` - Group of checkboxes
|
|
84
|
+
- `ALSRadio` - Radio button
|
|
85
|
+
- `ALSSwitch` - Toggle switch
|
|
86
|
+
- `ALSSelect` - Dropdown select
|
|
87
|
+
- `ALSCombobox` - Autocomplete combobox
|
|
88
|
+
- `ALSAutocomplete` - Autocomplete input
|
|
89
|
+
- `ALSNumberField` - Numeric input
|
|
90
|
+
- `ALSSlider` - Range slider
|
|
91
|
+
- `ALSField` - Form field wrapper
|
|
92
|
+
- `ALSFieldset` - Form fieldset
|
|
93
|
+
- `ALSForm` - Form container
|
|
94
|
+
|
|
95
|
+
### Layout Components
|
|
96
|
+
- `MainLayout` - Main application layout
|
|
97
|
+
- `ALSSeparator` - Visual separator
|
|
98
|
+
- `ALSScrollArea` - Scrollable container
|
|
99
|
+
- `ALSTabs` - Tab navigation
|
|
100
|
+
- `ALSToolbar` - Toolbar container
|
|
101
|
+
|
|
102
|
+
### Overlay Components
|
|
103
|
+
- `ALSDialog` - Modal dialog
|
|
104
|
+
- `ALSAlertDialog` - Alert/confirmation dialog
|
|
105
|
+
- `ALSPopover` - Popover overlay
|
|
106
|
+
- `ALSTooltip` - Tooltip
|
|
107
|
+
- `ALSMenu` - Dropdown menu
|
|
108
|
+
- `ALSContextMenu` - Context menu
|
|
109
|
+
- `ALSMenubar` - Menu bar
|
|
110
|
+
- `ALSNavigationMenu` - Navigation menu
|
|
111
|
+
|
|
112
|
+
### Feedback Components
|
|
113
|
+
- `ALSToast` - Toast notifications
|
|
114
|
+
- `ALSProgress` - Progress indicator
|
|
115
|
+
- `ALSMeter` - Meter/gauge
|
|
116
|
+
|
|
117
|
+
### Content Components
|
|
118
|
+
- `ALSAccordion` - Expandable accordion
|
|
119
|
+
- `ALSCollapsible` - Collapsible content
|
|
120
|
+
- `ALSAvatar` - User avatar
|
|
121
|
+
- `ALSPreviewCard` - Preview card
|
|
122
|
+
|
|
123
|
+
### Interactive Components
|
|
124
|
+
- `ALSToggle` - Toggle button
|
|
125
|
+
- `ALSToggleGroup` - Toggle button group
|
|
126
|
+
|
|
127
|
+
## Customization
|
|
128
|
+
|
|
129
|
+
The library uses CSS variables for theming. You can override these in your global CSS:
|
|
130
|
+
|
|
131
|
+
```css
|
|
132
|
+
:root {
|
|
133
|
+
--primary-color: #your-color;
|
|
134
|
+
--secondary-color: #your-color;
|
|
135
|
+
/* ... other variables */
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Development
|
|
140
|
+
|
|
141
|
+
### Building the Library
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
pnpm run build:lib
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Running Storybook
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
pnpm run storybook
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Running Tests
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
pnpm test
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Contributing
|
|
160
|
+
|
|
161
|
+
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT © ALS TP
|
|
166
|
+
|
|
167
|
+
## Links
|
|
168
|
+
|
|
169
|
+
- [GitHub Repository](https://github.com/als-tp/als-react-ts-ui)
|
|
170
|
+
- [Issue Tracker](https://github.com/als-tp/als-react-ts-ui/issues)
|
|
171
|
+
- [Base UI Documentation](https://base-ui.com/)
|
|
172
|
+
|