@ni/nimble-components 30.3.1 → 31.0.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 +9 -1
- package/dist/all-components-bundle.js +23 -35
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +3452 -3454
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/checkbox/index.js +2 -2
- package/dist/esm/checkbox/index.js.map +1 -1
- package/dist/esm/icons/all-icons.d.ts +0 -1
- package/dist/esm/icons/all-icons.js +0 -1
- package/dist/esm/icons/all-icons.js.map +1 -1
- package/package.json +3 -3
- package/dist/esm/icons/check-large.d.ts +0 -13
- package/dist/esm/icons/check-large.js +0 -15
- package/dist/esm/icons/check-large.js.map +0 -1
package/README.md
CHANGED
|
@@ -31,8 +31,16 @@ If you have an existing application that incorporates a module bundler like [Web
|
|
|
31
31
|
If you have a static webpage without a bundler, you can use `@ni/nimble-components` by including one of the bundled distribution files. For example:
|
|
32
32
|
|
|
33
33
|
```html
|
|
34
|
-
|
|
34
|
+
<!doctype html>
|
|
35
|
+
<html lang="en">
|
|
35
36
|
<head>
|
|
37
|
+
<meta charset="utf-8" />
|
|
38
|
+
<meta name="viewport" content="width=device-width" />
|
|
39
|
+
<title>Nimble Example</title>
|
|
40
|
+
<link
|
|
41
|
+
rel="stylesheet"
|
|
42
|
+
href="https://unpkg.com/@ni/nimble-tokens/dist/fonts/css/fonts.css"
|
|
43
|
+
/>
|
|
36
44
|
<script src="https://unpkg.com/@ni/nimble-components/dist/all-components-bundle.js"></script>
|
|
37
45
|
</head>
|
|
38
46
|
<body>
|
|
@@ -16032,7 +16032,7 @@
|
|
|
16032
16032
|
|
|
16033
16033
|
/**
|
|
16034
16034
|
* Do not edit directly
|
|
16035
|
-
* Generated on
|
|
16035
|
+
* Generated on Fri, 02 Aug 2024 22:00:00 GMT
|
|
16036
16036
|
*/
|
|
16037
16037
|
|
|
16038
16038
|
const Information100DarkUi = "#a46eff";
|
|
@@ -18916,16 +18916,12 @@
|
|
|
18916
18916
|
};
|
|
18917
18917
|
const check16X16 = {
|
|
18918
18918
|
name: 'check_16_x_16',
|
|
18919
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="
|
|
18919
|
+
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m14 4.693-8.182 8.182L2 9.057 3.636 7.42l2.25 2.25 6.546-6.545z" class="cls-1"/></svg>`,
|
|
18920
18920
|
};
|
|
18921
18921
|
const checkDot16X16 = {
|
|
18922
18922
|
name: 'check_dot_16_x_16',
|
|
18923
18923
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle cx="12.5" cy="11.5" r="1.5" class="cls-1"/><path d="m14 4.693-8.182 8.182L2 9.057 3.636 7.42l2.25 2.25 6.546-6.545Z" class="cls-2"/></svg>`,
|
|
18924
18924
|
};
|
|
18925
|
-
const checkLarge16X16 = {
|
|
18926
|
-
name: 'check_large_16_x_16',
|
|
18927
|
-
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m14 4.693-8.182 8.182L2 9.057 3.636 7.42l2.25 2.25 6.546-6.545z" class="cls-1"/></svg>`,
|
|
18928
|
-
};
|
|
18929
18925
|
const circle16X16 = {
|
|
18930
18926
|
name: 'circle_16_x_16',
|
|
18931
18927
|
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8 2a6 6 0 1 0 6 6 6 6 0 0 0-6-6m0 9.429A3.429 3.429 0 1 1 11.429 8 3.43 3.43 0 0 1 8 11.429" class="cls-1"/></svg>`,
|
|
@@ -20335,7 +20331,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
20335
20331
|
baseClass: Checkbox$1,
|
|
20336
20332
|
template: template$A,
|
|
20337
20333
|
styles: styles$M,
|
|
20338
|
-
checkedIndicator:
|
|
20334
|
+
checkedIndicator: check16X16.data,
|
|
20339
20335
|
indeterminateIndicator: minus16X16.data
|
|
20340
20336
|
});
|
|
20341
20337
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleCheckbox());
|
|
@@ -22883,18 +22879,6 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
22883
22879
|
}
|
|
22884
22880
|
registerIcon('icon-check-dot', IconCheckDot);
|
|
22885
22881
|
|
|
22886
|
-
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22887
|
-
// See generation source in nimble-components/build/generate-icons
|
|
22888
|
-
/**
|
|
22889
|
-
* The icon component for the 'checkLarge' icon
|
|
22890
|
-
*/
|
|
22891
|
-
class IconCheckLarge extends Icon {
|
|
22892
|
-
constructor() {
|
|
22893
|
-
super(checkLarge16X16);
|
|
22894
|
-
}
|
|
22895
|
-
}
|
|
22896
|
-
registerIcon('icon-check-large', IconCheckLarge);
|
|
22897
|
-
|
|
22898
22882
|
// AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
22899
22883
|
// See generation source in nimble-components/build/generate-icons
|
|
22900
22884
|
/**
|
|
@@ -39416,21 +39400,26 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39416
39400
|
}
|
|
39417
39401
|
let before = $cut.nodeBefore;
|
|
39418
39402
|
// Apply the joining algorithm
|
|
39419
|
-
if (
|
|
39403
|
+
if (deleteBarrier(state, $cut, dispatch, -1))
|
|
39420
39404
|
return true;
|
|
39421
39405
|
// If the node below has no content and the node above is
|
|
39422
39406
|
// selectable, delete the node below and select the one above.
|
|
39423
39407
|
if ($cursor.parent.content.size == 0 &&
|
|
39424
39408
|
(textblockAt(before, "end") || NodeSelection.isSelectable(before))) {
|
|
39425
|
-
let
|
|
39426
|
-
|
|
39427
|
-
if (
|
|
39428
|
-
|
|
39429
|
-
|
|
39430
|
-
|
|
39431
|
-
|
|
39409
|
+
for (let depth = $cursor.depth;; depth--) {
|
|
39410
|
+
let delStep = replaceStep(state.doc, $cursor.before(depth), $cursor.after(depth), Slice.empty);
|
|
39411
|
+
if (delStep && delStep.slice.size < delStep.to - delStep.from) {
|
|
39412
|
+
if (dispatch) {
|
|
39413
|
+
let tr = state.tr.step(delStep);
|
|
39414
|
+
tr.setSelection(textblockAt(before, "end")
|
|
39415
|
+
? Selection$2.findFrom(tr.doc.resolve(tr.mapping.map($cut.pos, -1)), -1)
|
|
39416
|
+
: NodeSelection.create(tr.doc, $cut.pos - before.nodeSize));
|
|
39417
|
+
dispatch(tr.scrollIntoView());
|
|
39418
|
+
}
|
|
39419
|
+
return true;
|
|
39432
39420
|
}
|
|
39433
|
-
|
|
39421
|
+
if (depth == 1 || $cursor.node(depth - 1).childCount > 1)
|
|
39422
|
+
break;
|
|
39434
39423
|
}
|
|
39435
39424
|
}
|
|
39436
39425
|
// If the node before is an atom, delete it
|
|
@@ -39562,7 +39551,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39562
39551
|
return false;
|
|
39563
39552
|
let after = $cut.nodeAfter;
|
|
39564
39553
|
// Try the joining algorithm
|
|
39565
|
-
if (deleteBarrier(state, $cut, dispatch))
|
|
39554
|
+
if (deleteBarrier(state, $cut, dispatch, 1))
|
|
39566
39555
|
return true;
|
|
39567
39556
|
// If the node above has no content and the node below is
|
|
39568
39557
|
// selectable, delete the node above and select the one below.
|
|
@@ -39794,13 +39783,12 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39794
39783
|
.scrollIntoView());
|
|
39795
39784
|
return true;
|
|
39796
39785
|
}
|
|
39797
|
-
function deleteBarrier(state, $cut, dispatch) {
|
|
39786
|
+
function deleteBarrier(state, $cut, dispatch, dir) {
|
|
39798
39787
|
let before = $cut.nodeBefore, after = $cut.nodeAfter, conn, match;
|
|
39799
|
-
|
|
39800
|
-
|
|
39801
|
-
if (joinMaybeClear(state, $cut, dispatch))
|
|
39788
|
+
let isolated = before.type.spec.isolating || after.type.spec.isolating;
|
|
39789
|
+
if (!isolated && joinMaybeClear(state, $cut, dispatch))
|
|
39802
39790
|
return true;
|
|
39803
|
-
let canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
39791
|
+
let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
39804
39792
|
if (canDelAfter &&
|
|
39805
39793
|
(conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) &&
|
|
39806
39794
|
match.matchType(conn[0] || after.type).validEnd) {
|
|
@@ -39817,7 +39805,7 @@ so this becomes the fallback color for the slot */ ''}
|
|
|
39817
39805
|
}
|
|
39818
39806
|
return true;
|
|
39819
39807
|
}
|
|
39820
|
-
let selAfter = Selection$2.findFrom($cut, 1);
|
|
39808
|
+
let selAfter = after.type.spec.isolating || (dir > 0 && isolated) ? null : Selection$2.findFrom($cut, 1);
|
|
39821
39809
|
let range = selAfter && selAfter.$from.blockRange(selAfter.$to), target = range && liftTarget(range);
|
|
39822
39810
|
if (target != null && target >= $cut.depth) {
|
|
39823
39811
|
if (dispatch)
|