@livenetworks/ashlar 2.1.7 → 2.1.8

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.
@@ -1,36 +1,38 @@
1
- {
2
- "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
- "component": "ln-sortable",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-sortable-dev.scss"
10
- ]
11
- },
12
- "data-ln-sortable": {
13
- "direction": "author",
14
- "sources": [
15
- "ln-sortable-dev.scss",
16
- "src/ln-sortable.js"
17
- ],
18
- "type": "enum",
19
- "values": [
20
- "enabled",
21
- "disabled"
22
- ],
23
- "fallback": "enabled",
24
- "description": "Enables drag-and-drop item reordering or disables when set to disabled"
25
- },
26
- "data-ln-sortable-handle": {
27
- "direction": "author",
28
- "sources": [
29
- "ln-sortable-dev.scss",
30
- "src/ln-sortable.js"
31
- ],
32
- "type": "marker",
33
- "description": "Designates an element as the drag handle for its parent sortable item"
34
- }
35
- }
36
- }
1
+ {
2
+ "$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
3
+ "component": "ln-sortable",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-sortable-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-sortable": {
13
+ "direction": "author",
14
+ "sources": [
15
+ "ln-sortable-dev.scss",
16
+ "ln-sortable.scss",
17
+ "src/ln-sortable.js"
18
+ ],
19
+ "type": "enum",
20
+ "values": [
21
+ "enabled",
22
+ "disabled"
23
+ ],
24
+ "fallback": "enabled",
25
+ "description": "Enables drag-and-drop item reordering or disables when set to disabled"
26
+ },
27
+ "data-ln-sortable-handle": {
28
+ "direction": "author",
29
+ "sources": [
30
+ "ln-sortable-dev.scss",
31
+ "ln-sortable.scss",
32
+ "src/ln-sortable.js"
33
+ ],
34
+ "type": "marker",
35
+ "description": "Designates an element as the drag handle for its parent sortable item"
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,25 @@
1
+ // ==========================================================================
2
+ // ln-sortable — Functional State & Drag Rules
3
+ // ==========================================================================
4
+
5
+ [data-ln-sortable] {
6
+ &.ln-sortable--active {
7
+ user-select: none;
8
+ }
9
+
10
+ > * {
11
+ &.ln-sortable--dragging {
12
+ will-change: transform, opacity;
13
+ opacity: 0.4;
14
+ }
15
+ }
16
+ }
17
+
18
+ [data-ln-sortable-handle] {
19
+ touch-action: none;
20
+ cursor: grab;
21
+
22
+ &:active {
23
+ cursor: grabbing;
24
+ }
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livenetworks/ashlar",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "LiveNetworks unified frontend library - CSS framework and vanilla JS components",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Live Networks",
@@ -0,0 +1,19 @@
1
+ @use '../config/mixins' as *;
2
+
3
+ [data-ln-sortable] {
4
+ list-style: none;
5
+ padding: 0;
6
+ margin: 0;
7
+
8
+ > * {
9
+ transition: box-shadow var(--transition-fast) var(--easing-standard), opacity var(--transition-fast) var(--easing-standard);
10
+
11
+ &.ln-sortable--drop-before {
12
+ box-shadow: inset 0 2px 0 0 var(--color-accent);
13
+ }
14
+
15
+ &.ln-sortable--drop-after {
16
+ box-shadow: inset 0 -2px 0 0 var(--color-accent);
17
+ }
18
+ }
19
+ }
@@ -27,6 +27,7 @@ table {
27
27
  .table-container {
28
28
  @include container(table);
29
29
  overflow-x: auto;
30
+ overscroll-behavior-x: contain;
30
31
 
31
32
  @container table (max-width: 640px) {
32
33
  table { @include table-responsive; }
@@ -19,6 +19,7 @@
19
19
  display: grid;
20
20
  gap: var(--chart-gap);
21
21
  min-inline-size: 0;
22
+ contain: layout style;
22
23
 
23
24
  .chart__plot {
24
25
  display: block;
@@ -150,6 +150,7 @@
150
150
  ul[data-ln-search] {
151
151
  max-height: 15rem;
152
152
  overflow-y: auto;
153
+ overscroll-behavior: contain;
153
154
  scrollbar-width: thin;
154
155
  scrollbar-color: var(--border-subtle) transparent;
155
156
 
@@ -120,6 +120,7 @@
120
120
  min-height: 0;
121
121
  overflow-y: auto;
122
122
  overflow-x: hidden;
123
+ overscroll-behavior: contain;
123
124
  flex: 1 1 auto;
124
125
  }
125
126
 
@@ -46,6 +46,7 @@
46
46
  --max-height: 20rem;
47
47
  max-height: var(--max-height);
48
48
  overflow-y: auto;
49
+ overscroll-behavior: contain;
49
50
  }
50
51
 
51
52
  // The input stays visible (pill-outline reverts pill's display:none),
@@ -43,6 +43,7 @@
43
43
  margin: 0;
44
44
  max-height: var(--filter-options-max-height, 15rem);
45
45
  overflow-y: auto;
46
+ overscroll-behavior: contain;
46
47
  scrollbar-width: thin;
47
48
  scrollbar-color: var(--border-subtle) transparent;
48
49
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  @mixin overflow-hidden { overflow: hidden; }
11
11
  @mixin overflow-auto { overflow: auto; }
12
- @mixin overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
12
+ @mixin overflow-x-auto { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
13
13
 
14
14
  // Sticky pin to the top of the nearest scroll container.
15
15
  //
@@ -88,6 +88,7 @@
88
88
  > main {
89
89
  @include flex-1;
90
90
  overflow-y: auto;
91
+ overscroll-behavior: contain;
91
92
  --padding-y: var(--size-xs);
92
93
  padding-block: var(--padding-y);
93
94
  }
@@ -22,6 +22,7 @@
22
22
  border-inline-start: var(--border-inline-start, var(--border-width) solid var(--color-border));
23
23
  border-inline-end: var(--border-inline-end, var(--border-width) solid var(--color-border));
24
24
  @include transition;
25
+ contain: layout style;
25
26
 
26
27
  > [data-ln-stat-label] {
27
28
  --color-fg: var(--fg-muted);
@@ -23,6 +23,8 @@
23
23
  padding-left: var(--padding-x);
24
24
  --padding-y: var(--size-lg);
25
25
  padding-bottom: var(--padding-y);
26
+ content-visibility: auto;
27
+ contain-intrinsic-size: auto 5rem;
26
28
 
27
29
  &:last-child {
28
30
  padding-bottom: 0;
@@ -61,7 +61,7 @@
61
61
  opacity: 1;
62
62
  @include motion-safe {
63
63
  transform: translateX(0);
64
- transition: all var(--transition-base) var(--easing-standard);
64
+ transition: transform var(--transition-base) var(--easing-standard), opacity var(--transition-base) var(--easing-standard);
65
65
  }
66
66
 
67
67
  & + & {
@@ -73,6 +73,7 @@
73
73
  @mixin toast-item-enter {
74
74
  opacity: 0;
75
75
  @include motion-safe {
76
+ will-change: transform, opacity;
76
77
  transform: translateX(30px);
77
78
  }
78
79
  }
@@ -80,8 +81,9 @@
80
81
  @mixin toast-item-out {
81
82
  opacity: 0;
82
83
  @include motion-safe {
84
+ will-change: transform, opacity;
83
85
  transform: scale(0.95);
84
- transition: all var(--transition-fast);
86
+ transition: transform var(--transition-fast), opacity var(--transition-fast);
85
87
  }
86
88
  }
87
89
 
@@ -15,6 +15,7 @@
15
15
  @use '../components/ln-modal/ln-modal';
16
16
  @use '../components/ln-popover/ln-popover';
17
17
  @use '../components/ln-search/ln-search';
18
+ @use '../components/ln-sortable/ln-sortable';
18
19
  @use '../components/ln-table/ln-table';
19
20
  @use '../components/ln-tabs/ln-tabs';
20
21
  @use '../components/ln-toast/ln-toast';
@@ -20,6 +20,7 @@
20
20
  @use 'components/layout';
21
21
  @use 'components/table';
22
22
  @use 'components/sort';
23
+ @use 'components/sortable';
23
24
  @use 'components/tabs';
24
25
  @use 'components/toggle';
25
26
  @use 'components/accordion';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@livenetworks/ashlar",
4
- "version": "2.1.7",
4
+ "version": "2.1.8",
5
5
  "framework": "html",
6
6
  "contributions": {
7
7
  "html": {