@witchcraft/ui 0.1.3 → 0.2.1-beta.1

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 (179) hide show
  1. package/README.md +3 -6
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +15 -12
  4. package/dist/runtime/build/generateTheme.js +1 -1
  5. package/dist/runtime/components/Aria/Aria.vue +5 -9
  6. package/dist/runtime/components/Aria/Aria.vue.d.ts +5 -0
  7. package/dist/runtime/components/Icon/Icon.vue +10 -30
  8. package/dist/runtime/components/Icon/Icon.vue.d.ts +21 -0
  9. package/dist/runtime/components/LibButton/LibButton.vue +51 -72
  10. package/dist/runtime/components/LibButton/LibButton.vue.d.ts +36 -0
  11. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue +43 -74
  12. package/dist/runtime/components/LibCheckbox/LibCheckbox.vue.d.ts +42 -0
  13. package/dist/runtime/components/LibColorInput/LibColorInput.vue +63 -107
  14. package/dist/runtime/components/LibColorInput/LibColorInput.vue.d.ts +63 -0
  15. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue +272 -352
  16. package/dist/runtime/components/LibColorPicker/LibColorPicker.vue.d.ts +61 -0
  17. package/dist/runtime/components/LibColorPicker/utils/safeConvertToHsva.js +1 -1
  18. package/dist/runtime/components/LibColorPicker/utils/safeConvertToRgba.js +1 -1
  19. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +35 -69
  20. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue.d.ts +22 -0
  21. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue +17 -38
  22. package/dist/runtime/components/LibDatePicker/LibDatePicker.vue.d.ts +40 -0
  23. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue +58 -82
  24. package/dist/runtime/components/LibDatePicker/LibRangeDatePicker.vue.d.ts +34 -0
  25. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue +55 -67
  26. package/dist/runtime/components/LibDatePicker/LibSingleDatePicker.vue.d.ts +34 -0
  27. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue +7 -8
  28. package/dist/runtime/components/LibDatePicker/LibTimeZonePicker.vue.d.ts +22 -0
  29. package/dist/runtime/components/LibDebug/LibDebug.vue +43 -70
  30. package/dist/runtime/components/LibDebug/LibDebug.vue.d.ts +32 -0
  31. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue +18 -31
  32. package/dist/runtime/components/LibDevOnly/LibDevOnly.vue.d.ts +22 -0
  33. package/dist/runtime/components/LibFileInput/LibFileInput.vue +116 -156
  34. package/dist/runtime/components/LibFileInput/LibFileInput.vue.d.ts +43 -0
  35. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +211 -241
  36. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.vue.d.ts +165 -0
  37. package/dist/runtime/components/LibLabel/LibLabel.vue +25 -46
  38. package/dist/runtime/components/LibLabel/LibLabel.vue.d.ts +26 -0
  39. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue +43 -58
  40. package/dist/runtime/components/LibMultiValues/LibMultiValues.vue.d.ts +29 -0
  41. package/dist/runtime/components/LibNotifications/LibNotification.vue +34 -48
  42. package/dist/runtime/components/LibNotifications/LibNotification.vue.d.ts +17 -0
  43. package/dist/runtime/components/LibNotifications/LibNotifications.vue +63 -83
  44. package/dist/runtime/components/LibNotifications/LibNotifications.vue.d.ts +13 -0
  45. package/dist/runtime/components/LibPagination/LibPagination.vue +67 -111
  46. package/dist/runtime/components/LibPagination/LibPagination.vue.d.ts +104 -0
  47. package/dist/runtime/components/LibPalette/LibPalette.vue +17 -23
  48. package/dist/runtime/components/LibPalette/LibPalette.vue.d.ts +14 -0
  49. package/dist/runtime/components/LibPopup/LibPopup.vue +314 -351
  50. package/dist/runtime/components/LibPopup/LibPopup.vue.d.ts +46 -0
  51. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue +65 -91
  52. package/dist/runtime/components/LibProgressBar/LibProgressBar.vue.d.ts +41 -0
  53. package/dist/runtime/components/LibRecorder/LibRecorder.vue +127 -177
  54. package/dist/runtime/components/LibRecorder/LibRecorder.vue.d.ts +77 -0
  55. package/dist/runtime/components/LibRoot/LibRoot.vue +75 -101
  56. package/dist/runtime/components/LibRoot/LibRoot.vue.d.ts +41 -0
  57. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue +42 -77
  58. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.vue.d.ts +35 -0
  59. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue +118 -156
  60. package/dist/runtime/components/LibSuggestions/LibSuggestions.vue.d.ts +94 -0
  61. package/dist/runtime/components/LibTable/LibTable.vue +63 -99
  62. package/dist/runtime/components/LibTable/LibTable.vue.d.ts +45 -0
  63. package/dist/runtime/components/Template/NAME.vue +15 -36
  64. package/dist/runtime/components/Template/NAME.vue.d.ts +17 -0
  65. package/dist/runtime/components/TestControls/TestControls.vue +6 -9
  66. package/dist/runtime/components/TestControls/TestControls.vue.d.ts +5 -0
  67. package/dist/runtime/components/shared/props.d.ts +0 -29
  68. package/dist/runtime/components/shared/props.js +0 -12
  69. package/dist/runtime/composables/useAccesibilityOutline.js +1 -1
  70. package/dist/runtime/composables/useDivideAttrs.js +1 -1
  71. package/dist/runtime/composables/useSuggestions.js +4 -4
  72. package/dist/runtime/directives/vDetectFlex.js +4 -4
  73. package/dist/runtime/directives/vExtractRootEl.d.ts +1 -1
  74. package/dist/runtime/directives/vResizableCols.d.ts +1 -1
  75. package/dist/runtime/directives/vResizableCols.js +4 -4
  76. package/dist/runtime/helpers/NotificationHandler.js +6 -6
  77. package/dist/runtime/helpers/base64ToImg.js +2 -2
  78. package/dist/runtime/nuxt/plugins/vue-plugin.js +1 -1
  79. package/dist/runtime/tailwind/themeConvertionOpts.d.ts +1 -1
  80. package/dist/runtime/theme.d.ts +1 -1
  81. package/dist/runtime/theme.js +1 -1
  82. package/dist/runtime/utils/notifyIfError.js +1 -1
  83. package/dist/runtime/vue/registerComponents.js +1 -1
  84. package/dist/types.d.mts +2 -6
  85. package/package.json +68 -90
  86. package/src/module.ts +19 -12
  87. package/src/runtime/build/generateTheme.ts +1 -1
  88. package/src/runtime/components/LibButton/LibButton.stories.ts +1 -1
  89. package/src/runtime/components/LibButton/LibButton.vue +3 -3
  90. package/src/runtime/components/LibCheckbox/LibCheckbox.vue +3 -7
  91. package/src/runtime/components/LibColorPicker/LibColorPicker.vue +6 -4
  92. package/src/runtime/components/LibColorPicker/utils/safeConvertToHsva.ts +1 -1
  93. package/src/runtime/components/LibColorPicker/utils/safeConvertToRgba.ts +1 -1
  94. package/src/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.vue +8 -15
  95. package/src/runtime/components/LibDatePicker/LibRangeDatePicker.vue +6 -0
  96. package/src/runtime/components/LibDatePicker/LibSingleDatePicker.vue +6 -0
  97. package/src/runtime/components/LibDebug/LibDebug.stories.ts +1 -1
  98. package/src/runtime/components/LibDebug/LibDebug.vue +2 -0
  99. package/src/runtime/components/LibFileInput/LibFileInput.vue +4 -0
  100. package/src/runtime/components/LibInputDeprecated/LibInputDeprecated.vue +7 -5
  101. package/src/runtime/components/LibLabel/LibLabel.vue +2 -3
  102. package/src/runtime/components/LibMultiValues/LibMultiValues.vue +5 -3
  103. package/src/runtime/components/LibNotifications/LibNotification.vue +3 -0
  104. package/src/runtime/components/LibNotifications/LibNotifications.vue +1 -1
  105. package/src/runtime/components/LibPalette/LibPalette.vue +3 -3
  106. package/src/runtime/components/LibPopup/LibPopup.vue +2 -2
  107. package/src/runtime/components/LibProgressBar/LibProgressBar.vue +2 -2
  108. package/src/runtime/components/LibRecorder/LibRecorder.vue +3 -3
  109. package/src/runtime/components/LibRoot/LibRoot.vue +3 -2
  110. package/src/runtime/components/LibSimpleInput/LibSimpleInput.vue +2 -2
  111. package/src/runtime/components/LibSuggestions/LibSuggestions.vue +2 -2
  112. package/src/runtime/components/LibTable/LibTable.vue +1 -1
  113. package/src/runtime/components/Template/NAME.vue +2 -2
  114. package/src/runtime/components/shared/props.ts +8 -12
  115. package/src/runtime/composables/useAccesibilityOutline.ts +1 -1
  116. package/src/runtime/composables/useDivideAttrs.ts +1 -1
  117. package/src/runtime/composables/useSuggestions.ts +4 -4
  118. package/src/runtime/directives/vDetectFlex.ts +4 -4
  119. package/src/runtime/directives/vExtractRootEl.ts +1 -1
  120. package/src/runtime/directives/vResizableCols.ts +5 -5
  121. package/src/runtime/helpers/NotificationHandler.ts +6 -6
  122. package/src/runtime/nuxt/plugins/vue-plugin.ts +1 -1
  123. package/src/runtime/tailwind/themeConvertionOpts.ts +1 -1
  124. package/src/runtime/theme.ts +2 -2
  125. package/src/runtime/utils/notifyIfError.ts +1 -1
  126. package/src/runtime/vue/registerComponents.ts +1 -1
  127. package/dist/module.cjs +0 -5
  128. package/dist/module.d.ts +0 -36
  129. package/dist/runtime/components/Focus.stories.d.ts +0 -11
  130. package/dist/runtime/components/Focus.stories.js +0 -53
  131. package/dist/runtime/components/LibButton/LibButton.stories.d.ts +0 -12
  132. package/dist/runtime/components/LibButton/LibButton.stories.js +0 -94
  133. package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.d.ts +0 -14
  134. package/dist/runtime/components/LibCheckbox/LibCheckbox.stories.js +0 -29
  135. package/dist/runtime/components/LibColorInput/LibColorInput.stories.d.ts +0 -7
  136. package/dist/runtime/components/LibColorInput/LibColorInput.stories.js +0 -58
  137. package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.d.ts +0 -9
  138. package/dist/runtime/components/LibColorPicker/LibColorPicker.stories.js +0 -68
  139. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.d.ts +0 -7
  140. package/dist/runtime/components/LibDarkModeSwitcher/LibDarkModeSwitcher.stories.js +0 -36
  141. package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.d.ts +0 -11
  142. package/dist/runtime/components/LibDatePicker/LibDatePicker.stories.js +0 -98
  143. package/dist/runtime/components/LibDebug/LibDebug.stories.d.ts +0 -9
  144. package/dist/runtime/components/LibDebug/LibDebug.stories.js +0 -46
  145. package/dist/runtime/components/LibFileInput/LibFileInput.stories.d.ts +0 -10
  146. package/dist/runtime/components/LibFileInput/LibFileInput.stories.js +0 -63
  147. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.d.ts +0 -33
  148. package/dist/runtime/components/LibInputDeprecated/LibInputDeprecated.stories.js +0 -384
  149. package/dist/runtime/components/LibLabel/LibLabel.stories.d.ts +0 -6
  150. package/dist/runtime/components/LibLabel/LibLabel.stories.js +0 -25
  151. package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.d.ts +0 -23
  152. package/dist/runtime/components/LibMultiValues/LibMultiValues.stories.js +0 -61
  153. package/dist/runtime/components/LibNotifications/LibNotification.stories.d.ts +0 -15
  154. package/dist/runtime/components/LibNotifications/LibNotification.stories.js +0 -126
  155. package/dist/runtime/components/LibNotifications/LibNotifications.stories.d.ts +0 -6
  156. package/dist/runtime/components/LibNotifications/LibNotifications.stories.js +0 -109
  157. package/dist/runtime/components/LibPagination/LibPagination.stories.d.ts +0 -6
  158. package/dist/runtime/components/LibPagination/LibPagination.stories.js +0 -40
  159. package/dist/runtime/components/LibPalette/LibPalette.stories.d.ts +0 -6
  160. package/dist/runtime/components/LibPalette/LibPalette.stories.js +0 -20
  161. package/dist/runtime/components/LibPopup/LibPopup.stories.d.ts +0 -14
  162. package/dist/runtime/components/LibPopup/LibPopup.stories.js +0 -147
  163. package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.d.ts +0 -10
  164. package/dist/runtime/components/LibProgressBar/LibProgressBar.stories.js +0 -81
  165. package/dist/runtime/components/LibRecorder/LibRecorder.stories.d.ts +0 -19
  166. package/dist/runtime/components/LibRecorder/LibRecorder.stories.js +0 -63
  167. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.d.ts +0 -26
  168. package/dist/runtime/components/LibSimpleInput/LibSimpleInput.stories.js +0 -78
  169. package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.d.ts +0 -27
  170. package/dist/runtime/components/LibSuggestions/LibSuggestions.stories.js +0 -112
  171. package/dist/runtime/components/LibTable/LibTable.stories.d.ts +0 -16
  172. package/dist/runtime/components/LibTable/LibTable.stories.js +0 -156
  173. package/dist/runtime/components/Reset.stories.d.ts +0 -5
  174. package/dist/runtime/components/Reset.stories.js +0 -19
  175. package/dist/runtime/components/Scrolling.stories.d.ts +0 -6
  176. package/dist/runtime/components/Scrolling.stories.js +0 -44
  177. package/dist/runtime/composables/useScrollNearContainerEdges.stories.d.ts +0 -7
  178. package/dist/runtime/composables/useScrollNearContainerEdges.stories.js +0 -85
  179. package/dist/types.d.ts +0 -7
