@saasmakers/ui 2.0.40 → 2.0.42

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.
@@ -181,6 +181,7 @@ defineExpose({
181
181
  :id="id"
182
182
  ref="input"
183
183
  :autocomplete="autocomplete ? 'on' : 'off'"
184
+ v-bind="autofocus ? { 'data-autofocus': '' } : {}"
184
185
  class="h-full w-full appearance-none items-center rounded-lg font-medium tracking-tight outline-none placeholder-gray-600 dark:placeholder-gray-400"
185
186
  :class="{
186
187
  'uppercase': uppercase,
@@ -75,8 +75,12 @@ export default function useDialog(
75
75
 
76
76
  if (panelRef.value) {
77
77
  const focusableElements = getFocusableElements(panelRef.value)
78
+ const autofocusTarget = panelRef.value.querySelector<HTMLElement>('[data-autofocus]')
78
79
 
79
- if (focusableElements.length > 0) {
80
+ if (autofocusTarget) {
81
+ autofocusTarget.focus()
82
+ }
83
+ else if (focusableElements.length > 0) {
80
84
  focusableElements[0].focus()
81
85
  }
82
86
  else {
@@ -43,6 +43,7 @@ export default function useToast() {
43
43
  status: params.status,
44
44
  text,
45
45
  })
46
+
46
47
  const existingToast = toasts.value.find(item => getFingerprint({
47
48
  actionLabel: item.action?.label,
48
49
  emoji: item.emoji,
package/nuxt.config.ts CHANGED
@@ -145,5 +145,12 @@ export default defineNuxtConfig({
145
145
  rules: uno.rules,
146
146
  shortcuts: uno.shortcuts,
147
147
  theme: uno.theme,
148
+ content: {
149
+ // Force consumers to scan layer classes even when resolved from node_modules,
150
+ // otherwise transition utilities used only here are purged during their prod build.
151
+ filesystem: [
152
+ path.join(currentDir, 'app/**/*.{vue,ts}'),
153
+ ],
154
+ },
148
155
  },
149
156
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saasmakers/ui",
3
- "version": "2.0.40",
3
+ "version": "2.0.42",
4
4
  "private": false,
5
5
  "description": "Reusable Nuxt UI components for SaaS Makers projects",
6
6
  "license": "MIT",