@code-coaching/vuetiful 0.23.0 → 0.23.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.
Files changed (144) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/types/components/VBootstrap.vue.d.ts +1 -1
  3. package/dist/types/components/atoms/VAvatar.vue.d.ts +1 -1
  4. package/dist/types/components/atoms/VLightSwitch.vue.d.ts +2 -2
  5. package/dist/types/components/atoms/index.d.ts +13 -13
  6. package/dist/types/components/index.d.ts +2 -2
  7. package/dist/types/components/molecules/VAlert.vue.d.ts +1 -1
  8. package/dist/types/components/molecules/VCodeBlock.vue.d.ts +2 -2
  9. package/dist/types/components/molecules/VDrawer.vue.d.ts +1 -1
  10. package/dist/types/components/molecules/VListbox/VListbox.vue.d.ts +1 -1
  11. package/dist/types/components/molecules/VRail/VRail.vue.d.ts +1 -1
  12. package/dist/types/components/molecules/VRail/VRailTile.vue.d.ts +1 -1
  13. package/dist/types/components/molecules/index.d.ts +21 -21
  14. package/dist/types/directives/clipboard.d.ts +1 -1
  15. package/dist/types/directives/index.d.ts +1 -1
  16. package/dist/types/index.d.ts +6 -6
  17. package/dist/types/props/props.d.ts +1 -1
  18. package/dist/types/services/dark-mode.service.d.ts +1 -1
  19. package/dist/types/services/drawer.service.d.ts +1 -1
  20. package/dist/types/services/index.d.ts +5 -5
  21. package/dist/types/types/index.d.ts +1 -1
  22. package/dist/types/utils/index.d.ts +2 -2
  23. package/dist/types/utils/theme/theme-switcher.vue.d.ts +23 -63
  24. package/dist/types/utils/theme/theme.service.d.ts +1 -1
  25. package/dist/vuetiful.es.mjs +82 -150
  26. package/dist/vuetiful.umd.js +7 -15
  27. package/package.json +1 -1
  28. package/src/assets/main.css +6 -6
  29. package/src/components/VBootstrap.vue +43 -43
  30. package/src/components/atoms/VAvatar.test.ts +71 -71
  31. package/src/components/atoms/VAvatar.vue +22 -23
  32. package/src/components/atoms/VBadge.test.ts +11 -11
  33. package/src/components/atoms/VBadge.vue +2 -2
  34. package/src/components/atoms/VButton.test.ts +82 -82
  35. package/src/components/atoms/VButton.vue +20 -21
  36. package/src/components/atoms/VChip.test.ts +11 -11
  37. package/src/components/atoms/VChip.vue +3 -3
  38. package/src/components/atoms/VLightSwitch.test.ts +6 -6
  39. package/src/components/atoms/VLightSwitch.vue +26 -31
  40. package/src/components/atoms/VRadio/VRadioDescription.test.ts +13 -13
  41. package/src/components/atoms/VRadio/VRadioDescription.vue +2 -2
  42. package/src/components/atoms/VRadio/VRadioGroup.test.ts +40 -40
  43. package/src/components/atoms/VRadio/VRadioGroup.vue +19 -22
  44. package/src/components/atoms/VRadio/VRadioItem.test.ts +67 -67
  45. package/src/components/atoms/VRadio/VRadioItem.vue +10 -13
  46. package/src/components/atoms/VRadio/VRadioLabel.test.ts +13 -13
  47. package/src/components/atoms/VRadio/VRadioLabel.vue +5 -3
  48. package/src/components/atoms/VSwitch/VSwitch.test.ts +33 -33
  49. package/src/components/atoms/VSwitch/VSwitch.vue +24 -27
  50. package/src/components/atoms/VSwitch/VSwitchDescription.test.ts +13 -13
  51. package/src/components/atoms/VSwitch/VSwitchDescription.vue +2 -2
  52. package/src/components/atoms/VSwitch/VSwitchGroup.test.ts +9 -9
  53. package/src/components/atoms/VSwitch/VSwitchGroup.vue +2 -2
  54. package/src/components/atoms/VSwitch/VSwitchLabel.test.ts +19 -19
  55. package/src/components/atoms/VSwitch/VSwitchLabel.vue +2 -2
  56. package/src/components/atoms/index.ts +13 -13
  57. package/src/components/index.test.ts +3 -3
  58. package/src/components/index.ts +2 -2
  59. package/src/components/molecules/VAccordion/VAccordion.test.ts +11 -17
  60. package/src/components/molecules/VAccordion/VAccordion.vue +3 -3
  61. package/src/components/molecules/VAccordion/VAccordionItem.test.ts +55 -55
  62. package/src/components/molecules/VAccordion/VAccordionItem.vue +9 -22
  63. package/src/components/molecules/VAlert.test.ts +38 -38
  64. package/src/components/molecules/VAlert.vue +25 -47
  65. package/src/components/molecules/VCard/VCard.test.ts +25 -25
  66. package/src/components/molecules/VCard/VCard.vue +13 -15
  67. package/src/components/molecules/VCard/VCardBody.test.ts +14 -14
  68. package/src/components/molecules/VCard/VCardBody.vue +4 -8
  69. package/src/components/molecules/VCard/VCardFooter.test.ts +22 -22
  70. package/src/components/molecules/VCard/VCardFooter.vue +10 -8
  71. package/src/components/molecules/VCard/VCardHeader.test.ts +25 -25
  72. package/src/components/molecules/VCard/VCardHeader.vue +7 -8
  73. package/src/components/molecules/VCodeBlock.test.ts +63 -63
  74. package/src/components/molecules/VCodeBlock.vue +27 -34
  75. package/src/components/molecules/VDrawer.test.ts +5 -5
  76. package/src/components/molecules/VDrawer.vue +10 -10
  77. package/src/components/molecules/VListbox/VListbox.test.ts +53 -53
  78. package/src/components/molecules/VListbox/VListbox.vue +31 -32
  79. package/src/components/molecules/VListbox/VListboxButton.test.ts +13 -13
  80. package/src/components/molecules/VListbox/VListboxButton.vue +5 -5
  81. package/src/components/molecules/VListbox/VListboxItem.test.ts +25 -25
  82. package/src/components/molecules/VListbox/VListboxItem.vue +7 -8
  83. package/src/components/molecules/VListbox/VListboxItems.test.ts +14 -14
  84. package/src/components/molecules/VListbox/VListboxItems.vue +9 -11
  85. package/src/components/molecules/VListbox/VListboxLabel.test.ts +10 -10
  86. package/src/components/molecules/VListbox/VListboxLabel.vue +2 -2
  87. package/src/components/molecules/VPreview.test.ts +26 -26
  88. package/src/components/molecules/VPreview.vue +22 -27
  89. package/src/components/molecules/VRail/VRail.test.ts +5 -5
  90. package/src/components/molecules/VRail/VRail.vue +7 -7
  91. package/src/components/molecules/VRail/VRailTile.test.ts +26 -28
  92. package/src/components/molecules/VRail/VRailTile.vue +13 -11
  93. package/src/components/molecules/VShell.test.ts +5 -5
  94. package/src/components/molecules/VShell.vue +11 -20
  95. package/src/components/molecules/VTabs/VTab.test.ts +48 -52
  96. package/src/components/molecules/VTabs/VTab.vue +13 -17
  97. package/src/components/molecules/VTabs/VTabPanel.test.ts +8 -8
  98. package/src/components/molecules/VTabs/VTabPanel.vue +1 -1
  99. package/src/components/molecules/VTabs/VTabs.test.ts +36 -36
  100. package/src/components/molecules/VTabs/VTabs.vue +18 -22
  101. package/src/components/molecules/index.ts +21 -21
  102. package/src/directives/clipboard.test.ts +9 -9
  103. package/src/directives/clipboard.ts +2 -2
  104. package/src/directives/index.ts +1 -1
  105. package/src/env.d.ts +2 -2
  106. package/src/index.test.ts +6 -6
  107. package/src/index.ts +7 -7
  108. package/src/props/index.ts +1 -1
  109. package/src/props/props.ts +44 -44
  110. package/src/services/dark-mode.service.test.ts +115 -93
  111. package/src/services/dark-mode.service.ts +9 -9
  112. package/src/services/drawer.service.test.ts +21 -21
  113. package/src/services/drawer.service.ts +10 -10
  114. package/src/services/highlight.service.test.ts +12 -12
  115. package/src/services/highlight.service.ts +1 -1
  116. package/src/services/index.ts +5 -5
  117. package/src/services/rail.service.test.ts +7 -7
  118. package/src/services/rail.service.ts +2 -2
  119. package/src/services/settings.service.test.ts +5 -5
  120. package/src/services/settings.service.ts +1 -1
  121. package/src/styles/all.css +7 -7
  122. package/src/styles/elements/buttons.css +1 -1
  123. package/src/styles/elements/forms.css +7 -7
  124. package/src/styles/elements.css +13 -13
  125. package/src/styles/transitions.css +2 -2
  126. package/src/styles/typography.css +5 -5
  127. package/src/themes/theme-rocket.css +10 -10
  128. package/src/themes/theme-sahara.css +13 -13
  129. package/src/themes/theme-seafoam.css +13 -13
  130. package/src/themes/theme-seasonal.css +4 -4
  131. package/src/themes/theme-skeleton.css +7 -7
  132. package/src/themes/theme-vintage.css +12 -12
  133. package/src/themes/theme-vuetiful-0.0.1.css +13 -13
  134. package/src/types/index.ts +46 -46
  135. package/src/types/tailwind.ts +2 -21
  136. package/src/utils/index.test.ts +3 -3
  137. package/src/utils/index.ts +2 -2
  138. package/src/utils/platform/platform.service.test.ts +6 -6
  139. package/src/utils/platform/platform.service.ts +1 -1
  140. package/src/utils/theme/callback.test.ts +6 -6
  141. package/src/utils/theme/remove.test.ts +8 -8
  142. package/src/utils/theme/theme-switcher.vue +58 -131
  143. package/src/utils/theme/theme.service.test.ts +69 -61
  144. package/src/utils/theme/theme.service.ts +19 -20
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, toDisplayString, readonly, reactive, renderSlot, createBlock, resolveDynamicComponent, withCtx, onMounted, Fragment, cloneVNode, h as h$1, inject, provide, watchEffect, onUnmounted, watch, nextTick, toRaw, createCommentVNode, toRefs, createVNode, Transition, renderList, createTextVNode, pushScopeId, popScopeId, isRef, withDirectives, vShow, useAttrs, resolveComponent } from "vue";
1
+ import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, toDisplayString, readonly, reactive, renderSlot, createBlock, resolveDynamicComponent, withCtx, onMounted, Fragment, cloneVNode, h as h$1, inject, provide, watchEffect, onUnmounted, watch, nextTick, toRaw, createCommentVNode, toRefs, createVNode, Transition, renderList, createTextVNode, pushScopeId, popScopeId, isRef, withDirectives, vShow, useAttrs } from "vue";
2
2
  const Variant = {
3
3
  Filled: "filled",
4
4
  FilledPrimary: "filled-primary",
@@ -46847,15 +46847,9 @@ const _sfc_main$u = defineComponent({
46847
46847
  event.currentTarget.click();
46848
46848
  }
46849
46849
  };
46850
- const trackBg = computed(
46851
- () => currentMode2.value === MODE2.LIGHT ? props.bgLight : props.bgDark
46852
- );
46853
- const thumbBg = computed(
46854
- () => currentMode2.value === MODE2.LIGHT ? props.bgDark : props.bgLight
46855
- );
46856
- const thumbPosition = computed(
46857
- () => currentMode2.value === MODE2.LIGHT ? "translate-x-[100%]" : ""
46858
- );
46850
+ const trackBg = computed(() => currentMode2.value === MODE2.LIGHT ? props.bgLight : props.bgDark);
46851
+ const thumbBg = computed(() => currentMode2.value === MODE2.LIGHT ? props.bgDark : props.bgLight);
46852
+ const thumbPosition = computed(() => currentMode2.value === MODE2.LIGHT ? "translate-x-[100%]" : "");
46859
46853
  const iconFill = computed(() => {
46860
46854
  return currentMode2.value === MODE2.LIGHT ? props.textLight : props.textDark;
46861
46855
  });
@@ -46881,7 +46875,7 @@ const _sfc_main$u = defineComponent({
46881
46875
  });
46882
46876
  const _hoisted_1$a = ["aria-checked", "title"];
46883
46877
  const _hoisted_2$6 = ["d"];
46884
- function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
46878
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
46885
46879
  return openBlock(), createElementBlock("div", {
46886
46880
  class: normalizeClass(`lightswitch-track ${_ctx.classesTrack}`),
46887
46881
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onToggleHandler && _ctx.onToggleHandler(...args)),
@@ -46910,7 +46904,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
46910
46904
  ], 2)
