@getufy/flint-ui 0.2.2 → 0.3.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.
Files changed (102) hide show
  1. package/README.md +6 -0
  2. package/dist/_shared/{flint-accordion-CnXIksxN.js → flint-accordion-C1ZeUTPt.js} +7 -1
  3. package/dist/_shared/{flint-alert-DNcwWxQL.js → flint-alert-XVhCfLTJ.js} +4 -1
  4. package/dist/_shared/{flint-backdrop-BszHm5cJ.js → flint-backdrop-B28XJbZN.js} +4 -2
  5. package/dist/_shared/{flint-bottom-navigation-B4-3_1w7.js → flint-bottom-navigation-_0CMIMiw.js} +5 -2
  6. package/dist/_shared/{flint-chip-5QF8rU8e.js → flint-chip-CBKDllYk.js} +4 -2
  7. package/dist/_shared/{flint-command-COftXb8j.js → flint-command-BuXwceg_.js} +2 -1
  8. package/dist/_shared/{flint-date-field-CYSc9ezt.js → flint-date-field-lcBa5fNS.js} +6 -3
  9. package/dist/_shared/{flint-date-picker-CmCtDBVO.js → flint-date-picker-C_7LYa9d.js} +6 -3
  10. package/dist/_shared/{flint-date-range-picker-DiVjn_ST.js → flint-date-range-picker-D7Ehbx-c.js} +7 -4
  11. package/dist/_shared/{flint-dialog-CH1ylFUb.js → flint-dialog-kIyxDuO7.js} +10 -3
  12. package/dist/_shared/{flint-drawer-BAukflTn.js → flint-drawer-jR9Z3p_w.js} +9 -2
  13. package/dist/_shared/{flint-hover-card-fSMVR0xj.js → flint-hover-card-BTdefGOR.js} +2 -1
  14. package/dist/_shared/{flint-input-BV4Glu8N.js → flint-input-CuVd-L9A.js} +13 -7
  15. package/dist/_shared/{flint-menu-EOF1QvHq.js → flint-menu-rsxjVen9.js} +2 -1
  16. package/dist/_shared/{flint-menubar-7AuGQli6.js → flint-menubar-C1Q_-F8q.js} +2 -1
  17. package/dist/_shared/{flint-single-input-date-range-field-BVGf6515.js → flint-single-input-date-range-field-CnKdZow6.js} +6 -3
  18. package/dist/_shared/{flint-snackbar-DS5F7oXF.js → flint-snackbar-D8-hpqLp.js} +12 -4
  19. package/dist/_shared/{flint-speed-dial-DTZ2WaBh.js → flint-speed-dial-DYU66D0P.js} +2 -1
  20. package/dist/_shared/{flint-stepper-DdkEEVXE.js → flint-stepper-Dh0ZOPQc.js} +10 -4
  21. package/dist/_shared/{flint-text-field-DlLvuIJW.js → flint-text-field--jqYDj7o.js} +8 -2
  22. package/dist/_shared/{flint-textarea-wDEUC9Bt.js → flint-textarea-D15Eq154.js} +5 -5
  23. package/dist/_shared/{flint-time-picker-DcFN6DJD.js → flint-time-picker-DNj-mTOW.js} +24 -12
  24. package/dist/_shared/{flint-toggle-button-group-Cp9x0wSj.js → flint-toggle-button-group-Bb9ysTf-.js} +5 -2
  25. package/dist/accordion/flint-accordion.d.ts +14 -0
  26. package/dist/accordion/flint-accordion.d.ts.map +1 -1
  27. package/dist/accordion/flint-accordion.js +1 -1
  28. package/dist/alert/flint-alert.d.ts +1 -1
  29. package/dist/alert/flint-alert.js +1 -1
  30. package/dist/app-bar/flint-app-bar.d.ts +4 -0
  31. package/dist/app-bar/flint-app-bar.d.ts.map +1 -1
  32. package/dist/backdrop/flint-backdrop.d.ts +1 -1
  33. package/dist/backdrop/flint-backdrop.js +1 -1
  34. package/dist/bottom-navigation/flint-bottom-navigation-action.d.ts +3 -0
  35. package/dist/bottom-navigation/flint-bottom-navigation-action.d.ts.map +1 -1
  36. package/dist/bottom-navigation/flint-bottom-navigation.d.ts +7 -0
  37. package/dist/bottom-navigation/flint-bottom-navigation.d.ts.map +1 -1
  38. package/dist/bottom-navigation/flint-bottom-navigation.js +1 -1
  39. package/dist/button/flint-toggle-button-group.d.ts +7 -0
  40. package/dist/button/flint-toggle-button-group.d.ts.map +1 -1
  41. package/dist/button/flint-toggle-button-group.js +1 -1
  42. package/dist/card/flint-card-header.d.ts +7 -0
  43. package/dist/card/flint-card-header.d.ts.map +1 -1
  44. package/dist/carousel/flint-carousel.d.ts +12 -0
  45. package/dist/carousel/flint-carousel.d.ts.map +1 -1
  46. package/dist/chip/flint-chip.d.ts +4 -1
  47. package/dist/chip/flint-chip.d.ts.map +1 -1
  48. package/dist/chip/flint-chip.js +1 -1
  49. package/dist/command/flint-command.d.ts +1 -1
  50. package/dist/command/flint-command.d.ts.map +1 -1
  51. package/dist/command/flint-command.js +1 -1
  52. package/dist/date-field/flint-date-field.d.ts +2 -0
  53. package/dist/date-field/flint-date-field.d.ts.map +1 -1
  54. package/dist/date-field/flint-date-field.js +1 -1
  55. package/dist/date-picker/flint-date-picker.d.ts +2 -0
  56. package/dist/date-picker/flint-date-picker.d.ts.map +1 -1
  57. package/dist/date-picker/flint-date-picker.js +1 -1
  58. package/dist/date-range-picker/flint-date-range-picker.d.ts +2 -0
  59. package/dist/date-range-picker/flint-date-range-picker.d.ts.map +1 -1
  60. package/dist/date-range-picker/flint-date-range-picker.js +1 -1
  61. package/dist/date-range-picker/flint-single-input-date-range-field.d.ts +2 -0
  62. package/dist/date-range-picker/flint-single-input-date-range-field.d.ts.map +1 -1
  63. package/dist/date-range-picker/flint-single-input-date-range-field.js +1 -1
  64. package/dist/dialog/flint-dialog.d.ts +8 -1
  65. package/dist/dialog/flint-dialog.d.ts.map +1 -1
  66. package/dist/dialog/flint-dialog.js +1 -1
  67. package/dist/drawer/flint-drawer.d.ts +8 -1
  68. package/dist/drawer/flint-drawer.d.ts.map +1 -1
  69. package/dist/drawer/flint-drawer.js +1 -1
  70. package/dist/hover-card/flint-hover-card.d.ts +2 -2
  71. package/dist/hover-card/flint-hover-card.js +1 -1
  72. package/dist/image-list/flint-image-list-item-bar.d.ts +3 -3
  73. package/dist/index.js +23 -23
  74. package/dist/input/flint-input.d.ts +5 -2
  75. package/dist/input/flint-input.d.ts.map +1 -1
  76. package/dist/input/flint-input.js +1 -1
  77. package/dist/menu/flint-menu.d.ts +1 -1
  78. package/dist/menu/flint-menu.js +1 -1
  79. package/dist/menubar/flint-menubar.d.ts.map +1 -1
  80. package/dist/menubar/flint-menubar.js +1 -1
  81. package/dist/snackbar/flint-snackbar.d.ts +9 -2
  82. package/dist/snackbar/flint-snackbar.d.ts.map +1 -1
  83. package/dist/snackbar/flint-snackbar.js +1 -1
  84. package/dist/speed-dial/flint-speed-dial.d.ts +2 -2
  85. package/dist/speed-dial/flint-speed-dial.js +1 -1
  86. package/dist/stepper/flint-stepper.d.ts +30 -2
  87. package/dist/stepper/flint-stepper.d.ts.map +1 -1
  88. package/dist/stepper/flint-stepper.js +1 -1
  89. package/dist/suppress-warnings.d.ts +20 -0
  90. package/dist/suppress-warnings.d.ts.map +1 -0
  91. package/dist/text-field/flint-text-field.d.ts +5 -1
  92. package/dist/text-field/flint-text-field.d.ts.map +1 -1
  93. package/dist/text-field/flint-text-field.js +1 -1
  94. package/dist/textarea/flint-textarea.d.ts +1 -1
  95. package/dist/textarea/flint-textarea.d.ts.map +1 -1
  96. package/dist/textarea/flint-textarea.js +1 -1
  97. package/dist/time-picker/flint-time-picker.d.ts +8 -0
  98. package/dist/time-picker/flint-time-picker.d.ts.map +1 -1
  99. package/dist/time-picker/flint-time-picker.js +1 -1
  100. package/dist/tree-view/flint-tree-item.d.ts +2 -1
  101. package/dist/tree-view/flint-tree-item.d.ts.map +1 -1
  102. package/package.json +7 -3
