@mezzanine-ui/core 0.15.0 → 0.15.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/_styles.scss CHANGED
@@ -81,4 +81,7 @@
81
81
  @include _load-styles($options, popconfirm);
82
82
  @include _load-styles($options, progress);
83
83
  @include _load-styles($options, skeleton);
84
+
85
+ // Others
86
+ @include _load-styles($options, anchor);
84
87
  }
@@ -0,0 +1,48 @@
1
+ @use '~@mezzanine-ui/system/palette';
2
+ @use '~@mezzanine-ui/system/transition';
3
+ @use '../button/utils' as btn-utils;
4
+ @use './anchor' as *;
5
+
6
+ $bar-width: 1px !default;
7
+ $anchor-left-padding: 12px !default;
8
+
9
+ .#{$prefix} {
10
+ width: 100%;
11
+ display: grid;
12
+ grid-template-columns: 1fr;
13
+ gap: 8px;
14
+ position: relative;
15
+
16
+ &__bar {
17
+ position: absolute;
18
+ left: 0;
19
+ top: 0;
20
+ z-index: 0;
21
+ width: $bar-width;
22
+ height: 100%;
23
+ background-color: palette.color(border);
24
+ }
25
+
26
+ &__anchor {
27
+ @include btn-utils.reset();
28
+
29
+ display: inline-grid;
30
+ position: relative;
31
+ z-index: 1;
32
+ width: 100%;
33
+ border-left: $bar-width solid palette.color(border);
34
+ padding-left: $anchor-left-padding;
35
+ text-align: left;
36
+ color: palette.color(action-inactive);
37
+ transition: transition.standard(border-left), transition.standard(color);
38
+
39
+ &:hover {
40
+ color: palette.color(primary);
41
+ }
42
+
43
+ &--active {
44
+ color: palette.color(primary);
45
+ border-left: $bar-width solid palette.color(primary);
46
+ }
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ $prefix: mzn-anchor;
@@ -0,0 +1 @@
1
+ @forward './anchor';
@@ -0,0 +1,7 @@
1
+ export declare const anchorPrefix = "mzn-anchor";
2
+ export declare const anchorClasses: {
3
+ readonly host: "mzn-anchor";
4
+ readonly bar: "mzn-anchor__bar";
5
+ readonly anchor: "mzn-anchor__anchor";
6
+ readonly anchorActive: "mzn-anchor__anchor--active";
7
+ };
@@ -0,0 +1,9 @@
1
+ const anchorPrefix = 'mzn-anchor';
2
+ const anchorClasses = {
3
+ host: anchorPrefix,
4
+ bar: `${anchorPrefix}__bar`,
5
+ anchor: `${anchorPrefix}__anchor`,
6
+ anchorActive: `${anchorPrefix}__anchor--active`,
7
+ };
8
+
9
+ export { anchorClasses, anchorPrefix };
@@ -0,0 +1 @@
1
+ export * from './anchor';
@@ -0,0 +1 @@
1
+ export { anchorClasses, anchorPrefix } from './anchor.js';
@@ -10,10 +10,10 @@ const CalendarMethodsLuxon = {
10
10
  getHour: (date) => DateTime.fromISO(date).hour,
11
11
  getDate: (date) => DateTime.fromISO(date).day,
12
12
  getWeekDay: (date) => DateTime.fromISO(date).weekday,
13
- getMonth: (date) => DateTime.fromISO(date).month,
13
+ getMonth: (date) => DateTime.fromISO(date).month - 1,
14
14
  getYear: (date) => DateTime.fromISO(date).year,
15
15
  getWeekDayNames: (locale) => Info.weekdays('narrow', { locale }),
16
- getMonthShortName: (month, locale) => DateTime.now().set({ month }).toFormat('MMM', { locale }),
16
+ getMonthShortName: (month, locale) => DateTime.now().set({ month: month + 1 }).toFormat('MMM', { locale }),
17
17
  getMonthShortNames: (locale) => Info.months('short', { locale }),
18
18
  /** Manipulate */
19
19
  addDay: (date, diff) => DateTime.fromISO(date).plus({ day: diff }).toISO(),
@@ -22,7 +22,7 @@ const CalendarMethodsLuxon = {
22
22
  setSecond: (date, second) => DateTime.fromISO(date).set({ second }).toISO(),
23
23
  setMinute: (date, minute) => DateTime.fromISO(date).set({ minute }).toISO(),
24
24
  setHour: (date, hour) => DateTime.fromISO(date).set({ hour }).toISO(),
25
- setMonth: (date, month) => DateTime.fromISO(date).set({ month }).toISO(),
25
+ setMonth: (date, month) => DateTime.fromISO(date).set({ month: month + 1 }).toISO(),
26
26
  setYear: (date, year) => DateTime.fromISO(date).set({ year }).toISO(),
27
27
  setDate: (date, target) => DateTime.fromISO(date).set({ day: target }).toISO(),
28
28
  startOf: (target, granularity) => DateTime.fromISO(target).startOf(granularity).toISO(),
@@ -42,7 +42,7 @@ const CalendarMethodsLuxon = {
42
42
  isBetween: (value, target1, target2) => Interval.fromDateTimes(DateTime.fromISO(target1), DateTime.fromISO(target2)).contains(DateTime.fromISO(value)),
43
43
  isSameDate: (dateOne, dateTwo) => DateTime.fromISO(dateOne).hasSame(DateTime.fromISO(dateTwo), 'day'),
44
44
  isSameWeek: (dateOne, dateTwo) => DateTime.fromISO(dateOne).hasSame(DateTime.fromISO(dateTwo), 'week'),
45
- isInMonth: (target, month) => DateTime.fromISO(target).month === month,
45
+ isInMonth: (target, month) => DateTime.fromISO(target).month === month + 1,
46
46
  isDateIncluded: (date, targets) => targets
47
47
  .some((target) => DateTime.fromISO(date).hasSame(DateTime.fromISO(target), 'day')),
48
48
  isWeekIncluded: (firstDateOfWeek, targets) => targets.some((target) => DateTime.fromISO(firstDateOfWeek).hasSame(DateTime.fromISO(target), 'week')),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/core",
3
- "version": "0.15.0",
3
+ "version": "0.15.2",
4
4
  "description": "Core for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -40,8 +40,8 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@mezzanine-ui/icons": "^0.15.0",
44
- "@mezzanine-ui/system": "^0.15.0",
43
+ "@mezzanine-ui/icons": "^0.15.2",
44
+ "@mezzanine-ui/system": "^0.15.2",
45
45
  "lodash": "^4.17.21",
46
46
  "tslib": "^2.4.1"
47
47
  },