@aquera/nile-elements 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/demo/variables.css +4 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +167 -88
- package/dist/nile-grid/index.cjs.js +1 -1
- package/dist/nile-grid/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-body/index.cjs.js +2 -0
- package/dist/{nile-grid-body → nile-grid/nile-grid-body}/index.esm.js +1 -1
- package/dist/{nile-grid-cell-item/nile-grid-cell-item.cjs.js → nile-grid/nile-grid-body/nile-grid-body.cjs.js} +2 -2
- package/dist/nile-grid/nile-grid-body/nile-grid-body.cjs.js.map +1 -0
- package/dist/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.css.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-body/nile-grid-body.css.cjs.js.map +1 -0
- package/dist/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.css.esm.js +0 -4
- package/dist/nile-grid/nile-grid-body/nile-grid-body.esm.js +5 -0
- package/dist/nile-grid/nile-grid-cell-item/index.cjs.js +2 -0
- package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +67 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.esm.js +12 -0
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head/index.cjs.js +2 -0
- package/dist/{nile-grid-head → nile-grid/nile-grid-head}/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head/nile-grid-head.css.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head/nile-grid-head.esm.js +5 -0
- package/dist/nile-grid/nile-grid-head-item/index.cjs.js +2 -0
- package/dist/{nile-grid-head-item → nile-grid/nile-grid-head-item}/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.css.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.css.esm.js +59 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.esm.js +13 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.esm.js +1 -0
- package/dist/nile-grid/nile-grid-row/index.cjs.js +2 -0
- package/dist/{nile-grid-row → nile-grid/nile-grid-row}/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-row/nile-grid-row.css.cjs.js +2 -0
- package/dist/nile-grid/nile-grid-row/nile-grid-row.css.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid-row/nile-grid-row.css.esm.js +36 -0
- package/dist/nile-grid/nile-grid-row/nile-grid-row.esm.js +8 -0
- package/dist/nile-grid/nile-grid.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.css.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.css.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.css.esm.js +9 -6
- package/dist/nile-grid/nile-grid.esm.js +6 -6
- package/dist/nile-grid/nile-grid.layout.cjs.js +2 -0
- package/dist/nile-grid/nile-grid.layout.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid.layout.esm.js +1 -0
- package/dist/nile-grid/nile-grid.resize.cjs.js +2 -0
- package/dist/nile-grid/nile-grid.resize.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid.resize.esm.js +1 -0
- package/dist/nile-grid/nile-grid.types.cjs.js +2 -0
- package/dist/nile-grid/nile-grid.types.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid.types.esm.js +1 -0
- package/dist/nile-grid/nile-grid.utils.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.utils.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.utils.esm.js +1 -1
- package/dist/nile-grid/nile-grid.width.cjs.js +2 -0
- package/dist/nile-grid/nile-grid.width.cjs.js.map +1 -0
- package/dist/nile-grid/nile-grid.width.esm.js +1 -0
- package/dist/src/index.d.ts +5 -5
- package/dist/src/index.js +5 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-grid/nile-grid-body/index.js.map +1 -0
- package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.css.js +0 -4
- package/dist/src/nile-grid/nile-grid-body/nile-grid-body.css.js.map +1 -0
- package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.d.ts +1 -1
- package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.js +2 -2
- package/dist/src/nile-grid/nile-grid-body/nile-grid-body.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-cell-item/index.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.js +79 -0
- package/dist/src/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.js.map +1 -0
- package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.d.ts +1 -4
- package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.js +2 -12
- package/dist/src/nile-grid/nile-grid-cell-item/nile-grid-cell-item.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head/index.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head/nile-grid-head.css.js.map +1 -0
- package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.d.ts +2 -1
- package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.js +11 -3
- package/dist/src/nile-grid/nile-grid-head/nile-grid-head.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head-item/index.js.map +1 -0
- package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.css.js +30 -5
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.css.js.map +1 -0
- package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.d.ts +3 -4
- package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.js +12 -15
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.d.ts +34 -0
- package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.utils.js +27 -4
- package/dist/src/nile-grid/nile-grid-head-item/nile-grid-head-item.utils.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-row/index.js.map +1 -0
- package/dist/src/nile-grid/nile-grid-row/nile-grid-row.css.js +48 -0
- package/dist/src/nile-grid/nile-grid-row/nile-grid-row.css.js.map +1 -0
- package/dist/src/{nile-grid-row → nile-grid/nile-grid-row}/nile-grid-row.d.ts +5 -2
- package/dist/src/{nile-grid-row → nile-grid/nile-grid-row}/nile-grid-row.js +23 -6
- package/dist/src/nile-grid/nile-grid-row/nile-grid-row.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.css.js +7 -4
- package/dist/src/nile-grid/nile-grid.css.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.d.ts +19 -4
- package/dist/src/nile-grid/nile-grid.js +76 -23
- package/dist/src/nile-grid/nile-grid.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.layout.d.ts +28 -0
- package/dist/src/nile-grid/nile-grid.layout.js +346 -0
- package/dist/src/nile-grid/nile-grid.layout.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.resize.d.ts +58 -0
- package/dist/src/nile-grid/nile-grid.resize.js +100 -0
- package/dist/src/nile-grid/nile-grid.resize.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.types.d.ts +3 -0
- package/dist/src/nile-grid/nile-grid.types.js +2 -0
- package/dist/src/nile-grid/nile-grid.types.js.map +1 -0
- package/dist/src/nile-grid/nile-grid.utils.d.ts +22 -4
- package/dist/src/nile-grid/nile-grid.utils.js +24 -141
- package/dist/src/nile-grid/nile-grid.utils.js.map +1 -1
- package/dist/src/nile-grid/nile-grid.width.d.ts +25 -0
- package/dist/src/nile-grid/nile-grid.width.js +301 -0
- package/dist/src/nile-grid/nile-grid.width.js.map +1 -0
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +5 -5
- package/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.css.ts +0 -4
- package/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.ts +3 -3
- package/src/nile-grid/nile-grid-cell-item/nile-grid-cell-item.css.ts +81 -0
- package/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.ts +5 -15
- package/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.ts +6 -4
- package/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.css.ts +30 -5
- package/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.ts +10 -25
- package/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.utils.ts +30 -4
- package/src/nile-grid/nile-grid-row/nile-grid-row.css.ts +50 -0
- package/src/{nile-grid-row → nile-grid/nile-grid-row}/nile-grid-row.ts +13 -8
- package/src/nile-grid/nile-grid.css.ts +7 -4
- package/src/nile-grid/nile-grid.layout.ts +514 -0
- package/src/nile-grid/nile-grid.resize.ts +143 -0
- package/src/nile-grid/nile-grid.ts +79 -53
- package/src/nile-grid/nile-grid.types.ts +1 -0
- package/src/nile-grid/nile-grid.utils.ts +27 -203
- package/src/nile-grid/nile-grid.width.ts +397 -0
- package/vscode-html-custom-data.json +48 -65
- package/dist/nile-grid-body/index.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.cjs.js +0 -2
- package/dist/nile-grid-body/nile-grid-body.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.css.cjs.js.map +0 -1
- package/dist/nile-grid-body/nile-grid-body.esm.js +0 -5
- package/dist/nile-grid-cell-item/index.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js +0 -2
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-cell-item/nile-grid-cell-item.css.esm.js +0 -35
- package/dist/nile-grid-cell-item/nile-grid-cell-item.esm.js +0 -12
- package/dist/nile-grid-cell-item/nile-grid-cell-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-head/index.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.cjs.js +0 -2
- package/dist/nile-grid-head/nile-grid-head.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.css.cjs.js.map +0 -1
- package/dist/nile-grid-head/nile-grid-head.esm.js +0 -5
- package/dist/nile-grid-head-item/index.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.css.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.css.esm.js +0 -34
- package/dist/nile-grid-head-item/nile-grid-head-item.esm.js +0 -12
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js +0 -2
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.cjs.js.map +0 -1
- package/dist/nile-grid-head-item/nile-grid-head-item.utils.esm.js +0 -1
- package/dist/nile-grid-row/index.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js +0 -2
- package/dist/nile-grid-row/nile-grid-row.css.cjs.js.map +0 -1
- package/dist/nile-grid-row/nile-grid-row.css.esm.js +0 -15
- package/dist/nile-grid-row/nile-grid-row.esm.js +0 -7
- package/dist/src/nile-grid-body/index.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.css.js.map +0 -1
- package/dist/src/nile-grid-body/nile-grid-body.js.map +0 -1
- package/dist/src/nile-grid-cell-item/index.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js +0 -47
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.css.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.js.map +0 -1
- package/dist/src/nile-grid-cell-item/nile-grid-cell-item.utils.js.map +0 -1
- package/dist/src/nile-grid-head/index.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.css.js.map +0 -1
- package/dist/src/nile-grid-head/nile-grid-head.js.map +0 -1
- package/dist/src/nile-grid-head-item/index.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.css.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.js.map +0 -1
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.d.ts +0 -10
- package/dist/src/nile-grid-head-item/nile-grid-head-item.utils.js.map +0 -1
- package/dist/src/nile-grid-row/index.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.css.js +0 -27
- package/dist/src/nile-grid-row/nile-grid-row.css.js.map +0 -1
- package/dist/src/nile-grid-row/nile-grid-row.js.map +0 -1
- package/src/nile-grid-cell-item/nile-grid-cell-item.css.ts +0 -49
- package/src/nile-grid-row/nile-grid-row.css.ts +0 -29
- /package/dist/{nile-grid-body → nile-grid/nile-grid-body}/index.cjs.js.map +0 -0
- /package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/index.cjs.js.map +0 -0
- /package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.cjs.js +0 -0
- /package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.esm.js +0 -0
- /package/dist/{nile-grid-head → nile-grid/nile-grid-head}/index.cjs.js.map +0 -0
- /package/dist/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.css.cjs.js +0 -0
- /package/dist/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.css.esm.js +0 -0
- /package/dist/{nile-grid-head-item → nile-grid/nile-grid-head-item}/index.cjs.js.map +0 -0
- /package/dist/{nile-grid-row → nile-grid/nile-grid-row}/index.cjs.js.map +0 -0
- /package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/index.d.ts +0 -0
- /package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/index.js +0 -0
- /package/dist/src/{nile-grid-body → nile-grid/nile-grid-body}/nile-grid-body.css.d.ts +0 -0
- /package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/index.d.ts +0 -0
- /package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/index.js +0 -0
- /package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.css.d.ts +0 -0
- /package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.d.ts +0 -0
- /package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.js +0 -0
- /package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/index.d.ts +0 -0
- /package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/index.js +0 -0
- /package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.css.d.ts +0 -0
- /package/dist/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.css.js +0 -0
- /package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/index.d.ts +0 -0
- /package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/index.js +0 -0
- /package/dist/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/nile-grid-head-item.css.d.ts +0 -0
- /package/dist/src/{nile-grid-row → nile-grid/nile-grid-row}/index.d.ts +0 -0
- /package/dist/src/{nile-grid-row → nile-grid/nile-grid-row}/index.js +0 -0
- /package/dist/src/{nile-grid-row → nile-grid/nile-grid-row}/nile-grid-row.css.d.ts +0 -0
- /package/src/{nile-grid-body → nile-grid/nile-grid-body}/index.ts +0 -0
- /package/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/index.ts +0 -0
- /package/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.ts +0 -0
- /package/src/{nile-grid-head → nile-grid/nile-grid-head}/index.ts +0 -0
- /package/src/{nile-grid-head → nile-grid/nile-grid-head}/nile-grid-head.css.ts +0 -0
- /package/src/{nile-grid-head-item → nile-grid/nile-grid-head-item}/index.ts +0 -0
- /package/src/{nile-grid-row → nile-grid/nile-grid-row}/index.ts +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as i,customElement as r}from"lit/decorators.js";import{s}from"./nile-grid-cell-item.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import{i as o,c as n,a}from"./nile-grid-cell-item.utils.esm.js";let c=class extends l{constructor(){super(...arguments),this.colspan=1,this.rowspan=1,this.resizable=!1,this.textOverflowType="ellipsis",this.onHandlePointerDown=e=>{const t=this,i={value:0},r={value:0},s=o(t,e,i,r);if(!s)return;const{target:l,col:c}=s,p=e=>n(t,c,r.value,i.value,e),d=()=>a(t,e,l,p);l.addEventListener("pointermove",p),l.addEventListener("pointerup",d,{once:!0}),l.addEventListener("pointercancel",d,{once:!0})}}static get styles(){return[s]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","cell")}render(){return t`
|
|
2
|
-
<div style="display: contents;">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
${this.resizable?t`
|
|
5
|
-
<div
|
|
6
|
-
aria-hidden="true"
|
|
7
|
-
class="resize-handle"
|
|
8
|
-
@pointerdown=${this.onHandlePointerDown}
|
|
9
|
-
></div>
|
|
10
|
-
`:null}
|
|
11
|
-
</div>
|
|
12
|
-
`}};e([i({type:Number,reflect:!0,attribute:!0})],c.prototype,"colspan",void 0),e([i({type:Number,reflect:!0,attribute:!0})],c.prototype,"rowspan",void 0),e([i({type:String,reflect:!0,attribute:!0})],c.prototype,"align",void 0),e([i({type:String,reflect:!0,attribute:!0})],c.prototype,"valign",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"resizable",void 0),e([i({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"textOverflowType",void 0),c=e([r("nile-grid-cell-item")],c);export{c as N};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-cell-item.utils.cjs.js","sources":["../../../src/nile-grid-cell-item/nile-grid-cell-item.utils.ts"],"sourcesContent":["export function initCellResize(\n el: HTMLElement,\n ev: PointerEvent,\n downXRef: { value: number },\n startWRef: { value: number }\n) {\n ev.preventDefault();\n ev.stopPropagation();\n\n const cStart = Number(el.dataset.cStart);\n if (!cStart) return null;\n\n const span = Number(el.getAttribute('colspan')) || 1;\n const col = Math.max(0, cStart + span - 1 - 1);\n\n downXRef.value = ev.clientX;\n startWRef.value = el.getBoundingClientRect().width;\n\n const target = ev.currentTarget as HTMLElement;\n target.setPointerCapture(ev.pointerId);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx: startWRef.value },\n bubbles: true,\n composed: true,\n })\n );\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-start', { bubbles: true, composed: true })\n );\n\n return { target, col };\n}\n\nexport function cellResizeMove(\n el: HTMLElement,\n col: number,\n startW: number,\n downX: number,\n e: PointerEvent\n) {\n const widthPx = Math.max(40, Math.round(startW + (e.clientX - downX)));\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx },\n bubbles: true,\n composed: true,\n })\n );\n}\n\nexport function cellResizeDone(\n el: HTMLElement,\n ev: PointerEvent,\n target: HTMLElement,\n move: (e: PointerEvent) => void\n) {\n target.releasePointerCapture(ev.pointerId);\n target.removeEventListener('pointermove', move);\n el.dispatchEvent(\n new CustomEvent('nile-resize-end', { bubbles: true, composed: true })\n );\n}\n"],"names":["initCellResize","el","ev","downXRef","startWRef","preventDefault","stopPropagation","cStart","Number","dataset","span","getAttribute","col","Math","max","value","clientX","getBoundingClientRect","width","target","currentTarget","setPointerCapture","pointerId","dispatchEvent","CustomEvent","detail","widthPx","bubbles","composed","cellResizeMove","startW","downX","e","round","cellResizeDone","move","releasePointerCapture","removeEventListener","_export","a"],"mappings":"2DAAM,QAAUA,CAAAA,CACdC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA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CACAC,CAEA,CAAA,CAAA,GAAMN,CAAAA,CAAUb,CAAAA,IAAAA,CAAKC,GAAI,CAAA,EAAA,CAAID,KAAKoB,KAAMH,CAAAA,CAAAA,EAAUE,CAAEhB,CAAAA,OAAAA,CAAUe,CAC9D9B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAGsB,aACD,CAAA,GAAIC,CAAAA,YAAY,aAAe,CAAA,CAC7BC,MAAQ,CAAA,CAAEb,GAAKc,CAAAA,CAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,CACfC,OAAS,CAAA,CAAA,CAAA,CACTC,UAAU,CAGhB,CAAA,CAAA,CAAA,EAEM,QAAUM,CAAAA,CAAAA,CACdjC,CACAC,CAAAA,CAAAA,CACAiB,CACAgB,CAAAA,CAAAA,CAAAA,CAEAhB,EAAOiB,qBAAsBlC,CAAAA,CAAAA,CAAGoB,SAChCH,CAAAA,CAAAA,CAAAA,CAAOkB,mBAAoB,CAAA,aAAA,CAAeF,CAC1ClC,CAAAA,CAAAA,CAAAA,CAAGsB,cACD,GAAIC,CAAAA,WAAAA,CAAY,iBAAmB,CAAA,CAAEG,SAAS,CAAMC,CAAAA,QAAAA,CAAAA,CAAU,CAElE,CAAA,CAAA,CAAA,EAAAU,OAAA,EAAAC,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["./nile-grid-head.cjs.js","tslib","lit","lit/decorators.js","./nile-grid-head.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileGridHeadCjsJs){_export("NileGridHead",_nileGridHeadCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileGridHeadCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-grid-head.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,s,e,r,i,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){s=_lit.html;},function(_litDecoratorsJs){e=_litDecoratorsJs.customElement;},function(_nileGridHeadCssCjsJs){r=_nileGridHeadCssCjsJs.s;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_i){function o(){_classCallCheck(this,o);return _callSuper(this,o,arguments);}_inherits(o,_i);return _createClass(o,[{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n "])));}}],[{key:"styles",get:function get(){return[r];}}]);}(i));_export("N",o=t([e("nile-grid-head")],o));}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-head.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head.cjs.js","sources":["../../../src/nile-grid-head/nile-grid-head.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-grid-head.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile grid-head component.\n *\n * @tag nile-grid-head\n *\n */\n@customElement('nile-grid-head')\nexport class NileGridHead extends NileElement {\n /**\n * The styles for nile-grid-head\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridHead;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-head': NileGridHead;\n }\n}\n"],"names":["NileGridHead","render","html","_templateObject","_taggedTemplateLiteral","key","get","styles","NileElement","__decorate","customElement"],"mappings":"omGAmBaA,CAAAA,uBAAAA,EAAAA,WAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,SAAAA,UAAAA,MAAAA,CAAAA,CAAAA,SAAAA,GAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,SAAAA,YAAAA,CAAAA,CAAAA,GAAAA,GAAAA,UAAAA,KAAAA,CAaJ,SAAAC,MAAAA,CAAAA,CACL,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,8FAKZ,CAAA,KAAAC,GAAA,UAAAC,GAAA,CAdM,SAAAA,IAAA,EACL,MAAO,CAACC,EACT,EAMM,MAbyBC,CAKzB,GALIR,OAAAA,KAAAA,CAAYS,CAAAA,CAAAA,CAAA,CADxBC,CAAAA,CAAc,mBACFV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head.css.cjs.js","sources":["../../../src/nile-grid-head/nile-grid-head.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * GridHead CSS\n */\nexport const styles = css`\n :host([sticky]) {\n position: sticky;\n z-index: 2;\n top: 0;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e}from"lit";import{customElement as s}from"lit/decorators.js";import{s as r}from"./nile-grid-head.css.esm.js";import{N as i}from"../internal/nile-element.esm.js";let o=class extends i{static get styles(){return[r]}render(){return e`
|
|
2
|
-
<div style="display: contents;">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
`}};o=t([s("nile-grid-head")],o);export{o as N};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["./nile-grid-head-item.cjs.js","tslib","lit","lit/decorators.js","./nile-grid-head-item.css.cjs.js","../internal/nile-element.cjs.js","./nile-grid-head-item.utils.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileGridHeadItemCjsJs){_export("NileGridHeadItem",_nileGridHeadItemCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileGridHeadItemCssCjsJs){},function(_internalNileElementCjsJs){},function(_nileGridHeadItemUtilsCjsJs){}],execute:function execute(){}};});
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-grid-head-item.css.cjs.js","../internal/nile-element.cjs.js","./nile-grid-head-item.utils.cjs.js"],function(_export,_context){"use strict";var e,t,r,i,s,o,l,a,n,_templateObject,_templateObject2,c;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){r=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_nileGridHeadItemCssCjsJs){s=_nileGridHeadItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_nileGridHeadItemUtilsCjsJs){l=_nileGridHeadItemUtilsCjsJs.i;a=_nileGridHeadItemUtilsCjsJs.h;n=_nileGridHeadItemUtilsCjsJs.a;}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_o){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.colspan=1,_this.rowspan=1,_this.scope="col",_this.resizable=!1,_this.sticky=!1,_this.onHandlePointerDown=function(e){var t=_assertThisInitialized(_this),r={value:0},i={value:0},s=l(t,e,r,i);if(!s)return;var o=s.target,_c=s.col,d=function d(e){return a(t,_c,i.value,r.value,e);},p=function p(){return n(t,e,o,d);};o.addEventListener("pointermove",d),o.addEventListener("pointerup",p,{once:!0}),o.addEventListener("pointercancel",p,{once:!0});};return _this;}_inherits(c,_o);return _createClass(c,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(c,"connectedCallback",this,3)([]),this.setAttribute("role","row"===this.scope?"rowheader":"columnheader");}},{key:"updated",value:function updated(e){e.has("scope")&&this.setAttribute("role","row"===this.scope?"rowheader":"columnheader");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(c,"disconnectedCallback",this,3)([]),this.removeAttribute("role");}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div style=\"display: contents;\">\n <slot></slot>\n ","\n </div>\n "])),this.resizable?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <div\n aria-hidden=\"false\"\n class=\"resize-handle\"\n @pointerdown=","\n ></div>\n "])),this.onHandlePointerDown):null);}}],[{key:"styles",get:function get(){return[s];}}]);}(o));e([r({type:Number,reflect:!0,attribute:!0})],c.prototype,"colspan",void 0),e([r({type:Number,reflect:!0,attribute:!0})],c.prototype,"rowspan",void 0),e([r({type:String,reflect:!0,attribute:!0})],c.prototype,"scope",void 0),e([r({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"resizable",void 0),e([r({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"sticky",void 0),_export("N",c=e([i("nile-grid-head-item")],c));}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-head-item.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.cjs.js","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-grid-head-item.css';\nimport NileElement from '../internal/nile-element';\nimport {\n initHeadResize,\n headResizeMove,\n headResizeDone,\n} from './nile-grid-head-item.utils';\n\n/**\n * Nile grid-head-item component.\n *\n * @tag nile-grid-head-item\n *\n */\n@customElement('nile-grid-head-item')\nexport class NileGridHeadItem extends NileElement {\n /**\n * The styles for nile-grid-head-item\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number, reflect: true, attribute: true }) colspan = 1;\n @property({ type: Number, reflect: true, attribute: true }) rowspan = 1;\n @property({ type: String, reflect: true, attribute: true }) scope:\n | 'col'\n | 'row' = 'col';\n @property({ type: Boolean, reflect: true, attribute: true }) resizable = false;\n @property({ type: Boolean, reflect: true, attribute: true }) sticky = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\n 'role',\n this.scope === 'row' ? 'rowheader' : 'columnheader'\n );\n }\n\n private onHandlePointerDown = (ev: PointerEvent) => {\n const el = this as HTMLElement;\n\n const downXRef = { value: 0 };\n const startWRef = { value: 0 };\n\n const result = initHeadResize(el, ev, downXRef, startWRef);\n if (!result) return;\n\n const { target, col } = result;\n\n const move = (e: PointerEvent) =>\n headResizeMove(el, col, startWRef.value, downXRef.value, e);\n\n const done = () => headResizeDone(el, ev, target, move);\n\n target.addEventListener('pointermove', move);\n target.addEventListener('pointerup', done, { once: true });\n target.addEventListener('pointercancel', done, { once: true });\n };\n\n protected updated(changed: Map<string, unknown>) {\n if (changed.has('scope')) {\n this.setAttribute(\n 'role',\n this.scope === 'row' ? 'rowheader' : 'columnheader'\n );\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeAttribute('role');\n }\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n ${this.resizable\n ? html`\n <div\n aria-hidden=\"false\"\n class=\"resize-handle\"\n @pointerdown=${this.onHandlePointerDown}\n ></div>\n `\n : null}\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridHeadItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-head-item': NileGridHeadItem;\n }\n}\n"],"names":["NileGridHeadItem","_o","c","this","colspan","rowspan","scope","resizable","sticky","onHandlePointerDown","ev","el","downXRef","value","startWRef","result","initHeadResize","target","col","move","e","headResizeMove","done","p","headResizeDone","addEventListener","once","_this","_inherits","_createClass","key","connectedCallback","super","setAttribute","updated","changed","has","disconnectedCallback","removeAttribute","render","html","_templateObject","_taggedTemplateLiteral","_templateObject2","get","styles","NileElement","__decorate","property","type","Number","reflect","attribute","prototype","String","Boolean","customElement"],"mappings":"g2HAwBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASuDC,EAAAA,KAAAA,CAAOC,QAAG,CACVD,CAAAA,KAAAA,CAAOE,OAAG,CAAA,CAAA,CACVF,KAAAA,CAAKG,KAErD,CAAA,KAAA,CACiDH,KAAAA,CAASI,SAAAA,CAAAA,CAAG,EACZJ,KAAAA,CAAMK,MAAAA,CAAAA,CAAG,CAU9DL,CAAAA,KAAAA,CAAAM,mBAAuBC,CAAAA,SAAAA,CAAAA,CAAAA,CAC7B,GAAMC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAEAC,CAAW,CAAA,CAAEC,KAAO,CAAA,CAAA,CAAA,CACpBC,EAAY,CAAED,KAAAA,CAAO,CAErBE,CAAAA,CAAAA,CAAAA,CAASC,EAAeL,CAAID,CAAAA,CAAAA,CAAIE,CAAUE,CAAAA,CAAAA,CAAAA,CAChD,GAAKC,CAAAA,CAAAA,CAAQ,OAEb,GAAQE,CAAAA,CAAMC,CAAUH,CAAAA,CAAlBE,OAAUC,EAAQH,CAAAA,CAAAA,CAAVG,GAAAA,CAERC,EAAQC,QAARD,CAAAA,EAAQC,CACZC,QAAAA,CAAAA,CAAAA,CAAeV,CAAIO,CAAAA,EAAAA,CAAKJ,EAAUD,KAAOD,CAAAA,CAAAA,CAASC,KAAOO,CAAAA,CAAAA,CAAAA,GAErDE,CAAO,CAAA,QAAPA,CAAAA,CAAOC,CAAA,QAAMC,CAAAA,CAAeb,CAAAA,CAAAA,CAAID,EAAIO,CAAQE,CAAAA,CAAAA,CAAAA,GAElDF,CAAOQ,CAAAA,gBAAAA,CAAiB,cAAeN,CACvCF,CAAAA,CAAAA,CAAAA,CAAOQ,gBAAiB,CAAA,WAAA,CAAaH,EAAM,CAAEI,IAAAA,CAAAA,CAAM,CACnDT,CAAAA,CAAAA,CAAAA,CAAAA,CAAOQ,gBAAi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AAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CACZN,EAAA,CAA3DC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAAQC,OAAS,CAAA,CAAA,CAAA,CAAMC,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoBpD,EAAAqD,SAAA,CAAA,SAAA,CAAA,IAAA,EACZN,CAAAA,CAAAA,CAAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,IAAMK,CAAAA,MAAAA,CAAQH,SAAS,CAAMC,CAAAA,SAAAA,CAAAA,CAAW,CAElCpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqD,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAC2CN,CAAA,CAAA,CAA5DC,EAAS,CAAEC,IAAAA,CAAMM,OAASJ,CAAAA,OAAAA,CAAAA,CAAS,EAAMC,SAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0BpD,CAAAqD,CAAAA,SAAAA,CAAA,gBAAA,EAClBN,CAAAA,CAAAA,CAAAA,CAAA,CAA5DC,CAAAA,CAAS,CAAEC,IAAMM,CAAAA,OAAAA,CAASJ,OAAS,CAAA,CAAA,CAAA,CAAMC,WAAW,CAAuBpD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqD,SAAA,CAAA,QAAA,CAAA,IAAA,gBAfjErD,CAAgB+C,CAAAA,CAAAA,CAAA,CAD5BS,CAAAA,CAAc,wBACFxD"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var o,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){o=_lit.css;}],execute:function execute(){_export("s",e=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n --padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);\n position: relative;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: var(--padding);\n background-color: var(--nile-colors-neutral-100);\n border-bottom: 1px solid var(--nile-colors-neutral-400);\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n cursor: col-resize;\n touch-action: none;\n z-index: 1;\n width: 2px;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n"]))));}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-head-item.css.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.css.cjs.js","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * NileGridHeadItem CSS\n */\nexport const styles = css`\n :host {\n --padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);\n position: relative;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: var(--padding);\n background-color: var(--nile-colors-neutral-100);\n border-bottom: 1px solid var(--nile-colors-neutral-400);\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n cursor: col-resize;\n touch-action: none;\n z-index: 1;\n width: 2px;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import{css as o}from"lit";const e=o`
|
|
2
|
-
:host {
|
|
3
|
-
--padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);
|
|
4
|
-
position: relative;
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
user-select: none;
|
|
7
|
-
white-space: nowrap;
|
|
8
|
-
width: 100%;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
text-overflow: ellipsis;
|
|
11
|
-
padding: var(--padding);
|
|
12
|
-
background-color: var(--nile-colors-neutral-100);
|
|
13
|
-
border-bottom: 1px solid var(--nile-colors-neutral-400);
|
|
14
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
::slotted(*) {
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.resize-handle {
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 0;
|
|
26
|
-
right: 0;
|
|
27
|
-
height: 100%;
|
|
28
|
-
cursor: col-resize;
|
|
29
|
-
touch-action: none;
|
|
30
|
-
z-index: 1;
|
|
31
|
-
width: 2px;
|
|
32
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
33
|
-
}
|
|
34
|
-
`;export{e as s};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{html as t}from"lit";import{property as r,customElement as i}from"lit/decorators.js";import{s}from"./nile-grid-head-item.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{i as l,h as a,a as n}from"./nile-grid-head-item.utils.esm.js";let c=class extends o{constructor(){super(...arguments),this.colspan=1,this.rowspan=1,this.scope="col",this.resizable=!1,this.sticky=!1,this.onHandlePointerDown=e=>{const t=this,r={value:0},i={value:0},s=l(t,e,r,i);if(!s)return;const{target:o,col:c}=s,d=e=>a(t,c,i.value,r.value,e),p=()=>n(t,e,o,d);o.addEventListener("pointermove",d),o.addEventListener("pointerup",p,{once:!0}),o.addEventListener("pointercancel",p,{once:!0})}}static get styles(){return[s]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row"===this.scope?"rowheader":"columnheader")}updated(e){e.has("scope")&&this.setAttribute("role","row"===this.scope?"rowheader":"columnheader")}disconnectedCallback(){super.disconnectedCallback(),this.removeAttribute("role")}render(){return t`
|
|
2
|
-
<div style="display: contents;">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
${this.resizable?t`
|
|
5
|
-
<div
|
|
6
|
-
aria-hidden="false"
|
|
7
|
-
class="resize-handle"
|
|
8
|
-
@pointerdown=${this.onHandlePointerDown}
|
|
9
|
-
></div>
|
|
10
|
-
`:null}
|
|
11
|
-
</div>
|
|
12
|
-
`}};e([r({type:Number,reflect:!0,attribute:!0})],c.prototype,"colspan",void 0),e([r({type:Number,reflect:!0,attribute:!0})],c.prototype,"rowspan",void 0),e([r({type:String,reflect:!0,attribute:!0})],c.prototype,"scope",void 0),e([r({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"resizable",void 0),e([r({type:Boolean,reflect:!0,attribute:!0})],c.prototype,"sticky",void 0),c=e([i("nile-grid-head-item")],c);export{c as N};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register([],function(_export,_context){"use strict";function e(e,t,n,o){t.preventDefault(),t.stopPropagation();var s=Number(e.dataset.cStart);if(!s)return null;var i=Number(e.getAttribute("colspan"))||1,l=Math.max(0,s+i-1-1);n.value=t.clientX,o.value=e.getBoundingClientRect().width;var u=t.currentTarget;return u.setPointerCapture(t.pointerId),e.dispatchEvent(new CustomEvent("nile-resize",{detail:{col:l,widthPx:o.value},bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent("nile-resize-start",{bubbles:!0,composed:!0})),{target:u,col:l};}function t(e,t,n,o,s){var i=Math.max(40,Math.round(n+(s.clientX-o)));e.dispatchEvent(new CustomEvent("nile-resize",{detail:{col:t,widthPx:i},bubbles:!0,composed:!0}));}function n(e,t,n,o){n.releasePointerCapture(t.pointerId),n.removeEventListener("pointermove",o),e.dispatchEvent(new CustomEvent("nile-resize-end",{bubbles:!0,composed:!0}));}_export({a:n,h:t,i:e});return{setters:[],execute:function execute(){}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-head-item.utils.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.utils.cjs.js","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.utils.ts"],"sourcesContent":["export function initHeadResize(\n el: HTMLElement,\n ev: PointerEvent,\n downXRef: { value: number },\n startWRef: { value: number }\n) {\n ev.preventDefault();\n ev.stopPropagation();\n\n const cStart = Number(el.dataset.cStart);\n if (!cStart) return null;\n\n const span = Number(el.getAttribute('colspan')) || 1;\n const col = Math.max(0, cStart + span - 1 - 1);\n\n downXRef.value = ev.clientX;\n startWRef.value = el.getBoundingClientRect().width;\n\n const target = ev.currentTarget as HTMLElement;\n target.setPointerCapture(ev.pointerId);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx: startWRef.value },\n bubbles: true,\n composed: true,\n })\n );\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-start', { bubbles: true, composed: true })\n );\n\n return { target, col };\n}\n\nexport function headResizeMove(\n el: HTMLElement,\n col: number,\n startW: number,\n downX: number,\n e: PointerEvent\n) {\n const widthPx = Math.max(40, Math.round(startW + (e.clientX - downX)));\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx },\n bubbles: true,\n composed: true,\n })\n );\n}\n\nexport function headResizeDone(\n el: HTMLElement,\n ev: PointerEvent,\n target: HTMLElement,\n move: (e: PointerEvent) => void\n) {\n target.releasePointerCapture(ev.pointerId);\n target.removeEventListener('pointermove', move);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-end', { bubbles: true, composed: true })\n );\n}\n"],"names":["initHeadResize","el","ev","downXRef","startWRef","preventDefault","stopPropagation","cStart","Number","dataset","span","getAttribute","col","Math","max","value","clientX","getBoundingClientRect","width","target","currentTarget","setPointerCapture","pointerId","dispatchEvent","CustomEvent","detail","widthPx","bubbles","composed","headResizeMove","startW","downX","e","round","headResizeDone","move","releasePointerCapture","removeEventListener","_export","a"],"mappings":"2DAAM,QAAUA,CAAAA,CACdC,CAAAA,CAAAA,CACAC,CACAC,CAAAA,CAAAA,CACAC,GAEAF,CAAGG,CAAAA,cAAAA,CAAAA,CAAAA,CACHH,CAAGI,CAAAA,eAAAA,CAAAA,CAAAA,CAEH,GAAMC,CAAAA,CAAAA,CAASC,MAAOP,CAAAA,CAAAA,CAAGQ,QAAQF,MACjC,CAAA,CAAA,GAAA,CAAKA,CAAQ,CAAA,MAAO,KAEpB,CAAA,GAAMG,CAAAA,CAAOF,CAAAA,MAAAA,CAAOP,EAAGU,YAAa,CAAA,SAAA,CAAA,CAAA,EAAe,CAC7CC,CAAAA,CAAAA,CAAMC,IAAKC,CAAAA,GAAAA,CAAI,CAAGP,CAAAA,CAAAA,CAASG,EAAO,CAAI,CAAA,CAAA,CAAA,CAE5CP,CAASY,CAAAA,KAAAA,CAAQb,CAAGc,CAAAA,OAAAA,CACpBZ,CAAUW,CAAAA,KAAAA,CAAQd,EAAGgB,qBAAwBC,CAAAA,CAAAA,CAAAA,KAAAA,CAE7C,GAAMC,CAAAA,CAAAA,CAASjB,CAAGkB,CAAAA,aAAAA,CAelB,MAdAD,CAAAA,CAAAA,CAAOE,kBAAkBnB,CAAGoB,CAAAA,SAAAA,CAAAA,CAE5BrB,CAAGsB,CAAAA,aAAAA,CACD,GAAIC,CAAAA,WAAAA,CAAY,aAAe,CAAA,CAC7BC,OAAQ,CAAEb,GAAAA,CAAAA,CAAAA,CAAKc,OAAStB,CAAAA,CAAAA,CAAUW,KAClCY,CAAAA,CAAAA,OAAAA,CAAAA,CAAS,CACTC,CAAAA,QAAAA,CAAAA,CAAU,KAId3B,CAA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);n.value=t.clientX,o.value=e.getBoundingClientRect().width;const u=t.currentTarget;return u.setPointerCapture(t.pointerId),e.dispatchEvent(new CustomEvent("nile-resize",{detail:{col:l,widthPx:o.value},bubbles:!0,composed:!0})),e.dispatchEvent(new CustomEvent("nile-resize-start",{bubbles:!0,composed:!0})),{target:u,col:l}}function t(e,t,n,o,s){const i=Math.max(40,Math.round(n+(s.clientX-o)));e.dispatchEvent(new CustomEvent("nile-resize",{detail:{col:t,widthPx:i},bubbles:!0,composed:!0}))}function n(e,t,n,o){n.releasePointerCapture(t.pointerId),n.removeEventListener("pointermove",o),e.dispatchEvent(new CustomEvent("nile-resize-end",{bubbles:!0,composed:!0}))}export{n as a,t as h,e as i};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["./nile-grid-row.cjs.js","tslib","lit","lit/decorators.js","./nile-grid-row.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileGridRowCjsJs){_export("NileGridRow",_nileGridRowCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileGridRowCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
2
|
-
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-grid-row.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var r,t,s,e,o,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.customElement;},function(_nileGridRowCssCjsJs){e=_nileGridRowCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",i=/*#__PURE__*/function(_o){function i(){_classCallCheck(this,i);return _callSuper(this,i,arguments);}_inherits(i,_o);return _createClass(i,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(i,"connectedCallback",this,3)([]),this.setAttribute("role","row");}},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"row-layer\" class=\"row-layer\" data-row-bg></div>\n\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n "])));}}],[{key:"styles",get:function get(){return[e];}}]);}(o));_export("N",i=r([s("nile-grid-row")],i));}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-row.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-row.cjs.js","sources":["../../../src/nile-grid-row/nile-grid-row.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-grid-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile grid-row component.\n *\n * @tag nile-grid-row\n *\n */\n@customElement('nile-grid-row')\nexport class NileGridRow extends NileElement {\n /**\n * The styles for nile-grid-row\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'row');\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-layer\" class=\"row-layer\" data-row-bg></div>\n\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-row': NileGridRow;\n }\n}\n"],"names":["NileGridRow","_o","i","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","connectedCallback","super","this","setAttribute","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","customElement"],"mappings":"8mHAmBaA,CAAN,uBAAAC,EAAA,WAAAC,EAAA,EAAAC,eAAA,MAAAD,CAAA,SAAAE,UAAA,MAAAF,CAAA,CAAAG,SAAA,GAAAC,SAAA,CAAAJ,CAAA,CAAAD,EAAA,SAAAM,YAAA,CAAAL,CAAA,GAAAM,GAAA,qBAAAC,KAAA,CASL,SAAAC,iBAAAA,CAAAA,CAAAA,CACEC,aAAAA,CAAAA,CAAAA,iCACAC,IAAAA,CAAKC,YAAa,CAAA,MAAA,CAAQ,KAC3B,CAAA,EAEM,GAAAL,GAAA,UAAAC,KAAA,UAAAK,MAAAA,CAAAA,CAAAA,CACL,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,sKAOZ,CAAA,KAAAT,GAAA,UAAAU,GAAA,CAjBM,SAAAA,IAAA,CAAWC,CAChB,MAAO,CAACA,CACT,CAAA,EAED,MAT+BC,IAApBpB,OAAAA,KAAAA,CAAWqB,CAAAA,CAAAA,CAAA,CADvBC,CAAAA,CAAc,kBACFtB"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){o=_lit.css;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: contents;\n }\n\n ::slotted(nile-grid-header) {\n background-color: var(--nile-colors-neutral-100);\n }\n\n .row-layer {\n background-color: var(--row-bg, transparent);\n z-index: 0;\n pointer-events: auto;\n }\n"]))));}};});
|
|
2
|
-
//# sourceMappingURL=nile-grid-row.css.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-row.css.cjs.js","sources":["../../../src/nile-grid-row/nile-grid-row.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * GridRow CSS\n */\nexport const styles = css`\n :host {\n display: contents;\n }\n\n ::slotted(nile-grid-header) {\n background-color: var(--nile-colors-neutral-100);\n }\n\n .row-layer {\n background-color: var(--row-bg, transparent);\n z-index: 0;\n pointer-events: auto;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{css as o}from"lit";const r=o`
|
|
2
|
-
:host {
|
|
3
|
-
display: contents;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
::slotted(nile-grid-header) {
|
|
7
|
-
background-color: var(--nile-colors-neutral-100);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.row-layer {
|
|
11
|
-
background-color: var(--row-bg, transparent);
|
|
12
|
-
z-index: 0;
|
|
13
|
-
pointer-events: auto;
|
|
14
|
-
}
|
|
15
|
-
`;export{r as s};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{__decorate as r}from"tslib";import{html as t}from"lit";import{customElement as e}from"lit/decorators.js";import{s}from"./nile-grid-row.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";let i=class extends o{static get styles(){return[s]}connectedCallback(){super.connectedCallback(),this.setAttribute("role","row")}render(){return t`
|
|
2
|
-
<div part="row-layer" class="row-layer" data-row-bg></div>
|
|
3
|
-
|
|
4
|
-
<div style="display: contents;">
|
|
5
|
-
<slot></slot>
|
|
6
|
-
</div>
|
|
7
|
-
`}};i=r([e("nile-grid-row")],i);export{i as N};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-grid-body/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { NileGridBody } from './nile-grid-body';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-body.css.js","sourceRoot":"","sources":["../../../src/nile-grid-body/nile-grid-body.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;CASxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * GridBody CSS\n */\nexport const styles = css`\n :host {\n display: grid;\n overflow-y: auto;\n overflow-x: visible;\n box-sizing: border-box;\n background-color: var(--nile-colors-white-base);\n height: 100%;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-body.js","sourceRoot":"","sources":["../../../src/nile-grid-body/nile-grid-body.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;CAGF,CAAA;AAvBY,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAuBxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-grid-body.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile grid-body component.\n *\n * @tag nile-grid-body\n *\n */\n@customElement('nile-grid-body')\nexport class NileGridBody extends NileElement {\n /**\n * The styles for nile-grid-body\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'rowgroup');\n }\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridBody;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-body': NileGridBody;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-grid-cell-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { NileGridCellItem } from './nile-grid-cell-item';"]}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import { css } from 'lit';
|
|
8
|
-
/**
|
|
9
|
-
* Grid Cell Item CSS
|
|
10
|
-
*/
|
|
11
|
-
export const styles = css `
|
|
12
|
-
:host {
|
|
13
|
-
--padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
min-width: 0;
|
|
16
|
-
white-space: nowrap;
|
|
17
|
-
width: 100%;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
padding: var(--padding);
|
|
21
|
-
height: auto;
|
|
22
|
-
border-bottom: 1px solid var(--nile-colors-neutral-400);
|
|
23
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
::slotted(*) {
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
text-overflow: ellipsis;
|
|
30
|
-
white-space: nowrap;
|
|
31
|
-
width: min-content;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.resize-handle {
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 0;
|
|
37
|
-
right: 0;
|
|
38
|
-
height: 100%;
|
|
39
|
-
cursor: col-resize;
|
|
40
|
-
touch-action: none;
|
|
41
|
-
z-index: 1;
|
|
42
|
-
width: 2px;
|
|
43
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
44
|
-
}
|
|
45
|
-
`;
|
|
46
|
-
export default [styles];
|
|
47
|
-
//# sourceMappingURL=nile-grid-cell-item.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-cell-item.css.js","sourceRoot":"","sources":["../../../src/nile-grid-cell-item/nile-grid-cell-item.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Grid Cell Item CSS\n */\nexport const styles = css`\n :host {\n --padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);\n box-sizing: border-box;\n min-width: 0;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: var(--padding);\n height: auto;\n border-bottom: 1px solid var(--nile-colors-neutral-400);\n border-right: 1px solid var(--nile-colors-neutral-400);\n position: relative;\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: min-content;\n }\n\n .resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n cursor: col-resize;\n touch-action: none;\n z-index: 1;\n width: 2px;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-gr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AI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mDAAmB;AAClB;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;0DAAoD;AApBrG,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAiE5B;;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-grid-cell-item.css';\nimport NileElement from '../internal/nile-element';\nimport {\n initCellResize,\n cellResizeMove,\n cellResizeDone,\n} from './nile-grid-cell-item.utils';\n\n/**\n * Nile grid-cell component.\n *\n * @tag nile-grid-cell-item\n *\n */\n@customElement('nile-grid-cell-item')\nexport class NileGridCellItem extends NileElement {\n /**\n * The styles for nile-grid-cell-item\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number, reflect: true, attribute: true }) colspan = 1;\n @property({ type: Number, reflect: true, attribute: true }) rowspan = 1;\n @property({ type: String, reflect: true, attribute: true }) align?:\n | 'start'\n | 'center'\n | 'end';\n @property({ type: String, reflect: true, attribute: true }) valign?:\n | 'top'\n | 'middle'\n | 'bottom';\n @property({ type: Boolean, reflect: true, attribute: true }) resizable = false;\n @property({ type: Boolean, reflect: true, attribute: true }) textOverflowType: 'ellipsis' | 'clip' = 'ellipsis';\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'cell');\n }\n\n private onHandlePointerDown = (ev: PointerEvent) => {\n const el = this as HTMLElement;\n\n const downXRef = { value: 0 };\n const startWRef = { value: 0 };\n\n const result = initCellResize(el, ev, downXRef, startWRef);\n if (!result) return;\n\n const { target, col } = result;\n\n const move = (e: PointerEvent) =>\n cellResizeMove(el, col, startWRef.value, downXRef.value, e);\n const done = () => cellResizeDone(el, ev, target, move);\n\n target.addEventListener('pointermove', move);\n target.addEventListener('pointerup', done, { once: true });\n target.addEventListener('pointercancel', done, { once: true });\n };\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n ${this.resizable\n ? html`\n <div\n aria-hidden=\"true\"\n class=\"resize-handle\"\n @pointerdown=${this.onHandlePointerDown}\n ></div>\n `\n : null}\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridCellItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-cell-item': NileGridCellItem;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-cell-item.utils.js","sourceRoot":"","sources":["../../../src/nile-grid-cell-item/nile-grid-cell-item.utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAC5B,EAAe,EACf,EAAgB,EAChB,QAA2B,EAC3B,SAA4B;IAE5B,EAAE,CAAC,cAAc,EAAE,CAAC;IACpB,EAAE,CAAC,eAAe,EAAE,CAAC;IAErB,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAE/C,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC;IAC5B,SAAS,CAAC,KAAK,GAAG,EAAE,CAAC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AE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CACtE,CAAC;AACJ,CAAC","sourcesContent":["export function initCellResize(\n el: HTMLElement,\n ev: PointerEvent,\n downXRef: { value: number },\n startWRef: { value: number }\n) {\n ev.preventDefault();\n ev.stopPropagation();\n\n const cStart = Number(el.dataset.cStart);\n if (!cStart) return null;\n\n const span = Number(el.getAttribute('colspan')) || 1;\n const col = Math.max(0, cStart + span - 1 - 1);\n\n downXRef.value = ev.clientX;\n startWRef.value = el.getBoundingClientRect().width;\n\n const target = ev.currentTarget as HTMLElement;\n target.setPointerCapture(ev.pointerId);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx: startWRef.value },\n bubbles: true,\n composed: true,\n })\n );\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-start', { bubbles: true, composed: true })\n );\n\n return { target, col };\n}\n\nexport function cellResizeMove(\n el: HTMLElement,\n col: number,\n startW: number,\n downX: number,\n e: PointerEvent\n) {\n const widthPx = Math.max(40, Math.round(startW + (e.clientX - downX)));\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx },\n bubbles: true,\n composed: true,\n })\n );\n}\n\nexport function cellResizeDone(\n el: HTMLElement,\n ev: PointerEvent,\n target: HTMLElement,\n move: (e: PointerEvent) => void\n) {\n target.releasePointerCapture(ev.pointerId);\n target.removeEventListener('pointermove', move);\n el.dispatchEvent(\n new CustomEvent('nile-resize-end', { bubbles: true, composed: true })\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-grid-head/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { NileGridHead } from './nile-grid-head';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head.css.js","sourceRoot":"","sources":["../../../src/nile-grid-head/nile-grid-head.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;CAMxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * GridHead CSS\n */\nexport const styles = css`\n :host([sticky]) {\n position: sticky;\n z-index: 2;\n top: 0;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head.js","sourceRoot":"","sources":["../../../src/nile-grid-head/nile-grid-head.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,gBAAgB;IAEhB,qBAAqB;IAEd,MAAM;QACX,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;CAGF,CAAA;AAtBY,YAAY;IADxB,aAAa,CAAC,gBAAgB,CAAC;GACnB,YAAY,CAsBxB;;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-grid-head.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile grid-head component.\n *\n * @tag nile-grid-head\n *\n */\n@customElement('nile-grid-head')\nexport class NileGridHead extends NileElement {\n /**\n * The styles for nile-grid-head\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridHead;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-head': NileGridHead;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-grid-head-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { NileGridHeadItem } from './nile-grid-head-item';"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.css.js","sourceRoot":"","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * NileGridHeadItem CSS\n */\nexport const styles = css`\n :host {\n --padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);\n position: relative;\n box-sizing: border-box;\n user-select: none;\n white-space: nowrap;\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: var(--padding);\n background-color: var(--nile-colors-neutral-100);\n border-bottom: 1px solid var(--nile-colors-neutral-400);\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n\n ::slotted(*) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .resize-handle {\n position: absolute;\n top: 0;\n right: 0;\n height: 100%;\n cursor: col-resize;\n touch-action: none;\n z-index: 1;\n width: 2px;\n border-right: 1px solid var(--nile-colors-neutral-400);\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.js","sourceRoot":"","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AAErC;;;;;GAKG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,WAAW;IAA1C;;QASuD,YAAO,GAAG,CAAC,CAAC;QACZ,YAAO,GAAG,CAAC,CAAC;QACZ,UAAK,GAErD,KAAK,CAAC;QAC2C,cAAS,GAAG,KAAK,CAAC;QAClB,WAAM,GAAG,KAAK,CAAC;QAUpE,wBAAmB,GAAG,CAAC,EAAgB,EAAE,EAAE;YACjD,MAAM,EAAE,GAAG,IAAmB,CAAC;YAE/B,MAAM,QAAQ,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;YAC9B,MAAM,SAAS,GAAG,EA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AAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAc,CACpD,CAAC;QACJ,CAAC;IACH,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;UAGL,IAAI,CAAC,SAAS;YACd,CAAC,CAAC,IAAI,CAAA;;;;+BAIe,IAAI,CAAC,mBAAmB;;aAE1C;YACH,CAAC,CAAC,IAAI;;KAEX,CAAC;IACJ,CAAC;CAGF,CAAA;AArE6D;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;iDAAa;AACZ;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;iDAAa;AACZ;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;+CAEzC;AAC2C;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mDAAmB;AAClB;IAA5D,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gDAAgB;AAfjE,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CA8E5B;;AAED,eAAe,gBAAgB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-grid-head-item.css';\nimport NileElement from '../internal/nile-element';\nimport {\n initHeadResize,\n headResizeMove,\n headResizeDone,\n} from './nile-grid-head-item.utils';\n\n/**\n * Nile grid-head-item component.\n *\n * @tag nile-grid-head-item\n *\n */\n@customElement('nile-grid-head-item')\nexport class NileGridHeadItem extends NileElement {\n /**\n * The styles for nile-grid-head-item\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Number, reflect: true, attribute: true }) colspan = 1;\n @property({ type: Number, reflect: true, attribute: true }) rowspan = 1;\n @property({ type: String, reflect: true, attribute: true }) scope:\n | 'col'\n | 'row' = 'col';\n @property({ type: Boolean, reflect: true, attribute: true }) resizable = false;\n @property({ type: Boolean, reflect: true, attribute: true }) sticky = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute(\n 'role',\n this.scope === 'row' ? 'rowheader' : 'columnheader'\n );\n }\n\n private onHandlePointerDown = (ev: PointerEvent) => {\n const el = this as HTMLElement;\n\n const downXRef = { value: 0 };\n const startWRef = { value: 0 };\n\n const result = initHeadResize(el, ev, downXRef, startWRef);\n if (!result) return;\n\n const { target, col } = result;\n\n const move = (e: PointerEvent) =>\n headResizeMove(el, col, startWRef.value, downXRef.value, e);\n\n const done = () => headResizeDone(el, ev, target, move);\n\n target.addEventListener('pointermove', move);\n target.addEventListener('pointerup', done, { once: true });\n target.addEventListener('pointercancel', done, { once: true });\n };\n\n protected updated(changed: Map<string, unknown>) {\n if (changed.has('scope')) {\n this.setAttribute(\n 'role',\n this.scope === 'row' ? 'rowheader' : 'columnheader'\n );\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeAttribute('role');\n }\n\n public render(): TemplateResult {\n return html`\n <div style=\"display: contents;\">\n <slot></slot>\n ${this.resizable\n ? html`\n <div\n aria-hidden=\"false\"\n class=\"resize-handle\"\n @pointerdown=${this.onHandlePointerDown}\n ></div>\n `\n : null}\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridHeadItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-head-item': NileGridHeadItem;\n }\n}\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function initHeadResize(el: HTMLElement, ev: PointerEvent, downXRef: {
|
|
2
|
-
value: number;
|
|
3
|
-
}, startWRef: {
|
|
4
|
-
value: number;
|
|
5
|
-
}): {
|
|
6
|
-
target: HTMLElement;
|
|
7
|
-
col: number;
|
|
8
|
-
} | null;
|
|
9
|
-
export declare function headResizeMove(el: HTMLElement, col: number, startW: number, downX: number, e: PointerEvent): void;
|
|
10
|
-
export declare function headResizeDone(el: HTMLElement, ev: PointerEvent, target: HTMLElement, move: (e: PointerEvent) => void): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-head-item.utils.js","sourceRoot":"","sources":["../../../src/nile-grid-head-item/nile-grid-head-item.utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAC5B,EAAe,EACf,EAAgB,EAChB,QAA2B,EAC3B,SAA4B;IAE5B,EAAE,CAAC,cAAc,EAAE,CAAC;IACpB,EAAE,CAAC,eAAe,EAAE,CAAC;IAErB,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,IAAI,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAE/C,QAAQ,CAAC,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC;IAC5B,SAAS,CAAC,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,WAAW,CAAC,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CACtE,CAAC;AACJ,CAAC","sourcesContent":["export function initHeadResize(\n el: HTMLElement,\n ev: PointerEvent,\n downXRef: { value: number },\n startWRef: { value: number }\n) {\n ev.preventDefault();\n ev.stopPropagation();\n\n const cStart = Number(el.dataset.cStart);\n if (!cStart) return null;\n\n const span = Number(el.getAttribute('colspan')) || 1;\n const col = Math.max(0, cStart + span - 1 - 1);\n\n downXRef.value = ev.clientX;\n startWRef.value = el.getBoundingClientRect().width;\n\n const target = ev.currentTarget as HTMLElement;\n target.setPointerCapture(ev.pointerId);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx: startWRef.value },\n bubbles: true,\n composed: true,\n })\n );\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-start', { bubbles: true, composed: true })\n );\n\n return { target, col };\n}\n\nexport function headResizeMove(\n el: HTMLElement,\n col: number,\n startW: number,\n downX: number,\n e: PointerEvent\n) {\n const widthPx = Math.max(40, Math.round(startW + (e.clientX - downX)));\n el.dispatchEvent(\n new CustomEvent('nile-resize', {\n detail: { col, widthPx },\n bubbles: true,\n composed: true,\n })\n );\n}\n\nexport function headResizeDone(\n el: HTMLElement,\n ev: PointerEvent,\n target: HTMLElement,\n move: (e: PointerEvent) => void\n) {\n target.releasePointerCapture(ev.pointerId);\n target.removeEventListener('pointermove', move);\n\n el.dispatchEvent(\n new CustomEvent('nile-resize-end', { bubbles: true, composed: true })\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-grid-row/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { NileGridRow } from './nile-grid-row';"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
import { css } from 'lit';
|
|
8
|
-
/**
|
|
9
|
-
* GridRow CSS
|
|
10
|
-
*/
|
|
11
|
-
export const styles = css `
|
|
12
|
-
:host {
|
|
13
|
-
display: contents;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
::slotted(nile-grid-header) {
|
|
17
|
-
background-color: var(--nile-colors-neutral-100);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.row-layer {
|
|
21
|
-
background-color: var(--row-bg, transparent);
|
|
22
|
-
z-index: 0;
|
|
23
|
-
pointer-events: auto;
|
|
24
|
-
}
|
|
25
|
-
`;
|
|
26
|
-
export default [styles];
|
|
27
|
-
//# sourceMappingURL=nile-grid-row.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-row.css.js","sourceRoot":"","sources":["../../../src/nile-grid-row/nile-grid-row.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;CAcxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * GridRow CSS\n */\nexport const styles = css`\n :host {\n display: contents;\n }\n\n ::slotted(nile-grid-header) {\n background-color: var(--nile-colors-neutral-100);\n }\n\n .row-layer {\n background-color: var(--row-bg, transparent);\n z-index: 0;\n pointer-events: auto;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-grid-row.js","sourceRoot":"","sources":["../../../src/nile-grid-row/nile-grid-row.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAc,IAAI,EAAkC,MAAM,KAAK,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAA;;;;;;KAMV,CAAC;IACJ,CAAC;CAGF,CAAA;AAzBY,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CAyBvB;;AAED,eAAe,WAAW,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, CSSResultArray, TemplateResult } from 'lit';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-grid-row.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile grid-row component.\n *\n * @tag nile-grid-row\n *\n */\n@customElement('nile-grid-row')\nexport class NileGridRow extends NileElement {\n /**\n * The styles for nile-grid-row\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('role', 'row');\n }\n\n public render(): TemplateResult {\n return html`\n <div part=\"row-layer\" class=\"row-layer\" data-row-bg></div>\n\n <div style=\"display: contents;\">\n <slot></slot>\n </div>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileGridRow;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-grid-row': NileGridRow;\n }\n}\n"]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { css } from 'lit';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Grid Cell Item CSS
|
|
12
|
-
*/
|
|
13
|
-
export const styles = css`
|
|
14
|
-
:host {
|
|
15
|
-
--padding: var(--nile-spacing-xl) var(--nile-spacing-3xl);
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
min-width: 0;
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
width: 100%;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
text-overflow: ellipsis;
|
|
22
|
-
padding: var(--padding);
|
|
23
|
-
height: auto;
|
|
24
|
-
border-bottom: 1px solid var(--nile-colors-neutral-400);
|
|
25
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
26
|
-
position: relative;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
::slotted(*) {
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
text-overflow: ellipsis;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
width: min-content;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.resize-handle {
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 0;
|
|
39
|
-
right: 0;
|
|
40
|
-
height: 100%;
|
|
41
|
-
cursor: col-resize;
|
|
42
|
-
touch-action: none;
|
|
43
|
-
z-index: 1;
|
|
44
|
-
width: 2px;
|
|
45
|
-
border-right: 1px solid var(--nile-colors-neutral-400);
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
export default [styles];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { css } from 'lit';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* GridRow CSS
|
|
12
|
-
*/
|
|
13
|
-
export const styles = css`
|
|
14
|
-
:host {
|
|
15
|
-
display: contents;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
::slotted(nile-grid-header) {
|
|
19
|
-
background-color: var(--nile-colors-neutral-100);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.row-layer {
|
|
23
|
-
background-color: var(--row-bg, transparent);
|
|
24
|
-
z-index: 0;
|
|
25
|
-
pointer-events: auto;
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
export default [styles];
|
|
File without changes
|
|
File without changes
|
/package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.cjs.js
RENAMED
|
File without changes
|
/package/dist/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.esm.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.css.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/src/{nile-grid-cell-item → nile-grid/nile-grid-cell-item}/nile-grid-cell-item.utils.js
RENAMED
|
File without changes
|