@@ -2,9 +2,10 @@
2
2
  <lib-popup
3
3
  class="color-input--popup"
4
4
  v-model="showPopup"
5
- @close="$tempValue = undefined;emit('cancel')"
5
+ @close="$tempValue = void 0;
6
+ emit('cancel')"
6
7
  >
7
- <template #button="{extractEl}">
8
+ <template #button="{ extractEl }">
8
9
  <!-- <div -->
9
10
  <!-- class=" -->
10
11
  <!-- flex -->
@@ -17,7 +18,8 @@
17
18
  <!-- -->
18
19
  <lib-button
19
20
  :id="id ?? fallbackId"
20
- :class="twMerge(`
21
+ :class="twMerge(
22
+ `
21
23
  p-0
22
24
  color-input--button
23
25
  flex flex-nowrap
@@ -27,11 +29,11 @@
27
29
  [&_.button--label]:gap-0
28
30
  after:hidden
29
31
  `,
30
- ($attrs as any).class
31
- )"
32
+ $attrs.class
33
+ )"
32
34
  :aria-label="t('color-input.aria-and-title-prefix') + stringColor"
33
35
  :title="t('color-input.aria-and-title-prefix') + stringColor"
34
- v-bind="{...$attrs, class: undefined}"
36
+ v-bind="{ ...$attrs, class: void 0 }"
35
37
  v-extract-root-el="extractEl"