package/README.md CHANGED
@@ -11,6 +11,12 @@ A modern, lightweight web component library built with [Lit](https://lit.dev). 5
11
11
  npm install @getufy/flint-ui lit
12
12
  ```
13
13
 
14
+ ## Resources
15
+
16
+ - **[Documentation](https://getufy.github.io/flint-ui/)** — full component docs, guides, and examples
17
+ - **[Live Storybook](https://getufy.github.io/flint-ui/storybook/)** — interactive component playground
18
+ - **[React wrappers](https://www.npmjs.com/package/@getufy/flint-ui-react)** — `@getufy/flint-ui-react` for React projects
19
+
14
20
  ## Usage
15
21
 
16
22
  ```html
@@ -6,13 +6,16 @@ var o = ":host{border-top:1px solid var(--flint-border-color);background-color:v
6
6
  static {
7
7
  this.styles = r(o);
8
8
  }
9
+ willUpdate(e) {
10
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultExpanded && !this.expanded && (this.expanded = !0));
11
+ }
9
12
  updated(e) {
10
13
  (e.has("expanded") || e.has("disabled")) && this.querySelectorAll("flint-accordion-summary, flint-accordion-details, flint-accordion-actions").forEach((e) => {
11
14
  this.expanded ? e.setAttribute("expanded", "") : e.removeAttribute("expanded"), this.disabled ? e.setAttribute("disabled", "") : e.removeAttribute("disabled");
12
15
  });
13
16
  }
14
17
  constructor() {
15
- super(), this.expanded = !1, this.disabled = !1, this._uid = `flint-accordion-${++u}`, this._handleToggle = () => {
18
+ super(), this.expanded = !1, this.defaultExpanded = !1, this.disabled = !1, this._uid = `flint-accordion-${++u}`, this._firstUpdate = !0, this._handleToggle = () => {
16
19
  this.disabled || (this.expanded = !this.expanded, this.dispatchEvent(new CustomEvent("flint-accordion-change", {
17
20
  detail: { expanded: this.expanded },
18
21
  bubbles: !0,
@@ -35,6 +38,9 @@ e([a({
35
38
  type: Boolean,
36
39
  reflect: !0
37
40
  })], d.prototype, "expanded", void 0), e([a({
41
+ type: Boolean,
42
+ attribute: "default-expanded"
43
+ })], d.prototype, "defaultExpanded", void 0), e([a({
38
44
  type: Boolean,
39
45
  reflect: !0
40
46
  })], d.prototype, "disabled", void 0), d = e([i("flint-accordion")], d);
@@ -17,7 +17,10 @@ var s = ":host{width:100%;font-family:var(--flint-font-family);margin-bottom:1re
17
17
  this.dispatchEvent(new CustomEvent("flint-alert-close", {
18
18
  bubbles: !0,
19
19
  composed: !0,
20
- detail: { severity: this.severity }
20
+ detail: {
21
+ open: !1,
22
+ severity: this.severity
23
+ }
21
24
  })), this.style.opacity = "0", this.style.transform = "translateY(-4px)", this.style.transition = "opacity 0.2s ease, transform 0.2s ease", this._closeTimer = setTimeout(() => {
22
25
  this.remove();
23
26
  }, 200);
@@ -19,13 +19,15 @@ var c = ":host{--flint-backdrop-color:#00000080;--flint-backdrop-z-index:1200;di
19
19
  _handleKeydown(e) {
20
20
  e.key === "Escape" && this.open && this.dispatchEvent(new CustomEvent("flint-backdrop-close", {
21
21
  bubbles: !0,
22
- composed: !0
22
+ composed: !0,
23
+ detail: { open: !1 }
23
24
  }));
24
25
  }
25
26
  _handleClick(e) {
26
27
  e.target === e.currentTarget && this.dispatchEvent(new CustomEvent("flint-backdrop-close", {
27
28
  bubbles: !0,
28
- composed: !0
29
+ composed: !0,
30
+ detail: { open: !1 }
29
31
  }));
30
32
  }
31
33
  render() {
@@ -5,11 +5,14 @@ import { customElement as a, property as o, queryAssignedElements as s } from "l
5
5
  //#region src/bottom-navigation/flint-bottom-navigation.css?inline
6
6
  var c = ":host{background-color:var(--flint-surface-1);height:56px;box-shadow:var(--flint-shadow-lg);justify-content:center;width:100%;display:flex;position:relative}.container{flex:1;max-width:100%;display:flex}", l = class extends n {
7
7
  constructor(...e) {
8
- super(...e), this.showLabels = !1;
8
+ super(...e), this.showLabels = !1, this._firstUpdate = !0;
9
9
  }
10
10
  static {
11
11
  this.styles = i(c);
12
12
  }
13
+ willUpdate(e) {
14
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultValue !== void 0 && (this.value = this.defaultValue));
15
+ }
13
16
  updated(e) {
14
17
  (e.has("value") || e.has("showLabels")) && this._updateActions();
15
18
  }
@@ -38,7 +41,7 @@ var c = ":host{background-color:var(--flint-surface-1);height:56px;box-shadow:va
38
41
  `;
39
42
  }
40
43
  };
41
- e([o()], l.prototype, "value", void 0), e([o({
44
+ e([o()], l.prototype, "value", void 0), e([o({ attribute: "default-value" })], l.prototype, "defaultValue", void 0), e([o({
42
45
  type: Boolean,
43
46
  attribute: "show-labels"
44
47
  })], l.prototype, "showLabels", void 0), e([s({ selector: "flint-bottom-navigation-action" })], l.prototype, "_actions", void 0), l = e([a("flint-bottom-navigation")], l);
@@ -26,13 +26,15 @@ var c = ":host{vertical-align:middle;font-family:var(--flint-font-family);displa
26
26
  _handleDelete(e) {
27
27
  e.stopPropagation(), !this.disabled && this.dispatchEvent(new CustomEvent("flint-chip-delete", {
28
28
  bubbles: !0,
29
- composed: !0
29
+ composed: !0,
30
+ detail: { value: this.label }
30
31
  }));
31
32
  }
32
33
  _handleDeleteKeyDown(e) {
33
34
  e.key !== "Enter" && e.key !== " " || (e.preventDefault(), e.stopPropagation(), this.disabled || this.dispatchEvent(new CustomEvent("flint-chip-delete", {
34
35
  bubbles: !0,
35
- composed: !0
36
+ composed: !0,
37
+ detail: { value: this.label }
36
38
  })));
37
39
  }
38
40
  render() {
@@ -282,7 +282,8 @@ var T = class extends t {
282
282
  _close() {
283
283
  this.dispatchEvent(new CustomEvent("flint-command-dialog-close", {
284
284
  bubbles: !0,
285
- composed: !0
285
+ composed: !0,
286
+ detail: { open: !1 }
286
287
  }));
287
288
  }
288
289
  _handleBackdropClick(e) {
@@ -38,7 +38,7 @@ var m = [
38
38
  "year"
39
39
  ], h = class extends t {
40
40
  constructor(...e) {
41
- super(...e), this.value = "", this.label = "", this.name = "", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this._internals = this.attachInternals(), this._month = null, this._day = null, this._year = null, this._active = null, this._focused = !1, this._buf = "";
41
+ super(...e), this.value = "", this.label = "", this.name = "", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this._internals = this.attachInternals(), this._month = null, this._day = null, this._year = null, this._active = null, this._focused = !1, this._buf = "";
42
42
  }
43
43
  static {
44
44
  this.formAssociated = !0;
@@ -264,7 +264,7 @@ var m = [
264
264
  </div>
265
265
  </div>
266
266
 
267
- ${this.helperText ? n`<small class="helper">${this.helperText}</small>` : r}
267
+ ${this.error && this.errorMessage ? n`<small class="helper error-text" role="alert">${this.errorMessage}</small>` : this.helperText ? n`<small class="helper">${this.helperText}</small>` : r}
268
268
  `;
269
269
  }
270
270
  };
@@ -283,6 +283,9 @@ e([o({ type: String })], h.prototype, "value", void 0), e([o({ type: String })],
283
283
  })], h.prototype, "error", void 0), e([o({
284
284
  type: String,
285
285
  attribute: "helper-text"
286
- })], h.prototype, "helperText", void 0), e([s()], h.prototype, "_month", void 0), e([s()], h.prototype, "_day", void 0), e([s()], h.prototype, "_year", void 0), e([s()], h.prototype, "_active", void 0), e([s()], h.prototype, "_focused", void 0), e([s()], h.prototype, "_buf", void 0), h = e([a("flint-date-field")], h);
286
+ })], h.prototype, "helperText", void 0), e([o({
287
+ type: String,
288
+ attribute: "error-message"
289
+ })], h.prototype, "errorMessage", void 0), e([s()], h.prototype, "_month", void 0), e([s()], h.prototype, "_day", void 0), e([s()], h.prototype, "_year", void 0), e([s()], h.prototype, "_active", void 0), e([s()], h.prototype, "_focused", void 0), e([s()], h.prototype, "_buf", void 0), h = e([a("flint-date-field")], h);
287
290
  //#endregion
