@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
@@ -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;AAyC9D,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,wBAAwB,EAAC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO;MAClE,KAAK,IAAI,KAAK;MACd,CAAC,KAAK,IAAI,YAAY,IAAI,YAAM,IAAI,EAAC,OAAO,GAAG;MAC/C,aAAa,IAAI,CAChB,YAAM,KAAK,EAAC,4BAA4B,IACrC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CACtD,CACR,CACK,CACT,CAAC;GACH;OAAM;IACL,OAAO,CACL,aACE,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,EAC/D,OAAO,EAAE,SAAS,EAClB,EAAE,EAAE,OAAO;MAEX,WAAK,KAAK,EAAC,uBAAuB;QAC/B,WAAW,IAAI,QAAQ,IAAI,GAAG,IAAI,CACjC,YAAM,KAAK,EAAC,8BAA8B;UAAE,WAAW;gBAAW,CACnE;QACD,YAAM,KAAK,EAAC,sBAAsB;UAC/B,KAAK,IAAI,KAAK;UACd,CAAC,KAAK,IAAI,YAAY,IAAI,YAAM,IAAI,EAAC,OAAO,GAAG,CAC3C;QACN,WAAW,IAAI,QAAQ,IAAI,CAAC,GAAG,IAAI,CAClC,YAAM,KAAK,EAAC,8BAA8B;;UAAK,WAAW,CAAQ,CACnE,CACG;MACL,aAAa,IAAI,CAChB,YAAM,KAAK,EAAC,4BAA4B,IACrC,SAAS;QACR,CAAC,CAAC,SAAS,GAAG,SAAS,GAAG,OAAO;QACjC,CAAC,CAAC,SAAS,GAAG,aAAa,CACxB,CACR,CACK,CACT,CAAC;GACH;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAA8C,CACxE,KAA2B,EAC3B,QAAQ,EACR,EAAE;EACF,MAAM,EACJ,GAAG,EACH,UAAU,EACV,KAAK,EACL,MAAM,EACN,WAAW,EACX,IAAI,EACJ,aAAa,EACb,eAAe,EACf,YAAY,EACZ,gBAAgB,GACjB,GAAG,KAAK,CAAC;EAEV,
|
1
|
+
{"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/components/form-control/form-control.tsx"],"names":[],"m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unctionalComponent, h, VNode } from '@stencil/core';\nimport type { TextFieldTypes } from '../../interface';\n\ninterface FormControlWrapProps {\n rtl: boolean;\n floatLabel: boolean;\n labelId: string;\n label: string;\n moreId: string;\n helperEndId: 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 hasHelperEndSlot?: boolean;\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 {showCharCount && (\n <span class=\"form-ctrl__label-charcount\">\n {maxlength ? ` ${charCount}/${maxlength}` : ` ${charCount}`}\n </span>\n )}\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 helperEndId,\n type,\n hasHelperSlot,\n showInlineError,\n errorMessage,\n hasHelperEndSlot,\n } = props;\n\n return (\n <div\n class={{\n 'has-label': label !== null && !floatLabel,\n 'has-float-label': label !== null && floatLabel,\n 'has-helper-end': hasHelperEndSlot,\n rtl,\n 'form-ctrl': true,\n }}\n >\n <div class=\"form-ctrl__wrapper\">\n {!floatLabel ? renderLabel({ ...props }) : ''}\n <div\n class={{\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\" aria-live=\"polite\">\n {errorMessage}\n </div>\n ) : (\n ''\n )}\n <div class=\"form-ctrl__helper\">\n <slot name=\"helper\" />\n </div>\n </div>\n ) : (\n ''\n )}\n </div>\n {hasHelperEndSlot ? (\n <div class=\"form-ctrl__helper-end\" id={helperEndId}>\n <slot name=\"helper-end\" />\n </div>\n ) : (\n ''\n )}\n </div>\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"]}
|
@@ -2,152 +2,27 @@
|
|
2
2
|
* Web Components for Nanopore digital Web Apps
|
3
3
|
*/
|
4
4
|
import { h } from '@stencil/core';
|
5
|
-
|
5
|
+
// import type { GridSizes } from '../../interface';
|
6
|
+
// const STATEOPTS = ['col-span', 'col-start', 'row-span', 'row-start'];
|
6
7
|
/**
|
8
|
+
* @deprecated - you can now use `grid-states="..."`
|
9
|
+
* on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.
|
10
|
+
*
|
7
11
|
* Grid items to be used with [grid](/story/nano-components-grid) elements
|
8
12
|
*/
|
9
13
|
export class GridItem {
|
10
|
-
constructor() {
|
11
|
-
this.currGridSizes = [null];
|
12
|
-
this.gridStates = '';
|
13
|
-
}
|
14
|
-
updateGridClasses() {
|
15
|
-
this.applyChildrenClasses();
|
16
|
-
}
|
17
14
|
/**
|
18
|
-
*
|
19
|
-
*
|
15
|
+
* How to position this item within it's parent grid at different break points. Examples:
|
16
|
+
* xl-col-span-2
|
17
|
+
* l-col-start-2
|
18
|
+
* xxl-row-span-2
|
19
|
+
* m-row-start-2
|
20
20
|
*/
|
21
|
-
async changeBP(newGridSizes) {
|
22
|
-
if (this.currGridSizes === newGridSizes)
|
23
|
-
return;
|
24
|
-
this.currGridSizes = newGridSizes;
|
25
|
-
if (!this.gridStates.length)
|
26
|
-
return;
|
27
|
-
this.applyChildrenClasses();
|
28
|
-
}
|
29
|
-
applyChildrenClasses() {
|
30
|
-
let stateArr = [''];
|
31
|
-
let itemState = '';
|
32
|
-
let found;
|
33
|
-
let classes;
|
34
|
-
// item states come in 4 possible flavours at every breakpoint. E.g.
|
35
|
-
// xl-col-span-2
|
36
|
-
// xl-col-start-2
|
37
|
-
// xl-row-span-2
|
38
|
-
// xl-row-start-2
|
39
|
-
// clear all previous grid state classnames
|
40
|
-
classes = this.el.className
|
41
|
-
.split(' ')
|
42
|
-
.filter((c) => !c.startsWith('nano-grid-'));
|
43
|
-
this.el.className = classes.join(' ').trim();
|
44
|
-
// get all potential states this element can have
|
45
|
-
const itemStates = this.gridStates.split(' ');
|
46
|
-
// loop through all potential state options: col & row span & start
|
47
|
-
STATEOPTS.forEach((stateOpt) => {
|
48
|
-
// reset found flag
|
49
|
-
found = false;
|
50
|
-
// loop through all the current valid breakpoints / sizes backwards because
|
51
|
-
// we only care about the item's state at the largest current breakpoint.
|
52
|
-
this.currGridSizes
|
53
|
-
.slice()
|
54
|
-
.reverse()
|
55
|
-
.forEach((size) => {
|
56
|
-
if (found || !size)
|
57
|
-
return;
|
58
|
-
found = itemStates.find((state) => state.indexOf(`${size.size}-${stateOpt}`) === 0);
|
59
|
-
// found a state at this current size. apply class.
|
60
|
-
if (found) {
|
61
|
-
// clear previous grid state classname
|
62
|
-
classes = this.el.className
|
63
|
-
.split(' ')
|
64
|
-
.filter((c) => !c.includes('nano-grid-${stateOpt}'));
|
65
|
-
this.el.className = classes.join(' ').trim();
|
66
|
-
stateArr = found.split('-');
|
67
|
-
// remove the size of the state
|
68
|
-
stateArr.shift();
|
69
|
-
itemState = stateArr.join('-');
|
70
|
-
// add new class
|
71
|
-
this.el.classList.add(`nano-grid-${itemState}`);
|
72
|
-
}
|
73
|
-
});
|
74
|
-
});
|
75
|
-
}
|
76
21
|
render() {
|
77
22
|
return h("slot", null);
|
78
23
|
}
|
79
24
|
static get is() { return "nano-grid-item"; }
|
80
25
|
static get encapsulation() { return "shadow"; }
|
81
|
-
static get
|
82
|
-
return {
|
83
|
-
"$": ["grid-item.scss"]
|
84
|
-
};
|
85
|
-
}
|
86
|
-
static get styleUrls() {
|
87
|
-
return {
|
88
|
-
"$": ["grid-item.css"]
|
89
|
-
};
|
90
|
-
}
|
91
|
-
static get properties() {
|
92
|
-
return {
|
93
|
-
"gridStates": {
|
94
|
-
"type": "string",
|
95
|
-
"mutable": false,
|
96
|
-
"complexType": {
|
97
|
-
"original": "string",
|
98
|
-
"resolved": "string",
|
99
|
-
"references": {}
|
100
|
-
},
|
101
|
-
"required": false,
|
102
|
-
"optional": false,
|
103
|
-
"docs": {
|
104
|
-
"tags": [],
|
105
|
-
"text": "How to position this item within it's parent grid at different break points. Examples:\nxl-col-span-2\nl-col-start-2\nxxl-row-span-2\nm-row-start-2"
|
106
|
-
},
|
107
|
-
"getter": false,
|
108
|
-
"setter": false,
|
109
|
-
"attribute": "grid-states",
|
110
|
-
"reflect": false,
|
111
|
-
"defaultValue": "''"
|
112
|
-
}
|
113
|
-
};
|
114
|
-
}
|
115
|
-
static get methods() {
|
116
|
-
return {
|
117
|
-
"changeBP": {
|
118
|
-
"complexType": {
|
119
|
-
"signature": "(newGridSizes: GridSizes[]) => Promise<void>",
|
120
|
-
"parameters": [{
|
121
|
-
"tags": [],
|
122
|
-
"text": ""
|
123
|
-
}],
|
124
|
-
"references": {
|
125
|
-
"Promise": {
|
126
|
-
"location": "global"
|
127
|
-
},
|
128
|
-
"GridSizes": {
|
129
|
-
"location": "import",
|
130
|
-
"path": "../../interface"
|
131
|
-
}
|
132
|
-
},
|
133
|
-
"return": "Promise<void>"
|
134
|
-
},
|
135
|
-
"docs": {
|
136
|
-
"text": "Called by parent grid to trigger new classes",
|
137
|
-
"tags": [{
|
138
|
-
"name": "internal",
|
139
|
-
"text": undefined
|
140
|
-
}]
|
141
|
-
}
|
142
|
-
}
|
143
|
-
};
|
144
|
-
}
|
145
|
-
static get elementRef() { return "el"; }
|
146
|
-
static get watchers() {
|
147
|
-
return [{
|
148
|
-
"propName": "gridStates",
|
149
|
-
"methodName": "updateGridClasses"
|
150
|
-
}];
|
151
|
-
}
|
26
|
+
static get styles() { return ":host { display: inline-block; }"; }
|
152
27
|
}
|
153
28
|
//# sourceMappingURL=grid-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grid-item.js","sourceRoot":"","sources":["../../../src/components/grid/grid-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,
|
1
|
+
{"version":3,"file":"grid-item.js","sourceRoot":"","sources":["../../../src/components/grid/grid-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC7C,oDAAoD;AAEpD,wEAAwE;AAExE;;;;;GAKG;AAMH,MAAM,OAAO,QAAQ;EACnB;;;;;;KAMG;EAEH,MAAM;IACJ,OAAO,eAAQ,CAAC;EAClB,CAAC;;;;CACF","sourcesContent":["import { Component, h } from '@stencil/core';\n// import type { GridSizes } from '../../interface';\n\n// const STATEOPTS = ['col-span', 'col-start', 'row-span', 'row-start'];\n\n/**\n * @deprecated - you can now use `grid-states=\"...\"`\n * on any direct `nano-grid` descendent without limitation rendering `nano-grid-item` obsolete.\n *\n * Grid items to be used with [grid](/story/nano-components-grid) elements\n */\n@Component({\n tag: 'nano-grid-item',\n styles: /* css */ `:host { display: inline-block; }`,\n shadow: true,\n})\nexport class GridItem {\n /**\n * How to position this item within it's parent grid at different break points. Examples:\n * xl-col-span-2\n * l-col-start-2\n * xxl-row-span-2\n * m-row-start-2\n */\n\n render() {\n return <slot />;\n }\n}\n"]}
|
@@ -17,173 +17,26 @@
|
|
17
17
|
*/
|
18
18
|
--grid-col-gap: var(--nano-spacing-medium, 16px);
|
19
19
|
--grid-row-gap: var(--nano-spacing-medium, 16px);
|
20
|
-
--current-grid-size: "
|
20
|
+
--current-grid-size: "grid size: s";
|
21
|
+
container-type: inline-size;
|
21
22
|
display: block;
|
22
|
-
opacity: 0;
|
23
|
-
transition: 0.2s ease opacity;
|
24
|
-
max-width: 100%;
|
25
23
|
}
|
26
24
|
:host .grid {
|
27
|
-
/* autoprefixer: ignore next */
|
28
25
|
display: grid;
|
29
|
-
|
30
|
-
grid-gap: var(--grid-row-gap) var(--grid-col-gap);
|
26
|
+
gap: var(--grid-row-gap) var(--grid-col-gap);
|
31
27
|
block-size: inherit;
|
32
28
|
min-block-size: inherit;
|
33
29
|
}
|
34
30
|
|
35
|
-
:host(
|
36
|
-
opacity: 1;
|
37
|
-
}
|
38
|
-
|
39
|
-
:host(.has-grid) .grid {
|
40
|
-
display: grid;
|
41
|
-
}
|
42
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-1) {
|
43
|
-
grid-column-start: 1 !important;
|
44
|
-
}
|
45
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-1) {
|
46
|
-
grid-row-start: 1 !important;
|
47
|
-
}
|
48
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-1) {
|
49
|
-
grid-column-end: span 1 !important;
|
50
|
-
}
|
51
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-1) {
|
52
|
-
grid-row-end: span 1 !important;
|
53
|
-
}
|
54
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-2) {
|
55
|
-
grid-column-start: 2 !important;
|
56
|
-
}
|
57
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-2) {
|
58
|
-
grid-row-start: 2 !important;
|
59
|
-
}
|
60
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-2) {
|
61
|
-
grid-column-end: span 2 !important;
|
62
|
-
}
|
63
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-2) {
|
64
|
-
grid-row-end: span 2 !important;
|
65
|
-
}
|
66
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-3) {
|
67
|
-
grid-column-start: 3 !important;
|
68
|
-
}
|
69
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-3) {
|
70
|
-
grid-row-start: 3 !important;
|
71
|
-
}
|
72
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-3) {
|
73
|
-
grid-column-end: span 3 !important;
|
74
|
-
}
|
75
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-3) {
|
76
|
-
grid-row-end: span 3 !important;
|
77
|
-
}
|
78
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-4) {
|
79
|
-
grid-column-start: 4 !important;
|
80
|
-
}
|
81
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-4) {
|
82
|
-
grid-row-start: 4 !important;
|
83
|
-
}
|
84
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-4) {
|
85
|
-
grid-column-end: span 4 !important;
|
86
|
-
}
|
87
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-4) {
|
88
|
-
grid-row-end: span 4 !important;
|
89
|
-
}
|
90
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-5) {
|
91
|
-
grid-column-start: 5 !important;
|
92
|
-
}
|
93
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-5) {
|
94
|
-
grid-row-start: 5 !important;
|
95
|
-
}
|
96
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-5) {
|
97
|
-
grid-column-end: span 5 !important;
|
98
|
-
}
|
99
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-5) {
|
100
|
-
grid-row-end: span 5 !important;
|
101
|
-
}
|
102
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-6) {
|
103
|
-
grid-column-start: 6 !important;
|
104
|
-
}
|
105
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-6) {
|
106
|
-
grid-row-start: 6 !important;
|
107
|
-
}
|
108
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-6) {
|
109
|
-
grid-column-end: span 6 !important;
|
110
|
-
}
|
111
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-6) {
|
112
|
-
grid-row-end: span 6 !important;
|
113
|
-
}
|
114
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-7) {
|
115
|
-
grid-column-start: 7 !important;
|
116
|
-
}
|
117
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-7) {
|
118
|
-
grid-row-start: 7 !important;
|
119
|
-
}
|
120
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-7) {
|
121
|
-
grid-column-end: span 7 !important;
|
122
|
-
}
|
123
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-7) {
|
124
|
-
grid-row-end: span 7 !important;
|
125
|
-
}
|
126
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-8) {
|
127
|
-
grid-column-start: 8 !important;
|
128
|
-
}
|
129
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-8) {
|
130
|
-
grid-row-start: 8 !important;
|
131
|
-
}
|
132
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-8) {
|
133
|
-
grid-column-end: span 8 !important;
|
134
|
-
}
|
135
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-8) {
|
136
|
-
grid-row-end: span 8 !important;
|
137
|
-
}
|
138
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-9) {
|
139
|
-
grid-column-start: 9 !important;
|
140
|
-
}
|
141
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-9) {
|
142
|
-
grid-row-start: 9 !important;
|
143
|
-
}
|
144
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-9) {
|
145
|
-
grid-column-end: span 9 !important;
|
146
|
-
}
|
147
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-9) {
|
148
|
-
grid-row-end: span 9 !important;
|
149
|
-
}
|
150
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-start-10) {
|
151
|
-
grid-column-start: 10 !important;
|
152
|
-
}
|
153
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-start-10) {
|
154
|
-
grid-row-start: 10 !important;
|
155
|
-
}
|
156
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-col-span-10) {
|
157
|
-
grid-column-end: span 10 !important;
|
158
|
-
}
|
159
|
-
:host(.has-grid) .grid ::slotted(.nano-grid-row-span-10) {
|
160
|
-
grid-row-end: span 10 !important;
|
161
|
-
}
|
162
|
-
|
163
|
-
:host([content-panel]:not([content-panel=false])) .grid {
|
164
|
-
grid-template-rows: auto 1fr;
|
165
|
-
}
|
166
|
-
|
167
|
-
:host([full-height]:not([full-height=false])) {
|
168
|
-
block-size: 100%;
|
169
|
-
}
|
170
|
-
:host([full-height]:not([full-height=false])) .grid {
|
171
|
-
grid-template-rows: 1fr;
|
172
|
-
}
|
173
|
-
|
174
|
-
:host([show-helper]:not([show-helper=false])) .grid {
|
31
|
+
:host([show-helper]:not([show-helper=false])) {
|
175
32
|
position: relative;
|
176
33
|
}
|
177
|
-
:host([show-helper]:not([show-helper=false])) .grid
|
178
|
-
content: "";
|
34
|
+
:host([show-helper]:not([show-helper=false])) .grid--helper {
|
179
35
|
position: absolute;
|
180
36
|
inset: 0;
|
181
37
|
pointer-events: none;
|
182
|
-
background-image: repeating-linear-gradient(to right, rgba(126, 195, 241, 0.25), rgba(126, 195, 241, 0.25) var(--col-width), transparent var(--col-width), transparent var(--repeat-width));
|
183
|
-
background-size: calc(100% + var(--grid-col-gap)) 100%;
|
184
|
-
z-index: 100;
|
185
38
|
}
|
186
|
-
:host([show-helper]:not([show-helper=false])) .grid::before {
|
39
|
+
:host([show-helper]:not([show-helper=false])) .grid--helper::before {
|
187
40
|
content: var(--current-grid-size);
|
188
41
|
font-size: 30px;
|
189
42
|
position: absolute;
|
@@ -197,93 +50,7 @@
|
|
197
50
|
z-index: 99;
|
198
51
|
pointer-events: none;
|
199
52
|
}
|
200
|
-
|
201
|
-
:
|
202
|
-
|
203
|
-
--col-width: calc(100% - var(--grid-col-gap));
|
204
|
-
--repeat-width: calc(100% / 1);
|
205
|
-
}
|
206
|
-
:host(.nano-grid-1) .grid {
|
207
|
-
grid-template-columns: repeat(1, minmax(var(--col-width), 1fr));
|
208
|
-
}
|
209
|
-
|
210
|
-
:host(.nano-grid-2) {
|
211
|
-
--current-grid-size: "grid size: 2";
|
212
|
-
--col-width: calc(50% - var(--grid-col-gap));
|
213
|
-
--repeat-width: calc(100% / 2);
|
214
|
-
}
|
215
|
-
:host(.nano-grid-2) .grid {
|
216
|
-
grid-template-columns: repeat(2, minmax(var(--col-width), 1fr));
|
217
|
-
}
|
218
|
-
|
219
|
-
:host(.nano-grid-3) {
|
220
|
-
--current-grid-size: "grid size: 3";
|
221
|
-
--col-width: calc(33.3333333333% - var(--grid-col-gap));
|
222
|
-
--repeat-width: calc(100% / 3);
|
223
|
-
}
|
224
|
-
:host(.nano-grid-3) .grid {
|
225
|
-
grid-template-columns: repeat(3, minmax(var(--col-width), 1fr));
|
226
|
-
}
|
227
|
-
|
228
|
-
:host(.nano-grid-4) {
|
229
|
-
--current-grid-size: "grid size: 4";
|
230
|
-
--col-width: calc(25% - var(--grid-col-gap));
|
231
|
-
--repeat-width: calc(100% / 4);
|
232
|
-
}
|
233
|
-
:host(.nano-grid-4) .grid {
|
234
|
-
grid-template-columns: repeat(4, minmax(var(--col-width), 1fr));
|
235
|
-
}
|
236
|
-
|
237
|
-
:host(.nano-grid-5) {
|
238
|
-
--current-grid-size: "grid size: 5";
|
239
|
-
--col-width: calc(20% - var(--grid-col-gap));
|
240
|
-
--repeat-width: calc(100% / 5);
|
241
|
-
}
|
242
|
-
:host(.nano-grid-5) .grid {
|
243
|
-
grid-template-columns: repeat(5, minmax(var(--col-width), 1fr));
|
244
|
-
}
|
245
|
-
|
246
|
-
:host(.nano-grid-6) {
|
247
|
-
--current-grid-size: "grid size: 6";
|
248
|
-
--col-width: calc(16.6666666667% - var(--grid-col-gap));
|
249
|
-
--repeat-width: calc(100% / 6);
|
250
|
-
}
|
251
|
-
:host(.nano-grid-6) .grid {
|
252
|
-
grid-template-columns: repeat(6, minmax(var(--col-width), 1fr));
|
253
|
-
}
|
254
|
-
|
255
|
-
:host(.nano-grid-7) {
|
256
|
-
--current-grid-size: "grid size: 7";
|
257
|
-
--col-width: calc(14.2857142857% - var(--grid-col-gap));
|
258
|
-
--repeat-width: calc(100% / 7);
|
259
|
-
}
|
260
|
-
:host(.nano-grid-7) .grid {
|
261
|
-
grid-template-columns: repeat(7, minmax(var(--col-width), 1fr));
|
262
|
-
}
|
263
|
-
|
264
|
-
:host(.nano-grid-8) {
|
265
|
-
--current-grid-size: "grid size: 8";
|
266
|
-
--col-width: calc(12.5% - var(--grid-col-gap));
|
267
|
-
--repeat-width: calc(100% / 8);
|
268
|
-
}
|
269
|
-
:host(.nano-grid-8) .grid {
|
270
|
-
grid-template-columns: repeat(8, minmax(var(--col-width), 1fr));
|
271
|
-
}
|
272
|
-
|
273
|
-
:host(.nano-grid-9) {
|
274
|
-
--current-grid-size: "grid size: 9";
|
275
|
-
--col-width: calc(11.1111111111% - var(--grid-col-gap));
|
276
|
-
--repeat-width: calc(100% / 9);
|
277
|
-
}
|
278
|
-
:host(.nano-grid-9) .grid {
|
279
|
-
grid-template-columns: repeat(9, minmax(var(--col-width), 1fr));
|
280
|
-
}
|
281
|
-
|
282
|
-
:host(.nano-grid-10) {
|
283
|
-
--current-grid-size: "grid size: 10";
|
284
|
-
--col-width: calc(10% - var(--grid-col-gap));
|
285
|
-
--repeat-width: calc(100% / 10);
|
286
|
-
}
|
287
|
-
:host(.nano-grid-10) .grid {
|
288
|
-
grid-template-columns: repeat(10, minmax(var(--col-width), 1fr));
|
53
|
+
:host([show-helper]:not([show-helper=false])) .grid__helper-item {
|
54
|
+
display: none;
|
55
|
+
background: rgba(126, 195, 241, 0.25);
|
289
56
|
}
|