@witchcraft/ui 0.1.2 → 0.2.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 (90) hide show
  1. package/README.md +3 -6
  2. package/dist/module.json +2 -2
  3. package/dist/module.mjs +15 -12
  4. package/dist/runtime/assets/utils.css +1 -1
  5. package/dist/runtime/build/generateTheme.js +1 -1
  6. package/dist/runtime/components/LibButton/LibButton.vue +10 -17
  7. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +8 -13
  8. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +5 -4
  9. package/dist/runtime/components/LibColorPicker/utils/safeConvertToHsva.js +1 -1
  10. package/dist/runtime/components/LibColorPicker/utils/safeConvertToRgba.js +1 -1
  11. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +5 -15
  12. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +5 -0
  13. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +5 -0
  14. package/dist/runtime/components/LibDebug/LibDebug.vue +1 -0
  15. package/dist/runtime/components/LibFileInput/LibFileInput.vue +3 -0
  16. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +14 -18
  17. package/dist/runtime/components/LibLabel/LibLabel.vue +9 -14
  18. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +0 -1
  19. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +9 -10
  20. package/dist/runtime/components/LibNotifications/LibNotification.vue +2 -0
  21. package/dist/runtime/components/LibNotifications/LibNotifications.vue +1 -1
  22. package/dist/runtime/components/LibPalette/LibPalette.vue +9 -12
  23. package/dist/runtime/components/LibPopup/LibPopup.vue +2 -2
  24. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +10 -15
  25. package/dist/runtime/components/LibRecorder/LibRecorder.vue +12 -18
  26. package/dist/runtime/components/LibRoot/LibRoot.vue +3 -2
  27. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +12 -19
  28. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +10 -15
  29. package/dist/runtime/components/LibTable/LibTable.vue +2 -2
  30. package/dist/runtime/components/Template/NAME.vue +2 -2
  31. package/dist/runtime/components/shared/props.d.ts +0 -29
  32. package/dist/runtime/components/shared/props.js +0 -12
  33. package/dist/runtime/composables/useAccesibilityOutline.js +1 -1
  34. package/dist/runtime/composables/useDivideAttrs.js +1 -1
  35. package/dist/runtime/composables/useSuggestions.js +4 -4
  36. package/dist/runtime/directives/vDetectFlex.js +4 -4
  37. package/dist/runtime/directives/vExtractRootEl.d.ts +1 -1
  38. package/dist/runtime/directives/vResizableCols.d.ts +1 -1
  39. package/dist/runtime/directives/vResizableCols.js +4 -4
  40. package/dist/runtime/helpers/NotificationHandler.js +6 -6
  41. package/dist/runtime/helpers/base64ToImg.js +2 -2
  42. package/dist/runtime/nuxt/plugins/vue-plugin.js +1 -1
  43. package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
  44. package/dist/runtime/theme.d.ts +1 -1
  45. package/dist/runtime/theme.js +1 -1
  46. package/dist/runtime/utils/notifyIfError.js +1 -1
  47. package/dist/runtime/vue/registerComponents.js +1 -1
  48. package/package.json +68 -89
  49. package/src/module.ts +19 -12
  50. package/src/runtime/assets/utils.css +5 -5
  51. package/src/runtime/build/generateTheme.ts +1 -1
  52. package/src/runtime/components/LibButton/LibButton.stories.ts +1 -1
  53. package/src/runtime/components/LibButton/LibButton.vue +4 -8
  54. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +3 -7
  55. package/src/runtime/components/LibColorPicker/LibColorPicker.vue +6 -4
  56. package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -1
  57. package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -1
  58. package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +8 -15
  59. package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +6 -0
  60. package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +6 -0
  61. package/src/runtime/components/LibDebug/LibDebug.stories.ts +1 -1
  62. package/src/runtime/components/LibDebug/LibDebug.vue +2 -0
  63. package/src/runtime/components/LibFileInput/LibFileInput.vue +4 -0
  64. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +7 -5
  65. package/src/runtime/components/LibLabel/LibLabel.vue +2 -3
  66. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +5 -3
  67. package/src/runtime/components/LibNotifications/LibNotification.vue +3 -0
  68. package/src/runtime/components/LibNotifications/LibNotifications.vue +1 -1
  69. package/src/runtime/components/LibPalette/LibPalette.vue +3 -3
  70. package/src/runtime/components/LibPopup/LibPopup.vue +2 -2
  71. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +2 -2
  72. package/src/runtime/components/LibRecorder/LibRecorder.vue +3 -3
  73. package/src/runtime/components/LibRoot/LibRoot.vue +3 -2
  74. package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +2 -2
  75. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +2 -2
  76. package/src/runtime/components/LibTable/LibTable.vue +1 -1
  77. package/src/runtime/components/Template/NAME.vue +2 -2
  78. package/src/runtime/components/shared/props.ts +8 -12
  79. package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
  80. package/src/runtime/composables/useDivideAttrs.ts +1 -1
  81. package/src/runtime/composables/useSuggestions.ts +4 -4
  82. package/src/runtime/directives/vDetectFlex.ts +4 -4
  83. package/src/runtime/directives/vExtractRootEl.ts +1 -1
  84. package/src/runtime/directives/vResizableCols.ts +5 -5
  85. package/src/runtime/helpers/NotificationHandler.ts +6 -6
  86. package/src/runtime/nuxt/plugins/vue-plugin.ts +1 -1
  87. package/src/runtime/tailwind/themeConvertionOpts.ts +1 -1
  88. package/src/runtime/theme.ts +2 -2
  89. package/src/runtime/utils/notifyIfError.ts +1 -1
  90. package/src/runtime/vue/registerComponents.ts +1 -1
