@getufy/flint-ui 0.1.0 → 0.1.2
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 +75 -0
- package/dist/_shared/{flint-rating-9FxNfBNa.js → flint-rating-CqUGdPR_.js} +1 -1
- package/dist/_shared/{flint-rich-tree-view-BGUjgeZv.js → flint-rich-tree-view-D1Cmqb3L.js} +2 -2
- package/dist/_shared/{flint-time-picker-D00w7wjz.js → flint-time-picker-DcFN6DJD.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/rating/flint-rating.js +1 -1
- package/dist/time-picker/flint-time-picker.js +1 -1
- package/dist/tree-view/flint-rich-tree-view.js +1 -1
- package/package.json +5 -4
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @getufy/flint-ui
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@getufy/flint-ui)
|
|
4
|
+
[](https://github.com/getufy/flint-ui/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
A modern, lightweight web component library built with [Lit](https://lit.dev). 50+ components for building rich UIs — works with any framework.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @getufy/flint-ui lit
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<script type="module">
|
|
18
|
+
import '@getufy/flint-ui/button/flint-button';
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<flint-button variant="contained" color="primary">Click me</flint-button>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Or import the full bundle:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { FlintButton, FlintTabs, FlintDialog } from '@getufy/flint-ui';
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Tree-shakeable imports
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import '@getufy/flint-ui/tabs/flint-tabs';
|
|
34
|
+
import '@getufy/flint-ui/dialog/flint-dialog';
|
|
35
|
+
import '@getufy/flint-ui/date-picker/flint-date-picker';
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Components
|
|
39
|
+
|
|
40
|
+
**Inputs:** Button, Checkbox, Input, Radio, Rating, Select, Slider, Switch, Textarea, Toggle, Autocomplete, Input OTP, Date Picker, Date Range Picker, Time Picker, Transfer List
|
|
41
|
+
|
|
42
|
+
**Data Display:** Avatar, Badge, Chip, Divider, Item, List, Table, Tooltip, Typography, Kbd, Empty, Carousel
|
|
43
|
+
|
|
44
|
+
**Feedback:** Alert, Dialog, Progress, Skeleton, Snackbar, Sonner, Backdrop
|
|
45
|
+
|
|
46
|
+
**Surfaces:** Accordion, App Bar, Card, Paper
|
|
47
|
+
|
|
48
|
+
**Navigation:** Bottom Navigation, Breadcrumbs, Drawer, Link, Menu, Menubar, Navigation Menu, Pagination, Speed Dial, Stepper, Tabs
|
|
49
|
+
|
|
50
|
+
**Layout:** Box, Container, Grid, Stack, Image List, Split Panel, Resizable, Scroll Area
|
|
51
|
+
|
|
52
|
+
**Utilities:** Collapsible, Command, Copy Button, Hover Card, Image Comparer, Tree View, Relative Time, Format Date, Format Number, Visually Hidden
|
|
53
|
+
|
|
54
|
+
## Theming
|
|
55
|
+
|
|
56
|
+
```css
|
|
57
|
+
:root {
|
|
58
|
+
--flint-primary-color: #3b82f6;
|
|
59
|
+
--flint-text-color: #111827;
|
|
60
|
+
--flint-font-family: system-ui, sans-serif;
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
import '@getufy/flint-ui/theme.css'; // Light theme
|
|
66
|
+
import '@getufy/flint-ui/theme-dark.css'; // Dark theme
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## React
|
|
70
|
+
|
|
71
|
+
Looking for React wrappers? See [`@getufy/flint-ui-react`](https://www.npmjs.com/package/@getufy/flint-ui-react).
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
[MIT](https://github.com/getufy/flint-ui/blob/main/LICENSE)
|
|
@@ -43,7 +43,7 @@ var l = ":host{font-family:var(--flint-font-family);--flint-rating-color:#ffb400
|
|
|
43
43
|
}
|
|
44
44
|
_handleKeydown(e, t) {
|
|
45
45
|
if (!this._isInteractive()) return;
|
|
46
|
-
let n = this.precision === .5 ? .5 : 1, r
|
|
46
|
+
let n = this.precision === .5 ? .5 : 1, r;
|
|
47
47
|
switch (e.key) {
|
|
48
48
|
case "ArrowRight":
|
|
49
49
|
case "ArrowUp":
|
|
@@ -285,7 +285,7 @@ var c = ":host{font-family:var(--flint-font-family);display:block}.tree-root{pad
|
|
|
285
285
|
this._disabledOverrides.set(e, t), this.requestUpdate();
|
|
286
286
|
}
|
|
287
287
|
_renderItem(e, t = 0) {
|
|
288
|
-
let i = this.getItemId(e), a = this.getItemLabel(e), o = this._getEffectiveDisabled(e), s = [], c = !1, l
|
|
288
|
+
let i = this.getItemId(e), a = this.getItemLabel(e), o = this._getEffectiveDisabled(e), s = [], c = !1, l;
|
|
289
289
|
this.dataSource ? this._lazyChildren.has(i) ? (s = this._lazyChildren.get(i), l = s.length > 0) : (c = this._loading.has(i), l = this.dataSource.getChildrenCount(e) !== 0) : (s = this.getItemChildren(e) ?? [], l = s.length > 0);
|
|
290
290
|
let u = (t + 1) * 24 + 8;
|
|
291
291
|
return n`
|
|
@@ -339,7 +339,7 @@ var c = ":host{font-family:var(--flint-font-family);display:block}.tree-root{pad
|
|
|
339
339
|
let r = this._findItemAndParentInTree(e, this._orderedItems), i = this._findItemAndParentInTree(t, this._orderedItems);
|
|
340
340
|
if (!r || !i) return;
|
|
341
341
|
r.parentList.splice(r.index, 1);
|
|
342
|
-
let a
|
|
342
|
+
let a, o;
|
|
343
343
|
if (n === "inside") {
|
|
344
344
|
let e = i.item, n = this.getItemChildren(e), s = Object.keys(e).find((t) => e[t] === n) || "children";
|
|
345
345
|
e[s] || (e[s] = []);
|
|
@@ -498,7 +498,7 @@ var k = class extends t {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
_onClockKeyDown(e) {
|
|
501
|
-
let t = this._t, n
|
|
501
|
+
let t = this._t, n;
|
|
502
502
|
if (e.key === "ArrowRight" || e.key === "ArrowUp") e.preventDefault(), n = 1;
|
|
503
503
|
else if (e.key === "ArrowLeft" || e.key === "ArrowDown") e.preventDefault(), n = -1;
|
|
504
504
|
else if (e.key === "Enter" || e.key === " ") {
|
|
@@ -512,7 +512,7 @@ var k = class extends t {
|
|
|
512
512
|
else this.view === "minutes" ? this._emit(t.h, (t.m + n + 60) % 60, t.s) : this._emit(t.h, t.m, (t.s + n + 60) % 60);
|
|
513
513
|
}
|
|
514
514
|
_renderFace() {
|
|
515
|
-
let e = this._renderT, t
|
|
515
|
+
let e = this._renderT, t, n;
|
|
516
516
|
if (this.view === "hours") {
|
|
517
517
|
let r;
|
|
518
518
|
r = this.ampm ? x(e.h).hour : e.h === 0 || e.h > 12 ? e.h % 12 : e.h, t = r / 12 * 360, n = this.ampm ? 100 : e.h === 0 || e.h > 12 ? 64 : 100;
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { t as d } from "./_shared/flint-fab-D8nKcAan.js";
|
|
|
13
13
|
import { t as f } from "./_shared/flint-autocomplete-B1tLM8lN.js";
|
|
14
14
|
import { t as p } from "./_shared/flint-checkbox-GnuZq0Yy.js";
|
|
15
15
|
import { n as m, t as h } from "./_shared/flint-radio-B_C3wNRn.js";
|
|
16
|
-
import { t as g } from "./_shared/flint-rating-
|
|
16
|
+
import { t as g } from "./_shared/flint-rating-CqUGdPR_.js";
|
|
17
17
|
import { t as _ } from "./_shared/flint-switch-DN7VI9jT.js";
|
|
18
18
|
import { t as v } from "./_shared/flint-textarea-wDEUC9Bt.js";
|
|
19
19
|
import { t as y } from "./_shared/flint-transfer-list-DZsAcF0l.js";
|
|
@@ -62,10 +62,10 @@ import { t as ze } from "./_shared/flint-date-field-CYSc9ezt.js";
|
|
|
62
62
|
import { t as Be } from "./_shared/flint-single-input-date-range-field-BVGf6515.js";
|
|
63
63
|
import { t as Ve } from "./_shared/flint-date-range-calendar-BPBdO9n3.js";
|
|
64
64
|
import { t as He } from "./_shared/flint-date-range-picker-DiVjn_ST.js";
|
|
65
|
-
import { a as Ue, c as We, i as Ge, n as Ke, o as qe, r as Je, s as Ye, t as Xe } from "./_shared/flint-time-picker-
|
|
65
|
+
import { a as Ue, c as We, i as Ge, n as Ke, o as qe, r as Je, s as Ye, t as Xe } from "./_shared/flint-time-picker-DcFN6DJD.js";
|
|
66
66
|
import { t as Ze } from "./_shared/flint-tree-item-iMT216uo.js";
|
|
67
67
|
import { t as Qe } from "./_shared/flint-simple-tree-view-DD3zHLzJ.js";
|
|
68
|
-
import { t as $e } from "./_shared/flint-rich-tree-view-
|
|
68
|
+
import { t as $e } from "./_shared/flint-rich-tree-view-D1Cmqb3L.js";
|
|
69
69
|
import { a as et, c as tt, i as nt, l as rt, n as it, o as at, r as ot, s as st, t as ct } from "./_shared/flint-command-DGhby0QI.js";
|
|
70
70
|
import { a as lt, i as ut, n as dt, r as ft, t as pt } from "./_shared/flint-carousel-jwZ5C4e_.js";
|
|
71
71
|
import { a as mt, i as ht, n as gt, o as _t, r as vt, t as yt } from "./_shared/flint-empty-Bq8DuJQT.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../_shared/flint-rating-
|
|
1
|
+
import { t as e } from "../_shared/flint-rating-CqUGdPR_.js";
|
|
2
2
|
export { e as FlintRating };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../_shared/flint-time-picker-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../_shared/flint-time-picker-DcFN6DJD.js";
|
|
2
2
|
export { s as FlintDesktopTimePicker, r as FlintDigitalClock, a as FlintMobileTimePicker, n as FlintMultiSectionDigitalClock, e as FlintStaticTimePicker, i as FlintTimeClock, o as FlintTimeField, t as FlintTimePicker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../_shared/flint-rich-tree-view-
|
|
1
|
+
import { t as e } from "../_shared/flint-rich-tree-view-D1Cmqb3L.js";
|
|
2
2
|
export { e as FlintRichTreeView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getufy/flint-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"src/theme-dark.css"
|
|
431
431
|
],
|
|
432
432
|
"dependencies": {
|
|
433
|
-
"lit": "^3.
|
|
433
|
+
"lit": "^3.0.0"
|
|
434
434
|
},
|
|
435
435
|
"peerDependencies": {
|
|
436
436
|
"lit": "^3.0.0"
|
|
@@ -442,6 +442,7 @@
|
|
|
442
442
|
},
|
|
443
443
|
"devDependencies": {
|
|
444
444
|
"@chromatic-com/storybook": "^5.0.1",
|
|
445
|
+
"@eslint/js": "^10.0.1",
|
|
445
446
|
"@open-wc/testing": "^4.0.0",
|
|
446
447
|
"@storybook/addon-a11y": "^10.2.19",
|
|
447
448
|
"@storybook/addon-docs": "^10.2.19",
|
|
@@ -454,10 +455,10 @@
|
|
|
454
455
|
"@types/node": "^25.5.0",
|
|
455
456
|
"@vitest/browser-playwright": "^4.1.0",
|
|
456
457
|
"@vitest/coverage-v8": "^4.1.0",
|
|
457
|
-
"eslint": "^
|
|
458
|
+
"eslint": "^10.0.3",
|
|
458
459
|
"eslint-plugin-lit": "^2.2.1",
|
|
459
460
|
"eslint-plugin-wc": "^3.1.0",
|
|
460
|
-
"jsdom": "^
|
|
461
|
+
"jsdom": "^28.1.0",
|
|
461
462
|
"lit-element": "^4.2.2",
|
|
462
463
|
"lit-html": "^3.3.2",
|
|
463
464
|
"playwright": "^1.58.2",
|