288
291
  export { h as t };
@@ -206,7 +206,7 @@ var b = class extends t {
206
206
  e([o({ type: String })], b.prototype, "value", void 0), e([o({ type: String })], b.prototype, "min", void 0), e([o({ type: String })], b.prototype, "max", void 0), e([o({ type: Boolean })], b.prototype, "disabled", void 0), e([s()], b.prototype, "_viewYear", void 0), e([s()], b.prototype, "_viewMonth", void 0), e([s()], b.prototype, "_mode", void 0), b = e([a("flint-date-picker-calendar")], b);
207
207
  var x = class extends t {
208
208
  constructor(...e) {
209
- super(...e), this.value = "", this.label = "Date", this.placeholder = "MM/DD/YYYY", this.name = "", this.variant = "desktop", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this._open = !1, this._pendingValue = "";
209
+ super(...e), this.value = "", this.label = "Date", this.placeholder = "MM/DD/YYYY", this.name = "", this.variant = "desktop", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this._open = !1, this._pendingValue = "";
210
210
  }
211
211
  static {
212
212
  this.styles = i(d);
@@ -285,7 +285,7 @@ var x = class extends t {
285
285
  📅
286
286
  </button>
287
287
  </div>
288
- ${this.helperText ? n`<p class="helper-text">${this.helperText}</p>` : r}
288
+ ${this.error && this.errorMessage ? n`<p class="helper-text error-text" role="alert">${this.errorMessage}</p>` : this.helperText ? n`<p class="helper-text">${this.helperText}</p>` : r}
289
289
  `;
290
290
  }
291
291
  _renderDesktop() {
@@ -365,6 +365,9 @@ e([o({ type: String })], x.prototype, "value", void 0), e([o({ type: String })],
365
365
  })], x.prototype, "error", void 0), e([o({
366
366
  type: String,
367
367
  attribute: "helper-text"
368
- })], x.prototype, "helperText", void 0), e([s()], x.prototype, "_open", void 0), e([s()], x.prototype, "_pendingValue", void 0), x = e([a("flint-date-picker")], x);
368
+ })], x.prototype, "helperText", void 0), e([o({
369
+ type: String,
370
+ attribute: "error-message"
371
+ })], x.prototype, "errorMessage", void 0), e([s()], x.prototype, "_open", void 0), e([s()], x.prototype, "_pendingValue", void 0), x = e([a("flint-date-picker")], x);
369
372
  //#endregion
370
373
  export { b as n, x as t };
@@ -5,7 +5,7 @@ import { customElement as c, property as l, state as u } from "lit/decorators.js
5
5
  //#region src/date-range-picker/flint-date-range-picker.css?inline
6
6
  var d = ":host{font-family:var(--flint-font-family);display:inline-block}.field-label{color:var(--flint-text-color-muted);margin-bottom:4px;font-size:.75rem;font-weight:500;display:block}.mobile-field{background:var(--flint-input-bg);border:1.5px solid var(--flint-border-color);border-radius:var(--flint-border-radius-md);color:var(--flint-text-color);cursor:pointer;box-sizing:border-box;align-items:center;gap:8px;min-width:260px;padding:10px 44px 10px 14px;font-size:.9375rem;transition:border-color .15s;display:inline-flex;position:relative}.mobile-field:hover{border-color:var(--flint-primary-color)}:host([disabled]) .mobile-field{background:var(--flint-input-disabled-bg);color:var(--flint-text-color-muted);cursor:not-allowed;border-color:var(--flint-border-color)}.mobile-field-placeholder{color:var(--flint-input-placeholder-color)}.mobile-field-icon{color:var(--flint-text-color-muted);font-size:1rem;position:absolute;right:12px}.popover-anchor{display:inline-block;position:relative}.popover{z-index:1400;background:var(--flint-surface-1);border-radius:var(--flint-border-radius-xl);box-shadow:var(--flint-shadow-lg);transform-origin:0 0;opacity:0;visibility:hidden;pointer-events:none;transition:transform .15s cubic-bezier(.4,0,.2,1),opacity .15s,visibility .15s;display:flex;position:absolute;top:calc(100% + 6px);left:0;transform:scale(.94)translateY(-4px)}.popover.open{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1)translateY(0)}.shortcuts-panel{border-right:1px solid var(--flint-border-color);background:var(--flint-surface-1);flex-direction:column;gap:2px;min-width:148px;padding:12px 8px;display:flex}.shortcut-btn{text-align:left;cursor:pointer;color:var(--flint-text-color);white-space:nowrap;background:0 0;border:none;border-radius:6px;padding:8px 12px;font-family:inherit;font-size:.8125rem;transition:background .12s,color .12s}.shortcut-btn:hover{background:var(--flint-primary-color-light);color:var(--flint-primary-color)}.shortcut-btn.active{background:var(--flint-primary-color);color:var(--flint-text-color-on-primary)}.popover-body{flex-direction:column;display:flex}.popover-actions{border-top:1px solid var(--flint-border-color);justify-content:flex-end;gap:8px;padding:4px 12px 12px;display:flex}.action-btn{cursor:pointer;border:none;border-radius:6px;padding:6px 14px;font-family:inherit;font-size:.875rem;font-weight:600;transition:background .12s}.action-btn.cancel{color:var(--flint-text-color-muted);background:0 0}.action-btn.cancel:hover{background:var(--flint-hover-color)}.action-btn.ok{background:var(--flint-primary-color);color:var(--flint-text-color-on-primary)}.action-btn.ok:hover{background:var(--flint-primary-color-hover)}.click-away{z-index:1399;display:none;position:fixed;inset:0}.click-away.open{display:block}.static-wrapper{border-radius:var(--flint-border-radius-xl);box-shadow:var(--flint-shadow-sm), 0 0 0 1px var(--flint-border-color);display:inline-block;overflow:hidden}.helper-text{color:var(--flint-text-color-muted);margin-top:4px;font-size:.75rem}:host([error]) .helper-text{color:var(--flint-error-color)}:host([error]) flint-single-input-date-range-field{--flint-border-color:var(--flint-error-color)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", f = class extends i {
7
7
  constructor(...e) {
8
- super(...e), this.value = [...t], this.label = "Date Range", this.variant = "desktop", this.multiInput = !1, this.shortcuts = !1, this.shortcutItems = [], this.min = "", this.max = "", this.name = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this._open = !1, this._pendingValue = [...t], this._activeShortcut = "";
8
+ super(...e), this.value = [...t], this.label = "Date Range", this.variant = "desktop", this.multiInput = !1, this.shortcuts = !1, this.shortcutItems = [], this.min = "", this.max = "", this.name = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this._open = !1, this._pendingValue = [...t], this._activeShortcut = "";
9
9
  }
10
10
  static {
11
11
  this.styles = s(d);
@@ -99,7 +99,7 @@ var d = ":host{font-family:var(--flint-font-family);display:inline-block}.field-
99
99
  @flint-date-range-picker-change=${this._handleFieldRangeChange}
100
100
  @focus=${this._openPicker}
101
101
  ></flint-single-input-date-range-field>
102
- ${this.helperText ? a`<p class="helper-text">${this.helperText}</p>` : o}
102
+ ${this.error && this.errorMessage ? a`<p class="helper-text error-text" role="alert">${this.errorMessage}</p>` : this.helperText ? a`<p class="helper-text">${this.helperText}</p>` : o}
103
103
  `;
104
104
  }
105
105
  _renderMobileField() {
@@ -118,7 +118,7 @@ var d = ":host{font-family:var(--flint-font-family);display:inline-block}.field-
118
118
  ${e ? a`<span>${e}</span>` : a`<span class="mobile-field-placeholder">Start date – End date</span>`}
119
119
  <span class="mobile-field-icon">📅</span>
120
120
  </div>
121
- ${this.helperText ? a`<p class="helper-text">${this.helperText}</p>` : o}
121
+ ${this.error && this.errorMessage ? a`<p class="helper-text error-text" role="alert">${this.errorMessage}</p>` : this.helperText ? a`<p class="helper-text">${this.helperText}</p>` : o}
122
122
  `;
123
123
  }
124
124
  _renderDesktop() {
@@ -196,6 +196,9 @@ e([l({ type: Array })], f.prototype, "value", void 0), e([l({ type: String })],
196
196
  })], f.prototype, "error", void 0), e([l({
197
197
  type: String,
198
198
  attribute: "helper-text"
199
- })], f.prototype, "helperText", void 0), e([u()], f.prototype, "_open", void 0), e([u()], f.prototype, "_pendingValue", void 0), e([u()], f.prototype, "_activeShortcut", void 0), f = e([c("flint-date-range-picker")], f);
199
+ })], f.prototype, "helperText", void 0), e([l({
200
+ type: String,
201
+ attribute: "error-message"
202
+ })], f.prototype, "errorMessage", void 0), e([u()], f.prototype, "_open", void 0), e([u()], f.prototype, "_pendingValue", void 0), e([u()], f.prototype, "_activeShortcut", void 0), f = e([c("flint-date-range-picker")], f);
200
203
  //#endregion
201
204
  export { f as t };
@@ -5,13 +5,16 @@ import { classMap as o } from "lit/directives/class-map.js";
5
5
  //#region src/dialog/flint-dialog.css?inline
6
6
  var s = ":host{display:block}.dialog-panel{background-color:var(--flint-surface-background,white);border-radius:var(--flint-border-radius-xl,12px);box-shadow:var(--flint-shadow-xl,0 20px 25px -5px #0000001a);max-width:90vw;max-height:var(--flint-dialog-max-height,90vh);width:var(--flint-dialog-width,444px);opacity:0;pointer-events:none;flex-direction:column;transition:opacity .25s cubic-bezier(.4,0,.2,1),transform .25s cubic-bezier(.4,0,.2,1);display:flex;position:relative;overflow:hidden;transform:scale(.9)}.dialog-panel.open{opacity:1;pointer-events:auto;transform:scale(1)}.dialog-panel.transition-slide-up{transform:translateY(40px)}.dialog-panel.transition-slide-up.open{transform:translateY(0)}.dialog-panel.transition-slide-down{transform:translateY(-40px)}.dialog-panel.transition-slide-down.open{transform:translateY(0)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", c = ":host{font-family:var(--flint-font-family);color:var(--flint-text-color);padding:20px 24px 12px;font-size:1.25rem;font-weight:600;display:block}", l = ":host{-webkit-overflow-scrolling:touch;flex:auto;padding:0 24px 20px;display:block;overflow-y:auto}", u = ":host{font-family:var(--flint-font-family);color:var(--flint-text-color-muted);margin-bottom:8px;font-size:.9375rem;line-height:1.6;display:block}", d = ":host{border-top:1px solid var(--flint-border-color);justify-content:flex-end;align-items:center;gap:8px;padding:8px 16px 16px;display:flex}:host([align=start]){justify-content:flex-start}:host([align=center]){justify-content:center}:host([align=space-between]){justify-content:space-between}", f = [], p = class extends t {
7
7
  constructor(...e) {
8
- super(...e), this.open = !1, this._lastFocused = null, this.transition = "scale", this.disableBackdropClose = !1, this._handleKeyDown = (e) => {
8
+ super(...e), this.open = !1, this.defaultOpen = !1, this._firstUpdate = !0, this._lastFocused = null, this.transition = "scale", this.disableBackdropClose = !1, this._handleKeyDown = (e) => {
9
9
  e.key === "Escape" && this.open && f[f.length - 1] === this && this.requestClose();
10
10
  };
11
11
  }
12
12
  static {
13
13
  this.styles = r(s);
14
14
  }
15
+ willUpdate(e) {
16
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultOpen && !this.open && (this.open = !0));
17
+ }
15
18
  connectedCallback() {
16
19
  super.connectedCallback(), window.addEventListener("keydown", this._handleKeyDown);
17
20
  }
@@ -32,7 +35,8 @@ var s = ":host{display:block}.dialog-panel{background-color:var(--flint-surface-
32
35
  requestClose() {
33
36
  this.dispatchEvent(new CustomEvent("close", {
34
37
  bubbles: !0,
35
- composed: !0
38
+ composed: !0,
39
+ detail: { open: !1 }
36
40
  }));
37
41
  }
38
42
  _handleBackdropClose(e) {
@@ -63,7 +67,10 @@ var s = ":host{display:block}.dialog-panel{background-color:var(--flint-surface-
63
67
  e([a({
64
68
  type: Boolean,
65
69
  reflect: !0
66
- })], p.prototype, "open", void 0), e([a({ type: String })], p.prototype, "transition", void 0), e([a({
70
+ })], p.prototype, "open", void 0), e([a({
71
+ type: Boolean,
72
+ attribute: "default-open"
73
+ })], p.prototype, "defaultOpen", void 0), e([a({ type: String })], p.prototype, "transition", void 0), e([a({
67
74
  type: Boolean,
68
75
  attribute: "disable-backdrop-close"
69
76
  })], p.prototype, "disableBackdropClose", void 0), p = e([i("flint-dialog")], p);
@@ -4,13 +4,16 @@ import { customElement as i, property as a } from "lit/decorators.js";
4
4
  //#region src/drawer/flint-drawer.css?inline
5
5
  var o = ":host,:host([variant=temporary]){z-index:var(--flint-drawer-z-index,1200);pointer-events:none;display:block;position:fixed;inset:0;overflow:hidden}:host([container]),:host([container][variant=temporary]){position:absolute}:host([variant=persistent]){display:contents}:host([variant=mini]){pointer-events:auto;z-index:auto;display:flex;position:static;inset:auto;overflow:visible}.backdrop{background:var(--flint-backdrop-color);opacity:0;pointer-events:none;transition:opacity .25s;position:absolute;inset:0}.backdrop.open{opacity:1;pointer-events:auto}.paper{background:var(--flint-drawer-bg,var(--flint-surface-1));pointer-events:auto;outline:none;flex-direction:column;display:flex;position:absolute;overflow-y:auto}:host(:not([variant])) .paper,:host([variant=temporary]) .paper{width:var(--flint-drawer-width,250px);box-shadow:var(--flint-drawer-shadow);transition:transform var(--flint-drawer-transition,.225s cubic-bezier(0, 0, .2, 1));top:0;bottom:0;left:0;transform:translate(-100%)}:host(:not([variant])[open]) .paper,:host([variant=temporary][open]) .paper{transform:translate(0)}:host([variant=temporary][anchor=right]) .paper{left:auto;right:0;transform:translate(100%)}:host([variant=temporary][anchor=right][open]) .paper{transform:translate(0)}:host([variant=temporary][anchor=top]) .paper{width:auto;height:var(--flint-drawer-height,auto);inset:0 0 auto;transform:translateY(-100%)}:host([variant=temporary][anchor=top][open]) .paper{transform:translateY(0)}:host([variant=temporary][anchor=bottom]) .paper{width:auto;height:var(--flint-drawer-height,auto);inset:auto 0 0;transform:translateY(100%)}:host([variant=temporary][anchor=bottom][open]) .paper{transform:translateY(0)}:host([variant=persistent]) .paper{box-shadow:none;border-right:1px solid var(--flint-border-color);pointer-events:auto;transition:none;position:relative;transform:none}:host([variant=persistent][anchor=right]) .paper{border-right:none;border-left:1px solid var(--flint-border-color)}:host([variant=persistent]) .paper:not(.open){display:none}:host([variant=mini]) .paper{box-shadow:none;border-right:1px solid var(--flint-border-color);width:var(--flint-drawer-mini-width,72px);white-space:nowrap;transition:width var(--flint-drawer-transition,.225s cubic-bezier(0, 0, .2, 1));pointer-events:auto;flex-shrink:0;position:relative;overflow-x:hidden;transform:none}:host([variant=mini][anchor=right]) .paper{border-right:none;border-left:1px solid var(--flint-border-color)}:host([variant=mini][open]) .paper{width:var(--flint-drawer-width,250px)}:host([variant=mini]:not([open])) ::slotted([data-drawer-hide-mini]){opacity:0;pointer-events:none}::slotted([data-drawer-hide-mini]){transition:opacity .18s}.edge{background:var(--flint-drawer-bg,var(--flint-surface-1));border:1px solid var(--flint-border-color);cursor:pointer;pointer-events:auto;justify-content:center;align-items:center;display:none;position:absolute;box-shadow:0 1px 3px #0000001f}:host([edge]:not([variant])) .edge,:host([edge][variant=temporary]) .edge{display:flex}.edge-left{width:var(--flint-drawer-edge-width,16px);border-radius:0 8px 8px 0;top:0;bottom:0;left:0}.edge-right{width:var(--flint-drawer-edge-width,16px);border-radius:8px 0 0 8px;top:0;bottom:0;right:0}.edge-top{height:var(--flint-drawer-edge-width,16px);border-radius:0 0 8px 8px;top:0;left:0;right:0}.edge-bottom{height:var(--flint-drawer-edge-width,16px);border-radius:8px 8px 0 0;bottom:0;left:0;right:0}.edge-handle{background:var(--flint-border-color);border-radius:2px;width:4px;height:32px}.edge-top .edge-handle,.edge-bottom .edge-handle{width:32px;height:4px}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", s = class extends t {
6
6
  constructor(...e) {
7
- super(...e), this.open = !1, this.anchor = "left", this.variant = "temporary", this.edge = !1, this.container = !1, this.label = "Drawer", this._lastFocused = null, this._boundKeyDown = (e) => {
7
+ super(...e), this.open = !1, this.defaultOpen = !1, this.anchor = "left", this.variant = "temporary", this.edge = !1, this.container = !1, this.label = "Drawer", this._firstUpdate = !0, this._lastFocused = null, this._boundKeyDown = (e) => {
8
8
  e.defaultPrevented || this.open && e.key === "Escape" && this.variant === "temporary" && (e.preventDefault(), this._close());
9
9
  };
10
10
  }
11
11
  static {
12
12
  this.styles = r(o);
13
13
  }
14
+ willUpdate(e) {
15
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultOpen && !this.open && (this.open = !0));
16
+ }
14
17
  connectedCallback() {
15
18
  super.connectedCallback(), window.addEventListener("keydown", this._boundKeyDown);
16
19
  }
@@ -23,7 +26,8 @@ var o = ":host,:host([variant=temporary]){z-index:var(--flint-drawer-z-index,120
23
26
  _close() {
24
27
  this.dispatchEvent(new CustomEvent("flint-drawer-close", {
25
28
  bubbles: !0,
26
- composed: !0
29
+ composed: !0,
30
+ detail: { open: !1 }
27
31
  }));
28
32
  }
29
33
  render() {
@@ -63,6 +67,9 @@ e([a({
63
67
  type: Boolean,
64
68
  reflect: !0
65
69
  })], s.prototype, "open", void 0), e([a({
70
+ type: Boolean,
71
+ attribute: "default-open"
72
+ })], s.prototype, "defaultOpen", void 0), e([a({
66
73
  type: String,
67
74
  reflect: !0
68
75
  })], s.prototype, "anchor", void 0), e([a({
@@ -99,7 +99,8 @@ var d = class extends t {
99
99
  _setOpen(e) {
100
100
  this._isOpen !== e && (this._isOpen = e, this._syncChildren(), this.dispatchEvent(new CustomEvent(e ? "flint-hover-card-open" : "flint-hover-card-close", {
101
101
  bubbles: !0,
102
- composed: !0
102
+ composed: !0,
103
+ detail: { open: e }
103
104
  })));
104
105
  }
105
106
  _syncChildren() {
@@ -6,7 +6,7 @@ import { classMap as s } from "lit/directives/class-map.js";
6
6
  //#region src/input/flint-input.css?inline
7
7
  var c = ":host{font-family:var(--flint-font-family);display:block}.input-wrapper{flex-direction:column;gap:6px;display:flex}label{color:var(--flint-label-color);font-size:14px;font-weight:500}input{box-sizing:border-box;border-radius:var(--flint-input-border-radius);border:1px solid var(--flint-input-border-color);background-color:var(--flint-input-bg);width:100%;color:var(--flint-text-color);outline:none;padding:10px 14px;font-family:inherit;font-size:14px;transition:border-color .2s,box-shadow .2s}:host([size=sm]) input{padding:6px 10px;font-size:13px}:host([size=lg]) input{padding:12px 16px;font-size:16px}input::placeholder{color:var(--flint-input-placeholder-color)}input:hover:not(:disabled):not(.error-input){border-color:var(--flint-input-border-hover-color)}input:focus-visible{border-color:var(--flint-primary-color);box-shadow:0 0 0 3px var(--flint-primary-focus-ring)}input[aria-invalid=true]{border-color:var(--flint-error-color)}input[aria-invalid=true]:focus-visible{box-shadow:0 0 0 3px var(--flint-error-focus-ring)}input:disabled{background-color:var(--flint-input-disabled-bg);color:var(--flint-input-disabled-color);cursor:not-allowed;opacity:1}input[readonly]{background-color:var(--flint-input-readonly-bg);cursor:default}.help-text{color:var(--flint-help-text-color);margin:0;font-size:12px}.error-text{color:var(--flint-error-color)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", l = 0, u = class extends t(n) {
8
8
  constructor(...e) {
9
- super(...e), this._inputId = `flint-input-${++l}`, this.label = "", this.value = "", this.type = "text", this.placeholder = "", this.helpText = "", this.error = !1, this.errorMessage = "", this.disabled = !1, this.required = !1, this.readonly = !1, this.name = "", this.autocomplete = "", this.size = "default";
9
+ super(...e), this._inputId = `flint-input-${++l}`, this.label = "", this.value = "", this.type = "text", this.placeholder = "", this.helperText = "", this.error = !1, this.errorMessage = "", this.disabled = !1, this.required = !1, this.readonly = !1, this.name = "", this.autocomplete = "", this.size = "default";
10
10
  }
11
11
  static {
12
12
  this.styles = i(c);
@@ -14,14 +14,17 @@ var c = ":host{font-family:var(--flint-font-family);display:block}.input-wrapper
14
14
  get inputElement() {
15
15
  return this.shadowRoot.querySelector("input");
16
16
  }
17
+ willUpdate(e) {
18
+ super.willUpdate(e), this._firstUpdate && (this._firstUpdate = !1, this.defaultValue && !this.value && (this.value = this.defaultValue));
19
+ }
17
20
  formResetCallback() {
18
- this.value = "", this._updateFormValue();
21
+ this.value = this.defaultValue ?? "", this._updateFormValue();
19
22
  }
20
23
  _updateFormValue() {
21
24
  this._initFormValue(this.value || null), this._initFormValidity(this.required, !this.value, "Please fill out this field.");
22
25
  }
23
26
  render() {
24
- let e = this.error || !!this.errorMessage, t = e && this.errorMessage || this.helpText ? `${this._inputId}-desc` : void 0;
27
+ let e = this.error || !!this.errorMessage, t = e && this.errorMessage || this.helperText ? `${this._inputId}-desc` : void 0;
25
28
  return r`
26
29
  <div class="input-wrapper" part="wrapper">
27
30
  ${this.label ? r`<label for=${this._inputId} part="label">${this.label}</label>` : ""}
@@ -45,7 +48,7 @@ var c = ":host{font-family:var(--flint-font-family);display:block}.input-wrapper
45
48
  @change=${this._handleChange}
46
49
  />
47
50
 
48
- ${e && this.errorMessage ? r`<p id=${t} class="help-text error-text" part="error-text" role="alert">${this.errorMessage}</p>` : this.helpText ? r`<p id=${t} class="help-text" part="help-text">${this.helpText}</p>` : ""}
51
+ ${e && this.errorMessage ? r`<p id=${t} class="help-text error-text" part="error-text" role="alert">${this.errorMessage}</p>` : this.helperText ? r`<p id=${t} class="help-text" part="help-text">${this.helperText}</p>` : ""}
49
52
  </div>
50
53
  `;
51
54
  }
@@ -66,8 +69,8 @@ var c = ":host{font-family:var(--flint-font-family);display:block}.input-wrapper
66
69
  };
67
70
  e([o({ type: String })], u.prototype, "label", void 0), e([o({ type: String })], u.prototype, "value", void 0), e([o({ type: String })], u.prototype, "type", void 0), e([o({ type: String })], u.prototype, "placeholder", void 0), e([o({
68
71
  type: String,
69
- attribute: "help-text"
70
- })], u.prototype, "helpText", void 0), e([o({ type: Boolean })], u.prototype, "error", void 0), e([o({
72
+ attribute: "helper-text"
73
+ })], u.prototype, "helperText", void 0), e([o({ type: Boolean })], u.prototype, "error", void 0), e([o({
71
74
  type: String,
72
75
  attribute: "error-message"
73
76
  })], u.prototype, "errorMessage", void 0), e([o({
@@ -82,6 +85,9 @@ e([o({ type: String })], u.prototype, "label", void 0), e([o({ type: String })],
82
85
  })], u.prototype, "readonly", void 0), e([o({ type: String })], u.prototype, "name", void 0), e([o({ type: String })], u.prototype, "autocomplete", void 0), e([o({
83
86
  type: String,
84
87
  reflect: !0
85
- })], u.prototype, "size", void 0), u = e([a("flint-input")], u);
88
+ })], u.prototype, "size", void 0), e([o({
89
+ type: String,
90
+ attribute: "default-value"
91
+ })], u.prototype, "defaultValue", void 0), u = e([a("flint-input")], u);
86
92
  //#endregion
87
93
  export { u as t };
@@ -162,7 +162,8 @@ var _ = class extends t {
162
162
  _close() {
163
163
  this.dispatchEvent(new CustomEvent("flint-menu-close", {
164
164
  bubbles: !0,
165
- composed: !0
165
+ composed: !0,
166
+ detail: { open: !1 }
166
167
  }));
167
168
  }
168
169
  _handleItemSelect() {
@@ -416,7 +416,8 @@ var M = class extends t {
416
416
  _requestClose() {
417
417
  this.dispatchEvent(new CustomEvent("flint-menubar-request-close", {
418
418
  bubbles: !0,
419
- composed: !0
419
+ composed: !0,
420
+ detail: { open: !1 }
420
421
  }));
421
422
  }
422
423
  resetHighlight() {
@@ -20,7 +20,7 @@ function m(e, t) {
20
20
  }
21
21
  var h = class extends r {
22
22
  constructor(...e) {
23
- super(...e), this.value = [...t], this.label = "", this.name = "", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this._sm = null, this._sd = null, this._sy = null, this._em = null, this._ed = null, this._ey = null, this._active = null, this._focused = !1, this._buf = "";
23
+ super(...e), this.value = [...t], this.label = "", this.name = "", this.min = "", this.max = "", this.disabled = !1, this.readonly = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this._sm = null, this._sd = null, this._sy = null, this._em = null, this._ed = null, this._ey = null, this._active = null, this._focused = !1, this._buf = "";
24
24
  }
25
25
  static {
26
26
  this.styles = o(d);
@@ -288,7 +288,7 @@ var h = class extends r {
288
288
  </div>
289
289
  </div>
290
290
 
291
- ${this.helperText ? i`<small class="helper">${this.helperText}</small>` : a}
291
+ ${this.error && this.errorMessage ? i`<small class="helper error-text" role="alert">${this.errorMessage}</small>` : this.helperText ? i`<small class="helper">${this.helperText}</small>` : a}
292
292
 
293
293
  ${this.name ? i`
294
294
  <input type="hidden" name="${this.name}-start" .value=${this.value[0]}>
@@ -309,6 +309,9 @@ e([c({ type: Array })], h.prototype, "value", void 0), e([c({ type: String })],
309
309
  })], h.prototype, "error", void 0), e([c({
310
310
  type: String,
311
311
  attribute: "helper-text"
312
- })], h.prototype, "helperText", void 0), e([l()], h.prototype, "_sm", void 0), e([l()], h.prototype, "_sd", void 0), e([l()], h.prototype, "_sy", void 0), e([l()], h.prototype, "_em", void 0), e([l()], h.prototype, "_ed", void 0), e([l()], h.prototype, "_ey", void 0), e([l()], h.prototype, "_active", void 0), e([l()], h.prototype, "_focused", void 0), e([l()], h.prototype, "_buf", void 0), h = e([s("flint-single-input-date-range-field")], h);
312
+ })], h.prototype, "helperText", void 0), e([c({
313
+ type: String,
314
+ attribute: "error-message"
315
+ })], h.prototype, "errorMessage", void 0), e([l()], h.prototype, "_sm", void 0), e([l()], h.prototype, "_sd", void 0), e([l()], h.prototype, "_sy", void 0), e([l()], h.prototype, "_em", void 0), e([l()], h.prototype, "_ed", void 0), e([l()], h.prototype, "_ey", void 0), e([l()], h.prototype, "_active", void 0), e([l()], h.prototype, "_focused", void 0), e([l()], h.prototype, "_buf", void 0), h = e([s("flint-single-input-date-range-field")], h);
313
316
  //#endregion