36
38
  @click="togglePopup"
37
39
  >
@@ -42,14 +44,14 @@
42
44
  w-full
43
45
  "
44
46
  >
45
- <slot v-bind="{stringColor, classes:swatchClasses}">
47
+ <slot v-bind="{ stringColor, classes: swatchClasses }">
46
48
  <div :class="swatchClasses"
47
49
  :style="`background:${stringColor}`"
48
50
  />
49
51
  </slot>
50
52
  <slot
51
53
  v-if="$tempValue"
52
- v-bind="{tempStringColor, classes:swatchClasses}"
54
+ v-bind="{ tempStringColor, classes: swatchClasses }"
53
55
  name="temp"
54
56
  >
55
57
  <div :class="swatchClasses"
@@ -60,7 +62,7 @@
60
62
  </template>
61
63
  </lib-button>
62
64
  </template>
63
- <template #popup="{extractEl}">
65
+ <template #popup="{ extractEl }">
64
66
  <div class="color-input--popup-wrapper p-5" v-extract-root-el="extractEl">
65
67
  <lib-color-picker v-if="showPopup"
66
68
  :id="id ?? fallbackId"
@@ -77,24 +79,19 @@
77
79
  </lib-popup>
78
80
  </template>
79
81
 
80
- <script setup lang="ts">
81
- import Color from "colorjs.io"
82
- import { type ButtonHTMLAttributes,computed, type PropType, ref, useAttrs } from "vue"
83
-
84
- import { useInjectedI18n } from "../../composables/useInjectedI18n.js"
85
- import { vExtractRootEl } from "../../directives/vExtractRootEl.js"
86
- import type { HsvaColor, RgbaColor } from "../../types/index.js"
87
- import { twMerge } from "../../utils/twMerge.js"
88
- import LibButton from "../LibButton/LibButton.vue"
89
- import LibColorPicker from "../LibColorPicker/LibColorPicker.vue"
90
- import LibPopup from "../LibPopup/LibPopup.vue"
91
- import { getFallbackId, type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js"
92
-
93
-
82
+ <script setup>
83
+ import Color from "colorjs.io";
84
+ import { computed, ref, useAttrs } from "vue";
85
+ import { useInjectedI18n } from "../../composables/useInjectedI18n.js";
86
+ import { vExtractRootEl } from "../../directives/vExtractRootEl.js";
87
+ import { twMerge } from "../../utils/twMerge.js";
88
+ import LibButton from "../LibButton/LibButton.vue";
89
+ import LibColorPicker from "../LibColorPicker/LibColorPicker.vue";
90
+ import LibPopup from "../LibPopup/LibPopup.vue";
91
+ import { getFallbackId } from "../shared/props.js";
94
92
  defineOptions({
95
- name: "lib-color-input",
96
- })
97
-
93
+ name: "lib-color-input"
94
+ });
98
95
  const swatchClasses = `
99
96
  color-input--swatch
100
97
  after:content-vertical-holder
@@ -106,94 +103,53 @@ const swatchClasses = `
106
103
  before:inset-0