46911
46905
  ], 42, _hoisted_1$a);
46912
46906
  }
46913
- var VLightSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$1]]);
46907
+ var VLightSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render]]);
46914
46908
  function u$2(r2, n2, ...a2) {
46915
46909
  if (r2 in n2) {
46916
46910
  let e2 = n2[r2];
@@ -48436,7 +48430,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
48436
48430
  }
48437
48431
  });
48438
48432
  var VPreview_vue_vue_type_style_index_0_scoped_true_lang = "";
48439
- const _withScopeId$3 = (n2) => (pushScopeId("data-v-73195296"), n2 = n2(), popScopeId(), n2);
48433
+ const _withScopeId$3 = (n2) => (pushScopeId("data-v-ef253f90"), n2 = n2(), popScopeId(), n2);
48440
48434
  const _hoisted_1$7 = { class: "vuetiful-previewer overflow-hidden shadow-2xl shadow-surface-500/10 rounded-container-token dark:shadow-black/10" };
48441
48435
  const _hoisted_2$5 = { class: "flex items-center gap-2" };
48442
48436
  const _hoisted_3$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
@@ -48446,21 +48440,21 @@ const _hoisted_3$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ create
48446
48440
  }, [
48447
48441
  /* @__PURE__ */ createElementVNode("path", { d: "M288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM144 256a144 144 0 1 1 288 0 144 144 0 1 1 -288 0zm144-64c0 35.3-28.7 64-64 64c-7.1 0-13.9-1.2-20.3-3.3c-5.5-1.8-11.9 1.6-11.7 7.4c.3 6.9 1.3 13.8 3.2 20.7c13.7 51.2 66.4 81.6 117.6 67.9s81.6-66.4 67.9-117.6c-11.1-41.5-47.8-69.4-88.6-71.1c-5.8-.2-9.2 6.1-7.4 11.7c2.1 6.4 3.3 13.2 3.3 20.3z" })
48448
48442
  ], -1));
