@nanoporetech-digital/components 4.10.0 → 5.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/CHANGELOG.md +30 -0
- package/dist/cjs/{form-control-2e900f54.js → form-control-443e90bf.js} +2 -3
- package/dist/cjs/form-control-443e90bf.js.map +1 -0
- package/dist/cjs/index-71f899a7.js +6 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nano-components.cjs.js +1 -1
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js +2 -2
- package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-grid-item.cjs.entry.js +29 -0
- package/dist/cjs/nano-grid-item.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-grid_2.cjs.entry.js +436 -0
- package/dist/cjs/nano-grid_2.cjs.entry.js.map +1 -0
- package/dist/cjs/nano-hero.cjs.entry.js +4 -10
- package/dist/cjs/nano-hero.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-icon-button_2.cjs.entry.js +2 -2
- package/dist/cjs/nano-icon-button_2.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-input.cjs.entry.js +2 -2
- package/dist/cjs/nano-input.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-range.cjs.entry.js +1 -1
- package/dist/cjs/nano-range.cjs.entry.js.map +1 -1
- package/dist/cjs/nano-sortable.cjs.entry.js +1 -0
- package/dist/cjs/nano-sortable.cjs.entry.js.map +1 -1
- package/dist/cjs/{nano-table-ff33dc43.js → nano-table-11052a34.js} +37 -30
- package/dist/cjs/nano-table-11052a34.js.map +1 -0
- package/dist/cjs/nano-table.cjs.entry.js +1 -1
- package/dist/cjs/{table.worker-0a6bc962.js → table.worker-83433a8b.js} +2 -2
- package/dist/cjs/table.worker-83433a8b.js.map +1 -0
- package/dist/collection/components/form-control/form-control.js +1 -2
- package/dist/collection/components/form-control/form-control.js.map +1 -1
- package/dist/collection/components/grid/grid-item.js +11 -136
- package/dist/collection/components/grid/grid-item.js.map +1 -1
- package/dist/collection/components/grid/grid.css +9 -242
- package/dist/collection/components/grid/grid.js +248 -240
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/hero/hero.css +42 -89
- package/dist/collection/components/hero/hero.js +4 -11
- package/dist/collection/components/hero/hero.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.css +12 -0
- package/dist/collection/components/icon-button/icon-button.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js.map +1 -1
- package/dist/collection/components/input/input.css +8 -9
- package/dist/collection/components/range/range.css +0 -3
- package/dist/collection/components/select/select.css +8 -9
- package/dist/collection/components/sortable/sortable.js +2 -1
- package/dist/collection/components/sortable/sortable.js.map +1 -1
- package/dist/collection/components/table/table.css +6 -0
- package/dist/collection/components/table/table.js +25 -18
- package/dist/collection/components/table/table.js.map +1 -1
- package/dist/collection/components/table/table.row.js +7 -7
- package/dist/collection/components/table/table.row.js.map +1 -1
- package/dist/collection/utils/constructible-style.js +129 -0
- package/dist/collection/utils/constructible-style.js.map +1 -0
- package/dist/components/form-control.js +1 -2
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/grid.js +268 -183
- package/dist/components/grid.js.map +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/nano-grid-item.js +33 -1
- package/dist/components/nano-grid-item.js.map +1 -1
- package/dist/components/nano-hero.js +6 -19
- package/dist/components/nano-hero.js.map +1 -1
- package/dist/components/nano-range.js +1 -1
- package/dist/components/nano-range.js.map +1 -1
- package/dist/components/nano-sortable.js +1 -0
- package/dist/components/nano-sortable.js.map +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/select.js.map +1 -1
- package/dist/components/table.js +36 -29
- package/dist/components/table.js.map +1 -1
- package/dist/esm/{form-control-269ba84f.js → form-control-e8739b2e.js} +2 -3
- package/dist/esm/form-control-e8739b2e.js.map +1 -0
- package/dist/esm/index-dad5627b.js +6 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nano-components.js +1 -1
- package/dist/esm/nano-global-nav-user-profile_3.entry.js +2 -2
- package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
- package/dist/esm/nano-grid-item.entry.js +25 -0
- package/dist/esm/nano-grid-item.entry.js.map +1 -0
- package/dist/esm/nano-grid_2.entry.js +431 -0
- package/dist/esm/nano-grid_2.entry.js.map +1 -0
- package/dist/esm/nano-hero.entry.js +4 -10
- package/dist/esm/nano-hero.entry.js.map +1 -1
- package/dist/esm/nano-icon-button_2.entry.js +2 -2
- package/dist/esm/nano-icon-button_2.entry.js.map +1 -1
- package/dist/esm/nano-input.entry.js +2 -2
- package/dist/esm/nano-input.entry.js.map +1 -1
- package/dist/esm/nano-range.entry.js +1 -1
- package/dist/esm/nano-range.entry.js.map +1 -1
- package/dist/esm/nano-sortable.entry.js +1 -0
- package/dist/esm/nano-sortable.entry.js.map +1 -1
- package/dist/esm/{nano-table-ec980076.js → nano-table-ba637f26.js} +37 -30
- package/dist/esm/nano-table-ba637f26.js.map +1 -0
- package/dist/esm/nano-table.entry.js +1 -1
- package/dist/esm/{table.worker-b53db58e.js → table.worker-1cae39c9.js} +2 -2
- package/dist/esm/table.worker-1cae39c9.js.map +1 -0
- package/dist/nano-components/nano-components.css +1 -1
- 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-00cf8021.entry.js +5 -0
- package/dist/nano-components/p-00cf8021.entry.js.map +1 -0
- package/dist/nano-components/{p-f591400b.entry.js → p-158c73b0.entry.js} +2 -2
- package/dist/nano-components/p-365c997a.js +5 -0
- package/dist/nano-components/p-553acf24.entry.js +5 -0
- package/dist/nano-components/{p-58b53239.entry.js.map → p-553acf24.entry.js.map} +1 -1
- package/dist/nano-components/p-6975f110.entry.js +5 -0
- package/dist/nano-components/p-6975f110.entry.js.map +1 -0
- package/dist/nano-components/p-71057181.js +5 -0
- package/dist/nano-components/p-71057181.js.map +1 -0
- package/dist/nano-components/p-ad6209ec.entry.js +5 -0
- package/dist/nano-components/p-ad6209ec.entry.js.map +1 -0
- package/dist/nano-components/p-bdef618c.entry.js +5 -0
- package/dist/nano-components/p-bdef618c.entry.js.map +1 -0
- package/dist/nano-components/{p-241baff8.entry.js → p-d79c6862.entry.js} +2 -2
- package/dist/nano-components/p-d79c6862.entry.js.map +1 -0
- package/dist/nano-components/p-deb0799c.entry.js +5 -0
- package/dist/nano-components/{p-6a3a29c6.entry.js.map → p-deb0799c.entry.js.map} +1 -1
- package/dist/nano-components/p-ebb98a9e.entry.js +5 -0
- package/dist/nano-components/p-ebb98a9e.entry.js.map +1 -0
- package/dist/nano-components/p-fc585ea2.js +5 -0
- package/dist/nano-components/p-fc585ea2.js.map +1 -0
- package/dist/types/components/grid/grid-item.d.ts +3 -11
- package/dist/types/components/grid/grid.d.ts +44 -68
- package/dist/types/components/hero/hero.d.ts +1 -3
- package/dist/types/components/table/table.d.ts +5 -0
- package/dist/types/components.d.ts +85 -61
- package/dist/types/utils/constructible-style.d.ts +31 -0
- package/docs-json.json +147 -88
- package/docs-vscode.json +28 -21
- package/hydrate/index.js +340 -306
- package/package.json +2 -2
- package/dist/cjs/form-control-2e900f54.js.map +0 -1
- package/dist/cjs/nano-grid_3.cjs.entry.js +0 -431
- package/dist/cjs/nano-grid_3.cjs.entry.js.map +0 -1
- package/dist/cjs/nano-table-ff33dc43.js.map +0 -1
- package/dist/cjs/table.worker-0a6bc962.js.map +0 -1
- package/dist/collection/components/grid/grid-item.css +0 -15
- package/dist/components/grid-item.js +0 -107
- package/dist/components/grid-item.js.map +0 -1
- package/dist/esm/form-control-269ba84f.js.map +0 -1
- package/dist/esm/nano-grid_3.entry.js +0 -425
- package/dist/esm/nano-grid_3.entry.js.map +0 -1
- package/dist/esm/nano-table-ec980076.js.map +0 -1
- package/dist/esm/table.worker-b53db58e.js.map +0 -1
- package/dist/nano-components/p-064af7d0.js +0 -5
- package/dist/nano-components/p-064af7d0.js.map +0 -1
- package/dist/nano-components/p-107d4549.entry.js +0 -5
- package/dist/nano-components/p-107d4549.entry.js.map +0 -1
- package/dist/nano-components/p-239d343a.entry.js +0 -5
- package/dist/nano-components/p-239d343a.entry.js.map +0 -1
- package/dist/nano-components/p-241baff8.entry.js.map +0 -1
- package/dist/nano-components/p-58b53239.entry.js +0 -5
- package/dist/nano-components/p-5ac74848.js +0 -5
- package/dist/nano-components/p-5ac74848.js.map +0 -1
- package/dist/nano-components/p-6a3a29c6.entry.js +0 -5
- package/dist/nano-components/p-806bcd46.js +0 -5
- package/dist/nano-components/p-d3de231c.entry.js +0 -5
- package/dist/nano-components/p-d3de231c.entry.js.map +0 -1
- package/dist/nano-components/p-d792f692.entry.js +0 -5
- package/dist/nano-components/p-d792f692.entry.js.map +0 -1
- /package/dist/nano-components/{p-806bcd46.js.map → p-158c73b0.entry.js.map} +0 -0
- /package/dist/nano-components/{p-f591400b.entry.js.map → p-365c997a.js.map} +0 -0
@@ -16,7 +16,6 @@ import { ComponentInterface } from '../../stencil-public-runtime';
|
|
16
16
|
export declare class Hero implements ComponentInterface {
|
17
17
|
private mo?;
|
18
18
|
host: HTMLNanoHeroElement;
|
19
|
-
gridSizes: string[];
|
20
19
|
hasIconBox: boolean;
|
21
20
|
hasScrim: boolean;
|
22
21
|
hasSecondaryContent: boolean;
|
@@ -28,7 +27,7 @@ export declare class Hero implements ComponentInterface {
|
|
28
27
|
breadCrumbChange(): void;
|
29
28
|
iconBoxItems: Element[];
|
30
29
|
iconBoxItemChange(): void;
|
31
|
-
/** src for
|
30
|
+
/** src for background image. For more control use the `background` slot instead. */
|
32
31
|
imgSrc?: string;
|
33
32
|
/** Optional list string providing media sizes with corresponding image srcs.
|
34
33
|
* i.e. show img-x at 300px wide. Format `srcSet="200w src/imgSmall.jpg, 500h src/imgMed.png"` */
|
@@ -41,7 +40,6 @@ export declare class Hero implements ComponentInterface {
|
|
41
40
|
level: 'top' | 'sub';
|
42
41
|
private slotChangeObserver;
|
43
42
|
private processSlottedContent;
|
44
|
-
private handleGridChange;
|
45
43
|
disconnectedCallback(): void;
|
46
44
|
componentDidLoad(): void;
|
47
45
|
componentWillLoad(): void;
|
@@ -227,6 +227,11 @@ export declare class Table implements ComponentInterface {
|
|
227
227
|
private getBlockHeight;
|
228
228
|
/** cache the height for all active blocks for later renders */
|
229
229
|
private setBlockHeight;
|
230
|
+
/**
|
231
|
+
* On scroll, loop through all blocks' heights and cumulatively, add them together.
|
232
|
+
* When we find that the scroll position is less than this cumulative block height -
|
233
|
+
* stop loop - it's on the current active block.
|
234
|
+
*/
|
230
235
|
private scrollHandler;
|
231
236
|
/** Process slotted content */
|
232
237
|
private processSlots;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
6
6
|
*/
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
8
|
-
import { AlgoliaNetworkError, AloliaSearchResultDetail, CheckboxChangeEventDetail, Color, ControlValidity, ControlValidityEventDetail, DateDisabledPredicate, DateInputChangeEventDetail, DragEvent, DuetLocalizedText, FileInputChangeEventDetail, FileWithUrl, FilterChangeEventDetail, Flickity, FlickityOptions,
|
8
|
+
import { AlgoliaNetworkError, AloliaSearchResultDetail, CheckboxChangeEventDetail, Color, ControlValidity, ControlValidityEventDetail, DateDisabledPredicate, DateInputChangeEventDetail, DragEvent, DuetLocalizedText, FileInputChangeEventDetail, FileWithUrl, FilterChangeEventDetail, Flickity, FlickityOptions, IndexResult, InputChangeEventDetail, LocalDateOpts, MyAccountData, MyAccountUser, NanoFormEles, NavItemEventDetail, OptionInterface, PageChangeEventDetail, PickerChangeEvent, PlainFormEles, RangeChangeEventDetail, RangeValue, ResizeStateChangeEventDetail, SearchIndex, SelectChangeEventDetail, SlideAnimation, StyleEventDetail, TableTypes, TextFieldTypes, ValidationState, ValidatorValueStore } from "./interface";
|
9
9
|
import { StorageMethods } from "./utils/store/component-store";
|
10
10
|
import { DaysOfWeek } from "./utils/date-utils";
|
11
11
|
import { PopoverPlacement } from "./utils/popover";
|
@@ -1118,42 +1118,49 @@ export namespace Components {
|
|
1118
1118
|
interface NanoGlobalSearchResults {
|
1119
1119
|
}
|
1120
1120
|
/**
|
1121
|
-
* A context-aware CSS grid implementation.
|
1122
|
-
*
|
1121
|
+
* A lightweight, context-aware CSS grid implementation.
|
1122
|
+
* - Define multiple grids templates at different breakpoints
|
1123
|
+
* - Uses `@container` queries to select the correct grid depending on the current dimensions
|
1124
|
+
* - Use `grid-states="..."` on direct descendants for `column` / `row` - `start` / `end`
|
1125
|
+
* - SSR optimised
|
1123
1126
|
*/
|
1124
1127
|
interface NanoGrid {
|
1125
|
-
/**
|
1126
|
-
* shortcut for a traditional website like grid (requires more than one row). The second row will auto expand to fill the grid height. The first row and > 2nd row will be the size of their content. e.g. header, body and footer.
|
1127
|
-
*/
|
1128
|
-
"contentPanel": boolean;
|
1129
|
-
/**
|
1130
|
-
* Helper to make grid items expand to full height in IE11
|
1131
|
-
*/
|
1132
|
-
"fullHeight": boolean;
|
1133
1128
|
/**
|
1134
1129
|
* the number of columns the grid has at the large breakpoint.
|
1135
1130
|
*/
|
1136
1131
|
"lCols": number;
|
1137
1132
|
/**
|
1138
|
-
* the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.
|
1133
|
+
* the component's large breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
1139
1134
|
*/
|
1140
|
-
"lSize": number;
|
1135
|
+
"lSize": number | string;
|
1136
|
+
/**
|
1137
|
+
* Optional large `grid-template`. *Note* - you must set `lCols` for this to take affect
|
1138
|
+
*/
|
1139
|
+
"lTpl"?: string;
|
1141
1140
|
/**
|
1142
1141
|
* the number of columns the grid has at the medium breakpoint.
|
1143
1142
|
*/
|
1144
1143
|
"mCols": number;
|
1145
1144
|
/**
|
1146
|
-
* the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.
|
1145
|
+
* the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
1146
|
+
*/
|
1147
|
+
"mSize": number | string;
|
1148
|
+
/**
|
1149
|
+
* Optional medium `grid-template`. *Note* - you must set `mCols` for this to take affect
|
1147
1150
|
*/
|
1148
|
-
"
|
1151
|
+
"mTpl"?: string;
|
1149
1152
|
/**
|
1150
1153
|
* the number of columns the grid has at the small breakpoint.
|
1151
1154
|
*/
|
1152
1155
|
"sCols": number;
|
1153
1156
|
/**
|
1154
|
-
* the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.
|
1157
|
+
* the component's small breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
1155
1158
|
*/
|
1156
|
-
"sSize": number;
|
1159
|
+
"sSize": number | string;
|
1160
|
+
/**
|
1161
|
+
* Optional small `grid-template`. *Note* - you must set `sCols` for this to take affect
|
1162
|
+
*/
|
1163
|
+
"sTpl"?: string;
|
1157
1164
|
/**
|
1158
1165
|
* shows a grid helper to visualise where columns are
|
1159
1166
|
*/
|
@@ -1163,33 +1170,35 @@ export namespace Components {
|
|
1163
1170
|
*/
|
1164
1171
|
"xlCols": number;
|
1165
1172
|
/**
|
1166
|
-
* the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.
|
1173
|
+
* the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
1174
|
+
*/
|
1175
|
+
"xlSize": number | string;
|
1176
|
+
/**
|
1177
|
+
* Optional xl `grid-template`. *Note* - you must set `xlCols` for this to take affect
|
1167
1178
|
*/
|
1168
|
-
"
|
1179
|
+
"xlTpl"?: string;
|
1169
1180
|
/**
|
1170
1181
|
* the number of columns the grid has at the xxl breakpoint (anything greater than the xl breakpoint)
|
1171
1182
|
*/
|
1172
1183
|
"xxlCols": number;
|
1184
|
+
/**
|
1185
|
+
* Optional xxl `grid-template`. *Note* - you must set `xxlCols` for this to take affect
|
1186
|
+
*/
|
1187
|
+
"xxlTpl"?: string;
|
1173
1188
|
}
|
1174
1189
|
/**
|
1190
|
+
* @deprecated - you can now use `grid-states="..."`
|
1191
|
+
* on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.
|
1175
1192
|
* Grid items to be used with [grid](/story/nano-components-grid) elements
|
1176
1193
|
*/
|
1177
1194
|
interface NanoGridItem {
|
1178
|
-
/**
|
1179
|
-
* Called by parent grid to trigger new classes
|
1180
|
-
*/
|
1181
|
-
"changeBP": (newGridSizes: GridSizes[]) => Promise<void>;
|
1182
|
-
/**
|
1183
|
-
* How to position this item within it's parent grid at different break points. Examples: xl-col-span-2 l-col-start-2 xxl-row-span-2 m-row-start-2
|
1184
|
-
*/
|
1185
|
-
"gridStates": string;
|
1186
1195
|
}
|
1187
1196
|
/**
|
1188
1197
|
* Hero components are designed to be used once per content page to add visual impact to the introductory section of a page.
|
1189
1198
|
*/
|
1190
1199
|
interface NanoHero {
|
1191
1200
|
/**
|
1192
|
-
* src for
|
1201
|
+
* src for background image. For more control use the `background` slot instead.
|
1193
1202
|
*/
|
1194
1203
|
"imgSrc"?: string;
|
1195
1204
|
/**
|
@@ -2622,10 +2631,6 @@ export interface NanoGlobalSearchResultsCustomEvent<T> extends CustomEvent<T> {
|
|
2622
2631
|
detail: T;
|
2623
2632
|
target: HTMLNanoGlobalSearchResultsElement;
|
2624
2633
|
}
|
2625
|
-
export interface NanoGridCustomEvent<T> extends CustomEvent<T> {
|
2626
|
-
detail: T;
|
2627
|
-
target: HTMLNanoGridElement;
|
2628
|
-
}
|
2629
2634
|
export interface NanoImgCustomEvent<T> extends CustomEvent<T> {
|
2630
2635
|
detail: T;
|
2631
2636
|
target: HTMLNanoImgElement;
|
@@ -2932,8 +2937,11 @@ declare global {
|
|
2932
2937
|
new (): HTMLNanoGlobalSearchResultsElement;
|
2933
2938
|
};
|
2934
2939
|
/**
|
2935
|
-
* A context-aware CSS grid implementation.
|
2936
|
-
*
|
2940
|
+
* A lightweight, context-aware CSS grid implementation.
|
2941
|
+
* - Define multiple grids templates at different breakpoints
|
2942
|
+
* - Uses `@container` queries to select the correct grid depending on the current dimensions
|
2943
|
+
* - Use `grid-states="..."` on direct descendants for `column` / `row` - `start` / `end`
|
2944
|
+
* - SSR optimised
|
2937
2945
|
*/
|
2938
2946
|
interface HTMLNanoGridElement extends Components.NanoGrid, HTMLStencilElement {
|
2939
2947
|
}
|
@@ -2942,6 +2950,8 @@ declare global {
|
|
2942
2950
|
new (): HTMLNanoGridElement;
|
2943
2951
|
};
|
2944
2952
|
/**
|
2953
|
+
* @deprecated - you can now use `grid-states="..."`
|
2954
|
+
* on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.
|
2945
2955
|
* Grid items to be used with [grid](/story/nano-components-grid) elements
|
2946
2956
|
*/
|
2947
2957
|
interface HTMLNanoGridItemElement extends Components.NanoGridItem, HTMLStencilElement {
|
@@ -4438,46 +4448,49 @@ declare namespace LocalJSX {
|
|
4438
4448
|
"onNanoSearchGoBack"?: (event: NanoGlobalSearchResultsCustomEvent<any>) => void;
|
4439
4449
|
}
|
4440
4450
|
/**
|
4441
|
-
* A context-aware CSS grid implementation.
|
4442
|
-
*
|
4451
|
+
* A lightweight, context-aware CSS grid implementation.
|
4452
|
+
* - Define multiple grids templates at different breakpoints
|
4453
|
+
* - Uses `@container` queries to select the correct grid depending on the current dimensions
|
4454
|
+
* - Use `grid-states="..."` on direct descendants for `column` / `row` - `start` / `end`
|
4455
|
+
* - SSR optimised
|
4443
4456
|
*/
|
4444
4457
|
interface NanoGrid {
|
4445
|
-
/**
|
4446
|
-
* shortcut for a traditional website like grid (requires more than one row). The second row will auto expand to fill the grid height. The first row and > 2nd row will be the size of their content. e.g. header, body and footer.
|
4447
|
-
*/
|
4448
|
-
"contentPanel"?: boolean;
|
4449
|
-
/**
|
4450
|
-
* Helper to make grid items expand to full height in IE11
|
4451
|
-
*/
|
4452
|
-
"fullHeight"?: boolean;
|
4453
4458
|
/**
|
4454
4459
|
* the number of columns the grid has at the large breakpoint.
|
4455
4460
|
*/
|
4456
4461
|
"lCols"?: number;
|
4457
4462
|
/**
|
4458
|
-
* the component's large breakpoint. Note - all breakpoints are based on component width, not screen width.
|
4463
|
+
* the component's large breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
4464
|
+
*/
|
4465
|
+
"lSize"?: number | string;
|
4466
|
+
/**
|
4467
|
+
* Optional large `grid-template`. *Note* - you must set `lCols` for this to take affect
|
4459
4468
|
*/
|
4460
|
-
"
|
4469
|
+
"lTpl"?: string;
|
4461
4470
|
/**
|
4462
4471
|
* the number of columns the grid has at the medium breakpoint.
|
4463
4472
|
*/
|
4464
4473
|
"mCols"?: number;
|
4465
4474
|
/**
|
4466
|
-
* the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width.
|
4475
|
+
* the component's medium breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
4467
4476
|
*/
|
4468
|
-
"mSize"?: number;
|
4477
|
+
"mSize"?: number | string;
|
4469
4478
|
/**
|
4470
|
-
*
|
4479
|
+
* Optional medium `grid-template`. *Note* - you must set `mCols` for this to take affect
|
4471
4480
|
*/
|
4472
|
-
"
|
4481
|
+
"mTpl"?: string;
|
4473
4482
|
/**
|
4474
4483
|
* the number of columns the grid has at the small breakpoint.
|
4475
4484
|
*/
|
4476
4485
|
"sCols"?: number;
|
4477
4486
|
/**
|
4478
|
-
* the component's small breakpoint. Note - all breakpoints are based on component width, not screen width.
|
4487
|
+
* the component's small breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
4479
4488
|
*/
|
4480
|
-
"sSize"?: number;
|
4489
|
+
"sSize"?: number | string;
|
4490
|
+
/**
|
4491
|
+
* Optional small `grid-template`. *Note* - you must set `sCols` for this to take affect
|
4492
|
+
*/
|
4493
|
+
"sTpl"?: string;
|
4481
4494
|
/**
|
4482
4495
|
* shows a grid helper to visualise where columns are
|
4483
4496
|
*/
|
@@ -4487,29 +4500,35 @@ declare namespace LocalJSX {
|
|
4487
4500
|
*/
|
4488
4501
|
"xlCols"?: number;
|
4489
4502
|
/**
|
4490
|
-
* the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width.
|
4503
|
+
* the component's xl breakpoint. Note - all breakpoints are based on component width, not screen width. Will default to `px` if no unit supplied e.g. `20rem`
|
4504
|
+
*/
|
4505
|
+
"xlSize"?: number | string;
|
4506
|
+
/**
|
4507
|
+
* Optional xl `grid-template`. *Note* - you must set `xlCols` for this to take affect
|
4491
4508
|
*/
|
4492
|
-
"
|
4509
|
+
"xlTpl"?: string;
|
4493
4510
|
/**
|
4494
4511
|
* the number of columns the grid has at the xxl breakpoint (anything greater than the xl breakpoint)
|
4495
4512
|
*/
|
4496
4513
|
"xxlCols"?: number;
|
4514
|
+
/**
|
4515
|
+
* Optional xxl `grid-template`. *Note* - you must set `xxlCols` for this to take affect
|
4516
|
+
*/
|
4517
|
+
"xxlTpl"?: string;
|
4497
4518
|
}
|
4498
4519
|
/**
|
4520
|
+
* @deprecated - you can now use `grid-states="..."`
|
4521
|
+
* on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.
|
4499
4522
|
* Grid items to be used with [grid](/story/nano-components-grid) elements
|
4500
4523
|
*/
|
4501
4524
|
interface NanoGridItem {
|
4502
|
-
/**
|
4503
|
-
* How to position this item within it's parent grid at different break points. Examples: xl-col-span-2 l-col-start-2 xxl-row-span-2 m-row-start-2
|
4504
|
-
*/
|
4505
|
-
"gridStates"?: string;
|
4506
4525
|
}
|
4507
4526
|
/**
|
4508
4527
|
* Hero components are designed to be used once per content page to add visual impact to the introductory section of a page.
|
4509
4528
|
*/
|
4510
4529
|
interface NanoHero {
|
4511
4530
|
/**
|
4512
|
-
* src for
|
4531
|
+
* src for background image. For more control use the `background` slot instead.
|
4513
4532
|
*/
|
4514
4533
|
"imgSrc"?: string;
|
4515
4534
|
/**
|
@@ -6119,11 +6138,16 @@ declare module "@stencil/core" {
|
|
6119
6138
|
*/
|
6120
6139
|
"nano-global-search-results": LocalJSX.NanoGlobalSearchResults & JSXBase.HTMLAttributes<HTMLNanoGlobalSearchResultsElement>;
|
6121
6140
|
/**
|
6122
|
-
* A context-aware CSS grid implementation.
|
6123
|
-
*
|
6141
|
+
* A lightweight, context-aware CSS grid implementation.
|
6142
|
+
* - Define multiple grids templates at different breakpoints
|
6143
|
+
* - Uses `@container` queries to select the correct grid depending on the current dimensions
|
6144
|
+
* - Use `grid-states="..."` on direct descendants for `column` / `row` - `start` / `end`
|
6145
|
+
* - SSR optimised
|
6124
6146
|
*/
|
6125
6147
|
"nano-grid": LocalJSX.NanoGrid & JSXBase.HTMLAttributes<HTMLNanoGridElement>;
|
6126
6148
|
/**
|
6149
|
+
* @deprecated - you can now use `grid-states="..."`
|
6150
|
+
* on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.
|
6127
6151
|
* Grid items to be used with [grid](/story/nano-components-grid) elements
|
6128
6152
|
*/
|
6129
6153
|
"nano-grid-item": LocalJSX.NanoGridItem & JSXBase.HTMLAttributes<HTMLNanoGridItemElement>;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { ComponentInterface } from '../stencil-public-runtime';
|
2
|
+
declare type ConstructibleStyleDecorator = (target: ComponentInterface, propertyKey: string) => void;
|
3
|
+
/**
|
4
|
+
* Dynamically create a constructible stylesheet which is applied to the component.
|
5
|
+
* The stylesheet is then cached for future instances of the component.
|
6
|
+
* @usage
|
7
|
+
As a string:
|
8
|
+
```
|
9
|
+
@ConstructableStyle() style = `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
|
10
|
+
```
|
11
|
+
As a function:
|
12
|
+
```
|
13
|
+
@ConstructableStyle() style = () => `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
|
14
|
+
```
|
15
|
+
* @param opts - optional `cacheKeyProperty` - in case an instance of a component could produce different styles based on variables.
|
16
|
+
* @returns `@ConstructableStyle` decorator
|
17
|
+
*/
|
18
|
+
export declare function ConstructibleStyle(opts?: ConstructibleStyleOptions): ConstructibleStyleDecorator;
|
19
|
+
export interface ConstructibleStyleOptions {
|
20
|
+
/**
|
21
|
+
* Set this in case an instance of a component could produce different styles based on variables.
|
22
|
+
* This will ensure that you get new styles for each mode.
|
23
|
+
* @example
|
24
|
+
```
|
25
|
+
@Prop() mode: string;
|
26
|
+
@ConstructableStyle({ cacheKeyProperty: "mode" }) style = `.bg { background: url('assets/${ this.mode }/bg.png'); }`;
|
27
|
+
```
|
28
|
+
*/
|
29
|
+
cacheKeyProperty?: string;
|
30
|
+
}
|
31
|
+
export {};
|