107
104
  before:bg-transparency-squares
108
105
  before:z-[-1]
109
- `
110
-
111
- const fallbackId = getFallbackId()
112
-
113
- const t = useInjectedI18n()
114
- const props = withDefaults(defineProps<Props>(), {
115
- allowAlpha: true,
116
- border: true,
117
- copyTransform: (_val: HsvaColor, stringVal: string) => stringVal,
118
- stringPrecision: 3,
119
- customRepresentation: undefined,
120
- })
121
- const emit = defineEmits<{
122
- (e: "save"): void
123
- (e: "cancel"): void
124
- }>()
125
-
126
-
106
+ `;
107
+ const fallbackId = getFallbackId();
108
+ const t = useInjectedI18n();
109
+ const props = defineProps({
110
+ label: { type: String, required: false },
111
+ id: { type: String, required: false },
112
+ allowAlpha: { type: Boolean, required: false, default: true },
113
+ border: { type: Boolean, required: false, default: true },
114
+ copyTransform: { type: Function, required: false, default: (_val, stringVal) => stringVal },
115
+ stringPrecision: { type: Number, required: false, default: 3 },
116
+ customRepresentation: { type: Object, required: false, default: void 0 }
117
+ });
118
+ const emit = defineEmits(["save", "cancel"]);
127
119
  function save() {
128
- $value.value = internalTempValue.value
129
- showPopup.value = false
130
- $tempValue.value = undefined
131
- emit("save")
120
+ $value.value = internalTempValue.value;
121
+ showPopup.value = false;
122
+ $tempValue.value = void 0;
123
+ emit("save");
132
124
  }