48449
- const _hoisted_4$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48443
+ const _hoisted_4$1 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48450
48444
  class: "icon",
48451
48445
  xmlns: "http://www.w3.org/2000/svg",
48452
48446
  viewBox: "0 0 640 512"
48453
48447
  }, [
48454
48448
  /* @__PURE__ */ createElementVNode("path", { d: "M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z" })
48455
48449
  ], -1));
48456
- const _hoisted_5$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48450
+ const _hoisted_5$1 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48457
48451
  class: "icon",
48458
48452
  xmlns: "http://www.w3.org/2000/svg",
48459
48453
  viewBox: "0 0 384 512"
48460
48454
  }, [
48461
48455
  /* @__PURE__ */ createElementVNode("path", { d: "M16 64C16 28.7 44.7 0 80 0H304c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H80c-35.3 0-64-28.7-64-64V64zM144 448c0 8.8 7.2 16 16 16h64c8.8 0 16-7.2 16-16s-7.2-16-16-16H160c-8.8 0-16 7.2-16 16zM304 64H80V384H304V64z" })
48462
48456
  ], -1));
48463
- const _hoisted_6$2 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48457
+ const _hoisted_6$1 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("svg", {
48464
48458
  class: "icon",
48465
48459
  xmlns: "http://www.w3.org/2000/svg",
48466
48460
  viewBox: "0 0 576 512"
@@ -48573,7 +48567,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
48573
48567
  }, {
48574
48568
  default: withCtx(() => [
48575
48569
  renderSlot(_ctx.$slots, "code-item", {}, () => [
48576
- _hoisted_4$2
48570
+ _hoisted_4$1
48577
48571
  ], true)
48578
48572
  ]),
48579
48573
  _: 3
@@ -48594,7 +48588,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
48594
48588
  }, {
48595
48589
  default: withCtx(() => [
48596
48590
  renderSlot(_ctx.$slots, "mobile-item", {}, () => [
48597
- _hoisted_5$2
48591
+ _hoisted_5$1
48598
48592
  ], true)
48599
48593
  ]),
48600
48594
  _: 3
@@ -48602,7 +48596,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
48602
48596
  createVNode(unref(_sfc_main$r), { value: "full" }, {
48603
48597
  default: withCtx(() => [
48604
48598
  renderSlot(_ctx.$slots, "desktop-item", {}, () => [
48605
- _hoisted_6$2
48599
+ _hoisted_6$1
48606
48600
  ], true)
48607
48601
  ]),
48608
48602
  _: 3
@@ -48694,7 +48688,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
48694
48688
  };
48695
48689
  }
48696
48690
  });
