@nanoporetech-digital/components 2.5.0 → 2.8.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/CHANGELOG.md +45 -0
- package/dist/cjs/{form-control-3bc82e3e.js → form-control-8f530f7d.js} +18 -20
- package/dist/cjs/form-control-8f530f7d.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/nano-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
- package/dist/cjs/nano-date-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/nano-file-upload.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-global-nav.cjs.entry.js +50 -47
- package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +6 -6
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-nav-item_2.cjs.entry.js +18 -13
- package/dist/cjs/nano-nav-item_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{popover-8c86d338.js → popover-5f152a19.js} +3 -8
- package/dist/cjs/{popover-8c86d338.js.map → popover-5f152a19.js.map} +1 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/algolia/algolia-filter.js +2 -2
- package/dist/collection/components/algolia/algolia-input.js +5 -5
- package/dist/collection/components/algolia/algolia-results.js +1 -1
- package/dist/collection/components/algolia/algolia.js +6 -6
- package/dist/collection/components/checkbox/checkbox-group.css +4 -1
- package/dist/collection/components/checkbox/checkbox-group.js +2 -2
- package/dist/collection/components/checkbox/checkbox.css +2 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/datalist/datalist.js +1 -1
- package/dist/collection/components/date-input/date-input.css +1 -0
- package/dist/collection/components/date-input/date-input.js +7 -7
- package/dist/collection/components/date-picker/date-picker.js +5 -5
- package/dist/collection/components/details/details.js +1 -1
- package/dist/collection/components/dialog/dialog.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/file-upload/file-upload.css +2 -2
- package/dist/collection/components/file-upload/file-upload.js +4 -4
- package/dist/collection/components/form-control/form-control.js +17 -19
- package/dist/collection/components/form-control/form-control.js.map +1 -1
- package/dist/collection/components/global-nav/global-nav.js +78 -50
- package/dist/collection/components/global-nav/global-nav.js.map +1 -1
- package/dist/collection/components/grid/grid-item.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.css +200 -258
- package/dist/collection/components/input/input.js +9 -9
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/nav-item/nav-item.css +22 -0
- package/dist/collection/components/nav-item/nav-item.js +34 -6
- package/dist/collection/components/nav-item/nav-item.js.map +1 -1
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/resize-observe/resize-observe.js +1 -1
- package/dist/collection/components/select/select.css +223 -274
- package/dist/collection/components/select/select.js +15 -18
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/slides/slides.js +7 -7
- package/dist/collection/components/tabs/tab-group.js +2 -2
- package/dist/collection/utils/popover.js +2 -7
- package/dist/collection/utils/popover.js.map +1 -1
- package/dist/components/form-control.js +17 -19
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/input.js +5 -5
- package/dist/components/input.js.map +1 -1
- package/dist/components/nano-checkbox-group.js +1 -1
- package/dist/components/nano-checkbox-group.js.map +1 -1
- package/dist/components/nano-checkbox.js +1 -1
- package/dist/components/nano-date-input.js +1 -1
- package/dist/components/nano-date-input.js.map +1 -1
- package/dist/components/nano-file-upload.js +1 -1
- package/dist/components/nano-file-upload.js.map +1 -1
- package/dist/components/nano-global-nav.js +51 -47
- package/dist/components/nano-global-nav.js.map +1 -1
- package/dist/components/nav-item.js +11 -2
- package/dist/components/nav-item.js.map +1 -1
- package/dist/components/popover.js +2 -7
- package/dist/components/popover.js.map +1 -1
- package/dist/components/select.js +7 -10
- package/dist/components/select.js.map +1 -1
- package/dist/custom-elements/index.js +97 -96
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/{form-control-67eeb108.js → form-control-c52b6256.js} +18 -20
- package/dist/esm/form-control-c52b6256.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js +1 -1
- package/dist/esm/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm/nano-checkbox.entry.js +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-date-input.entry.js +1 -1
- package/dist/esm/nano-date-input.entry.js.map +1 -1
- package/dist/esm/nano-dropdown.entry.js +1 -1
- package/dist/esm/nano-file-upload.entry.js +1 -1
- package/dist/esm/nano-file-upload.entry.js.map +1 -1
- package/dist/esm/nano-global-nav.entry.js +50 -47
- package/dist/esm/nano-global-nav.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +6 -6
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-nav-item_2.entry.js +18 -13
- package/dist/esm/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm/nano-tooltip.entry.js +1 -1
- package/dist/esm/{popover-7639005b.js → popover-a03563f3.js} +3 -8
- package/dist/esm/{popover-7639005b.js.map → popover-a03563f3.js.map} +1 -1
- package/dist/esm-es5/form-control-c52b6256.js +5 -0
- package/dist/esm-es5/form-control-c52b6256.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js +1 -1
- package/dist/esm-es5/nano-checkbox-group.entry.js.map +1 -1
- package/dist/esm-es5/nano-checkbox.entry.js +1 -1
- package/dist/esm-es5/nano-components.js +1 -1
- package/dist/esm-es5/nano-components.js.map +1 -1
- package/dist/esm-es5/nano-date-input.entry.js +1 -1
- package/dist/esm-es5/nano-date-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-dropdown.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js +1 -1
- package/dist/esm-es5/nano-file-upload.entry.js.map +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js +1 -1
- package/dist/esm-es5/nano-global-nav.entry.js.map +1 -1
- package/dist/esm-es5/nano-input.entry.js +2 -2
- package/dist/esm-es5/nano-input.entry.js.map +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js +1 -1
- package/dist/esm-es5/nano-nav-item_2.entry.js.map +1 -1
- package/dist/esm-es5/nano-tooltip.entry.js +1 -1
- package/dist/esm-es5/{popover-7639005b.js → popover-a03563f3.js} +2 -2
- package/dist/esm-es5/popover-a03563f3.js.map +1 -0
- package/dist/nano-components/nano-components.esm.js +1 -1
- package/dist/nano-components/nano-components.esm.js.map +1 -1
- package/dist/nano-components/p-096682d9.system.js +1 -1
- package/dist/nano-components/p-096682d9.system.js.map +1 -1
- package/dist/nano-components/{p-820d9e23.system.entry.js → p-09e38c5f.system.entry.js} +2 -2
- package/dist/nano-components/p-09e38c5f.system.entry.js.map +1 -0
- package/dist/nano-components/p-10a6216d.system.entry.js +5 -0
- package/dist/nano-components/p-10a6216d.system.entry.js.map +1 -0
- package/dist/nano-components/p-18176c26.system.entry.js +5 -0
- package/dist/nano-components/p-18176c26.system.entry.js.map +1 -0
- package/dist/nano-components/{p-e7fdc62d.entry.js → p-1e8321ea.entry.js} +2 -2
- package/dist/nano-components/{p-e7fdc62d.entry.js.map → p-1e8321ea.entry.js.map} +0 -0
- package/dist/nano-components/{p-f9e30f31.system.entry.js → p-2057d480.system.entry.js} +2 -2
- package/dist/nano-components/p-2057d480.system.entry.js.map +1 -0
- package/dist/nano-components/{p-9acc4596.system.entry.js → p-2ae4918d.system.entry.js} +3 -3
- package/dist/nano-components/{p-9acc4596.system.entry.js.map → p-2ae4918d.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-c9d09839.entry.js → p-313970ff.entry.js} +2 -2
- package/dist/nano-components/{p-c9d09839.entry.js.map → p-313970ff.entry.js.map} +0 -0
- package/dist/nano-components/{p-178c34e3.js → p-3de7735c.js} +2 -2
- package/dist/nano-components/p-3de7735c.js.map +1 -0
- package/dist/nano-components/{p-93448bcd.system.entry.js → p-4265cf95.system.entry.js} +2 -2
- package/dist/nano-components/{p-93448bcd.system.entry.js.map → p-4265cf95.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-f3bf942d.entry.js → p-457d4893.entry.js} +2 -2
- package/dist/nano-components/p-457d4893.entry.js.map +1 -0
- package/dist/nano-components/{p-383fda90.system.entry.js → p-4870e76d.system.entry.js} +2 -2
- package/dist/nano-components/{p-383fda90.system.entry.js.map → p-4870e76d.system.entry.js.map} +0 -0
- package/dist/nano-components/{p-20db18f3.entry.js → p-5a315696.entry.js} +2 -2
- package/dist/nano-components/{p-20db18f3.entry.js.map → p-5a315696.entry.js.map} +0 -0
- package/dist/nano-components/p-802e1416.system.entry.js +5 -0
- package/dist/nano-components/{p-ef4e0912.system.entry.js.map → p-802e1416.system.entry.js.map} +1 -1
- package/dist/nano-components/p-829d7f05.system.entry.js +5 -0
- package/dist/nano-components/p-829d7f05.system.entry.js.map +1 -0
- package/dist/nano-components/p-9d35768b.entry.js +5 -0
- package/dist/nano-components/p-9d35768b.entry.js.map +1 -0
- package/dist/nano-components/p-aaef7cc7.js +5 -0
- package/dist/nano-components/p-aaef7cc7.js.map +1 -0
- package/dist/nano-components/p-af7abf5e.entry.js +5 -0
- package/dist/nano-components/p-af7abf5e.entry.js.map +1 -0
- package/dist/nano-components/{p-8de6e276.entry.js → p-b4f8e541.entry.js} +2 -2
- package/dist/nano-components/p-b4f8e541.entry.js.map +1 -0
- package/dist/nano-components/p-df0897ec.system.js +5 -0
- package/dist/nano-components/p-df0897ec.system.js.map +1 -0
- package/dist/nano-components/{p-9745d44e.system.js → p-e43ec257.system.js} +2 -2
- package/dist/nano-components/p-e43ec257.system.js.map +1 -0
- package/dist/nano-components/p-e7c69d4f.entry.js +5 -0
- package/dist/nano-components/{p-d6569144.entry.js.map → p-e7c69d4f.entry.js.map} +1 -1
- package/dist/nano-components/p-f79c3ea0.entry.js +5 -0
- package/dist/nano-components/p-f79c3ea0.entry.js.map +1 -0
- package/dist/types/components/global-nav/global-nav.d.ts +10 -3
- package/dist/types/components/nav-item/nav-item.d.ts +4 -0
- package/dist/types/components/select/select.d.ts +0 -1
- package/dist/types/components.d.ts +19 -3
- package/docs-json.json +52 -15
- package/docs-vscode.json +9 -1
- package/package.json +4 -3
- package/dist/cjs/form-control-3bc82e3e.js.map +0 -1
- package/dist/esm/form-control-67eeb108.js.map +0 -1
- package/dist/esm-es5/form-control-67eeb108.js +0 -5
- package/dist/esm-es5/form-control-67eeb108.js.map +0 -1
- package/dist/esm-es5/popover-7639005b.js.map +0 -1
- package/dist/nano-components/p-12f70017.system.entry.js +0 -5
- package/dist/nano-components/p-12f70017.system.entry.js.map +0 -1
- package/dist/nano-components/p-178c34e3.js.map +0 -1
- package/dist/nano-components/p-2559e9c1.entry.js +0 -5
- package/dist/nano-components/p-2559e9c1.entry.js.map +0 -1
- package/dist/nano-components/p-2be7aab0.system.entry.js +0 -5
- package/dist/nano-components/p-2be7aab0.system.entry.js.map +0 -1
- package/dist/nano-components/p-2e38a927.entry.js +0 -5
- package/dist/nano-components/p-2e38a927.entry.js.map +0 -1
- package/dist/nano-components/p-3a13948a.system.entry.js +0 -5
- package/dist/nano-components/p-3a13948a.system.entry.js.map +0 -1
- package/dist/nano-components/p-672e5547.js +0 -5
- package/dist/nano-components/p-672e5547.js.map +0 -1
- package/dist/nano-components/p-6dd58c39.entry.js +0 -5
- package/dist/nano-components/p-6dd58c39.entry.js.map +0 -1
- package/dist/nano-components/p-820d9e23.system.entry.js.map +0 -1
- package/dist/nano-components/p-8de6e276.entry.js.map +0 -1
- package/dist/nano-components/p-9745d44e.system.js.map +0 -1
- package/dist/nano-components/p-d6569144.entry.js +0 -5
- package/dist/nano-components/p-ea5eb591.system.js +0 -5
- package/dist/nano-components/p-ea5eb591.system.js.map +0 -1
- package/dist/nano-components/p-ef4e0912.system.entry.js +0 -5
- package/dist/nano-components/p-f3bf942d.entry.js.map +0 -1
- package/dist/nano-components/p-f9e30f31.system.entry.js.map +0 -1
@@ -47,7 +47,7 @@ export class Accordion {
|
|
47
47
|
"references": {
|
48
48
|
"Color": {
|
49
49
|
"location": "import",
|
50
|
-
"path": "/builds/
|
50
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
51
51
|
}
|
52
52
|
}
|
53
53
|
},
|
@@ -305,7 +305,7 @@ export class Alert {
|
|
305
305
|
"references": {
|
306
306
|
"Color": {
|
307
307
|
"location": "import",
|
308
|
-
"path": "/builds/
|
308
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
309
309
|
}
|
310
310
|
}
|
311
311
|
},
|
@@ -362,7 +362,7 @@ export class AlgoliaFilter {
|
|
362
362
|
"references": {
|
363
363
|
"StorageMethods": {
|
364
364
|
"location": "import",
|
365
|
-
"path": "/builds/
|
365
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/store/component-store.ts"
|
366
366
|
}
|
367
367
|
}
|
368
368
|
},
|
@@ -405,7 +405,7 @@ export class AlgoliaFilter {
|
|
405
405
|
"references": {
|
406
406
|
"FilterChangeEventDetail": {
|
407
407
|
"location": "import",
|
408
|
-
"path": "/builds/
|
408
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
409
409
|
}
|
410
410
|
}
|
411
411
|
}
|
@@ -228,7 +228,7 @@ export class AlgoliaInput {
|
|
228
228
|
"references": {
|
229
229
|
"SearchIndex": {
|
230
230
|
"location": "import",
|
231
|
-
"path": "/builds/
|
231
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
232
232
|
}
|
233
233
|
}
|
234
234
|
},
|
@@ -349,7 +349,7 @@ export class AlgoliaInput {
|
|
349
349
|
"references": {
|
350
350
|
"StorageMethods": {
|
351
351
|
"location": "import",
|
352
|
-
"path": "/builds/
|
352
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/store/component-store.ts"
|
353
353
|
}
|
354
354
|
}
|
355
355
|
},
|
@@ -390,7 +390,7 @@ export class AlgoliaInput {
|
|
390
390
|
"references": {
|
391
391
|
"AloliaSearchResultDetail": {
|
392
392
|
"location": "import",
|
393
|
-
"path": "/builds/
|
393
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
394
394
|
}
|
395
395
|
}
|
396
396
|
}
|
@@ -410,7 +410,7 @@ export class AlgoliaInput {
|
|
410
410
|
"references": {
|
411
411
|
"AloliaSearchResultDetail": {
|
412
412
|
"location": "import",
|
413
|
-
"path": "/builds/
|
413
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
414
414
|
}
|
415
415
|
}
|
416
416
|
}
|
@@ -430,7 +430,7 @@ export class AlgoliaInput {
|
|
430
430
|
"references": {
|
431
431
|
"AloliaSearchResultDetail": {
|
432
432
|
"location": "import",
|
433
|
-
"path": "/builds/
|
433
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
434
434
|
}
|
435
435
|
}
|
436
436
|
}
|
@@ -251,7 +251,7 @@ export class AlgoliaResults {
|
|
251
251
|
"references": {
|
252
252
|
"PageChangeEventDetail": {
|
253
253
|
"location": "import",
|
254
|
-
"path": "/builds/
|
254
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
255
255
|
}
|
256
256
|
}
|
257
257
|
}
|
@@ -738,7 +738,7 @@ export class Algolia {
|
|
738
738
|
"references": {
|
739
739
|
"SearchIndex": {
|
740
740
|
"location": "import",
|
741
|
-
"path": "/builds/
|
741
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
742
742
|
}
|
743
743
|
}
|
744
744
|
},
|
@@ -982,7 +982,7 @@ export class Algolia {
|
|
982
982
|
"references": {
|
983
983
|
"StorageMethods": {
|
984
984
|
"location": "import",
|
985
|
-
"path": "/builds/
|
985
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/store/component-store.ts"
|
986
986
|
}
|
987
987
|
}
|
988
988
|
},
|
@@ -1047,7 +1047,7 @@ export class Algolia {
|
|
1047
1047
|
"references": {
|
1048
1048
|
"IndexResult": {
|
1049
1049
|
"location": "import",
|
1050
|
-
"path": "/builds/
|
1050
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1051
1051
|
}
|
1052
1052
|
}
|
1053
1053
|
}
|
@@ -1067,7 +1067,7 @@ export class Algolia {
|
|
1067
1067
|
"references": {
|
1068
1068
|
"IndexResult": {
|
1069
1069
|
"location": "import",
|
1070
|
-
"path": "/builds/
|
1070
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1071
1071
|
}
|
1072
1072
|
}
|
1073
1073
|
}
|
@@ -1087,7 +1087,7 @@ export class Algolia {
|
|
1087
1087
|
"references": {
|
1088
1088
|
"IndexResult": {
|
1089
1089
|
"location": "import",
|
1090
|
-
"path": "/builds/
|
1090
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1091
1091
|
}
|
1092
1092
|
}
|
1093
1093
|
}
|
@@ -1107,7 +1107,7 @@ export class Algolia {
|
|
1107
1107
|
"references": {
|
1108
1108
|
"IndexResult": {
|
1109
1109
|
"location": "import",
|
1110
|
-
"path": "/builds/
|
1110
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1111
1111
|
}
|
1112
1112
|
}
|
1113
1113
|
}
|
@@ -66,7 +66,7 @@
|
|
66
66
|
margin: 0;
|
67
67
|
padding: 0;
|
68
68
|
}
|
69
|
-
.
|
69
|
+
.nanogroupcb__error, .nanogroupcb__help, .nanogroupcb__more {
|
70
70
|
display: block;
|
71
71
|
width: 100%;
|
72
72
|
overflow: hidden;
|
@@ -78,6 +78,9 @@
|
|
78
78
|
padding: 0 0 var(--label-padding);
|
79
79
|
margin: 0;
|
80
80
|
line-height: 1;
|
81
|
+
white-space: normal;
|
82
|
+
display: block;
|
83
|
+
width: 100%;
|
81
84
|
}
|
82
85
|
:host([invalid]:not([invalid=false])) .nanogroupcb__legend {
|
83
86
|
color: var(--label-color--invalid);
|
@@ -370,7 +370,7 @@ export class CheckboxGroup {
|
|
370
370
|
"references": {
|
371
371
|
"ControlValidityEventDetail": {
|
372
372
|
"location": "import",
|
373
|
-
"path": "/builds/
|
373
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
374
374
|
}
|
375
375
|
}
|
376
376
|
}
|
@@ -392,7 +392,7 @@ export class CheckboxGroup {
|
|
392
392
|
},
|
393
393
|
"ControlValidity": {
|
394
394
|
"location": "import",
|
395
|
-
"path": "/builds/
|
395
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
396
396
|
}
|
397
397
|
},
|
398
398
|
"return": "Promise<ControlValidity>"
|
@@ -12,7 +12,7 @@
|
|
12
12
|
}
|
13
13
|
:host {
|
14
14
|
/**
|
15
|
-
* @prop --control-invalid-style: Control box-shadow when invalid. Defaults to to var(--nano-control-focus-shadow, 0 0 0 0.1875rem #
|
15
|
+
* @prop --control-invalid-style: Control box-shadow when invalid. Defaults to to var(--nano-control-focus-shadow, 0 0 0 0.1875rem #e4e6e8);
|
16
16
|
* @prop --focus-shadow: Control focus box-shadow. Defaults to to var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8)));
|
17
17
|
* @prop --padding: padding around radio and checkbox controls. Defaults to initial;
|
18
18
|
* @prop --control-padding: padding around tag and segmented controls text. Various defaults.
|
@@ -34,7 +34,7 @@
|
|
34
34
|
* @prop --segment-shadow: 0 1px 4px rgba(0,0,0,.2);
|
35
35
|
*/
|
36
36
|
--focus-shadow: var(--nano-control-focus-shadow, 0 0 0 0.1875rem var(--nano-control-focus-color, rgba(144, 198, 231, 0.8)));
|
37
|
-
--invalid-shadow: var(--nano-control-focus-shadow, 0 0 0 0.1875rem #
|
37
|
+
--invalid-shadow: var(--nano-control-focus-shadow, 0 0 0 0.1875rem #e4e6e8);
|
38
38
|
--padding: initial;
|
39
39
|
--check-bg-color: #fff;
|
40
40
|
--check-border-style: 1px solid #b5aea7;
|
@@ -405,7 +405,7 @@ export class Checkbox {
|
|
405
405
|
"references": {
|
406
406
|
"Color": {
|
407
407
|
"location": "import",
|
408
|
-
"path": "/builds/
|
408
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
409
409
|
}
|
410
410
|
}
|
411
411
|
},
|
@@ -441,7 +441,7 @@ export class Checkbox {
|
|
441
441
|
"references": {
|
442
442
|
"CheckboxChangeEventDetail": {
|
443
443
|
"location": "import",
|
444
|
-
"path": "/builds/
|
444
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
445
445
|
}
|
446
446
|
}
|
447
447
|
}
|
@@ -512,7 +512,7 @@ export class Checkbox {
|
|
512
512
|
},
|
513
513
|
"ControlValidity": {
|
514
514
|
"location": "import",
|
515
|
-
"path": "/builds/
|
515
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
516
516
|
}
|
517
517
|
},
|
518
518
|
"return": "Promise<ControlValidity>"
|
@@ -550,7 +550,7 @@ export class DataList {
|
|
550
550
|
"references": {
|
551
551
|
"OptionInterface": {
|
552
552
|
"location": "import",
|
553
|
-
"path": "/builds/
|
553
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
554
554
|
}
|
555
555
|
}
|
556
556
|
},
|
@@ -405,7 +405,7 @@ export class DateInput {
|
|
405
405
|
"references": {
|
406
406
|
"LocalDateOpts": {
|
407
407
|
"location": "import",
|
408
|
-
"path": "/builds/
|
408
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
409
409
|
}
|
410
410
|
}
|
411
411
|
},
|
@@ -526,7 +526,7 @@ export class DateInput {
|
|
526
526
|
"references": {
|
527
527
|
"DaysOfWeek": {
|
528
528
|
"location": "import",
|
529
|
-
"path": "/builds/
|
529
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/date-utils.ts"
|
530
530
|
}
|
531
531
|
}
|
532
532
|
},
|
@@ -550,7 +550,7 @@ export class DateInput {
|
|
550
550
|
"references": {
|
551
551
|
"DuetLocalizedText": {
|
552
552
|
"location": "import",
|
553
|
-
"path": "/builds/
|
553
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
554
554
|
}
|
555
555
|
}
|
556
556
|
},
|
@@ -592,7 +592,7 @@ export class DateInput {
|
|
592
592
|
"references": {
|
593
593
|
"Color": {
|
594
594
|
"location": "import",
|
595
|
-
"path": "/builds/
|
595
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
596
596
|
}
|
597
597
|
}
|
598
598
|
},
|
@@ -962,7 +962,7 @@ export class DateInput {
|
|
962
962
|
"references": {
|
963
963
|
"DateInputChangeEventDetail": {
|
964
964
|
"location": "import",
|
965
|
-
"path": "/builds/
|
965
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
966
966
|
}
|
967
967
|
}
|
968
968
|
}
|
@@ -985,7 +985,7 @@ export class DateInput {
|
|
985
985
|
"references": {
|
986
986
|
"ControlValidityEventDetail": {
|
987
987
|
"location": "import",
|
988
|
-
"path": "/builds/
|
988
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
989
989
|
}
|
990
990
|
}
|
991
991
|
}
|
@@ -1007,7 +1007,7 @@ export class DateInput {
|
|
1007
1007
|
},
|
1008
1008
|
"ControlValidity": {
|
1009
1009
|
"location": "import",
|
1010
|
-
"path": "/builds/
|
1010
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
1011
1011
|
}
|
1012
1012
|
},
|
1013
1013
|
"return": "Promise<ControlValidity>"
|
@@ -370,7 +370,7 @@ export class DatePicker {
|
|
370
370
|
"references": {
|
371
371
|
"DaysOfWeek": {
|
372
372
|
"location": "import",
|
373
|
-
"path": "/builds/
|
373
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/date-utils.ts"
|
374
374
|
}
|
375
375
|
}
|
376
376
|
},
|
@@ -395,7 +395,7 @@ export class DatePicker {
|
|
395
395
|
"references": {
|
396
396
|
"DuetLocalizedText": {
|
397
397
|
"location": "import",
|
398
|
-
"path": "/builds/
|
398
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
399
399
|
}
|
400
400
|
}
|
401
401
|
},
|
@@ -418,7 +418,7 @@ export class DatePicker {
|
|
418
418
|
"references": {
|
419
419
|
"Color": {
|
420
420
|
"location": "import",
|
421
|
-
"path": "/builds/
|
421
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
422
422
|
}
|
423
423
|
}
|
424
424
|
},
|
@@ -442,7 +442,7 @@ export class DatePicker {
|
|
442
442
|
"references": {
|
443
443
|
"DateDisabledPredicate": {
|
444
444
|
"location": "import",
|
445
|
-
"path": "/builds/
|
445
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
446
446
|
}
|
447
447
|
}
|
448
448
|
},
|
@@ -521,7 +521,7 @@ export class DatePicker {
|
|
521
521
|
"references": {
|
522
522
|
"PickerChangeEvent": {
|
523
523
|
"location": "import",
|
524
|
-
"path": "/builds/
|
524
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
525
525
|
}
|
526
526
|
}
|
527
527
|
}
|
@@ -239,7 +239,7 @@ export class Details {
|
|
239
239
|
"references": {
|
240
240
|
"Color": {
|
241
241
|
"location": "import",
|
242
|
-
"path": "/builds/
|
242
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
243
243
|
}
|
244
244
|
}
|
245
245
|
},
|
@@ -336,7 +336,7 @@ export class Dialog {
|
|
336
336
|
"references": {
|
337
337
|
"StorageMethods": {
|
338
338
|
"location": "import",
|
339
|
-
"path": "/builds/
|
339
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/store/component-store.ts"
|
340
340
|
}
|
341
341
|
}
|
342
342
|
},
|
@@ -410,7 +410,7 @@ export class Dropdown {
|
|
410
410
|
"references": {
|
411
411
|
"PopoverPlacement": {
|
412
412
|
"location": "import",
|
413
|
-
"path": "/builds/
|
413
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/utils/popover.ts"
|
414
414
|
}
|
415
415
|
}
|
416
416
|
},
|
@@ -29,7 +29,7 @@
|
|
29
29
|
* @prop --drop-border-tint: Default value var(--nano-color-primary-rgb, 0, 116, 149);
|
30
30
|
* @prop --drop-border-width: Default value 2px;
|
31
31
|
* @prop --drop-border-radius: Default value 5px;
|
32
|
-
* @prop --drop-bg--invalid: Default value var(--nano-input-background-color,
|
32
|
+
* @prop --drop-bg--invalid: Default value var(--nano-input-background-color, white);
|
33
33
|
* @prop --drop-border--invalid: Default value var(--nano-color-danger-rgb, 239, 65, 53);
|
34
34
|
|
35
35
|
* @prop --btn-bg: Default value var(--nano-color-primary, #007495);
|
@@ -55,7 +55,7 @@
|
|
55
55
|
--drop-border-tint: var(--nano-color-primary-rgb, 0, 116, 149);
|
56
56
|
--drop-border-width: 2px;
|
57
57
|
--drop-border-radius: 5px;
|
58
|
-
--drop-bg--invalid: var(--nano-input-background-color,
|
58
|
+
--drop-bg--invalid: var(--nano-input-background-color, white);
|
59
59
|
--drop-border--invalid: var(--nano-color-danger-rgb, 239, 65, 53);
|
60
60
|
--btn-bg: var(--nano-color-primary, #007495);
|
61
61
|
--btn-text: var(--nano-color-primary-contrast, #fff);
|
@@ -655,7 +655,7 @@ export class FileUpload {
|
|
655
655
|
"references": {
|
656
656
|
"FileWithUrl": {
|
657
657
|
"location": "import",
|
658
|
-
"path": "/builds/
|
658
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
659
659
|
}
|
660
660
|
}
|
661
661
|
},
|
@@ -713,7 +713,7 @@ export class FileUpload {
|
|
713
713
|
"references": {
|
714
714
|
"FileInputChangeEventDetail": {
|
715
715
|
"location": "import",
|
716
|
-
"path": "/builds/
|
716
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
717
717
|
}
|
718
718
|
}
|
719
719
|
}
|
@@ -766,7 +766,7 @@ export class FileUpload {
|
|
766
766
|
"references": {
|
767
767
|
"ControlValidityEventDetail": {
|
768
768
|
"location": "import",
|
769
|
-
"path": "/builds/
|
769
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
770
770
|
}
|
771
771
|
}
|
772
772
|
}
|
@@ -788,7 +788,7 @@ export class FileUpload {
|
|
788
788
|
},
|
789
789
|
"ControlValidity": {
|
790
790
|
"location": "import",
|
791
|
-
"path": "/builds/
|
791
|
+
"path": "/builds/RxH386Vg/0/Digital/nano-components/packages/components/src/interface.d.ts"
|
792
792
|
}
|
793
793
|
},
|
794
794
|
"return": "Promise<ControlValidity>"
|
@@ -6,45 +6,43 @@ const renderLabel = ({ label, hasLabelSlot, controlId, labelId, floatLabel, plac
|
|
6
6
|
if (!label && !hasLabelSlot)
|
7
7
|
return;
|
8
8
|
if (floatLabel) {
|
9
|
-
return (h("label", { class: "
|
9
|
+
return (h("label", { class: "form-ctrl__float-label", htmlFor: controlId, id: labelId },
|
10
10
|
label && label,
|
11
11
|
!label && hasLabelSlot && h("slot", { name: "label" })));
|
12
12
|
}
|
13
13
|
else {
|
14
|
-
return (h("label", { class: {
|
15
|
-
h("div", { class: "
|
16
|
-
placeholder && hasValue && rtl && (h("span", { class: "placeholder" },
|
14
|
+
return (h("label", { class: { 'form-ctrl__label': true, 'visually-hide': hideLabel }, htmlFor: controlId, id: labelId },
|
15
|
+
h("div", { class: "form-ctrl__label-wrap" },
|
16
|
+
placeholder && hasValue && rtl && (h("span", { class: "form-ctrl__label-placeholder" },
|
17
17
|
placeholder,
|
18
18
|
" / ")),
|
19
|
-
h("span", { class: "
|
19
|
+
h("span", { class: "form-ctrl__labeltext" },
|
20
20
|
label && label,
|
21
21
|
!label && hasLabelSlot && h("slot", { name: "label" })),
|
22
|
-
placeholder && hasValue && !rtl && (h("span", { class: "placeholder" },
|
22
|
+
placeholder && hasValue && !rtl && (h("span", { class: "form-ctrl__label-placeholder" },
|
23
23
|
" / ",
|
24
24
|
placeholder))),
|
25
|
-
showCharCount && (h("span", { class: "charcount" }, maxlength
|
25
|
+
showCharCount && (h("span", { class: "form-ctrl__label-charcount" }, maxlength
|
26
26
|
? maxlength - charCount + ' left'
|
27
27
|
: charCount + ' characters'))));
|
28
28
|
}
|
29
29
|
};
|
30
30
|
export const FormControlWrap = (props, children) => {
|
31
31
|
const { rtl, floatLabel, label, moreId, type, hasHelperSlot, showInlineError, errorMessage, } = props;
|
32
|
-
const isLegacy = !document.head.attachShadow;
|
33
32
|
return [
|
34
33
|
!floatLabel ? renderLabel(Object.assign({}, props)) : '',
|
35
34
|
h("div", { class: {
|
36
35
|
'has-label': label !== null && !floatLabel,
|
37
36
|
'has-float-label': label !== null && floatLabel,
|
38
37
|
rtl,
|
39
|
-
|
40
|
-
|
41
|
-
textarea: type === 'textarea',
|
38
|
+
'form-ctrl__input': true,
|
39
|
+
'form-ctrl__textarea': type === 'textarea',
|
42
40
|
} },
|
43
41
|
floatLabel && renderLabel(Object.assign(Object.assign({}, props), { rtl })),
|
44
42
|
children),
|
45
|
-
showInlineError || hasHelperSlot ? (h("div", { class: "
|
46
|
-
!!showInlineError ? h("div", { class: "
|
47
|
-
h("div", { class: "
|
43
|
+
showInlineError || hasHelperSlot ? (h("div", { class: "form-ctrl__more", id: moreId },
|
44
|
+
!!showInlineError ? (h("div", { class: "form-ctrl__error" }, errorMessage)) : (''),
|
45
|
+
h("div", { class: "form-ctrl__helper" },
|
48
46
|
h("slot", { name: "helper" })))) : (''),
|
49
47
|
];
|
50
48
|
};
|
@@ -53,20 +51,20 @@ export const FormControl = (props, children) => {
|
|
53
51
|
const clickThrough = () => {
|
54
52
|
control.setFocus();
|
55
53
|
};
|
56
|
-
return (h("div", { class: "
|
54
|
+
return (h("div", { class: "form-ctrl__input-wrap", ref: (el) => {
|
57
55
|
if (ref)
|
58
56
|
ref(el);
|
59
57
|
} },
|
60
|
-
h("span", { class: "start" },
|
58
|
+
h("span", { class: "form-ctrl__slot-start" },
|
61
59
|
h("slot", { name: "start" }),
|
62
60
|
startSlot),
|
63
61
|
children,
|
64
|
-
clearControl && !readonly && !disabled && (h("button", { type: "button", class: "icon
|
62
|
+
clearControl && !readonly && !disabled && (h("button", { type: "button", class: "icon form-ctrl__clear-btn", tabindex: "-1", onTouchStart: onClearText, onMouseDown: onClearText },
|
65
63
|
h("nano-icon", { name: "light/times" }))),
|
66
|
-
h("span", { class: "value-end", onClick: clickThrough },
|
64
|
+
h("span", { class: "form-ctrl__slot-value-end", onClick: clickThrough },
|
67
65
|
h("slot", { name: "value-end" }),
|
68
66
|
endValueSlot),
|
69
|
-
h("span", { class: "end" },
|
67
|
+
h("span", { class: "form-ctrl__slot-end" },
|
70
68
|
h("slot", { name: "end" }),
|
71
69
|
endSlot)));
|
72
70
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,CAAC,EAAS,MAAM,eAAe,CAAC;AAuC9D,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,YAAY,EACZ,SAAS,EACT,OAAO,EACP,UAAU,EACV,WAAW,EACX,SAAS,EACT,QAAQ,EACR,GAAG,EACH,aAAa,EACb,SAAS,EACT,SAAS,GACE,EAAE,EAAE;EACf,IAAI,CAAC,KAAK,IAAI,CAAC,YAAY;IAAE,OAAO;EACpC,IAAI,UAAU,EAAE;IACd,OAAO,CACL,aAAO,KAAK,EAAC,
|
1
|
+
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/components/form-control/form-control.tsx"],"names":[],"mappings":"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","sourcesContent":["import { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { TextFieldTypes } from '../../interface';\n\ninterface FormControlWrapProps {\n rtl: boolean;\n floatLabel: boolean;\n labelId: string;\n label: string;\n moreId: string;\n type?: TextFieldTypes;\n showInlineError: boolean;\n hasHelperSlot: boolean;\n errorMessage: string;\n controlId: string;\n hasLabelSlot: boolean;\n hideLabel: boolean;\n placeholder: string;\n hasValue: boolean;\n showCharCount?: boolean;\n maxlength?: number;\n charCount?: number;\n}\n\ninterface FormControlProps {\n clearControl: boolean;\n onClearText?: () => void;\n readonly: boolean;\n disabled: boolean;\n control: HTMLNanoInputElement | HTMLNanoSelectElement;\n ref?: (elm?: HTMLElement) => void;\n endSlot?: VNode;\n endValueSlot?: VNode;\n startSlot?: VNode;\n}\n\ninterface LabelProps extends FormControlWrapProps {\n rtl: boolean;\n}\n\nconst renderLabel = ({\n label,\n hasLabelSlot,\n controlId,\n labelId,\n floatLabel,\n placeholder,\n hideLabel,\n hasValue,\n rtl,\n showCharCount,\n maxlength,\n charCount,\n}: LabelProps) => {\n if (!label && !hasLabelSlot) return;\n if (floatLabel) {\n return (\n <label class=\"form-ctrl__float-label\" htmlFor={controlId} id={labelId}>\n {label && label}\n {!label && hasLabelSlot && <slot name=\"label\" />}\n </label>\n );\n } else {\n return (\n <label\n class={{ 'form-ctrl__label': true, 'visually-hide': hideLabel }}\n htmlFor={controlId}\n id={labelId}\n >\n <div class=\"form-ctrl__label-wrap\">\n {placeholder && hasValue && rtl && (\n <span class=\"form-ctrl__label-placeholder\">{placeholder} / </span>\n )}\n <span class=\"form-ctrl__labeltext\">\n {label && label}\n {!label && hasLabelSlot && <slot name=\"label\" />}\n </span>\n {placeholder && hasValue && !rtl && (\n <span class=\"form-ctrl__label-placeholder\"> / {placeholder}</span>\n )}\n </div>\n {showCharCount && (\n <span class=\"form-ctrl__label-charcount\">\n {maxlength\n ? maxlength - charCount + ' left'\n : charCount + ' characters'}\n </span>\n )}\n </label>\n );\n }\n};\n\nexport const FormControlWrap: FunctionalComponent<FormControlWrapProps> = (\n props: FormControlWrapProps,\n children\n) => {\n const {\n rtl,\n floatLabel,\n label,\n moreId,\n type,\n hasHelperSlot,\n showInlineError,\n errorMessage,\n } = props;\n\n return [\n !floatLabel ? renderLabel({ ...props }) : '',\n <div\n class={{\n 'has-label': label !== null && !floatLabel,\n 'has-float-label': label !== null && floatLabel,\n rtl,\n 'form-ctrl__input': true,\n 'form-ctrl__textarea': type === 'textarea',\n }}\n >\n {floatLabel && renderLabel({ ...props, rtl })}\n {children}\n </div>,\n showInlineError || hasHelperSlot ? (\n <div class=\"form-ctrl__more\" id={moreId}>\n {!!showInlineError ? (\n <div class=\"form-ctrl__error\">{errorMessage}</div>\n ) : (\n ''\n )}\n <div class=\"form-ctrl__helper\">\n <slot name=\"helper\" />\n </div>\n </div>\n ) : (\n ''\n ),\n ];\n};\n\nexport const FormControl: FunctionalComponent<FormControlProps> = (\n props: FormControlProps,\n children\n) => {\n const {\n clearControl,\n onClearText,\n readonly,\n disabled,\n control,\n ref,\n endSlot,\n endValueSlot,\n startSlot,\n } = props;\n const clickThrough = () => {\n control.setFocus();\n };\n\n return (\n <div\n class=\"form-ctrl__input-wrap\"\n ref={(el) => {\n if (ref) ref(el);\n }}\n >\n <span class=\"form-ctrl__slot-start\">\n <slot name=\"start\" />\n {startSlot}\n </span>\n {children}\n {clearControl && !readonly && !disabled && (\n <button\n type=\"button\"\n class=\"icon form-ctrl__clear-btn\"\n tabindex=\"-1\"\n onTouchStart={onClearText}\n onMouseDown={onClearText}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n )}\n <span class=\"form-ctrl__slot-value-end\" onClick={clickThrough}>\n <slot name=\"value-end\" />\n {endValueSlot}\n </span>\n <span class=\"form-ctrl__slot-end\">\n <slot name=\"end\" />\n {endSlot}\n </span>\n </div>\n );\n};\n"]}
|