133
125
  function cancel() {
134
- showPopup.value = false
135
- $tempValue.value = undefined
136
- emit("cancel")
126
+ showPopup.value = false;
127
+ $tempValue.value = void 0;
128
+ emit("cancel");
137
129
  }
138
-
139
- const $attrs = useAttrs()
140
-
141
- const $value = defineModel<RgbaColor>({ required: false, default: () => ({ r: 0, g: 0, b: 0 }) })
142
- const $tempValue = defineModel<RgbaColor | undefined>("tempValue", { required: false, default: () => (undefined) })
143
-
130
+ const $attrs = useAttrs();
131
+ const $value = defineModel({ type: Object, ...{ required: false, default: () => ({ r: 0, g: 0, b: 0 }) } });
132
+ const $tempValue = defineModel("tempValue", { type: null, ...{ required: false, default: () => void 0 } });
144
133
  const stringColor = computed(() => new Color("srgb", [
145
- $value.value.r / 255,
146
- $value.value.g / 255,
147
- $value.value.b / 255,
148
- ], $value.value.a ?? 1,).toString())
149
-
134
+ $value.value.r / 255,
135
+ $value.value.g / 255,
136
+ $value.value.b / 255
137
+ ], $value.value.a ?? 1).toString());
150
138
  const tempStringColor = computed(() => $tempValue.value ? new Color("srgb", [
151
- $tempValue.value.r / 255,
152
- $tempValue.value.g / 255,
153
- $tempValue.value.b / 255,
154
- ], $tempValue.value.a ?? 1,).toString() : "")
155
-
156
- const internalTempValue = ref({ ...$value.value })
157
-
158
- const showPopup = ref(false)
159
-
160
-
161
- const togglePopup = (): void => {
162
- if (showPopup.value) {
163
- $value.value = internalTempValue.value
164
- }
165
- showPopup.value = !showPopup.value
166
- }
167
-
139
+ $tempValue.value.r / 255,
140
+ $tempValue.value.g / 255,
141
+ $tempValue.value.b / 255
142
+ ], $tempValue.value.a ?? 1).toString() : "");
143
+ const internalTempValue = ref({ ...$value.value });
144
+ const showPopup = ref(false);
145
+ const togglePopup = () => {
146
+ if (showPopup.value) {
147
+ $value.value = internalTempValue.value;
148
+ }
149
+ showPopup.value = !showPopup.value;
150
+ };
168
151
  </script>