48697
- var VPreview = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-73195296"]]);
48691
+ var VPreview = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-ef253f90"]]);
48698
48692
  const _sfc_main$j = /* @__PURE__ */ defineComponent({
48699
48693
  __name: "VRail",
48700
48694
  props: {
@@ -48847,7 +48841,7 @@ const _sfc_main$h = defineComponent({
48847
48841
  }
48848
48842
  });
48849
48843
  var VListboxButton_vue_vue_type_style_index_0_scoped_true_lang = "";
48850
- const _withScopeId$2 = (n2) => (pushScopeId("data-v-5635c35e"), n2 = n2(), popScopeId(), n2);
48844
+ const _withScopeId$2 = (n2) => (pushScopeId("data-v-31089628"), n2 = n2(), popScopeId(), n2);
48851
48845
  const _hoisted_1$5 = { key: 0 };
48852
48846
  const _hoisted_2$3 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("svg", {
48853
48847
  class: "icon",
@@ -48900,7 +48894,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
48900
48894
  };
48901
48895
  }
48902
48896
  });
48903
- var VListboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-5635c35e"]]);
48897
+ var VListboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-31089628"]]);
48904
48898
  const _sfc_main$f = /* @__PURE__ */ defineComponent({
48905
48899
  __name: "VListboxItems",
48906
48900
  props: {
@@ -49342,7 +49336,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
49342
49336
  }
49343
49337
  });
