@ismail-elkorchi/ui-primitives 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/README.md +63 -0
- package/dist/Badge.d.ts +7 -0
- package/dist/Badge.d.ts.map +1 -0
- package/dist/Badge.js +69 -0
- package/dist/Badge.js.map +1 -0
- package/dist/Button.d.ts +12 -0
- package/dist/Button.d.ts.map +1 -0
- package/dist/Button.js +205 -0
- package/dist/Button.js.map +1 -0
- package/dist/Input.d.ts +14 -0
- package/dist/Input.d.ts.map +1 -0
- package/dist/Input.js +110 -0
- package/dist/Input.js.map +1 -0
- package/dist/Separator.d.ts +7 -0
- package/dist/Separator.d.ts.map +1 -0
- package/dist/Separator.js +45 -0
- package/dist/Separator.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/register.d.ts +5 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +5 -0
- package/dist/register.js.map +1 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# @ismail-elkorchi/ui-primitives
|
|
2
|
+
|
|
3
|
+
Shadow DOM web components backed by the shared token CSS variables from `@ismail-elkorchi/ui-tokens`. They ship no Tailwind and assume tokens are loaded on `:root`.
|
|
4
|
+
|
|
5
|
+
## Build & distribution
|
|
6
|
+
|
|
7
|
+
- `npm run build` emits ESM + `.d.ts` files into `dist/`.
|
|
8
|
+
- Exported subpaths map directly to files: `dist/index.js`, `dist/register.js`, `dist/Button.js`, `dist/Badge.js`, `dist/Input.js`, `dist/Separator.js`.
|
|
9
|
+
- Published artifacts include only `dist/` and this README; TypeScript sources stay in the workspace.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import '@ismail-elkorchi/ui-primitives/register'; // defines all elements
|
|
15
|
+
// or import individual components for tree-shaking:
|
|
16
|
+
import '@ismail-elkorchi/ui-primitives/button';
|
|
17
|
+
import '@ismail-elkorchi/ui-primitives/badge';
|
|
18
|
+
import '@ismail-elkorchi/ui-primitives/input';
|
|
19
|
+
import '@ismail-elkorchi/ui-primitives/separator';
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Ensure your app imports tokens before Tailwind so the theme variables exist:
|
|
23
|
+
|
|
24
|
+
```css
|
|
25
|
+
@import '@ismail-elkorchi/ui-tokens/index.css';
|
|
26
|
+
@import 'tailwindcss';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Parts (consistent strategy)
|
|
30
|
+
|
|
31
|
+
- `uik-button`: `part="base"` on the internal `<button>`.
|
|
32
|
+
- `uik-badge`: `part="base"` on the internal `<div>`.
|
|
33
|
+
- `uik-input`: `part="base"` on the internal `<input>`.
|
|
34
|
+
- `uik-separator`: `part="base"` on the internal `<div>` line.
|
|
35
|
+
|
|
36
|
+
## Components and contracts
|
|
37
|
+
|
|
38
|
+
### `<uik-button>`
|
|
39
|
+
|
|
40
|
+
- **Attributes/props**: `variant` (`default | destructive | outline | secondary | ghost | link`), `size` (`default | sm | lg | icon`), `type` (`button | submit | reset` - defaults to `button`), `active` (boolean), `muted` (boolean), `disabled` (boolean).
|
|
41
|
+
- **Events**: native button events (`click`, focus/blur) bubble from the internal button; disabled buttons swallow click.
|
|
42
|
+
- **Styling hooks**:
|
|
43
|
+
- Sizing is enforced on the `:host`. The internal button fills the host (100% width/height).
|
|
44
|
+
- `active`/`muted` props control stateful colors (especially for ghost variant).
|
|
45
|
+
- `part="base"` allows overrides, but avoid fighting the host sizing.
|
|
46
|
+
|
|
47
|
+
### `<uik-badge>`
|
|
48
|
+
|
|
49
|
+
- **Attributes/props**: `variant` (`default | secondary | destructive | outline`).
|
|
50
|
+
- **Events**: none special; behaves like an inline element.
|
|
51
|
+
- **Styling hooks**: token-driven colors and `part="base"`.
|
|
52
|
+
|
|
53
|
+
### `<uik-input>` (event strategy)
|
|
54
|
+
|
|
55
|
+
- **Attributes/props**: `type`, `placeholder`, `value`, `disabled`, `label` (required for a11y, sets `aria-label`).
|
|
56
|
+
- **Events**: re-dispatches `input` and `change` as `CustomEvent`s with `detail: { value, originalEvent }`, `bubbles: true`, `composed: true`. The internal native event is stopped to avoid duplicate handlers; listen on the custom element for `input`/`change`.
|
|
57
|
+
- **Styling hooks**: token-driven colors, `part="base"`. The `value` property stays in sync with user input.
|
|
58
|
+
|
|
59
|
+
### `<uik-separator>`
|
|
60
|
+
|
|
61
|
+
- **Attributes/props**: `orientation` (`horizontal | vertical`).
|
|
62
|
+
- **Events**: none; presentational.
|
|
63
|
+
- **Styling hooks**: token-driven color, `part="base"`.
|
package/dist/Badge.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Badge extends LitElement {
|
|
3
|
+
accessor variant: 'default' | 'secondary' | 'destructive' | 'outline';
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../Badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAG1C,qBACa,KAAM,SAAQ,UAAU;IACT,QAAQ,CAAC,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAa;IAE5G,OAAgB,MAAM,0BAwCpB;IAEO,MAAM;CAOhB"}
|
package/dist/Badge.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
let Badge = class Badge extends LitElement {
|
|
10
|
+
#variant_accessor_storage = 'default';
|
|
11
|
+
get variant() { return this.#variant_accessor_storage; }
|
|
12
|
+
set variant(value) { this.#variant_accessor_storage = value; }
|
|
13
|
+
static styles = css `
|
|
14
|
+
:host {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.badge {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
border-radius: 0.375rem;
|
|
22
|
+
border: 1px solid transparent;
|
|
23
|
+
padding: 0.125rem 0.625rem;
|
|
24
|
+
font-size: 0.75rem;
|
|
25
|
+
font-weight: 600;
|
|
26
|
+
transition:
|
|
27
|
+
color 0.15s,
|
|
28
|
+
background-color 0.15s;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.variant-default {
|
|
32
|
+
background-color: hsl(var(--primary, 0 0% 98%));
|
|
33
|
+
color: hsl(var(--primary-foreground, 240 5.9% 10%));
|
|
34
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.variant-secondary {
|
|
38
|
+
background-color: hsl(var(--secondary, 240 3.7% 15.9%));
|
|
39
|
+
color: hsl(var(--secondary-foreground, 0 0% 98%));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.variant-destructive {
|
|
43
|
+
background-color: hsl(var(--destructive, 0 62.8% 30.6%));
|
|
44
|
+
color: hsl(var(--destructive-foreground, 0 0% 98%));
|
|
45
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.variant-outline {
|
|
49
|
+
background-color: transparent;
|
|
50
|
+
border-color: hsl(var(--border, 240 3.7% 15.9%));
|
|
51
|
+
color: hsl(var(--foreground, 0 0% 98%));
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
render() {
|
|
55
|
+
return html `
|
|
56
|
+
<div part="base" class="badge variant-${this.variant}">
|
|
57
|
+
<slot></slot>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
__decorate([
|
|
63
|
+
property({ type: String })
|
|
64
|
+
], Badge.prototype, "variant", null);
|
|
65
|
+
Badge = __decorate([
|
|
66
|
+
customElement('uik-badge')
|
|
67
|
+
], Badge);
|
|
68
|
+
export { Badge };
|
|
69
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../Badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAGnD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,UAAU;IACA,4BAA+D,SAAS,CAAC;IAAzE,IAAA,OAAO,6CAAkE;IAAzE,IAAA,OAAO,mDAAkE;IAE5G,MAAM,CAAU,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwC3B,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA;8CAC+B,IAAI,CAAC,OAAO;;;KAGrD,CAAC;IACJ,CAAC;;AAlDkC;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;oCAAmF;AADjG,KAAK;IADjB,aAAa,CAAC,WAAW,CAAC;GACd,KAAK,CAoDjB"}
|
package/dist/Button.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Button extends LitElement {
|
|
3
|
+
accessor variant: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
4
|
+
accessor size: 'default' | 'sm' | 'lg' | 'icon';
|
|
5
|
+
accessor type: 'button' | 'submit' | 'reset';
|
|
6
|
+
accessor disabled: boolean;
|
|
7
|
+
accessor active: boolean;
|
|
8
|
+
accessor muted: boolean;
|
|
9
|
+
static styles: import("lit").CSSResult;
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../Button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAG1C,qBACa,MAAO,SAAQ,UAAU;IACK,QAAQ,CAAC,OAAO,EACrD,SAAS,GACT,aAAa,GACb,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAa;IACkB,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAa;IAC3E,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAY;IACvD,QAAQ,CAAC,QAAQ,UAAS;IACX,QAAQ,CAAC,MAAM,UAAS;IACxB,QAAQ,CAAC,KAAK,UAAS;IAEjE,OAAgB,MAAM,0BAwIpB;IAEO,MAAM;CAiBhB"}
|
package/dist/Button.js
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
let Button = class Button extends LitElement {
|
|
10
|
+
#variant_accessor_storage = 'default';
|
|
11
|
+
get variant() { return this.#variant_accessor_storage; }
|
|
12
|
+
set variant(value) { this.#variant_accessor_storage = value; }
|
|
13
|
+
#size_accessor_storage = 'default';
|
|
14
|
+
get size() { return this.#size_accessor_storage; }
|
|
15
|
+
set size(value) { this.#size_accessor_storage = value; }
|
|
16
|
+
#type_accessor_storage = 'button';
|
|
17
|
+
get type() { return this.#type_accessor_storage; }
|
|
18
|
+
set type(value) { this.#type_accessor_storage = value; }
|
|
19
|
+
#disabled_accessor_storage = false;
|
|
20
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
21
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
22
|
+
#active_accessor_storage = false;
|
|
23
|
+
get active() { return this.#active_accessor_storage; }
|
|
24
|
+
set active(value) { this.#active_accessor_storage = value; }
|
|
25
|
+
#muted_accessor_storage = false;
|
|
26
|
+
get muted() { return this.#muted_accessor_storage; }
|
|
27
|
+
set muted(value) { this.#muted_accessor_storage = value; }
|
|
28
|
+
static styles = css `
|
|
29
|
+
:host {
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Size variants on host */
|
|
34
|
+
:host([size='default']) {
|
|
35
|
+
height: 2.25rem;
|
|
36
|
+
}
|
|
37
|
+
:host([size='sm']) {
|
|
38
|
+
height: 2rem;
|
|
39
|
+
}
|
|
40
|
+
:host([size='lg']) {
|
|
41
|
+
height: 2.5rem;
|
|
42
|
+
}
|
|
43
|
+
:host([size='icon']) {
|
|
44
|
+
height: 2.25rem;
|
|
45
|
+
width: 2.25rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
button {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
gap: 0.5rem;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
border-radius: 0.375rem;
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
font-weight: 500;
|
|
59
|
+
transition:
|
|
60
|
+
color 0.15s,
|
|
61
|
+
background-color 0.15s;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
border: none;
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Padding applied to internal button based on size prop of host (mirrored via class or just explicit here)
|
|
68
|
+
Actually, to keep it simple, we can use the classes on the button as before for padding,
|
|
69
|
+
but height/width are now 100% to fill host.
|
|
70
|
+
*/
|
|
71
|
+
.size-default {
|
|
72
|
+
padding: 0.5rem 1rem;
|
|
73
|
+
}
|
|
74
|
+
.size-sm {
|
|
75
|
+
padding: 0.25rem 0.75rem;
|
|
76
|
+
font-size: 0.75rem;
|
|
77
|
+
}
|
|
78
|
+
.size-lg {
|
|
79
|
+
padding: 0.5rem 2rem;
|
|
80
|
+
}
|
|
81
|
+
.size-icon {
|
|
82
|
+
padding: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
button:focus-visible {
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: 0 0 0 1px hsl(var(--ring, 240 4.9% 83.9%));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
button:disabled {
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
opacity: 0.5;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Color variants using CSS variables */
|
|
96
|
+
.variant-default {
|
|
97
|
+
background-color: hsl(var(--primary, 0 0% 98%));
|
|
98
|
+
color: hsl(var(--primary-foreground, 240 5.9% 10%));
|
|
99
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
100
|
+
}
|
|
101
|
+
.variant-default:hover {
|
|
102
|
+
background-color: hsl(var(--primary, 0 0% 98%) / 0.9);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.variant-destructive {
|
|
106
|
+
background-color: hsl(var(--destructive, 0 62.8% 30.6%));
|
|
107
|
+
color: hsl(var(--destructive-foreground, 0 0% 98%));
|
|
108
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
109
|
+
}
|
|
110
|
+
.variant-destructive:hover {
|
|
111
|
+
background-color: hsl(var(--destructive, 0 62.8% 30.6%) / 0.9);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.variant-outline {
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
border: 1px solid hsl(var(--border, 240 3.7% 15.9%));
|
|
117
|
+
color: hsl(var(--foreground, 0 0% 98%));
|
|
118
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
119
|
+
}
|
|
120
|
+
.variant-outline:hover {
|
|
121
|
+
background-color: hsl(var(--accent, 240 3.7% 15.9%));
|
|
122
|
+
color: hsl(var(--accent-foreground, 0 0% 98%));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.variant-secondary {
|
|
126
|
+
background-color: hsl(var(--secondary, 240 3.7% 15.9%));
|
|
127
|
+
color: hsl(var(--secondary-foreground, 0 0% 98%));
|
|
128
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
129
|
+
}
|
|
130
|
+
.variant-secondary:hover {
|
|
131
|
+
background-color: hsl(var(--secondary, 240 3.7% 15.9%) / 0.8);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.variant-ghost {
|
|
135
|
+
background-color: transparent;
|
|
136
|
+
color: hsl(var(--foreground, 0 0% 98%));
|
|
137
|
+
}
|
|
138
|
+
.variant-ghost:hover {
|
|
139
|
+
background-color: hsl(var(--accent, 240 3.7% 15.9%));
|
|
140
|
+
color: hsl(var(--accent-foreground, 0 0% 98%));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Active/Muted States for Ghost (and others if needed) */
|
|
144
|
+
:host([muted]) .variant-ghost {
|
|
145
|
+
color: hsl(var(--muted-foreground, 240 5% 64.9%));
|
|
146
|
+
}
|
|
147
|
+
:host([muted]) .variant-ghost:hover {
|
|
148
|
+
color: hsl(var(--foreground, 0 0% 98%));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
:host([active]) .variant-ghost {
|
|
152
|
+
background-color: hsl(var(--accent, 240 3.7% 15.9%));
|
|
153
|
+
color: hsl(var(--accent-foreground, 0 0% 98%));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.variant-link {
|
|
157
|
+
background-color: transparent;
|
|
158
|
+
color: hsl(var(--primary, 0 0% 98%));
|
|
159
|
+
text-decoration-offset: 4px;
|
|
160
|
+
}
|
|
161
|
+
.variant-link:hover {
|
|
162
|
+
text-decoration: underline;
|
|
163
|
+
}
|
|
164
|
+
`;
|
|
165
|
+
render() {
|
|
166
|
+
return html `
|
|
167
|
+
<button
|
|
168
|
+
part="base"
|
|
169
|
+
class="variant-${this.variant} size-${this.size}"
|
|
170
|
+
type="${this.type}"
|
|
171
|
+
?disabled=${this.disabled}
|
|
172
|
+
@click=${(e) => {
|
|
173
|
+
if (this.disabled) {
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
e.stopPropagation();
|
|
176
|
+
}
|
|
177
|
+
}}>
|
|
178
|
+
<slot></slot>
|
|
179
|
+
</button>
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
__decorate([
|
|
184
|
+
property({ type: String, reflect: true })
|
|
185
|
+
], Button.prototype, "variant", null);
|
|
186
|
+
__decorate([
|
|
187
|
+
property({ type: String, reflect: true })
|
|
188
|
+
], Button.prototype, "size", null);
|
|
189
|
+
__decorate([
|
|
190
|
+
property({ type: String })
|
|
191
|
+
], Button.prototype, "type", null);
|
|
192
|
+
__decorate([
|
|
193
|
+
property({ type: Boolean })
|
|
194
|
+
], Button.prototype, "disabled", null);
|
|
195
|
+
__decorate([
|
|
196
|
+
property({ type: Boolean, reflect: true })
|
|
197
|
+
], Button.prototype, "active", null);
|
|
198
|
+
__decorate([
|
|
199
|
+
property({ type: Boolean, reflect: true })
|
|
200
|
+
], Button.prototype, "muted", null);
|
|
201
|
+
Button = __decorate([
|
|
202
|
+
customElement('uik-button')
|
|
203
|
+
], Button);
|
|
204
|
+
export { Button };
|
|
205
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../Button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAGnD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IACc,4BAMrC,SAAS,CAAC;IAN2B,IAAA,OAAO,6CAMlC;IAN2B,IAAA,OAAO,mDAMlC;IAC2B,yBAAyC,SAAS,CAAC;IAAnD,IAAA,IAAI,0CAA+C;IAAnD,IAAA,IAAI,gDAA+C;IAClE,yBAAsC,QAAQ,CAAC;IAA/C,IAAA,IAAI,0CAA2C;IAA/C,IAAA,IAAI,gDAA2C;IAC9C,6BAAW,KAAK,CAAC;IAAjB,IAAA,QAAQ,8CAAS;IAAjB,IAAA,QAAQ,oDAAS;IACF,2BAAS,KAAK,CAAC;IAAf,IAAA,MAAM,4CAAS;IAAf,IAAA,MAAM,kDAAS;IACf,0BAAQ,KAAK,CAAC;IAAd,IAAA,KAAK,2CAAS;IAAd,IAAA,KAAK,iDAAS;IAEjE,MAAM,CAAU,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwI3B,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA;;;yBAGU,IAAI,CAAC,OAAO,SAAS,IAAI,CAAC,IAAI;gBACvC,IAAI,CAAC,IAAI;oBACL,IAAI,CAAC,QAAQ;iBAChB,CAAC,CAAQ,EAAE,EAAE;YACpB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,CAAC,CAAC,cAAc,EAAE,CAAC;gBACnB,CAAC,CAAC,eAAe,EAAE,CAAC;YACtB,CAAC;QACH,CAAC;;;KAGJ,CAAC;IACJ,CAAC;;AAvKiD;IAAjD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;qCAMjB;AAC2B;IAAjD,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;kCAA6D;AAClE;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kCAAyD;AAC9C;IAAnC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;sCAA2B;AACF;IAAlD,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;oCAAyB;AACf;IAAlD,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;mCAAwB;AAZtD,MAAM;IADlB,aAAa,CAAC,YAAY,CAAC;GACf,MAAM,CAyKlB"}
|
package/dist/Input.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Input extends LitElement {
|
|
3
|
+
accessor type: string;
|
|
4
|
+
accessor placeholder: string;
|
|
5
|
+
accessor value: string;
|
|
6
|
+
accessor disabled: boolean;
|
|
7
|
+
accessor label: string;
|
|
8
|
+
static styles: import("lit").CSSResult;
|
|
9
|
+
private emitValue;
|
|
10
|
+
private onChange;
|
|
11
|
+
private onInput;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAK1C,qBACa,KAAM,SAAQ,UAAU;IACT,QAAQ,CAAC,IAAI,SAAU;IACvB,QAAQ,CAAC,WAAW,SAAM;IAC1B,QAAQ,CAAC,KAAK,SAAM;IACnB,QAAQ,CAAC,QAAQ,UAAS;IAC3B,QAAQ,CAAC,KAAK,SAAM;IAE9C,OAAgB,MAAM,0BAoCpB;IAEF,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,QAAQ,CAKd;IAEF,OAAO,CAAC,OAAO,CAKb;IAEO,MAAM;CAahB"}
|
package/dist/Input.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
let Input = class Input extends LitElement {
|
|
10
|
+
#type_accessor_storage = 'text';
|
|
11
|
+
get type() { return this.#type_accessor_storage; }
|
|
12
|
+
set type(value) { this.#type_accessor_storage = value; }
|
|
13
|
+
#placeholder_accessor_storage = '';
|
|
14
|
+
get placeholder() { return this.#placeholder_accessor_storage; }
|
|
15
|
+
set placeholder(value) { this.#placeholder_accessor_storage = value; }
|
|
16
|
+
#value_accessor_storage = '';
|
|
17
|
+
get value() { return this.#value_accessor_storage; }
|
|
18
|
+
set value(value) { this.#value_accessor_storage = value; }
|
|
19
|
+
#disabled_accessor_storage = false;
|
|
20
|
+
get disabled() { return this.#disabled_accessor_storage; }
|
|
21
|
+
set disabled(value) { this.#disabled_accessor_storage = value; }
|
|
22
|
+
#label_accessor_storage = '';
|
|
23
|
+
get label() { return this.#label_accessor_storage; }
|
|
24
|
+
set label(value) { this.#label_accessor_storage = value; }
|
|
25
|
+
static styles = css `
|
|
26
|
+
:host {
|
|
27
|
+
display: block;
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
input {
|
|
33
|
+
display: flex;
|
|
34
|
+
height: 2.25rem;
|
|
35
|
+
width: 100%;
|
|
36
|
+
border-radius: 0.375rem;
|
|
37
|
+
border: 1px solid hsl(var(--input, 240 3.7% 15.9%));
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
padding: 0.25rem 0.75rem;
|
|
40
|
+
font-size: 0.875rem;
|
|
41
|
+
color: hsl(var(--foreground, 0 0% 98%));
|
|
42
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
43
|
+
transition:
|
|
44
|
+
border-color 0.15s,
|
|
45
|
+
box-shadow 0.15s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
input::placeholder {
|
|
49
|
+
color: hsl(var(--muted-foreground, 240 5% 64.9%));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
input:focus-visible {
|
|
53
|
+
outline: none;
|
|
54
|
+
box-shadow: 0 0 0 1px hsl(var(--ring, 240 4.9% 83.9%));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
input:disabled {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
emitValue(name, originalEvent) {
|
|
63
|
+
this.dispatchEvent(new CustomEvent(name, { detail: { value: this.value, originalEvent }, bubbles: true, composed: true }));
|
|
64
|
+
}
|
|
65
|
+
onChange = (e) => {
|
|
66
|
+
const input = e.target;
|
|
67
|
+
this.value = input.value;
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
this.emitValue('change', e);
|
|
70
|
+
};
|
|
71
|
+
onInput = (e) => {
|
|
72
|
+
const input = e.target;
|
|
73
|
+
this.value = input.value;
|
|
74
|
+
e.stopPropagation();
|
|
75
|
+
this.emitValue('input', e);
|
|
76
|
+
};
|
|
77
|
+
render() {
|
|
78
|
+
return html `
|
|
79
|
+
<input
|
|
80
|
+
part="base"
|
|
81
|
+
type="${this.type}"
|
|
82
|
+
aria-label="${this.label}"
|
|
83
|
+
placeholder="${this.placeholder}"
|
|
84
|
+
.value="${this.value}"
|
|
85
|
+
?disabled=${this.disabled}
|
|
86
|
+
@change=${this.onChange}
|
|
87
|
+
@input=${this.onInput} />
|
|
88
|
+
`;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: String })
|
|
93
|
+
], Input.prototype, "type", null);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: String })
|
|
96
|
+
], Input.prototype, "placeholder", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: String })
|
|
99
|
+
], Input.prototype, "value", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
property({ type: Boolean })
|
|
102
|
+
], Input.prototype, "disabled", null);
|
|
103
|
+
__decorate([
|
|
104
|
+
property({ type: String })
|
|
105
|
+
], Input.prototype, "label", null);
|
|
106
|
+
Input = __decorate([
|
|
107
|
+
customElement('uik-input')
|
|
108
|
+
], Input);
|
|
109
|
+
export { Input };
|
|
110
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../Input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAKnD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,UAAU;IACA,yBAAO,MAAM,CAAC;IAAd,IAAA,IAAI,0CAAU;IAAd,IAAA,IAAI,gDAAU;IACd,gCAAc,EAAE,CAAC;IAAjB,IAAA,WAAW,iDAAM;IAAjB,IAAA,WAAW,uDAAM;IACjB,0BAAQ,EAAE,CAAC;IAAX,IAAA,KAAK,2CAAM;IAAX,IAAA,KAAK,iDAAM;IACV,6BAAW,KAAK,CAAC;IAAjB,IAAA,QAAQ,8CAAS;IAAjB,IAAA,QAAQ,oDAAS;IAClB,0BAAQ,EAAE,CAAC;IAAX,IAAA,KAAK,2CAAM;IAAX,IAAA,KAAK,iDAAM;IAE9C,MAAM,CAAU,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoC3B,CAAC;IAEM,SAAS,CAAC,IAAoB,EAAE,aAAoB;QAC1D,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,IAAI,EAAE,EAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,aAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC,CACnG,CAAC;IACJ,CAAC;IAEO,QAAQ,GAAG,CAAC,CAAQ,EAAE,EAAE;QAC9B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEM,OAAO,GAAG,CAAC,CAAQ,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAG,CAAC,CAAC,MAA0B,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEO,MAAM;QACb,OAAO,IAAI,CAAA;;;gBAGC,IAAI,CAAC,IAAI;sBACH,IAAI,CAAC,KAAK;uBACT,IAAI,CAAC,WAAW;kBACrB,IAAI,CAAC,KAAK;oBACR,IAAI,CAAC,QAAQ;kBACf,IAAI,CAAC,QAAQ;iBACd,IAAI,CAAC,OAAO;KACxB,CAAC;IACJ,CAAC;;AA5EkC;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;iCAAwB;AACd;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;wCAA2B;AACjB;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kCAAqB;AACV;IAAnC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;qCAA2B;AAClB;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kCAAqB;AALnC,KAAK;IADjB,aAAa,CAAC,WAAW,CAAC;GACd,KAAK,CA8EjB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class Separator extends LitElement {
|
|
3
|
+
accessor orientation: 'horizontal' | 'vertical';
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../Separator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAG1C,qBACa,SAAU,SAAQ,UAAU;IACb,QAAQ,CAAC,WAAW,EAAE,YAAY,GAAG,UAAU,CAAgB;IAEzF,OAAgB,MAAM,0BAmBpB;IAEO,MAAM;CAIhB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
let Separator = class Separator extends LitElement {
|
|
10
|
+
#orientation_accessor_storage = 'horizontal';
|
|
11
|
+
get orientation() { return this.#orientation_accessor_storage; }
|
|
12
|
+
set orientation(value) { this.#orientation_accessor_storage = value; }
|
|
13
|
+
static styles = css `
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.separator {
|
|
20
|
+
background-color: hsl(var(--border, 240 3.7% 15.9%));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.horizontal {
|
|
24
|
+
height: 1px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.vertical {
|
|
29
|
+
height: 100%;
|
|
30
|
+
width: 1px;
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
render() {
|
|
34
|
+
const isHorizontal = this.orientation === 'horizontal';
|
|
35
|
+
return html ` <div part="base" class="separator ${isHorizontal ? 'horizontal' : 'vertical'}" role="none"></div> `;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
__decorate([
|
|
39
|
+
property({ type: String })
|
|
40
|
+
], Separator.prototype, "orientation", null);
|
|
41
|
+
Separator = __decorate([
|
|
42
|
+
customElement('uik-separator')
|
|
43
|
+
], Separator);
|
|
44
|
+
export { Separator };
|
|
45
|
+
//# sourceMappingURL=Separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../Separator.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAGnD,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IACJ,gCAAyC,YAAY,CAAC;IAAtD,IAAA,WAAW,iDAA2C;IAAtD,IAAA,WAAW,uDAA2C;IAEzF,MAAM,CAAU,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;GAmB3B,CAAC;IAEO,MAAM;QACb,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC;QACvD,OAAO,IAAI,CAAA,sCAAsC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,uBAAuB,CAAC;IACnH,CAAC;;AA1BkC;IAAlC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;4CAAgE;AAD9E,SAAS;IADrB,aAAa,CAAC,eAAe,CAAC;GAClB,SAAS,CA4BrB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../register.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,SAAS,CAAC;AACjB,OAAO,SAAS,CAAC;AACjB,OAAO,aAAa,CAAC"}
|
package/dist/register.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../register.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,OAAO,SAAS,CAAC;AACjB,OAAO,SAAS,CAAC;AACjB,OAAO,aAAa,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ismail-elkorchi/ui-primitives",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shadow DOM UI primitives built with Lit and driven by shared tokens.",
|
|
5
|
+
"author": "Ismail El Korchi",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"keywords": ["lit", "web-components", "ui", "shadow-dom", "primitives"],
|
|
9
|
+
"engines": {"node": ">=20.11"},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./index": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./register": {
|
|
25
|
+
"types": "./dist/register.d.ts",
|
|
26
|
+
"import": "./dist/register.js",
|
|
27
|
+
"default": "./dist/register.js"
|
|
28
|
+
},
|
|
29
|
+
"./button": {
|
|
30
|
+
"types": "./dist/Button.d.ts",
|
|
31
|
+
"import": "./dist/Button.js",
|
|
32
|
+
"default": "./dist/Button.js"
|
|
33
|
+
},
|
|
34
|
+
"./badge": {
|
|
35
|
+
"types": "./dist/Badge.d.ts",
|
|
36
|
+
"import": "./dist/Badge.js",
|
|
37
|
+
"default": "./dist/Badge.js"
|
|
38
|
+
},
|
|
39
|
+
"./input": {
|
|
40
|
+
"types": "./dist/Input.d.ts",
|
|
41
|
+
"import": "./dist/Input.js",
|
|
42
|
+
"default": "./dist/Input.js"
|
|
43
|
+
},
|
|
44
|
+
"./separator": {
|
|
45
|
+
"types": "./dist/Separator.d.ts",
|
|
46
|
+
"import": "./dist/Separator.js",
|
|
47
|
+
"default": "./dist/Separator.js"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"./dist/**/*.js"
|
|
52
|
+
],
|
|
53
|
+
"files": [
|
|
54
|
+
"dist",
|
|
55
|
+
"README.md"
|
|
56
|
+
],
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
59
|
+
"clean": "node -e \"const fs = require('fs'); fs.rmSync('dist', {recursive: true, force: true}); fs.rmSync('.tsbuildinfo', {force: true});\"",
|
|
60
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
61
|
+
"prepack": "npm run build"
|
|
62
|
+
},
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "git+https://github.com/Ismail-elkorchi/ui-kit.git",
|
|
66
|
+
"directory": "packages/ui-primitives"
|
|
67
|
+
},
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/Ismail-elkorchi/ui-kit/issues"
|
|
70
|
+
},
|
|
71
|
+
"homepage": "https://github.com/Ismail-elkorchi/ui-kit",
|
|
72
|
+
"dependencies": {
|
|
73
|
+
"lit": "^3.1.0"
|
|
74
|
+
},
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
}
|
|
78
|
+
}
|