169
152
 
170
- <script lang="ts">
153
+ <script>
171
154
 
172
- type RealProps =
173
- & LabelProps
174
- & LinkableByIdProps
175
- & {
176
- allowAlpha?: boolean
177
- border?: boolean
178
- /** See ColorPicker.copyTransform */
179
- copyTransform?: (val: HsvaColor, stringVal: string) => any
180
- /** See ColorPicker.allowAlpha */
181
- stringPrecision?: number
182
- /** See ColorPicker.customRepresentation */
183
- customRepresentation?: {
184
- fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string
185
- }
186
- }
187
- interface Props
188
- extends
189
- /** @vue-ignore */
190
- Partial<Omit<ButtonHTMLAttributes,"class">
191
- & TailwindClassProp
192
- & {
193
- // why is this not already a part of button?
194
- "aria-label": string
195
- }>,
196
- RealProps
197
- {}
198
155
  </script>
199
-
@@ -0,0 +1,63 @@
1
+ import { type ButtonHTMLAttributes } from "vue";
2
+ import type { HsvaColor, RgbaColor } from "../../types/index.js.js";
3
+ import { type LabelProps, type LinkableByIdProps, type TailwindClassProp } from "../shared/props.js.js";
4
+ type RealProps = LabelProps & LinkableByIdProps & {
5
+ allowAlpha?: boolean;
6
+ border?: boolean;
7
+ /** See ColorPicker.copyTransform */
8
+ copyTransform?: (val: HsvaColor, stringVal: string) => any;
9
+ /** See ColorPicker.allowAlpha */
10
+ stringPrecision?: number;
11
+ /** See ColorPicker.customRepresentation */
12
+ customRepresentation?: {
13
+ fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
14
+ };
15
+ };
16
+ interface Props extends
17
+ /** @vue-ignore */
18
+ Partial<Omit<ButtonHTMLAttributes, "class"> & TailwindClassProp & {
19
+ "aria-label": string;
20
+ }>, RealProps {
21
+ }
22
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<Props & {
23
+ modelValue?: RgbaColor;
24
+ tempValue?: RgbaColor | undefined;
25
+ }, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:modelValue": (value: RgbaColor) => any;
27
+ "update:tempValue": (value: RgbaColor | undefined) => any;
28
+ } & {
29
+ cancel: () => any;
30
+ save: () => any;
31
+ }, string, import("vue").PublicProps, Readonly<Props & {
32
+ modelValue?: RgbaColor;
33
+ tempValue?: RgbaColor | undefined;
34
+ }> & Readonly<{
35
+ "onUpdate:modelValue"?: ((value: RgbaColor) => any) | undefined;
36
+ onCancel?: (() => any) | undefined;
37
+ onSave?: (() => any) | undefined;
38
+ "onUpdate:tempValue"?: ((value: RgbaColor | undefined) => any) | undefined;
39
+ }>, {
40
+ border: boolean;
41
+ allowAlpha: boolean;
42
+ stringPrecision: number;
43
+ customRepresentation: {
44
+ fromHsvaToString: (hsva: HsvaColor, includeAlpha: boolean) => string;
45
+ };
46
+ copyTransform: (val: HsvaColor, stringVal: string) => any;
47
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
48
+ default?: (props: {
49
+ stringColor: any;
50
+ classes: any;
51
+ }) => any;
52
+ } & {
53
+ temp?: (props: {
54
+ tempStringColor: any;
55
+ classes: any;
56
+ }) => any;
57
+ }>;
58
+ export default _default;
59
+ type __VLS_WithSlots<T, S> = T & {
60
+ new (): {
61
+ $slots: S;
62
+ };
63
+ };