49344
49338
  var VAccordionItem_vue_vue_type_style_index_0_scoped_true_lang = "";
49345
- const _withScopeId$1 = (n2) => (pushScopeId("data-v-6c055e30"), n2 = n2(), popScopeId(), n2);
49339
+ const _withScopeId$1 = (n2) => (pushScopeId("data-v-513d21fc"), n2 = n2(), popScopeId(), n2);
49346
49340
  const _hoisted_1$4 = { class: "vuetiful-accordion-title" };
49347
49341
  const _hoisted_2$2 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("svg", {
49348
49342
  class: "vuetiful-accordion-item-icon-plus icon",
@@ -49412,9 +49406,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
49412
49406
  };
49413
49407
  }
49414
49408
  });
49415
- var VAccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-6c055e30"]]);
49409
+ var VAccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-513d21fc"]]);
49416
49410
  var VAlert_vue_vue_type_style_index_0_scoped_true_lang = "";
49417
- const _withScopeId = (n2) => (pushScopeId("data-v-5df26a83"), n2 = n2(), popScopeId(), n2);
49411
+ const _withScopeId = (n2) => (pushScopeId("data-v-5d6982bd"), n2 = n2(), popScopeId(), n2);
49418
49412
  const _hoisted_1$3 = {
49419
49413
  key: 0,
49420
49414
  class: "icon",
@@ -49425,15 +49419,15 @@ const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createEl
49425
49419
  const _hoisted_3$1 = [
49426
49420
  _hoisted_2$1
49427
49421
  ];
49428
- const _hoisted_4$1 = {
49422
+ const _hoisted_4 = {
49429
49423
  key: 1,
49430
49424
  class: "icon",
49431
49425
  xmlns: "http://www.w3.org/2000/svg",
49432
49426
  viewBox: "0 0 512 512"
49433
49427
  };
49434
- const _hoisted_5$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" }, null, -1));
49435
- const _hoisted_6$1 = [
49436
- _hoisted_5$1
49428
+ const _hoisted_5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("path", { d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z" }, null, -1));
49429
+ const _hoisted_6 = [
49430
+ _hoisted_5
49437
49431
  ];
49438
49432
  const _hoisted_7 = {
49439
49433
  key: 2,
@@ -49532,7 +49526,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
49532
49526
  _ctx.$slots.pre ? renderSlot(_ctx.$slots, "pre", { key: 0 }, void 0, true) : createCommentVNode("", true),
49533
49527
  !_ctx.$slots.pre ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
49534
49528
  __props.type === "info" ? (openBlock(), createElementBlock("svg", _hoisted_1$3, _hoisted_3$1)) : createCommentVNode("", true),
49535
- __props.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_4$1, _hoisted_6$1)) : createCommentVNode("", true),
49529
+ __props.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_4, _hoisted_6)) : createCommentVNode("", true),
49536
49530
  __props.type === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_7, _hoisted_9)) : createCommentVNode("", true),
49537
49531
  __props.type === "error" ? (openBlock(), createElementBlock("svg", _hoisted_10, _hoisted_12)) : createCommentVNode("", true)
49538
49532
  ], 64)) : createCommentVNode("", true)
@@ -49557,7 +49551,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
49557
49551
  };
49558
49552
  }