package/README.md CHANGED
@@ -79,11 +79,11 @@ Most slots where possible are passed all properties needed to replace them excep
79
79
  ```ts
80
80
  import { defineConfig } from "vite"
81
81
 
82
- import { WitchcraftUiResolver } from "@witchcraft/ui/build/WitchcraftUiResolver.js"
82
+ import { WitchcraftUiResolver } from "@witchcraft/ui/build/WitchcraftUiResolver"
83
83
  import IconsResolver from "unplugin-icons/resolver"
84
84
  import Icons from "unplugin-icons/vite"
85
85
  import Components from "unplugin-vue-components/vite"
86
- import { unpluginIconViteOptions } from "@witchcraft/ui/build/unpluginIconViteOptions.js"
86
+ import { unpluginIconViteOptions } from "@witchcraft/ui/build/unpluginIconViteOptions"
87
87
 
88
88
  export default defineConfig({
89
89
  plugins: [
@@ -206,12 +206,9 @@ interface Props
206
206
  </script>
207
207
 
208
208
  <script lang="ts" setup>
209
- // eslint-disable-next-line no-duplicate-imports
210
- import { baseInteractivePropsDefaults } from "../shared/props.js"
211
-
212
209
  const props = withDefaults(defineProps<Props>(), {
213
210
  id: "",
214
- ...baseInteractivePropsDefaults
211
+ unstyle: false, disabled:false, readonly:false, border:true,
215
212
  })
216
213
  const $attrs = useAttrs()
217
214
  </script>
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "witchcraftUi",
3
3
  "configKey": "witchcraftUi",
4
- "version": "0.1.2",
4
+ "version": "0.2.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
- "unbuild": "3.6.0"
7
+ "unbuild": "3.6.1"
8
8
  }
9
9
  }
package/dist/module.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { indent, crop } from '@alanscodelog/utils';
2
2
  import { createResolver, defineNuxtModule, useLogger, addTemplate, addComponent, addImports, installModule, addTypeTemplate } from '@nuxt/kit';
3
3
  import tailwindcss from '@tailwindcss/vite';
4
- import { addImportsCustom } from '@witchcraft/nuxt-utils/utils/addImportsCustom.js';
5
- import { globFiles } from '@witchcraft/nuxt-utils/utils/globFiles.js';
4
+ import { addImportsCustom } from '@witchcraft/nuxt-utils/utils/addImportsCustom';
5
+ import { globFiles } from '@witchcraft/nuxt-utils/utils/globFiles';
6
6
  import { defu } from 'defu';
7
7
  import fs from 'fs';
8
8
  import { themeAsTailwindCss } from 'metamorphosis/tailwind';
@@ -100,16 +100,19 @@ const module = defineNuxtModule({
100
100
  logger.info(`Adding unplugin-icons`);
101
101
  config.plugins ??= [];
102
102
  config.plugins = [
103
- // we must prepend or the custom style options don't work when the module is used
104
- ViteComponents({
105
- resolvers: [
106
- IconsResolver()
107
- // we don't need our resolver since we use nuxt instead
108
- ]
109
- }),
110
- Icons({
111
- ...unpluginIconViteOptions
112
- }),
103
+ ...options.includeUnpluginIconsPlugins ? [
104
+ // we must prepend or the custom style options don't work when the module is used
105
+ ViteComponents({
106
+ resolvers: [
107
+ IconsResolver({ prefix: "i" })
108
+ // we don't need our resolver since we use nuxt instead
109
+ ]
110
+ }),
111
+ Icons({
112
+ compiler: "vue3",
113
+ ...unpluginIconViteOptions
114
+ })
115
+ ] : [],
113
116
  tailwindcss(),
114
117
  ...config.plugins
115
118
  ];
@@ -1 +1 @@
1
- @custom-variant dark (&:where(.dark, .dark *));@utility focus-outline-within{@apply outlined-within:outline-2 outlined-within:outline-accent-500 outlined-within:outline-offset-2}@utility focus-outline{@apply outlined:outline-2 outlined:outline-accent-500 outlined:outline-offset-2}@utility focus-outline-no-offset{@apply outlined:outline-2 outlined:outline-accent-500}@utility focus-outline-hidden{@apply outlined:outline-none}@utility bg-squares-gradient{--_square:var(--squareSize,5px);--_double_square:calc(var(--_square)*2);--_light_square:var(--lightSquare,var(--color-white));--_dark_square:var(--darkSquare,var(--color-black));background-color:var(--_light_square);background:repeating-conic-gradient(var(--_dark_square) 0 25%,var(--_light_square) 0 50%) 50% /var(--_double_square) var(--_double_square)}@utility square-light-*{--lightSquare:--value(--color- *)}@utility square-dark-*{--darkSquare:--value(--color- *)}@utility square-size-*{--squareSize:calc(--value(integer) * 1px)}@utility bg-bars-gradient{--_bg_color:var(--bars-bg-color,var(--color-accent-700));--_fg_color:var(--bars-fg-color,var(--color-accent-800));--_angle:var(--bars-angle,45deg);--_fg_width:var(--bars-fg-width,50%);--_bg_width:calc(100% - var(--_fg_width));background-color:var(--_bg_color);--_pos_1:calc(var(--_bg_width)/2);--_pos_2:calc(var(--_bg_width)/2 + var(--_fg_width)/2);--_pos_3:calc(var(--_bg_width) + var(--_fg_width)/2);background-image:repeating-linear-gradient(var(--_angle),var(--_bg_color),var(--_bg_color) var(--_pos_1),var(--_fg_color) var(--_pos_1),var(--_fg_color) var(--_pos_2),var(--_bg_color) var(--_pos_2),var(--_bg_color) var(--_pos_3),var(--_fg_color) var(--_pos_3),var(--_fg_color))}@utility bars-angle-*{--bars-angle:var(--value(integer) * 1deg)}@utility bars-fg-*{--bars-fg-color:--value(--color-*)}@utility bars-bg-*{--bars-bg-color:--value(--color-*)}@utility bars-w-*{--bars-fg-width:calc(--value(integer) * 1%, 50%)}@utility scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none}}@utility styled-scrollbar{--_scrollbar_width:var(--scrollbar-width,calc(var(--spacing)*3));--_scrollbar_border_width:var(--scrollbar-border-width,calc(var(--spacing)/2));--_scrollbar_color:var(--scrollbar-color,--alpha(var(--color-accent-500)/40%));--_scrollbar_hover_color:var(--scrollbar-hover-color,--alpha(var(--color-accent-500)/80%));--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-bg));.dark &{--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-fg))}&::-webkit-scrollbar{height:var(--_scrollbar_width);width:var(--_scrollbar_width)}&::-webkit-scrollbar-corner,&::-webkit-scrollbar-track{background-color:transparent}&::-webkit-scrollbar-thumb,&::-webkit-scrollbar-track{border-radius:var(--_scrollbar_width)}&::-webkit-scrollbar-thumb{background-color:var(--_scrollbar_color);border:var(--_scrollbar_border_width) solid var(--_scrollbar_bg_color)}&::-webkit-scrollbar-thumb:hover{cursor:pointer}&::-webkit-scrollbar-thumb:active,&::-webkit-scrollbar-thumb:hover{background-color:var(--_scrollbar_hover_color);border-radius:var(--_scrollbar_width)}}@utility styled-scrollbar-w-*{--scrollbar-width:--value(integer)}@utility styled-scrollbar-border-w-*{--scrollbar-border-width:--value(integer)}@utility styled-scrollbar-*{--scrollbar-color:--value(--color-*)}@utility styled-scrollbar-bg-*{--scrollbar-bg-color:--value(--color-*)}@utility styled-resizer{--_resizer_width:var(--resizer-width,8px);--_resizer_color:var(--resizer-color,var(--color-neutral-300));.dark &{--_resizer_color:var(--resizer-color,var(--color-neutral-700))}&::-webkit-resizer{border-bottom-color:var(--_resizer_color);border-left-color:transparent;border-right-color:var(--_resizer_color);border-style:solid;border-top-color:transparent;border-width:var(--_resizer_width)}}@utility styled-resizer-w-*{--resizer-width:--value(integer)}@utility styled-resizer-color-*{--resizer-color:--value(--color-*)}@utility content-vertical-holder{--tw-content:"\200b";content:var(--tw-content)}@utility no-touch-action{touch-action:none}@utility bg-transparency-squares{@apply bg-squares-gradient square-light-white square-dark-neutral-300 square-size-6}@utility link-like{@apply cursor-pointer hover:text-accent-500}
1
+ @custom-variant dark (&:where(.dark, .dark *));@utility focus-outline-within{@reference outlined-within:outline-2 outlined-within:outline-accent-500 outlined-within:outline-offset-2}@utility focus-outline{@reference outlined:outline-2 outlined:outline-accent-500 outlined:outline-offset-2}@utility focus-outline-no-offset{@reference outlined:outline-2 outlined:outline-accent-500}@utility focus-outline-hidden{@reference outlined:outline-none}@utility bg-squares-gradient{--_square:var(--squareSize,5px);--_double_square:calc(var(--_square)*2);--_light_square:var(--lightSquare,var(--color-white));--_dark_square:var(--darkSquare,var(--color-black));background-color:var(--_light_square);background:repeating-conic-gradient(var(--_dark_square) 0 25%,var(--_light_square) 0 50%) 50% /var(--_double_square) var(--_double_square)}@utility square-light-*{--lightSquare:--value(--color- *)}@utility square-dark-*{--darkSquare:--value(--color- *)}@utility square-size-*{--squareSize:calc(--value(integer) * 1px)}@utility bg-bars-gradient{--_bg_color:var(--bars-bg-color,var(--color-accent-700));--_fg_color:var(--bars-fg-color,var(--color-accent-800));--_angle:var(--bars-angle,45deg);--_fg_width:var(--bars-fg-width,50%);--_bg_width:calc(100% - var(--_fg_width));background-color:var(--_bg_color);--_pos_1:calc(var(--_bg_width)/2);--_pos_2:calc(var(--_bg_width)/2 + var(--_fg_width)/2);--_pos_3:calc(var(--_bg_width) + var(--_fg_width)/2);background-image:repeating-linear-gradient(var(--_angle),var(--_bg_color),var(--_bg_color) var(--_pos_1),var(--_fg_color) var(--_pos_1),var(--_fg_color) var(--_pos_2),var(--_bg_color) var(--_pos_2),var(--_bg_color) var(--_pos_3),var(--_fg_color) var(--_pos_3),var(--_fg_color))}@utility bars-angle-*{--bars-angle:var(--value(integer) * 1deg)}@utility bars-fg-*{--bars-fg-color:--value(--color-*)}@utility bars-bg-*{--bars-bg-color:--value(--color-*)}@utility bars-w-*{--bars-fg-width:calc(--value(integer) * 1%, 50%)}@utility scrollbar-hidden{-ms-overflow-style:none;scrollbar-width:none;&::-webkit-scrollbar{display:none}}@utility styled-scrollbar{--_scrollbar_width:var(--scrollbar-width,calc(var(--spacing)*3));--_scrollbar_border_width:var(--scrollbar-border-width,calc(var(--spacing)/2));--_scrollbar_color:var(--scrollbar-color,--alpha(var(--color-accent-500)/40%));--_scrollbar_hover_color:var(--scrollbar-hover-color,--alpha(var(--color-accent-500)/80%));--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-bg));.dark &{--_scrollbar_bg_color:var(--scrollbar-bg-color,var(--color-fg))}&::-webkit-scrollbar{height:var(--_scrollbar_width);width:var(--_scrollbar_width)}&::-webkit-scrollbar-corner,&::-webkit-scrollbar-track{background-color:transparent}&::-webkit-scrollbar-thumb,&::-webkit-scrollbar-track{border-radius:var(--_scrollbar_width)}&::-webkit-scrollbar-thumb{background-color:var(--_scrollbar_color);border:var(--_scrollbar_border_width) solid var(--_scrollbar_bg_color)}&::-webkit-scrollbar-thumb:hover{cursor:pointer}&::-webkit-scrollbar-thumb:active,&::-webkit-scrollbar-thumb:hover{background-color:var(--_scrollbar_hover_color);border-radius:var(--_scrollbar_width)}}@utility styled-scrollbar-w-*{--scrollbar-width:--value(integer)}@utility styled-scrollbar-border-w-*{--scrollbar-border-width:--value(integer)}@utility styled-scrollbar-*{--scrollbar-color:--value(--color-*)}@utility styled-scrollbar-bg-*{--scrollbar-bg-color:--value(--color-*)}@utility styled-resizer{--_resizer_width:var(--resizer-width,8px);--_resizer_color:var(--resizer-color,var(--color-neutral-300));.dark &{--_resizer_color:var(--resizer-color,var(--color-neutral-700))}&::-webkit-resizer{border-bottom-color:var(--_resizer_color);border-left-color:transparent;border-right-color:var(--_resizer_color);border-style:solid;border-top-color:transparent;border-width:var(--_resizer_width)}}@utility styled-resizer-w-*{--resizer-width:--value(integer)}@utility styled-resizer-color-*{--resizer-color:--value(--color-*)}@utility content-vertical-holder{--tw-content:"\200b";content:var(--tw-content)}@utility no-touch-action{touch-action:none}@utility bg-transparency-squares{@reference bg-squares-gradient square-light-white square-dark-neutral-300 square-size-6}@utility link-like{@apply cursor-pointer hover:text-accent-500}
@@ -1,4 +1,4 @@
1
- import { themeAsTailwindCss } from "metamorphosis/tailwind.js";
1
+ import { themeAsTailwindCss } from "metamorphosis/tailwind";
2
2
  import fs from "node:fs";
3
3
  import { resolve } from "path";
4
4
  import { themeConvertionOpts } from "../tailwind/themeConvertionOpts.js";
@@ -185,33 +185,26 @@
185
185
  </template>
186
186
 
187
187
  <script setup>
188
- import { isBlank } from "@alanscodelog/utils/isBlank.js";
189
- import { keys } from "@alanscodelog/utils/keys.js";
190
- import { pick } from "@alanscodelog/utils/pick.js";
188
+ import { isBlank } from "@alanscodelog/utils/isBlank";
191
189
  import { computed, useAttrs } from "vue";
192
190
  import { useAriaLabel } from "../../composables/useAriaLabel.js";
193
- import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
194
191
  import { twMerge } from "../../utils/twMerge.js";
195
- import { baseInteractiveProps, baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
192
+ import { getFallbackId } from "../shared/props.js";
196
193
  const $attrs = useAttrs();
197
194
  defineOptions({
198
195
  name: "lib-button"
199
196
  });
200
197
  const fallbackId = getFallbackId();
201
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
198
+ const props = defineProps({
202
199
  id: { type: String, required: false },
203
- label: { type: String, required: false },
204
- disabled: { type: Boolean, required: false },
205
- readonly: { type: Boolean, required: false },
206
- border: { type: Boolean, required: false },
207
- unstyle: { type: Boolean, required: false },
208
- color: { type: [String, Boolean], required: false },
200
+ label: { type: String, required: false, default: "" },
201
+ disabled: { type: Boolean, required: false, default: false },
202
+ readonly: { type: Boolean, required: false, default: false },
203
+ border: { type: Boolean, required: false, default: true },
204
+ unstyle: { type: Boolean, required: false, default: false },
205
+ color: { type: [String, Boolean], required: false, default: false },
209
206
  autoTitleFromAria: { type: Boolean, required: false }
210
- }, {
211
- color: false,
212
- label: "",
213
- ...baseInteractivePropsDefaults
214
- }));
207
+ });
215
208
  const ariaLabel = useAriaLabel(props, fallbackId);
216
209
  const autoTitle = computed(() => ({
217
210
  title: props.autoTitleFromAria ? $attrs["aria-label"] ?? props.label : void 0
@@ -72,14 +72,11 @@
72
72
  </template>
73
73
 
74
74
  <script setup>
75
- import { keys } from "@alanscodelog/utils/keys.js";
76
- import { omit } from "@alanscodelog/utils/omit.js";
77
- import { pick } from "@alanscodelog/utils/pick.js";
78
- import { computed, ref, useAttrs, useSlots } from "vue";
75
+ import { ref, useSlots } from "vue";
79
76
  import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
80
77
  import { usePreHydrationValue } from "../../composables/usePreHydrationValue.js";
81
78
  import { twMerge } from "../../utils/twMerge.js";
82
- import { baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
79
+ import { getFallbackId } from "../shared/props.js";
83
80
  defineOptions({
84
81
  name: "lib-checkbox",
85
82
  inheritAttrs: false
@@ -87,16 +84,14 @@ defineOptions({
87
84
  const $ = useDivideAttrs(["label", "wrapper"]);
88
85
  const $slots = useSlots();
89
86
  const fallbackId = getFallbackId();
90
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
87
+ const props = defineProps({
91
88
  id: { type: String, required: false },
92
89
  label: { type: String, required: false },
93
- disabled: { type: Boolean, required: false },
94
- readonly: { type: Boolean, required: false },
95
- border: { type: Boolean, required: false },
96
- unstyle: { type: Boolean, required: false }
97
- }, {
98
- ...baseInteractivePropsDefaults
99
- }));
90
+ disabled: { type: Boolean, required: false, default: false },
91
+ readonly: { type: Boolean, required: false, default: false },
92
+ border: { type: Boolean, required: false, default: true },
93
+ unstyle: { type: Boolean, required: false, default: false }
94
+ });
100
95
  const emits = defineEmits(["submit"]);
101
96
  const el = ref(null);
102
97
  const inputEl = ref(null);
@@ -170,15 +170,16 @@
170
170
  </template>
171
171
 
172
172
  <script setup>
173
- import { castType } from "@alanscodelog/utils/castType.js";
174
- import { clampNumber } from "@alanscodelog/utils/clampNumber.js";
175
- import { isArray } from "@alanscodelog/utils/isArray.js";
176
- import { unreachable } from "@alanscodelog/utils/unreachable.js";
173
+ import { castType } from "@alanscodelog/utils/castType";
174
+ import { clampNumber } from "@alanscodelog/utils/clampNumber";
175
+ import { isArray } from "@alanscodelog/utils/isArray";
176
+ import { unreachable } from "@alanscodelog/utils/unreachable";
177
177
  import Color from "colorjs.io";
178
178
  import { computed, onMounted, reactive, ref, useAttrs, watch } from "vue";
179
179
  import { safeConvertToHsva } from "./utils/safeConvertToHsva.js";
180
180
  import { safeConvertToRgba } from "./utils/safeConvertToRgba.js";
181
181
  import { toLowPrecisionRgbaString } from "./utils/toLowPrecisionRgbaString.js";
182
+ import IFa6RegularCopy from "~icons/fa-regular/copy";
182
183
  import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
183
184
  import { copy } from "../../helpers/copy.js";
184
185
  import { twMerge } from "../../utils/twMerge.js";
@@ -1,4 +1,4 @@
1
- import { clampNumber } from "@alanscodelog/utils/clampNumber.js";
1
+ import { clampNumber } from "@alanscodelog/utils/clampNumber";
2
2
  import Color from "colorjs.io";
3
3
  export function safeConvertToHsva(val, allowAlpha) {
4
4
  try {
@@ -1,4 +1,4 @@
1
- import { clampNumber } from "@alanscodelog/utils/clampNumber.js";
1
+ import { clampNumber } from "@alanscodelog/utils/clampNumber";
2
2
  import Color from "colorjs.io";
3
3
  export function safeConvertToRgba(val, allowAlpha) {
4
4
  try {
@@ -15,22 +15,9 @@
15
15
  <!-- content-vertical-holder will keep the icon the height of a text line regardless of the svg used -->
16
16
  <template #icon>
17
17
  <icon
18
- v-if="darkModeState === 'dark'"
19
- class="w-[1em] flex items-center content-vertical-holder"
18
+ class="w-[1em] items-center content-vertical-holder"
20
19
  >
21
- <i-fa-solid-moon/>
22
- </icon>
23
- <icon
24
- v-else-if="darkModeState === 'light'"
25
- class="w-[1em] content-vertical-holder"
26
- >
27
- <i-ph-sun-bold/>
28
- </icon>
29
- <icon
30
- v-else
31
- class="w-[1em] content-vertical-holder"
32
- >
33
- <i-fa6-solid-circle-half-stroke/>
20
+ <component :is="darkModeState === 'dark' ? IFaSolidMoon : darkModeState === 'light' ? IPhSunBold : IFa6SolidCircleHalfStroke"/>
34
21
  </icon>
35
22
  </template>
36
23
  <template #default v-if="showLabel">
@@ -43,6 +30,9 @@
43
30
 
44
31
  <script setup>
45
32
  import { onMounted, useAttrs, watch } from "vue";
33
+ import IFaSolidMoon from "~icons/fa-solid/moon";
34
+ import IFa6SolidCircleHalfStroke from "~icons/fa6-solid/circle-half-stroke";
35
+ import IPhSunBold from "~icons/ph/sun-bold";
46
36
  import { useInjectedDarkMode } from "../../composables/useInjectedDarkMode.js";
47
37
  import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
48
38
  import { twMerge } from "../../utils/twMerge.js";
@@ -3,6 +3,11 @@ import { CalendarDate, getLocalTimeZone, ZonedDateTime } from "@internationalize
3
3
  import { DateRangePickerArrow, DateRangePickerCalendar, DateRangePickerCell, DateRangePickerCellTrigger, DateRangePickerContent, DateRangePickerField, DateRangePickerGrid, DateRangePickerGridBody, DateRangePickerGridHead, DateRangePickerGridRow, DateRangePickerHeadCell, DateRangePickerHeader, DateRangePickerHeading, DateRangePickerInput, DateRangePickerNext, DateRangePickerPrev, DateRangePickerRoot, DateRangePickerTrigger } from "reka-ui";
4
4
  import { onBeforeUnmount, ref, toRaw, useAttrs, watch } from "vue";
5
5
  import { convertDateWithFallback, getNow, toEmittableDate } from "./helpers.js";
6
+ import IRadixIconsCalendar from "~icons/radix-icons/calendar";
7
+ import IRadixIconsChevronLeft from "~icons/radix-icons/chevron-left";
8
+ import IRadixIconsChevronRight from "~icons/radix-icons/chevron-right";
9
+ import IRadixIconsDoubleArrowLeft from "~icons/radix-icons/double-arrow-left";
10
+ import IRadixIconsDoubleArrowRight from "~icons/radix-icons/double-arrow-right";
6
11
  import { useInjectedLocale } from "../../composables/useInjectedLocale.js";
7
12
  import { twMerge } from "../../utils/twMerge.js";
8
13
  import Icon from "../Icon/Icon.vue";
@@ -3,6 +3,11 @@ import { getLocalTimeZone } from "@internationalized/date";
3
3
  import { DatePickerArrow, DatePickerCalendar, DatePickerCell, DatePickerCellTrigger, DatePickerContent, DatePickerField, DatePickerGrid, DatePickerGridBody, DatePickerGridHead, DatePickerGridRow, DatePickerHeadCell, DatePickerHeader, DatePickerHeading, DatePickerInput, DatePickerNext, DatePickerPrev, DatePickerRoot, DatePickerTrigger } from "reka-ui";
4
4
  import { onBeforeUnmount, ref, toRaw, useAttrs, watch } from "vue";
5
5
  import { convertDateWithFallback, getNow, toEmittableDate } from "./helpers.js";
6
+ import IRadixIconsCalendar from "~icons/radix-icons/calendar";
7
+ import IRadixIconsChevronLeft from "~icons/radix-icons/chevron-left";
8
+ import IRadixIconsChevronRight from "~icons/radix-icons/chevron-right";
9
+ import IRadixIconsDoubleArrowLeft from "~icons/radix-icons/double-arrow-left";
10
+ import IRadixIconsDoubleArrowRight from "~icons/radix-icons/double-arrow-right";
6
11
  import { useInjectedLocale } from "../../composables/useInjectedLocale.js";
7
12
  import { twMerge } from "../../utils/twMerge.js";
8
13
  import Icon from "../Icon/Icon.vue";
@@ -31,6 +31,7 @@
31
31
 
32
32
  <script setup>
33
33
  import { useSlots } from "vue";
34
+ import IFa6RegularCopy from "~icons/fa-regular/copy";
34
35
  import Icon from "../Icon/Icon.vue";
35
36
  import LibButton from "../LibButton/LibButton.vue";
36
37
  const $slots = useSlots();
@@ -163,6 +163,9 @@
163
163
 
164
164
  <script setup>
165
165
  import { computed, ref, shallowReactive, watch } from "vue";
166
+ import IFa6RegularFile from "~icons/fa6-regular/file";
167
+ import IFa6SolidArrowUpFromBracket from "~icons/fa6-solid/arrow-up-from-bracket";
168
+ import IFa6SolidXmark from "~icons/fa6-solid/xmark";
166
169
  import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
167
170
  import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
168
171
  import {} from "../../types/index.js";
@@ -156,10 +156,11 @@
156
156
  </template>
157
157
 
158
158
  <script setup>
159
- import { isBlank } from "@alanscodelog/utils/isBlank.js";
160
- import { isObject } from "@alanscodelog/utils/isObject.js";
161
- import { pushIfNotIn } from "@alanscodelog/utils/pushIfNotIn.js";
159
+ import { isBlank } from "@alanscodelog/utils/isBlank";
160
+ import { isObject } from "@alanscodelog/utils/isObject";
161
+ import { pushIfNotIn } from "@alanscodelog/utils/pushIfNotIn";
162
162
  import { computed, nextTick, onBeforeMount, ref, toRef, useSlots, watch } from "vue";
163
+ import IFa6SolidChevronUp from "~icons/fa6-solid/chevron-up";
163
164
  import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
164
165
  import { useSuggestionsInputAria } from "../../composables/useSuggestions.js";
165
166
  import { twMerge } from "../../utils/twMerge.js";
@@ -168,7 +169,7 @@ import LibLabel from "../LibLabel/LibLabel.vue";
168
169
  import LibMultiValues from "../LibMultiValues/LibMultiValues.vue";
169
170
  import LibSimpleInput from "../LibSimpleInput/LibSimpleInput.vue";
170
171
  import LibSuggestions from "../LibSuggestions/LibSuggestions.vue";
171
- import { baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
172
+ import { getFallbackId } from "../shared/props.js";
172
173
  defineOptions({
173
174
  name: "lib-simple-input-deprecated",
174
175
  inheritAttrs: false
@@ -176,11 +177,11 @@ defineOptions({
176
177
  const $slots = useSlots();
177
178
  const emit = defineEmits(["input", "submit", "keydown", "blur", "focus", "indicatorClick"]);
178
179
  const fallbackId = getFallbackId();
179
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
180
- suggestions: { type: Array, required: false },
180
+ const props = defineProps({
181
+ suggestions: { type: Array, required: false, default: void 0 },
181
182
  suggestionLabel: { type: Function, required: false },
182
183
  restrictToSuggestions: { type: Boolean, required: false },
183
- updateOnlyOnSubmit: { type: Boolean, required: false },
184
+ updateOnlyOnSubmit: { type: Boolean, required: false, default: false },
184
185
  suggestionsFilter: { type: Function, required: false },
185
186
  allowOpenEmpty: { type: Boolean, required: false },
186
187
  canOpen: { type: Boolean, required: false },
@@ -190,17 +191,12 @@ const props = defineProps(/* @__PURE__ */ _mergeDefaults({
190
191
  showSelectedValues: { type: Boolean, required: false },
191
192
  id: { type: String, required: false },
192
193
  label: { type: String, required: false },
193
- disabled: { type: Boolean, required: false },
194
- readonly: { type: Boolean, required: false },
195
- border: { type: Boolean, required: false },
196
- unstyle: { type: Boolean, required: false },
197
- valid: { type: Boolean, required: false }
198
- }, {
199
- valid: true,
200
- suggestions: void 0,
201
- updateOnlyOnSubmit: false,
202
- ...baseInteractivePropsDefaults
203
- }));
194
+ disabled: { type: Boolean, required: false, default: false },
195
+ readonly: { type: Boolean, required: false, default: false },
196
+ border: { type: Boolean, required: false, default: true },
197
+ unstyle: { type: Boolean, required: false, default: false },
198
+ valid: { type: Boolean, required: false, default: true }
199
+ });
204
200
  const $ = useDivideAttrs(["wrapper", "inner-wrapper", "suggestions", "multivalues"]);
205
201
  const $values = defineModel("values", { type: null, ...{ default: void 0 } });
206
202
  const $modelValue = defineModel({ type: String, ...{ required: true } });
@@ -22,26 +22,21 @@
22
22
  <script setup>
23
23
  import { toRef, useAttrs } from "vue";
24
24
  import { twMerge } from "../../utils/twMerge.js";
25
- import { baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
25
+ import { getFallbackId } from "../shared/props.js";
26
26
  defineOptions({
27
27
  name: "lib-label"
28
28
  });
29
29
  const fallbackId = getFallbackId();
30
- defineProps(/* @__PURE__ */ _mergeDefaults({
31
- id: { type: String, required: false },
30
+ defineProps({
31
+ id: { type: String, required: false, default: "" },
32
32
  label: { type: String, required: false },
33
- disabled: { type: Boolean, required: false },
34
- readonly: { type: Boolean, required: false },
35
- border: { type: Boolean, required: false },
36
- unstyle: { type: Boolean, required: false },
33
+ disabled: { type: Boolean, required: false, default: false },
34
+ readonly: { type: Boolean, required: false, default: false },
35
+ border: { type: Boolean, required: false, default: true },
36
+ unstyle: { type: Boolean, required: false, default: false },
37
37
  unstyled: { type: Boolean, required: false },
38
- valid: { type: Boolean, required: false }
39
- }, {
40
- id: "",
41
- unstyled: void 0,
42
- valid: true,
43
- ...baseInteractivePropsDefaults
44
- }));
38
+ valid: { type: Boolean, required: false, default: true }
39
+ });
45
40
  const $attrs = useAttrs();
46
41
  </script>
47
42
 
@@ -14,7 +14,6 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props, voi
14
14
  readonly: boolean;
15
15
  border: boolean;
16
16
  unstyle: boolean;
17
- unstyled: boolean;
18
17
  valid: boolean;
19
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
20
19
  default?: (props: {}) => any;
@@ -76,28 +76,27 @@
76
76
  </template>
77
77
 
78
78
  <script setup>
79
- import { removeIfIn } from "@alanscodelog/utils/removeIfIn.js";
79
+ import { removeIfIn } from "@alanscodelog/utils/removeIfIn";
80
80
  import { computed } from "vue";
81
+ import IFa6SolidXmark from "~icons/fa6-solid/xmark";
81
82
  import { useDivideAttrs } from "../../composables/useDivideAttrs.js";
82
83
  import { copy } from "../../helpers/copy.js";
83
84
  import { twMerge } from "../../utils/twMerge.js";
84
85
  import Icon from "../Icon/Icon.vue";
85
86
  import LibButton from "../LibButton/LibButton.vue";
86
- import { baseInteractivePropsDefaults } from "../shared/props.js";
87
+ import {} from "../shared/props.js";
87
88
  defineOptions({
88
89
  name: "lib-multi-values",
89
90
  inheritAttrs: false
90
91
  });
91
92
  const $ = useDivideAttrs(["item"]);
92
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
93
+ const props = defineProps({
93
94
  label: { type: String, required: false },
94
- disabled: { type: Boolean, required: false },
95
- readonly: { type: Boolean, required: false },
96
- border: { type: Boolean, required: false },
97
- unstyle: { type: Boolean, required: false }
98
- }, {
99
- ...baseInteractivePropsDefaults
100
- }));
95
+ disabled: { type: Boolean, required: false, default: false },
96
+ readonly: { type: Boolean, required: false, default: false },
97
+ border: { type: Boolean, required: false, default: true },
98
+ unstyle: { type: Boolean, required: false, default: false }
99
+ });
101
100
  const canEdit = computed(() => !props.disabled && !props.readonly);
102
101
  const $modelValue = defineModel({ type: Array, ...{ default: () => [] } });
103
102
  const removeVal = (value) => {
@@ -84,6 +84,8 @@
84
84
 
85
85
  <script setup>
86
86
  import { computed, ref, useAttrs } from "vue";
87
+ import IFa6RegularCopy from "~icons/fa6-regular/copy";
88
+ import IFa6SolidXmark from "~icons/fa6-solid/xmark";
87
89
  import { copy } from "../../helpers/copy.js";
88
90
  import { NotificationHandler } from "../../helpers/NotificationHandler.js";
89
91
  import { twMerge } from "../../utils/twMerge.js";
@@ -52,7 +52,7 @@
52
52
  </template>
53
53
 
54
54
  <script setup>
55
- import { removeIfIn } from "@alanscodelog/utils/removeIfIn.js";
55
+ import { removeIfIn } from "@alanscodelog/utils/removeIfIn";
56
56
  import { nextTick, onBeforeUnmount, ref, shallowReactive, Transition, TransitionGroup } from "vue";
57
57
  import LibNotification from "./LibNotification.vue";
58
58
  import { useNotificationHandler } from "../../composables/useNotificationHandler.js";
@@ -27,20 +27,17 @@ export default { name: "lib-palette" };
27
27
  </script>
28
28
 
29
29
  <script setup>
30
- import { keys } from "@alanscodelog/utils/keys.js";
30
+ import { keys } from "@alanscodelog/utils/keys";
31
31
  import {} from "metamorphosis";
32
- import { baseInteractivePropsDefaults } from "../shared/props.js";
33
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
32
+ import {} from "../shared/props.js";
33
+ const props = defineProps({
34
34
  id: { type: String, required: false },
35
- disabled: { type: Boolean, required: false },
36
- readonly: { type: Boolean, required: false },
37
- border: { type: Boolean, required: false },
38
- unstyle: { type: Boolean, required: false },
39
- theme: { type: Object, required: true }
40
- }, {
41
- theme: () => ({}),
42
- ...baseInteractivePropsDefaults
43
- }));
35
+ disabled: { type: Boolean, required: false, default: false },
36
+ readonly: { type: Boolean, required: false, default: false },
37
+ border: { type: Boolean, required: false, default: true },
38
+ unstyle: { type: Boolean, required: false, default: false },
39
+ theme: { type: Object, required: true, default: () => ({}) }
40
+ });
44
41
  const exclude = ["--color-bg", "--color-fg"];
45
42
  const colors = keys(props.theme.css).filter((key) => key.startsWith("--color") && !exclude.includes(key));
46
43
  </script>
@@ -49,8 +49,8 @@
49
49
  import { onMounted, nextTick, ref, useAttrs, watch } from "vue";
50
50
  import { getFallbackId } from "../shared/props.js";
51
51
  import { twMerge } from "../../utils/twMerge.js";
52
- import { castType } from "@alanscodelog/utils/castType.js";
53
- import { isArray } from "@alanscodelog/utils/isArray.js";
52
+ import { castType } from "@alanscodelog/utils/castType";
53
+ import { isArray } from "@alanscodelog/utils/isArray";
54
54
  const fallbackId = getFallbackId();
55
55
  const props = defineProps({
56
56
  id: { type: String, required: false },
@@ -97,30 +97,25 @@
97
97
  <script setup>
98
98
  import { ref, watch } from "vue";
99
99
  import { twMerge } from "../../utils/twMerge.js";
100
- import { baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
100
+ import { getFallbackId } from "../shared/props.js";
101
101
  const clampVal = (n, min, max) => Math.min(Math.max(n, min), max);
102
102
  defineOptions({
103
103
  name: "lib-progress-bar",
104
104
  inheritAttrs: false
105
105
  });
106
106
  const fallbackId = getFallbackId();
107
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
107
+ const props = defineProps({
108
108
  id: { type: String, required: false },
109
- disabled: { type: Boolean, required: false },
110
- readonly: { type: Boolean, required: false },
111
- border: { type: Boolean, required: false },
112
- unstyle: { type: Boolean, required: false },
109
+ disabled: { type: Boolean, required: false, default: false },
110
+ readonly: { type: Boolean, required: false, default: false },
111
+ border: { type: Boolean, required: false, default: true },
112
+ unstyle: { type: Boolean, required: false, default: false },
113
113
  label: { type: String, required: false },
114
114
  progress: { type: Number, required: true },
115
- autohideOnComplete: { type: Number, required: false },
116
- keepSpaceWhenHidden: { type: Boolean, required: false },
117
- clamp: { type: Array, required: false }
118
- }, {
119
- autohideOnComplete: -1,
120
- keepSpaceWhenHidden: false,
121
- clamp: () => [0, 100],
122
- ...baseInteractivePropsDefaults
123
- }));
115
+ autohideOnComplete: { type: Number, required: false, default: -1 },
116
+ keepSpaceWhenHidden: { type: Boolean, required: false, default: false },
117
+ clamp: { type: Array, required: false, default: () => [0, 100] }
118
+ });
124
119
  const hide = ref(false);
125
120
  const psuedoHide = ref(false);
126
121
  let timeout;
@@ -71,12 +71,12 @@
71
71
  </template>
72
72
 
73
73
  <script setup>
74
- import { keys } from "@alanscodelog/utils/keys.js";
74
+ import { keys } from "@alanscodelog/utils/keys";
75
75
  import { computed, onBeforeUnmount, onMounted, ref, watch, watchPostEffect } from "vue";
76
76
  import { useAriaLabel } from "../../composables/useAriaLabel.js";
77
77
  import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
78
78
  import { twMerge } from "../../utils/twMerge.js";
79
- import { baseInteractivePropsDefaults, getFallbackId } from "../shared/props.js";
79
+ import { getFallbackId } from "../shared/props.js";
80
80
  defineOptions({
81
81
  name: "lib-recorder",
82
82
  inheritAttrs: false
@@ -84,24 +84,18 @@ defineOptions({
84
84
  const t = useInjectedI18n();
85
85
  const emits = defineEmits(["recorder:blur", "recorder:click", "focus:parent"]);
86
86
  const fallbackId = getFallbackId();
87
- const props = defineProps(/* @__PURE__ */ _mergeDefaults({
88
- id: { type: String, required: false },
89
- disabled: { type: Boolean, required: false },
90
- readonly: { type: Boolean, required: false },
91
- border: { type: Boolean, required: false },
92
- unstyle: { type: Boolean, required: false },
87
+ const props = defineProps({
88
+ id: { type: String, required: false, default: void 0 },
89
+ disabled: { type: Boolean, required: false, default: false },
90
+ readonly: { type: Boolean, required: false, default: false },
91
+ border: { type: Boolean, required: false, default: true },
92
+ unstyle: { type: Boolean, required: false, default: false },
93
93
  label: { type: String, required: false },
94
94
  recordingValue: { type: String, required: false },
95
- recordingTitle: { type: String, required: false },
96
- recorder: { type: null, required: false },
97
- binders: { type: null, required: false }
98
- }, {
99
- recordingTitle: "",
100
- id: void 0,
101
- binders: void 0,
102
- recorder: void 0,
103
- ...baseInteractivePropsDefaults
104
- }));
95
+ recordingTitle: { type: String, required: false, default: "" },
96
+ recorder: { type: null, required: false, default: void 0 },
97
+ binders: { type: null, required: false, default: void 0 }
98
+ });
105
99
  const recording = defineModel("recording", { type: Boolean, ...{ required: false, default: false } });
106
100
  const modelValue = defineModel({ type: String, ...{ required: true } });
107
101
  const recorderEl = ref(null);