@iyulab/components 1.1.1 → 1.2.1
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/CHANGELOG.md +16 -0
- package/README.md +17 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.137.0 → _@oxc-project_runtime@0.138.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.137.0 → _@oxc-project_runtime@0.138.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/components/UFloatingElement.js +2 -2
- package/dist/components/UFormControlElement.js +2 -2
- package/dist/components/UOverlayElement.js +2 -2
- package/dist/components/alert/UAlert.js +2 -2
- package/dist/components/avatar/UAvatar.js +2 -2
- package/dist/components/badge/UBadge.js +2 -2
- package/dist/components/breadcrumb/UBreadcrumb.js +1 -1
- package/dist/components/breadcrumb-item/UBreadcrumbItem.js +2 -2
- package/dist/components/button/UButton.d.ts +14 -0
- package/dist/components/button/UButton.js +12 -2
- package/dist/components/button/UButton.styles.js +66 -22
- package/dist/components/button-group/UButtonGroup.js +2 -2
- package/dist/components/card/UCard.js +2 -2
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/checkbox/UCheckbox.js +2 -2
- package/dist/components/chip/UChip.js +2 -2
- package/dist/components/dialog/UDialog.js +2 -2
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/drawer/UDrawer.js +2 -2
- package/dist/components/field/UField.js +2 -2
- package/dist/components/form/UForm.js +2 -2
- package/dist/components/icon/UIcon.js +2 -2
- package/dist/components/icon-button/UIconButton.js +2 -2
- package/dist/components/input/UInput.js +2 -2
- package/dist/components/menu/UMenu.js +2 -2
- package/dist/components/menu-item/UMenuItem.js +2 -2
- package/dist/components/option/UOption.js +2 -2
- package/dist/components/panel/UPanel.js +2 -2
- package/dist/components/popover/UPopover.js +2 -2
- package/dist/components/progress-bar/UProgressBar.js +2 -2
- package/dist/components/progress-ring/UProgressRing.js +2 -2
- package/dist/components/radio/URadio.js +2 -2
- package/dist/components/rating/URating.js +2 -2
- package/dist/components/select/USelect.js +2 -2
- package/dist/components/skeleton/USkeleton.js +2 -2
- package/dist/components/slider/USlider.js +2 -2
- package/dist/components/spinner/USpinner.js +2 -2
- package/dist/components/split-panel/USplitPanel.js +2 -2
- package/dist/components/switch/USwitch.js +2 -2
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab-panel/UTabPanel.js +2 -2
- package/dist/components/tag/UTag.js +2 -2
- package/dist/components/textarea/UTextarea.js +2 -2
- package/dist/components/tooltip/UTooltip.js +2 -2
- package/dist/components/tree/UTree.js +2 -2
- package/dist/components/tree-item/UTreeItem.js +2 -2
- package/dist/react/UAlert.js +2 -2
- package/dist/react/UAvatar.js +2 -2
- package/dist/react/UBadge.js +2 -2
- package/dist/react/UBreadcrumb.js +2 -2
- package/dist/react/UBreadcrumbItem.js +2 -2
- package/dist/react/UButton.js +2 -2
- package/dist/react/UButtonGroup.js +2 -2
- package/dist/react/UCard.js +2 -2
- package/dist/react/UCarousel.js +2 -2
- package/dist/react/UCheckbox.js +2 -2
- package/dist/react/UChip.js +2 -2
- package/dist/react/UDialog.js +2 -2
- package/dist/react/UDivider.js +2 -2
- package/dist/react/UDrawer.js +2 -2
- package/dist/react/UField.js +2 -2
- package/dist/react/UForm.js +2 -2
- package/dist/react/UIcon.js +2 -2
- package/dist/react/UIconButton.js +2 -2
- package/dist/react/UInput.js +2 -2
- package/dist/react/UMenu.js +2 -2
- package/dist/react/UMenuItem.js +2 -2
- package/dist/react/UOption.js +2 -2
- package/dist/react/UPanel.js +2 -2
- package/dist/react/UPopover.js +2 -2
- package/dist/react/UProgressBar.js +2 -2
- package/dist/react/UProgressRing.js +2 -2
- package/dist/react/URadio.js +2 -2
- package/dist/react/URating.js +2 -2
- package/dist/react/USelect.js +2 -2
- package/dist/react/USkeleton.js +2 -2
- package/dist/react/USlider.js +2 -2
- package/dist/react/USpinner.js +2 -2
- package/dist/react/USplitPanel.js +2 -2
- package/dist/react/USwitch.js +2 -2
- package/dist/react/UTab.js +2 -2
- package/dist/react/UTabPanel.js +2 -2
- package/dist/react/UTag.js +2 -2
- package/dist/react/UTextarea.js +2 -2
- package/dist/react/UTooltip.js +2 -2
- package/dist/react/UTree.js +2 -2
- package/dist/react/UTreeItem.js +2 -2
- package/package.json +1 -1
- package/plugins/vite-plugin-react-wrapper.js +2 -2
- package/skills/iyulab-components/references/components/button.md +16 -0
package/dist/react/UTabPanel.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTabPanel } from '../components/tab-panel/UTabPanel.js';
|
|
3
|
+
import { UTabPanel as UTabPanelElement } from '../components/tab-panel/UTabPanel.js';
|
|
4
4
|
|
|
5
5
|
export const UTabPanel = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-tab-panel',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTabPanelElement,
|
|
9
9
|
events: {},
|
|
10
10
|
});
|
package/dist/react/UTag.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTag } from '../components/tag/UTag.js';
|
|
3
|
+
import { UTag as UTagElement } from '../components/tag/UTag.js';
|
|
4
4
|
|
|
5
5
|
export const UTag = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-tag',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTagElement,
|
|
9
9
|
events: {},
|
|
10
10
|
});
|
package/dist/react/UTextarea.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTextarea } from '../components/textarea/UTextarea.js';
|
|
3
|
+
import { UTextarea as UTextareaElement } from '../components/textarea/UTextarea.js';
|
|
4
4
|
|
|
5
5
|
export const UTextarea = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-textarea',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTextareaElement,
|
|
9
9
|
events: {
|
|
10
10
|
onInput: 'input',
|
|
11
11
|
onChange: 'change',
|
package/dist/react/UTooltip.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTooltip } from '../components/tooltip/UTooltip.js';
|
|
3
|
+
import { UTooltip as UTooltipElement } from '../components/tooltip/UTooltip.js';
|
|
4
4
|
|
|
5
5
|
export const UTooltip = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-tooltip',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTooltipElement,
|
|
9
9
|
events: {
|
|
10
10
|
onShow: 'show',
|
|
11
11
|
onHide: 'hide',
|
package/dist/react/UTree.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTree } from '../components/tree/UTree.js';
|
|
3
|
+
import { UTree as UTreeElement } from '../components/tree/UTree.js';
|
|
4
4
|
|
|
5
5
|
export const UTree = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-tree',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTreeElement,
|
|
9
9
|
events: {
|
|
10
10
|
onChange: 'change',
|
|
11
11
|
},
|
package/dist/react/UTreeItem.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createComponent } from '@lit/react';
|
|
3
|
-
import { UTreeItem } from '../components/tree-item/UTreeItem.js';
|
|
3
|
+
import { UTreeItem as UTreeItemElement } from '../components/tree-item/UTreeItem.js';
|
|
4
4
|
|
|
5
5
|
export const UTreeItem = createComponent({
|
|
6
6
|
react: React,
|
|
7
7
|
tagName: 'u-tree-item',
|
|
8
|
-
elementClass:
|
|
8
|
+
elementClass: UTreeItemElement,
|
|
9
9
|
events: {
|
|
10
10
|
onExpand: 'expand',
|
|
11
11
|
onCollapse: 'collapse',
|
package/package.json
CHANGED
|
@@ -137,12 +137,12 @@ function writeWrapper(comp, outDir, buildOutDir) {
|
|
|
137
137
|
// .js
|
|
138
138
|
const js = `import React from 'react';
|
|
139
139
|
import { createComponent } from '@lit/react';
|
|
140
|
-
import { ${className} } from '${importPath}';
|
|
140
|
+
import { ${className} as ${className}Element } from '${importPath}';
|
|
141
141
|
|
|
142
142
|
export const ${className} = createComponent({
|
|
143
143
|
react: React,
|
|
144
144
|
tagName: '${tagName}',
|
|
145
|
-
elementClass: ${className},
|
|
145
|
+
elementClass: ${className}Element,
|
|
146
146
|
events: ${eventsObj},
|
|
147
147
|
});
|
|
148
148
|
`;
|
|
@@ -14,6 +14,14 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
|
|
|
14
14
|
<u-button variant="ghost" loading>Loading</u-button>
|
|
15
15
|
<u-button href="https://example.com" target="_blank">Link</u-button>
|
|
16
16
|
|
|
17
|
+
<!-- Semantic color (independent of variant) -->
|
|
18
|
+
<u-button variant="solid" color="red">Delete</u-button>
|
|
19
|
+
<u-button variant="surface" color="green">Approve</u-button>
|
|
20
|
+
|
|
21
|
+
<!-- Size -->
|
|
22
|
+
<u-button size="sm">Small</u-button>
|
|
23
|
+
<u-button size="lg">Large</u-button>
|
|
24
|
+
|
|
17
25
|
<!-- With prefix/suffix icons -->
|
|
18
26
|
<u-button variant="solid">
|
|
19
27
|
<u-icon slot="prefix" lib="tabler" name="download"></u-icon>
|
|
@@ -37,6 +45,8 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
|
|
|
37
45
|
| Property | Type | Default | Reflect | Description |
|
|
38
46
|
|----------|------|---------|---------|-------------|
|
|
39
47
|
| `variant` | `'solid'\|'surface'\|'filled'\|'outlined'\|'ghost'\|'link'` | `'solid'` | ✓ | Visual style |
|
|
48
|
+
| `color` | `'neutral'\|'blue'\|'green'\|'red'\|'orange'\|'teal'\|'cyan'\|'purple'\|'pink'` | `'neutral'` | ✓ | Semantic color, independent of `variant`. `ghost` is unaffected (see notes below). |
|
|
49
|
+
| `size` | `'sm'\|'md'\|'lg'` | `'md'` | ✓ | Button size (12px/14px/16px font-size; padding, spinner, and icon slots scale proportionally). |
|
|
40
50
|
| `rounded` | `boolean` | `false` | ✓ | Pill-shaped border radius |
|
|
41
51
|
| `disabled` | `boolean` | `false` | ✓ | Disable the button |
|
|
42
52
|
| `loading` | `boolean` | `false` | ✓ | Show loading spinner; disables interaction |
|
|
@@ -46,6 +56,12 @@ Versatile button with multiple visual variants. Renders as an `<a>` element when
|
|
|
46
56
|
| `rel` | `string` | — | — | Link `rel` |
|
|
47
57
|
| `download` | `string` | — | — | Download filename |
|
|
48
58
|
|
|
59
|
+
### `color` notes
|
|
60
|
+
|
|
61
|
+
- `solid`/`surface`/`filled`/`outlined`: background/border switch to the chosen color's scale.
|
|
62
|
+
- `link`: text color switches, but only when `color` is set to something other than `"neutral"` — the default `link` look stays blue (backward compatible).
|
|
63
|
+
- `ghost`: no visual effect — its hover/active backgrounds use generic surface tokens (`--u-bg-color-hover`/`--u-bg-color-active`), not the neutral color scale.
|
|
64
|
+
|
|
49
65
|
## CSS Parts
|
|
50
66
|
|
|
51
67
|
| Part | Description |
|