@avento-space/ts-ui 1.2.4 → 1.2.5

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,180 +1,180 @@
1
- # Avento TS UI
2
-
3
- **Web Components UI library — framework-agnostic, signal-driven, tree-shakeable.**
4
-
5
- Build reactive UIs with native web components. Works with any framework (React, Vue, Angular, or vanilla JS) or no framework at all.
6
-
7
- ---
8
-
9
- ## Features
10
-
11
- - **50+ production-ready components** — buttons, modals, tables, forms, overlays, and more
12
- - **Shadow DOM** — encapsulated styles, no leaks
13
- - **Signal-based reactivity** — fine-grained updates without virtual DOM
14
- - **Tree-shakeable** — import only what you use
15
- - **Framework-agnostic** — use directly as HTML tags or via React wrappers
16
- - **Accessible** — WAI-ARIA patterns, keyboard navigation, focus management
17
- - **Icon system** — 3000+ SVG icons built in
18
- - **Zero dependencies** — only TypeScript
19
-
20
- ---
21
-
22
- ## Quick Start
23
-
24
- ### Install
25
-
26
- ```bash
27
- npm install @avento-space/ts-ui
28
- ```
29
-
30
- ### Usage (vanilla JS / any framework)
31
-
32
- ```typescript
33
- import { defineComponents } from '@avento-space/ts-ui';
34
-
35
- // Register all components (prefix: u-)
36
- defineComponents();
37
-
38
- // Components are now available as HTML tags
39
- ```
40
-
41
- ```html
42
- <u-button variant="primary">Click me</u-button>
43
- <u-modal title="Hello" open>
44
- <p>Modal content</p>
45
- </u-modal>
46
- ```
47
-
48
- ### Usage with React
49
-
50
- ```tsx
51
- import { defineComponents } from '@avento-space/ts-ui';
52
- import { Button, Modal } from '@avento-space/ts-ui/react';
53
-
54
- defineComponents();
55
-
56
- function App() {
57
- return (
58
- <Button variant="primary" onClick={() => alert('Hi!')}>
59
- Click me
60
- </Button>
61
- );
62
- }
63
- ```
64
-
65
- ---
66
-
67
- ## Components
68
-
69
- | Component | Tag | Description |
70
- |-----------|-----|-------------|
71
- | Accordion | `<u-accordion>` | Collapsible sections |
72
- | Badge | `<u-badge>` | Status indicators, labels |
73
- | Box | `<u-box>` | Semantic layout wrapper |
74
- | Breadcrumb | `<u-breadcrumb>` | Navigation trail |
75
- | Button | `<u-button>` | Primary, secondary, ghost, danger, link |
76
- | Calendar | `<u-calendar>` | Date picker |
77
- | Card | `<u-card>` | Content container with header/footer |
78
- | Checkbox | `<u-checkbox>` | Toggle option |
79
- | Collection | `<u-collection>` | Managed item selection |
80
- | Combobox | `<u-combobox>` | Autocomplete input |
81
- | CommandPalette | `<u-command-palette>` | ⌘K command menu |
82
- | Container | `<u-container>` | Max-width layout wrapper |
83
- | ContextMenu | `<u-context-menu>` | Right-click menu |
84
- | DataTable | `<u-data-table>` | Sortable, filterable table |
85
- | DialogRoot | `<u-dialog-root>` | Dialog base behavior |
86
- | DismissableLayer | `<u-dismissable-layer>` | Click-outside handler |
87
- | Drawer | `<u-drawer>` | Slide-in panel |
88
- | Dropdown | `<u-dropdown>` | Menu button |
89
- | Field | `<u-field>` | Label + input wrapper |
90
- | FocusManager | `<u-focus-manager>` | Keyboard focus orchestration |
91
- | FocusScope | `<u-focus-scope>` | Isolated focus zone |
92
- | FocusTrap | `<u-focus-trap>` | Tab cycle trapping |
93
- | Form | `<u-form>` | Form validation wrapper |
94
- | Grid | `<u-grid>` | CSS Grid layout |
95
- | Hoverable | `<u-hoverable>` | Hover state behavior |
96
- | Input | `<u-input>` | Text input |
97
- | KeyboardNavigation | `<u-keyboard-navigation>` | Arrow key navigation |
98
- | Label | `<u-label>` | Form label |
99
- | Link | `<u-link>` | Styled anchor |
100
- | List | `<u-list>` | Keyed list renderer |
101
- | LiveRegion | `<u-live-region>` | Screen reader announcements |
102
- | Modal | `<u-modal>` | Dialog overlay |
103
- | Overlay | `<u-overlay>` | Backdrop layer |
104
- | Popover | `<u-popover>` | Hover/focus tooltip-like |
105
- | Popper | `<u-popper>` | Positioning utility |
106
- | Portal | `<u-portal>` | Teleport to another node |
107
- | Presence | `<u-presence>` | Mount/unmount animation |
108
- | Pressable | `<u-pressable>` | Press interaction behavior |
109
- | RadioGroup | `<u-radio-group>` | Radio button group |
110
- | RouterView | `<u-router-view>` | Router outlet |
111
- | Select | `<u-select>` | Native select replacement |
112
- | Slot | `<u-slot>` | Named slot content |
113
- | Sortable | `<u-sortable>` | Drag-to-reorder list |
114
- | Spacer | `<u-spacer>` | Flex spacing utility |
115
- | Stack / HStack | `<u-stack>` / `<u-hstack>` | Flexbox layouts |
116
- | Switch | `<u-switch>` | Toggle control |
117
- | Table | `<u-table>` | Data table |
118
- | Tabs | `<u-tabs>` | Tabbed interface |
119
- | Text | `<u-text>` | Typography with size/weight/color |
120
- | Textarea | `<u-textarea>` | Multi-line input |
121
- | Toast | `<u-toast>` | Notification popup |
122
- | TooltipRoot | `<u-tooltip-root>` | Hover tooltip |
123
- | Transition | `<u-transition>` | CSS transition behavior |
124
- | Tree | `<u-tree>` | Hierarchical list |
125
- | VisuallyHidden | `<u-visually-hidden>` | Screen reader-only content |
126
- | Icon | `<u-icon>` | 3000+ SVG icons |
127
-
128
- ---
129
-
130
- ## Styling
131
-
132
- Components use **Shadow DOM**, so global CSS (Tailwind, modules, etc.) cannot style internal elements. Use **CSS custom properties** for design tokens and **`::part()` selectors** for targeting specific internal elements.
133
-
134
- > 📖 **Full documentation:** [`docs/theming.md`](./docs/theming.md) — includes the complete token table, stacking/z-index guide, React patterns, migration notes, and the optional [Tailwind plugin](docs/theming.md#7-optional-tailwind-plugin) for autocomplete-friendly `--u-*` utilities.
135
-
136
- ```css
137
- /* Token override — affects all components */
138
- :root { --u-color-primary: #7c3aed; }
139
-
140
- /* Part selector — styles the internal <button> */
141
- u-button::part(button) { font-weight: 700; text-transform: uppercase; }
142
- ```
143
-
144
- ---
145
-
146
- ## React Wrappers
147
-
148
- ```tsx
149
- import { Button, Modal, Tabs, Text, Badge, Card } from '@avento-space/ts-ui/react';
150
- ```
151
-
152
- Each web component has a React wrapper that forwards props and refs.
153
-
154
- ---
155
-
156
- ## Icons
157
-
158
- ```html
159
- <u-icon name="heart"></u-icon>
160
- <u-icon name="settings" size="32" stroke-width="1.5"></u-icon>
161
- ```
162
-
163
- 3000+ icons available. See the icon registry for all names.
164
-
165
- ---
166
-
167
- ## Scripts
168
-
169
- | Command | Description |
170
- |---------|-------------|
171
- | `npm run build` | Build with tsup (ESM + .d.ts) |
172
- | `npm test` | Run vitest |
173
- | `npm run typecheck` | TypeScript check |
174
- | `npm run lint` | ESLint |
175
-
176
- ---
177
-
178
- ## License
179
-
180
- MIT
1
+ # Avento TS UI
2
+
3
+ **Web Components UI library — framework-agnostic, signal-driven, tree-shakeable.**
4
+
5
+ Build reactive UIs with native web components. Works with any framework (React, Vue, Angular, or vanilla JS) or no framework at all.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - **50+ production-ready components** — buttons, modals, tables, forms, overlays, and more
12
+ - **Shadow DOM** — encapsulated styles, no leaks
13
+ - **Signal-based reactivity** — fine-grained updates without virtual DOM
14
+ - **Tree-shakeable** — import only what you use
15
+ - **Framework-agnostic** — use directly as HTML tags or via React wrappers
16
+ - **Accessible** — WAI-ARIA patterns, keyboard navigation, focus management
17
+ - **Icon system** — 3000+ SVG icons built in
18
+ - **Zero dependencies** — only TypeScript
19
+
20
+ ---
21
+
22
+ ## Quick Start
23
+
24
+ ### Install
25
+
26
+ ```bash
27
+ npm install @avento-space/ts-ui
28
+ ```
29
+
30
+ ### Usage (vanilla JS / any framework)
31
+
32
+ ```typescript
33
+ import { defineComponents } from '@avento-space/ts-ui';
34
+
35
+ // Register all components (prefix: u-)
36
+ defineComponents();
37
+
38
+ // Components are now available as HTML tags
39
+ ```
40
+
41
+ ```html
42
+ <u-button variant="primary">Click me</u-button>
43
+ <u-modal title="Hello" open>
44
+ <p>Modal content</p>
45
+ </u-modal>
46
+ ```
47
+
48
+ ### Usage with React
49
+
50
+ ```tsx
51
+ import { defineComponents } from '@avento-space/ts-ui';
52
+ import { Button, Modal } from '@avento-space/ts-ui/react';
53
+
54
+ defineComponents();
55
+
56
+ function App() {
57
+ return (
58
+ <Button variant="primary" onClick={() => alert('Hi!')}>
59
+ Click me
60
+ </Button>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Components
68
+
69
+ | Component | Tag | Description |
70
+ |-----------|-----|-------------|
71
+ | Accordion | `<u-accordion>` | Collapsible sections |
72
+ | Badge | `<u-badge>` | Status indicators, labels |
73
+ | Box | `<u-box>` | Semantic layout wrapper |
74
+ | Breadcrumb | `<u-breadcrumb>` | Navigation trail |
75
+ | Button | `<u-button>` | Primary, secondary, ghost, danger, link |
76
+ | Calendar | `<u-calendar>` | Date picker |
77
+ | Card | `<u-card>` | Content container with header/footer |
78
+ | Checkbox | `<u-checkbox>` | Toggle option |
79
+ | Collection | `<u-collection>` | Managed item selection |
80
+ | Combobox | `<u-combobox>` | Autocomplete input |
81
+ | CommandPalette | `<u-command-palette>` | ⌘K command menu |
82
+ | Container | `<u-container>` | Max-width layout wrapper |
83
+ | ContextMenu | `<u-context-menu>` | Right-click menu |
84
+ | DataTable | `<u-data-table>` | Sortable, filterable table |
85
+ | DialogRoot | `<u-dialog-root>` | Dialog base behavior |
86
+ | DismissableLayer | `<u-dismissable-layer>` | Click-outside handler |
87
+ | Drawer | `<u-drawer>` | Slide-in panel |
88
+ | Dropdown | `<u-dropdown>` | Menu button |
89
+ | Field | `<u-field>` | Label + input wrapper |
90
+ | FocusManager | `<u-focus-manager>` | Keyboard focus orchestration |
91
+ | FocusScope | `<u-focus-scope>` | Isolated focus zone |
92
+ | FocusTrap | `<u-focus-trap>` | Tab cycle trapping |
93
+ | Form | `<u-form>` | Form validation wrapper |
94
+ | Grid | `<u-grid>` | CSS Grid layout |
95
+ | Hoverable | `<u-hoverable>` | Hover state behavior |
96
+ | Input | `<u-input>` | Text input |
97
+ | KeyboardNavigation | `<u-keyboard-navigation>` | Arrow key navigation |
98
+ | Label | `<u-label>` | Form label |
99
+ | Link | `<u-link>` | Styled anchor |
100
+ | List | `<u-list>` | Keyed list renderer |
101
+ | LiveRegion | `<u-live-region>` | Screen reader announcements |
102
+ | Modal | `<u-modal>` | Dialog overlay |
103
+ | Overlay | `<u-overlay>` | Backdrop layer |
104
+ | Popover | `<u-popover>` | Hover/focus tooltip-like |
105
+ | Popper | `<u-popper>` | Positioning utility |
106
+ | Portal | `<u-portal>` | Teleport to another node |
107
+ | Presence | `<u-presence>` | Mount/unmount animation |
108
+ | Pressable | `<u-pressable>` | Press interaction behavior |
109
+ | RadioGroup | `<u-radio-group>` | Radio button group |
110
+ | RouterView | `<u-router-view>` | Router outlet |
111
+ | Select | `<u-select>` | Native select replacement |
112
+ | Slot | `<u-slot>` | Named slot content |
113
+ | Sortable | `<u-sortable>` | Drag-to-reorder list |
114
+ | Spacer | `<u-spacer>` | Flex spacing utility |
115
+ | Stack / HStack | `<u-stack>` / `<u-hstack>` | Flexbox layouts |
116
+ | Switch | `<u-switch>` | Toggle control |
117
+ | Table | `<u-table>` | Data table |
118
+ | Tabs | `<u-tabs>` | Tabbed interface |
119
+ | Text | `<u-text>` | Typography with size/weight/color |
120
+ | Textarea | `<u-textarea>` | Multi-line input |
121
+ | Toast | `<u-toast>` | Notification popup |
122
+ | TooltipRoot | `<u-tooltip-root>` | Hover tooltip |
123
+ | Transition | `<u-transition>` | CSS transition behavior |
124
+ | Tree | `<u-tree>` | Hierarchical list |
125
+ | VisuallyHidden | `<u-visually-hidden>` | Screen reader-only content |
126
+ | Icon | `<u-icon>` | 3000+ SVG icons |
127
+
128
+ ---
129
+
130
+ ## Styling
131
+
132
+ Components use **Shadow DOM**, so global CSS (Tailwind, modules, etc.) cannot style internal elements. Use **CSS custom properties** for design tokens and **`::part()` selectors** for targeting specific internal elements.
133
+
134
+ > 📖 **Full documentation:** [`docs/theming.md`](./docs/theming.md) — includes the complete token table, stacking/z-index guide, React patterns, migration notes, and the optional [Tailwind plugin](docs/theming.md#7-optional-tailwind-plugin) for autocomplete-friendly `--u-*` utilities.
135
+
136
+ ```css
137
+ /* Token override — affects all components */
138
+ :root { --u-color-primary: #7c3aed; }
139
+
140
+ /* Part selector — styles the internal <button> */
141
+ u-button::part(button) { font-weight: 700; text-transform: uppercase; }
142
+ ```
143
+
144
+ ---
145
+
146
+ ## React Wrappers
147
+
148
+ ```tsx
149
+ import { Button, Modal, Tabs, Text, Badge, Card } from '@avento-space/ts-ui/react';
150
+ ```
151
+
152
+ Each web component has a React wrapper that forwards props and refs.
153
+
154
+ ---
155
+
156
+ ## Icons
157
+
158
+ ```html
159
+ <u-icon name="heart"></u-icon>
160
+ <u-icon name="settings" size="32" stroke-width="1.5"></u-icon>
161
+ ```
162
+
163
+ 3000+ icons available. See the icon registry for all names.
164
+
165
+ ---
166
+
167
+ ## Scripts
168
+
169
+ | Command | Description |
170
+ |---------|-------------|
171
+ | `npm run build` | Build with tsup (ESM + .d.ts) |
172
+ | `npm test` | Run vitest |
173
+ | `npm run typecheck` | TypeScript check |
174
+ | `npm run lint` | ESLint |
175
+
176
+ ---
177
+
178
+ ## License
179
+
180
+ MIT
@@ -1,4 +1,4 @@
1
- import { UElement, buttonStyles, inputStyles, boxStyles, listStyles, textStyles, stackStyles, gridStyles, overlayStyles, fieldStyles, checkboxStyles, selectStyles, linkStyles, containerStyles, dialogStyles, tooltipStyles, textareaStyles, radioStyles, switchStyles, labelStyles, treeStyles, tableStyles, breadcrumbStyles, tabsStyles, visuallyHiddenStyles, presenceStyles, animateKeyframes, modalStyles, drawerStyles, popoverStyles, dropdownStyles, accordionStyles, comboboxStyles, calendarStyles, dataTableStyles, commandPaletteStyles, toastStyles, contextMenuStyles, sortableStyles, formStyles, badgeStyles, cardStyles } from './chunk-AOFVLHAJ.js';
1
+ import { UElement, buttonStyles, inputStyles, boxStyles, listStyles, textStyles, stackStyles, gridStyles, overlayStyles, fieldStyles, checkboxStyles, selectStyles, linkStyles, containerStyles, dialogStyles, tooltipStyles, textareaStyles, radioStyles, switchStyles, labelStyles, treeStyles, tableStyles, breadcrumbStyles, tabsStyles, visuallyHiddenStyles, presenceStyles, animateKeyframes, modalStyles, drawerStyles, popoverStyles, dropdownStyles, accordionStyles, comboboxStyles, calendarStyles, dataTableStyles, commandPaletteStyles, toastStyles, contextMenuStyles, sortableStyles, formStyles, badgeStyles, cardStyles } from './chunk-6Y6GA2QS.js';
2
2
  import { signal, effect } from './chunk-Q5RCPPCF.js';
3
3
 
4
4
  // src/components/button.wc.ts
@@ -6205,5 +6205,5 @@ var UCard = class extends UElement {
6205
6205
  };
6206
6206
 
6207
6207
  export { UAccordion, UAccordionItem, UAnimate, UBadge, UBox, UBreadcrumb, UButton, UCalendar, UCard, UCheckbox, UCollection, UCombobox, UCommandPalette, UContainer, UContextMenu, UDataTable, UDialogRoot, UDismissableLayer, UDrawer, UDropdown, UField, UFocusManager, UFocusScope, UFocusTrap, UForm, UGrid, UHStack, UHoverable, UInput, UKeyboardNavigation, ULabel, ULink, UList, ULiveRegion, UModal, UOverlay, UPopover, UPopper, UPortal, UPresence, UPressable, URadio, URadioGroup, URouterView, USelect, USlot, USortable, USpacer, UStack, USwitch, UTable, UTabs, UText, UTextarea, UToast, UTooltipRoot, UTransition, UTree, UVirtualList, UVisuallyHidden, createControlledInput, setPortalRoot };
6208
- //# sourceMappingURL=chunk-2JEFDU25.js.map
6209
- //# sourceMappingURL=chunk-2JEFDU25.js.map
6208
+ //# sourceMappingURL=chunk-47AXL5HN.js.map
6209
+ //# sourceMappingURL=chunk-47AXL5HN.js.map