@getflip/swirl-components 0.373.1 → 0.375.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,12 @@
1
1
  import { h, Host, } from "@stencil/core";
2
2
  import { getISODateString, removeTimezoneOffset } from "../../utils";
3
3
  import "wc-datepicker";
4
+ import classnames from "classnames";
4
5
  export class SwirlDatePicker {
5
6
  constructor() {
6
7
  this.disableDate = () => false;
7
8
  this.firstDayOfWeek = 0;
9
+ this.fixedMaxWidth = true;
8
10
  this.locale = "en-US";
9
11
  this.onClick = (event) => {
10
12
  event.stopPropagation();
@@ -32,7 +34,10 @@ export class SwirlDatePicker {
32
34
  const startDate = this.startDate instanceof Date
33
35
  ? getISODateString(this.startDate)
34
36
  : undefined;
35
- return (h(Host, { key: '7ec3ae9991690904727eba667b74a54f21ec11a1', onClick: this.onClick }, h("wc-datepicker", { key: 'd562dfed3aa6b4876348fe4f9ec2cd372cf93287', elementClassName: "date-picker", disableDate: this.disableDate, firstDayOfWeek: this.firstDayOfWeek, labels: this.labels, locale: this.locale, onSelectDate: this.onSelectDate, range: this.range, startDate: startDate, value: this.value })));
37
+ const className = classnames({
38
+ "date-picker--fixed-max-width": this.fixedMaxWidth,
39
+ });
40
+ return (h(Host, { key: 'c8daed371668e09422eb029a4f1466fbeb172dfe', onClick: this.onClick }, h("wc-datepicker", { key: '2db9b0139490da4cb983eae58d564f14be2721bf', class: className, elementClassName: "date-picker", disableDate: this.disableDate, firstDayOfWeek: this.firstDayOfWeek, labels: this.labels, locale: this.locale, onSelectDate: this.onSelectDate, range: this.range, startDate: startDate, value: this.value })));
36
41
  }
37
42
  static get is() { return "swirl-date-picker"; }
38
43
  static get encapsulation() { return "shadow"; }
@@ -92,6 +97,26 @@ export class SwirlDatePicker {
92
97
  "reflect": false,
93
98
  "defaultValue": "0"
94
99
  },
100
+ "fixedMaxWidth": {
101
+ "type": "boolean",
102
+ "attribute": "fixed-max-width",
103
+ "mutable": false,
104
+ "complexType": {
105
+ "original": "boolean",
106
+ "resolved": "boolean",
107
+ "references": {}
108
+ },
109
+ "required": false,
110
+ "optional": false,
111
+ "docs": {
112
+ "tags": [],
113
+ "text": ""
114
+ },
115
+ "getter": false,
116
+ "setter": false,
117
+ "reflect": false,
118
+ "defaultValue": "true"
119
+ },
95
120
  "labels": {
96
121
  "type": "unknown",
97
122
  "attribute": "labels",
@@ -45,7 +45,7 @@
45
45
  padding-bottom: 0;
46
46
  }
47
47
 
48
- :not(.menu--mobile) :not(.menu--root) .menu__menu {
48
+ :not(.menu--mobile):not(.menu--root) .menu__menu {
49
49
  z-index: 1;
50
50
  max-width: 22.5rem;
51
51
  border-radius: var(--s-border-radius-base);
@@ -94,4 +94,9 @@
94
94
 
95
95
  .menu__menu {
96
96
  background-color: var(--s-surface-overlay-default);
97
+ /* z-index: 1;
98
+ max-width: 22.5rem;
99
+ border-radius: var(--s-border-radius-base);
100
+ box-shadow: var(--s-shadow-level-1);
101
+ padding: var(--s-space-4); */
97
102
  }