@aristobyte-ui/label 2.5.1 → 2.6.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/README.md +81 -0
- package/package.json +5 -5
- package/es/src/main/components/Label/Label.scss +0 -127
- package/es/src/main/components/Label/index.d.ts +0 -14
- package/es/src/main/components/Label/index.d.ts.map +0 -1
- package/es/src/main/components/Label/index.js +0 -12
- package/es/src/main/components/index.d.ts +0 -2
- package/es/src/main/components/index.d.ts.map +0 -1
- package/es/src/main/components/index.js +0 -1
- package/es/src/main/index.d.ts +0 -2
- package/es/src/main/index.d.ts.map +0 -1
- package/es/src/main/index.js +0 -1
- package/lib/src/main/components/Label/Label.scss +0 -127
- package/lib/src/main/components/Label/index.d.ts +0 -14
- package/lib/src/main/components/Label/index.d.ts.map +0 -1
- package/lib/src/main/components/Label/index.js +0 -49
- package/lib/src/main/components/index.d.ts +0 -2
- package/lib/src/main/components/index.d.ts.map +0 -1
- package/lib/src/main/components/index.js +0 -17
- package/lib/src/main/index.d.ts +0 -2
- package/lib/src/main/index.d.ts.map +0 -1
- package/lib/src/main/index.js +0 -17
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# @aristobyte-ui/anchor
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://img.shields.io/badge/TypeScript-5.8-blue?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript" />
|
|
5
|
+
<img src="https://img.shields.io/badge/Build-Turbo-green?style=for-the-badge&logo=turbo&logoColor=white" alt="TurboRepo" />
|
|
6
|
+
<img src="https://img.shields.io/badge/Lint-Strict-red?style=for-the-badge&logo=eslint&logoColor=white" alt="ESLint" />
|
|
7
|
+
<img src="https://img.shields.io/badge/License-MIT-black?style=for-the-badge&logo=open-source-initiative&logoColor=white" alt="License" />
|
|
8
|
+
<img src="https://img.shields.io/badge/AristoByte-UI-purple?style=for-the-badge&logo=react&logoColor=white" alt="AristoByte UI" />
|
|
9
|
+
<img src="https://img.shields.io/badge/Node-20.17.0+-339933?style=for-the-badge&logo=node.js&logoColor=white" alt="Node.js >=20.17.0" />
|
|
10
|
+
<img src="https://img.shields.io/badge/Yarn-1.22+-2C8EBB?style=for-the-badge&logo=yarn&logoColor=white" alt="Yarn >=1.22" />
|
|
11
|
+
<img src="https://img.shields.io/badge/NPM-10.8+-CB3837?style=for-the-badge&logo=npm&logoColor=white" alt="NPM >=10.8" />
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
A fully-typed, ripple-enabled Anchor component for AristoByteUI with multiple variants and seamless integration with SCSS modules and design tokens.
|
|
15
|
+
|
|
16
|
+
## 📦 Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Install via Yarn
|
|
20
|
+
yarn add -D @aristobyte-ui/anchor
|
|
21
|
+
|
|
22
|
+
# Or via npm
|
|
23
|
+
npm install -D @aristobyte-ui/anchor
|
|
24
|
+
|
|
25
|
+
# Or via pnpm
|
|
26
|
+
pnpm add -D @aristobyte-ui/anchor
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## 🛠 Usage
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Anchor } from "@aristobyte-ui/anchor";
|
|
33
|
+
|
|
34
|
+
<Anchor href="https://aristobyte.com" variant="primary">
|
|
35
|
+
Visit AristoByte
|
|
36
|
+
</Anchor>;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
##
|
|
40
|
+
|
|
41
|
+
📂 Presets Available
|
|
42
|
+
**Variants**: `default` | `primary` | `secondary`
|
|
43
|
+
|
|
44
|
+
Ripple effect automatically applied on click
|
|
45
|
+
|
|
46
|
+
## 🔧 Example in a Package
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
<Anchor href="/docs" variant="secondary">
|
|
50
|
+
Documentation
|
|
51
|
+
</Anchor>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 📊 Why This Matters
|
|
55
|
+
|
|
56
|
+
- **Performance-first**: Lightweight CSS ensures fast rendering and smooth transitions.
|
|
57
|
+
- **Fully typed**: TypeScript-first API ensures predictable usage and IDE autocomplete.
|
|
58
|
+
- **AristoByteUI ready**: Seamlessly integrates with design tokens and SCSS modules.
|
|
59
|
+
- **Flexible**: Supports multiple variants and ripple-enabled interactive feedback.
|
|
60
|
+
|
|
61
|
+
## 🏆 Philosophy
|
|
62
|
+
|
|
63
|
+
- **Modular architecture**: Anchor component is fully composable.
|
|
64
|
+
- **Declarative styling**: SCSS modules keep styles maintainable and scoped.
|
|
65
|
+
- **Strict typing & runtime flexibility**: Props fully typed while allowing runtime overrides.
|
|
66
|
+
- **Developer experience optimized**: Easy to use with predictable behavior and minimal boilerplate.
|
|
67
|
+
|
|
68
|
+
## 📜 License
|
|
69
|
+
|
|
70
|
+
[MIT](./LICENSE) © AristoByte
|
|
71
|
+
|
|
72
|
+
## 🛡 Shields Showcase
|
|
73
|
+
|
|
74
|
+
<p align="center">
|
|
75
|
+
<img src="https://img.shields.io/badge/Consistency-100%25-green?style=for-the-badge&logo=typescript" />
|
|
76
|
+
<img src="https://img.shields.io/badge/Maintained-Active-brightgreen?style=for-the-badge&logo=github" />
|
|
77
|
+
<img src="https://img.shields.io/badge/Strictness-High-critical?style=for-the-badge&logo=eslint" />
|
|
78
|
+
<img src="https://img.shields.io/badge/Declarations-Enabled-blue?style=for-the-badge&logo=typescript" />
|
|
79
|
+
<img src="https://img.shields.io/badge/Monorepo-Turbo-green?style=for-the-badge&logo=monorepo" />
|
|
80
|
+
<img src="https://img.shields.io/badge/Interop-ESM%2FCJS-orange?style=for-the-badge&logo=javascript" />
|
|
81
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aristobyte-ui/label",
|
|
3
3
|
"description": "AristoByteUI Label component: a reusable, styled label for forms and UI elements.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "AristoByte <info@aristobyte.com>",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"main": "lib/
|
|
44
|
-
"module": "es/
|
|
45
|
-
"types": "es/
|
|
43
|
+
"main": "lib/index.js",
|
|
44
|
+
"module": "es/index.js",
|
|
45
|
+
"types": "es/index.d.ts",
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": "^19.1.0",
|
|
48
48
|
"react-dom": "^19.1.0",
|
|
49
49
|
"sass": "^1.97.3"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@aristobyte-ui/utils": "2.
|
|
52
|
+
"@aristobyte-ui/utils": "^2.6.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
-
|
|
3
|
-
// @TODO: update styles currently there is a "#{name}"
|
|
4
|
-
|
|
5
|
-
.label {
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-weight: 500;
|
|
9
|
-
user-select: none;
|
|
10
|
-
border-width: 1px;
|
|
11
|
-
border-style: solid;
|
|
12
|
-
border-radius: 0.625rem;
|
|
13
|
-
padding: 0.25rem 0.6875rem;
|
|
14
|
-
font-size: 0.875rem;
|
|
15
|
-
line-height: 1rem;
|
|
16
|
-
|
|
17
|
-
&-size {
|
|
18
|
-
&--xsm {
|
|
19
|
-
font-size: 0.75rem;
|
|
20
|
-
padding: 0.125rem 0.5rem;
|
|
21
|
-
}
|
|
22
|
-
&--sm {
|
|
23
|
-
font-size: 0.875rem;
|
|
24
|
-
padding: 0.25rem 0.625rem;
|
|
25
|
-
}
|
|
26
|
-
&--md {
|
|
27
|
-
font-size: 1rem;
|
|
28
|
-
padding: 0.375rem 0.75rem;
|
|
29
|
-
}
|
|
30
|
-
&--lg {
|
|
31
|
-
font-size: 1.125rem;
|
|
32
|
-
padding: 0.5rem 1rem;
|
|
33
|
-
}
|
|
34
|
-
&--xlg {
|
|
35
|
-
font-size: 1.25rem;
|
|
36
|
-
padding: 0.625rem 1.25rem;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-radius {
|
|
41
|
-
&--none {
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
}
|
|
44
|
-
&--sm {
|
|
45
|
-
border-radius: 0.125rem;
|
|
46
|
-
}
|
|
47
|
-
&--md {
|
|
48
|
-
border-radius: 0.375rem;
|
|
49
|
-
}
|
|
50
|
-
&--lg {
|
|
51
|
-
border-radius: 0.75rem;
|
|
52
|
-
}
|
|
53
|
-
&--full {
|
|
54
|
-
border-radius: 9999px;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@mixin variant($name, $color) {
|
|
60
|
-
.label-#{$name}-solid {
|
|
61
|
-
background-color: rgba($color, 0.2);
|
|
62
|
-
border-color: $color;
|
|
63
|
-
color: $color;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.label-#{$name}-solid:hover {
|
|
67
|
-
background-color: rgba($color, 0.3);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.label-#{$name}-outline {
|
|
71
|
-
background-color: transparent;
|
|
72
|
-
border-color: $color;
|
|
73
|
-
color: $color;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.label-#{$name}-outline:hover {
|
|
77
|
-
background-color: rgba($color, 0.07);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.label-#{$name}-outline-dashed {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
border-color: $color;
|
|
83
|
-
border-style: dashed;
|
|
84
|
-
color: $color;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.label-#{$name}-outline-dashed:hover {
|
|
88
|
-
background-color: rgba($color, 0.07);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.label-#{$name}-no-outline {
|
|
92
|
-
background-color: rgba($color, 0.2);
|
|
93
|
-
border-color: transparent;
|
|
94
|
-
color: $color;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.label-#{$name}-no-outline:hover {
|
|
98
|
-
background-color: rgba($color, 0.3);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.label-#{$name}-glowing {
|
|
102
|
-
background-color: rgba($color, 0.2);
|
|
103
|
-
color: $color;
|
|
104
|
-
box-shadow: 0 0 6px rgba($color, 0.5);
|
|
105
|
-
border-color: transparent;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.label-#{$name}-glowing:hover {
|
|
109
|
-
box-shadow: 0 0 8px rgba($color, 0.7);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.label-#{$name}-solid:disabled,
|
|
113
|
-
.label-#{$name}-outline:disabled,
|
|
114
|
-
.label-#{$name}-outline-dashed:disabled,
|
|
115
|
-
.label-#{$name}-no-outline:disabled,
|
|
116
|
-
.label-#{$name}-glowing:disabled {
|
|
117
|
-
opacity: 0.5;
|
|
118
|
-
cursor: not-allowed;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@include variant('default', #1f2937);
|
|
123
|
-
@include variant('primary', #2563eb);
|
|
124
|
-
@include variant('secondary', #4f46e5);
|
|
125
|
-
@include variant('success', #16a34a);
|
|
126
|
-
@include variant('warning', #d97706);
|
|
127
|
-
@include variant('error', #dc2626);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ILabel {
|
|
3
|
-
text: string;
|
|
4
|
-
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
5
|
-
appearance?: 'solid' | 'outline' | 'outline-dashed' | 'no-outline' | 'glowing';
|
|
6
|
-
size?: 'xsm' | 'sm' | 'md' | 'lg' | 'xlg';
|
|
7
|
-
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
8
|
-
className?: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
borderColor?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const Label: React.FC<ILabel>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/label/src/main/components/Label/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAChF,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAAC;IAC/E,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAyBlC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export var Label = function (_a) {
|
|
4
|
-
var text = _a.text, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.radius, radius = _e === void 0 ? 'md' : _e, className = _a.className, color = _a.color, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor;
|
|
5
|
-
return (React.createElement("label", { className: ['label', "label-".concat(variant, "-").concat(appearance), "label-".concat(size), "label-radius-".concat(radius), className]
|
|
6
|
-
.filter(Boolean)
|
|
7
|
-
.join(' '), style: {
|
|
8
|
-
color: color,
|
|
9
|
-
backgroundColor: backgroundColor,
|
|
10
|
-
borderColor: borderColor,
|
|
11
|
-
} }, text));
|
|
12
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/label/src/main/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Label';
|
package/es/src/main/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/label/src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/es/src/main/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './components';
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
@use '@aristobyte-ui/utils/styles' as *;
|
|
2
|
-
|
|
3
|
-
// @TODO: update styles currently there is a "#{name}"
|
|
4
|
-
|
|
5
|
-
.label {
|
|
6
|
-
display: inline-flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
font-weight: 500;
|
|
9
|
-
user-select: none;
|
|
10
|
-
border-width: 1px;
|
|
11
|
-
border-style: solid;
|
|
12
|
-
border-radius: 0.625rem;
|
|
13
|
-
padding: 0.25rem 0.6875rem;
|
|
14
|
-
font-size: 0.875rem;
|
|
15
|
-
line-height: 1rem;
|
|
16
|
-
|
|
17
|
-
&-size {
|
|
18
|
-
&--xsm {
|
|
19
|
-
font-size: 0.75rem;
|
|
20
|
-
padding: 0.125rem 0.5rem;
|
|
21
|
-
}
|
|
22
|
-
&--sm {
|
|
23
|
-
font-size: 0.875rem;
|
|
24
|
-
padding: 0.25rem 0.625rem;
|
|
25
|
-
}
|
|
26
|
-
&--md {
|
|
27
|
-
font-size: 1rem;
|
|
28
|
-
padding: 0.375rem 0.75rem;
|
|
29
|
-
}
|
|
30
|
-
&--lg {
|
|
31
|
-
font-size: 1.125rem;
|
|
32
|
-
padding: 0.5rem 1rem;
|
|
33
|
-
}
|
|
34
|
-
&--xlg {
|
|
35
|
-
font-size: 1.25rem;
|
|
36
|
-
padding: 0.625rem 1.25rem;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-radius {
|
|
41
|
-
&--none {
|
|
42
|
-
border-radius: 0;
|
|
43
|
-
}
|
|
44
|
-
&--sm {
|
|
45
|
-
border-radius: 0.125rem;
|
|
46
|
-
}
|
|
47
|
-
&--md {
|
|
48
|
-
border-radius: 0.375rem;
|
|
49
|
-
}
|
|
50
|
-
&--lg {
|
|
51
|
-
border-radius: 0.75rem;
|
|
52
|
-
}
|
|
53
|
-
&--full {
|
|
54
|
-
border-radius: 9999px;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@mixin variant($name, $color) {
|
|
60
|
-
.label-#{$name}-solid {
|
|
61
|
-
background-color: rgba($color, 0.2);
|
|
62
|
-
border-color: $color;
|
|
63
|
-
color: $color;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.label-#{$name}-solid:hover {
|
|
67
|
-
background-color: rgba($color, 0.3);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.label-#{$name}-outline {
|
|
71
|
-
background-color: transparent;
|
|
72
|
-
border-color: $color;
|
|
73
|
-
color: $color;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.label-#{$name}-outline:hover {
|
|
77
|
-
background-color: rgba($color, 0.07);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.label-#{$name}-outline-dashed {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
border-color: $color;
|
|
83
|
-
border-style: dashed;
|
|
84
|
-
color: $color;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.label-#{$name}-outline-dashed:hover {
|
|
88
|
-
background-color: rgba($color, 0.07);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.label-#{$name}-no-outline {
|
|
92
|
-
background-color: rgba($color, 0.2);
|
|
93
|
-
border-color: transparent;
|
|
94
|
-
color: $color;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.label-#{$name}-no-outline:hover {
|
|
98
|
-
background-color: rgba($color, 0.3);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.label-#{$name}-glowing {
|
|
102
|
-
background-color: rgba($color, 0.2);
|
|
103
|
-
color: $color;
|
|
104
|
-
box-shadow: 0 0 6px rgba($color, 0.5);
|
|
105
|
-
border-color: transparent;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.label-#{$name}-glowing:hover {
|
|
109
|
-
box-shadow: 0 0 8px rgba($color, 0.7);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.label-#{$name}-solid:disabled,
|
|
113
|
-
.label-#{$name}-outline:disabled,
|
|
114
|
-
.label-#{$name}-outline-dashed:disabled,
|
|
115
|
-
.label-#{$name}-no-outline:disabled,
|
|
116
|
-
.label-#{$name}-glowing:disabled {
|
|
117
|
-
opacity: 0.5;
|
|
118
|
-
cursor: not-allowed;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
@include variant('default', #1f2937);
|
|
123
|
-
@include variant('primary', #2563eb);
|
|
124
|
-
@include variant('secondary', #4f46e5);
|
|
125
|
-
@include variant('success', #16a34a);
|
|
126
|
-
@include variant('warning', #d97706);
|
|
127
|
-
@include variant('error', #dc2626);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ILabel {
|
|
3
|
-
text: string;
|
|
4
|
-
variant?: 'default' | 'primary' | 'secondary' | 'success' | 'error' | 'warning';
|
|
5
|
-
appearance?: 'solid' | 'outline' | 'outline-dashed' | 'no-outline' | 'glowing';
|
|
6
|
-
size?: 'xsm' | 'sm' | 'md' | 'lg' | 'xlg';
|
|
7
|
-
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
8
|
-
className?: string;
|
|
9
|
-
color?: string;
|
|
10
|
-
backgroundColor?: string;
|
|
11
|
-
borderColor?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const Label: React.FC<ILabel>;
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/label/src/main/components/Label/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAChF,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAAC;IAC/E,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAyBlC,CAAC"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
'use client';
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.Label = void 0;
|
|
38
|
-
var React = __importStar(require("react"));
|
|
39
|
-
var Label = function (_a) {
|
|
40
|
-
var text = _a.text, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.appearance, appearance = _c === void 0 ? 'solid' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.radius, radius = _e === void 0 ? 'md' : _e, className = _a.className, color = _a.color, backgroundColor = _a.backgroundColor, borderColor = _a.borderColor;
|
|
41
|
-
return (React.createElement("label", { className: ['label', "label-".concat(variant, "-").concat(appearance), "label-".concat(size), "label-radius-".concat(radius), className]
|
|
42
|
-
.filter(Boolean)
|
|
43
|
-
.join(' '), style: {
|
|
44
|
-
color: color,
|
|
45
|
-
backgroundColor: backgroundColor,
|
|
46
|
-
borderColor: borderColor,
|
|
47
|
-
} }, text));
|
|
48
|
-
};
|
|
49
|
-
exports.Label = Label;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/label/src/main/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Label"), exports);
|
package/lib/src/main/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/label/src/main/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
package/lib/src/main/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./components"), exports);
|