49559
49553
  });
49560
- var VAlert = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5df26a83"]]);
49554
+ var VAlert = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-5d6982bd"]]);
49561
49555
  var VCard_vue_vue_type_style_index_0_lang = "";
49562
49556
  const _hoisted_1$2 = ["tabindex"];
49563
49557
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
@@ -49795,7 +49789,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
49795
49789
  }, toDisplayString(languageFormatter(__props.language)), 3),
49796
49790
  withDirectives((openBlock(), createBlock(unref(_sfc_main$w), {
49797
49791
  size: "sm",
49798
- class: normalizeClass(`vuetiful-code-block-button ${__props.classButton ? __props.classButton : "bg-[#171717] dark:bg-[#171717] text-[#a4a4a4] dark:text-[#a4a4a4]"}`),
49792
+ class: normalizeClass(`vuetiful-code-block-button ${__props.classButton ? __props.classButton : "bg-[#171717] text-[#a4a4a4] dark:bg-[#171717] dark:text-[#a4a4a4]"}`),
49799
49793
  onClick: _cache[0] || (_cache[0] = ($event) => onCopyClick())
49800
49794
  }, {
49801
49795
  default: withCtx(() => [
@@ -49858,149 +49852,87 @@ var components = /* @__PURE__ */ Object.freeze({
49858
49852
  });
49859
49853
  var main = "";
49860
49854
  var tailwind = "";
49861
- const _sfc_main = defineComponent({
49862
- components: {
49863
- VLightSwitch,
49864
- VButton: _sfc_main$w
49865
- },
49855
+ const _hoisted_1 = { class: "vuetiful-theme-switcher" };
49856
+ const _hoisted_2 = { class: "flex items-center justify-between" };
49857
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "text-lg" }, "Mode", -1);
49858
+ const _sfc_main = /* @__PURE__ */ defineComponent({
49859
+ __name: "theme-switcher",
49866
49860
  props: {
49867
- bgLight: {
49868
- type: String,
49869
- default: "bg-surface-50"
49870
- },
49871
- bgDark: {
49861
+ background: {
49872
49862
  type: String,
49873
- default: "bg-surface-900"
49863
+ default: "bg-surface-50-900-token"
49874
49864
  },
49875
- textOnLight: {
49876
- type: String,
49877
- default: "text-surface-900"
49878
- },
49879
- textOnDark: {
49865
+ text: {
49880
49866
  type: String,
49881
- default: "text-surface-50"
49867
+ default: "text-surface-900-50-token"
49882
49868
  },
49883
- width: {
49869
+ widthPopup: {
49884
49870
  type: String,
49885
49871
  default: "w-60"
49886
49872
  },
49887
- height: {
49873
+ heightList: {
49888
49874
  type: String,
49889
49875
  default: "max-h-64 lg:max-h-[500px]"
49890
49876
  },
49891
- ring: {
49892
- type: String,
49893
- default: "ring-[1px] ring-surface-500/30"
49894
- },
49895
- rounded: {
49877
+ classButton: {
49896
49878
  type: String,
49897
- default: "rounded-token"
49879
+ default: ""
49898
49880
  },
49899
- roundedContainer: {
49881
+ classList: {
49900
49882
  type: String,
49901
- default: "rounded-container-token"
49883
+ default: ""
49902
49884
  },
49903
- buttonClasses: {
49885
+ classListItem: {
49904
49886
  type: String,
49905
- default: "w-24"
49887
+ default: ""
49906
49888
  }
49907
49889
  },
49908
- setup(props) {
49890
+ setup(__props) {
49909
49891
  const { initializeTheme, loadTheme, themes: themes2, chosenTheme: chosenTheme2 } = useTheme();
49910
- const { currentMode: currentMode2, MODE: MODE2 } = useDarkMode();
49911
49892
  const showPopup = ref(false);
49912
49893
  onMounted(() => {
49913
49894
  initializeTheme();
49914
49895
  });
49915
- const cTransition = `transition-all duration-[200ms]`;
49916
- function onKeyDown(event) {
49917
- if (["Enter", "Space"].includes(event.code)) {
49918
- event.preventDefault();
49919
- event.currentTarget.click();
49920
- }
49921
- }
49922
- const background = computed(() => {
49923
- return currentMode2.value === MODE2.LIGHT ? props.bgLight : props.bgDark;
49924
- });
49925
- const text = computed(() => {
49926
- return currentMode2.value === MODE2.LIGHT ? props.textOnLight : props.textOnDark;
49927
- });
49928
- const classes = computed(() => {
49929
- return `${cTransition}
49930
- ${background.value}
49931
- ${text.value}
49932
- ${props.width}
49933
- ${props.ring}
49934
- ${props.roundedContainer}`;
49935
- });
49936
- const listClasses = computed(() => {
49937
- return `${cTransition}
49938
- ${props.height}`;
49939
- });
49940
- const listItemClasses = computed(() => {
49941
- return `${cTransition}
49942
- ${props.ring}
49943
- ${props.rounded}`;
49944
- });
49945
- return {
49946
- onKeyDown,
49947
- loadTheme,
49948
- currentMode: currentMode2,
49949
- classes,
49950
- chosenTheme: chosenTheme2,
49951
- themes: themes2,
49952
- showPopup,
49953
- listClasses,
49954
- listItemClasses
49955
- };
49956
- }
49957
- });
49958
- const _hoisted_1 = { class: "cc-theme-switcher" };
49959
- const _hoisted_2 = { class: "space-y-4" };
49960
- const _hoisted_3 = { class: "flex items-center justify-between" };
49961
- const _hoisted_4 = /* @__PURE__ */ createElementVNode("h6", null, "Mode", -1);
49962
- const _hoisted_5 = { class: "flex flex-col gap-4" };
49963
- const _hoisted_6 = ["onClick"];
49964
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
49965
- const _component_VButton = resolveComponent("VButton");
49966
- const _component_v_light_switch = resolveComponent("v-light-switch");
49967
- return openBlock(), createElementBlock("div", _hoisted_1, [
49968
- createVNode(_component_VButton, {
49969
- class: normalizeClass(`cc-theme-switcher__button ${_ctx.buttonClasses}`),
49970
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.showPopup = !_ctx.showPopup)
49971
- }, {
49972
- default: withCtx(() => [
49973
- createTextVNode(" Theme ")
49974
- ]),
49975
- _: 1
49976
- }, 8, ["class"]),
49977
- _ctx.showPopup ? (openBlock(), createElementBlock("div", {
49978
- key: 0,
49979
- class: normalizeClass(["cc-theme-switcher__popup absolute z-10 mt-1 p-4 shadow-xl", _ctx.classes])
49980
- }, [
49981
- createElementVNode("div", _hoisted_2, [
49982
- createElementVNode("section", _hoisted_3, [
49983
- _hoisted_4,
49984
- createVNode(_component_v_light_switch)
49985
- ]),
49986
- createElementVNode("nav", {
49987
- class: normalizeClass(["list-nav -m-4 overflow-y-auto p-4", _ctx.listClasses])
49896
+ return (_ctx, _cache) => {
49897
+ return openBlock(), createElementBlock("div", _hoisted_1, [
49898
+ createVNode(unref(_sfc_main$w), {
49899
+ class: normalizeClass(`vuetiful-theme-switcher__button ${__props.classButton}`),
49900
+ onClick: _cache[0] || (_cache[0] = ($event) => showPopup.value = !showPopup.value)
49901
+ }, {
49902
+ default: withCtx(() => [
49903
+ createTextVNode(" Theme ")
49904
+ ]),
49905
+ _: 1
49906
+ }, 8, ["class"]),
49907
+ showPopup.value ? (openBlock(), createElementBlock("div", {
49908
+ key: 0,
49909
+ class: normalizeClass(["vuetiful-theme-switcher__popup absolute z-10 mt-1 space-y-4 p-4 shadow-xl rounded-container-token", `${__props.background} ${__props.text} ${__props.widthPopup} ${__props.classList}`])
49988
49910
  }, [
49989
- createElementVNode("ul", _hoisted_5, [
49990
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.themes, (theme, index2) => {
49991
- return openBlock(), createElementBlock("li", {
49992
- class: normalizeClass(["h-full w-full p-2 text-center capitalize hover:cursor-pointer hover:bg-primary-100 hover:text-primary-900", `${_ctx.listItemClasses} ${_ctx.chosenTheme === theme.name ? "bg-primary-50 text-primary-900" : "bg-surface-200 text-surface-900"}`]),
49911
+ createElementVNode("section", _hoisted_2, [
49912
+ _hoisted_3,
49913
+ createVNode(unref(VLightSwitch))
49914
+ ]),
49915
+ createElementVNode("nav", {
49916
+ class: normalizeClass(["vuetiful-theme-switcher__popup-list -m-4 flex flex-col gap-4 overflow-y-auto p-4", `${__props.heightList} ${__props.classList}`])
49917
+ }, [
49918
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(themes2), (theme, index2) => {
49919
+ return openBlock(), createBlock(unref(_sfc_main$w), {
49920
+ class: normalizeClass(["vuetiful-theme-switcher__popup-list-item h-full w-full p-2 text-center capitalize hover:cursor-pointer", `${__props.classListItem} ${unref(chosenTheme2) === theme.name ? "variant-filled-surface" : ""}`]),
49993
49921
  key: index2,
49994
- onClick: ($event) => _ctx.loadTheme(theme.name)
49995
- }, toDisplayString(theme.name), 11, _hoisted_6);
49922
+ onClick: ($event) => unref(loadTheme)(theme.name)
49923
+ }, {
49924
+ default: withCtx(() => [
49925
+ createTextVNode(toDisplayString(theme.name), 1)
49926
+ ]),
49927
+ _: 2
49928
+ }, 1032, ["class", "onClick"]);
49996
49929
  }), 128))
49997
- ])
49998
- ], 2)
49999
- ])
50000
- ], 2)) : createCommentVNode("", true)
50001
- ]);
50002
- }
50003
- var themeSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
49930
+ ], 2)
49931
+ ], 2)) : createCommentVNode("", true)
49932
+ ]);
49933
+ };
49934
+ }
49935
+ });
50004
49936
  const { isBrowser } = usePlatform();
50005
49937
  const THEMES = {
50006
49938
  VUETIFUL: "vuetiful",
@@ -50101,4 +50033,4 @@ function install(app) {
50101
50033
  }
50102
50034
  }
50103
50035
  var index = { install };
50104
- export { themeSwitcher as ThemeSwitcher, _sfc_main$8 as VAccordion, VAccordionItem, VAlert, _sfc_main$y as VAvatar, _sfc_main$x as VBadge, _sfc_main$w as VButton, _sfc_main$5 as VCard, _sfc_main$4 as VCardBody, _sfc_main$3 as VCardFooter, _sfc_main$2 as VCardHeader, _sfc_main$v as VChip, _sfc_main$1 as VCodeBlock, _sfc_main$l as VDrawer, VLightSwitch, _sfc_main$d as VListbox, VListboxButton, _sfc_main$c as VListboxItem, _sfc_main$f as VListboxItems, _sfc_main$e as VListboxLabel, VPreview, _sfc_main$t as VRadioDescription, _sfc_main$s as VRadioGroup, _sfc_main$r as VRadioItem, _sfc_main$q as VRadioLabel, _sfc_main$j as VRail, _sfc_main$i as VRailTile, _sfc_main$h as VShell, _sfc_main$p as VSwitch, _sfc_main$o as VSwitchDescription, _sfc_main$n as VSwitchGroup, _sfc_main$m as VSwitchLabel, _sfc_main$b as VTab, _sfc_main$a as VTabPanel, _sfc_main$9 as VTabs, index as default, useDarkMode, useDrawer, useHighlight, useRail, useSettings, useTheme, clipboard as vClipboard };
50036
+ export { _sfc_main as ThemeSwitcher, _sfc_main$8 as VAccordion, VAccordionItem, VAlert, _sfc_main$y as VAvatar, _sfc_main$x as VBadge, _sfc_main$w as VButton, _sfc_main$5 as VCard, _sfc_main$4 as VCardBody, _sfc_main$3 as VCardFooter, _sfc_main$2 as VCardHeader, _sfc_main$v as VChip, _sfc_main$1 as VCodeBlock, _sfc_main$l as VDrawer, VLightSwitch, _sfc_main$d as VListbox, VListboxButton, _sfc_main$c as VListboxItem, _sfc_main$f as VListboxItems, _sfc_main$e as VListboxLabel, VPreview, _sfc_main$t as VRadioDescription, _sfc_main$s as VRadioGroup, _sfc_main$r as VRadioItem, _sfc_main$q as VRadioLabel, _sfc_main$j as VRail, _sfc_main$i as VRailTile, _sfc_main$h as VShell, _sfc_main$p as VSwitch, _sfc_main$o as VSwitchDescription, _sfc_main$n as VSwitchGroup, _sfc_main$m as VSwitchLabel, _sfc_main$b as VTab, _sfc_main$a as VTabPanel, _sfc_main$9 as VTabs, index as default, useDarkMode, useDrawer, useHighlight, useRail, useSettings, useTheme, clipboard as vClipboard };