neko-ui 2.12.5 → 2.13.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.
- package/es/index.d.ts +7 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/marquee/index.d.ts +23 -0
- package/es/marquee/index.js +1 -0
- package/es/marquee/index.js.map +1 -0
- package/es/marquee/style.d.ts +1 -0
- package/es/marquee/style.js +54 -0
- package/es/marquee/style.js.map +1 -0
- package/lib/index.d.ts +7 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/marquee/index.d.ts +23 -0
- package/lib/marquee/index.js +1 -0
- package/lib/marquee/index.js.map +1 -0
- package/lib/marquee/style.d.ts +1 -0
- package/lib/marquee/style.js +54 -0
- package/lib/marquee/style.js.map +1 -0
- package/package.json +1 -1
- package/umd/index.js +63 -10
- package/umd/manifest.json +1 -1
package/es/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { default as icon, type IconAttribute } from './icon';
|
|
|
23
23
|
export { default as Img, type ImgElement, type ImgProps } from './img';
|
|
24
24
|
export { default as Input, type InputElement, type InputProps } from './input';
|
|
25
25
|
export { default as InputNumber, type InputNumberElement, type InputNumberProps, } from './input-number';
|
|
26
|
+
export { default as Marquee, type MarqueeElement, type MarqueeProps } from './marquee';
|
|
26
27
|
export { default as Md, type MdElement, type MdProps } from './md';
|
|
27
28
|
export { default as mdStyle } from './md-style';
|
|
28
29
|
export { default as Menu, type MenuElement, type MenuMultipleElement, type MenuMultipleProps, type MenuOption, type MenuProps, } from './menu';
|
|
@@ -49,7 +50,7 @@ export type { CustomElement } from 'custom-element-type';
|
|
|
49
50
|
export { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';
|
|
50
51
|
import type { ICustomElement, Transform } from 'custom-element-type';
|
|
51
52
|
export { registry } from './utils';
|
|
52
|
-
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, CollapseElement, ColorPaletteElement, ColorPickerElement, CronElement, DatePickerElement, DropdownElement, DropdownMultipleElement, EmptyElement, GlassPanelElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MdElement, MenuElement, MenuMultipleElement, ModalElement, PaginationElement, PopoverElement, ProviderElement, QrCodeElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TableElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from '.';
|
|
53
|
+
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, CollapseElement, ColorPaletteElement, ColorPickerElement, CronElement, DatePickerElement, DropdownElement, DropdownMultipleElement, EmptyElement, GlassPanelElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MarqueeElement, MdElement, MenuElement, MenuMultipleElement, ModalElement, PaginationElement, PopoverElement, ProviderElement, QrCodeElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TableElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from '.';
|
|
53
54
|
/** 组件列表
|
|
54
55
|
* @author monako97
|
|
55
56
|
* @ignore optional
|
|
@@ -150,6 +151,11 @@ interface CustomElementTags {
|
|
|
150
151
|
* @since 2.12.0
|
|
151
152
|
*/
|
|
152
153
|
'n-glass-panel': GlassPanelElement;
|
|
154
|
+
/**
|
|
155
|
+
* 跑马灯
|
|
156
|
+
* @since 2.13.0
|
|
157
|
+
*/
|
|
158
|
+
'n-marquee': MarqueeElement;
|
|
153
159
|
}
|
|
154
160
|
type IntrinsicNekoElement = Transform<CustomElementTags>;
|
|
155
161
|
declare module 'solid-js' {
|
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as Avatar}from"./avatar";export{default as AvatarGroup}from"./avatar/group";export{default as BackTop}from"./back-top";export{FieldName,Size,Status}from"./basic-config";export{default as Button}from"./button";export{default as CaptureScreen}from"./capture-screen";export{default as Carousel}from"./carousel";export{default as Checkbox}from"./checkbox";export{default as Code}from"./code";export{default as Collapse}from"./collapse";export{default as ColorPalette}from"./color-palette";export{default as ColorPicker}from"./color-picker";export{default as Cron}from"./cron";export{default as DatePicker}from"./date-picker";export{default as dayjs}from"./date-picker/dayjs";export{default as Dropdown}from"./dropdown";export{default as Empty}from"./empty";export{default as fromSchema}from"./from-schema";export{default as getOptions}from"./get-options";export{default as GlassPanel}from"./glass-panel";export{default as HighlightText}from"./highlight-text";export{default as icon}from"./icon";export{default as Img}from"./img";export{default as Input}from"./input";export{default as InputNumber}from"./input-number";export{default as Md}from"./md";export{default as mdStyle}from"./md-style";export{default as Menu}from"./menu";export{default as Modal,OpenState}from"./modal";export{default as notification}from"./notification";export{default as Pagination}from"./pagination";export{default as Popover}from"./popover";export{default as Prism}from"./prism";export{default as Provider}from"./provider";export{default as QrCode}from"./qrcode";export{default as Radio}from"./radio";export{default as Segmented}from"./segmented";export{default as Select}from"./select";export{default as Skeleton}from"./skeleton";export{default as Spin}from"./spin";export{default as Switch}from"./switch";export{default as Table}from"./table";export{default as Tabs}from"./tabs";export{default as Tag}from"./tag";export{generateColor,default as theme,toneColor}from"./theme";export{default as Tree}from"./tree";export{default as Typography}from"./typography";export{customElement,getCurrentElement,hot,noShadowDOM,withSolid}from"solid-element";export{registry}from"./utils";
|
|
1
|
+
export{default as Avatar}from"./avatar";export{default as AvatarGroup}from"./avatar/group";export{default as BackTop}from"./back-top";export{FieldName,Size,Status}from"./basic-config";export{default as Button}from"./button";export{default as CaptureScreen}from"./capture-screen";export{default as Carousel}from"./carousel";export{default as Checkbox}from"./checkbox";export{default as Code}from"./code";export{default as Collapse}from"./collapse";export{default as ColorPalette}from"./color-palette";export{default as ColorPicker}from"./color-picker";export{default as Cron}from"./cron";export{default as DatePicker}from"./date-picker";export{default as dayjs}from"./date-picker/dayjs";export{default as Dropdown}from"./dropdown";export{default as Empty}from"./empty";export{default as fromSchema}from"./from-schema";export{default as getOptions}from"./get-options";export{default as GlassPanel}from"./glass-panel";export{default as HighlightText}from"./highlight-text";export{default as icon}from"./icon";export{default as Img}from"./img";export{default as Input}from"./input";export{default as InputNumber}from"./input-number";export{default as Marquee}from"./marquee";export{default as Md}from"./md";export{default as mdStyle}from"./md-style";export{default as Menu}from"./menu";export{default as Modal,OpenState}from"./modal";export{default as notification}from"./notification";export{default as Pagination}from"./pagination";export{default as Popover}from"./popover";export{default as Prism}from"./prism";export{default as Provider}from"./provider";export{default as QrCode}from"./qrcode";export{default as Radio}from"./radio";export{default as Segmented}from"./segmented";export{default as Select}from"./select";export{default as Skeleton}from"./skeleton";export{default as Spin}from"./spin";export{default as Switch}from"./switch";export{default as Table}from"./table";export{default as Tabs}from"./tabs";export{default as Tag}from"./tag";export{generateColor,default as theme,toneColor}from"./theme";export{default as Tree}from"./tree";export{default as Typography}from"./typography";export{customElement,getCurrentElement,hot,noShadowDOM,withSolid}from"solid-element";export{registry}from"./utils";
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/index.ts"],"sourcesContent":["'use client';\n\nexport { default as Avatar, type AvatarElement, type AvatarProps } from './avatar';\nexport {\n default as AvatarGroup,\n type AvatarGroupElement,\n type AvatarGroupProps,\n} from './avatar/group';\nexport { default as BackTop, type BackTopElement, type BackTopProps } from './back-top';\nexport { type BaseOption, type BasicConfig, FieldName, Size, Status } from './basic-config';\nexport { default as Button, type ButtonElement, type ButtonProps } from './button';\nexport {\n default as CaptureScreen,\n type CaptureScreenElement,\n type CaptureScreenProps,\n} from './capture-screen';\nexport { default as Carousel, type CarouselElement, type CarouselProps } from './carousel';\nexport {\n default as Checkbox,\n type CheckboxBoolElement,\n type CheckboxBoolProps,\n type CheckboxGroupElement,\n type CheckboxGroupProps,\n} from './checkbox';\nexport { default as Code, type CodeElement, type CodeProps, type Language } from './code';\nexport { default as Collapse, type CollapseElement, type CollapseProps } from './collapse';\nexport {\n default as ColorPalette,\n type ColorPaletteElement,\n type ColorPaletteProps,\n} from './color-palette';\nexport {\n default as ColorPicker,\n type ColorPickerElement,\n type ColorPickerProps,\n} from './color-picker';\nexport { default as Cron, type CronElement, type CronProps } from './cron';\nexport { default as DatePicker, type DatePickerElement, type DatePickerProps } from './date-picker';\nexport { default as dayjs } from './date-picker/dayjs';\nexport {\n default as Dropdown,\n type DropdownElement,\n type DropdownMultipleElement,\n type DropdownMultipleProps,\n type DropdownProps,\n} from './dropdown';\nexport { default as Empty, type EmptyElement, type EmptyProps } from './empty';\nexport { default as fromSchema } from './from-schema';\nexport { default as getOptions } from './get-options';\nexport { default as GlassPanel, type GlassPanelElement, type GlassPanelProps } from './glass-panel';\nexport {\n default as HighlightText,\n type HighlightTextElement,\n type HighlightTextProps,\n} from './highlight-text';\nexport { default as icon, type IconAttribute } from './icon';\nexport { default as Img, type ImgElement, type ImgProps } from './img';\nexport { default as Input, type InputElement, type InputProps } from './input';\nexport {\n default as InputNumber,\n type InputNumberElement,\n type InputNumberProps,\n} from './input-number';\nexport { default as Md, type MdElement, type MdProps } from './md';\nexport { default as mdStyle } from './md-style';\nexport {\n default as Menu,\n type MenuElement,\n type MenuMultipleElement,\n type MenuMultipleProps,\n type MenuOption,\n type MenuProps,\n} from './menu';\nexport {\n default as Modal,\n type ModalElement,\n type ModalProps,\n OpenState,\n type OpenStateKey,\n} from './modal';\nexport {\n default as notification,\n type NotificationProps,\n type NotificationType,\n} from './notification';\nexport { default as Pagination, type PaginationElement, type PaginationProps } from './pagination';\nexport { default as Popover, type PopoverElement, type PopoverProps } from './popover';\nexport { default as Prism } from './prism';\nexport { default as Provider, type ProviderElement, type ProviderProps } from './provider';\nexport { type IntRange, default as QrCode, type QrCodeElement, type QrCodeProps } from './qrcode';\nexport { default as Radio, type RadioElement, type RadioOption, type RadioProps } from './radio';\nexport { default as Segmented, type SegmentedElement, type SegmentedProps } from './segmented';\nexport {\n default as Select,\n type SelectElement,\n type SelectMultipleElement,\n type SelectMultipleProps,\n type SelectProps,\n} from './select';\nexport { default as Skeleton, type SkeletonElement, type SkeletonProps } from './skeleton';\nexport { default as Spin, type SpinElement, type SpinProps } from './spin';\nexport { default as Switch, type SwitchElement, type SwitchProps } from './switch';\nexport { default as Table, type TableElement, type TableProps } from './table';\nexport { type TabOption, default as Tabs, type TabsElement, type TabsProps } from './tabs';\nexport { default as Tag, type TagElement, type TagProps } from './tag';\nexport {\n type ColorScheme,\n generateColor,\n default as theme,\n type ThemeOption,\n toneColor,\n} from './theme';\nexport {\n default as Tree,\n type TreeData,\n type TreeElement,\n type TreeMultipleElement,\n type TreeMultipleProps,\n type TreeMultipleSchemaElement,\n type TreeMultipleSchemaProps,\n type TreeMultipleStringElement,\n type TreeMultipleStringProps,\n type TreeProps,\n type TreeSchemaElement,\n type TreeSchemaProps,\n type TreeStringElement,\n type TreeStringProps,\n} from './tree';\nexport { default as Typography, type TypographyElement, type TypographyProps } from './typography';\nexport type { CustomElement } from 'custom-element-type';\nexport { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';\nimport type { ICustomElement, Transform } from 'custom-element-type';\nexport { registry } from './utils';\n\nimport type {\n AvatarElement,\n AvatarGroupElement,\n BackTopElement,\n ButtonElement,\n CaptureScreenElement,\n CarouselElement,\n CheckboxBoolElement,\n CheckboxGroupElement,\n CodeElement,\n CollapseElement,\n ColorPaletteElement,\n ColorPickerElement,\n CronElement,\n DatePickerElement,\n DropdownElement,\n DropdownMultipleElement,\n EmptyElement,\n GlassPanelElement,\n HighlightTextElement,\n ImgElement,\n InputElement,\n InputNumberElement,\n MdElement,\n MenuElement,\n MenuMultipleElement,\n ModalElement,\n PaginationElement,\n PopoverElement,\n ProviderElement,\n QrCodeElement,\n RadioElement,\n SegmentedElement,\n SelectElement,\n SelectMultipleElement,\n SkeletonElement,\n SpinElement,\n SwitchElement,\n TableElement,\n TabsElement,\n TagElement,\n TreeElement,\n TreeMultipleElement,\n TreeMultipleSchemaElement,\n TreeMultipleStringElement,\n TreeSchemaElement,\n TreeStringElement,\n TypographyElement,\n} from '.';\n\n/** 组件列表\n * @author monako97\n * @ignore optional\n */\ninterface CustomElementTags {\n /** 头像 */\n 'n-avatar': AvatarElement;\n /** 头像组 */\n 'n-avatar-group': AvatarGroupElement;\n /** 返回顶部 */\n 'n-back-top': BackTopElement;\n /** 按钮 */\n 'n-button': ButtonElement;\n /** 捕获屏幕 */\n 'n-capture-screen': CaptureScreenElement;\n /** 走马灯、轮播 */\n 'n-carousel': CarouselElement;\n /** 复选框 */\n 'n-checkbox': CheckboxBoolElement | CheckboxGroupElement;\n /** 代码框 */\n 'n-code': CodeElement;\n /** 取色器 */\n 'n-color-palette': ColorPaletteElement;\n /** 取色器(弹出类型) */\n 'n-color-picker': ColorPickerElement;\n /** 下拉面板 */\n 'n-dropdown': DropdownElement | DropdownMultipleElement;\n /** 空面板 */\n 'n-empty': EmptyElement;\n /** 匹配高亮文字 */\n 'n-highlight-text': HighlightTextElement;\n /** 图片查看器 */\n 'n-img': ImgElement;\n /** 输入框 */\n 'n-input': InputElement;\n /** 数字输入框 */\n 'n-input-number': InputNumberElement;\n /** Markdown渲染 */\n 'n-md': MdElement;\n /** 弹出气泡面板 */\n 'n-popover': PopoverElement;\n /** 单选项 */\n 'n-radio': RadioElement;\n /** 分段控制器 */\n 'n-segmented': SegmentedElement;\n /** 下拉选择框 */\n 'n-select': SelectElement | SelectMultipleElement;\n /** 骨架屏 */\n 'n-skeleton': SkeletonElement;\n /** 加载中 */\n 'n-spin': SpinElement;\n /** 开关 */\n 'n-switch': SwitchElement;\n /** 树形渲染 */\n 'n-tree':\n | TreeElement\n | TreeStringElement\n | TreeSchemaElement\n | TreeMultipleElement\n | TreeMultipleStringElement\n | TreeMultipleSchemaElement;\n /** 文字排版 */\n 'n-typography': TypographyElement;\n /** 标签页 */\n 'n-tabs': TabsElement;\n /** 标签 */\n 'n-tag': TagElement;\n /** 导航菜单 */\n 'n-menu': MenuElement | MenuMultipleElement;\n /** Cron表达式编辑器 */\n 'n-cron': CronElement;\n /** 日期选择器\n * @since 2.1.0\n */\n 'n-data-picker': DatePickerElement;\n /** 数据表格\n * @since 2.2.0\n */\n 'n-table': TableElement;\n /** 分页器\n * @since 2.2.0\n */\n 'n-pagination': PaginationElement;\n /** 响应内部变化\n * @since 2.3.0\n */\n 'n-provider': ProviderElement;\n /** 模态框\n * @since 2.6.0\n */\n 'n-modal': ModalElement;\n /**\n * 二维码\n * @since 2.9.0\n */\n 'n-qrcode': QrCodeElement;\n /**\n * 折叠面板\n * @since 2.10.0\n */\n 'n-collapse': CollapseElement;\n /**\n * 玻璃面板\n * @since 2.12.0\n */\n 'n-glass-panel': GlassPanelElement;\n}\ntype IntrinsicNekoElement = Transform<CustomElementTags>;\n\ndeclare module 'solid-js' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\ndeclare module 'react' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\n\nexport interface ComponentOptions<T> {\n element: T & ICustomElement;\n}\n"],"names":["default","Avatar","AvatarGroup","BackTop","FieldName","Size","Status","Button","CaptureScreen","Carousel","Checkbox","Code","Collapse","ColorPalette","ColorPicker","Cron","DatePicker","dayjs","Dropdown","Empty","fromSchema","getOptions","GlassPanel","HighlightText","icon","Img","Input","InputNumber","Md","mdStyle","Menu","Modal","OpenState","notification","Pagination","Popover","Prism","Provider","QrCode","Radio","Segmented","Select","Skeleton","Spin","Switch","Table","Tabs","Tag","generateColor","theme","toneColor","Tree","Typography","customElement","getCurrentElement","hot","noShadowDOM","withSolid","registry"],"mappings":"AAEA,OAASA,WAAWC,MAAM,KAA8C,UAAW,AACnF,QACED,WAAWE,WAAW,KAGjB,gBAAiB,AACxB,QAASF,WAAWG,OAAO,KAAgD,YAAa,AACxF,QAA4CC,SAAS,CAAEC,IAAI,CAAEC,MAAM,KAAQ,gBAAiB,AAC5F,QAASN,WAAWO,MAAM,KAA8C,UAAW,AACnF,QACEP,WAAWQ,aAAa,KAGnB,kBAAmB,AAC1B,QAASR,WAAWS,QAAQ,KAAkD,YAAa,AAC3F,QACET,WAAWU,QAAQ,KAKd,YAAa,AACpB,QAASV,WAAWW,IAAI,KAAyD,QAAS,AAC1F,QAASX,WAAWY,QAAQ,KAAkD,YAAa,AAC3F,QACEZ,WAAWa,YAAY,KAGlB,iBAAkB,AACzB,QACEb,WAAWc,WAAW,KAGjB,gBAAiB,AACxB,QAASd,WAAWe,IAAI,KAA0C,QAAS,AAC3E,QAASf,WAAWgB,UAAU,KAAsD,eAAgB,AACpG,QAAShB,WAAWiB,KAAK,KAAQ,qBAAsB,AACvD,QACEjB,WAAWkB,QAAQ,KAKd,YAAa,AACpB,QAASlB,WAAWmB,KAAK,KAA4C,SAAU,AAC/E,QAASnB,WAAWoB,UAAU,KAAQ,eAAgB,AACtD,QAASpB,WAAWqB,UAAU,KAAQ,eAAgB,AACtD,QAASrB,WAAWsB,UAAU,KAAsD,eAAgB,AACpG,QACEtB,WAAWuB,aAAa,KAGnB,kBAAmB,AAC1B,QAASvB,WAAWwB,IAAI,KAA4B,QAAS,AAC7D,QAASxB,WAAWyB,GAAG,KAAwC,OAAQ,AACvE,QAASzB,WAAW0B,KAAK,KAA4C,SAAU,AAC/E,QACE1B,WAAW2B,WAAW,KAGjB,gBAAiB,AACxB,QAAS3B,WAAW4B,EAAE,KAAsC,MAAO,AACnE,QAAS5B,WAAW6B,OAAO,KAAQ,YAAa,AAChD,QACE7B,WAAW8B,IAAI,KAMV,QAAS,AAChB,QACE9B,WAAW+B,KAAK,CAGhBC,SAAS,KAEJ,SAAU,AACjB,QACEhC,WAAWiC,YAAY,KAGlB,gBAAiB,AACxB,QAASjC,WAAWkC,UAAU,KAAsD,cAAe,AACnG,QAASlC,WAAWmC,OAAO,KAAgD,WAAY,AACvF,QAASnC,WAAWoC,KAAK,KAAQ,SAAU,AAC3C,QAASpC,WAAWqC,QAAQ,KAAkD,YAAa,AAC3F,QAAwBrC,WAAWsC,MAAM,KAA8C,UAAW,AAClG,QAAStC,WAAWuC,KAAK,KAA8D,SAAU,AACjG,QAASvC,WAAWwC,SAAS,KAAoD,aAAc,AAC/F,QACExC,WAAWyC,MAAM,KAKZ,UAAW,AAClB,QAASzC,WAAW0C,QAAQ,KAAkD,YAAa,AAC3F,QAAS1C,WAAW2C,IAAI,KAA0C,QAAS,AAC3E,QAAS3C,WAAW4C,MAAM,KAA8C,UAAW,AACnF,QAAS5C,WAAW6C,KAAK,KAA4C,SAAU,AAC/E,QAAyB7C,WAAW8C,IAAI,KAA0C,QAAS,AAC3F,QAAS9C,WAAW+C,GAAG,KAAwC,OAAQ,AACvE,QAEEC,aAAa,CACbhD,WAAWiD,KAAK,CAEhBC,SAAS,KACJ,SAAU,AACjB,QACElD,WAAWmD,IAAI,KAcV,QAAS,AAChB,QAASnD,WAAWoD,UAAU,KAAsD,cAAe,AAEnG,QAASC,aAAa,CAAEC,iBAAiB,CAAEC,GAAG,CAAEC,WAAW,CAAEC,SAAS,KAAQ,eAAgB,AAE9F,QAASC,QAAQ,KAAQ,SAAU"}
|
|
1
|
+
{"version":3,"sources":["components/index.ts"],"sourcesContent":["'use client';\n\nexport { default as Avatar, type AvatarElement, type AvatarProps } from './avatar';\nexport {\n default as AvatarGroup,\n type AvatarGroupElement,\n type AvatarGroupProps,\n} from './avatar/group';\nexport { default as BackTop, type BackTopElement, type BackTopProps } from './back-top';\nexport { type BaseOption, type BasicConfig, FieldName, Size, Status } from './basic-config';\nexport { default as Button, type ButtonElement, type ButtonProps } from './button';\nexport {\n default as CaptureScreen,\n type CaptureScreenElement,\n type CaptureScreenProps,\n} from './capture-screen';\nexport { default as Carousel, type CarouselElement, type CarouselProps } from './carousel';\nexport {\n default as Checkbox,\n type CheckboxBoolElement,\n type CheckboxBoolProps,\n type CheckboxGroupElement,\n type CheckboxGroupProps,\n} from './checkbox';\nexport { default as Code, type CodeElement, type CodeProps, type Language } from './code';\nexport { default as Collapse, type CollapseElement, type CollapseProps } from './collapse';\nexport {\n default as ColorPalette,\n type ColorPaletteElement,\n type ColorPaletteProps,\n} from './color-palette';\nexport {\n default as ColorPicker,\n type ColorPickerElement,\n type ColorPickerProps,\n} from './color-picker';\nexport { default as Cron, type CronElement, type CronProps } from './cron';\nexport { default as DatePicker, type DatePickerElement, type DatePickerProps } from './date-picker';\nexport { default as dayjs } from './date-picker/dayjs';\nexport {\n default as Dropdown,\n type DropdownElement,\n type DropdownMultipleElement,\n type DropdownMultipleProps,\n type DropdownProps,\n} from './dropdown';\nexport { default as Empty, type EmptyElement, type EmptyProps } from './empty';\nexport { default as fromSchema } from './from-schema';\nexport { default as getOptions } from './get-options';\nexport { default as GlassPanel, type GlassPanelElement, type GlassPanelProps } from './glass-panel';\nexport {\n default as HighlightText,\n type HighlightTextElement,\n type HighlightTextProps,\n} from './highlight-text';\nexport { default as icon, type IconAttribute } from './icon';\nexport { default as Img, type ImgElement, type ImgProps } from './img';\nexport { default as Input, type InputElement, type InputProps } from './input';\nexport {\n default as InputNumber,\n type InputNumberElement,\n type InputNumberProps,\n} from './input-number';\nexport { default as Marquee, type MarqueeElement, type MarqueeProps } from './marquee';\nexport { default as Md, type MdElement, type MdProps } from './md';\nexport { default as mdStyle } from './md-style';\nexport {\n default as Menu,\n type MenuElement,\n type MenuMultipleElement,\n type MenuMultipleProps,\n type MenuOption,\n type MenuProps,\n} from './menu';\nexport {\n default as Modal,\n type ModalElement,\n type ModalProps,\n OpenState,\n type OpenStateKey,\n} from './modal';\nexport {\n default as notification,\n type NotificationProps,\n type NotificationType,\n} from './notification';\nexport { default as Pagination, type PaginationElement, type PaginationProps } from './pagination';\nexport { default as Popover, type PopoverElement, type PopoverProps } from './popover';\nexport { default as Prism } from './prism';\nexport { default as Provider, type ProviderElement, type ProviderProps } from './provider';\nexport { type IntRange, default as QrCode, type QrCodeElement, type QrCodeProps } from './qrcode';\nexport { default as Radio, type RadioElement, type RadioOption, type RadioProps } from './radio';\nexport { default as Segmented, type SegmentedElement, type SegmentedProps } from './segmented';\nexport {\n default as Select,\n type SelectElement,\n type SelectMultipleElement,\n type SelectMultipleProps,\n type SelectProps,\n} from './select';\nexport { default as Skeleton, type SkeletonElement, type SkeletonProps } from './skeleton';\nexport { default as Spin, type SpinElement, type SpinProps } from './spin';\nexport { default as Switch, type SwitchElement, type SwitchProps } from './switch';\nexport { default as Table, type TableElement, type TableProps } from './table';\nexport { type TabOption, default as Tabs, type TabsElement, type TabsProps } from './tabs';\nexport { default as Tag, type TagElement, type TagProps } from './tag';\nexport {\n type ColorScheme,\n generateColor,\n default as theme,\n type ThemeOption,\n toneColor,\n} from './theme';\nexport {\n default as Tree,\n type TreeData,\n type TreeElement,\n type TreeMultipleElement,\n type TreeMultipleProps,\n type TreeMultipleSchemaElement,\n type TreeMultipleSchemaProps,\n type TreeMultipleStringElement,\n type TreeMultipleStringProps,\n type TreeProps,\n type TreeSchemaElement,\n type TreeSchemaProps,\n type TreeStringElement,\n type TreeStringProps,\n} from './tree';\nexport { default as Typography, type TypographyElement, type TypographyProps } from './typography';\nexport type { CustomElement } from 'custom-element-type';\nexport { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';\nimport type { ICustomElement, Transform } from 'custom-element-type';\nexport { registry } from './utils';\n\nimport type {\n AvatarElement,\n AvatarGroupElement,\n BackTopElement,\n ButtonElement,\n CaptureScreenElement,\n CarouselElement,\n CheckboxBoolElement,\n CheckboxGroupElement,\n CodeElement,\n CollapseElement,\n ColorPaletteElement,\n ColorPickerElement,\n CronElement,\n DatePickerElement,\n DropdownElement,\n DropdownMultipleElement,\n EmptyElement,\n GlassPanelElement,\n HighlightTextElement,\n ImgElement,\n InputElement,\n InputNumberElement,\n MarqueeElement,\n MdElement,\n MenuElement,\n MenuMultipleElement,\n ModalElement,\n PaginationElement,\n PopoverElement,\n ProviderElement,\n QrCodeElement,\n RadioElement,\n SegmentedElement,\n SelectElement,\n SelectMultipleElement,\n SkeletonElement,\n SpinElement,\n SwitchElement,\n TableElement,\n TabsElement,\n TagElement,\n TreeElement,\n TreeMultipleElement,\n TreeMultipleSchemaElement,\n TreeMultipleStringElement,\n TreeSchemaElement,\n TreeStringElement,\n TypographyElement,\n} from '.';\n\n/** 组件列表\n * @author monako97\n * @ignore optional\n */\ninterface CustomElementTags {\n /** 头像 */\n 'n-avatar': AvatarElement;\n /** 头像组 */\n 'n-avatar-group': AvatarGroupElement;\n /** 返回顶部 */\n 'n-back-top': BackTopElement;\n /** 按钮 */\n 'n-button': ButtonElement;\n /** 捕获屏幕 */\n 'n-capture-screen': CaptureScreenElement;\n /** 走马灯、轮播 */\n 'n-carousel': CarouselElement;\n /** 复选框 */\n 'n-checkbox': CheckboxBoolElement | CheckboxGroupElement;\n /** 代码框 */\n 'n-code': CodeElement;\n /** 取色器 */\n 'n-color-palette': ColorPaletteElement;\n /** 取色器(弹出类型) */\n 'n-color-picker': ColorPickerElement;\n /** 下拉面板 */\n 'n-dropdown': DropdownElement | DropdownMultipleElement;\n /** 空面板 */\n 'n-empty': EmptyElement;\n /** 匹配高亮文字 */\n 'n-highlight-text': HighlightTextElement;\n /** 图片查看器 */\n 'n-img': ImgElement;\n /** 输入框 */\n 'n-input': InputElement;\n /** 数字输入框 */\n 'n-input-number': InputNumberElement;\n /** Markdown渲染 */\n 'n-md': MdElement;\n /** 弹出气泡面板 */\n 'n-popover': PopoverElement;\n /** 单选项 */\n 'n-radio': RadioElement;\n /** 分段控制器 */\n 'n-segmented': SegmentedElement;\n /** 下拉选择框 */\n 'n-select': SelectElement | SelectMultipleElement;\n /** 骨架屏 */\n 'n-skeleton': SkeletonElement;\n /** 加载中 */\n 'n-spin': SpinElement;\n /** 开关 */\n 'n-switch': SwitchElement;\n /** 树形渲染 */\n 'n-tree':\n | TreeElement\n | TreeStringElement\n | TreeSchemaElement\n | TreeMultipleElement\n | TreeMultipleStringElement\n | TreeMultipleSchemaElement;\n /** 文字排版 */\n 'n-typography': TypographyElement;\n /** 标签页 */\n 'n-tabs': TabsElement;\n /** 标签 */\n 'n-tag': TagElement;\n /** 导航菜单 */\n 'n-menu': MenuElement | MenuMultipleElement;\n /** Cron表达式编辑器 */\n 'n-cron': CronElement;\n /** 日期选择器\n * @since 2.1.0\n */\n 'n-data-picker': DatePickerElement;\n /** 数据表格\n * @since 2.2.0\n */\n 'n-table': TableElement;\n /** 分页器\n * @since 2.2.0\n */\n 'n-pagination': PaginationElement;\n /** 响应内部变化\n * @since 2.3.0\n */\n 'n-provider': ProviderElement;\n /** 模态框\n * @since 2.6.0\n */\n 'n-modal': ModalElement;\n /**\n * 二维码\n * @since 2.9.0\n */\n 'n-qrcode': QrCodeElement;\n /**\n * 折叠面板\n * @since 2.10.0\n */\n 'n-collapse': CollapseElement;\n /**\n * 玻璃面板\n * @since 2.12.0\n */\n 'n-glass-panel': GlassPanelElement;\n /**\n * 跑马灯\n * @since 2.13.0\n */\n 'n-marquee': MarqueeElement;\n}\ntype IntrinsicNekoElement = Transform<CustomElementTags>;\n\ndeclare module 'solid-js' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\ndeclare module 'react' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\n\nexport interface ComponentOptions<T> {\n element: T & ICustomElement;\n}\n"],"names":["default","Avatar","AvatarGroup","BackTop","FieldName","Size","Status","Button","CaptureScreen","Carousel","Checkbox","Code","Collapse","ColorPalette","ColorPicker","Cron","DatePicker","dayjs","Dropdown","Empty","fromSchema","getOptions","GlassPanel","HighlightText","icon","Img","Input","InputNumber","Marquee","Md","mdStyle","Menu","Modal","OpenState","notification","Pagination","Popover","Prism","Provider","QrCode","Radio","Segmented","Select","Skeleton","Spin","Switch","Table","Tabs","Tag","generateColor","theme","toneColor","Tree","Typography","customElement","getCurrentElement","hot","noShadowDOM","withSolid","registry"],"mappings":"AAEA,OAASA,WAAWC,MAAM,KAA8C,UAAW,AACnF,QACED,WAAWE,WAAW,KAGjB,gBAAiB,AACxB,QAASF,WAAWG,OAAO,KAAgD,YAAa,AACxF,QAA4CC,SAAS,CAAEC,IAAI,CAAEC,MAAM,KAAQ,gBAAiB,AAC5F,QAASN,WAAWO,MAAM,KAA8C,UAAW,AACnF,QACEP,WAAWQ,aAAa,KAGnB,kBAAmB,AAC1B,QAASR,WAAWS,QAAQ,KAAkD,YAAa,AAC3F,QACET,WAAWU,QAAQ,KAKd,YAAa,AACpB,QAASV,WAAWW,IAAI,KAAyD,QAAS,AAC1F,QAASX,WAAWY,QAAQ,KAAkD,YAAa,AAC3F,QACEZ,WAAWa,YAAY,KAGlB,iBAAkB,AACzB,QACEb,WAAWc,WAAW,KAGjB,gBAAiB,AACxB,QAASd,WAAWe,IAAI,KAA0C,QAAS,AAC3E,QAASf,WAAWgB,UAAU,KAAsD,eAAgB,AACpG,QAAShB,WAAWiB,KAAK,KAAQ,qBAAsB,AACvD,QACEjB,WAAWkB,QAAQ,KAKd,YAAa,AACpB,QAASlB,WAAWmB,KAAK,KAA4C,SAAU,AAC/E,QAASnB,WAAWoB,UAAU,KAAQ,eAAgB,AACtD,QAASpB,WAAWqB,UAAU,KAAQ,eAAgB,AACtD,QAASrB,WAAWsB,UAAU,KAAsD,eAAgB,AACpG,QACEtB,WAAWuB,aAAa,KAGnB,kBAAmB,AAC1B,QAASvB,WAAWwB,IAAI,KAA4B,QAAS,AAC7D,QAASxB,WAAWyB,GAAG,KAAwC,OAAQ,AACvE,QAASzB,WAAW0B,KAAK,KAA4C,SAAU,AAC/E,QACE1B,WAAW2B,WAAW,KAGjB,gBAAiB,AACxB,QAAS3B,WAAW4B,OAAO,KAAgD,WAAY,AACvF,QAAS5B,WAAW6B,EAAE,KAAsC,MAAO,AACnE,QAAS7B,WAAW8B,OAAO,KAAQ,YAAa,AAChD,QACE9B,WAAW+B,IAAI,KAMV,QAAS,AAChB,QACE/B,WAAWgC,KAAK,CAGhBC,SAAS,KAEJ,SAAU,AACjB,QACEjC,WAAWkC,YAAY,KAGlB,gBAAiB,AACxB,QAASlC,WAAWmC,UAAU,KAAsD,cAAe,AACnG,QAASnC,WAAWoC,OAAO,KAAgD,WAAY,AACvF,QAASpC,WAAWqC,KAAK,KAAQ,SAAU,AAC3C,QAASrC,WAAWsC,QAAQ,KAAkD,YAAa,AAC3F,QAAwBtC,WAAWuC,MAAM,KAA8C,UAAW,AAClG,QAASvC,WAAWwC,KAAK,KAA8D,SAAU,AACjG,QAASxC,WAAWyC,SAAS,KAAoD,aAAc,AAC/F,QACEzC,WAAW0C,MAAM,KAKZ,UAAW,AAClB,QAAS1C,WAAW2C,QAAQ,KAAkD,YAAa,AAC3F,QAAS3C,WAAW4C,IAAI,KAA0C,QAAS,AAC3E,QAAS5C,WAAW6C,MAAM,KAA8C,UAAW,AACnF,QAAS7C,WAAW8C,KAAK,KAA4C,SAAU,AAC/E,QAAyB9C,WAAW+C,IAAI,KAA0C,QAAS,AAC3F,QAAS/C,WAAWgD,GAAG,KAAwC,OAAQ,AACvE,QAEEC,aAAa,CACbjD,WAAWkD,KAAK,CAEhBC,SAAS,KACJ,SAAU,AACjB,QACEnD,WAAWoD,IAAI,KAcV,QAAS,AAChB,QAASpD,WAAWqD,UAAU,KAAsD,cAAe,AAEnG,QAASC,aAAa,CAAEC,iBAAiB,CAAEC,GAAG,CAAEC,WAAW,CAAEC,SAAS,KAAQ,eAAgB,AAE9F,QAASC,QAAQ,KAAQ,SAAU"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type JSXElement } from '../basic-config';
|
|
2
|
+
export interface MarqueeProps {
|
|
3
|
+
/** 自定义类名 */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** 自定义样式表 */
|
|
6
|
+
css?: string;
|
|
7
|
+
/** 是否在 hover 时暂停
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
hoverPause?: boolean;
|
|
11
|
+
/** 滚动速度(单位:秒)
|
|
12
|
+
* @default 15
|
|
13
|
+
*/
|
|
14
|
+
speed?: number;
|
|
15
|
+
children?: JSXElement | JSXElement[];
|
|
16
|
+
}
|
|
17
|
+
/** 跑马灯 */
|
|
18
|
+
declare const Marquee: {
|
|
19
|
+
(_: MarqueeProps): import("solid-js").JSX.Element;
|
|
20
|
+
registry(): void;
|
|
21
|
+
};
|
|
22
|
+
export type MarqueeElement = CustomElement<MarqueeProps>;
|
|
23
|
+
export default Marquee;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{use as e}from"solid-js/web";import{template as t}from"solid-js/web";import{memo as r}from"solid-js/web";import{insert as o}from"solid-js/web";import{effect as s}from"solid-js/web";import{createComponent as i}from"solid-js/web";import{className as l}from"solid-js/web";let m=t("<style> "),n=t("<style>"),d=t("<div>"),a=t('<div class="item">');import{createEffect as c,createSignal as f,For as p,mergeProps as u,Show as h}from"solid-js";import v from"@moneko/common/lib/isFunction";import{css as y,cx as b}from"@moneko/css";import{customElement as j}from"solid-element";import{clearAttribute as w}from"../basic-config";import g,{block as $}from"../theme";import{style as _}from"./style";let C=t=>{let j;let{baseStyle:w}=g,$=u({speed:15,hoverPause:!0},t),[C,P]=f(2);return c(()=>{if(j){let e=j.querySelector(".item");P(Math.ceil(j.offsetWidth/e.offsetWidth)+1)}}),[(()=>{let e=m(),t=e.firstChild;return s(()=>t.data=w()),e})(),(()=>{let e=n();return e.textContent=_,e})(),i(h,{get when(){return $.css},get children(){let e=m(),t=e.firstChild;return s(()=>t.data=y($.css)),e}}),(()=>{let t=d(),m=j;return"function"==typeof m?e(m,t):j=t,o(t,i(p,{get each(){return Array.from({length:C()})},children:()=>(()=>{let e=a();return o(e,(()=>{let e=r(()=>!!Array.isArray($.children));return()=>e()?i(p,{get each(){return $.children},children:e=>v(e.cloneNode)?e.cloneNode(!0):e}):$.children})()),e})()})),s(e=>{let r=b("marquee",$.hoverPause&&"hover-pause"),o=`${$.speed}s`;return r!==e._v$&&l(t,e._v$=r),o!==e._v$2&&(null!=(e._v$2=o)?t.style.setProperty("--speed",o):t.style.removeProperty("--speed")),e},{_v$:void 0,_v$2:void 0}),t})()]};C.registry=()=>{j("n-marquee",{class:void 0,css:void 0,speed:15,hoverPause:!0},(e,t)=>{let r=t.element,o=u({children:[...r.childNodes.values()]},e);return c(()=>{w(r,["css"])}),[(()=>{let e=n();return e.textContent=$,e})(),i(C,o)]})};export default C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/marquee/index.tsx"],"sourcesContent":["import { createEffect, createSignal, For, mergeProps, Show } from 'solid-js';\nimport { isFunction } from '@moneko/common';\nimport { css, cx } from '@moneko/css';\nimport { customElement } from 'solid-element';\n\nimport { clearAttribute, type JSXElement } from '../basic-config';\nimport theme, { block } from '../theme';\n\nimport { style } from './style';\n\nexport interface MarqueeProps {\n /** 自定义类名 */\n class?: string;\n /** 自定义样式表 */\n css?: string;\n /** 是否在 hover 时暂停\n * @default true\n */\n hoverPause?: boolean;\n /** 滚动速度(单位:秒)\n * @default 15\n */\n speed?: number;\n children?: JSXElement | JSXElement[];\n}\n\n/** 跑马灯 */\nconst Marquee = (_: MarqueeProps) => {\n const { baseStyle } = theme;\n let el: HTMLDivElement | undefined;\n const props = mergeProps(\n {\n speed: 15,\n hoverPause: true,\n },\n _,\n );\n const [count, setCount] = createSignal(2);\n\n createEffect(() => {\n if (el) {\n const item = el.querySelector('.item') as HTMLDivElement;\n\n setCount(Math.ceil(el.offsetWidth / item.offsetWidth) + 1);\n }\n });\n return (\n <>\n <style textContent={baseStyle()} />\n <style textContent={style} />\n <Show when={props.css}>\n <style textContent={css(props.css)} />\n </Show>\n <div\n ref={el}\n class={cx('marquee', props.hoverPause && 'hover-pause')}\n style={{ '--speed': `${props.speed}s` }}\n >\n <For each={Array.from({ length: count() })}>\n {() => (\n <div class=\"item\">\n {Array.isArray(props.children) ? (\n <For each={props.children}>\n {(item) => {\n return isFunction((item as HTMLElement).cloneNode)\n ? (item as HTMLElement).cloneNode(true)\n : item;\n }}\n </For>\n ) : (\n props.children\n )}\n </div>\n )}\n </For>\n </div>\n </>\n );\n};\n\nexport type MarqueeElement = CustomElement<MarqueeProps>;\n\nMarquee.registry = () => {\n customElement<MarqueeProps>(\n 'n-marquee',\n {\n class: void 0,\n css: void 0,\n speed: 15,\n hoverPause: true,\n },\n (_, opt) => {\n const el = opt.element;\n const props = mergeProps(\n {\n children: [...el.childNodes.values()],\n },\n _,\n );\n\n createEffect(() => {\n clearAttribute(el, ['css']);\n });\n return (\n <>\n <style textContent={block} />\n <Marquee {...props} />\n </>\n );\n },\n );\n};\n\nexport default Marquee;\n"],"names":["createEffect","createSignal","For","mergeProps","Show","isFunction","css","cx","customElement","clearAttribute","theme","block","style","Marquee","_","el","baseStyle","props","speed","hoverPause","count","setCount","item","querySelector","Math","ceil","offsetWidth","Array","from","length","isArray","children","cloneNode","registry","class","opt","element","childNodes","values"],"mappings":"4VAAA,QAASA,gBAAAA,CAAY,CAAEC,gBAAAA,CAAY,CAAEC,OAAAA,CAAG,CAAEC,cAAAA,CAAU,CAAEC,QAAAA,CAAI,KAAQ,UAAW,AAC7E,QAASC,MAAkB,+BAAiB,AAC5C,QAASC,OAAAA,CAAG,CAAEC,MAAAA,CAAE,KAAQ,aAAc,AACtC,QAASC,iBAAAA,CAAa,KAAQ,eAAgB,AAE9C,QAASC,kBAAAA,CAAc,KAAyB,iBAAkB,AAClE,QAAOC,GAASC,SAAAA,CAAK,KAAQ,UAAW,AAExC,QAASC,SAAAA,CAAK,KAAQ,SAAU,CAmBhC,IAAMC,EAAU,AAACC,QAEXC,EADJ,GAAM,CAAEC,UAAAA,CAAS,CAAE,CAAGN,EAEhBO,EAAQd,EACZ,CACEe,MAAO,GACPC,WAAY,CAAA,CACd,EACAL,GAEI,CAACM,EAAOC,EAAS,CAAGpB,EAAa,GASvC,OAPAD,EAAa,KACX,GAAIe,EAAI,CACN,IAAMO,EAAOP,EAAGQ,aAAa,CAAC,SAE9BF,EAASG,KAAKC,IAAI,CAACV,EAAGW,WAAW,CAAGJ,EAAKI,WAAW,EAAI,EAC1D,CACF,uDAGwBV,gDACAJ,UACnBR,qBAAWa,EAAMX,GAAG,8DACCA,EAAIW,EAAMX,GAAG,0BAG5BS,oCAAAA,UAIJb,qBAAUyB,MAAMC,IAAI,CAAC,CAAEC,OAAQT,GAAQ,aACrC,mDAEIO,MAAMG,OAAO,CAACb,EAAMc,QAAQ,aAA5BJ,MACEzB,qBAAUe,EAAMc,QAAQ,WACtB,AAACT,GACOjB,EAAW,AAACiB,EAAqBU,SAAS,EAC7C,AAACV,EAAqBU,SAAS,CAAC,CAAA,GAChCV,IAIRL,EAAMc,QAAQ,2BAffxB,EAAG,UAAWU,EAAME,UAAU,EAAI,iBACrB,CAAC,EAAEF,EAAMC,KAAK,CAAC,CAAC,CAAC,qKAsB7C,CAIAL,CAAAA,EAAQoB,QAAQ,CAAG,KACjBzB,EACE,YACA,CACE0B,MAAO,KAAK,EACZ5B,IAAK,KAAK,EACVY,MAAO,GACPC,WAAY,CAAA,CACd,EACA,CAACL,EAAGqB,KACF,IAAMpB,EAAKoB,EAAIC,OAAO,CAChBnB,EAAQd,EACZ,CACE4B,SAAU,IAAIhB,EAAGsB,UAAU,CAACC,MAAM,GAAG,AACvC,EACAxB,GAMF,OAHAd,EAAa,KACXS,EAAeM,EAAI,CAAC,MAAM,CAC5B,yCAGwBJ,UACnBE,EAAYI,GAGnB,EAEJ,CAEA,gBAAeJ,CAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const style: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import{css as e}from"@moneko/css";export const style=e`
|
|
2
|
+
.marquee {
|
|
3
|
+
--speed: 15s;
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
margin: auto;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
|
|
12
|
+
&::before,
|
|
13
|
+
&::after {
|
|
14
|
+
content: '';
|
|
15
|
+
position: absolute;
|
|
16
|
+
z-index: 1000;
|
|
17
|
+
inset-block-start: 0;
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
inline-size: 15rem;
|
|
20
|
+
max-inline-size: 25%;
|
|
21
|
+
block-size: 100%;
|
|
22
|
+
background-image: linear-gradient(to right, var(--component-bg), transparent);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
inset-inline: auto 0;
|
|
27
|
+
background-image: linear-gradient(to left, var(--component-bg), transparent);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.item {
|
|
32
|
+
animation-duration: var(--speed);
|
|
33
|
+
animation-iteration-count: infinite;
|
|
34
|
+
animation-name: marquee-content;
|
|
35
|
+
animation-timing-function: linear;
|
|
36
|
+
padding: 5px 15px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hover-pause {
|
|
40
|
+
&:hover .item {
|
|
41
|
+
animation-play-state: paused;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes marquee-content {
|
|
46
|
+
from {
|
|
47
|
+
transform: translateX(0%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
to {
|
|
51
|
+
transform: translateX(-100%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/marquee/style.ts"],"sourcesContent":["import { css } from '@moneko/css';\n\nexport const style = css`\n .marquee {\n --speed: 15s;\n\n position: relative;\n display: flex;\n overflow: hidden;\n margin: auto;\n white-space: nowrap;\n inline-size: 100%;\n\n &::before,\n &::after {\n content: '';\n position: absolute;\n z-index: 1000;\n inset-block-start: 0;\n inset-inline-start: 0;\n inline-size: 15rem;\n max-inline-size: 25%;\n block-size: 100%;\n background-image: linear-gradient(to right, var(--component-bg), transparent);\n }\n\n &::after {\n inset-inline: auto 0;\n background-image: linear-gradient(to left, var(--component-bg), transparent);\n }\n }\n\n .item {\n animation-duration: var(--speed);\n animation-iteration-count: infinite;\n animation-name: marquee-content;\n animation-timing-function: linear;\n padding: 5px 15px;\n }\n\n .hover-pause {\n &:hover .item {\n animation-play-state: paused;\n }\n }\n\n @keyframes marquee-content {\n from {\n transform: translateX(0%);\n }\n\n to {\n transform: translateX(-100%);\n }\n }\n`;\n"],"names":["css","style"],"mappings":"AAAA,OAASA,OAAAA,CAAG,KAAQ,aAAc,AAElC,QAAO,MAAMC,MAAQD,CAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDzB,CAAC,AAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { default as icon, type IconAttribute } from './icon';
|
|
|
23
23
|
export { default as Img, type ImgElement, type ImgProps } from './img';
|
|
24
24
|
export { default as Input, type InputElement, type InputProps } from './input';
|
|
25
25
|
export { default as InputNumber, type InputNumberElement, type InputNumberProps, } from './input-number';
|
|
26
|
+
export { default as Marquee, type MarqueeElement, type MarqueeProps } from './marquee';
|
|
26
27
|
export { default as Md, type MdElement, type MdProps } from './md';
|
|
27
28
|
export { default as mdStyle } from './md-style';
|
|
28
29
|
export { default as Menu, type MenuElement, type MenuMultipleElement, type MenuMultipleProps, type MenuOption, type MenuProps, } from './menu';
|
|
@@ -49,7 +50,7 @@ export type { CustomElement } from 'custom-element-type';
|
|
|
49
50
|
export { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';
|
|
50
51
|
import type { ICustomElement, Transform } from 'custom-element-type';
|
|
51
52
|
export { registry } from './utils';
|
|
52
|
-
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, CollapseElement, ColorPaletteElement, ColorPickerElement, CronElement, DatePickerElement, DropdownElement, DropdownMultipleElement, EmptyElement, GlassPanelElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MdElement, MenuElement, MenuMultipleElement, ModalElement, PaginationElement, PopoverElement, ProviderElement, QrCodeElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TableElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from '.';
|
|
53
|
+
import type { AvatarElement, AvatarGroupElement, BackTopElement, ButtonElement, CaptureScreenElement, CarouselElement, CheckboxBoolElement, CheckboxGroupElement, CodeElement, CollapseElement, ColorPaletteElement, ColorPickerElement, CronElement, DatePickerElement, DropdownElement, DropdownMultipleElement, EmptyElement, GlassPanelElement, HighlightTextElement, ImgElement, InputElement, InputNumberElement, MarqueeElement, MdElement, MenuElement, MenuMultipleElement, ModalElement, PaginationElement, PopoverElement, ProviderElement, QrCodeElement, RadioElement, SegmentedElement, SelectElement, SelectMultipleElement, SkeletonElement, SpinElement, SwitchElement, TableElement, TabsElement, TagElement, TreeElement, TreeMultipleElement, TreeMultipleSchemaElement, TreeMultipleStringElement, TreeSchemaElement, TreeStringElement, TypographyElement } from '.';
|
|
53
54
|
/** 组件列表
|
|
54
55
|
* @author monako97
|
|
55
56
|
* @ignore optional
|
|
@@ -150,6 +151,11 @@ interface CustomElementTags {
|
|
|
150
151
|
* @since 2.12.0
|
|
151
152
|
*/
|
|
152
153
|
'n-glass-panel': GlassPanelElement;
|
|
154
|
+
/**
|
|
155
|
+
* 跑马灯
|
|
156
|
+
* @since 2.13.0
|
|
157
|
+
*/
|
|
158
|
+
'n-marquee': MarqueeElement;
|
|
153
159
|
}
|
|
154
160
|
type IntrinsicNekoElement = Transform<CustomElementTags>;
|
|
155
161
|
declare module 'solid-js' {
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}Object.defineProperty(exports,"__esModule",{value:!0}),e(exports,{Avatar:function(){return r.default},AvatarGroup:function(){return t.default},BackTop:function(){return
|
|
1
|
+
"use strict";function e(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}Object.defineProperty(exports,"__esModule",{value:!0}),e(exports,{Avatar:function(){return r.default},AvatarGroup:function(){return t.default},BackTop:function(){return u.default},Button:function(){return i.default},CaptureScreen:function(){return o.default},Carousel:function(){return f.default},Checkbox:function(){return a.default},Code:function(){return c.default},Collapse:function(){return l.default},ColorPalette:function(){return d.default},ColorPicker:function(){return p.default},Cron:function(){return q.default},DatePicker:function(){return s.default},Dropdown:function(){return g.default},Empty:function(){return h.default},FieldName:function(){return n.FieldName},GlassPanel:function(){return S.default},HighlightText:function(){return v.default},Img:function(){return O.default},Input:function(){return P.default},InputNumber:function(){return k.default},Marquee:function(){return w.default},Md:function(){return M.default},Menu:function(){return _.default},Modal:function(){return T.default},OpenState:function(){return T.OpenState},Pagination:function(){return D.default},Popover:function(){return E.default},Prism:function(){return I.default},Provider:function(){return N.default},QrCode:function(){return W.default},Radio:function(){return z.default},Segmented:function(){return A.default},Select:function(){return B.default},Size:function(){return n.Size},Skeleton:function(){return F.default},Spin:function(){return G.default},Status:function(){return n.Status},Switch:function(){return H.default},Table:function(){return Q.default},Tabs:function(){return R.default},Tag:function(){return J.default},Tree:function(){return L.default},Typography:function(){return U.default},customElement:function(){return V.customElement},dayjs:function(){return m.default},fromSchema:function(){return y.default},generateColor:function(){return K.generateColor},getCurrentElement:function(){return V.getCurrentElement},getOptions:function(){return b.default},hot:function(){return V.hot},icon:function(){return C.default},mdStyle:function(){return j.default},noShadowDOM:function(){return V.noShadowDOM},notification:function(){return x.default},registry:function(){return X.registry},theme:function(){return K.default},toneColor:function(){return K.toneColor},withSolid:function(){return V.withSolid}});const r=Y(require("./avatar")),t=Y(require("./avatar/group")),u=Y(require("./back-top")),n=require("./basic-config"),i=Y(require("./button")),o=Y(require("./capture-screen")),f=Y(require("./carousel")),a=Y(require("./checkbox")),c=Y(require("./code")),l=Y(require("./collapse")),d=Y(require("./color-palette")),p=Y(require("./color-picker")),q=Y(require("./cron")),s=Y(require("./date-picker")),m=Y(require("./date-picker/dayjs")),g=Y(require("./dropdown")),h=Y(require("./empty")),y=Y(require("./from-schema")),b=Y(require("./get-options")),S=Y(require("./glass-panel")),v=Y(require("./highlight-text")),C=Y(require("./icon")),O=Y(require("./img")),P=Y(require("./input")),k=Y(require("./input-number")),w=Y(require("./marquee")),M=Y(require("./md")),j=Y(require("./md-style")),_=Y(require("./menu")),T=$(require("./modal")),x=Y(require("./notification")),D=Y(require("./pagination")),E=Y(require("./popover")),I=Y(require("./prism")),N=Y(require("./provider")),W=Y(require("./qrcode")),z=Y(require("./radio")),A=Y(require("./segmented")),B=Y(require("./select")),F=Y(require("./skeleton")),G=Y(require("./spin")),H=Y(require("./switch")),Q=Y(require("./table")),R=Y(require("./tabs")),J=Y(require("./tag")),K=$(require("./theme")),L=Y(require("./tree")),U=Y(require("./typography")),V=require("solid-element"),X=require("./utils");function Y(e){return e&&e.__esModule?e:{default:e}}function Z(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(Z=function(e){return e?t:r})(e)}function $(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Z(r);if(t&&t.has(e))return t.get(e);var u={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(u,i,o):u[i]=e[i]}return u.default=e,t&&t.set(e,u),u}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/index.ts"],"sourcesContent":["'use client';\n\nexport { default as Avatar, type AvatarElement, type AvatarProps } from './avatar';\nexport {\n default as AvatarGroup,\n type AvatarGroupElement,\n type AvatarGroupProps,\n} from './avatar/group';\nexport { default as BackTop, type BackTopElement, type BackTopProps } from './back-top';\nexport { type BaseOption, type BasicConfig, FieldName, Size, Status } from './basic-config';\nexport { default as Button, type ButtonElement, type ButtonProps } from './button';\nexport {\n default as CaptureScreen,\n type CaptureScreenElement,\n type CaptureScreenProps,\n} from './capture-screen';\nexport { default as Carousel, type CarouselElement, type CarouselProps } from './carousel';\nexport {\n default as Checkbox,\n type CheckboxBoolElement,\n type CheckboxBoolProps,\n type CheckboxGroupElement,\n type CheckboxGroupProps,\n} from './checkbox';\nexport { default as Code, type CodeElement, type CodeProps, type Language } from './code';\nexport { default as Collapse, type CollapseElement, type CollapseProps } from './collapse';\nexport {\n default as ColorPalette,\n type ColorPaletteElement,\n type ColorPaletteProps,\n} from './color-palette';\nexport {\n default as ColorPicker,\n type ColorPickerElement,\n type ColorPickerProps,\n} from './color-picker';\nexport { default as Cron, type CronElement, type CronProps } from './cron';\nexport { default as DatePicker, type DatePickerElement, type DatePickerProps } from './date-picker';\nexport { default as dayjs } from './date-picker/dayjs';\nexport {\n default as Dropdown,\n type DropdownElement,\n type DropdownMultipleElement,\n type DropdownMultipleProps,\n type DropdownProps,\n} from './dropdown';\nexport { default as Empty, type EmptyElement, type EmptyProps } from './empty';\nexport { default as fromSchema } from './from-schema';\nexport { default as getOptions } from './get-options';\nexport { default as GlassPanel, type GlassPanelElement, type GlassPanelProps } from './glass-panel';\nexport {\n default as HighlightText,\n type HighlightTextElement,\n type HighlightTextProps,\n} from './highlight-text';\nexport { default as icon, type IconAttribute } from './icon';\nexport { default as Img, type ImgElement, type ImgProps } from './img';\nexport { default as Input, type InputElement, type InputProps } from './input';\nexport {\n default as InputNumber,\n type InputNumberElement,\n type InputNumberProps,\n} from './input-number';\nexport { default as Md, type MdElement, type MdProps } from './md';\nexport { default as mdStyle } from './md-style';\nexport {\n default as Menu,\n type MenuElement,\n type MenuMultipleElement,\n type MenuMultipleProps,\n type MenuOption,\n type MenuProps,\n} from './menu';\nexport {\n default as Modal,\n type ModalElement,\n type ModalProps,\n OpenState,\n type OpenStateKey,\n} from './modal';\nexport {\n default as notification,\n type NotificationProps,\n type NotificationType,\n} from './notification';\nexport { default as Pagination, type PaginationElement, type PaginationProps } from './pagination';\nexport { default as Popover, type PopoverElement, type PopoverProps } from './popover';\nexport { default as Prism } from './prism';\nexport { default as Provider, type ProviderElement, type ProviderProps } from './provider';\nexport { type IntRange, default as QrCode, type QrCodeElement, type QrCodeProps } from './qrcode';\nexport { default as Radio, type RadioElement, type RadioOption, type RadioProps } from './radio';\nexport { default as Segmented, type SegmentedElement, type SegmentedProps } from './segmented';\nexport {\n default as Select,\n type SelectElement,\n type SelectMultipleElement,\n type SelectMultipleProps,\n type SelectProps,\n} from './select';\nexport { default as Skeleton, type SkeletonElement, type SkeletonProps } from './skeleton';\nexport { default as Spin, type SpinElement, type SpinProps } from './spin';\nexport { default as Switch, type SwitchElement, type SwitchProps } from './switch';\nexport { default as Table, type TableElement, type TableProps } from './table';\nexport { type TabOption, default as Tabs, type TabsElement, type TabsProps } from './tabs';\nexport { default as Tag, type TagElement, type TagProps } from './tag';\nexport {\n type ColorScheme,\n generateColor,\n default as theme,\n type ThemeOption,\n toneColor,\n} from './theme';\nexport {\n default as Tree,\n type TreeData,\n type TreeElement,\n type TreeMultipleElement,\n type TreeMultipleProps,\n type TreeMultipleSchemaElement,\n type TreeMultipleSchemaProps,\n type TreeMultipleStringElement,\n type TreeMultipleStringProps,\n type TreeProps,\n type TreeSchemaElement,\n type TreeSchemaProps,\n type TreeStringElement,\n type TreeStringProps,\n} from './tree';\nexport { default as Typography, type TypographyElement, type TypographyProps } from './typography';\nexport type { CustomElement } from 'custom-element-type';\nexport { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';\nimport type { ICustomElement, Transform } from 'custom-element-type';\nexport { registry } from './utils';\n\nimport type {\n AvatarElement,\n AvatarGroupElement,\n BackTopElement,\n ButtonElement,\n CaptureScreenElement,\n CarouselElement,\n CheckboxBoolElement,\n CheckboxGroupElement,\n CodeElement,\n CollapseElement,\n ColorPaletteElement,\n ColorPickerElement,\n CronElement,\n DatePickerElement,\n DropdownElement,\n DropdownMultipleElement,\n EmptyElement,\n GlassPanelElement,\n HighlightTextElement,\n ImgElement,\n InputElement,\n InputNumberElement,\n MdElement,\n MenuElement,\n MenuMultipleElement,\n ModalElement,\n PaginationElement,\n PopoverElement,\n ProviderElement,\n QrCodeElement,\n RadioElement,\n SegmentedElement,\n SelectElement,\n SelectMultipleElement,\n SkeletonElement,\n SpinElement,\n SwitchElement,\n TableElement,\n TabsElement,\n TagElement,\n TreeElement,\n TreeMultipleElement,\n TreeMultipleSchemaElement,\n TreeMultipleStringElement,\n TreeSchemaElement,\n TreeStringElement,\n TypographyElement,\n} from '.';\n\n/** 组件列表\n * @author monako97\n * @ignore optional\n */\ninterface CustomElementTags {\n /** 头像 */\n 'n-avatar': AvatarElement;\n /** 头像组 */\n 'n-avatar-group': AvatarGroupElement;\n /** 返回顶部 */\n 'n-back-top': BackTopElement;\n /** 按钮 */\n 'n-button': ButtonElement;\n /** 捕获屏幕 */\n 'n-capture-screen': CaptureScreenElement;\n /** 走马灯、轮播 */\n 'n-carousel': CarouselElement;\n /** 复选框 */\n 'n-checkbox': CheckboxBoolElement | CheckboxGroupElement;\n /** 代码框 */\n 'n-code': CodeElement;\n /** 取色器 */\n 'n-color-palette': ColorPaletteElement;\n /** 取色器(弹出类型) */\n 'n-color-picker': ColorPickerElement;\n /** 下拉面板 */\n 'n-dropdown': DropdownElement | DropdownMultipleElement;\n /** 空面板 */\n 'n-empty': EmptyElement;\n /** 匹配高亮文字 */\n 'n-highlight-text': HighlightTextElement;\n /** 图片查看器 */\n 'n-img': ImgElement;\n /** 输入框 */\n 'n-input': InputElement;\n /** 数字输入框 */\n 'n-input-number': InputNumberElement;\n /** Markdown渲染 */\n 'n-md': MdElement;\n /** 弹出气泡面板 */\n 'n-popover': PopoverElement;\n /** 单选项 */\n 'n-radio': RadioElement;\n /** 分段控制器 */\n 'n-segmented': SegmentedElement;\n /** 下拉选择框 */\n 'n-select': SelectElement | SelectMultipleElement;\n /** 骨架屏 */\n 'n-skeleton': SkeletonElement;\n /** 加载中 */\n 'n-spin': SpinElement;\n /** 开关 */\n 'n-switch': SwitchElement;\n /** 树形渲染 */\n 'n-tree':\n | TreeElement\n | TreeStringElement\n | TreeSchemaElement\n | TreeMultipleElement\n | TreeMultipleStringElement\n | TreeMultipleSchemaElement;\n /** 文字排版 */\n 'n-typography': TypographyElement;\n /** 标签页 */\n 'n-tabs': TabsElement;\n /** 标签 */\n 'n-tag': TagElement;\n /** 导航菜单 */\n 'n-menu': MenuElement | MenuMultipleElement;\n /** Cron表达式编辑器 */\n 'n-cron': CronElement;\n /** 日期选择器\n * @since 2.1.0\n */\n 'n-data-picker': DatePickerElement;\n /** 数据表格\n * @since 2.2.0\n */\n 'n-table': TableElement;\n /** 分页器\n * @since 2.2.0\n */\n 'n-pagination': PaginationElement;\n /** 响应内部变化\n * @since 2.3.0\n */\n 'n-provider': ProviderElement;\n /** 模态框\n * @since 2.6.0\n */\n 'n-modal': ModalElement;\n /**\n * 二维码\n * @since 2.9.0\n */\n 'n-qrcode': QrCodeElement;\n /**\n * 折叠面板\n * @since 2.10.0\n */\n 'n-collapse': CollapseElement;\n /**\n * 玻璃面板\n * @since 2.12.0\n */\n 'n-glass-panel': GlassPanelElement;\n}\ntype IntrinsicNekoElement = Transform<CustomElementTags>;\n\ndeclare module 'solid-js' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\ndeclare module 'react' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\n\nexport interface ComponentOptions<T> {\n element: T & ICustomElement;\n}\n"],"names":["Avatar","AvatarGroup","BackTop","Button","CaptureScreen","Carousel","Checkbox","Code","Collapse","ColorPalette","ColorPicker","Cron","DatePicker","Dropdown","Empty","FieldName","GlassPanel","HighlightText","Img","Input","InputNumber","Md","Menu","Modal","OpenState","Pagination","Popover","Prism","Provider","QrCode","Radio","Segmented","Select","Size","Skeleton","Spin","Status","Switch","Table","Tabs","Tag","Tree","Typography","customElement","dayjs","fromSchema","generateColor","getCurrentElement","getOptions","hot","icon","mdStyle","noShadowDOM","notification","registry","theme","toneColor","withSolid"],"mappings":"kKAEoBA,MAAM,mBAANA,SAAM,EAEbC,WAAW,mBAAXA,SAAW,EAIJC,OAAO,mBAAPA,SAAO,EAEPC,MAAM,mBAANA,SAAM,EAEbC,aAAa,mBAAbA,SAAa,EAINC,QAAQ,mBAARA,SAAQ,EAEfC,QAAQ,mBAARA,SAAQ,EAMDC,IAAI,mBAAJA,SAAI,EACJC,QAAQ,mBAARA,SAAQ,EAEfC,YAAY,mBAAZA,SAAY,EAKZC,WAAW,mBAAXA,SAAW,EAIJC,IAAI,mBAAJA,SAAI,EACJC,UAAU,mBAAVA,SAAU,EAGjBC,QAAQ,mBAARA,SAAQ,EAMDC,KAAK,mBAALA,SAAK,EArCmBC,SAAS,mBAATA,WAAS,EAwCjCC,UAAU,mBAAVA,SAAU,EAEjBC,aAAa,mBAAbA,SAAa,EAKNC,GAAG,mBAAHA,SAAG,EACHC,KAAK,mBAALA,SAAK,EAEZC,WAAW,mBAAXA,SAAW,EAIJC,EAAE,mBAAFA,SAAE,EAGTC,IAAI,mBAAJA,SAAI,EAQJC,KAAK,mBAALA,SAAK,EAGhBC,SAAS,mBAATA,WAAS,EAQSC,UAAU,mBAAVA,SAAU,EACVC,OAAO,mBAAPA,SAAO,EACPC,KAAK,mBAALA,SAAK,EACLC,QAAQ,mBAARA,SAAQ,EACOC,MAAM,mBAANA,SAAM,EACrBC,KAAK,mBAALA,SAAK,EACLC,SAAS,mBAATA,SAAS,EAEhBC,MAAM,mBAANA,SAAM,EApFoCC,IAAI,mBAAJA,MAAI,EA0FvCC,QAAQ,mBAARA,SAAQ,EACRC,IAAI,mBAAJA,SAAI,EA3FqCC,MAAM,mBAANA,QAAM,EA4F/CC,MAAM,mBAANA,SAAM,EACNC,KAAK,mBAALA,SAAK,EACWC,IAAI,mBAAJA,SAAI,EACpBC,GAAG,mBAAHA,SAAG,EASVC,IAAI,mBAAJA,SAAI,EAeGC,UAAU,mBAAVA,SAAU,EAErBC,aAAa,mBAAbA,eAAa,EA5FFC,KAAK,mBAALA,SAAK,EASLC,UAAU,mBAAVA,SAAU,EA4D5BC,aAAa,mBAAbA,eAAa,EAuBSC,iBAAiB,mBAAjBA,mBAAiB,EAlFrBC,UAAU,mBAAVA,SAAU,EAkFaC,GAAG,mBAAHA,KAAG,EA3E1BC,IAAI,mBAAJA,SAAI,EASJC,OAAO,mBAAPA,SAAO,EAkEqBC,WAAW,mBAAXA,aAAW,EAjD9CC,YAAY,mBAAZA,SAAY,EAmDhBC,QAAQ,mBAARA,UAAQ,EAxBJC,KAAK,mBAALA,SAAK,EAEhBC,SAAS,mBAATA,WAAS,EAoBkDC,SAAS,mBAATA,WAAS,sBAhIE,yBAKjE,+BACoE,yBACA,8BACH,yBAKjE,iCACuE,2BAOvE,2BAC0E,uBACH,2BAKvE,gCAKA,+BAC2D,uBACkB,8BACnD,oCAO1B,2BAC8D,wBAC/B,8BACA,8BAC8C,8BAK7E,iCAC6C,uBACW,sBACM,wBAK9D,+BACqD,qBACzB,2BAQ5B,uBAOA,wBAKA,+BAC6E,6BACT,0BAC1C,wBAC6C,2BACS,yBACA,wBACN,4BAO1E,yBACuE,2BACZ,uBACM,yBACH,wBACa,uBACnB,sBAOxD,wBAgBA,uBAC6E,2BAEN,2BAErD"}
|
|
1
|
+
{"version":3,"sources":["components/index.ts"],"sourcesContent":["'use client';\n\nexport { default as Avatar, type AvatarElement, type AvatarProps } from './avatar';\nexport {\n default as AvatarGroup,\n type AvatarGroupElement,\n type AvatarGroupProps,\n} from './avatar/group';\nexport { default as BackTop, type BackTopElement, type BackTopProps } from './back-top';\nexport { type BaseOption, type BasicConfig, FieldName, Size, Status } from './basic-config';\nexport { default as Button, type ButtonElement, type ButtonProps } from './button';\nexport {\n default as CaptureScreen,\n type CaptureScreenElement,\n type CaptureScreenProps,\n} from './capture-screen';\nexport { default as Carousel, type CarouselElement, type CarouselProps } from './carousel';\nexport {\n default as Checkbox,\n type CheckboxBoolElement,\n type CheckboxBoolProps,\n type CheckboxGroupElement,\n type CheckboxGroupProps,\n} from './checkbox';\nexport { default as Code, type CodeElement, type CodeProps, type Language } from './code';\nexport { default as Collapse, type CollapseElement, type CollapseProps } from './collapse';\nexport {\n default as ColorPalette,\n type ColorPaletteElement,\n type ColorPaletteProps,\n} from './color-palette';\nexport {\n default as ColorPicker,\n type ColorPickerElement,\n type ColorPickerProps,\n} from './color-picker';\nexport { default as Cron, type CronElement, type CronProps } from './cron';\nexport { default as DatePicker, type DatePickerElement, type DatePickerProps } from './date-picker';\nexport { default as dayjs } from './date-picker/dayjs';\nexport {\n default as Dropdown,\n type DropdownElement,\n type DropdownMultipleElement,\n type DropdownMultipleProps,\n type DropdownProps,\n} from './dropdown';\nexport { default as Empty, type EmptyElement, type EmptyProps } from './empty';\nexport { default as fromSchema } from './from-schema';\nexport { default as getOptions } from './get-options';\nexport { default as GlassPanel, type GlassPanelElement, type GlassPanelProps } from './glass-panel';\nexport {\n default as HighlightText,\n type HighlightTextElement,\n type HighlightTextProps,\n} from './highlight-text';\nexport { default as icon, type IconAttribute } from './icon';\nexport { default as Img, type ImgElement, type ImgProps } from './img';\nexport { default as Input, type InputElement, type InputProps } from './input';\nexport {\n default as InputNumber,\n type InputNumberElement,\n type InputNumberProps,\n} from './input-number';\nexport { default as Marquee, type MarqueeElement, type MarqueeProps } from './marquee';\nexport { default as Md, type MdElement, type MdProps } from './md';\nexport { default as mdStyle } from './md-style';\nexport {\n default as Menu,\n type MenuElement,\n type MenuMultipleElement,\n type MenuMultipleProps,\n type MenuOption,\n type MenuProps,\n} from './menu';\nexport {\n default as Modal,\n type ModalElement,\n type ModalProps,\n OpenState,\n type OpenStateKey,\n} from './modal';\nexport {\n default as notification,\n type NotificationProps,\n type NotificationType,\n} from './notification';\nexport { default as Pagination, type PaginationElement, type PaginationProps } from './pagination';\nexport { default as Popover, type PopoverElement, type PopoverProps } from './popover';\nexport { default as Prism } from './prism';\nexport { default as Provider, type ProviderElement, type ProviderProps } from './provider';\nexport { type IntRange, default as QrCode, type QrCodeElement, type QrCodeProps } from './qrcode';\nexport { default as Radio, type RadioElement, type RadioOption, type RadioProps } from './radio';\nexport { default as Segmented, type SegmentedElement, type SegmentedProps } from './segmented';\nexport {\n default as Select,\n type SelectElement,\n type SelectMultipleElement,\n type SelectMultipleProps,\n type SelectProps,\n} from './select';\nexport { default as Skeleton, type SkeletonElement, type SkeletonProps } from './skeleton';\nexport { default as Spin, type SpinElement, type SpinProps } from './spin';\nexport { default as Switch, type SwitchElement, type SwitchProps } from './switch';\nexport { default as Table, type TableElement, type TableProps } from './table';\nexport { type TabOption, default as Tabs, type TabsElement, type TabsProps } from './tabs';\nexport { default as Tag, type TagElement, type TagProps } from './tag';\nexport {\n type ColorScheme,\n generateColor,\n default as theme,\n type ThemeOption,\n toneColor,\n} from './theme';\nexport {\n default as Tree,\n type TreeData,\n type TreeElement,\n type TreeMultipleElement,\n type TreeMultipleProps,\n type TreeMultipleSchemaElement,\n type TreeMultipleSchemaProps,\n type TreeMultipleStringElement,\n type TreeMultipleStringProps,\n type TreeProps,\n type TreeSchemaElement,\n type TreeSchemaProps,\n type TreeStringElement,\n type TreeStringProps,\n} from './tree';\nexport { default as Typography, type TypographyElement, type TypographyProps } from './typography';\nexport type { CustomElement } from 'custom-element-type';\nexport { customElement, getCurrentElement, hot, noShadowDOM, withSolid } from 'solid-element';\nimport type { ICustomElement, Transform } from 'custom-element-type';\nexport { registry } from './utils';\n\nimport type {\n AvatarElement,\n AvatarGroupElement,\n BackTopElement,\n ButtonElement,\n CaptureScreenElement,\n CarouselElement,\n CheckboxBoolElement,\n CheckboxGroupElement,\n CodeElement,\n CollapseElement,\n ColorPaletteElement,\n ColorPickerElement,\n CronElement,\n DatePickerElement,\n DropdownElement,\n DropdownMultipleElement,\n EmptyElement,\n GlassPanelElement,\n HighlightTextElement,\n ImgElement,\n InputElement,\n InputNumberElement,\n MarqueeElement,\n MdElement,\n MenuElement,\n MenuMultipleElement,\n ModalElement,\n PaginationElement,\n PopoverElement,\n ProviderElement,\n QrCodeElement,\n RadioElement,\n SegmentedElement,\n SelectElement,\n SelectMultipleElement,\n SkeletonElement,\n SpinElement,\n SwitchElement,\n TableElement,\n TabsElement,\n TagElement,\n TreeElement,\n TreeMultipleElement,\n TreeMultipleSchemaElement,\n TreeMultipleStringElement,\n TreeSchemaElement,\n TreeStringElement,\n TypographyElement,\n} from '.';\n\n/** 组件列表\n * @author monako97\n * @ignore optional\n */\ninterface CustomElementTags {\n /** 头像 */\n 'n-avatar': AvatarElement;\n /** 头像组 */\n 'n-avatar-group': AvatarGroupElement;\n /** 返回顶部 */\n 'n-back-top': BackTopElement;\n /** 按钮 */\n 'n-button': ButtonElement;\n /** 捕获屏幕 */\n 'n-capture-screen': CaptureScreenElement;\n /** 走马灯、轮播 */\n 'n-carousel': CarouselElement;\n /** 复选框 */\n 'n-checkbox': CheckboxBoolElement | CheckboxGroupElement;\n /** 代码框 */\n 'n-code': CodeElement;\n /** 取色器 */\n 'n-color-palette': ColorPaletteElement;\n /** 取色器(弹出类型) */\n 'n-color-picker': ColorPickerElement;\n /** 下拉面板 */\n 'n-dropdown': DropdownElement | DropdownMultipleElement;\n /** 空面板 */\n 'n-empty': EmptyElement;\n /** 匹配高亮文字 */\n 'n-highlight-text': HighlightTextElement;\n /** 图片查看器 */\n 'n-img': ImgElement;\n /** 输入框 */\n 'n-input': InputElement;\n /** 数字输入框 */\n 'n-input-number': InputNumberElement;\n /** Markdown渲染 */\n 'n-md': MdElement;\n /** 弹出气泡面板 */\n 'n-popover': PopoverElement;\n /** 单选项 */\n 'n-radio': RadioElement;\n /** 分段控制器 */\n 'n-segmented': SegmentedElement;\n /** 下拉选择框 */\n 'n-select': SelectElement | SelectMultipleElement;\n /** 骨架屏 */\n 'n-skeleton': SkeletonElement;\n /** 加载中 */\n 'n-spin': SpinElement;\n /** 开关 */\n 'n-switch': SwitchElement;\n /** 树形渲染 */\n 'n-tree':\n | TreeElement\n | TreeStringElement\n | TreeSchemaElement\n | TreeMultipleElement\n | TreeMultipleStringElement\n | TreeMultipleSchemaElement;\n /** 文字排版 */\n 'n-typography': TypographyElement;\n /** 标签页 */\n 'n-tabs': TabsElement;\n /** 标签 */\n 'n-tag': TagElement;\n /** 导航菜单 */\n 'n-menu': MenuElement | MenuMultipleElement;\n /** Cron表达式编辑器 */\n 'n-cron': CronElement;\n /** 日期选择器\n * @since 2.1.0\n */\n 'n-data-picker': DatePickerElement;\n /** 数据表格\n * @since 2.2.0\n */\n 'n-table': TableElement;\n /** 分页器\n * @since 2.2.0\n */\n 'n-pagination': PaginationElement;\n /** 响应内部变化\n * @since 2.3.0\n */\n 'n-provider': ProviderElement;\n /** 模态框\n * @since 2.6.0\n */\n 'n-modal': ModalElement;\n /**\n * 二维码\n * @since 2.9.0\n */\n 'n-qrcode': QrCodeElement;\n /**\n * 折叠面板\n * @since 2.10.0\n */\n 'n-collapse': CollapseElement;\n /**\n * 玻璃面板\n * @since 2.12.0\n */\n 'n-glass-panel': GlassPanelElement;\n /**\n * 跑马灯\n * @since 2.13.0\n */\n 'n-marquee': MarqueeElement;\n}\ntype IntrinsicNekoElement = Transform<CustomElementTags>;\n\ndeclare module 'solid-js' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\ndeclare module 'react' {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n export namespace JSX {\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface IntrinsicElements extends IntrinsicNekoElement {}\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n interface HTMLElementTagNameMap extends IntrinsicNekoElement {}\n}\n\nexport interface ComponentOptions<T> {\n element: T & ICustomElement;\n}\n"],"names":["Avatar","AvatarGroup","BackTop","Button","CaptureScreen","Carousel","Checkbox","Code","Collapse","ColorPalette","ColorPicker","Cron","DatePicker","Dropdown","Empty","FieldName","GlassPanel","HighlightText","Img","Input","InputNumber","Marquee","Md","Menu","Modal","OpenState","Pagination","Popover","Prism","Provider","QrCode","Radio","Segmented","Select","Size","Skeleton","Spin","Status","Switch","Table","Tabs","Tag","Tree","Typography","customElement","dayjs","fromSchema","generateColor","getCurrentElement","getOptions","hot","icon","mdStyle","noShadowDOM","notification","registry","theme","toneColor","withSolid"],"mappings":"kKAEoBA,MAAM,mBAANA,SAAM,EAEbC,WAAW,mBAAXA,SAAW,EAIJC,OAAO,mBAAPA,SAAO,EAEPC,MAAM,mBAANA,SAAM,EAEbC,aAAa,mBAAbA,SAAa,EAINC,QAAQ,mBAARA,SAAQ,EAEfC,QAAQ,mBAARA,SAAQ,EAMDC,IAAI,mBAAJA,SAAI,EACJC,QAAQ,mBAARA,SAAQ,EAEfC,YAAY,mBAAZA,SAAY,EAKZC,WAAW,mBAAXA,SAAW,EAIJC,IAAI,mBAAJA,SAAI,EACJC,UAAU,mBAAVA,SAAU,EAGjBC,QAAQ,mBAARA,SAAQ,EAMDC,KAAK,mBAALA,SAAK,EArCmBC,SAAS,mBAATA,WAAS,EAwCjCC,UAAU,mBAAVA,SAAU,EAEjBC,aAAa,mBAAbA,SAAa,EAKNC,GAAG,mBAAHA,SAAG,EACHC,KAAK,mBAALA,SAAK,EAEZC,WAAW,mBAAXA,SAAW,EAIJC,OAAO,mBAAPA,SAAO,EACPC,EAAE,mBAAFA,SAAE,EAGTC,IAAI,mBAAJA,SAAI,EAQJC,KAAK,mBAALA,SAAK,EAGhBC,SAAS,mBAATA,WAAS,EAQSC,UAAU,mBAAVA,SAAU,EACVC,OAAO,mBAAPA,SAAO,EACPC,KAAK,mBAALA,SAAK,EACLC,QAAQ,mBAARA,SAAQ,EACOC,MAAM,mBAANA,SAAM,EACrBC,KAAK,mBAALA,SAAK,EACLC,SAAS,mBAATA,SAAS,EAEhBC,MAAM,mBAANA,SAAM,EArFoCC,IAAI,mBAAJA,MAAI,EA2FvCC,QAAQ,mBAARA,SAAQ,EACRC,IAAI,mBAAJA,SAAI,EA5FqCC,MAAM,mBAANA,QAAM,EA6F/CC,MAAM,mBAANA,SAAM,EACNC,KAAK,mBAALA,SAAK,EACWC,IAAI,mBAAJA,SAAI,EACpBC,GAAG,mBAAHA,SAAG,EASVC,IAAI,mBAAJA,SAAI,EAeGC,UAAU,mBAAVA,SAAU,EAErBC,aAAa,mBAAbA,eAAa,EA7FFC,KAAK,mBAALA,SAAK,EASLC,UAAU,mBAAVA,SAAU,EA6D5BC,aAAa,mBAAbA,eAAa,EAuBSC,iBAAiB,mBAAjBA,mBAAiB,EAnFrBC,UAAU,mBAAVA,SAAU,EAmFaC,GAAG,mBAAHA,KAAG,EA5E1BC,IAAI,mBAAJA,SAAI,EAUJC,OAAO,mBAAPA,SAAO,EAkEqBC,WAAW,mBAAXA,aAAW,EAjD9CC,YAAY,mBAAZA,SAAY,EAmDhBC,QAAQ,mBAARA,UAAQ,EAxBJC,KAAK,mBAALA,SAAK,EAEhBC,SAAS,mBAATA,WAAS,EAoBkDC,SAAS,mBAATA,WAAS,sBAjIE,yBAKjE,+BACoE,yBACA,8BACH,yBAKjE,iCACuE,2BAOvE,2BAC0E,uBACH,2BAKvE,gCAKA,+BAC2D,uBACkB,8BACnD,oCAO1B,2BAC8D,wBAC/B,8BACA,8BAC8C,8BAK7E,iCAC6C,uBACW,sBACM,wBAK9D,+BACoE,0BACf,qBACzB,2BAQ5B,uBAOA,wBAKA,+BAC6E,6BACT,0BAC1C,wBAC6C,2BACS,yBACA,wBACN,4BAO1E,yBACuE,2BACZ,uBACM,yBACH,wBACa,uBACnB,sBAOxD,wBAgBA,uBAC6E,2BAEN,2BAErD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type JSXElement } from '../basic-config';
|
|
2
|
+
export interface MarqueeProps {
|
|
3
|
+
/** 自定义类名 */
|
|
4
|
+
class?: string;
|
|
5
|
+
/** 自定义样式表 */
|
|
6
|
+
css?: string;
|
|
7
|
+
/** 是否在 hover 时暂停
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
hoverPause?: boolean;
|
|
11
|
+
/** 滚动速度(单位:秒)
|
|
12
|
+
* @default 15
|
|
13
|
+
*/
|
|
14
|
+
speed?: number;
|
|
15
|
+
children?: JSXElement | JSXElement[];
|
|
16
|
+
}
|
|
17
|
+
/** 跑马灯 */
|
|
18
|
+
declare const Marquee: {
|
|
19
|
+
(_: MarqueeProps): import("solid-js").JSX.Element;
|
|
20
|
+
registry(): void;
|
|
21
|
+
};
|
|
22
|
+
export type MarqueeElement = CustomElement<MarqueeProps>;
|
|
23
|
+
export default Marquee;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"default",{enumerable:!0,get:function(){return y}});const e=require("solid-js/web"),t=require("solid-js"),r=i(require("@moneko/common/lib/isFunction")),n=require("@moneko/css"),o=require("solid-element"),l=require("../basic-config"),s=a(require("../theme")),u=require("./style");function i(e){return e&&e.__esModule?e:{default:e}}function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var s=o?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(n,l,s):n[l]=e[l]}return n.default=e,r&&r.set(e,n),n}const f=(0,e.template)("<style> "),d=(0,e.template)("<style>"),p=(0,e.template)("<div>"),m=(0,e.template)('<div class="item">'),h=o=>{let l;let{baseStyle:i}=s.default,c=(0,t.mergeProps)({speed:15,hoverPause:!0},o),[a,h]=(0,t.createSignal)(2);return(0,t.createEffect)(()=>{if(l){let e=l.querySelector(".item");h(Math.ceil(l.offsetWidth/e.offsetWidth)+1)}}),[(()=>{let t=f(),r=t.firstChild;return(0,e.effect)(()=>r.data=i()),t})(),(()=>{let e=d();return e.textContent=u.style,e})(),(0,e.createComponent)(t.Show,{get when(){return c.css},get children(){let t=f(),r=t.firstChild;return(0,e.effect)(()=>r.data=(0,n.css)(c.css)),t}}),(()=>{let o=p(),s=l;return"function"==typeof s?(0,e.use)(s,o):l=o,(0,e.insert)(o,(0,e.createComponent)(t.For,{get each(){return Array.from({length:a()})},children:()=>(()=>{let n=m();return(0,e.insert)(n,(()=>{let n=(0,e.memo)(()=>!!Array.isArray(c.children));return()=>n()?(0,e.createComponent)(t.For,{get each(){return c.children},children:e=>(0,r.default)(e.cloneNode)?e.cloneNode(!0):e}):c.children})()),n})()})),(0,e.effect)(t=>{let r=(0,n.cx)("marquee",c.hoverPause&&"hover-pause"),l=`${c.speed}s`;return r!==t._v$&&(0,e.className)(o,t._v$=r),l!==t._v$2&&(null!=(t._v$2=l)?o.style.setProperty("--speed",l):o.style.removeProperty("--speed")),t},{_v$:void 0,_v$2:void 0}),o})()]};h.registry=()=>{(0,o.customElement)("n-marquee",{class:void 0,css:void 0,speed:15,hoverPause:!0},(r,n)=>{let o=n.element,u=(0,t.mergeProps)({children:[...o.childNodes.values()]},r);return(0,t.createEffect)(()=>{(0,l.clearAttribute)(o,["css"])}),[(()=>{let e=d();return e.textContent=s.block,e})(),(0,e.createComponent)(h,u)]})};const y=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/marquee/index.tsx"],"sourcesContent":["import { createEffect, createSignal, For, mergeProps, Show } from 'solid-js';\nimport { isFunction } from '@moneko/common';\nimport { css, cx } from '@moneko/css';\nimport { customElement } from 'solid-element';\n\nimport { clearAttribute, type JSXElement } from '../basic-config';\nimport theme, { block } from '../theme';\n\nimport { style } from './style';\n\nexport interface MarqueeProps {\n /** 自定义类名 */\n class?: string;\n /** 自定义样式表 */\n css?: string;\n /** 是否在 hover 时暂停\n * @default true\n */\n hoverPause?: boolean;\n /** 滚动速度(单位:秒)\n * @default 15\n */\n speed?: number;\n children?: JSXElement | JSXElement[];\n}\n\n/** 跑马灯 */\nconst Marquee = (_: MarqueeProps) => {\n const { baseStyle } = theme;\n let el: HTMLDivElement | undefined;\n const props = mergeProps(\n {\n speed: 15,\n hoverPause: true,\n },\n _,\n );\n const [count, setCount] = createSignal(2);\n\n createEffect(() => {\n if (el) {\n const item = el.querySelector('.item') as HTMLDivElement;\n\n setCount(Math.ceil(el.offsetWidth / item.offsetWidth) + 1);\n }\n });\n return (\n <>\n <style textContent={baseStyle()} />\n <style textContent={style} />\n <Show when={props.css}>\n <style textContent={css(props.css)} />\n </Show>\n <div\n ref={el}\n class={cx('marquee', props.hoverPause && 'hover-pause')}\n style={{ '--speed': `${props.speed}s` }}\n >\n <For each={Array.from({ length: count() })}>\n {() => (\n <div class=\"item\">\n {Array.isArray(props.children) ? (\n <For each={props.children}>\n {(item) => {\n return isFunction((item as HTMLElement).cloneNode)\n ? (item as HTMLElement).cloneNode(true)\n : item;\n }}\n </For>\n ) : (\n props.children\n )}\n </div>\n )}\n </For>\n </div>\n </>\n );\n};\n\nexport type MarqueeElement = CustomElement<MarqueeProps>;\n\nMarquee.registry = () => {\n customElement<MarqueeProps>(\n 'n-marquee',\n {\n class: void 0,\n css: void 0,\n speed: 15,\n hoverPause: true,\n },\n (_, opt) => {\n const el = opt.element;\n const props = mergeProps(\n {\n children: [...el.childNodes.values()],\n },\n _,\n );\n\n createEffect(() => {\n clearAttribute(el, ['css']);\n });\n return (\n <>\n <style textContent={block} />\n <Marquee {...props} />\n </>\n );\n },\n );\n};\n\nexport default Marquee;\n"],"names":["Marquee","_","el","baseStyle","theme","props","mergeProps","speed","hoverPause","count","setCount","createSignal","createEffect","item","querySelector","Math","ceil","offsetWidth","style","Show","css","For","Array","from","length","isArray","children","isFunction","cloneNode","cx","registry","customElement","class","opt","element","childNodes","values","clearAttribute","block"],"mappings":"kGAiHA,+CAAA,+CAjHkE,wBACvC,4CACH,yBACM,2BAEkB,+BACnB,uBAEP,ywBAmBhBA,EAAU,AAACC,QAEXC,EADJ,GAAM,CAAEC,UAAAA,CAAS,CAAE,CAAGC,SAAK,CAErBC,EAAQC,GAAAA,YAAU,EACtB,CACEC,MAAO,GACPC,WAAY,CAAA,CACd,EACAP,GAEI,CAACQ,EAAOC,EAAS,CAAGC,GAAAA,cAAY,EAAC,GASvC,MAPAC,GAAAA,cAAY,EAAC,KACX,GAAIV,EAAI,CACN,IAAMW,EAAOX,EAAGY,aAAa,CAAC,SAE9BJ,EAASK,KAAKC,IAAI,CAACd,EAAGe,WAAW,CAAGJ,EAAKI,WAAW,EAAI,EAC1D,CACF,iEAGwBd,gDACAe,OAAK,6BACxBC,MAAI,oBAAOd,EAAMe,GAAG,wEACCA,GAAAA,KAAG,EAACf,EAAMe,GAAG,0BAG5BlB,4CAAAA,yCAIJmB,KAAG,oBAAOC,MAAMC,IAAI,CAAC,CAAEC,OAAQf,GAAQ,aACrC,sEAEIa,MAAMG,OAAO,CAACpB,EAAMqB,QAAQ,aAA5BJ,0BACED,KAAG,oBAAOhB,EAAMqB,QAAQ,WACtB,AAACb,GACOc,GAAAA,SAAU,EAAC,AAACd,EAAqBe,SAAS,EAC7C,AAACf,EAAqBe,SAAS,CAAC,CAAA,GAChCf,IAIRR,EAAMqB,QAAQ,sCAffG,GAAAA,IAAE,EAAC,UAAWxB,EAAMG,UAAU,EAAI,iBACrB,CAAC,EAAEH,EAAME,KAAK,CAAC,CAAC,CAAC,mLAsB7C,CAIAP,CAAAA,EAAQ8B,QAAQ,CAAG,KACjBC,GAAAA,eAAa,EACX,YACA,CACEC,MAAO,KAAK,EACZZ,IAAK,KAAK,EACVb,MAAO,GACPC,WAAY,CAAA,CACd,EACA,CAACP,EAAGgC,KACF,IAAM/B,EAAK+B,EAAIC,OAAO,CAChB7B,EAAQC,GAAAA,YAAU,EACtB,CACEoB,SAAU,IAAIxB,EAAGiC,UAAU,CAACC,MAAM,GAAG,AACvC,EACAnC,GAMF,MAHAW,GAAAA,cAAY,EAAC,KACXyB,GAAAA,gBAAc,EAACnC,EAAI,CAAC,MAAM,CAC5B,yCAGwBoC,OAAK,6BACxBtC,EAAYK,GAGnB,EAEJ,QAEA,EAAeL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const style: string;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"style",{enumerable:!0,get:function(){return n}});const e=require("@moneko/css"),n=(0,e.css)`
|
|
2
|
+
.marquee {
|
|
3
|
+
--speed: 15s;
|
|
4
|
+
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
margin: auto;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
|
|
12
|
+
&::before,
|
|
13
|
+
&::after {
|
|
14
|
+
content: '';
|
|
15
|
+
position: absolute;
|
|
16
|
+
z-index: 1000;
|
|
17
|
+
inset-block-start: 0;
|
|
18
|
+
inset-inline-start: 0;
|
|
19
|
+
inline-size: 15rem;
|
|
20
|
+
max-inline-size: 25%;
|
|
21
|
+
block-size: 100%;
|
|
22
|
+
background-image: linear-gradient(to right, var(--component-bg), transparent);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
inset-inline: auto 0;
|
|
27
|
+
background-image: linear-gradient(to left, var(--component-bg), transparent);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.item {
|
|
32
|
+
animation-duration: var(--speed);
|
|
33
|
+
animation-iteration-count: infinite;
|
|
34
|
+
animation-name: marquee-content;
|
|
35
|
+
animation-timing-function: linear;
|
|
36
|
+
padding: 5px 15px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hover-pause {
|
|
40
|
+
&:hover .item {
|
|
41
|
+
animation-play-state: paused;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes marquee-content {
|
|
46
|
+
from {
|
|
47
|
+
transform: translateX(0%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
to {
|
|
51
|
+
transform: translateX(-100%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/marquee/style.ts"],"sourcesContent":["import { css } from '@moneko/css';\n\nexport const style = css`\n .marquee {\n --speed: 15s;\n\n position: relative;\n display: flex;\n overflow: hidden;\n margin: auto;\n white-space: nowrap;\n inline-size: 100%;\n\n &::before,\n &::after {\n content: '';\n position: absolute;\n z-index: 1000;\n inset-block-start: 0;\n inset-inline-start: 0;\n inline-size: 15rem;\n max-inline-size: 25%;\n block-size: 100%;\n background-image: linear-gradient(to right, var(--component-bg), transparent);\n }\n\n &::after {\n inset-inline: auto 0;\n background-image: linear-gradient(to left, var(--component-bg), transparent);\n }\n }\n\n .item {\n animation-duration: var(--speed);\n animation-iteration-count: infinite;\n animation-name: marquee-content;\n animation-timing-function: linear;\n padding: 5px 15px;\n }\n\n .hover-pause {\n &:hover .item {\n animation-play-state: paused;\n }\n }\n\n @keyframes marquee-content {\n from {\n transform: translateX(0%);\n }\n\n to {\n transform: translateX(-100%);\n }\n }\n`;\n"],"names":["style","css"],"mappings":"kGAEaA,6CAAAA,qBAFO,eAEPA,EAAQC,GAAAA,KAAG,CAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDzB,CAAC"}
|