vira 31.22.1 → 31.22.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.
@@ -5,7 +5,7 @@ import { css, defineElementEvent, html, ifDefined, listen } from 'element-vir';
5
5
  import { viraDisabledStyles } from '../styles/disabled.js';
6
6
  import { viraFormCssVars } from '../styles/form-styles.js';
7
7
  import { defineViraElement } from '../util/define-vira-element.js';
8
- import { formatAbsoluteTime } from './vira-absolute-time.element.js';
8
+ import { ViraAbsoluteTime } from './vira-absolute-time.element.js';
9
9
  /**
10
10
  * A native date picker input that emits `FullDate` values. Fires `valueChange` whenever the user
11
11
  * selects (or clears) a date.
@@ -74,14 +74,16 @@ export const ViraDateInput = defineViraElement()({
74
74
  `,
75
75
  render({ inputs, state, dispatch, events }) {
76
76
  if (inputs.isReadonly) {
77
- const readonlyValue = inputs.value
78
- ? formatAbsoluteTime(inputs.value, {
77
+ const readonlyTemplate = inputs.value
78
+ ? html `
79
+ <${ViraAbsoluteTime.assign({
80
+ time: inputs.value,
79
81
  dateOnly: true,
80
- })
81
- : '';
82
- const readonlyTemplate = html `
83
- <span class="readonly-value">${readonlyValue}</span>
84
- `;
82
+ })}></${ViraAbsoluteTime}>
83
+ `
84
+ : html `
85
+ <span class="readonly-value">&nbsp;</span>
86
+ `;
85
87
  if (inputs.label) {
86
88
  return html `
87
89
  <label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vira",
3
- "version": "31.22.1",
3
+ "version": "31.22.2",
4
4
  "description": "A simple and highly versatile design system using element-vir.",
5
5
  "keywords": [
6
6
  "design",