@tiny-design/react 1.4.0 → 1.5.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/alert/alert.js +2 -2
- package/es/alert/alert.js.map +1 -1
- package/es/alert/style/_index.scss +8 -4
- package/es/alert/style/index.css +7 -4
- package/es/auto-complete/style/_index.scss +4 -5
- package/es/auto-complete/style/index.css +4 -5
- package/es/breadcrumb/style/index.css +1 -1
- package/es/breadcrumb/types.d.ts +1 -1
- package/es/button/style/index.css +14 -14
- package/es/calendar/style/_index.scss +9 -9
- package/es/calendar/style/index.css +9 -9
- package/es/card/style/index.css +3 -3
- package/es/cascader/style/_index.scss +9 -9
- package/es/cascader/style/index.css +9 -9
- package/es/checkbox/style/_index.scss +9 -12
- package/es/checkbox/style/index.css +9 -12
- package/es/collapse/collapse-panel.js +20 -20
- package/es/collapse/collapse-panel.js.map +1 -1
- package/es/collapse/style/_index.scss +27 -10
- package/es/collapse/style/index.css +27 -12
- package/es/color-picker/style/_index.scss +7 -7
- package/es/color-picker/style/index.css +4 -4
- package/es/date-picker/style/_index.scss +1 -1
- package/es/date-picker/style/index.css +1 -1
- package/es/descriptions/style/_index.scss +5 -6
- package/es/descriptions/style/index.css +6 -6
- package/es/empty/style/_index.scss +1 -1
- package/es/empty/style/index.css +1 -1
- package/es/form/style/_index.scss +5 -6
- package/es/form/style/index.css +4 -4
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/input/style/_index.scss +5 -4
- package/es/input/style/_mixin.scss +1 -1
- package/es/input/style/index.css +21 -20
- package/es/input-number/input-number.js +11 -5
- package/es/input-number/input-number.js.map +1 -1
- package/es/input-number/style/_index.scss +5 -3
- package/es/input-number/style/index.css +13 -11
- package/es/input-otp/input-otp.js +5 -7
- package/es/input-otp/input-otp.js.map +1 -1
- package/es/input-otp/style/_index.scss +1 -1
- package/es/input-otp/style/index.css +8 -8
- package/es/list/list.js +2 -2
- package/es/list/list.js.map +1 -1
- package/es/list/style/_index.scss +3 -3
- package/es/list/style/index.css +3 -3
- package/es/marquee/index.d.ts +1 -0
- package/es/marquee/index.js +9 -0
- package/es/marquee/index.js.map +1 -0
- package/es/marquee/marquee.d.ts +8 -0
- package/es/marquee/marquee.js +42 -0
- package/es/marquee/marquee.js.map +1 -0
- package/es/marquee/style/_index.scss +77 -0
- package/es/marquee/style/index.css +64 -0
- package/es/marquee/style/index.d.ts +1 -0
- package/es/marquee/style/index.js +1 -0
- package/es/marquee/types.d.ts +21 -0
- package/es/native-select/style/index.css +4 -4
- package/es/notification/style/_index.scss +1 -1
- package/es/notification/style/index.css +1 -1
- package/es/pop-confirm/style/_index.scss +1 -1
- package/es/pop-confirm/style/index.css +1 -1
- package/es/popup/style/_index.scss +9 -9
- package/es/popup/style/index.css +10 -10
- package/es/radio/style/_index.scss +5 -8
- package/es/radio/style/index.css +5 -8
- package/es/segmented/style/_index.scss +10 -10
- package/es/segmented/style/index.css +9 -9
- package/es/select/style/_index.scss +16 -17
- package/es/select/style/index.css +15 -16
- package/es/speed-dial/style/_index.scss +2 -2
- package/es/speed-dial/style/index.css +2 -2
- package/es/statistic/style/_index.scss +2 -2
- package/es/statistic/style/index.css +2 -2
- package/es/strength-indicator/strength-indicator.js +4 -3
- package/es/strength-indicator/strength-indicator.js.map +1 -1
- package/es/style/_component.scss +1 -0
- package/es/style/base.css +57 -0
- package/es/table/style/_index.scss +6 -6
- package/es/table/style/index.css +5 -5
- package/es/tag/style/index.css +1 -1
- package/es/tag/tag.js +5 -5
- package/es/tag/tag.js.map +1 -1
- package/es/textarea/style/index.css +2 -2
- package/es/time-picker/style/_index.scss +1 -1
- package/es/time-picker/style/index.css +1 -1
- package/es/timeline/style/_index.scss +3 -3
- package/es/timeline/style/index.css +3 -3
- package/es/tooltip/style/index.css +1 -1
- package/es/transfer/style/_index.scss +4 -4
- package/es/transfer/style/index.css +4 -4
- package/es/tree/style/index.css +1 -1
- package/es/typography/style/_index.scss +2 -2
- package/es/typography/style/index.css +2 -2
- package/es/upload/style/_index.scss +4 -4
- package/es/upload/style/index.css +4 -4
- package/es/waterfall/waterfall.js +7 -2
- package/es/waterfall/waterfall.js.map +1 -1
- package/lib/alert/alert.js +2 -2
- package/lib/alert/alert.js.map +1 -1
- package/lib/alert/style/_index.scss +8 -4
- package/lib/alert/style/index.css +7 -4
- package/lib/auto-complete/style/_index.scss +4 -5
- package/lib/auto-complete/style/index.css +4 -5
- package/lib/breadcrumb/style/index.css +1 -1
- package/lib/breadcrumb/types.d.ts +1 -1
- package/lib/button/style/index.css +14 -14
- package/lib/calendar/style/_index.scss +9 -9
- package/lib/calendar/style/index.css +9 -9
- package/lib/card/style/index.css +3 -3
- package/lib/cascader/style/_index.scss +9 -9
- package/lib/cascader/style/index.css +9 -9
- package/lib/checkbox/style/_index.scss +9 -12
- package/lib/checkbox/style/index.css +9 -12
- package/lib/collapse/collapse-panel.js +20 -20
- package/lib/collapse/collapse-panel.js.map +1 -1
- package/lib/collapse/style/_index.scss +27 -10
- package/lib/collapse/style/index.css +27 -12
- package/lib/color-picker/style/_index.scss +7 -7
- package/lib/color-picker/style/index.css +4 -4
- package/lib/date-picker/style/_index.scss +1 -1
- package/lib/date-picker/style/index.css +1 -1
- package/lib/descriptions/style/_index.scss +5 -6
- package/lib/descriptions/style/index.css +6 -6
- package/lib/empty/style/_index.scss +1 -1
- package/lib/empty/style/index.css +1 -1
- package/lib/form/style/_index.scss +5 -6
- package/lib/form/style/index.css +4 -4
- package/lib/index.d.ts +2 -1
- package/lib/index.js +76 -74
- package/lib/input/style/_index.scss +5 -4
- package/lib/input/style/_mixin.scss +1 -1
- package/lib/input/style/index.css +21 -20
- package/lib/input-number/input-number.js +11 -5
- package/lib/input-number/input-number.js.map +1 -1
- package/lib/input-number/style/_index.scss +5 -3
- package/lib/input-number/style/index.css +13 -11
- package/lib/input-otp/input-otp.js +5 -7
- package/lib/input-otp/input-otp.js.map +1 -1
- package/lib/input-otp/style/_index.scss +1 -1
- package/lib/input-otp/style/index.css +8 -8
- package/lib/list/list.js +2 -2
- package/lib/list/list.js.map +1 -1
- package/lib/list/style/_index.scss +3 -3
- package/lib/list/style/index.css +3 -3
- package/lib/marquee/index.js +8 -0
- package/lib/marquee/index.js.map +1 -0
- package/lib/marquee/marquee.d.ts +8 -0
- package/lib/marquee/marquee.js +45 -0
- package/lib/marquee/marquee.js.map +1 -0
- package/lib/marquee/style/_index.scss +77 -0
- package/lib/marquee/style/index.css +64 -0
- package/lib/marquee/style/index.d.ts +1 -0
- package/lib/marquee/style/index.js +1 -0
- package/lib/marquee/types.d.ts +21 -0
- package/lib/native-select/style/index.css +4 -4
- package/lib/notification/style/_index.scss +1 -1
- package/lib/notification/style/index.css +1 -1
- package/lib/pop-confirm/style/_index.scss +1 -1
- package/lib/pop-confirm/style/index.css +1 -1
- package/lib/popup/style/_index.scss +9 -9
- package/lib/popup/style/index.css +10 -10
- package/lib/radio/style/_index.scss +5 -8
- package/lib/radio/style/index.css +5 -8
- package/lib/segmented/style/_index.scss +10 -10
- package/lib/segmented/style/index.css +9 -9
- package/lib/select/style/_index.scss +16 -17
- package/lib/select/style/index.css +15 -16
- package/lib/speed-dial/style/_index.scss +2 -2
- package/lib/speed-dial/style/index.css +2 -2
- package/lib/statistic/style/_index.scss +2 -2
- package/lib/statistic/style/index.css +2 -2
- package/lib/strength-indicator/strength-indicator.js +4 -3
- package/lib/strength-indicator/strength-indicator.js.map +1 -1
- package/lib/style/_component.scss +1 -0
- package/lib/style/base.css +57 -0
- package/lib/table/style/_index.scss +6 -6
- package/lib/table/style/index.css +5 -5
- package/lib/tag/style/index.css +1 -1
- package/lib/tag/tag.js +5 -5
- package/lib/tag/tag.js.map +1 -1
- package/lib/textarea/style/index.css +2 -2
- package/lib/time-picker/style/_index.scss +1 -1
- package/lib/time-picker/style/index.css +1 -1
- package/lib/timeline/style/_index.scss +3 -3
- package/lib/timeline/style/index.css +3 -3
- package/lib/tooltip/style/index.css +1 -1
- package/lib/transfer/style/_index.scss +4 -4
- package/lib/transfer/style/index.css +4 -4
- package/lib/tree/style/index.css +1 -1
- package/lib/typography/style/_index.scss +2 -2
- package/lib/typography/style/index.css +2 -2
- package/lib/upload/style/_index.scss +4 -4
- package/lib/upload/style/index.css +4 -4
- package/lib/waterfall/waterfall.js +7 -2
- package/lib/waterfall/waterfall.js.map +1 -1
- package/package.json +3 -3
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
margin: 0;
|
|
31
31
|
padding: 0;
|
|
32
32
|
color: var(--ty-color-text);
|
|
33
|
-
font-size:
|
|
33
|
+
font-size: var(--ty-font-size-base);
|
|
34
34
|
outline: 0;
|
|
35
35
|
}
|
|
36
36
|
.ty-upload__upload-list {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
padding: 0;
|
|
40
40
|
box-sizing: border-box;
|
|
41
41
|
color: var(--ty-color-text);
|
|
42
|
-
font-size:
|
|
42
|
+
font-size: var(--ty-font-size-base);
|
|
43
43
|
}
|
|
44
44
|
.ty-upload__upload-list-item {
|
|
45
45
|
margin-top: 5px;
|
|
46
|
-
font-size:
|
|
46
|
+
font-size: var(--ty-font-size-base);
|
|
47
47
|
transition: background-color 300ms;
|
|
48
48
|
}
|
|
49
49
|
.ty-upload__upload-list-item:hover {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
text-align: center;
|
|
93
93
|
background: var(--ty-upload-dragger-bg);
|
|
94
94
|
border: 1px dashed var(--ty-upload-dragger-border);
|
|
95
|
-
border-radius:
|
|
95
|
+
border-radius: var(--ty-border-radius);
|
|
96
96
|
cursor: pointer;
|
|
97
97
|
transition: border-color 300ms, background-color 300ms;
|
|
98
98
|
}
|
|
@@ -57,13 +57,18 @@ const Waterfall = React.forwardRef((props, ref) => {
|
|
|
57
57
|
for (const [, el] of itemRefsMap.current) if (el) observer.observe(el);
|
|
58
58
|
return () => observer.disconnect();
|
|
59
59
|
}, [items, collectItemSizes]);
|
|
60
|
+
const prevLayoutRef = useRef("");
|
|
60
61
|
useEffect(() => {
|
|
61
62
|
if (!onLayoutChange || !items || items.length === 0) return;
|
|
62
63
|
if (!items.every((item) => itemPositions.has(item.key))) return;
|
|
63
|
-
|
|
64
|
+
const sortInfo = items.map((item) => ({
|
|
64
65
|
key: item.key,
|
|
65
66
|
column: itemPositions.get(item.key).column
|
|
66
|
-
}))
|
|
67
|
+
}));
|
|
68
|
+
const layoutKey = sortInfo.map((s) => `${s.key}:${s.column}`).join(",");
|
|
69
|
+
if (layoutKey === prevLayoutRef.current) return;
|
|
70
|
+
prevLayoutRef.current = layoutKey;
|
|
71
|
+
onLayoutChange(sortInfo);
|
|
67
72
|
}, [
|
|
68
73
|
itemPositions,
|
|
69
74
|
items,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waterfall.js","names":["Transition"],"sources":["../../src/waterfall/waterfall.tsx"],"sourcesContent":["import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport Transition from '../transition';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { Breakpoint, WaterfallItem, WaterfallProps } from './types';\nimport useBreakpoint, { responsiveArray } from './hooks/use-breakpoint';\nimport usePositions, { ItemHeightData } from './hooks/use-positions';\n\nconst Waterfall = React.forwardRef<HTMLDivElement, WaterfallProps>((props, ref) => {\n const {\n prefixCls: customisedCls,\n className,\n style,\n columns = 3,\n gutter = 0,\n items,\n itemRender,\n onLayoutChange,\n ...otherProps\n } = props;\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('waterfall', configContext.prefixCls, customisedCls);\n\n // ===================== Breakpoint =====================\n const screens = useBreakpoint();\n\n const columnCount = React.useMemo<number>(() => {\n if (typeof columns === 'number') {\n return columns;\n }\n\n const matchingBreakpoint = responsiveArray.find(\n (bp: Breakpoint) => screens[bp] && columns[bp] !== undefined,\n );\n\n if (matchingBreakpoint) {\n return columns[matchingBreakpoint] as number;\n }\n\n return columns.xs ?? 1;\n }, [columns, screens]);\n\n // ====================== Gutter ======================\n const [horizontalGutter, verticalGutter] = Array.isArray(gutter)\n ? gutter\n : [gutter, gutter];\n\n // =================== Item Refs ===================\n const itemRefsMap = useRef<Map<React.Key, HTMLDivElement | null>>(new Map());\n\n const setItemRef = useCallback((key: React.Key, el: HTMLDivElement | null) => {\n itemRefsMap.current.set(key, el);\n }, []);\n\n // ================= Item Heights ==================\n const [itemHeights, setItemHeights] = useState<ItemHeightData[]>([]);\n\n const collectItemSizes = useCallback(() => {\n if (!items || items.length === 0) {\n setItemHeights([]);\n return;\n }\n\n const nextHeights = items.map<ItemHeightData>((item, index) => {\n const key = item.key ?? index;\n const el = itemRefsMap.current.get(key);\n const height = el ? el.getBoundingClientRect().height : 0;\n return [key, height, item.column];\n });\n\n setItemHeights((prev) => {\n const isSame =\n prev.length === nextHeights.length &&\n prev.every((p, i) => p[0] === nextHeights[i][0] && p[1] === nextHeights[i][1]);\n return isSame ? prev : nextHeights;\n });\n }, [items]);\n\n // ================= Positions ==================\n const [itemPositions, totalHeight] = usePositions(itemHeights, columnCount, verticalGutter);\n\n // Collect sizes on items/columns change\n useEffect(() => {\n collectItemSizes();\n }, [items, columnCount, collectItemSizes]);\n\n // ResizeObserver for dynamic content\n useEffect(() => {\n if (typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver(() => {\n collectItemSizes();\n });\n\n for (const [, el] of itemRefsMap.current) {\n if (el) observer.observe(el);\n }\n\n return () => observer.disconnect();\n }, [items, collectItemSizes]);\n\n // ================ onLayoutChange ================\n useEffect(() => {\n if (!onLayoutChange || !items || items.length === 0) return;\n\n const allPositioned = items.every((item) => itemPositions.has(item.key));\n if (!allPositioned) return;\n\n const sortInfo = items.map((item) => ({\n key: item.key,\n column: itemPositions.get(item.key)!.column,\n }));\n onLayoutChange(sortInfo);\n }, [itemPositions, items, onLayoutChange]);\n\n // ============== Exiting items (replaces TransitionGroup) ==============\n const prevItemsRef = useRef<WaterfallItem[]>(items || []);\n const [exitingItems, setExitingItems] = useState<Map<React.Key, WaterfallItem>>(new Map());\n\n useEffect(() => {\n const currentKeys = new Set((items || []).map((item, i) => item.key ?? i));\n const removed = new Map<React.Key, WaterfallItem>();\n\n prevItemsRef.current.forEach((item, index) => {\n const key = item.key ?? index;\n if (!currentKeys.has(key)) {\n removed.set(key, item);\n }\n });\n\n if (removed.size > 0) {\n setExitingItems((prev) => {\n const next = new Map(prev);\n removed.forEach((item, key) => next.set(key, item));\n return next;\n });\n }\n\n prevItemsRef.current = items || [];\n }, [items]);\n\n const handleExited = useCallback((key: React.Key) => {\n itemRefsMap.current.delete(key);\n setExitingItems((prev) => {\n const next = new Map(prev);\n next.delete(key);\n return next;\n });\n collectItemSizes();\n }, [collectItemSizes]);\n\n // ==================== Render ====================\n const cls = classNames(prefixCls, className);\n\n const containerStyle: React.CSSProperties = {\n ...style,\n position: 'relative',\n height: totalHeight || undefined,\n };\n\n const mergedItems = items || [];\n\n const renderItem = (item: WaterfallItem, index: number, isExiting: boolean) => {\n const key = item.key ?? index;\n const position = itemPositions.get(key);\n const hasPosition = !!position;\n const columnIndex = position?.column ?? 0;\n\n const itemStyle: React.CSSProperties = {\n position: 'absolute',\n width: `calc((100% - ${horizontalGutter * (columnCount - 1)}px) / ${columnCount})`,\n left: `calc((100% - ${horizontalGutter * (columnCount - 1)}px) / ${columnCount} * ${columnIndex} + ${horizontalGutter * columnIndex}px)`,\n top: position?.top ?? 0,\n // Only transition position changes after initial placement\n transition: hasPosition ? 'top 0.3s ease, left 0.3s ease, opacity 0.3s ease' : 'none',\n // Hide until position is computed so items don't flash at (0,0)\n opacity: hasPosition ? 1 : 0,\n };\n\n const content = item.children ?? itemRender?.({ ...item, index, column: columnIndex });\n\n return (\n <Transition\n key={key}\n in={!isExiting}\n timeout={300}\n appear={false}\n unmountOnExit={true}\n classNames={`${prefixCls}__item-fade`}\n onExited={() => handleExited(key)}\n >\n <div\n ref={(el) => setItemRef(key, el)}\n className={`${prefixCls}__item`}\n style={itemStyle}\n >\n {content}\n </div>\n </Transition>\n );\n };\n\n return (\n <div\n ref={ref}\n {...otherProps}\n className={cls}\n style={containerStyle}\n onLoad={collectItemSizes}\n onError={collectItemSizes}\n >\n {mergedItems.map((item, index) => renderItem(item, index, false))}\n {Array.from(exitingItems.entries()).map(([key, item]) =>\n renderItem(item, Number(key), true)\n )}\n </div>\n );\n});\n\nWaterfall.displayName = 'Waterfall';\n\nexport default Waterfall;\n"],"mappings":";;;;;;;;;AASA,MAAM,YAAY,MAAM,YAA4C,OAAO,QAAQ;CACjF,MAAM,EACJ,WAAW,eACX,WACA,OACA,UAAU,GACV,SAAS,GACT,OACA,YACA,gBACA,GAAG,eACD;CAGJ,MAAM,YAAY,aAAa,aADT,WAAW,cAAc,CACW,WAAW,cAAc;CAGnF,MAAM,UAAU,eAAe;CAE/B,MAAM,cAAc,MAAM,cAAsB;AAC9C,MAAI,OAAO,YAAY,SACrB,QAAO;EAGT,MAAM,qBAAqB,gBAAgB,MACxC,OAAmB,QAAQ,OAAO,QAAQ,QAAQ,KAAA,EACpD;AAED,MAAI,mBACF,QAAO,QAAQ;AAGjB,SAAO,QAAQ,MAAM;IACpB,CAAC,SAAS,QAAQ,CAAC;CAGtB,MAAM,CAAC,kBAAkB,kBAAkB,MAAM,QAAQ,OAAO,GAC5D,SACA,CAAC,QAAQ,OAAO;CAGpB,MAAM,cAAc,uBAA8C,IAAI,KAAK,CAAC;CAE5E,MAAM,aAAa,aAAa,KAAgB,OAA8B;AAC5E,cAAY,QAAQ,IAAI,KAAK,GAAG;IAC/B,EAAE,CAAC;CAGN,MAAM,CAAC,aAAa,kBAAkB,SAA2B,EAAE,CAAC;CAEpE,MAAM,mBAAmB,kBAAkB;AACzC,MAAI,CAAC,SAAS,MAAM,WAAW,GAAG;AAChC,kBAAe,EAAE,CAAC;AAClB;;EAGF,MAAM,cAAc,MAAM,KAAqB,MAAM,UAAU;GAC7D,MAAM,MAAM,KAAK,OAAO;GACxB,MAAM,KAAK,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f,YAAY,GAAG,UAAU;GACzB,gBAAgB,aAAa,IAAI;aAEjC,oBAAC,OAAD;IACE,MAAM,OAAO,WAAW,KAAK,GAAG;IAChC,WAAW,GAAG,UAAU;IACxB,OAAO;cAEN;IACG,CAAA;GACK,EAfN,IAeM;;AAIjB,QACE,qBAAC,OAAD;EACO;EACL,GAAI;EACJ,WAAW;EACX,OAAO;EACP,QAAQ;EACR,SAAS;YANX,CAQG,YAAY,KAAK,MAAM,UAAU,WAAW,MAAM,OAAO,MAAM,CAAC,EAChE,MAAM,KAAK,aAAa,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,UAC7C,WAAW,MAAM,OAAO,IAAI,EAAE,KAAK,CACpC,CACG;;EAER;AAEF,UAAU,cAAc"}
|
|
1
|
+
{"version":3,"file":"waterfall.js","names":["Transition"],"sources":["../../src/waterfall/waterfall.tsx"],"sourcesContent":["import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport Transition from '../transition';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { Breakpoint, WaterfallItem, WaterfallProps } from './types';\nimport useBreakpoint, { responsiveArray } from './hooks/use-breakpoint';\nimport usePositions, { ItemHeightData } from './hooks/use-positions';\n\nconst Waterfall = React.forwardRef<HTMLDivElement, WaterfallProps>((props, ref) => {\n const {\n prefixCls: customisedCls,\n className,\n style,\n columns = 3,\n gutter = 0,\n items,\n itemRender,\n onLayoutChange,\n ...otherProps\n } = props;\n\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('waterfall', configContext.prefixCls, customisedCls);\n\n // ===================== Breakpoint =====================\n const screens = useBreakpoint();\n\n const columnCount = React.useMemo<number>(() => {\n if (typeof columns === 'number') {\n return columns;\n }\n\n const matchingBreakpoint = responsiveArray.find(\n (bp: Breakpoint) => screens[bp] && columns[bp] !== undefined,\n );\n\n if (matchingBreakpoint) {\n return columns[matchingBreakpoint] as number;\n }\n\n return columns.xs ?? 1;\n }, [columns, screens]);\n\n // ====================== Gutter ======================\n const [horizontalGutter, verticalGutter] = Array.isArray(gutter)\n ? gutter\n : [gutter, gutter];\n\n // =================== Item Refs ===================\n const itemRefsMap = useRef<Map<React.Key, HTMLDivElement | null>>(new Map());\n\n const setItemRef = useCallback((key: React.Key, el: HTMLDivElement | null) => {\n itemRefsMap.current.set(key, el);\n }, []);\n\n // ================= Item Heights ==================\n const [itemHeights, setItemHeights] = useState<ItemHeightData[]>([]);\n\n const collectItemSizes = useCallback(() => {\n if (!items || items.length === 0) {\n setItemHeights([]);\n return;\n }\n\n const nextHeights = items.map<ItemHeightData>((item, index) => {\n const key = item.key ?? index;\n const el = itemRefsMap.current.get(key);\n const height = el ? el.getBoundingClientRect().height : 0;\n return [key, height, item.column];\n });\n\n setItemHeights((prev) => {\n const isSame =\n prev.length === nextHeights.length &&\n prev.every((p, i) => p[0] === nextHeights[i][0] && p[1] === nextHeights[i][1]);\n return isSame ? prev : nextHeights;\n });\n }, [items]);\n\n // ================= Positions ==================\n const [itemPositions, totalHeight] = usePositions(itemHeights, columnCount, verticalGutter);\n\n // Collect sizes on items/columns change\n useEffect(() => {\n collectItemSizes();\n }, [items, columnCount, collectItemSizes]);\n\n // ResizeObserver for dynamic content\n useEffect(() => {\n if (typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver(() => {\n collectItemSizes();\n });\n\n for (const [, el] of itemRefsMap.current) {\n if (el) observer.observe(el);\n }\n\n return () => observer.disconnect();\n }, [items, collectItemSizes]);\n\n // ================ onLayoutChange ================\n const prevLayoutRef = useRef<string>('');\n\n useEffect(() => {\n if (!onLayoutChange || !items || items.length === 0) return;\n\n const allPositioned = items.every((item) => itemPositions.has(item.key));\n if (!allPositioned) return;\n\n const sortInfo = items.map((item) => ({\n key: item.key,\n column: itemPositions.get(item.key)!.column,\n }));\n\n const layoutKey = sortInfo.map((s) => `${s.key}:${s.column}`).join(',');\n if (layoutKey === prevLayoutRef.current) return;\n prevLayoutRef.current = layoutKey;\n\n onLayoutChange(sortInfo);\n }, [itemPositions, items, onLayoutChange]);\n\n // ============== Exiting items (replaces TransitionGroup) ==============\n const prevItemsRef = useRef<WaterfallItem[]>(items || []);\n const [exitingItems, setExitingItems] = useState<Map<React.Key, WaterfallItem>>(new Map());\n\n useEffect(() => {\n const currentKeys = new Set((items || []).map((item, i) => item.key ?? i));\n const removed = new Map<React.Key, WaterfallItem>();\n\n prevItemsRef.current.forEach((item, index) => {\n const key = item.key ?? index;\n if (!currentKeys.has(key)) {\n removed.set(key, item);\n }\n });\n\n if (removed.size > 0) {\n setExitingItems((prev) => {\n const next = new Map(prev);\n removed.forEach((item, key) => next.set(key, item));\n return next;\n });\n }\n\n prevItemsRef.current = items || [];\n }, [items]);\n\n const handleExited = useCallback((key: React.Key) => {\n itemRefsMap.current.delete(key);\n setExitingItems((prev) => {\n const next = new Map(prev);\n next.delete(key);\n return next;\n });\n collectItemSizes();\n }, [collectItemSizes]);\n\n // ==================== Render ====================\n const cls = classNames(prefixCls, className);\n\n const containerStyle: React.CSSProperties = {\n ...style,\n position: 'relative',\n height: totalHeight || undefined,\n };\n\n const mergedItems = items || [];\n\n const renderItem = (item: WaterfallItem, index: number, isExiting: boolean) => {\n const key = item.key ?? index;\n const position = itemPositions.get(key);\n const hasPosition = !!position;\n const columnIndex = position?.column ?? 0;\n\n const itemStyle: React.CSSProperties = {\n position: 'absolute',\n width: `calc((100% - ${horizontalGutter * (columnCount - 1)}px) / ${columnCount})`,\n left: `calc((100% - ${horizontalGutter * (columnCount - 1)}px) / ${columnCount} * ${columnIndex} + ${horizontalGutter * columnIndex}px)`,\n top: position?.top ?? 0,\n // Only transition position changes after initial placement\n transition: hasPosition ? 'top 0.3s ease, left 0.3s ease, opacity 0.3s ease' : 'none',\n // Hide until position is computed so items don't flash at (0,0)\n opacity: hasPosition ? 1 : 0,\n };\n\n const content = item.children ?? itemRender?.({ ...item, index, column: columnIndex });\n\n return (\n <Transition\n key={key}\n in={!isExiting}\n timeout={300}\n appear={false}\n unmountOnExit={true}\n classNames={`${prefixCls}__item-fade`}\n onExited={() => handleExited(key)}\n >\n <div\n ref={(el) => setItemRef(key, el)}\n className={`${prefixCls}__item`}\n style={itemStyle}\n >\n {content}\n </div>\n </Transition>\n );\n };\n\n return (\n <div\n ref={ref}\n {...otherProps}\n className={cls}\n style={containerStyle}\n onLoad={collectItemSizes}\n onError={collectItemSizes}\n >\n {mergedItems.map((item, index) => renderItem(item, index, false))}\n {Array.from(exitingItems.entries()).map(([key, item]) =>\n renderItem(item, Number(key), true)\n )}\n </div>\n );\n});\n\nWaterfall.displayName = 'Waterfall';\n\nexport default Waterfall;\n"],"mappings":";;;;;;;;;AASA,MAAM,YAAY,MAAM,YAA4C,OAAO,QAAQ;CACjF,MAAM,EACJ,WAAW,eACX,WACA,OACA,UAAU,GACV,SAAS,GACT,OACA,YACA,gBACA,GAAG,eACD;CAGJ,MAAM,YAAY,aAAa,aADT,WAAW,cAAc,CACW,WAAW,cAAc;CAGnF,MAAM,UAAU,eAAe;CAE/B,MAAM,cAAc,MAAM,cAAsB;AAC9C,MAAI,OAAO,YAAY,SACrB,QAAO;EAGT,MAAM,qBAAqB,gBAAgB,MACxC,OAAmB,QAAQ,OAAO,QAAQ,QAAQ,KAAA,EACpD;AAED,MAAI,mBACF,QAAO,QAAQ;AAGjB,SAAO,QAAQ,MAAM;IACpB,CAAC,SAAS,QAAQ,CAAC;CAGtB,MAAM,CAAC,kBAAkB,kBAAkB,MAAM,QAAQ,OAAO,GAC5D,SACA,CAAC,QAAQ,OAAO;CAGpB,MAAM,cAAc,uBAA8C,IAAI,KAAK,CAAC;CAE5E,MAAM,aAAa,aAAa,KAAgB,OAA8B;AAC5E,cAAY,QAAQ,IAAI,KAAK,GAAG;IAC/B,EAAE,CAAC;CAGN,MAAM,CAAC,aAAa,kBAAkB,SAA2B,EAAE,CAAC;CAEpE,MAAM,mBAAmB,kBAAkB;AACzC,MAAI,CAAC,SAAS,MAAM,WAA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AAM,gBAAgB,oBAAoB,cAAc,GAAG,QAAQ,YAAY,KAAK,YAAY,KAAK,mBAAmB,YAAY;GACpI,KAAK,UAAU,OAAO;GAEtB,YAAY,cAAc,qDAAqD;GAE/E,SAAS,cAAc,IAAI;GAC5B;EAED,MAAM,UAAU,KAAK,YAAY,aAAa;GAAE,GAAG;GAAM;GAAO,QAAQ;GAAa,CAAC;AAEtF,SACE,oBAACA,oBAAD;GAEE,IAAI,CAAC;GACL,SAAS;GACT,QAAQ;GACR,eAAe;GACf,YAAY,GAAG,UAAU;GACzB,gBAAgB,aAAa,IAAI;aAEjC,oBAAC,OAAD;IACE,MAAM,OAAO,WAAW,KAAK,GAAG;IAChC,WAAW,GAAG,UAAU;IACxB,OAAO;cAEN;IACG,CAAA;GACK,EAfN,IAeM;;AAIjB,QACE,qBAAC,OAAD;EACO;EACL,GAAI;EACJ,WAAW;EACX,OAAO;EACP,QAAQ;EACR,SAAS;YANX,CAQG,YAAY,KAAK,MAAM,UAAU,WAAW,MAAM,OAAO,MAAM,CAAC,EAChE,MAAM,KAAK,aAAa,SAAS,CAAC,CAAC,KAAK,CAAC,KAAK,UAC7C,WAAW,MAAM,OAAO,IAAI,EAAE,KAAK,CACpC,CACG;;EAER;AAEF,UAAU,cAAc"}
|
package/lib/alert/alert.js
CHANGED
|
@@ -27,7 +27,7 @@ const Alert = react.default.forwardRef((props, forwardedRef) => {
|
|
|
27
27
|
const closeBtnOnClick = (e) => {
|
|
28
28
|
ref.current && setClosedStyle(ref.current);
|
|
29
29
|
setShow(false);
|
|
30
|
-
onClose
|
|
30
|
+
onClose?.(e);
|
|
31
31
|
};
|
|
32
32
|
const closeIcon = (closable || closeText) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
33
33
|
type: "button",
|
|
@@ -75,7 +75,7 @@ const Alert = react.default.forwardRef((props, forwardedRef) => {
|
|
|
75
75
|
children: [
|
|
76
76
|
icon && renderIcon(),
|
|
77
77
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
78
|
-
className: `${prefixCls}__title`,
|
|
78
|
+
className: (0, classnames.default)(`${prefixCls}__title`, { [`${prefixCls}__title_has-content`]: children }),
|
|
79
79
|
children: title
|
|
80
80
|
}), children] }),
|
|
81
81
|
closeIcon
|
package/lib/alert/alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","names":["React","getPrefixCls","ConfigContext","CheckCircle","InfoCircle","WarningCircle","CloseCircle","Transition"],"sources":["../../src/alert/alert.tsx"],"sourcesContent":["import React, { useState, useRef, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { CheckCircle, CloseCircle, InfoCircle, WarningCircle } from '../_utils/components';\nimport { AlertProps } from './types';\nimport Transition from '../transition';\n\nconst setClosedStyle = (node: HTMLElement): void => {\n node.style.borderTopWidth = '0';\n node.style.paddingTop = '0';\n node.style.marginTop = '0';\n node.style.height = '0';\n node.style.paddingBottom = '0';\n node.style.borderBottomWidth = '0';\n node.style.marginBottom = '0';\n};\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>((props, forwardedRef) => {\n const {\n type = 'info',\n iconSize = 14,\n prefixCls: customisedCls,\n title,\n icon,\n closeText,\n closable,\n afterClose,\n onClose,\n children,\n className,\n style,\n ...otherProps\n } = props;\n const [isShow, setShow] = useState(true);\n const ref = useRef<HTMLDivElement | null>(null);\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('alert', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, [`${prefixCls}_${type}`]);\n\n const closeBtnOnClick = (e: React.MouseEvent<HTMLSpanElement>): void => {\n ref.current && setClosedStyle(ref.current as HTMLDivElement);\n setShow(false);\n onClose
|
|
1
|
+
{"version":3,"file":"alert.js","names":["React","getPrefixCls","ConfigContext","CheckCircle","InfoCircle","WarningCircle","CloseCircle","Transition"],"sources":["../../src/alert/alert.tsx"],"sourcesContent":["import React, { useState, useRef, useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider/config-context';\nimport { getPrefixCls } from '../_utils/general';\nimport { CheckCircle, CloseCircle, InfoCircle, WarningCircle } from '../_utils/components';\nimport { AlertProps } from './types';\nimport Transition from '../transition';\n\nconst setClosedStyle = (node: HTMLElement): void => {\n node.style.borderTopWidth = '0';\n node.style.paddingTop = '0';\n node.style.marginTop = '0';\n node.style.height = '0';\n node.style.paddingBottom = '0';\n node.style.borderBottomWidth = '0';\n node.style.marginBottom = '0';\n};\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>((props, forwardedRef) => {\n const {\n type = 'info',\n iconSize = 14,\n prefixCls: customisedCls,\n title,\n icon,\n closeText,\n closable,\n afterClose,\n onClose,\n children,\n className,\n style,\n ...otherProps\n } = props;\n const [isShow, setShow] = useState(true);\n const ref = useRef<HTMLDivElement | null>(null);\n const configContext = useContext(ConfigContext);\n const prefixCls = getPrefixCls('alert', configContext.prefixCls, customisedCls);\n const cls = classNames(prefixCls, className, [`${prefixCls}_${type}`]);\n\n const closeBtnOnClick = (e: React.MouseEvent<HTMLSpanElement>): void => {\n ref.current && setClosedStyle(ref.current as HTMLDivElement);\n setShow(false);\n onClose?.(e);\n };\n\n // Setting close text attribute also allows to be closable\n const closeIcon = (closable || closeText) && (\n <button type=\"button\" className={`${prefixCls}__close-btn`} onClick={closeBtnOnClick} aria-label=\"Close\">\n {closeText || '✕'}\n </button>\n );\n\n const renderIcon = (): React.ReactNode => {\n if (typeof icon === 'boolean') {\n switch (type) {\n case 'success':\n return <CheckCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'info':\n return <InfoCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'warning':\n return <WarningCircle size={iconSize} className={`${prefixCls}__icon`} />;\n case 'error':\n return <CloseCircle size={iconSize} className={`${prefixCls}__icon`} />;\n }\n }\n\n return icon;\n };\n\n return (\n <Transition timeout={300} in={isShow} nodeRef={ref} onExited={afterClose}>\n <div {...otherProps} role=\"alert\" className={cls} style={style} ref={(node) => {\n ref.current = node;\n if (typeof forwardedRef === 'function') forwardedRef(node);\n else if (forwardedRef) forwardedRef.current = node;\n }}>\n {icon && renderIcon()}\n <div>\n {title && <p className={classNames(`${prefixCls}__title`, { [`${prefixCls}__title_has-content`]: children })}>{title}</p>}\n {children}\n </div>\n {closeIcon}\n </div>\n </Transition>\n );\n});\n\nAlert.displayName = 'Alert';\n\nexport default Alert;\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,kBAAkB,SAA4B;AAClD,MAAK,MAAM,iBAAiB;AAC5B,MAAK,MAAM,aAAa;AACxB,MAAK,MAAM,YAAY;AACvB,MAAK,MAAM,SAAS;AACpB,MAAK,MAAM,gBAAgB;AAC3B,MAAK,MAAM,oBAAoB;AAC/B,MAAK,MAAM,eAAe;;AAG5B,MAAM,QAAQA,MAAAA,QAAM,YAAwC,OAAO,iBAAiB;CAClF,MAAM,EACJ,OAAO,QACP,WAAW,IACX,WAAW,eACX,OACA,MACA,WACA,UACA,YACA,SACA,UACA,WACA,OACA,GAAG,eACD;CACJ,MAAM,CAAC,QAAQ,YAAA,GAAA,MAAA,UAAoB,KAAK;CACxC,MAAM,OAAA,GAAA,MAAA,QAAoC,KAAK;CAE/C,MAAM,YAAYC,gBAAAA,aAAa,UAAA,GAAA,MAAA,YADEC,uBAAAA,cAAc,CACO,WAAW,cAAc;CAC/E,MAAM,OAAA,GAAA,WAAA,SAAiB,WAAW,WAAW,CAAC,GAAG,UAAU,GAAG,OAAO,CAAC;CAEtE,MAAM,mBAAmB,MAA+C;AACtE,MAAI,WAAW,eAAe,IAAI,QAA0B;AAC5D,UAAQ,MAAM;AACd,YAAU,EAAE;;CAId,MAAM,aAAa,YAAY,cAC7B,iBAAA,GAAA,kBAAA,KAAC,UAAD;EAAQ,MAAK;EAAS,WAAW,GAAG,UA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: 10px 30px 10px 13px;
|
|
9
9
|
position: relative;
|
|
10
|
-
font-weight:
|
|
10
|
+
font-weight: var(--ty-font-weight);
|
|
11
11
|
opacity: 1;
|
|
12
|
-
font-size:
|
|
12
|
+
font-size: var(--ty-font-size-base);
|
|
13
13
|
transition: all 300ms;
|
|
14
14
|
transform-origin: center top;
|
|
15
15
|
overflow: hidden;
|
|
@@ -22,9 +22,13 @@
|
|
|
22
22
|
|
|
23
23
|
&__title {
|
|
24
24
|
box-sizing: border-box;
|
|
25
|
-
margin: 0
|
|
26
|
-
font-size:
|
|
25
|
+
margin: 0;
|
|
26
|
+
font-size: 17px;
|
|
27
27
|
font-weight: 500;
|
|
28
|
+
|
|
29
|
+
&_has-content {
|
|
30
|
+
margin-bottom: 5px;
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
&__desc {
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
padding: 10px 30px 10px 13px;
|
|
6
6
|
position: relative;
|
|
7
|
-
font-weight:
|
|
7
|
+
font-weight: var(--ty-font-weight);
|
|
8
8
|
opacity: 1;
|
|
9
|
-
font-size:
|
|
9
|
+
font-size: var(--ty-font-size-base);
|
|
10
10
|
transition: all 300ms;
|
|
11
11
|
transform-origin: center top;
|
|
12
12
|
overflow: hidden;
|
|
@@ -18,10 +18,13 @@
|
|
|
18
18
|
}
|
|
19
19
|
.ty-alert__title {
|
|
20
20
|
box-sizing: border-box;
|
|
21
|
-
margin: 0
|
|
22
|
-
font-size:
|
|
21
|
+
margin: 0;
|
|
22
|
+
font-size: 17px;
|
|
23
23
|
font-weight: 500;
|
|
24
24
|
}
|
|
25
|
+
.ty-alert__title_has-content {
|
|
26
|
+
margin-bottom: 5px;
|
|
27
|
+
}
|
|
25
28
|
.ty-alert__desc {
|
|
26
29
|
box-sizing: border-box;
|
|
27
30
|
line-height: 16px;
|
|
@@ -18,12 +18,11 @@
|
|
|
18
18
|
list-style-type: none;
|
|
19
19
|
background-color: var(--ty-select-dropdown-bg);
|
|
20
20
|
box-sizing: border-box;
|
|
21
|
-
overflow
|
|
22
|
-
overflow-y: auto;
|
|
21
|
+
overflow: hidden auto;
|
|
23
22
|
z-index: 10;
|
|
24
23
|
box-shadow: var(--ty-shadow-popup);
|
|
25
|
-
border-radius:
|
|
26
|
-
font-size:
|
|
24
|
+
border-radius: var(--ty-border-radius);
|
|
25
|
+
font-size: var(--ty-font-size-base);
|
|
27
26
|
max-height: $select-dropdown-max-height;
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
padding: 16px;
|
|
33
32
|
text-align: center;
|
|
34
33
|
color: var(--ty-color-text-quaternary);
|
|
35
|
-
font-size:
|
|
34
|
+
font-size: var(--ty-font-size-sm);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
list-style-type: none;
|
|
15
15
|
background-color: var(--ty-select-dropdown-bg);
|
|
16
16
|
box-sizing: border-box;
|
|
17
|
-
overflow
|
|
18
|
-
overflow-y: auto;
|
|
17
|
+
overflow: hidden auto;
|
|
19
18
|
z-index: 10;
|
|
20
19
|
box-shadow: var(--ty-shadow-popup);
|
|
21
|
-
border-radius:
|
|
22
|
-
font-size:
|
|
20
|
+
border-radius: var(--ty-border-radius);
|
|
21
|
+
font-size: var(--ty-font-size-base);
|
|
23
22
|
max-height: 300px;
|
|
24
23
|
}
|
|
25
24
|
.ty-auto-complete__empty {
|
|
26
25
|
padding: 16px;
|
|
27
26
|
text-align: center;
|
|
28
27
|
color: var(--ty-color-text-quaternary);
|
|
29
|
-
font-size:
|
|
28
|
+
font-size: var(--ty-font-size-sm);
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
.ty-auto-complete-option {
|
|
@@ -4,7 +4,7 @@ import React, { ReactElement } from "react";
|
|
|
4
4
|
//#region src/breadcrumb/types.d.ts
|
|
5
5
|
interface BreadcrumbProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['nav']> {
|
|
6
6
|
separator?: React.ReactNode;
|
|
7
|
-
children: ReactElement<BreadcrumbItemProps
|
|
7
|
+
children: ReactElement<BreadcrumbItemProps> | ReactElement<BreadcrumbItemProps>[];
|
|
8
8
|
}
|
|
9
9
|
interface BreadcrumbItemProps extends BaseProps, React.PropsWithoutRef<JSX.IntrinsicElements['li']> {
|
|
10
10
|
separator?: React.ReactNode;
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
-webkit-user-select: none;
|
|
42
42
|
-moz-user-select: none;
|
|
43
43
|
user-select: none;
|
|
44
|
-
border-radius:
|
|
44
|
+
border-radius: var(--ty-border-radius);
|
|
45
45
|
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
46
|
-
line-height:
|
|
46
|
+
line-height: var(--ty-line-height-base);
|
|
47
47
|
}
|
|
48
48
|
.ty-btn__loader {
|
|
49
49
|
display: inline-block;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
.ty-btn__icon-container, .ty-btn__loader {
|
|
60
60
|
display: inline-block;
|
|
61
61
|
pointer-events: none;
|
|
62
|
-
line-height:
|
|
62
|
+
line-height: var(--ty-line-height-base);
|
|
63
63
|
vertical-align: middle;
|
|
64
64
|
}
|
|
65
65
|
.ty-btn__icon-container + span, .ty-btn__loader + span {
|
|
@@ -311,18 +311,18 @@
|
|
|
311
311
|
}
|
|
312
312
|
.ty-btn_sm {
|
|
313
313
|
padding: 0 10px;
|
|
314
|
-
font-size:
|
|
315
|
-
height:
|
|
314
|
+
font-size: var(--ty-font-size-sm);
|
|
315
|
+
height: var(--ty-height-sm);
|
|
316
316
|
}
|
|
317
317
|
.ty-btn_md {
|
|
318
318
|
padding: 0 15px;
|
|
319
|
-
font-size:
|
|
320
|
-
height:
|
|
319
|
+
font-size: var(--ty-font-size-base);
|
|
320
|
+
height: var(--ty-height-md);
|
|
321
321
|
}
|
|
322
322
|
.ty-btn_lg {
|
|
323
323
|
padding: 0 28px;
|
|
324
|
-
font-size:
|
|
325
|
-
height:
|
|
324
|
+
font-size: var(--ty-font-size-lg);
|
|
325
|
+
height: var(--ty-height-lg);
|
|
326
326
|
}
|
|
327
327
|
.ty-btn_block {
|
|
328
328
|
width: 100%;
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
margin: 0;
|
|
332
332
|
}
|
|
333
333
|
.ty-btn_round {
|
|
334
|
-
border-radius:
|
|
334
|
+
border-radius: var(--ty-height-lg);
|
|
335
335
|
}
|
|
336
336
|
.ty-btn_loading {
|
|
337
337
|
position: relative;
|
|
@@ -370,12 +370,12 @@
|
|
|
370
370
|
z-index: 1;
|
|
371
371
|
}
|
|
372
372
|
.ty-btn-group .ty-btn:first-child {
|
|
373
|
-
border-top-left-radius:
|
|
374
|
-
border-bottom-left-radius:
|
|
373
|
+
border-top-left-radius: var(--ty-border-radius);
|
|
374
|
+
border-bottom-left-radius: var(--ty-border-radius);
|
|
375
375
|
}
|
|
376
376
|
.ty-btn-group .ty-btn:last-child {
|
|
377
|
-
border-top-right-radius:
|
|
378
|
-
border-bottom-right-radius:
|
|
377
|
+
border-top-right-radius: var(--ty-border-radius);
|
|
378
|
+
border-bottom-right-radius: var(--ty-border-radius);
|
|
379
379
|
}
|
|
380
380
|
.ty-btn-group_round .ty-btn:first-child {
|
|
381
381
|
border-top-left-radius: 30px;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
.#{$prefix}-calendar {
|
|
4
4
|
background: var(--ty-calendar-bg, #fff);
|
|
5
5
|
border: 1px solid var(--ty-calendar-border, #{$gray-200});
|
|
6
|
-
border-radius:
|
|
6
|
+
border-radius: var(--ty-border-radius);
|
|
7
7
|
|
|
8
8
|
&_fullscreen {
|
|
9
9
|
width: 100%;
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
border: none;
|
|
31
31
|
background: transparent;
|
|
32
32
|
cursor: pointer;
|
|
33
|
-
border-radius:
|
|
33
|
+
border-radius: var(--ty-border-radius);
|
|
34
34
|
font-size: 18px;
|
|
35
35
|
color: var(--ty-color-text, #{$gray-700});
|
|
36
36
|
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
&__title {
|
|
43
43
|
font-weight: 500;
|
|
44
|
-
font-size:
|
|
44
|
+
font-size: var(--ty-font-size-base);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&__title-btn {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
font-weight: inherit;
|
|
52
52
|
font-size: inherit;
|
|
53
53
|
padding: 4px 8px;
|
|
54
|
-
border-radius:
|
|
54
|
+
border-radius: var(--ty-border-radius);
|
|
55
55
|
color: var(--ty-color-text, #{$gray-800});
|
|
56
56
|
|
|
57
57
|
&:hover {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
padding: 8px 0;
|
|
74
74
|
text-align: center;
|
|
75
75
|
font-weight: 500;
|
|
76
|
-
font-size:
|
|
76
|
+
font-size: var(--ty-font-size-sm);
|
|
77
77
|
color: var(--ty-color-text-secondary, #{$gray-600});
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
&_selected .#{$prefix}-calendar__cell-inner {
|
|
112
112
|
background: var(--ty-color-primary, #{$primary-color});
|
|
113
113
|
color: #fff;
|
|
114
|
-
border-radius:
|
|
114
|
+
border-radius: var(--ty-border-radius);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
&_selected .#{$prefix}-calendar__cell-date {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
|
|
122
122
|
&__cell-inner {
|
|
123
123
|
padding: 4px;
|
|
124
|
-
border-radius:
|
|
124
|
+
border-radius: var(--ty-border-radius);
|
|
125
125
|
min-height: 24px;
|
|
126
126
|
display: flex;
|
|
127
127
|
flex-direction: column;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
line-height: 24px;
|
|
140
140
|
min-width: 24px;
|
|
141
141
|
text-align: center;
|
|
142
|
-
font-size:
|
|
142
|
+
font-size: var(--ty-font-size-sm);
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
&__cell-content {
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
text-align: center;
|
|
160
160
|
padding: 16px 8px;
|
|
161
161
|
cursor: pointer;
|
|
162
|
-
border-radius:
|
|
162
|
+
border-radius: var(--ty-border-radius);
|
|
163
163
|
transition: all 0.2s;
|
|
164
164
|
|
|
165
165
|
&:hover {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.ty-calendar {
|
|
2
2
|
background: var(--ty-calendar-bg, #fff);
|
|
3
3
|
border: 1px solid var(--ty-calendar-border, #e9ecef);
|
|
4
|
-
border-radius:
|
|
4
|
+
border-radius: var(--ty-border-radius);
|
|
5
5
|
}
|
|
6
6
|
.ty-calendar_fullscreen {
|
|
7
7
|
width: 100%;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
border: none;
|
|
26
26
|
background: transparent;
|
|
27
27
|
cursor: pointer;
|
|
28
|
-
border-radius:
|
|
28
|
+
border-radius: var(--ty-border-radius);
|
|
29
29
|
font-size: 18px;
|
|
30
30
|
color: var(--ty-color-text, #525f7f);
|
|
31
31
|
}
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
.ty-calendar__title {
|
|
36
36
|
font-weight: 500;
|
|
37
|
-
font-size:
|
|
37
|
+
font-size: var(--ty-font-size-base);
|
|
38
38
|
}
|
|
39
39
|
.ty-calendar__title-btn {
|
|
40
40
|
border: none;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
font-weight: inherit;
|
|
44
44
|
font-size: inherit;
|
|
45
45
|
padding: 4px 8px;
|
|
46
|
-
border-radius:
|
|
46
|
+
border-radius: var(--ty-border-radius);
|
|
47
47
|
color: var(--ty-color-text, #32325d);
|
|
48
48
|
}
|
|
49
49
|
.ty-calendar__title-btn:hover {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
padding: 8px 0;
|
|
62
62
|
text-align: center;
|
|
63
63
|
font-weight: 500;
|
|
64
|
-
font-size:
|
|
64
|
+
font-size: var(--ty-font-size-sm);
|
|
65
65
|
color: var(--ty-color-text-secondary, #8898aa);
|
|
66
66
|
}
|
|
67
67
|
.ty-calendar__cell {
|
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
.ty-calendar__cell_selected .ty-calendar__cell-inner {
|
|
93
93
|
background: var(--ty-color-primary, #6e41bf);
|
|
94
94
|
color: #fff;
|
|
95
|
-
border-radius:
|
|
95
|
+
border-radius: var(--ty-border-radius);
|
|
96
96
|
}
|
|
97
97
|
.ty-calendar__cell_selected .ty-calendar__cell-date {
|
|
98
98
|
color: inherit;
|
|
99
99
|
}
|
|
100
100
|
.ty-calendar__cell-inner {
|
|
101
101
|
padding: 4px;
|
|
102
|
-
border-radius:
|
|
102
|
+
border-radius: var(--ty-border-radius);
|
|
103
103
|
min-height: 24px;
|
|
104
104
|
display: flex;
|
|
105
105
|
flex-direction: column;
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
line-height: 24px;
|
|
116
116
|
min-width: 24px;
|
|
117
117
|
text-align: center;
|
|
118
|
-
font-size:
|
|
118
|
+
font-size: var(--ty-font-size-sm);
|
|
119
119
|
}
|
|
120
120
|
.ty-calendar__cell-content {
|
|
121
121
|
font-size: 12px;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
text-align: center;
|
|
132
132
|
padding: 16px 8px;
|
|
133
133
|
cursor: pointer;
|
|
134
|
-
border-radius:
|
|
134
|
+
border-radius: var(--ty-border-radius);
|
|
135
135
|
transition: all 0.2s;
|
|
136
136
|
}
|
|
137
137
|
.ty-calendar__month-cell:hover {
|
package/lib/card/style/index.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
padding: 0;
|
|
4
4
|
margin: 0;
|
|
5
|
-
border-radius:
|
|
5
|
+
border-radius: var(--ty-border-radius);
|
|
6
6
|
transition: all 0.3s;
|
|
7
7
|
background-color: var(--ty-card-bg);
|
|
8
8
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
margin-top: 15px;
|
|
11
11
|
}
|
|
12
12
|
.ty-card > img:first-child {
|
|
13
|
-
border-radius:
|
|
13
|
+
border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
|
|
14
14
|
}
|
|
15
15
|
.ty-card_bordered {
|
|
16
16
|
border: 1px solid var(--ty-card-border);
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
font-size: 16px;
|
|
37
37
|
background: transparent;
|
|
38
38
|
border-bottom: 1px solid var(--ty-card-border);
|
|
39
|
-
border-radius:
|
|
39
|
+
border-radius: var(--ty-border-radius) var(--ty-border-radius) 0 0;
|
|
40
40
|
}
|
|
41
41
|
.ty-card__body {
|
|
42
42
|
box-sizing: border-box;
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&_sm &__selector {
|
|
14
|
-
height:
|
|
15
|
-
font-size:
|
|
14
|
+
height: var(--ty-height-sm);
|
|
15
|
+
font-size: var(--ty-font-size-sm);
|
|
16
16
|
padding: 0 28px 0 8px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&_md &__selector {
|
|
20
|
-
height:
|
|
21
|
-
font-size:
|
|
20
|
+
height: var(--ty-height-md);
|
|
21
|
+
font-size: var(--ty-font-size-base);
|
|
22
22
|
padding: 0 32px 0 10px;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&_lg &__selector {
|
|
26
|
-
height:
|
|
27
|
-
font-size:
|
|
26
|
+
height: var(--ty-height-lg);
|
|
27
|
+
font-size: var(--ty-font-size-lg);
|
|
28
28
|
padding: 0 36px 0 12px;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
width: 100%;
|
|
35
35
|
border: 1px solid var(--ty-cascader-border, #{$gray-300});
|
|
36
|
-
border-radius:
|
|
36
|
+
border-radius: var(--ty-border-radius);
|
|
37
37
|
background: var(--ty-cascader-bg, #fff);
|
|
38
38
|
cursor: pointer;
|
|
39
39
|
transition: all 0.2s;
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
|
|
96
96
|
&__dropdown {
|
|
97
97
|
background: var(--ty-cascader-dropdown-bg, #fff);
|
|
98
|
-
border-radius:
|
|
98
|
+
border-radius: var(--ty-border-radius);
|
|
99
99
|
box-shadow: $select-dropdown-shadow;
|
|
100
|
-
font-size:
|
|
100
|
+
font-size: var(--ty-font-size-base);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
&__menus {
|
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
pointer-events: none;
|
|
9
9
|
}
|
|
10
10
|
.ty-cascader_sm .ty-cascader__selector {
|
|
11
|
-
height:
|
|
12
|
-
font-size:
|
|
11
|
+
height: var(--ty-height-sm);
|
|
12
|
+
font-size: var(--ty-font-size-sm);
|
|
13
13
|
padding: 0 28px 0 8px;
|
|
14
14
|
}
|
|
15
15
|
.ty-cascader_md .ty-cascader__selector {
|
|
16
|
-
height:
|
|
17
|
-
font-size:
|
|
16
|
+
height: var(--ty-height-md);
|
|
17
|
+
font-size: var(--ty-font-size-base);
|
|
18
18
|
padding: 0 32px 0 10px;
|
|
19
19
|
}
|
|
20
20
|
.ty-cascader_lg .ty-cascader__selector {
|
|
21
|
-
height:
|
|
22
|
-
font-size:
|
|
21
|
+
height: var(--ty-height-lg);
|
|
22
|
+
font-size: var(--ty-font-size-lg);
|
|
23
23
|
padding: 0 36px 0 12px;
|
|
24
24
|
}
|
|
25
25
|
.ty-cascader__selector {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
align-items: center;
|
|
28
28
|
width: 100%;
|
|
29
29
|
border: 1px solid var(--ty-cascader-border, #dee2e6);
|
|
30
|
-
border-radius:
|
|
30
|
+
border-radius: var(--ty-border-radius);
|
|
31
31
|
background: var(--ty-cascader-bg, #fff);
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
transition: all 0.2s;
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
}
|
|
80
80
|
.ty-cascader__dropdown {
|
|
81
81
|
background: var(--ty-cascader-dropdown-bg, #fff);
|
|
82
|
-
border-radius:
|
|
82
|
+
border-radius: var(--ty-border-radius);
|
|
83
83
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
84
|
-
font-size:
|
|
84
|
+
font-size: var(--ty-font-size-base);
|
|
85
85
|
}
|
|
86
86
|
.ty-cascader__menus {
|
|
87
87
|
display: flex;
|