@simsustech/quasar-components 0.5.1 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @simsustech/quasar-components
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 7799b8f: fix(DateInput): fix style
8
+
3
9
  ## 0.5.1
4
10
 
5
11
  ### Patch Changes
package/dist/form.js CHANGED
@@ -327,7 +327,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
327
327
  };
328
328
  }
329
329
  });
330
- const _hoisted_1 = { class: "row items-center justify-end" };
330
+ const _hoisted_1 = {
331
+ key: 0,
332
+ style: { "padding": "0px", "margin": "0px", "font-size": "18px" }
333
+ };
334
+ const _hoisted_2 = { class: "row items-center justify-end" };
331
335
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
332
336
  __name: "DateInput",
333
337
  props: {
@@ -427,8 +431,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
427
431
  YYYY: {
428
432
  modelValue: year.value,
429
433
  placeholder: lang2.value.datePicker.YYYY,
430
- style: "max-width: 6ch",
431
- suffix: format.value === "YYYY-MM-DD" ? "-" : void 0,
434
+ style: "max-width: 6.5ch",
435
+ // suffix: format.value === 'YYYY-MM-DD' ? '-' : undefined,
432
436
  class: format.value !== "YYYY-MM-DD" ? "q-mb-none q-ml-xs" : void 0,
433
437
  "onUpdate:modelValue": setYear,
434
438
  onKeydown: goToNextElement
@@ -436,8 +440,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
436
440
  MM: {
437
441
  modelValue: month.value ? String(month.value).padStart(2, "0") : "",
438
442
  placeholder: lang2.value.datePicker.MM,
439
- style: "max-width: 4ch",
440
- suffix: "-",
443
+ style: "max-width: 4.5ch",
444
+ // suffix: '-',
441
445
  class: "q-ml-xs",
442
446
  "onUpdate:modelValue": setMonth,
443
447
  onKeydown: goToNextElement
@@ -445,8 +449,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
445
449
  DD: {
446
450
  modelValue: day.value ? String(day.value).padStart(2, "0") : "",
447
451
  placeholder: lang2.value.datePicker.DD,
448
- style: "max-width: 4ch",
449
- suffix: format.value === "DD-MM-YYYY" ? "-" : void 0,
452
+ style: "max-width: 4.5ch",
453
+ // suffix: format.value === 'DD-MM-YYYY' ? '-' : undefined,
450
454
  class: format.value === "YYYY-MM-DD" ? "q-ml-xs" : void 0,
451
455
  "onUpdate:modelValue": setDay,
452
456
  onKeydown: goToNextElement
@@ -478,11 +482,16 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
478
482
  "stack-label": ""
479
483
  }, {
480
484
  control: withCtx(() => [
481
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(format).split("-"), (part) => {
485
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(format).split("-"), (part, index) => {
482
486
  return openBlock(), createBlock(resolveDynamicComponent(unref(QInput)), mergeProps({
483
487
  key: part,
484
488
  borderless: ""
485
- }, dateProps.value[part]), null, 16);
489
+ }, dateProps.value[part]), {
490
+ after: withCtx(() => [
491
+ index < 2 ? (openBlock(), createElementBlock("a", _hoisted_1, "-")) : createCommentVNode("", true)
492
+ ]),
493
+ _: 2
494
+ }, 1040);
486
495
  }), 128))
487
496
  ]),
488
497
  append: withCtx(() => [
@@ -516,7 +525,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
516
525
  "onUpdate:modelValue": setDate
517
526
  }), {
518
527
  default: withCtx(() => [
519
- createElementVNode("div", _hoisted_1, [
528
+ createElementVNode("div", _hoisted_2, [
520
529
  withDirectives(createVNode(_component_q_btn, {
521
530
  label: unref(lang2).buttons.close,
522
531
  color: "primary",
package/dist/style.css CHANGED
@@ -15,3 +15,11 @@
15
15
  .q-field--auto-height.q-field--labeled .q-field__control-container {
16
16
  padding-top: 13px;
17
17
  }
18
+ .q-field--auto-height.q-field--labeled .q-field__native {
19
+ padding-bottom: 0px;
20
+ }
21
+ .q-field__after {
22
+ height: 1em;
23
+ margin-top: 0.5em;
24
+ margin-left: -8px;
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simsustech/quasar-components",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "author": "Stefan van Herwijnen",
5
5
  "description": "High level components for Quasar Framework",
6
6
  "license": "MIT",
@@ -9,11 +9,17 @@
9
9
  <template #control>
10
10
  <component
11
11
  :is="QInput"
12
- v-for="part in format.split('-')"
12
+ v-for="(part, index) in format.split('-')"
13
13
  :key="part"
14
14
  borderless
15
15
  v-bind="dateProps[part]"
16
- />
16
+ >
17
+ <template #after>
18
+ <a v-if="index < 2" style="padding: 0px; margin: 0px; font-size: 18px"
19
+ >-</a
20
+ >
21
+ </template></component
22
+ >
17
23
  </template>
18
24
 
19
25
  <template #append>
@@ -179,8 +185,8 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
179
185
  YYYY: {
180
186
  modelValue: year.value,
181
187
  placeholder: lang.value.datePicker.YYYY,
182
- style: 'max-width: 6ch',
183
- suffix: format.value === 'YYYY-MM-DD' ? '-' : undefined,
188
+ style: 'max-width: 6.5ch',
189
+ // suffix: format.value === 'YYYY-MM-DD' ? '-' : undefined,
184
190
  class: format.value !== 'YYYY-MM-DD' ? 'q-mb-none q-ml-xs' : undefined,
185
191
  'onUpdate:modelValue': setYear,
186
192
  onKeydown: goToNextElement
@@ -188,8 +194,8 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
188
194
  MM: {
189
195
  modelValue: month.value ? String(month.value).padStart(2, '0') : '',
190
196
  placeholder: lang.value.datePicker.MM,
191
- style: 'max-width: 4ch',
192
- suffix: '-',
197
+ style: 'max-width: 4.5ch',
198
+ // suffix: '-',
193
199
  class: 'q-ml-xs',
194
200
  'onUpdate:modelValue': setMonth,
195
201
  onKeydown: goToNextElement
@@ -197,8 +203,8 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
197
203
  DD: {
198
204
  modelValue: day.value ? String(day.value).padStart(2, '0') : '',
199
205
  placeholder: lang.value.datePicker.DD,
200
- style: 'max-width: 4ch',
201
- suffix: format.value === 'DD-MM-YYYY' ? '-' : undefined,
206
+ style: 'max-width: 4.5ch',
207
+ // suffix: format.value === 'DD-MM-YYYY' ? '-' : undefined,
202
208
  class: format.value === 'YYYY-MM-DD' ? 'q-ml-xs' : undefined,
203
209
  'onUpdate:modelValue': setDay,
204
210
  onKeydown: goToNextElement
@@ -234,4 +240,12 @@ if (props.required)
234
240
  .q-field--auto-height.q-field--labeled .q-field__control-container {
235
241
  padding-top: 13px;
236
242
  }
243
+ .q-field--auto-height.q-field--labeled .q-field__native {
244
+ padding-bottom: 0px;
245
+ }
246
+ .q-field__after {
247
+ height: 1em;
248
+ margin-top: 0.5em;
249
+ margin-left: -8px;
250
+ }
237
251
  </style>