@lobehub/ui 5.9.7 → 5.10.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.
- package/es/Accordion/Accordion.mjs +28 -20
- package/es/Accordion/Accordion.mjs.map +1 -1
- package/es/Accordion/AccordionItem.mjs +14 -17
- package/es/Accordion/AccordionItem.mjs.map +1 -1
- package/es/Accordion/context.mjs +30 -6
- package/es/Accordion/context.mjs.map +1 -1
- package/es/icons/DingTalk/components/Avatar.d.mts +9 -0
- package/es/icons/DingTalk/components/Avatar.mjs +19 -0
- package/es/icons/DingTalk/components/Avatar.mjs.map +1 -0
- package/es/icons/DingTalk/components/Color.d.mts +7 -0
- package/es/icons/DingTalk/components/Color.mjs +27 -0
- package/es/icons/DingTalk/components/Color.mjs.map +1 -0
- package/es/icons/DingTalk/components/Mono.d.mts +7 -0
- package/es/icons/DingTalk/components/Mono.mjs +26 -0
- package/es/icons/DingTalk/components/Mono.mjs.map +1 -0
- package/es/icons/DingTalk/index.d.mts +15 -0
- package/es/icons/DingTalk/index.mjs +15 -0
- package/es/icons/DingTalk/index.mjs.map +1 -0
- package/es/icons/DingTalk/style.mjs +7 -0
- package/es/icons/DingTalk/style.mjs.map +1 -0
- package/es/icons/Line/components/Avatar.d.mts +9 -0
- package/es/icons/Line/components/Avatar.mjs +19 -0
- package/es/icons/Line/components/Avatar.mjs.map +1 -0
- package/es/icons/Line/components/Color.d.mts +7 -0
- package/es/icons/Line/components/Color.mjs +27 -0
- package/es/icons/Line/components/Color.mjs.map +1 -0
- package/es/icons/Line/components/Mono.d.mts +7 -0
- package/es/icons/Line/components/Mono.mjs +26 -0
- package/es/icons/Line/components/Mono.mjs.map +1 -0
- package/es/icons/Line/index.d.mts +15 -0
- package/es/icons/Line/index.mjs +15 -0
- package/es/icons/Line/index.mjs.map +1 -0
- package/es/icons/Line/style.mjs +7 -0
- package/es/icons/Line/style.mjs.map +1 -0
- package/es/icons/index.d.mts +17 -15
- package/es/icons/index.mjs +17 -15
- package/package.json +17 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { AccordionConfigContext, AccordionItemStateProvider } from "./context.mjs";
|
|
3
3
|
import { styles } from "./style.mjs";
|
|
4
|
-
import { Children, Fragment, isValidElement, memo, useCallback } from "react";
|
|
4
|
+
import { Children, Fragment, isValidElement, memo, useCallback, useMemo, useRef } from "react";
|
|
5
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Divider } from "antd";
|
|
7
7
|
import { cx } from "antd-style";
|
|
@@ -15,37 +15,45 @@ const Accordion = memo(({ children, className: userClassName, style: userStyle,
|
|
|
15
15
|
onChange: onExpandedChange,
|
|
16
16
|
value: expandedKeysProp
|
|
17
17
|
});
|
|
18
|
+
const expandedKeysRef = useRef(expandedKeys);
|
|
19
|
+
expandedKeysRef.current = expandedKeys;
|
|
20
|
+
const setExpandedKeysRef = useRef(setExpandedKeys);
|
|
21
|
+
setExpandedKeysRef.current = setExpandedKeys;
|
|
18
22
|
const toggleExpand = useCallback((key) => {
|
|
19
|
-
const prev =
|
|
23
|
+
const prev = expandedKeysRef.current;
|
|
20
24
|
let newKeys;
|
|
21
25
|
if (accordion) newKeys = prev.includes(key) ? [] : [key];
|
|
22
26
|
else newKeys = prev.includes(key) ? prev.filter((k) => k !== key) : [...prev, key];
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
expandedKeys,
|
|
27
|
-
setExpandedKeys
|
|
28
|
-
]);
|
|
29
|
-
const contextValue = {
|
|
27
|
+
setExpandedKeysRef.current(newKeys);
|
|
28
|
+
}, [accordion]);
|
|
29
|
+
const configValue = useMemo(() => ({
|
|
30
30
|
disableAnimation,
|
|
31
|
-
expandedKeys,
|
|
32
31
|
hideIndicator,
|
|
33
32
|
indicatorPlacement,
|
|
34
|
-
isExpanded: useCallback((key) => {
|
|
35
|
-
return expandedKeys.includes(key);
|
|
36
|
-
}, [expandedKeys]),
|
|
37
33
|
keepContentMounted,
|
|
38
34
|
motionProps,
|
|
39
|
-
onToggle: toggleExpand,
|
|
40
35
|
showDivider,
|
|
41
36
|
variant
|
|
42
|
-
}
|
|
37
|
+
}), [
|
|
38
|
+
disableAnimation,
|
|
39
|
+
hideIndicator,
|
|
40
|
+
indicatorPlacement,
|
|
41
|
+
keepContentMounted,
|
|
42
|
+
motionProps,
|
|
43
|
+
showDivider,
|
|
44
|
+
variant
|
|
45
|
+
]);
|
|
43
46
|
const content = /* @__PURE__ */ jsx(Fragment$1, { children: validChildren.map((child, index) => {
|
|
44
|
-
const childKey = child.props.itemKey
|
|
45
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
+
const childKey = child.props.itemKey ?? index;
|
|
48
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(AccordionItemStateProvider, {
|
|
49
|
+
isOpen: expandedKeys.includes(childKey),
|
|
50
|
+
itemKey: childKey,
|
|
51
|
+
onToggleKey: toggleExpand,
|
|
52
|
+
children: child
|
|
53
|
+
}), showDivider && index < validChildren.length - 1 && /* @__PURE__ */ jsx(Divider, { className: styles.divider })] }, childKey);
|
|
46
54
|
}) });
|
|
47
|
-
return /* @__PURE__ */ jsx(
|
|
48
|
-
value:
|
|
55
|
+
return /* @__PURE__ */ jsx(AccordionConfigContext, {
|
|
56
|
+
value: configValue,
|
|
49
57
|
children: /* @__PURE__ */ jsx("div", {
|
|
50
58
|
className: cx(styles.base, classNames?.base, userClassName),
|
|
51
59
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.mjs","names":[],"sources":["../../src/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { Divider } from 'antd';\nimport { cx } from 'antd-style';\nimport { LayoutGroup } from 'motion/react';\nimport { type Key } from 'react';\nimport { Children, Fragment, isValidElement, memo, useCallback } from 'react';\nimport useMergeState from 'use-merge-value';\n\nimport {
|
|
1
|
+
{"version":3,"file":"Accordion.mjs","names":[],"sources":["../../src/Accordion/Accordion.tsx"],"sourcesContent":["'use client';\n\nimport { Divider } from 'antd';\nimport { cx } from 'antd-style';\nimport { LayoutGroup } from 'motion/react';\nimport { type Key } from 'react';\nimport { Children, Fragment, isValidElement, memo, useCallback, useMemo, useRef } from 'react';\nimport useMergeState from 'use-merge-value';\n\nimport { AccordionConfigContext, AccordionItemStateProvider } from './context';\nimport { styles } from './style';\nimport { type AccordionProps } from './type';\n\nconst Accordion = memo<AccordionProps>(\n ({\n children,\n className: userClassName,\n style: userStyle,\n accordion = false,\n defaultExpandedKeys,\n expandedKeys: expandedKeysProp,\n onExpandedChange,\n variant = 'borderless',\n gap,\n showDivider = false,\n disableAnimation = false,\n hideIndicator = false,\n indicatorPlacement = 'start',\n keepContentMounted = true,\n classNames,\n styles: customStyles,\n motionProps,\n ref,\n ...rest\n }) => {\n // Convert children to array and filter valid elements\n const validChildren = Children.toArray(children).filter(isValidElement);\n\n // Collect all item keys\n const allItemKeys = validChildren.map((child, index) => (child.props as any).itemKey || index);\n\n // If defaultExpandedKeys or expandedKeys is undefined, expand all items by default\n const initialExpandedKeys = defaultExpandedKeys ?? allItemKeys;\n\n const [expandedKeys, setExpandedKeys] = useMergeState<Key[]>(initialExpandedKeys, {\n onChange: onExpandedChange,\n value: expandedKeysProp,\n });\n\n // Hold expandedKeys and setExpandedKeys via refs so toggleExpand can stay\n // reference-stable. use-merge-value's setter is recreated on every render,\n // so depending on it would force AccordionItemStateProvider's memoized\n // value to change identity each render — even when nothing toggled —\n // re-rendering every nested AccordionItem via \"context changed\".\n const expandedKeysRef = useRef(expandedKeys);\n expandedKeysRef.current = expandedKeys;\n const setExpandedKeysRef = useRef(setExpandedKeys);\n setExpandedKeysRef.current = setExpandedKeys;\n\n const toggleExpand = useCallback(\n (key: Key) => {\n const prev = expandedKeysRef.current;\n let newKeys: Key[];\n\n if (accordion) {\n newKeys = prev.includes(key) ? [] : [key];\n } else {\n newKeys = prev.includes(key) ? prev.filter((k: Key) => k !== key) : [...prev, key];\n }\n\n setExpandedKeysRef.current(newKeys);\n },\n [accordion],\n );\n\n const configValue = useMemo(\n () => ({\n disableAnimation,\n hideIndicator,\n indicatorPlacement,\n keepContentMounted,\n motionProps,\n showDivider,\n variant,\n }),\n [\n disableAnimation,\n hideIndicator,\n indicatorPlacement,\n keepContentMounted,\n motionProps,\n showDivider,\n variant,\n ],\n );\n\n const content = (\n <>\n {validChildren.map((child, index) => {\n const childKey = (child.props as any).itemKey ?? index;\n const itemIsOpen = expandedKeys.includes(childKey);\n return (\n <Fragment key={childKey}>\n <AccordionItemStateProvider\n isOpen={itemIsOpen}\n itemKey={childKey}\n onToggleKey={toggleExpand}\n >\n {child}\n </AccordionItemStateProvider>\n {showDivider && index < validChildren.length - 1 && (\n <Divider className={styles.divider} />\n )}\n </Fragment>\n );\n })}\n </>\n );\n\n return (\n <AccordionConfigContext value={configValue}>\n <div\n className={cx(styles.base, classNames?.base, userClassName)}\n ref={ref}\n style={{\n gap: gap,\n ...customStyles?.base,\n ...userStyle,\n }}\n {...rest}\n >\n {disableAnimation ? content : <LayoutGroup>{content}</LayoutGroup>}\n </div>\n </AccordionConfigContext>\n );\n },\n);\n\nAccordion.displayName = 'Accordion';\n\nexport default Accordion;\n"],"mappings":";;;;;;;;;;AAaA,MAAM,YAAY,MACf,EACC,UACA,WAAW,eACX,OAAO,WACP,YAAY,OACZ,qBACA,cAAc,kBACd,kBACA,UAAU,cACV,KACA,cAAc,OACd,mBAAmB,OACnB,gBAAgB,OAChB,qBAAqB,SACrB,qBAAqB,MACrB,YACA,QAAQ,cACR,aACA,KACA,GAAG,WACC;CAEJ,MAAM,gBAAgB,SAAS,QAAQ,SAAS,CAAC,OAAO,eAAe;CAGvE,MAAM,cAAc,cAAc,KAAK,OAAO,UAAW,MAAM,MAAc,WAAW,MAAM;CAK9F,MAAM,CAAC,cAAc,mBAAmB,cAFZ,uBAAuB,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
|
"use client";
|
|
2
2
|
import { useMotionComponent } from "../MotionProvider/index.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { useAccordionConfig, useAccordionItemState } from "./context.mjs";
|
|
4
4
|
import { styles } from "./style.mjs";
|
|
5
5
|
import FlexBasic_default from "../Flex/FlexBasic.mjs";
|
|
6
6
|
import Block from "../Block/Block.mjs";
|
|
@@ -113,36 +113,36 @@ const AccordionItemContent = memo(({ disableAnimation, isOpen, keepContentMounte
|
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
AccordionItemContent.displayName = "AccordionItemContent";
|
|
116
|
-
const AccordionItem = memo(({
|
|
117
|
-
const
|
|
116
|
+
const AccordionItem = memo(({ title, children, action, alwaysShowAction = false, disabled = false, allowExpand = true, hideIndicator: itemHideIndicator, indicatorPlacement: itemIndicatorPlacement, indicator: customIndicator, classNames, paddingInline = 16, paddingBlock = 8, padding, ref, variant: customVariant, styles: customStyles, headerWrapper, defaultExpand, expand, onExpandChange }) => {
|
|
117
|
+
const itemStateContext = useAccordionItemState();
|
|
118
|
+
const configContext = useAccordionConfig();
|
|
118
119
|
const isStandalone = expand !== void 0 || defaultExpand !== void 0;
|
|
119
120
|
const [isExpandedStandalone, setIsExpandedStandalone] = useMergeState(defaultExpand ?? false, {
|
|
120
121
|
onChange: onExpandChange,
|
|
121
122
|
value: expand
|
|
122
123
|
});
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const contextMotionProps = context?.motionProps;
|
|
130
|
-
const contextVariant = context?.variant ?? "borderless";
|
|
124
|
+
const contextHideIndicator = configContext?.hideIndicator;
|
|
125
|
+
const contextIndicatorPlacement = configContext?.indicatorPlacement;
|
|
126
|
+
const contextKeepContentMounted = configContext?.keepContentMounted;
|
|
127
|
+
const contextDisableAnimation = configContext?.disableAnimation;
|
|
128
|
+
const contextMotionProps = configContext?.motionProps;
|
|
129
|
+
const contextVariant = configContext?.variant ?? "borderless";
|
|
131
130
|
const isInitialRenderRef = useRef(true);
|
|
132
131
|
useEffect(() => {
|
|
133
132
|
isInitialRenderRef.current = false;
|
|
134
133
|
}, []);
|
|
135
|
-
const isOpen = isStandalone ? isExpandedStandalone :
|
|
134
|
+
const isOpen = isStandalone ? isExpandedStandalone : itemStateContext?.isOpen ?? false;
|
|
136
135
|
const hideIndicatorFinal = itemHideIndicator ?? contextHideIndicator ?? false;
|
|
137
136
|
const indicatorPlacementFinal = itemIndicatorPlacement ?? contextIndicatorPlacement ?? "start";
|
|
138
137
|
const keepContentMounted = contextKeepContentMounted ?? true;
|
|
139
138
|
const disableAnimation = contextDisableAnimation ?? false;
|
|
140
139
|
const variant = customVariant || contextVariant;
|
|
140
|
+
const contextOnToggle = itemStateContext?.onToggle;
|
|
141
141
|
const handleToggle = useCallback(() => {
|
|
142
142
|
if (!allowExpand) return;
|
|
143
143
|
if (!disabled) {
|
|
144
144
|
if (isStandalone) setIsExpandedStandalone(!isExpandedStandalone);
|
|
145
|
-
else if (contextOnToggle) contextOnToggle(
|
|
145
|
+
else if (contextOnToggle) contextOnToggle();
|
|
146
146
|
}
|
|
147
147
|
}, [
|
|
148
148
|
allowExpand,
|
|
@@ -150,8 +150,7 @@ const AccordionItem = memo(({ itemKey, title, children, action, alwaysShowAction
|
|
|
150
150
|
isStandalone,
|
|
151
151
|
setIsExpandedStandalone,
|
|
152
152
|
isExpandedStandalone,
|
|
153
|
-
contextOnToggle
|
|
154
|
-
itemKey
|
|
153
|
+
contextOnToggle
|
|
155
154
|
]);
|
|
156
155
|
const handleKeyDown = useCallback((e) => {
|
|
157
156
|
if (!allowExpand || disabled) return;
|
|
@@ -228,8 +227,6 @@ const AccordionItem = memo(({ itemKey, title, children, action, alwaysShowAction
|
|
|
228
227
|
}), [
|
|
229
228
|
action,
|
|
230
229
|
alwaysShowAction,
|
|
231
|
-
cx,
|
|
232
|
-
styles,
|
|
233
230
|
classNames?.action,
|
|
234
231
|
customStyles?.action
|
|
235
232
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.mjs","names":["Flexbox"],"sources":["../../src/Accordion/AccordionItem.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { AnimatePresence } from 'motion/react';\nimport {\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type KeyboardEvent,\n memo,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport useMergeState from 'use-merge-value';\n\nimport Block from '@/Block';\nimport { Flexbox } from '@/Flex';\nimport { type MotionComponentType, useMotionComponent } from '@/MotionProvider';\nimport Text from '@/Text';\nimport { stopPropagation } from '@/utils/dom';\n\nimport ArrowIcon from './ArrowIcon';\nimport { useAccordionContext } from './context';\nimport { styles } from './style';\nimport { type AccordionItemProps } from './type';\n\ntype AccordionContentBaseProps = {\n children?: ReactNode;\n className?: string;\n contentInnerClassName: string;\n style?: CSSProperties;\n};\n\ntype AccordionStaticContentProps = AccordionContentBaseProps & {\n isOpen: boolean;\n keepContentMounted: boolean;\n};\n\ntype MotionDivProps = ComponentPropsWithoutRef<MotionComponentType['div']>;\n\ntype AccordionMotionContentProps = AccordionContentBaseProps & {\n contextMotionProps?: MotionDivProps;\n isOpen: boolean;\n skipInitialAnimation: boolean;\n};\n\ntype AccordionItemContentProps = AccordionContentBaseProps & {\n contextMotionProps?: MotionDivProps;\n disableAnimation: boolean;\n isOpen: boolean;\n keepContentMounted: boolean;\n skipInitialAnimation: boolean;\n};\n\nconst motionContainerStyle: CSSProperties = { overflow: 'hidden' };\n\nconst AccordionStaticContent = memo<AccordionStaticContentProps>(\n ({ className, style, children, contentInnerClassName, isOpen, keepContentMounted }) => {\n if (keepContentMounted) {\n return (\n <div\n className={className}\n role=\"region\"\n style={{\n display: isOpen ? 'block' : 'none',\n ...style,\n }}\n >\n <div className={contentInnerClassName}>{children}</div>\n </div>\n );\n }\n\n if (!isOpen) return null;\n\n return (\n <div className={className} role=\"region\" style={style}>\n <div className={contentInnerClassName}>{children}</div>\n </div>\n );\n },\n);\n\nAccordionStaticContent.displayName = 'AccordionStaticContent';\n\nconst AccordionMotionContent = memo<AccordionMotionContentProps>(\n ({\n contextMotionProps,\n className,\n style,\n children,\n contentInnerClassName,\n isOpen,\n skipInitialAnimation,\n }) => {\n const Motion = useMotionComponent();\n\n const motionProps = useMemo(\n () => ({\n animate: 'enter',\n exit: 'exit',\n initial: skipInitialAnimation ? false : 'exit',\n variants: {\n enter: {\n height: 'auto',\n opacity: 1,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n },\n },\n exit: {\n height: 0,\n opacity: 0,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n },\n },\n },\n ...contextMotionProps,\n }),\n [contextMotionProps, skipInitialAnimation],\n );\n\n return (\n <AnimatePresence initial={false}>\n {isOpen ? (\n <Motion.div {...(motionProps as any)} style={motionContainerStyle}>\n <div className={className} role=\"region\" style={style}>\n <div className={contentInnerClassName}>{children}</div>\n </div>\n </Motion.div>\n ) : null}\n </AnimatePresence>\n );\n },\n);\n\nAccordionMotionContent.displayName = 'AccordionMotionContent';\n\nconst AccordionItemContent = memo<AccordionItemContentProps>(\n ({\n disableAnimation,\n isOpen,\n keepContentMounted,\n className,\n style,\n children,\n contentInnerClassName,\n contextMotionProps,\n skipInitialAnimation,\n }) => {\n if (disableAnimation || !keepContentMounted) {\n return (\n <AccordionStaticContent\n className={className}\n contentInnerClassName={contentInnerClassName}\n isOpen={isOpen}\n keepContentMounted={keepContentMounted}\n style={style}\n >\n {children}\n </AccordionStaticContent>\n );\n }\n\n return (\n <AccordionMotionContent\n className={className}\n contentInnerClassName={contentInnerClassName}\n contextMotionProps={contextMotionProps}\n isOpen={isOpen}\n skipInitialAnimation={skipInitialAnimation}\n style={style}\n >\n {children}\n </AccordionMotionContent>\n );\n },\n);\n\nAccordionItemContent.displayName = 'AccordionItemContent';\n\nconst AccordionItem = memo<AccordionItemProps>(\n ({\n itemKey,\n title,\n children,\n action,\n alwaysShowAction = false,\n disabled = false,\n allowExpand = true,\n hideIndicator: itemHideIndicator,\n indicatorPlacement: itemIndicatorPlacement,\n indicator: customIndicator,\n classNames,\n paddingInline = 16,\n paddingBlock = 8,\n padding,\n ref,\n variant: customVariant,\n styles: customStyles,\n headerWrapper,\n defaultExpand,\n expand,\n onExpandChange,\n }) => {\n const context = useAccordionContext();\n\n // Determine if using standalone mode (has expand or defaultExpand props)\n const isStandalone = expand !== undefined || defaultExpand !== undefined;\n\n // Standalone state management\n const [isExpandedStandalone, setIsExpandedStandalone] = useMergeState<boolean>(\n defaultExpand ?? false,\n {\n onChange: onExpandChange,\n value: expand,\n },\n );\n\n // Context values (may be null if used standalone)\n const contextIsExpanded = context?.isExpanded;\n const contextOnToggle = context?.onToggle;\n const contextHideIndicator = context?.hideIndicator;\n const contextIndicatorPlacement = context?.indicatorPlacement;\n const contextKeepContentMounted = context?.keepContentMounted;\n const contextDisableAnimation = context?.disableAnimation;\n const contextMotionProps = context?.motionProps;\n const contextVariant = context?.variant ?? 'borderless';\n\n const isInitialRenderRef = useRef(true);\n\n useEffect(() => {\n isInitialRenderRef.current = false;\n }, []);\n\n // Determine expanded state\n const isOpen = isStandalone\n ? isExpandedStandalone\n : contextIsExpanded\n ? contextIsExpanded(itemKey)\n : false;\n\n // Determine other props with fallbacks\n const hideIndicatorFinal = itemHideIndicator ?? contextHideIndicator ?? false;\n const indicatorPlacementFinal = itemIndicatorPlacement ?? contextIndicatorPlacement ?? 'start';\n const keepContentMounted = contextKeepContentMounted ?? true;\n const disableAnimation = contextDisableAnimation ?? false;\n const variant = customVariant || contextVariant;\n\n const handleToggle = useCallback(() => {\n // If allowExpand is false, only allow controlled expansion via expand prop\n if (!allowExpand) return;\n\n if (!disabled) {\n if (isStandalone) {\n setIsExpandedStandalone(!isExpandedStandalone);\n } else if (contextOnToggle) {\n contextOnToggle(itemKey);\n }\n }\n }, [\n allowExpand,\n disabled,\n isStandalone,\n setIsExpandedStandalone,\n isExpandedStandalone,\n contextOnToggle,\n itemKey,\n ]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n // If allowExpand is false, disable keyboard toggle\n if (!allowExpand || disabled) return;\n\n switch (e.key) {\n case 'Enter':\n case ' ': {\n e.preventDefault();\n handleToggle();\n break;\n }\n }\n },\n [allowExpand, disabled, handleToggle],\n );\n\n const preventTitleTextSelection = useCallback((e: any) => {\n // Prevent browser from creating a selection range on double/multi click,\n // which can accidentally select the content region.\n if (e?.detail > 1) e.preventDefault();\n }, []);\n\n // Build indicator\n const indicator = useMemo(() => {\n if (!allowExpand || hideIndicatorFinal) return null;\n\n if (customIndicator) {\n if (typeof customIndicator === 'function') {\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n {customIndicator({ isDisabled: disabled, isOpen })}\n </span>\n );\n }\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n {customIndicator}\n </span>\n );\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n <ArrowIcon className={cx(styles.icon, isOpen && styles.iconRotate)} />\n </span>\n );\n }, [\n allowExpand,\n hideIndicatorFinal,\n customIndicator,\n disabled,\n isOpen,\n classNames,\n customStyles,\n ]);\n\n const skipInitialAnimation = isInitialRenderRef.current && isOpen;\n\n const contentClassName = useMemo(\n () => cx('accordion-content', styles.content, classNames?.content),\n [classNames?.content],\n );\n\n const titleNode = useMemo(\n () =>\n typeof title === 'string' ? (\n <Text ellipsis className={classNames?.title} style={customStyles?.title}>\n {title}\n </Text>\n ) : (\n title\n ),\n [title, classNames?.title, customStyles?.title],\n );\n\n const actionNode = useMemo(\n () =>\n action && (\n <Flexbox\n horizontal\n align={'center'}\n flex={'none'}\n gap={4}\n style={customStyles?.action}\n className={cx(\n 'accordion-action',\n styles.action,\n alwaysShowAction && styles.actionVisible,\n classNames?.action,\n )}\n onClick={stopPropagation}\n >\n {action}\n </Flexbox>\n ),\n [action, alwaysShowAction, cx, styles, classNames?.action, customStyles?.action],\n );\n\n const headerElement = useMemo(() => {\n const header = (\n <Block\n horizontal\n className={cx('accordion-header', styles.header, classNames?.header)}\n clickable={!disabled && allowExpand}\n gap={4}\n justify={'space-between'}\n padding={padding}\n paddingBlock={paddingBlock}\n paddingInline={paddingInline}\n ref={ref}\n variant={customVariant || variant}\n style={{\n alignItems: 'center',\n cursor: disabled ? 'not-allowed' : allowExpand ? 'pointer' : 'default',\n opacity: disabled ? 0.5 : undefined,\n overflow: 'hidden',\n width: '100%',\n ...customStyles?.header,\n }}\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n >\n {indicatorPlacementFinal === 'start' ? (\n <>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.titleWrapper}\n flex={1}\n gap={2}\n style={{\n overflow: 'hidden',\n }}\n onDoubleClick={preventTitleTextSelection}\n onMouseDown={preventTitleTextSelection}\n >\n {titleNode}\n {indicator}\n </Flexbox>\n <Flexbox horizontal align={'center'} flex={'none'} gap={4}>\n {actionNode}\n </Flexbox>\n </>\n ) : (\n <>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.titleWrapper}\n flex={1}\n gap={2}\n style={{\n overflow: 'hidden',\n }}\n onDoubleClick={preventTitleTextSelection}\n onMouseDown={preventTitleTextSelection}\n >\n {titleNode}\n </Flexbox>\n <Flexbox horizontal align={'center'} flex={'none'} gap={4}>\n {actionNode}\n {indicator}\n </Flexbox>\n </>\n )}\n </Block>\n );\n if (headerWrapper) {\n return headerWrapper(header);\n }\n return header;\n }, [\n classNames?.header,\n disabled,\n allowExpand,\n padding,\n paddingBlock,\n paddingInline,\n ref,\n customVariant,\n variant,\n customStyles?.header,\n handleToggle,\n handleKeyDown,\n indicatorPlacementFinal,\n preventTitleTextSelection,\n titleNode,\n indicator,\n actionNode,\n headerWrapper,\n ]);\n\n return (\n <div\n className={cx('accordion-item', styles.item, classNames?.base)}\n style={customStyles?.base}\n >\n {headerElement}\n <AccordionItemContent\n className={contentClassName}\n contentInnerClassName={styles.contentInner}\n contextMotionProps={contextMotionProps}\n disableAnimation={!!disableAnimation}\n isOpen={isOpen}\n keepContentMounted={!!keepContentMounted}\n skipInitialAnimation={skipInitialAnimation}\n style={customStyles?.content}\n >\n {children}\n </AccordionItemContent>\n </div>\n );\n },\n);\n\nAccordionItem.displayName = 'AccordionItem';\n\nexport default AccordionItem;\n"],"mappings":";;;;;;;;;;;;;;;AAwDA,MAAM,uBAAsC,EAAE,UAAU,UAAU;AAElE,MAAM,yBAAyB,MAC5B,EAAE,WAAW,OAAO,UAAU,uBAAuB,QAAQ,yBAAyB;AACrF,KAAI,mBACF,QACE,oBAAC,OAAD;EACa;EACX,MAAK;EACL,OAAO;GACL,SAAS,SAAS,UAAU;GAC5B,GAAG;GACJ;YAED,oBAAC,OAAD;GAAK,WAAW;GAAwB;GAAe,CAAA;EACnD,CAAA;AAIV,KAAI,CAAC,OAAQ,QAAO;AAEpB,QACE,oBAAC,OAAD;EAAgB;EAAW,MAAK;EAAgB;YAC9C,oBAAC,OAAD;GAAK,WAAW;GAAwB;GAAe,CAAA;EACnD,CAAA;EAGX;AAED,uBAAuB,cAAc;AAErC,MAAM,yBAAyB,MAC5B,EACC,oBACA,WACA,OACA,UACA,uBACA,QACA,2BACI;CACJ,MAAM,SAAS,oBAAoB;CAEnC,MAAM,cAAc,eACX;EACL,SAAS;EACT,MAAM;EACN,SAAS,uBAAuB,QAAQ;EACxC,UAAU;GACR,OAAO;IACL,QAAQ;IACR,SAAS;IACT,YAAY;KACV,UAAU;KACV,MAAM;MAAC;MAAK;MAAG;MAAK;MAAE;KACvB;IACF;GACD,MAAM;IACJ,QAAQ;IACR,SAAS;IACT,YAAY;KACV,UAAU;KACV,MAAM;MAAC;MAAK;MAAG;MAAK;MAAE;KACvB;IACF;GACF;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YG,WACA,UACO;OACV,oBAACA,mBAAD;IAAS,YAAA;IAAW,OAAO;IAAU,MAAM;IAAQ,KAAK;cACrD;IACO,CAAA,CACT,EAAA,CAAA,GAEH,qBAAA,YAAA,EAAA,UAAA,CACE,oBAACA,mBAAD;IACE,YAAA;IACA,OAAO;IACP,WAAW,OAAO;IAClB,MAAM;IACN,KAAK;IACL,OAAO,EACL,UAAU,UACX;IACD,eAAe;IACf,aAAa;cAEZ;IACO,CAAA,EACV,qBAACA,mBAAD;IAAS,YAAA;IAAW,OAAO;IAAU,MAAM;IAAQ,KAAK;cAAxD,CACG,YACA,UACO;MACT,EAAA,CAAA;GAEC,CAAA;AAEV,MAAI,cACF,QAAO,cAAc,OAAO;AAE9B,SAAO;IACN;EACD,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,OAAD;EACE,WAAW,GAAG,kBAAkB,OAAO,MAAM,YAAY,KAAK;EAC9D,OAAO,cAAc;YAFvB,CAIG,eACD,oBAAC,sBAAD;GACE,WAAW;GACX,uBAAuB,OAAO;GACV;GACpB,kBAAkB,CAAC,CAAC;GACZ;GACR,oBAAoB,CAAC,CAAC;GACA;GACtB,OAAO,cAAc;GAEpB;GACoB,CAAA,CACnB;;EAGX;AAED,cAAc,cAAc"}
|
|
1
|
+
{"version":3,"file":"AccordionItem.mjs","names":["Flexbox"],"sources":["../../src/Accordion/AccordionItem.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { AnimatePresence } from 'motion/react';\nimport {\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type KeyboardEvent,\n memo,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport useMergeState from 'use-merge-value';\n\nimport Block from '@/Block';\nimport { Flexbox } from '@/Flex';\nimport { type MotionComponentType, useMotionComponent } from '@/MotionProvider';\nimport Text from '@/Text';\nimport { stopPropagation } from '@/utils/dom';\n\nimport ArrowIcon from './ArrowIcon';\nimport { useAccordionConfig, useAccordionItemState } from './context';\nimport { styles } from './style';\nimport { type AccordionItemProps } from './type';\n\ntype AccordionContentBaseProps = {\n children?: ReactNode;\n className?: string;\n contentInnerClassName: string;\n style?: CSSProperties;\n};\n\ntype AccordionStaticContentProps = AccordionContentBaseProps & {\n isOpen: boolean;\n keepContentMounted: boolean;\n};\n\ntype MotionDivProps = ComponentPropsWithoutRef<MotionComponentType['div']>;\n\ntype AccordionMotionContentProps = AccordionContentBaseProps & {\n contextMotionProps?: MotionDivProps;\n isOpen: boolean;\n skipInitialAnimation: boolean;\n};\n\ntype AccordionItemContentProps = AccordionContentBaseProps & {\n contextMotionProps?: MotionDivProps;\n disableAnimation: boolean;\n isOpen: boolean;\n keepContentMounted: boolean;\n skipInitialAnimation: boolean;\n};\n\nconst motionContainerStyle: CSSProperties = { overflow: 'hidden' };\n\nconst AccordionStaticContent = memo<AccordionStaticContentProps>(\n ({ className, style, children, contentInnerClassName, isOpen, keepContentMounted }) => {\n if (keepContentMounted) {\n return (\n <div\n className={className}\n role=\"region\"\n style={{\n display: isOpen ? 'block' : 'none',\n ...style,\n }}\n >\n <div className={contentInnerClassName}>{children}</div>\n </div>\n );\n }\n\n if (!isOpen) return null;\n\n return (\n <div className={className} role=\"region\" style={style}>\n <div className={contentInnerClassName}>{children}</div>\n </div>\n );\n },\n);\n\nAccordionStaticContent.displayName = 'AccordionStaticContent';\n\nconst AccordionMotionContent = memo<AccordionMotionContentProps>(\n ({\n contextMotionProps,\n className,\n style,\n children,\n contentInnerClassName,\n isOpen,\n skipInitialAnimation,\n }) => {\n const Motion = useMotionComponent();\n\n const motionProps = useMemo(\n () => ({\n animate: 'enter',\n exit: 'exit',\n initial: skipInitialAnimation ? false : 'exit',\n variants: {\n enter: {\n height: 'auto',\n opacity: 1,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n },\n },\n exit: {\n height: 0,\n opacity: 0,\n transition: {\n duration: 0.2,\n ease: [0.4, 0, 0.2, 1],\n },\n },\n },\n ...contextMotionProps,\n }),\n [contextMotionProps, skipInitialAnimation],\n );\n\n return (\n <AnimatePresence initial={false}>\n {isOpen ? (\n <Motion.div {...(motionProps as any)} style={motionContainerStyle}>\n <div className={className} role=\"region\" style={style}>\n <div className={contentInnerClassName}>{children}</div>\n </div>\n </Motion.div>\n ) : null}\n </AnimatePresence>\n );\n },\n);\n\nAccordionMotionContent.displayName = 'AccordionMotionContent';\n\nconst AccordionItemContent = memo<AccordionItemContentProps>(\n ({\n disableAnimation,\n isOpen,\n keepContentMounted,\n className,\n style,\n children,\n contentInnerClassName,\n contextMotionProps,\n skipInitialAnimation,\n }) => {\n if (disableAnimation || !keepContentMounted) {\n return (\n <AccordionStaticContent\n className={className}\n contentInnerClassName={contentInnerClassName}\n isOpen={isOpen}\n keepContentMounted={keepContentMounted}\n style={style}\n >\n {children}\n </AccordionStaticContent>\n );\n }\n\n return (\n <AccordionMotionContent\n className={className}\n contentInnerClassName={contentInnerClassName}\n contextMotionProps={contextMotionProps}\n isOpen={isOpen}\n skipInitialAnimation={skipInitialAnimation}\n style={style}\n >\n {children}\n </AccordionMotionContent>\n );\n },\n);\n\nAccordionItemContent.displayName = 'AccordionItemContent';\n\nconst AccordionItem = memo<AccordionItemProps>(\n ({\n title,\n children,\n action,\n alwaysShowAction = false,\n disabled = false,\n allowExpand = true,\n hideIndicator: itemHideIndicator,\n indicatorPlacement: itemIndicatorPlacement,\n indicator: customIndicator,\n classNames,\n paddingInline = 16,\n paddingBlock = 8,\n padding,\n ref,\n variant: customVariant,\n styles: customStyles,\n headerWrapper,\n defaultExpand,\n expand,\n onExpandChange,\n }) => {\n // Per-item state context: only this item's provider re-emits when its\n // own isOpen flips, so siblings stay stable across toggles.\n const itemStateContext = useAccordionItemState();\n const configContext = useAccordionConfig();\n\n // Determine if using standalone mode (has expand or defaultExpand props)\n const isStandalone = expand !== undefined || defaultExpand !== undefined;\n\n // Standalone state management\n const [isExpandedStandalone, setIsExpandedStandalone] = useMergeState<boolean>(\n defaultExpand ?? false,\n {\n onChange: onExpandChange,\n value: expand,\n },\n );\n\n const contextHideIndicator = configContext?.hideIndicator;\n const contextIndicatorPlacement = configContext?.indicatorPlacement;\n const contextKeepContentMounted = configContext?.keepContentMounted;\n const contextDisableAnimation = configContext?.disableAnimation;\n const contextMotionProps = configContext?.motionProps;\n const contextVariant = configContext?.variant ?? 'borderless';\n\n const isInitialRenderRef = useRef(true);\n\n useEffect(() => {\n isInitialRenderRef.current = false;\n }, []);\n\n // Determine expanded state\n const isOpen = isStandalone ? isExpandedStandalone : (itemStateContext?.isOpen ?? false);\n\n // Determine other props with fallbacks\n const hideIndicatorFinal = itemHideIndicator ?? contextHideIndicator ?? false;\n const indicatorPlacementFinal = itemIndicatorPlacement ?? contextIndicatorPlacement ?? 'start';\n const keepContentMounted = contextKeepContentMounted ?? true;\n const disableAnimation = contextDisableAnimation ?? false;\n const variant = customVariant || contextVariant;\n\n const contextOnToggle = itemStateContext?.onToggle;\n\n const handleToggle = useCallback(() => {\n // If allowExpand is false, only allow controlled expansion via expand prop\n if (!allowExpand) return;\n\n if (!disabled) {\n if (isStandalone) {\n setIsExpandedStandalone(!isExpandedStandalone);\n } else if (contextOnToggle) {\n contextOnToggle();\n }\n }\n }, [\n allowExpand,\n disabled,\n isStandalone,\n setIsExpandedStandalone,\n isExpandedStandalone,\n contextOnToggle,\n ]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n // If allowExpand is false, disable keyboard toggle\n if (!allowExpand || disabled) return;\n\n switch (e.key) {\n case 'Enter':\n case ' ': {\n e.preventDefault();\n handleToggle();\n break;\n }\n }\n },\n [allowExpand, disabled, handleToggle],\n );\n\n const preventTitleTextSelection = useCallback((e: any) => {\n // Prevent browser from creating a selection range on double/multi click,\n // which can accidentally select the content region.\n if (e?.detail > 1) e.preventDefault();\n }, []);\n\n // Build indicator\n const indicator = useMemo(() => {\n if (!allowExpand || hideIndicatorFinal) return null;\n\n if (customIndicator) {\n if (typeof customIndicator === 'function') {\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n {customIndicator({ isDisabled: disabled, isOpen })}\n </span>\n );\n }\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n {customIndicator}\n </span>\n );\n }\n\n return (\n <span\n aria-hidden=\"true\"\n className={cx(styles.indicator, classNames?.indicator)}\n style={customStyles?.indicator}\n >\n <ArrowIcon className={cx(styles.icon, isOpen && styles.iconRotate)} />\n </span>\n );\n }, [\n allowExpand,\n hideIndicatorFinal,\n customIndicator,\n disabled,\n isOpen,\n classNames,\n customStyles,\n ]);\n\n const skipInitialAnimation = isInitialRenderRef.current && isOpen;\n\n const contentClassName = useMemo(\n () => cx('accordion-content', styles.content, classNames?.content),\n [classNames?.content],\n );\n\n const titleNode = useMemo(\n () =>\n typeof title === 'string' ? (\n <Text ellipsis className={classNames?.title} style={customStyles?.title}>\n {title}\n </Text>\n ) : (\n title\n ),\n [title, classNames?.title, customStyles?.title],\n );\n\n const actionNode = useMemo(\n () =>\n action && (\n <Flexbox\n horizontal\n align={'center'}\n flex={'none'}\n gap={4}\n style={customStyles?.action}\n className={cx(\n 'accordion-action',\n styles.action,\n alwaysShowAction && styles.actionVisible,\n classNames?.action,\n )}\n onClick={stopPropagation}\n >\n {action}\n </Flexbox>\n ),\n [action, alwaysShowAction, classNames?.action, customStyles?.action],\n );\n\n const headerElement = useMemo(() => {\n const header = (\n <Block\n horizontal\n className={cx('accordion-header', styles.header, classNames?.header)}\n clickable={!disabled && allowExpand}\n gap={4}\n justify={'space-between'}\n padding={padding}\n paddingBlock={paddingBlock}\n paddingInline={paddingInline}\n ref={ref}\n variant={customVariant || variant}\n style={{\n alignItems: 'center',\n cursor: disabled ? 'not-allowed' : allowExpand ? 'pointer' : 'default',\n opacity: disabled ? 0.5 : undefined,\n overflow: 'hidden',\n width: '100%',\n ...customStyles?.header,\n }}\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n >\n {indicatorPlacementFinal === 'start' ? (\n <>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.titleWrapper}\n flex={1}\n gap={2}\n style={{\n overflow: 'hidden',\n }}\n onDoubleClick={preventTitleTextSelection}\n onMouseDown={preventTitleTextSelection}\n >\n {titleNode}\n {indicator}\n </Flexbox>\n <Flexbox horizontal align={'center'} flex={'none'} gap={4}>\n {actionNode}\n </Flexbox>\n </>\n ) : (\n <>\n <Flexbox\n horizontal\n align={'center'}\n className={styles.titleWrapper}\n flex={1}\n gap={2}\n style={{\n overflow: 'hidden',\n }}\n onDoubleClick={preventTitleTextSelection}\n onMouseDown={preventTitleTextSelection}\n >\n {titleNode}\n </Flexbox>\n <Flexbox horizontal align={'center'} flex={'none'} gap={4}>\n {actionNode}\n {indicator}\n </Flexbox>\n </>\n )}\n </Block>\n );\n if (headerWrapper) {\n return headerWrapper(header);\n }\n return header;\n }, [\n classNames?.header,\n disabled,\n allowExpand,\n padding,\n paddingBlock,\n paddingInline,\n ref,\n customVariant,\n variant,\n customStyles?.header,\n handleToggle,\n handleKeyDown,\n indicatorPlacementFinal,\n preventTitleTextSelection,\n titleNode,\n indicator,\n actionNode,\n headerWrapper,\n ]);\n\n return (\n <div\n className={cx('accordion-item', styles.item, classNames?.base)}\n style={customStyles?.base}\n >\n {headerElement}\n <AccordionItemContent\n className={contentClassName}\n contentInnerClassName={styles.contentInner}\n contextMotionProps={contextMotionProps}\n disableAnimation={!!disableAnimation}\n isOpen={isOpen}\n keepContentMounted={!!keepContentMounted}\n skipInitialAnimation={skipInitialAnimation}\n style={customStyles?.content}\n >\n {children}\n </AccordionItemContent>\n </div>\n );\n },\n);\n\nAccordionItem.displayName = 'AccordionItem';\n\nexport default AccordionItem;\n"],"mappings":";;;;;;;;;;;;;;;AAwDA,MAA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MAAI,cACF,QAAO,cAAc,OAAO;AAE9B,SAAO;IACN;EACD,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QACE,qBAAC,OAAD;EACE,WAAW,GAAG,kBAAkB,OAAO,MAAM,YAAY,KAAK;EAC9D,OAAO,cAAc;YAFvB,CAIG,eACD,oBAAC,sBAAD;GACE,WAAW;GACX,uBAAuB,OAAO;GACV;GACpB,kBAAkB,CAAC,CAAC;GACZ;GACR,oBAAoB,CAAC,CAAC;GACA;GACtB,OAAO,cAAc;GAEpB;GACoB,CAAA,CACnB;;EAGX;AAED,cAAc,cAAc"}
|
package/es/Accordion/context.mjs
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { createContext, use } from "react";
|
|
1
|
+
import { createContext, memo, use, useMemo } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
//#region src/Accordion/context.tsx
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Per-item context: each AccordionItem gets its own provider, so a toggle
|
|
6
|
+
* only invalidates the value seen by that single item. Sibling items keep
|
|
7
|
+
* the same context value identity and skip re-render.
|
|
8
|
+
*/
|
|
9
|
+
const AccordionItemStateContext = createContext(null);
|
|
10
|
+
/**
|
|
11
|
+
* Static config shared by all items. Identity changes only when the user
|
|
12
|
+
* changes config props on <Accordion>, which is rare.
|
|
13
|
+
*/
|
|
14
|
+
const AccordionConfigContext = createContext(null);
|
|
15
|
+
const useAccordionItemState = () => use(AccordionItemStateContext);
|
|
16
|
+
const useAccordionConfig = () => use(AccordionConfigContext);
|
|
17
|
+
const AccordionItemStateProvider = memo(({ children, isOpen, itemKey, onToggleKey }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(AccordionItemStateContext, {
|
|
19
|
+
value: useMemo(() => ({
|
|
20
|
+
isOpen,
|
|
21
|
+
onToggle: () => onToggleKey(itemKey)
|
|
22
|
+
}), [
|
|
23
|
+
isOpen,
|
|
24
|
+
itemKey,
|
|
25
|
+
onToggleKey
|
|
26
|
+
]),
|
|
27
|
+
children
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
AccordionItemStateProvider.displayName = "AccordionItemStateProvider";
|
|
7
31
|
//#endregion
|
|
8
|
-
export {
|
|
32
|
+
export { AccordionConfigContext, AccordionItemStateProvider, useAccordionConfig, useAccordionItemState };
|
|
9
33
|
|
|
10
34
|
//# sourceMappingURL=context.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.mjs","names":[],"sources":["../../src/Accordion/context.tsx"],"sourcesContent":["import type { Key } from 'react';\nimport { createContext, use } from 'react';\n\ninterface
|
|
1
|
+
{"version":3,"file":"context.mjs","names":[],"sources":["../../src/Accordion/context.tsx"],"sourcesContent":["import type { Key, ReactNode } from 'react';\nimport { createContext, memo, use, useMemo } from 'react';\n\ninterface AccordionItemStateValue {\n isOpen: boolean;\n onToggle: () => void;\n}\n\ninterface AccordionConfigValue {\n disableAnimation?: boolean;\n hideIndicator?: boolean;\n indicatorPlacement?: 'end' | 'start';\n keepContentMounted?: boolean;\n motionProps?: any;\n showDivider?: boolean;\n variant?: 'filled' | 'outlined' | 'borderless';\n}\n\n/**\n * Per-item context: each AccordionItem gets its own provider, so a toggle\n * only invalidates the value seen by that single item. Sibling items keep\n * the same context value identity and skip re-render.\n */\nexport const AccordionItemStateContext = createContext<AccordionItemStateValue | null>(null);\n\n/**\n * Static config shared by all items. Identity changes only when the user\n * changes config props on <Accordion>, which is rare.\n */\nexport const AccordionConfigContext = createContext<AccordionConfigValue | null>(null);\n\nexport const useAccordionItemState = () => use(AccordionItemStateContext);\nexport const useAccordionConfig = () => use(AccordionConfigContext);\n\ninterface AccordionItemStateProviderProps {\n children: ReactNode;\n isOpen: boolean;\n itemKey: Key;\n onToggleKey: (key: Key) => void;\n}\n\nexport const AccordionItemStateProvider = memo<AccordionItemStateProviderProps>(\n ({ children, isOpen, itemKey, onToggleKey }) => {\n const value = useMemo(\n () => ({\n isOpen,\n onToggle: () => onToggleKey(itemKey),\n }),\n [isOpen, itemKey, onToggleKey],\n );\n return <AccordionItemStateContext value={value}>{children}</AccordionItemStateContext>;\n },\n);\n\nAccordionItemStateProvider.displayName = 'AccordionItemStateProvider';\n"],"mappings":";;;;;;;;AAuBA,MAAa,4BAA4B,cAA8C,KAAK;;;;;AAM5F,MAAa,yBAAyB,cAA2C,KAAK;AAEtF,MAAa,8BAA8B,IAAI,0BAA0B;AACzE,MAAa,2BAA2B,IAAI,uBAAuB;AASnE,MAAa,6BAA6B,MACvC,EAAE,UAAU,QAAQ,SAAS,kBAAkB;AAQ9C,QAAO,oBAAC,2BAAD;EAA2B,OAPpB,eACL;GACL;GACA,gBAAgB,YAAY,QAAQ;GACrC,GACD;GAAC;GAAQ;GAAS;GAAY,CAEc;EAAG;EAAqC,CAAA;EAEzF;AAED,2BAA2B,cAAc"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { IconAvatarProps } from "@lobehub/icons";
|
|
3
|
+
|
|
4
|
+
//#region src/icons/DingTalk/components/Avatar.d.ts
|
|
5
|
+
type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
|
|
6
|
+
declare const Avatar: FC<AvatarProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Avatar };
|
|
9
|
+
//# sourceMappingURL=Avatar.d.mts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import Icon from "./Mono.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { IconAvatar } from "@lobehub/icons";
|
|
6
|
+
//#region src/icons/DingTalk/components/Avatar.tsx
|
|
7
|
+
const Avatar = ({ background, ...rest }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(IconAvatar, {
|
|
9
|
+
Icon,
|
|
10
|
+
"aria-label": TITLE,
|
|
11
|
+
background: background || "#3296FA",
|
|
12
|
+
color: "#fff",
|
|
13
|
+
...rest
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Avatar as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","names":["Mono"],"sources":["../../../../src/icons/DingTalk/components/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatar, type IconAvatarProps } from '@lobehub/icons';\nimport { type FC } from 'react';\n\nimport { COLOR_PRIMARY, TITLE } from '../style';\nimport Mono from './Mono';\n\nexport type AvatarProps = Omit<IconAvatarProps, 'Icon'>;\n\nconst Avatar: FC<AvatarProps> = ({ background, ...rest }) => {\n return (\n <IconAvatar\n Icon={Mono}\n aria-label={TITLE}\n background={background || COLOR_PRIMARY}\n color={'#fff'}\n {...rest}\n />\n );\n};\n\nexport default Avatar;\n"],"mappings":";;;;;;AAUA,MAAM,UAA2B,EAAE,YAAY,GAAG,WAAW;AAC3D,QACE,oBAAC,YAAD;EACQA;EACN,cAAY;EACZ,YAAY,cAAA;EACZ,OAAO;EACP,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/icons/DingTalk/components/Color.tsx
|
|
6
|
+
const Icon = memo(({ size = "1em", style, ...rest }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
height: size,
|
|
9
|
+
style: {
|
|
10
|
+
flex: "none",
|
|
11
|
+
lineHeight: 1,
|
|
12
|
+
...style
|
|
13
|
+
},
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
width: size,
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
...rest,
|
|
18
|
+
children: [/* @__PURE__ */ jsx("title", { children: TITLE }), /* @__PURE__ */ jsx("path", {
|
|
19
|
+
d: "M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z",
|
|
20
|
+
fill: "#3296FA"
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Icon as default };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=Color.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Color.mjs","names":[],"sources":["../../../../src/icons/DingTalk/components/Color.tsx"],"sourcesContent":["'use client';\n\nimport type { IconType } from '@lobehub/icons';\nimport { memo } from 'react';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n <path\n d=\"M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z\"\n fill=\"#3296FA\"\n />\n </svg>\n );\n});\n\nexport default Icon;\n"],"mappings":";;;;;AAOA,MAAM,OAAiB,MAAM,EAAE,OAAO,OAAO,OAAO,GAAG,WAAW;AAChE,QACE,qBAAC,OAAD;EACE,QAAQ;EACR,OAAO;GAAE,MAAM;GAAQ,YAAY;GAAG,GAAG;GAAO;EAChD,SAAQ;EACR,OAAO;EACP,OAAM;EACN,GAAI;YANN,CAQE,oBAAC,SAAD,EAAA,UAAQ,OAAc,CAAA,EACtB,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,CAAA,CACE;;EAER"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/icons/DingTalk/components/Mono.tsx
|
|
6
|
+
const Icon = memo(({ size = "1em", style, ...rest }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
fillRule: "evenodd",
|
|
10
|
+
height: size,
|
|
11
|
+
style: {
|
|
12
|
+
flex: "none",
|
|
13
|
+
lineHeight: 1,
|
|
14
|
+
...style
|
|
15
|
+
},
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
width: size,
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...rest,
|
|
20
|
+
children: [/* @__PURE__ */ jsx("title", { children: TITLE }), /* @__PURE__ */ jsx("path", { d: "M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z" })]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Icon as default };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Mono.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mono.mjs","names":[],"sources":["../../../../src/icons/DingTalk/components/Mono.tsx"],"sourcesContent":["'use client';\n\nimport type { IconType } from '@lobehub/icons';\nimport { memo } from 'react';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n <path d=\"M21.17 8.973c-.07.255-.161.503-.274.742h.003l-.014.031c-.8 1.795-2.888 5.32-2.888 5.32l-.009-.023-.61 1.115h2.94L14.702 24l1.275-5.334h-2.315l.804-3.527c-.652.164-1.418.391-2.33.698 0 0-1.23.757-3.548-1.458 0 0-1.563-1.443-.656-1.807.384-.152 1.87-.346 3.04-.515 1.577-.225 2.55-.345 2.55-.345s-4.869.078-6.024-.115c-1.155-.19-2.618-2.214-2.932-3.993 0 0-.483-.977 1.036-.516 1.52.462 7.814 1.8 7.814 1.8S5.234 6.256 4.69 5.614c-.543-.642-1.603-3.51-1.465-5.27 0 0 .061-.441.49-.324 0 0 6.052 2.906 10.188 4.493 4.137 1.59 7.732 2.402 7.268 4.46z\" />\n </svg>\n );\n});\n\nexport default Icon;\n"],"mappings":";;;;;AAOA,MAAM,OAAiB,MAAM,EAAE,OAAO,OAAO,OAAO,GAAG,WAAW;AAChE,QACE,qBAAC,OAAD;EACE,MAAK;EACL,UAAS;EACT,QAAQ;EACR,OAAO;GAAE,MAAM;GAAQ,YAAY;GAAG,GAAG;GAAO;EAChD,SAAQ;EACR,OAAO;EACP,OAAM;EACN,GAAI;YARN,CAUE,oBAAC,SAAD,EAAA,UAAQ,OAAc,CAAA,EACtB,oBAAC,QAAD,EAAM,GAAE,siBAAuiB,CAAA,CAC3iB;;EAER"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Avatar } from "./components/Avatar.mjs";
|
|
2
|
+
import { Icon } from "./components/Color.mjs";
|
|
3
|
+
import { Icon as Icon$1 } from "./components/Mono.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/icons/DingTalk/index.d.ts
|
|
6
|
+
type CompoundedIcon = typeof Icon$1 & {
|
|
7
|
+
Avatar: typeof Avatar;
|
|
8
|
+
Color: typeof Icon;
|
|
9
|
+
colorPrimary: string;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Icons: CompoundedIcon;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CompoundedIcon, Icons };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { COLOR_PRIMARY, TITLE } from "./style.mjs";
|
|
3
|
+
import Icon from "./components/Mono.mjs";
|
|
4
|
+
import Avatar from "./components/Avatar.mjs";
|
|
5
|
+
import Icon$1 from "./components/Color.mjs";
|
|
6
|
+
//#region src/icons/DingTalk/index.ts
|
|
7
|
+
const Icons = Icon;
|
|
8
|
+
Icons.Color = Icon$1;
|
|
9
|
+
Icons.Avatar = Avatar;
|
|
10
|
+
Icons.colorPrimary = COLOR_PRIMARY;
|
|
11
|
+
Icons.title = TITLE;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Icons as default };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Mono","Color"],"sources":["../../../src/icons/DingTalk/index.ts"],"sourcesContent":["'use client';\n\nimport Avatar from './components/Avatar';\nimport Color from './components/Color';\nimport Mono from './components/Mono';\nimport { COLOR_PRIMARY, TITLE } from './style';\n\nexport type CompoundedIcon = typeof Mono & {\n Avatar: typeof Avatar;\n Color: typeof Color;\n colorPrimary: string;\n title: string;\n};\n\nconst Icons = Mono as CompoundedIcon;\nIcons.Color = Color;\nIcons.Avatar = Avatar;\nIcons.colorPrimary = COLOR_PRIMARY;\nIcons.title = TITLE;\nexport default Icons;\n"],"mappings":";;;;;;AAcA,MAAM,QAAQA;AACd,MAAM,QAAQC;AACd,MAAM,SAAS;AACf,MAAM,eAAe;AACrB,MAAM,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/icons/DingTalk/style.ts"],"sourcesContent":["export const TITLE = 'DingTalk';\nexport const COLOR_PRIMARY = '#3296FA';\n"],"mappings":";AAAA,MAAa,QAAQ;AACrB,MAAa,gBAAgB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { IconAvatarProps } from "@lobehub/icons";
|
|
3
|
+
|
|
4
|
+
//#region src/icons/Line/components/Avatar.d.ts
|
|
5
|
+
type AvatarProps = Omit<IconAvatarProps, 'Icon'>;
|
|
6
|
+
declare const Avatar: FC<AvatarProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Avatar };
|
|
9
|
+
//# sourceMappingURL=Avatar.d.mts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import Icon from "./Mono.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { IconAvatar } from "@lobehub/icons";
|
|
6
|
+
//#region src/icons/Line/components/Avatar.tsx
|
|
7
|
+
const Avatar = ({ background, ...rest }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(IconAvatar, {
|
|
9
|
+
Icon,
|
|
10
|
+
"aria-label": TITLE,
|
|
11
|
+
background: background || "#06C755",
|
|
12
|
+
color: "#fff",
|
|
13
|
+
...rest
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Avatar as default };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Avatar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.mjs","names":["Mono"],"sources":["../../../../src/icons/Line/components/Avatar.tsx"],"sourcesContent":["'use client';\n\nimport { IconAvatar, type IconAvatarProps } from '@lobehub/icons';\nimport { type FC } from 'react';\n\nimport { COLOR_PRIMARY, TITLE } from '../style';\nimport Mono from './Mono';\n\nexport type AvatarProps = Omit<IconAvatarProps, 'Icon'>;\n\nconst Avatar: FC<AvatarProps> = ({ background, ...rest }) => {\n return (\n <IconAvatar\n Icon={Mono}\n aria-label={TITLE}\n background={background || COLOR_PRIMARY}\n color={'#fff'}\n {...rest}\n />\n );\n};\n\nexport default Avatar;\n"],"mappings":";;;;;;AAUA,MAAM,UAA2B,EAAE,YAAY,GAAG,WAAW;AAC3D,QACE,oBAAC,YAAD;EACQA;EACN,cAAY;EACZ,YAAY,cAAA;EACZ,OAAO;EACP,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/icons/Line/components/Color.tsx
|
|
6
|
+
const Icon = memo(({ size = "1em", style, ...rest }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
height: size,
|
|
9
|
+
style: {
|
|
10
|
+
flex: "none",
|
|
11
|
+
lineHeight: 1,
|
|
12
|
+
...style
|
|
13
|
+
},
|
|
14
|
+
viewBox: "0 0 24 24",
|
|
15
|
+
width: size,
|
|
16
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
17
|
+
...rest,
|
|
18
|
+
children: [/* @__PURE__ */ jsx("title", { children: TITLE }), /* @__PURE__ */ jsx("path", {
|
|
19
|
+
d: "M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z",
|
|
20
|
+
fill: "#06C755"
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Icon as default };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=Color.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Color.mjs","names":[],"sources":["../../../../src/icons/Line/components/Color.tsx"],"sourcesContent":["'use client';\n\nimport type { IconType } from '@lobehub/icons';\nimport { memo } from 'react';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n <path\n d=\"M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z\"\n fill=\"#06C755\"\n />\n </svg>\n );\n});\n\nexport default Icon;\n"],"mappings":";;;;;AAOA,MAAM,OAAiB,MAAM,EAAE,OAAO,OAAO,OAAO,GAAG,WAAW;AAChE,QACE,qBAAC,OAAD;EACE,QAAQ;EACR,OAAO;GAAE,MAAM;GAAQ,YAAY;GAAG,GAAG;GAAO;EAChD,SAAQ;EACR,OAAO;EACP,OAAM;EACN,GAAI;YANN,CAQE,oBAAC,SAAD,EAAA,UAAQ,OAAc,CAAA,EACtB,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,CAAA,CACE;;EAER"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { TITLE } from "../style.mjs";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/icons/Line/components/Mono.tsx
|
|
6
|
+
const Icon = memo(({ size = "1em", style, ...rest }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
fillRule: "evenodd",
|
|
10
|
+
height: size,
|
|
11
|
+
style: {
|
|
12
|
+
flex: "none",
|
|
13
|
+
lineHeight: 1,
|
|
14
|
+
...style
|
|
15
|
+
},
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
width: size,
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
...rest,
|
|
20
|
+
children: [/* @__PURE__ */ jsx("title", { children: TITLE }), /* @__PURE__ */ jsx("path", { d: "M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z" })]
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Icon as default };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=Mono.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Mono.mjs","names":[],"sources":["../../../../src/icons/Line/components/Mono.tsx"],"sourcesContent":["'use client';\n\nimport type { IconType } from '@lobehub/icons';\nimport { memo } from 'react';\n\nimport { TITLE } from '../style';\n\nconst Icon: IconType = memo(({ size = '1em', style, ...rest }) => {\n return (\n <svg\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n height={size}\n style={{ flex: 'none', lineHeight: 1, ...style }}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n {...rest}\n >\n <title>{TITLE}</title>\n <path d=\"M19.365 9.863a.631.631 0 010 1.26H17.61v1.126h1.755a.63.63 0 110 1.259h-2.386a.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63h2.386a.63.63 0 01-.003 1.26H17.61v1.125h1.755zm-3.855 3.016a.63.63 0 01-.631.627.618.618 0 01-.51-.25l-2.443-3.317v2.94a.63.63 0 01-1.257 0V8.108a.627.627 0 01.624-.628c.195 0 .375.104.495.254l2.462 3.33V8.108c0-.345.282-.63.63-.63.345 0 .63.285.63.63v4.77zm-5.741 0a.632.632 0 01-.631.629.631.631 0 01-.627-.63v-4.77c0-.345.282-.63.63-.63.346 0 .628.285.628.63v4.77zm-2.466.629H4.917a.634.634 0 01-.63-.63v-4.77c0-.345.285-.63.63-.63.348 0 .63.285.63.63v4.14h1.756a.63.63 0 010 1.26zM24 10.314C24 4.943 18.615.572 12 .572S0 4.942 0 10.314c0 4.81 4.27 8.842 10.035 9.608.391.082.923.258 1.058.59.12.3.079.766.038 1.08l-.164 1.02c-.045.3-.24 1.186 1.049.645 1.291-.54 6.916-4.078 9.436-6.975C23.176 14.392 24 12.458 24 10.314z\" />\n </svg>\n );\n});\n\nexport default Icon;\n"],"mappings":";;;;;AAOA,MAAM,OAAiB,MAAM,EAAE,OAAO,OAAO,OAAO,GAAG,WAAW;AAChE,QACE,qBAAC,OAAD;EACE,MAAK;EACL,UAAS;EACT,QAAQ;EACR,OAAO;GAAE,MAAM;GAAQ,YAAY;GAAG,GAAG;GAAO;EAChD,SAAQ;EACR,OAAO;EACP,OAAM;EACN,GAAI;YARN,CAUE,oBAAC,SAAD,EAAA,UAAQ,OAAc,CAAA,EACtB,oBAAC,QAAD,EAAM,GAAE,01BAA21B,CAAA,CAC/1B;;EAER"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Avatar } from "./components/Avatar.mjs";
|
|
2
|
+
import { Icon } from "./components/Color.mjs";
|
|
3
|
+
import { Icon as Icon$1 } from "./components/Mono.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/icons/Line/index.d.ts
|
|
6
|
+
type CompoundedIcon = typeof Icon$1 & {
|
|
7
|
+
Avatar: typeof Avatar;
|
|
8
|
+
Color: typeof Icon;
|
|
9
|
+
colorPrimary: string;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Icons: CompoundedIcon;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { CompoundedIcon, Icons };
|
|
15
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { COLOR_PRIMARY, TITLE } from "./style.mjs";
|
|
3
|
+
import Icon from "./components/Mono.mjs";
|
|
4
|
+
import Avatar from "./components/Avatar.mjs";
|
|
5
|
+
import Icon$1 from "./components/Color.mjs";
|
|
6
|
+
//#region src/icons/Line/index.ts
|
|
7
|
+
const Icons = Icon;
|
|
8
|
+
Icons.Color = Icon$1;
|
|
9
|
+
Icons.Avatar = Avatar;
|
|
10
|
+
Icons.colorPrimary = COLOR_PRIMARY;
|
|
11
|
+
Icons.title = TITLE;
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Icons as default };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Mono","Color"],"sources":["../../../src/icons/Line/index.ts"],"sourcesContent":["'use client';\n\nimport Avatar from './components/Avatar';\nimport Color from './components/Color';\nimport Mono from './components/Mono';\nimport { COLOR_PRIMARY, TITLE } from './style';\n\nexport type CompoundedIcon = typeof Mono & {\n Avatar: typeof Avatar;\n Color: typeof Color;\n colorPrimary: string;\n title: string;\n};\n\nconst Icons = Mono as CompoundedIcon;\nIcons.Color = Color;\nIcons.Avatar = Avatar;\nIcons.colorPrimary = COLOR_PRIMARY;\nIcons.title = TITLE;\nexport default Icons;\n"],"mappings":";;;;;;AAcA,MAAM,QAAQA;AACd,MAAM,QAAQC;AACd,MAAM,SAAS;AACf,MAAM,eAAe;AACrB,MAAM,QAAQ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.mjs","names":[],"sources":["../../../src/icons/Line/style.ts"],"sourcesContent":["export const TITLE = 'Line';\nexport const COLOR_PRIMARY = '#06C755';\n"],"mappings":";AAAA,MAAa,QAAQ;AACrB,MAAa,gBAAgB"}
|
package/es/icons/index.d.mts
CHANGED
|
@@ -3,11 +3,13 @@ import { CompoundedIcon as CompoundedIcon$1, Icons as Icons$1 } from "./Authelia
|
|
|
3
3
|
import { CompoundedIcon as CompoundedIcon$2, Icons as Icons$2 } from "./Authentik/index.mjs";
|
|
4
4
|
import { CompoundedIcon as CompoundedIcon$3, Icons as Icons$3 } from "./Casdoor/index.mjs";
|
|
5
5
|
import { CompoundedIcon as CompoundedIcon$4, Icons as Icons$4 } from "./Clerk/index.mjs";
|
|
6
|
-
import { CompoundedIcon as CompoundedIcon$5, Icons as Icons$5 } from "./
|
|
7
|
-
import { CompoundedIcon as CompoundedIcon$6, Icons as Icons$6 } from "./
|
|
8
|
-
import { CompoundedIcon as CompoundedIcon$7, Icons as Icons$7 } from "./
|
|
9
|
-
import { CompoundedIcon as CompoundedIcon$8, Icons as Icons$8 } from "./
|
|
10
|
-
import { CompoundedIcon as CompoundedIcon$9, Icons as Icons$9 } from "./
|
|
6
|
+
import { CompoundedIcon as CompoundedIcon$5, Icons as Icons$5 } from "./DingTalk/index.mjs";
|
|
7
|
+
import { CompoundedIcon as CompoundedIcon$6, Icons as Icons$6 } from "./Discord/index.mjs";
|
|
8
|
+
import { CompoundedIcon as CompoundedIcon$7, Icons as Icons$7 } from "./GoogleChat/index.mjs";
|
|
9
|
+
import { CompoundedIcon as CompoundedIcon$8, Icons as Icons$8 } from "./IMessage/index.mjs";
|
|
10
|
+
import { CompoundedIcon as CompoundedIcon$9, Icons as Icons$9 } from "./Lark/index.mjs";
|
|
11
|
+
import { CompoundedIcon as CompoundedIcon$10, Icons as Icons$10 } from "./Line/index.mjs";
|
|
12
|
+
import { CompoundedIcon as CompoundedIcon$11, Icons as Icons$11 } from "./Logto/index.mjs";
|
|
11
13
|
import { AndroidIcon } from "./lucideExtra/AndroidIcon.mjs";
|
|
12
14
|
import { AppleIcon } from "./lucideExtra/AppleIcon.mjs";
|
|
13
15
|
import { AppstoreIcon } from "./lucideExtra/AppstoreIcon.mjs";
|
|
@@ -45,14 +47,14 @@ import { SlackIcon } from "./lucideExtra/SlackIcon.mjs";
|
|
|
45
47
|
import { ThinkIcon } from "./lucideExtra/ThinkIcon.mjs";
|
|
46
48
|
import { TreeDownRightIcon } from "./lucideExtra/TreeDownRightIcon.mjs";
|
|
47
49
|
import { TreeUpDownRightIcon } from "./lucideExtra/TreeUpDownRightIcon.mjs";
|
|
48
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
49
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
50
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
51
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
52
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
53
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
54
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
55
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
56
|
-
import { CompoundedIcon as CompoundedIcon$
|
|
50
|
+
import { CompoundedIcon as CompoundedIcon$12, Icons as Icons$12 } from "./MicrosoftEntra/index.mjs";
|
|
51
|
+
import { CompoundedIcon as CompoundedIcon$13, Icons as Icons$13 } from "./MicrosoftTeams/index.mjs";
|
|
52
|
+
import { CompoundedIcon as CompoundedIcon$14, Icons as Icons$14 } from "./NextAuth/index.mjs";
|
|
53
|
+
import { CompoundedIcon as CompoundedIcon$15, Icons as Icons$15 } from "./QQ/index.mjs";
|
|
54
|
+
import { CompoundedIcon as CompoundedIcon$16, Icons as Icons$16 } from "./Slack/index.mjs";
|
|
55
|
+
import { CompoundedIcon as CompoundedIcon$17, Icons as Icons$17 } from "./Telegram/index.mjs";
|
|
56
|
+
import { CompoundedIcon as CompoundedIcon$18, Icons as Icons$18 } from "./WeChat/index.mjs";
|
|
57
|
+
import { CompoundedIcon as CompoundedIcon$19, Icons as Icons$19 } from "./WhatsApp/index.mjs";
|
|
58
|
+
import { CompoundedIcon as CompoundedIcon$20, Icons as Icons$20 } from "./Zitadel/index.mjs";
|
|
57
59
|
import { Cloudflare, CloudflareProps, Github, GithubProps } from "@lobehub/icons";
|
|
58
|
-
export { AndroidIcon, AppleIcon, AppstoreIcon, Icons as Auth0, type CompoundedIcon as Auth0Props, Icons$1 as Authelia, type CompoundedIcon$1 as AutheliaProps, Icons$2 as Authentik, type CompoundedIcon$2 as AuthentikProps, BotPromptIcon, BrainOffIcon, Icons$3 as Casdoor, type CompoundedIcon$3 as CasdoorProps, ChromeIcon, Icons$4 as Clerk, type CompoundedIcon$4 as ClerkProps, Cloudflare, type CloudflareProps, CodepenIcon, CodesandboxIcon, CreateBotIcon, Icons$5 as Discord, DiscordIcon, type CompoundedIcon$
|
|
60
|
+
export { AndroidIcon, AppleIcon, AppstoreIcon, Icons as Auth0, type CompoundedIcon as Auth0Props, Icons$1 as Authelia, type CompoundedIcon$1 as AutheliaProps, Icons$2 as Authentik, type CompoundedIcon$2 as AuthentikProps, BotPromptIcon, BrainOffIcon, Icons$3 as Casdoor, type CompoundedIcon$3 as CasdoorProps, ChromeIcon, Icons$4 as Clerk, type CompoundedIcon$4 as ClerkProps, Cloudflare, type CloudflareProps, CodepenIcon, CodesandboxIcon, CreateBotIcon, Icons$5 as DingTalk, type CompoundedIcon$5 as DingTalkProps, Icons$6 as Discord, DiscordIcon, type CompoundedIcon$6 as DiscordProps, FacebookIcon, FigmaIcon, FramerIcon, Github, GithubIcon, type GithubProps, GitlabIcon, GlobeOffIcon, Icons$7 as GoogleChat, type CompoundedIcon$7 as GoogleChatProps, GooglePlayIcon, GroupBotIcon, GroupBotSquareIcon, Icons$8 as IMessage, type CompoundedIcon$8 as IMessageProps, InstagramIcon, Icons$9 as Lark, type CompoundedIcon$9 as LarkProps, LeftClickIcon, LeftDoubleClickIcon, Icons$10 as Line, type CompoundedIcon$10 as LineProps, LinkedinIcon, Icons$11 as Logto, type CompoundedIcon$11 as LogtoProps, McpIcon, Icons$12 as MicrosoftEntra, type CompoundedIcon$12 as MicrosoftEntraProps, Icons$13 as MicrosoftTeams, type CompoundedIcon$13 as MicrosoftTeamsProps, Icons$14 as NextAuth, type CompoundedIcon$14 as NextAuthProps, NotionIcon, PocketIcon, ProviderIcon, Icons$15 as QQ, type CompoundedIcon$15 as QQProps, RailSymbolIcon, RedditIcon, RightClickIcon, RightDoubleClickIcon, ShapesUploadIcon, SkillsIcon, Icons$16 as Slack, SlackIcon, type CompoundedIcon$16 as SlackProps, Icons$17 as Telegram, type CompoundedIcon$17 as TelegramProps, ThinkIcon, TreeDownRightIcon, TreeUpDownRightIcon, Icons$18 as WeChat, type CompoundedIcon$18 as WeChatProps, Icons$19 as WhatsApp, type CompoundedIcon$19 as WhatsAppProps, Icons$20 as Zitadel, type CompoundedIcon$20 as ZitadelProps };
|
package/es/icons/index.mjs
CHANGED
|
@@ -7,11 +7,13 @@ import Icons$1 from "./Authelia/index.mjs";
|
|
|
7
7
|
import Icons$2 from "./Authentik/index.mjs";
|
|
8
8
|
import Icons$3 from "./Casdoor/index.mjs";
|
|
9
9
|
import Icons$4 from "./Clerk/index.mjs";
|
|
10
|
-
import Icons$5 from "./
|
|
11
|
-
import Icons$6 from "./
|
|
12
|
-
import Icons$7 from "./
|
|
13
|
-
import Icons$8 from "./
|
|
14
|
-
import Icons$9 from "./
|
|
10
|
+
import Icons$5 from "./DingTalk/index.mjs";
|
|
11
|
+
import Icons$6 from "./Discord/index.mjs";
|
|
12
|
+
import Icons$7 from "./GoogleChat/index.mjs";
|
|
13
|
+
import Icons$8 from "./IMessage/index.mjs";
|
|
14
|
+
import Icons$9 from "./Lark/index.mjs";
|
|
15
|
+
import Icons$10 from "./Line/index.mjs";
|
|
16
|
+
import Icons$11 from "./Logto/index.mjs";
|
|
15
17
|
import AndroidIcon from "./lucideExtra/AndroidIcon.mjs";
|
|
16
18
|
import AppleIcon from "./lucideExtra/AppleIcon.mjs";
|
|
17
19
|
import AppstoreIcon from "./lucideExtra/AppstoreIcon.mjs";
|
|
@@ -45,14 +47,14 @@ import SlackIcon from "./lucideExtra/SlackIcon.mjs";
|
|
|
45
47
|
import ThinkIcon from "./lucideExtra/ThinkIcon.mjs";
|
|
46
48
|
import TreeDownRightIcon from "./lucideExtra/TreeDownRightIcon.mjs";
|
|
47
49
|
import TreeUpDownRightIcon from "./lucideExtra/TreeUpDownRightIcon.mjs";
|
|
48
|
-
import Icons$
|
|
49
|
-
import Icons$
|
|
50
|
-
import Icons$
|
|
51
|
-
import Icons$
|
|
52
|
-
import Icons$
|
|
53
|
-
import Icons$
|
|
54
|
-
import Icons$
|
|
55
|
-
import Icons$
|
|
56
|
-
import Icons$
|
|
50
|
+
import Icons$12 from "./MicrosoftEntra/index.mjs";
|
|
51
|
+
import Icons$13 from "./MicrosoftTeams/index.mjs";
|
|
52
|
+
import Icons$14 from "./NextAuth/index.mjs";
|
|
53
|
+
import Icons$15 from "./QQ/index.mjs";
|
|
54
|
+
import Icons$16 from "./Slack/index.mjs";
|
|
55
|
+
import Icons$17 from "./Telegram/index.mjs";
|
|
56
|
+
import Icons$18 from "./WeChat/index.mjs";
|
|
57
|
+
import Icons$19 from "./WhatsApp/index.mjs";
|
|
58
|
+
import Icons$20 from "./Zitadel/index.mjs";
|
|
57
59
|
import { Cloudflare, Github } from "@lobehub/icons";
|
|
58
|
-
export { AndroidIcon, AppleIcon, AppstoreIcon, Icons as Auth0, Icons$1 as Authelia, Icons$2 as Authentik, BotPromptIcon, BrainOffIcon, Icons$3 as Casdoor, ChromeIcon, Icons$4 as Clerk, Cloudflare, CodepenIcon, CodesandboxIcon, CreateBotIcon, Icons$5 as Discord, DiscordIcon, FacebookIcon, FigmaIcon, FramerIcon, Github, GithubIcon, GitlabIcon, GlobeOffIcon, Icons$
|
|
60
|
+
export { AndroidIcon, AppleIcon, AppstoreIcon, Icons as Auth0, Icons$1 as Authelia, Icons$2 as Authentik, BotPromptIcon, BrainOffIcon, Icons$3 as Casdoor, ChromeIcon, Icons$4 as Clerk, Cloudflare, CodepenIcon, CodesandboxIcon, CreateBotIcon, Icons$5 as DingTalk, Icons$6 as Discord, DiscordIcon, FacebookIcon, FigmaIcon, FramerIcon, Github, GithubIcon, GitlabIcon, GlobeOffIcon, Icons$7 as GoogleChat, GooglePlayIcon, GroupBotIcon, GroupBotSquareIcon, Icons$8 as IMessage, InstagramIcon, Icons$9 as Lark, LeftClickIcon, LeftDoubleClickIcon, Icons$10 as Line, LinkedinIcon, Icons$11 as Logto, McpIcon, Icons$12 as MicrosoftEntra, Icons$13 as MicrosoftTeams, Icons$14 as NextAuth, NotionIcon, PocketIcon, ProviderIcon, Icons$15 as QQ, RailSymbolIcon, RedditIcon, RightClickIcon, RightDoubleClickIcon, ShapesUploadIcon, SkillsIcon, Icons$16 as Slack, SlackIcon, Icons$17 as Telegram, ThinkIcon, TreeDownRightIcon, TreeUpDownRightIcon, Icons$18 as WeChat, Icons$19 as WhatsApp, Icons$20 as Zitadel };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.1",
|
|
4
4
|
"description": "Lobe UI is an open-source UI component library for building AIGC web apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@giscus/react": "^3.1.0",
|
|
149
149
|
"@mdx-js/mdx": "^3.1.1",
|
|
150
150
|
"@mdx-js/react": "^3.1.1",
|
|
151
|
-
"@pierre/diffs": "^1.1.
|
|
151
|
+
"@pierre/diffs": "^1.1.19",
|
|
152
152
|
"@radix-ui/react-slot": "^1.2.4",
|
|
153
153
|
"@shikijs/core": "^4.0.2",
|
|
154
154
|
"@shikijs/transformers": "^4.0.2",
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
"clsx": "^2.1.1",
|
|
161
161
|
"dayjs": "^1.11.20",
|
|
162
162
|
"emoji-mart": "^5.6.0",
|
|
163
|
-
"es-toolkit": "^1.
|
|
163
|
+
"es-toolkit": "^1.46.0",
|
|
164
164
|
"fast-deep-equal": "^3.1.3",
|
|
165
165
|
"immer": "^11.1.4",
|
|
166
|
-
"katex": "^0.16.
|
|
166
|
+
"katex": "^0.16.45",
|
|
167
167
|
"leva": "^0.10.1",
|
|
168
|
-
"lucide-react": "^1.
|
|
169
|
-
"marked": "^17.0.
|
|
168
|
+
"lucide-react": "^1.11.0",
|
|
169
|
+
"marked": "^17.0.6",
|
|
170
170
|
"mermaid": "^11.14.0",
|
|
171
171
|
"motion": "^12.38.0",
|
|
172
172
|
"numeral": "^2.0.6",
|
|
@@ -202,14 +202,14 @@
|
|
|
202
202
|
"url-join": "^5.0.0",
|
|
203
203
|
"use-merge-value": "^1.2.0",
|
|
204
204
|
"uuid": "^13.0.0",
|
|
205
|
-
"virtua": "^0.49.
|
|
205
|
+
"virtua": "^0.49.1"
|
|
206
206
|
},
|
|
207
207
|
"devDependencies": {
|
|
208
208
|
"@ant-design/icons": "^6.1.1",
|
|
209
209
|
"@commitlint/cli": "^19.8.1",
|
|
210
210
|
"@lobehub/eslint-config": "2.0.0",
|
|
211
211
|
"@lobehub/fluent-emoji": "^4.1.0",
|
|
212
|
-
"@lobehub/icons": "^5.
|
|
212
|
+
"@lobehub/icons": "^5.6.0",
|
|
213
213
|
"@lobehub/lint": "^2.1.5",
|
|
214
214
|
"@testing-library/react": "^16.3.2",
|
|
215
215
|
"@types/chroma-js": "^3.1.2",
|
|
@@ -221,17 +221,17 @@
|
|
|
221
221
|
"@types/react": "^19.2.14",
|
|
222
222
|
"@types/react-dom": "^19.2.3",
|
|
223
223
|
"@types/unist": "^3.0.3",
|
|
224
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
225
|
-
"@typescript-eslint/parser": "^8.
|
|
224
|
+
"@typescript-eslint/eslint-plugin": "^8.59.0",
|
|
225
|
+
"@typescript-eslint/parser": "^8.59.0",
|
|
226
226
|
"@vitest/coverage-v8": "^3.2.4",
|
|
227
|
-
"antd": "^6.3.
|
|
227
|
+
"antd": "^6.3.6",
|
|
228
228
|
"babel-plugin-antd-style": "^1.0.4",
|
|
229
229
|
"cheerio": "^1.2.0",
|
|
230
230
|
"clean-package": "^2.2.0",
|
|
231
231
|
"commitlint": "^19.8.1",
|
|
232
232
|
"concurrently": "^9.2.1",
|
|
233
233
|
"cross-env": "^10.1.0",
|
|
234
|
-
"dotenv": "^17.4.
|
|
234
|
+
"dotenv": "^17.4.2",
|
|
235
235
|
"dpdm": "^4.0.1",
|
|
236
236
|
"dumi": "^2.4.23",
|
|
237
237
|
"dumi-theme-lobehub": "^5.0.0",
|
|
@@ -242,17 +242,17 @@
|
|
|
242
242
|
"jsdom": "^26.1.0",
|
|
243
243
|
"lint-staged": "^16.4.0",
|
|
244
244
|
"mdast-util-to-markdown": "^2.1.2",
|
|
245
|
-
"prettier": "^3.8.
|
|
246
|
-
"react": "^19.2.
|
|
247
|
-
"react-dom": "^19.2.
|
|
245
|
+
"prettier": "^3.8.3",
|
|
246
|
+
"react": "^19.2.5",
|
|
247
|
+
"react-dom": "^19.2.5",
|
|
248
248
|
"remark": "^15.0.1",
|
|
249
249
|
"remark-cli": "^12.0.1",
|
|
250
250
|
"semantic-release": "^21.1.2",
|
|
251
251
|
"stylelint": "^16.26.1",
|
|
252
252
|
"svgo": "^4.0.1",
|
|
253
|
-
"tsdown": "^0.21.
|
|
253
|
+
"tsdown": "^0.21.10",
|
|
254
254
|
"tsx": "^4.21.0",
|
|
255
|
-
"typescript": "^6.0.
|
|
255
|
+
"typescript": "^6.0.3",
|
|
256
256
|
"unist-util-is": "^6.0.1",
|
|
257
257
|
"unist-util-visit": "^5.1.0",
|
|
258
258
|
"vitest": "^3.2.4"
|