314
317
  export { h as t };
@@ -5,18 +5,23 @@ import { classMap as s } from "lit/directives/class-map.js";
5
5
  //#region src/snackbar/flint-snackbar.css?inline
6
6
  var c = ":host{pointer-events:none;z-index:var(--flint-snackbar-z-index,1400);justify-content:center;align-items:center;transition:all .3s cubic-bezier(.4,0,.2,1);display:flex;position:fixed}:host([anchor-origin*=bottom]){bottom:var(--flint-snackbar-offset,24px)}:host([anchor-origin*=top]){top:var(--flint-snackbar-offset,24px)}:host([anchor-origin*=left]){left:var(--flint-snackbar-offset,24px)}:host([anchor-origin*=right]){right:var(--flint-snackbar-offset,24px)}:host([anchor-origin*=center]){left:50%;transform:translate(-50%)}.snackbar{background-color:var(--flint-snackbar-bg,#313131);color:var(--flint-snackbar-color,#fff);font-family:var(--flint-font-family);letter-spacing:.01071em;border-radius:var(--flint-border-radius-md);box-shadow:var(--flint-shadow-lg);min-width:var(--flint-snackbar-min-width,288px);max-width:var(--flint-snackbar-max-width,560px);pointer-events:auto;opacity:0;visibility:hidden;align-items:center;padding:6px 16px;font-size:.875rem;line-height:1.43;transition:opacity .225s cubic-bezier(.4,0,.2,1),transform .15s cubic-bezier(.4,0,.2,1);display:flex;transform:scale(.85)}.snackbar.open{opacity:1;visibility:visible;transform:scale(1)}:host([variant=info]) .snackbar{background-color:var(--flint-snackbar-bg-info,#0288d1)}:host([variant=success]) .snackbar{background-color:var(--flint-snackbar-bg-success,#2e7d32)}:host([variant=warning]) .snackbar{background-color:var(--flint-snackbar-bg-warning,#ed6c02)}:host([variant=error]) .snackbar{background-color:var(--flint-snackbar-bg-error,#d32f2f)}.message{flex-grow:1;padding:8px 0}.action{align-items:center;margin-left:8px;margin-right:-8px;padding-left:16px;display:flex}.action.hidden{display:none}.close-btn{color:inherit;cursor:pointer;opacity:.8;background:0 0;border:none;border-radius:2px;align-items:center;margin-left:8px;margin-right:-8px;padding:4px 8px;line-height:0;display:flex}.close-btn:hover{opacity:1}::slotted(flint-alert){width:100%;min-width:288px;margin-bottom:0!important}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", l = class extends t {
7
7
  constructor(...e) {
8
- super(...e), this.open = !1, this.message = "", this.autoHideDuration = 5e3, this.anchorOrigin = "bottom-center", this.pauseOnHover = !0, this.closable = !1, this.variant = "default", this._hasAction = !1, this._timer = null, this._remainingTime = 0, this._timerStartedAt = 0;
8
+ super(...e), this.open = !1, this.defaultOpen = !1, this.message = "", this.autoHideDuration = 5e3, this.anchorOrigin = "bottom-center", this.pauseOnHover = !0, this.closable = !1, this.variant = "default", this._firstUpdate = !0, this._hasAction = !1, this._timer = null, this._remainingTime = 0, this._timerStartedAt = 0;
9
9
  }
10
10
  static {
11
11
  this.styles = r(c);
12
12
  }
13
+ willUpdate(e) {
14
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultOpen && !this.open && (this.open = !0));
15
+ }
13
16
  updated(e) {
14
17
  e.has("open") && (this.open ? (this._remainingTime = this.autoHideDuration, this._startTimer(this._remainingTime), this.dispatchEvent(new CustomEvent("flint-snackbar-open", {
15
18
  bubbles: !0,
16
- composed: !0
19
+ composed: !0,
20
+ detail: { open: !0 }
17
21
  }))) : (this._clearTimer(), this.dispatchEvent(new CustomEvent("flint-snackbar-close", {
18
22
  bubbles: !0,
19
- composed: !0
23
+ composed: !0,
24
+ detail: { open: !1 }
20
25
  }))));
21
26
  }
