@coffic/cosy-ui 0.9.23 → 0.9.24

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.
@@ -58,7 +58,6 @@ export * from './src-astro/types/article';
58
58
  export * from './src-astro/types/footer';
59
59
  export * from './src-astro/types/header';
60
60
  export * from './src-astro/types/heading';
61
- export * from './src-astro/types/layout';
62
61
  export * from './src-astro/types/main';
63
62
  export * from './src-astro/types/nav';
64
63
  export * from './src-astro/types/product';
@@ -233,7 +233,6 @@ const debugClasses = debug
233
233
  ---
234
234
 
235
235
  <footer
236
- transition:persist
237
236
  class:list={[
238
237
  'cosy:footer cosy:z-50 cosy:sm:footer-horizontal cosy:bg-base-200 cosy:text-base-content cosy:p-10',
239
238
  debugClasses.footer,
@@ -3,3 +3,4 @@ import BaseLayout from './BaseLayout.astro';
3
3
  export { BaseLayout };
4
4
 
5
5
  export type { IMetaProps } from './meta';
6
+ export type { IAppLayoutProps } from './layout';
@@ -1,8 +1,8 @@
1
- import type { IFooterProps } from './footer';
2
- import type { IHeaderProps } from './header';
3
- import type { IMainContentProps } from './main';
4
- import type { IMetaProps } from '../layout-basic/meta';
5
- import type { ISidebarProps } from './sidebar';
1
+ import type { IFooterProps } from '../types/footer';
2
+ import type { IHeaderProps } from '../types/header';
3
+ import type { IMainContentProps } from '../types/main';
4
+ import type { IMetaProps } from './meta';
5
+ import type { ISidebarProps } from '../types/sidebar';
6
6
 
7
7
  export interface IAppLayoutProps {
8
8
  /**
@@ -108,6 +108,16 @@ const { id, title = '', class: className = '' } = Astro.props;
108
108
  if (trigger) {
109
109
  console.log('Modal: 触发模态框', id);
110
110
  modal.showModal();
111
+
112
+ // 在modal显示后自动focus到第一个input元素
113
+ setTimeout(() => {
114
+ const firstInput = modal.querySelector(
115
+ 'input, textarea, select, [contenteditable="true"]'
116
+ );
117
+ if (firstInput) {
118
+ firstInput.focus();
119
+ }
120
+ }, 100); // 延迟100ms确保modal完全显示
111
121
  }
112
122
  };
113
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffic/cosy-ui",
3
- "version": "0.9.23",
3
+ "version": "0.9.24",
4
4
  "description": "An astro component library",
5
5
  "author": {
6
6
  "name": "nookery",