@event-calendar/core 5.2.0 → 5.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 CHANGED
@@ -41,6 +41,7 @@ Inspired by [FullCalendar](https://fullcalendar.io/), it implements similar opti
41
41
  - [buttonText](#buttontext)
42
42
  - [columnWidth](#columnwidth)
43
43
  - [customButtons](#custombuttons)
44
+ - [customScrollbars](#customscrollbars)
44
45
  - [date](#date)
45
46
  - [dateClick](#dateclick)
46
47
  - [datesAboveResources](#datesaboveresources)
@@ -67,9 +68,9 @@ Inspired by [FullCalendar](https://fullcalendar.io/), it implements similar opti
67
68
  - [eventDragStart](#eventdragstart)
68
69
  - [eventDragStop](#eventdragstop)
69
70
  - [eventDrop](#eventdrop)
70
- - [eventDurationEditable](#eventdurationeditable)
71
71
  </td><td>
72
72
 
73
+ - [eventDurationEditable](#eventdurationeditable)
73
74
  - [eventFilter](#eventfilter)
74
75
  - [eventLongPressDelay](#eventlongpressdelay)
75
76
  - [eventMouseEnter](#eventmouseenter)
@@ -246,8 +247,8 @@ This bundle contains a version of the calendar that includes all plugins and is
246
247
 
247
248
  The first step is to include the following lines of code in the `<head>` section of your page:
248
249
  ```html
249
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.2.0/dist/event-calendar.min.css">
250
- <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.2.0/dist/event-calendar.min.js"></script>
250
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.2.2/dist/event-calendar.min.css">
251
+ <script src="https://cdn.jsdelivr.net/npm/@event-calendar/build@5.2.2/dist/event-calendar.min.js"></script>
251
252
  ```
252
253
 
253
254
  <details>
@@ -342,7 +343,7 @@ When hidden with `false`, all-day events will not be displayed in `timeGrid`/`re
342
343
  <details>
343
344
  <summary>Default</summary>
344
345
 
345
- `{close: 'Close', dayGridMonth: 'month', listDay: 'list', listMonth: 'list', listWeek: 'list', listYear: 'list', resourceTimeGridDay: 'resources', resourceTimeGridWeek: 'resources', resourceTimelineDay: 'timeline', resourceTimelineMonth: 'timeline', resourceTimelineWeek: 'timeline', timeGridDay: 'day', timeGridWeek: 'week', today: 'today'}`
346
+ `{close: 'Close', dayGridDay: 'day', dayGridMonth: 'month', dayGridWeek: 'week', listDay: 'list', listMonth: 'list', listWeek: 'list', listYear: 'list', resourceTimeGridDay: 'resources', resourceTimeGridWeek: 'resources', resourceTimelineDay: 'timeline', resourceTimelineMonth: 'timeline', resourceTimelineWeek: 'timeline', timeGridDay: 'day', timeGridWeek: 'week', today: 'today'}`
346
347
  > Views override the default value as follows:
347
348
  > - dayGridDay `text => ({...text, next: 'Next day', prev: 'Previous day'})`
348
349
  > - dayGridMonth `text => ({...text, next: 'Next month', prev: 'Previous month'})`
@@ -470,6 +471,14 @@ function (customButtons) {
470
471
  </tr>
471
472
  </table>
472
473
 
474
+ ### customScrollbars
475
+ - Type `boolean`
476
+ - Default `false`
477
+
478
+ Enables scrollbars styling, which in turn prevents the scrollbars from being hidden in [supported](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::-webkit-scrollbar#browser_compatibility) browsers.
479
+
480
+ This option can be useful, for example, for macOS users in `resourceTimeline` views to indicate that the calendar can be scrolled horizontally. On macOS, scrollbars can be hidden completely, and this option ensures they are always visible in [supported](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/::-webkit-scrollbar#browser_compatibility) browsers.
481
+
473
482
  ### date
474
483
  - Type `Date` or `string`
475
484
  - Default `new Date()`
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v5.2.0
2
+ * EventCalendar v5.2.2
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  .ec {
@@ -628,6 +628,25 @@
628
628
  pointer-events: auto;
629
629
  }
630
630
  }
631
+ .ec-custom-scrollbars {
632
+ .ec-main {
633
+ &::-webkit-scrollbar {
634
+ background-color: transparent;
635
+ }
636
+
637
+ &::-webkit-scrollbar-thumb {
638
+ border: 4px solid transparent;
639
+ box-shadow: none;
640
+ background-color: var(--ec-border-color);
641
+ background-clip: padding-box;
642
+ border-radius: 8px;
643
+ }
644
+
645
+ &::-webkit-scrollbar-thumb:hover {
646
+ background-color: var(--ec-color-400);
647
+ }
648
+ }
649
+ }
631
650
  .ec {
632
651
  display: flex;
633
652
  flex-direction: column;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * EventCalendar v5.2.0
2
+ * EventCalendar v5.2.2
3
3
  * https://github.com/vkurko/calendar
4
4
  */
5
5
  import { untrack, getAbortSignal, tick, getContext, setContext, onMount, mount, unmount } from "svelte";
@@ -473,8 +473,6 @@ function ghostEvent(display) {
473
473
  function pointerEvent(display) {
474
474
  return display === "pointer";
475
475
  }
476
- const ids = /* @__PURE__ */ new WeakMap();
477
- let idCounter = 1;
478
476
  function createEventChunk(event, start, end) {
479
477
  start = event.start > start ? event.start : start;
480
478
  end = event.end < end ? event.end : end;
@@ -482,20 +480,10 @@ function createEventChunk(event, start, end) {
482
480
  start,
483
481
  end,
484
482
  event,
485
- get id() {
486
- let id = ids.get(event);
487
- if (!id) {
488
- id = idCounter++;
489
- ids.set(event, id);
490
- }
491
- delete this.id;
492
- this.id = `${id}-${start.getTime()}`;
493
- return this.id;
494
- },
495
483
  zeroDuration: datesEqual(start, end)
496
484
  };
497
485
  }
498
- function createAllDayChunks(event, days) {
486
+ function createAllDayChunks(event, days, withId = true) {
499
487
  let dates = [];
500
488
  let lastEnd;
501
489
  let gridColumn;
@@ -513,6 +501,9 @@ function createAllDayChunks(event, days) {
513
501
  if (dates.length) {
514
502
  let chunk = createEventChunk(event, dates[0], lastEnd);
515
503
  assign(chunk, { gridColumn, gridRow, dates });
504
+ if (withId) {
505
+ assignChunkId(chunk);
506
+ }
516
507
  return [chunk];
517
508
  }
518
509
  return [];
@@ -561,6 +552,17 @@ function repositionEvent$1(chunk, height2, top = 1) {
561
552
  assign(chunk, { top, bottom });
562
553
  return top;
563
554
  }
555
+ const ids = /* @__PURE__ */ new WeakMap();
556
+ let idCounter = 1;
557
+ function assignChunkId(chunk) {
558
+ let { event, gridColumn, gridRow } = chunk;
559
+ let id = ids.get(event);
560
+ if (!id) {
561
+ id = idCounter++;
562
+ ids.set(event, id);
563
+ }
564
+ chunk.id = `${id}-${gridColumn}-${gridRow}`;
565
+ }
564
566
  function intl(mainState, option) {
565
567
  return () => {
566
568
  let { options: { locale } } = mainState;
@@ -760,6 +762,8 @@ function createOptions(plugins) {
760
762
  let options = {
761
763
  buttonText: { today: "today" },
762
764
  customButtons: {},
765
+ customScrollbars: false,
766
+ // ec option
763
767
  date: /* @__PURE__ */ new Date(),
764
768
  datesSet: void 0,
765
769
  dayHeaderFormat: { weekday: "short", month: "numeric", day: "numeric" },
@@ -803,6 +807,7 @@ function createOptions(plugins) {
803
807
  buttonGroup: "ec-button-group",
804
808
  calendar: "ec",
805
809
  colHead: "ec-col-head",
810
+ customScrollbars: "ec-custom-scrollbars",
806
811
  day: "ec-day",
807
812
  dayHead: "ec-day-head",
808
813
  disabled: "ec-disabled",
@@ -1688,7 +1693,7 @@ function Calendar($$anchor, $$props) {
1688
1693
  let plugins = $.prop($$props, "plugins", 19, () => []), options = $.prop($$props, "options", 19, () => ({}));
1689
1694
  let mainState = new State(plugins(), options());
1690
1695
  setContext("state", mainState);
1691
- let auxComponents = $.derived(() => mainState.auxComponents), features = $.derived(() => mainState.features), events = $.derived(() => mainState.events), interaction = $.derived(() => mainState.interaction), iClass = $.derived(() => mainState.iClass), view2 = $.derived(() => mainState.view), View2 = $.derived(() => mainState.viewComponent), date = $.derived(() => mainState.options.date), duration = $.derived(() => mainState.options.duration), height2 = $.derived(() => mainState.options.height), hiddenDays = $.derived(() => mainState.options.hiddenDays), theme = $.derived(() => mainState.options.theme);
1696
+ let auxComponents = $.derived(() => mainState.auxComponents), features = $.derived(() => mainState.features), events = $.derived(() => mainState.events), interaction = $.derived(() => mainState.interaction), iClass = $.derived(() => mainState.iClass), view2 = $.derived(() => mainState.view), View2 = $.derived(() => mainState.viewComponent), date = $.derived(() => mainState.options.date), duration = $.derived(() => mainState.options.duration), height2 = $.derived(() => mainState.options.height), hiddenDays = $.derived(() => mainState.options.hiddenDays), customScrollbars = $.derived(() => mainState.options.customScrollbars), theme = $.derived(() => mainState.options.theme);
1692
1697
  let prevOptions = { ...options() };
1693
1698
  $.user_pre_effect(() => {
1694
1699
  for (let [name, value] of diff(options(), prevOptions)) {
@@ -1826,7 +1831,8 @@ function Calendar($$anchor, $$props) {
1826
1831
  $.set_class(div, 1, $.clsx([
1827
1832
  $.get(theme).calendar,
1828
1833
  $.get(theme).view,
1829
- $.get(iClass) && $.get(theme)[$.get(iClass)]
1834
+ $.get(iClass) && $.get(theme)[$.get(iClass)],
1835
+ $.get(customScrollbars) && $.get(theme).customScrollbars
1830
1836
  ]));
1831
1837
  $.set_attribute(div, "role", $0);
1832
1838
  styles = $.set_style(div, "", styles, { height: $.get(height2) });
@@ -1909,7 +1915,7 @@ function iEventChunks$2(mainState, viewState) {
1909
1915
  }
1910
1916
  untrack(() => {
1911
1917
  for (let days of grid2) {
1912
- iChunks = iChunks.concat(createAllDayChunks(event, days));
1918
+ iChunks = iChunks.concat(createAllDayChunks(event, days, false));
1913
1919
  }
1914
1920
  });
1915
1921
  }
@@ -3675,7 +3681,7 @@ function Day$2($$anchor, $$props) {
3675
3681
  $.attach(time_1, () => contentFrom($.get(intlListDaySide).format($$props.date)));
3676
3682
  $.reset(h4);
3677
3683
  var node_1 = $.sibling(h4, 2);
3678
- $.each(node_1, 17, () => $.get(chunks), (chunk) => chunk.id, ($$anchor4, chunk) => {
3684
+ $.each(node_1, 17, () => $.get(chunks), (chunk) => chunk.event, ($$anchor4, chunk) => {
3679
3685
  Event$2($$anchor4, {
3680
3686
  get chunk() {
3681
3687
  return $.get(chunk);
@@ -3816,7 +3822,7 @@ function initViewComponent$3(mainState) {
3816
3822
  mainState.features = ["list"];
3817
3823
  return View$2;
3818
3824
  }
3819
- function createChunks$1(event, days) {
3825
+ function createChunks$1(event, days, withId = true) {
3820
3826
  let chunks = [];
3821
3827
  for (let { gridColumn, gridRow, resource, start, end, disabled } of days) {
3822
3828
  if (!disabled && eventIntersects(event, start, end, resource)) {
@@ -3828,6 +3834,9 @@ function createChunks$1(event, days) {
3828
3834
  height: (chunk.end - chunk.start) / 1e3,
3829
3835
  maxHeight: (end - chunk.start) / 1e3
3830
3836
  });
3837
+ if (withId) {
3838
+ assignChunkId(chunk);
3839
+ }
3831
3840
  chunks.push(chunk);
3832
3841
  }
3833
3842
  }
@@ -4019,9 +4028,9 @@ function iEventChunks$1(mainState, viewState) {
4019
4028
  untrack(() => {
4020
4029
  for (let days of grid2) {
4021
4030
  if (event.allDay) {
4022
- allDayIChunks = allDayIChunks.concat(createAllDayChunks(event, days));
4031
+ allDayIChunks = allDayIChunks.concat(createAllDayChunks(event, days, false));
4023
4032
  } else {
4024
- iChunks = iChunks.concat(createChunks$1(event, days));
4033
+ iChunks = iChunks.concat(createChunks$1(event, days, false));
4025
4034
  }
4026
4035
  }
4027
4036
  });
@@ -5041,7 +5050,7 @@ function initViewComponent$2(mainState) {
5041
5050
  setExtensions(mainState);
5042
5051
  return View_1;
5043
5052
  }
5044
- function createChunks(event, days, monthView2) {
5053
+ function createChunks(event, days, monthView2, withId = true) {
5045
5054
  let dates = [];
5046
5055
  let firstStart;
5047
5056
  let lastEnd;
@@ -5079,6 +5088,9 @@ function createChunks(event, days, monthView2) {
5079
5088
  if (dates.length) {
5080
5089
  let chunk = createEventChunk(event, firstStart, lastEnd);
5081
5090
  assign(chunk, { gridColumn, gridRow, dates, left, width });
5091
+ if (withId) {
5092
+ assignChunkId(chunk);
5093
+ }
5082
5094
  return [chunk];
5083
5095
  }
5084
5096
  return [];
@@ -5178,7 +5190,7 @@ function eventChunks(mainState, viewState) {
5178
5190
  function iEventChunks(mainState, viewState) {
5179
5191
  return () => {
5180
5192
  let { iEvents } = mainState;
5181
- let { grid: grid2 } = viewState;
5193
+ let { grid: grid2, monthView: monthView2 } = viewState;
5182
5194
  let iChunks = [];
5183
5195
  for (let [, event] of iEvents) {
5184
5196
  if (!event) {
@@ -5186,7 +5198,7 @@ function iEventChunks(mainState, viewState) {
5186
5198
  }
5187
5199
  untrack(() => {
5188
5200
  for (let days of grid2) {
5189
- iChunks = iChunks.concat(createChunks(event, days));
5201
+ iChunks = iChunks.concat(createChunks(event, days, monthView2, false));
5190
5202
  }
5191
5203
  });
5192
5204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event-calendar/core",
3
- "version": "5.2.0",
3
+ "version": "5.2.2",
4
4
  "title": "Event Calendar Core package",
5
5
  "description": "Full-sized drag & drop event calendar with resource & timeline views",
6
6
  "keywords": [
@@ -17,7 +17,7 @@
17
17
 
18
18
  let {
19
19
  auxComponents, features, events, interaction, iClass, view, viewComponent: View,
20
- options: {date, duration, height, hiddenDays, theme}
20
+ options: {date, duration, height, hiddenDays, customScrollbars, theme}
21
21
  } = $derived(mainState);
22
22
 
23
23
  // Reactively update options that did change
@@ -131,7 +131,8 @@
131
131
  class={[
132
132
  theme.calendar,
133
133
  theme.view,
134
- iClass && theme[iClass]
134
+ iClass && theme[iClass],
135
+ customScrollbars && theme.customScrollbars
135
136
  ]}
136
137
  style:height
137
138
  role="{features.includes('list') ? 'list' : 'table'}"
package/src/lib/chunks.js CHANGED
@@ -2,13 +2,9 @@ import {datesEqual} from './date.js';
2
2
  import {eventIntersects} from './events.js';
3
3
  import {assign} from './utils.js';
4
4
 
5
- // Storage of unique event identifiers for generating chunk ids
6
- const ids = new WeakMap();
7
- let idCounter = 1;
8
-
9
5
  /**
10
6
  * @returns {{
11
- * id: String, // this can be used as key in Svelte keyed each block
7
+ * id?: String, // this can be used as key in Svelte keyed each block
12
8
  * start: Date,
13
9
  * end: Date,
14
10
  * event: Object,
@@ -32,21 +28,10 @@ let idCounter = 1;
32
28
  export function createEventChunk(event, start, end) {
33
29
  start = event.start > start ? event.start : start;
34
30
  end = event.end < end ? event.end : end;
35
-
36
31
  return {
37
32
  start,
38
33
  end,
39
34
  event,
40
- get id() {
41
- let id = ids.get(event);
42
- if (!id) {
43
- id = idCounter++;
44
- ids.set(event, id);
45
- }
46
- delete this.id;
47
- this.id = `${id}-${start.getTime()}`;
48
- return this.id;
49
- },
50
35
  zeroDuration: datesEqual(start, end)
51
36
  };
52
37
  }
@@ -54,7 +39,7 @@ export function createEventChunk(event, start, end) {
54
39
  /**
55
40
  * Create event chunk for month view and all-day slot in week view
56
41
  */
57
- export function createAllDayChunks(event, days) {
42
+ export function createAllDayChunks(event, days, withId = true) {
58
43
  let dates = [];
59
44
  let lastEnd;
60
45
  let gridColumn;
@@ -73,6 +58,9 @@ export function createAllDayChunks(event, days) {
73
58
  let chunk = createEventChunk(event, dates[0], lastEnd);
74
59
  // Chunk layout
75
60
  assign(chunk, {gridColumn, gridRow, dates});
61
+ if (withId) {
62
+ assignChunkId(chunk);
63
+ }
76
64
 
77
65
  return [chunk];
78
66
  }
@@ -131,3 +119,17 @@ export function repositionEvent(chunk, height, top = 1) {
131
119
 
132
120
  return top;
133
121
  }
122
+
123
+ // Storage of unique event identifiers for generating chunk ids
124
+ const ids = new WeakMap();
125
+ let idCounter = 1;
126
+
127
+ export function assignChunkId(chunk) {
128
+ let {event, gridColumn, gridRow} = chunk;
129
+ let id = ids.get(event);
130
+ if (!id) {
131
+ id = idCounter++;
132
+ ids.set(event, id);
133
+ }
134
+ chunk.id = `${id}-${gridColumn}-${gridRow}`;
135
+ }
@@ -92,7 +92,7 @@ export function iEventChunks(mainState, viewState) {
92
92
  }
93
93
  untrack(() => {
94
94
  for (let days of grid) {
95
- iChunks = iChunks.concat(createAllDayChunks(event, days));
95
+ iChunks = iChunks.concat(createAllDayChunks(event, days, false));
96
96
  }
97
97
  });
98
98
  }
@@ -38,7 +38,7 @@
38
38
  <time {datetime} {@attach contentFrom(intlListDay.format(date))}></time>
39
39
  <time class="{theme.daySide}" {datetime} {@attach contentFrom(intlListDaySide.format(date))}></time>
40
40
  </h4>
41
- {#each chunks as chunk (chunk.id)}
41
+ {#each chunks as chunk (chunk.event)}
42
42
  <Event {chunk}/>
43
43
  {/each}
44
44
  </BaseDay>
@@ -74,7 +74,7 @@ export function iEventChunks(mainState, viewState) {
74
74
  return () => {
75
75
  // Dependencies
76
76
  let {iEvents} = mainState;
77
- let {grid} = viewState;
77
+ let {grid, monthView} = viewState;
78
78
 
79
79
  let iChunks = [];
80
80
 
@@ -84,7 +84,7 @@ export function iEventChunks(mainState, viewState) {
84
84
  }
85
85
  untrack(() => {
86
86
  for (let days of grid) {
87
- iChunks = iChunks.concat(createChunks(event, days));
87
+ iChunks = iChunks.concat(createChunks(event, days, monthView, false));
88
88
  }
89
89
  });
90
90
  }
@@ -1,6 +1,6 @@
1
- import {assign, createDuration, createEventChunk, eventIntersects, max, min} from '#lib';
1
+ import {assign, assignChunkId, createDuration, createEventChunk, eventIntersects, max, min} from '#lib';
2
2
 
3
- export function createChunks(event, days, monthView) {
3
+ export function createChunks(event, days, monthView, withId = true) {
4
4
  let dates = [];
5
5
  let firstStart;
6
6
  let lastEnd;
@@ -39,6 +39,9 @@ export function createChunks(event, days, monthView) {
39
39
  let chunk = createEventChunk(event, firstStart, lastEnd);
40
40
  // Chunk layout
41
41
  assign(chunk, {gridColumn, gridRow, dates, left, width});
42
+ if (withId) {
43
+ assignChunkId(chunk);
44
+ }
42
45
 
43
46
  return [chunk];
44
47
  }
@@ -87,9 +87,9 @@ export function iEventChunks(mainState, viewState) {
87
87
  untrack(() => {
88
88
  for (let days of grid) {
89
89
  if (event.allDay) {
90
- allDayIChunks = allDayIChunks.concat(createAllDayChunks(event, days));
90
+ allDayIChunks = allDayIChunks.concat(createAllDayChunks(event, days, false));
91
91
  } else {
92
- iChunks = iChunks.concat(createChunks(event, days));
92
+ iChunks = iChunks.concat(createChunks(event, days, false));
93
93
  }
94
94
  }
95
95
  });
@@ -1,8 +1,9 @@
1
1
  import {
2
- addDuration, assign, cloneDate, createEventChunk, DAY_IN_SECONDS, eventIntersects, isFunction, subtractDay
2
+ addDuration, assign, assignChunkId, cloneDate, createEventChunk, DAY_IN_SECONDS, eventIntersects, isFunction,
3
+ subtractDay
3
4
  } from '#lib';
4
5
 
5
- export function createChunks(event, days) {
6
+ export function createChunks(event, days, withId = true) {
6
7
  let chunks = [];
7
8
  for (let {gridColumn, gridRow, resource, start, end, disabled} of days) {
8
9
  if (!disabled && eventIntersects(event, start, end, resource)) {
@@ -15,6 +16,9 @@ export function createChunks(event, days) {
15
16
  height: (chunk.end - chunk.start) / 1000,
16
17
  maxHeight: (end - chunk.start) / 1000
17
18
  });
19
+ if (withId) {
20
+ assignChunkId(chunk);
21
+ }
18
22
  chunks.push(chunk);
19
23
  }
20
24
  }
@@ -11,6 +11,7 @@ function createOptions(plugins) {
11
11
  today: 'today',
12
12
  },
13
13
  customButtons: {},
14
+ customScrollbars: false, // ec option
14
15
  date: new Date(),
15
16
  datesSet: undefined,
16
17
  dayHeaderFormat: {
@@ -31,7 +32,7 @@ function createOptions(plugins) {
31
32
  eventColor: undefined,
32
33
  eventContent: undefined,
33
34
  eventDidMount: undefined,
34
- eventFilter: undefined, // ec option
35
+ eventFilter: undefined, // ec option
35
36
  eventMouseEnter: undefined,
36
37
  eventMouseLeave: undefined,
37
38
  eventOrder: undefined,
@@ -65,6 +66,7 @@ function createOptions(plugins) {
65
66
  buttonGroup: 'ec-button-group',
66
67
  calendar: 'ec',
67
68
  colHead: 'ec-col-head',
69
+ customScrollbars: 'ec-custom-scrollbars',
68
70
  day: 'ec-day',
69
71
  dayHead: 'ec-day-head',
70
72
  disabled: 'ec-disabled',
@@ -6,6 +6,7 @@
6
6
  @import "./events.css";
7
7
  @import "./now-indicator.css";
8
8
  @import "./popup.css";
9
+ @import "./scrollbars.css";
9
10
 
10
11
  .ec {
11
12
  display: flex;
@@ -0,0 +1,19 @@
1
+ .ec-custom-scrollbars {
2
+ .ec-main {
3
+ &::-webkit-scrollbar {
4
+ background-color: transparent;
5
+ }
6
+
7
+ &::-webkit-scrollbar-thumb {
8
+ border: 4px solid transparent;
9
+ box-shadow: none;
10
+ background-color: var(--ec-border-color);
11
+ background-clip: padding-box;
12
+ border-radius: 8px;
13
+ }
14
+
15
+ &::-webkit-scrollbar-thumb:hover {
16
+ background-color: var(--ec-color-400);
17
+ }
18
+ }
19
+ }