22
27
  disconnectedCallback() {
@@ -81,7 +86,10 @@ var c = ":host{pointer-events:none;z-index:var(--flint-snackbar-z-index,1400);ju
81
86
  e([a({
82
87
  type: Boolean,
83
88
  reflect: !0
84
- })], l.prototype, "open", void 0), e([a({ type: String })], l.prototype, "message", void 0), e([a({
89
+ })], l.prototype, "open", void 0), e([a({
90
+ type: Boolean,
91
+ attribute: "default-open"
92
+ })], l.prototype, "defaultOpen", void 0), e([a({ type: String })], l.prototype, "message", void 0), e([a({
85
93
  type: Number,
86
94
  attribute: "auto-hide-duration"
87
95
  })], l.prototype, "autoHideDuration", void 0), e([a({
@@ -140,7 +140,8 @@ var f = class extends t {
140
140
  _setOpen(e) {
141
141
  this.open = e, this._updateActionTooltips(), this.dispatchEvent(new CustomEvent(e ? "flint-speed-dial-open" : "flint-speed-dial-close", {
142
142
  bubbles: !0,
143
- composed: !0
143
+ composed: !0,
144
+ detail: { open: e }
144
145
  }));
145
146
  }
146
147
  _toggle() {
@@ -74,7 +74,7 @@ var y = class extends t {
74
74
  }
75
75
  _fire() {
76
76
  this.disabled || this.dispatchEvent(new CustomEvent("flint-step-click", {
77
- detail: { index: this.stepIndex },
77
+ detail: { step: this.stepIndex },
78
78
  bubbles: !0,
79
79
  composed: !0
80
80
  }));
@@ -162,9 +162,9 @@ e([o({
162
162
  })], y.prototype, "prevCompleted", void 0), y = e([a("flint-step")], y);
163
163
  var b = class extends t {
164
164
  constructor(...e) {
165
- super(...e), this.activeStep = 0, this.orientation = "horizontal", this.alternativeLabel = !1, this.nonLinear = !1, this.label = "steps", this._onStepClick = (e) => {
166
- this.activeStep = e.detail.index, this.dispatchEvent(new CustomEvent("flint-step-change", {
167
- detail: { step: e.detail.index },
165
+ super(...e), this.activeStep = 0, this.orientation = "horizontal", this.alternativeLabel = !1, this.nonLinear = !1, this.label = "steps", this._firstUpdate = !0, this._onStepClick = (e) => {
166
+ this.activeStep = e.detail.step, this.dispatchEvent(new CustomEvent("flint-step-change", {
167
+ detail: { step: e.detail.step },
168
168
  bubbles: !0,
169
169
  composed: !0
170
170
  })), this._syncSteps();
@@ -173,6 +173,9 @@ var b = class extends t {
173
173
  static {
174
174
  this.styles = i(f);
175
175
  }
176
+ willUpdate(e) {
177
+ this._firstUpdate && (this._firstUpdate = !1, this.defaultActiveStep !== void 0 && (this.activeStep = this.defaultActiveStep));
178
+ }
176
179
  _syncSteps() {
177
180
  let e = Array.from(this.querySelectorAll(":scope > flint-step"));
178
181
  e.forEach((t, n) => {
@@ -204,6 +207,9 @@ e([o({
204
207
  type: Number,
205
208
  attribute: "active-step"
206
209
  })], b.prototype, "activeStep", void 0), e([o({
210
+ type: Number,
211
+ attribute: "default-active-step"
212
+ })], b.prototype, "defaultActiveStep", void 0), e([o({
207
213
  type: String,
208
214
  reflect: !0
209
215
  })], b.prototype, "orientation", void 0), e([o({
@@ -5,11 +5,14 @@ import { classMap as s } from "lit/directives/class-map.js";
5
5
  //#region src/text-field/flint-text-field.css?inline
6
6
  var c = ":host{font-family:var(--flint-font-family);margin-bottom:1rem;display:block}.field-container{flex-direction:column;gap:.5rem;display:flex}.label{color:var(--flint-label-color);font-size:.875rem;font-weight:500;transition:color .2s}.input-wrapper{background-color:var(--flint-input-bg);border:1px solid var(--flint-input-border-color);border-radius:var(--flint-input-border-radius);align-items:center;transition:all .2s;display:flex;position:relative;overflow:hidden}.input-wrapper:hover:not(.disabled):not(.error){border-color:var(--flint-input-border-hover-color)}.input-wrapper.focused:not(.error){border-color:var(--flint-primary-color);box-shadow:0 0 0 3px var(--flint-primary-focus-ring)}.input-wrapper.error{border-color:var(--flint-error-color)}.input-wrapper.error.focused{box-shadow:0 0 0 3px var(--flint-error-focus-ring)}.input-wrapper.disabled{background-color:var(--flint-input-disabled-bg);cursor:not-allowed;opacity:.7}input{width:100%;color:inherit;background:0 0;border:none;outline:none;flex:1;padding:.625rem .875rem;font-family:inherit;font-size:1rem}input:disabled{cursor:not-allowed}input::placeholder{color:var(--flint-input-placeholder-color)}.icon-leading,.icon-trailing{color:var(--flint-text-color-muted);justify-content:center;align-items:center;padding:0 .75rem;display:flex}.icon-leading{padding-right:0}.icon-trailing{padding-left:0}.helper-text{color:var(--flint-help-text-color);font-size:.75rem}.error-text{color:var(--flint-error-color)}.filled .input-wrapper{background-color:var(--flint-surface-2);border-bottom:2px solid var(--flint-input-border-color);border-top:none;border-left:none;border-right:none;border-radius:4px 4px 0 0}.filled .input-wrapper.focused{border-bottom-color:var(--flint-primary-color);background-color:var(--flint-hover-color)}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}", l = class extends t {
7
7
  constructor(...e) {
8
- super(...e), this.label = "", this.value = "", this.placeholder = "", this.type = "text", this.variant = "outlined", this.disabled = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this._focused = !1;
8
+ super(...e), this.label = "", this.value = "", this.placeholder = "", this.type = "text", this.variant = "outlined", this.disabled = !1, this.error = !1, this.helperText = "", this.errorMessage = "", this.defaultValue = "", this._focused = !1, this._firstUpdate = !0;
9
9
  }
10
10
  static {
11
11
  this.styles = r(c);
12
12
  }
13
+ willUpdate(e) {
14
+ super.willUpdate(e), this._firstUpdate && (this._firstUpdate = !1, this.defaultValue && !this.value && (this.value = this.defaultValue));
15
+ }
13
16
  _handleInput(e) {
14
17
  this.value = e.target.value, this.dispatchEvent(new CustomEvent("input", {
15
18
  detail: { value: this.value },
@@ -71,6 +74,9 @@ var c = ":host{font-family:var(--flint-font-family);margin-bottom:1rem;display:b
71
74
  `;
72
75
  }
73
76
  };
74
- e([a({ type: String })], l.prototype, "label", void 0), e([a({ type: String })], l.prototype, "value", void 0), e([a({ type: String })], l.prototype, "placeholder", void 0), e([a({ type: String })], l.prototype, "type", void 0), e([a({ type: String })], l.prototype, "variant", void 0), e([a({ type: Boolean })], l.prototype, "disabled", void 0), e([a({ type: Boolean })], l.prototype, "error", void 0), e([a({ type: String })], l.prototype, "helperText", void 0), e([a({ type: String })], l.prototype, "errorMessage", void 0), e([o()], l.prototype, "_focused", void 0), l = e([i("flint-text-field")], l);
77
+ e([a({ type: String })], l.prototype, "label", void 0), e([a({ type: String })], l.prototype, "value", void 0), e([a({ type: String })], l.prototype, "placeholder", void 0), e([a({ type: String })], l.prototype, "type", void 0), e([a({ type: String })], l.prototype, "variant", void 0), e([a({ type: Boolean })], l.prototype, "disabled", void 0), e([a({ type: Boolean })], l.prototype, "error", void 0), e([a({ type: String })], l.prototype, "helperText", void 0), e([a({ type: String })], l.prototype, "errorMessage", void 0), e([a({
78
+ type: String,
79
+ attribute: "default-value"
80
+ })], l.prototype, "defaultValue", void 0), e([o()], l.prototype, "_focused", void 0), l = e([i("flint-text-field")], l);
75
81
  //#endregion
76
82
  export { l as t };
@@ -10,7 +10,7 @@ var u = ":host{font-family:var(--flint-font-family);display:block}.textarea-wrap
10
10
  this.styles = a(u);
11
11
  }
12
12
  constructor() {
13
- super(), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.error = !1, this.errorMessage = "", this.helpText = "", this.label = "", this.size = "default", this.rows = 3, this.maxlength = void 0, this.minlength = void 0, this.name = "", this.autocomplete = "", this.resize = "vertical", this.defaultValue = "", this.ariaLabel = null, d++, this._textareaId = `flint-textarea-${d}`, this._descId = `flint-textarea-desc-${d}`;
13
+ super(), this.value = "", this.placeholder = "", this.disabled = !1, this.readonly = !1, this.required = !1, this.error = !1, this.errorMessage = "", this.helperText = "", this.label = "", this.size = "default", this.rows = 3, this.maxlength = void 0, this.minlength = void 0, this.name = "", this.autocomplete = "", this.resize = "vertical", this.defaultValue = "", this.ariaLabel = null, d++, this._textareaId = `flint-textarea-${d}`, this._descId = `flint-textarea-desc-${d}`;
14
14
  }
15
15
  get textareaElement() {
16
16
  return this.shadowRoot?.querySelector("textarea") ?? null;
@@ -40,7 +40,7 @@ var u = ":host{font-family:var(--flint-font-family);display:block}.textarea-wrap
40
40
  }));
41
41
  }
42
42
  render() {
43
- let e = this.error || !!this.errorMessage, t = e && !!this.errorMessage || !!this.helpText;
43
+ let e = this.error || !!this.errorMessage, t = e && !!this.errorMessage || !!this.helperText;
44
44
  return r`
45
45
  <div class="textarea-wrapper" part="wrapper">
46
46
  ${this.label ? r`
@@ -69,7 +69,7 @@ var u = ":host{font-family:var(--flint-font-family);display:block}.textarea-wrap
69
69
  @change=${this._handleChange}
70
70
  ></textarea>
71
71
 
72
- ${e && this.errorMessage ? r`<p id=${this._descId} class="help-text error-text" part="error-text" role="alert">${this.errorMessage}</p>` : this.helpText ? r`<p id=${this._descId} class="help-text" part="help-text">${this.helpText}</p>` : i}
72
+ ${e && this.errorMessage ? r`<p id=${this._descId} class="help-text error-text" part="error-text" role="alert">${this.errorMessage}</p>` : this.helperText ? r`<p id=${this._descId} class="help-text" part="help-text">${this.helperText}</p>` : i}
73
73
  </div>
74
74
  `;
75
75
  }
@@ -88,8 +88,8 @@ e([s({ type: String })], f.prototype, "value", void 0), e([s({ type: String })],
88
88
  attribute: "error-message"
89
89
  })], f.prototype, "errorMessage", void 0), e([s({
90
90
  type: String,
91
- attribute: "help-text"
92
- })], f.prototype, "helpText", void 0), e([s({ type: String })], f.prototype, "label", void 0), e([s({
91
+ attribute: "helper-text"
92
+ })], f.prototype, "helperText", void 0), e([s({ type: String })], f.prototype, "label", void 0), e([s({
93
93
  type: String,
94
94
  reflect: !0
95
95
  })], f.prototype, "size", void 0), e([s({ type: Number })], f.prototype, "rows", void 0), e([s({ type: Number })], f.prototype, "maxlength", void 0), e([s({ type: Number })], f.prototype, "minlength", void 0), e([s({ type: String })], f.prototype, "name", void 0), e([s({ type: String })], f.prototype, "autocomplete", void 0), e([s({