@syware/jlib 0.13.0 → 0.15.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 +12 -8
- package/dist/atoms/jl-avatar.d.ts +2 -0
- package/dist/atoms/jl-avatar.js +11 -6
- package/dist/atoms/jl-button.d.ts +6 -0
- package/dist/atoms/jl-button.js +22 -8
- package/dist/atoms/jl-chip.js +2 -1
- package/dist/atoms/jl-input.js +3 -3
- package/dist/atoms/jl-link.d.ts +1 -0
- package/dist/atoms/jl-link.js +5 -2
- package/dist/atoms/jl-progress-ring.d.ts +2 -0
- package/dist/atoms/jl-progress-ring.js +9 -4
- package/dist/atoms/jl-progress.d.ts +1 -0
- package/dist/atoms/jl-progress.js +8 -4
- package/dist/atoms/jl-rating.d.ts +2 -0
- package/dist/atoms/jl-rating.js +11 -6
- package/dist/atoms/jl-select.css.js +1 -1
- package/dist/atoms/jl-select.d.ts +4 -0
- package/dist/atoms/jl-select.js +18 -2
- package/dist/atoms/jl-switch.css.js +1 -1
- package/dist/atoms/jl-textarea.js +2 -2
- package/dist/base/jl-form-control.d.ts +3 -2
- package/dist/base/jl-form-control.js +14 -4
- package/dist/index.d.ts +2 -1
- package/dist/lib/dom.d.ts +5 -0
- package/dist/lib/dom.js +9 -1
- package/dist/lib/download.js +10 -2
- package/dist/lib/floating.d.ts +5 -0
- package/dist/lib/floating.js +21 -2
- package/dist/lib/fuzzy.d.ts +3 -2
- package/dist/lib/fuzzy.js +15 -4
- package/dist/lib/hotkey.d.ts +13 -0
- package/dist/lib/hotkey.js +2 -1
- package/dist/lib/key-shortcut.js +11 -29
- package/dist/lib/modal.d.ts +24 -0
- package/dist/lib/modal.js +52 -0
- package/dist/lib/numeric.d.ts +5 -0
- package/dist/lib/numeric.js +11 -1
- package/dist/lib/option-filter.d.ts +2 -0
- package/dist/lib/option-filter.js +1 -1
- package/dist/lib/press.d.ts +11 -0
- package/dist/lib/press.js +31 -0
- package/dist/lib/progress.d.ts +0 -5
- package/dist/lib/progress.js +1 -9
- package/dist/lib/roving.d.ts +6 -0
- package/dist/lib/roving.js +14 -1
- package/dist/lib/table.js +12 -4
- package/dist/lib/texts-de.d.ts +12 -0
- package/dist/lib/texts-de.js +12 -0
- package/dist/lib/texts-fr.d.ts +12 -0
- package/dist/lib/texts-fr.js +12 -0
- package/dist/lib/texts.d.ts +12 -0
- package/dist/lib/texts.js +12 -0
- package/dist/molecules/jl-accordion-item.js +2 -1
- package/dist/molecules/jl-calendar.d.ts +4 -0
- package/dist/molecules/jl-calendar.js +16 -5
- package/dist/molecules/jl-chip-group.css.js +1 -1
- package/dist/molecules/jl-chip-group.js +4 -4
- package/dist/molecules/jl-code-block.css.js +1 -1
- package/dist/molecules/jl-combobox.d.ts +4 -0
- package/dist/molecules/jl-combobox.js +23 -11
- package/dist/molecules/jl-copy-button.css.js +1 -1
- package/dist/molecules/jl-copy-button.d.ts +11 -4
- package/dist/molecules/jl-copy-button.js +48 -22
- package/dist/molecules/jl-date-picker.d.ts +4 -0
- package/dist/molecules/jl-date-picker.js +18 -12
- package/dist/molecules/jl-field.d.ts +5 -1
- package/dist/molecules/jl-field.js +24 -5
- package/dist/molecules/jl-file-drop.css.js +1 -1
- package/dist/molecules/jl-file-drop.d.ts +4 -0
- package/dist/molecules/jl-file-drop.js +16 -8
- package/dist/molecules/jl-input-list.js +13 -6
- package/dist/molecules/jl-load-state.d.ts +8 -0
- package/dist/molecules/jl-load-state.js +33 -7
- package/dist/molecules/jl-menu.d.ts +21 -1
- package/dist/molecules/jl-menu.js +58 -6
- package/dist/molecules/jl-number-input.d.ts +2 -0
- package/dist/molecules/jl-number-input.js +12 -8
- package/dist/molecules/jl-radio-group.js +4 -3
- package/dist/molecules/jl-search.js +2 -2
- package/dist/molecules/jl-segmented.js +2 -2
- package/dist/molecules/jl-tabs.js +2 -2
- package/dist/molecules/jl-tag-input.css.js +1 -1
- package/dist/molecules/jl-tag-input.d.ts +4 -0
- package/dist/molecules/jl-tag-input.js +17 -9
- package/dist/molecules/jl-toast.js +10 -6
- package/dist/molecules/jl-tooltip.js +8 -2
- package/dist/organisms/jl-command-palette.css.js +1 -1
- package/dist/organisms/jl-command-palette.d.ts +2 -0
- package/dist/organisms/jl-command-palette.js +10 -4
- package/dist/organisms/jl-dialog.d.ts +3 -0
- package/dist/organisms/jl-dialog.js +13 -3
- package/dist/organisms/jl-drawer.d.ts +3 -0
- package/dist/organisms/jl-drawer.js +13 -3
- package/dist/organisms/jl-flow.d.ts +2 -0
- package/dist/organisms/jl-flow.js +29 -9
- package/dist/organisms/jl-table.css.js +1 -1
- package/dist/organisms/jl-table.d.ts +15 -4
- package/dist/organisms/jl-table.js +40 -17
- package/dist/organisms/jl-toaster.d.ts +13 -2
- package/dist/organisms/jl-toaster.js +47 -4
- package/dist/organisms/jl-tree.css.js +1 -1
- package/dist/organisms/jl-tree.d.ts +23 -4
- package/dist/organisms/jl-tree.js +74 -18
- package/dist/styles/base.css.js +1 -1
- package/dist/styles/control.css.js +1 -1
- package/dist/styles/tokens.css.js +1 -1
- package/dist/tokens.css +4 -3
- package/dist/types/jl-load-state.types.d.ts +7 -0
- package/dist/types/jl-table.types.d.ts +12 -0
- package/dist/types/jl-tree.types.d.ts +17 -0
- package/dist/types/press.types.d.ts +6 -0
- package/package.json +7 -3
- package/dist/lib/roving-index.d.ts +0 -10
- package/dist/lib/roving-index.js +0 -32
- /package/dist/types/{roving-index.types.d.ts → roving.types.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syware/jlib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "A tree-shakeable component library on Jadis and native Web Components, organised in atomic design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
|
@@ -75,18 +75,20 @@
|
|
|
75
75
|
"size": "npm run build:lib && npm run size:report",
|
|
76
76
|
"size:report": "node scripts/size-report.mjs",
|
|
77
77
|
"test": "vitest run",
|
|
78
|
+
"prepare": "node scripts/refresh-skills.mjs",
|
|
78
79
|
"test:watch": "vitest",
|
|
79
80
|
"test:e2e": "npm run build:site && vitest run --config vitest.e2e.config.ts",
|
|
80
81
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
81
82
|
"lint": "biome check .",
|
|
82
83
|
"format": "biome check --write .",
|
|
83
84
|
"check": "npm run generate -- --check && npm run lint && npm run typecheck && npm run test",
|
|
85
|
+
"check:pack": "node scripts/pack-check.mjs",
|
|
84
86
|
"prepack": "npm run build:lib",
|
|
85
87
|
"prepublishOnly": "npm run check",
|
|
86
88
|
"version": "node scripts/plugin-version.mjs"
|
|
87
89
|
},
|
|
88
90
|
"peerDependencies": {
|
|
89
|
-
"@jadis/core": "^1.
|
|
91
|
+
"@jadis/core": "^1.9.0"
|
|
90
92
|
},
|
|
91
93
|
"dependencies": {
|
|
92
94
|
"lucide": "^1.61.0"
|
|
@@ -95,8 +97,10 @@
|
|
|
95
97
|
"@biomejs/biome": "^2.6.3",
|
|
96
98
|
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
|
97
99
|
"@fontsource-variable/manrope": "^5.3.0",
|
|
98
|
-
"@jadis/core": "^1.
|
|
100
|
+
"@jadis/core": "^1.9.0",
|
|
99
101
|
"@types/node": "^24.13.3",
|
|
102
|
+
"axe-core": "^4.14.0",
|
|
103
|
+
"happy-dom": "^21.0.4",
|
|
100
104
|
"playwright-core": "^1.64.1",
|
|
101
105
|
"typescript": "^7.0.2",
|
|
102
106
|
"vite": "^8.3.5",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { RovingMove } from '../types/roving-index.types';
|
|
2
|
-
/** The first item that is not disabled, or -1 when every item is. */
|
|
3
|
-
export declare function firstEnabledIndex(disabled: readonly boolean[]): number;
|
|
4
|
-
/** The last item that is not disabled, or -1 when every item is. */
|
|
5
|
-
export declare function lastEnabledIndex(disabled: readonly boolean[]): number;
|
|
6
|
-
/**
|
|
7
|
-
* Where a move goes from the item at `from`, skipping disabled items as native radios do. From nowhere (-1), next
|
|
8
|
-
* starts at the first item and previous at the last.
|
|
9
|
-
*/
|
|
10
|
-
export declare function rovingIndex(disabled: readonly boolean[], from: number, move: RovingMove): number;
|
package/dist/lib/roving-index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// src/lib/roving-index.ts
|
|
2
|
-
var NONE = -1;
|
|
3
|
-
/** The first item that is not disabled, or -1 when every item is. */
|
|
4
|
-
function firstEnabledIndex(disabled) {
|
|
5
|
-
return disabled.indexOf(false);
|
|
6
|
-
}
|
|
7
|
-
/** The last item that is not disabled, or -1 when every item is. */
|
|
8
|
-
function lastEnabledIndex(disabled) {
|
|
9
|
-
return disabled.lastIndexOf(false);
|
|
10
|
-
}
|
|
11
|
-
/** The next enabled item after `from` in a direction, wrapping around the ends; -1 when none is enabled. */
|
|
12
|
-
function steppedIndex(disabled, from, step) {
|
|
13
|
-
const count = disabled.length;
|
|
14
|
-
for (let offset = 1; offset <= count; offset += 1) {
|
|
15
|
-
const index = ((from + step * offset) % count + count) % count;
|
|
16
|
-
if (disabled[index] === false) return index;
|
|
17
|
-
}
|
|
18
|
-
return NONE;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Where a move goes from the item at `from`, skipping disabled items as native radios do. From nowhere (-1), next
|
|
22
|
-
* starts at the first item and previous at the last.
|
|
23
|
-
*/
|
|
24
|
-
function rovingIndex(disabled, from, move) {
|
|
25
|
-
return {
|
|
26
|
-
first: () => firstEnabledIndex(disabled),
|
|
27
|
-
last: () => lastEnabledIndex(disabled),
|
|
28
|
-
next: () => steppedIndex(disabled, from, 1),
|
|
29
|
-
previous: () => steppedIndex(disabled, from === NONE ? disabled.length : from, -1)
|
|
30
|
-
}[move]();
|
|
31
|
-
}
|
|
32
|
-
export { firstEnabledIndex, lastEnabledIndex, rovingIndex };
|
|
File without changes
|