@doubao-dev/template 0.0.38-canary-22dd4cbf-20260720020201

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.

Potentially problematic release.


This version of @doubao-dev/template might be problematic. Click here for more details.

Files changed (57) hide show
  1. package/README.md +282 -0
  2. package/assets/ask-human-card.png +0 -0
  3. package/assets/checkout-card.png +0 -0
  4. package/assets/content-card.png +0 -0
  5. package/assets/price-action-card.png +0 -0
  6. package/assets/ticket-order-card.png +0 -0
  7. package/assets/transit-card.png +0 -0
  8. package/dist/ask-human-card/index.d.ts +44 -0
  9. package/dist/ask-human-card/index.js +79 -0
  10. package/dist/ask-human-card/styles.css +66 -0
  11. package/dist/checkout-card/index.d.ts +55 -0
  12. package/dist/checkout-card/index.js +40 -0
  13. package/dist/checkout-card/styles.css +34 -0
  14. package/dist/components/chevron-right-icon/index.d.ts +6 -0
  15. package/dist/components/chevron-right-icon/index.js +13 -0
  16. package/dist/components/extra-action/index.d.ts +50 -0
  17. package/dist/components/extra-action/index.js +31 -0
  18. package/dist/components/extra-action/styles.css +10 -0
  19. package/dist/components/footer/index.d.ts +27 -0
  20. package/dist/components/footer/index.js +15 -0
  21. package/dist/components/footer/styles.css +27 -0
  22. package/dist/components/header/index.d.ts +13 -0
  23. package/dist/components/header/index.js +27 -0
  24. package/dist/components/header/styles.css +62 -0
  25. package/dist/components/info-section/index.d.ts +47 -0
  26. package/dist/components/info-section/index.js +93 -0
  27. package/dist/components/info-section/styles.css +151 -0
  28. package/dist/components/product-summary/index.d.ts +26 -0
  29. package/dist/components/product-summary/index.js +55 -0
  30. package/dist/components/product-summary/styles.css +121 -0
  31. package/dist/components/route-section/index.d.ts +23 -0
  32. package/dist/components/route-section/index.js +39 -0
  33. package/dist/components/route-section/styles.css +54 -0
  34. package/dist/components/transport-summary/index.d.ts +31 -0
  35. package/dist/components/transport-summary/index.js +109 -0
  36. package/dist/components/transport-summary/styles.css +214 -0
  37. package/dist/content-card/index.d.ts +45 -0
  38. package/dist/content-card/index.js +72 -0
  39. package/dist/content-card/styles.css +160 -0
  40. package/dist/index.d.ts +11 -0
  41. package/dist/index.js +6 -0
  42. package/dist/price-action-card/index.d.ts +52 -0
  43. package/dist/price-action-card/index.js +64 -0
  44. package/dist/price-action-card/styles.css +161 -0
  45. package/dist/ticket-order-card/index.d.ts +70 -0
  46. package/dist/ticket-order-card/index.js +27 -0
  47. package/dist/ticket-order-card/styles.css +18 -0
  48. package/dist/transit-card/index.d.ts +52 -0
  49. package/dist/transit-card/index.js +29 -0
  50. package/dist/transit-card/styles.css +53 -0
  51. package/dist/types.d.ts +3 -0
  52. package/dist/types.js +0 -0
  53. package/dist/utils/app-info.d.ts +6 -0
  54. package/dist/utils/app-info.js +20 -0
  55. package/dist/utils/icons.d.ts +2 -0
  56. package/dist/utils/icons.js +28 -0
  57. package/package.json +40 -0
@@ -0,0 +1,121 @@
1
+ .doubao-template-product-summary {
2
+ box-sizing: border-box;
3
+ background-color: var(--bg-base-1);
4
+ flex-direction: row;
5
+ align-items: center;
6
+ width: 100%;
7
+ padding: 12px;
8
+ display: flex;
9
+ }
10
+
11
+ .doubao-template-product-summary__image {
12
+ background-color: var(--bg-base-1-overlay);
13
+ border-radius: 5px;
14
+ flex-shrink: 0;
15
+ width: 80px;
16
+ height: 80px;
17
+ overflow: hidden;
18
+ }
19
+
20
+ .doubao-template-product-summary__content {
21
+ flex-direction: column;
22
+ flex: 1 1 0;
23
+ min-width: 0;
24
+ display: flex;
25
+ }
26
+
27
+ .doubao-template-product-summary__content--with-image {
28
+ margin-left: 12px;
29
+ }
30
+
31
+ .doubao-template-product-summary__line-main, .doubao-template-product-summary__line-secondary {
32
+ flex-direction: row;
33
+ align-items: center;
34
+ width: 100%;
35
+ min-width: 0;
36
+ display: flex;
37
+ }
38
+
39
+ .doubao-template-product-summary__line-main {
40
+ height: 24px;
41
+ }
42
+
43
+ .doubao-template-product-summary__line-secondary {
44
+ height: 20px;
45
+ margin-top: 2px;
46
+ }
47
+
48
+ .doubao-template-product-summary__title-wrap {
49
+ flex-direction: row;
50
+ flex: 1 1 0;
51
+ align-items: center;
52
+ min-width: 0;
53
+ margin-right: 8px;
54
+ display: flex;
55
+ }
56
+
57
+ .doubao-template-product-summary__title, .doubao-template-product-summary__price-prefix, .doubao-template-product-summary__price-value, .doubao-template-product-summary__spec, .doubao-template-product-summary__quantity {
58
+ text-overflow: ellipsis;
59
+ white-space: nowrap;
60
+ font-family: PingFang SC, sans-serif;
61
+ font-style: normal;
62
+ overflow: hidden;
63
+ }
64
+
65
+ .doubao-template-product-summary__title {
66
+ min-width: 0;
67
+ color: var(--neutral-100);
68
+ font-size: 16px;
69
+ font-weight: 500;
70
+ line-height: 24px;
71
+ }
72
+
73
+ .doubao-template-product-summary__chevron {
74
+ flex-shrink: 0;
75
+ width: 12px;
76
+ height: 12px;
77
+ margin-left: 5px;
78
+ }
79
+
80
+ .doubao-template-product-summary__price {
81
+ color: var(--neutral-100);
82
+ white-space: nowrap;
83
+ flex-direction: row;
84
+ flex-shrink: 0;
85
+ align-items: flex-end;
86
+ font-family: PingFang SC, sans-serif;
87
+ font-style: normal;
88
+ font-weight: 500;
89
+ display: flex;
90
+ }
91
+
92
+ .doubao-template-product-summary__price-prefix {
93
+ width: 22px;
94
+ font-size: 11px;
95
+ line-height: 17px;
96
+ }
97
+
98
+ .doubao-template-product-summary__price-value {
99
+ margin-left: 2px;
100
+ font-size: 13px;
101
+ line-height: 19px;
102
+ }
103
+
104
+ .doubao-template-product-summary__spec {
105
+ min-width: 0;
106
+ color: var(--neutral-50);
107
+ flex: 1 1 0;
108
+ font-size: 12px;
109
+ font-weight: 400;
110
+ line-height: 18px;
111
+ }
112
+
113
+ .doubao-template-product-summary__quantity {
114
+ color: var(--neutral-50);
115
+ flex-shrink: 0;
116
+ margin-left: 8px;
117
+ font-size: 13px;
118
+ font-weight: 400;
119
+ line-height: 20px;
120
+ }
121
+
@@ -0,0 +1,23 @@
1
+ import type { TouchEvent } from '@lynx-js/types';
2
+ import type { ReactElement } from 'react';
3
+ import type { TemplateKey, TemplateText } from '../../types.js';
4
+ import './styles.scss';
5
+ export interface TemplateRouteSectionProps {
6
+ /** 航程信息列表。 */
7
+ items?: TemplateRouteSectionItem[];
8
+ }
9
+ export interface TemplateRouteSectionItem {
10
+ /** 航程项唯一标识;不传时使用数组下标。 */
11
+ key?: TemplateKey;
12
+ /** 航程标题,例如「出发地 - 到达地」。 */
13
+ title?: TemplateText;
14
+ /** 航程描述,例如「6月1日 周六 20:50-23:50 CZ0000 经济舱」。 */
15
+ description?: TemplateText;
16
+ /** 是否展示标题右侧箭头。 */
17
+ showChevron?: boolean;
18
+ /** 点击航程项时触发。 */
19
+ onClick?: (event: TouchEvent) => void;
20
+ }
21
+ export declare function hasTemplateRouteSectionItems(items?: TemplateRouteSectionItem[]): boolean;
22
+ export declare function TemplateRouteSection(props: TemplateRouteSectionProps): ReactElement | null;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { TemplateChevronRightIcon } from "../chevron-right-icon/index.js";
2
+ import "./styles.css";
3
+ function isTemplateRouteSectionTextEmpty(content) {
4
+ return null == content || '' === content;
5
+ }
6
+ function renderTemplateRouteSectionTextField(textContent, textClassName) {
7
+ if (isTemplateRouteSectionTextEmpty(textContent)) return null;
8
+ return <text className={textClassName} text-maxline="1">
9
+ {textContent}
10
+ </text>;
11
+ }
12
+ function hasTemplateRouteSectionItemContent(item) {
13
+ return !isTemplateRouteSectionTextEmpty(item.title) || !isTemplateRouteSectionTextEmpty(item.description);
14
+ }
15
+ function hasTemplateRouteSectionItems(items) {
16
+ return items?.some(hasTemplateRouteSectionItemContent) ?? false;
17
+ }
18
+ function renderTemplateRouteSectionItem(item, index) {
19
+ if (!hasTemplateRouteSectionItemContent(item)) return null;
20
+ const titleNode = renderTemplateRouteSectionTextField(item.title, 'doubao-template-route-section__title-text');
21
+ const descriptionNode = renderTemplateRouteSectionTextField(item.description, "doubao-template-route-section__description");
22
+ const showChevron = false !== item.showChevron && titleNode;
23
+ return <view className="doubao-template-route-section__item" key={item.key ?? index} {...null != item.onClick ? {
24
+ catchtap: item.onClick
25
+ } : {}}>
26
+ {titleNode && <view className="doubao-template-route-section__title">
27
+ {titleNode}
28
+ {showChevron && <TemplateChevronRightIcon className="doubao-template-route-section__chevron"/>}
29
+ </view>}
30
+ {descriptionNode}
31
+ </view>;
32
+ }
33
+ function TemplateRouteSection(props) {
34
+ const { items = [] } = props;
35
+ const routeNodes = items.map(renderTemplateRouteSectionItem).filter((node)=>null != node);
36
+ if (0 === routeNodes.length) return null;
37
+ return <view className="doubao-template-route-section">{routeNodes}</view>;
38
+ }
39
+ export { TemplateRouteSection, hasTemplateRouteSectionItems };
@@ -0,0 +1,54 @@
1
+ .doubao-template-route-section {
2
+ flex-direction: column;
3
+ width: 100%;
4
+ display: flex;
5
+ }
6
+
7
+ .doubao-template-route-section__item {
8
+ width: 100%;
9
+ padding: 12px;
10
+ }
11
+
12
+ .doubao-template-route-section__title {
13
+ flex-direction: row;
14
+ align-items: center;
15
+ width: 100%;
16
+ min-width: 0;
17
+ height: 24px;
18
+ display: flex;
19
+ overflow: hidden;
20
+ }
21
+
22
+ .doubao-template-route-section__title-text, .doubao-template-route-section__description {
23
+ text-overflow: ellipsis;
24
+ white-space: nowrap;
25
+ font-family: PingFang SC, sans-serif;
26
+ font-style: normal;
27
+ overflow: hidden;
28
+ }
29
+
30
+ .doubao-template-route-section__title-text {
31
+ min-width: 0;
32
+ color: var(--neutral-100);
33
+ font-size: 16px;
34
+ font-weight: 500;
35
+ line-height: 24px;
36
+ }
37
+
38
+ .doubao-template-route-section__chevron {
39
+ flex-shrink: 0;
40
+ width: 12px;
41
+ height: 12px;
42
+ margin-left: 5px;
43
+ }
44
+
45
+ .doubao-template-route-section__description {
46
+ width: 100%;
47
+ height: 20px;
48
+ color: var(--neutral-50);
49
+ margin-top: 2px;
50
+ font-size: 13px;
51
+ font-weight: 400;
52
+ line-height: 20px;
53
+ }
54
+
@@ -0,0 +1,31 @@
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import type { TemplateText } from '../../types.js';
3
+ import './styles.scss';
4
+ export interface TemplateTransportSummaryProps {
5
+ /** 行程标题块内容。 */
6
+ title?: ReactNode;
7
+ /** 出发点主信息文案。 */
8
+ departureMain?: TemplateText;
9
+ /** 出发点补充信息文案。 */
10
+ departureSub?: TemplateText;
11
+ /** 中转区域整体块内容;优先级高于 transferTop、showTransferDot 和 transferBottom。 */
12
+ transfer?: ReactNode;
13
+ /** 中转区域上方文案。 */
14
+ transferTop?: TemplateText;
15
+ /** 是否展示中转箭头中间圆点。 */
16
+ showTransferDot?: boolean;
17
+ /** 中转区域下方文案。 */
18
+ transferBottom?: TemplateText;
19
+ /** 到达点主信息文案。 */
20
+ arrivalMain?: TemplateText;
21
+ /** 到达点日期偏移文案,例如 '+1'。 */
22
+ arrivalDayOffset?: TemplateText;
23
+ /** 到达点补充信息文案。 */
24
+ arrivalSub?: TemplateText;
25
+ /** 价格块内容。 */
26
+ price?: ReactNode;
27
+ /** 根节点自定义类名。 */
28
+ className?: string;
29
+ }
30
+ export declare function TemplateTransportSummary(props: TemplateTransportSummaryProps): ReactElement | null;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,109 @@
1
+ import { useTheme } from "@byted-doubao-apps/components";
2
+ import { clsx } from "clsx";
3
+ import "./styles.css";
4
+ function getTransportSummaryArrowSvgContent(showDot, isDark) {
5
+ const arrowColor = isDark ? '#303030' : '#E5E5E5';
6
+ const dotColor = isDark ? '#666666' : '#CCCCCC';
7
+ const dotStrokeColor = isDark ? '#000000' : '#FFFFFF';
8
+ const dot = showDot ? `<circle cx="18" cy="2.5" r="2.5" fill="${dotColor}" stroke="${dotStrokeColor}"/>` : '';
9
+ return `<svg width="36" height="6" viewBox="0 0 36 6" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M35.3024 2.62395C35.4852 2.72251 35.4152 3 35.2075 3H0.200001C0.0895436 3 0 2.91046 0 2.8V2.1667C0 2.05624 0.0895431 1.9667 0.2 1.9667H30.4344V0.335011C30.4344 0.183637 30.5961 0.0871336 30.7293 0.158959L35.3024 2.62395Z" fill="${arrowColor}"/>
11
+ ${dot}
12
+ </svg>`;
13
+ }
14
+ function isTemplateTransportSummaryNodeEmpty(content) {
15
+ return null == content || 'boolean' == typeof content || '' === content;
16
+ }
17
+ function isTemplateTransportSummaryTextEmpty(content) {
18
+ return null == content || '' === content;
19
+ }
20
+ function renderTemplateTransportSummaryNodeField(content, wrapperClassName, textClassName) {
21
+ if (isTemplateTransportSummaryNodeEmpty(content)) return null;
22
+ return <view className={wrapperClassName}>
23
+ {'string' == typeof content || 'number' == typeof content ? <text className={textClassName} text-maxline="1">
24
+ {content}
25
+ </text> : content}
26
+ </view>;
27
+ }
28
+ function renderTemplateTransportSummaryTextField(content, wrapperClassName, textClassName) {
29
+ if (isTemplateTransportSummaryTextEmpty(content)) return null;
30
+ return <view className={wrapperClassName}>
31
+ <text className={textClassName} text-maxline="1">
32
+ {content}
33
+ </text>
34
+ </view>;
35
+ }
36
+ function TemplateTransportSummaryArrowIcon({ showDot }) {
37
+ const theme = useTheme();
38
+ return <svg className="doubao-template-transport-summary__transfer-arrow-icon" content={getTransportSummaryArrowSvgContent(Boolean(showDot), 'dark' === theme)}/>;
39
+ }
40
+ function renderTemplateTransportSummaryPoint({ mainText, subText, isArrival }) {
41
+ if (isTemplateTransportSummaryTextEmpty(mainText) && isTemplateTransportSummaryTextEmpty(subText)) return null;
42
+ return <view className={clsx('doubao-template-transport-summary__route-point', isArrival && 'doubao-template-transport-summary__route-point--arrival')}>
43
+ {renderTemplateTransportSummaryTextField(mainText, 'doubao-template-transport-summary__route-point-main', 'doubao-template-transport-summary__route-point-main-text')}
44
+ {renderTemplateTransportSummaryTextField(subText, 'doubao-template-transport-summary__route-point-sub', 'doubao-template-transport-summary__route-point-sub-text')}
45
+ </view>;
46
+ }
47
+ function renderTemplateTransportSummaryArrivalDayOffset(content) {
48
+ if (isTemplateTransportSummaryTextEmpty(content)) return null;
49
+ return <view className="doubao-template-transport-summary__arrival-day-offset">
50
+ <text className="doubao-template-transport-summary__arrival-day-offset-text" text-maxline="1">
51
+ {content}
52
+ </text>
53
+ </view>;
54
+ }
55
+ function renderTemplateTransportSummaryTransfer({ content, topText, showDot, bottomText }) {
56
+ if (void 0 !== content) {
57
+ if (isTemplateTransportSummaryNodeEmpty(content)) return null;
58
+ if ('string' == typeof content || 'number' == typeof content) return renderTemplateTransportSummaryNodeField(content, 'doubao-template-transport-summary__transfer', 'doubao-template-transport-summary__transfer-label-text');
59
+ return content;
60
+ }
61
+ if (isTemplateTransportSummaryTextEmpty(topText) && !showDot && isTemplateTransportSummaryTextEmpty(bottomText)) return null;
62
+ return <view className="doubao-template-transport-summary__transfer">
63
+ <view className="doubao-template-transport-summary__transfer-inner">
64
+ {renderTemplateTransportSummaryTextField(topText, 'doubao-template-transport-summary__transfer-label', 'doubao-template-transport-summary__transfer-label-text')}
65
+ <view className="doubao-template-transport-summary__transfer-arrow">
66
+ <TemplateTransportSummaryArrowIcon showDot={showDot}/>
67
+ </view>
68
+ {renderTemplateTransportSummaryTextField(bottomText, 'doubao-template-transport-summary__transfer-label', 'doubao-template-transport-summary__transfer-label-text')}
69
+ </view>
70
+ </view>;
71
+ }
72
+ function TemplateTransportSummary(props) {
73
+ const { title, departureMain, departureSub, transfer, transferTop, showTransferDot, transferBottom, arrivalMain, arrivalDayOffset, arrivalSub, price, className } = props;
74
+ const departureNode = renderTemplateTransportSummaryPoint({
75
+ mainText: departureMain,
76
+ subText: departureSub
77
+ });
78
+ const transferNode = renderTemplateTransportSummaryTransfer({
79
+ content: transfer,
80
+ topText: transferTop,
81
+ showDot: showTransferDot,
82
+ bottomText: transferBottom
83
+ });
84
+ const arrivalPointNode = renderTemplateTransportSummaryPoint({
85
+ mainText: arrivalMain,
86
+ subText: arrivalSub,
87
+ isArrival: true
88
+ });
89
+ const arrivalDayOffsetNode = null == arrivalPointNode ? null : renderTemplateTransportSummaryArrivalDayOffset(arrivalDayOffset);
90
+ const arrivalNode = null == arrivalPointNode ? null : <view className="doubao-template-transport-summary__arrival">{arrivalPointNode}</view>;
91
+ const titleNode = renderTemplateTransportSummaryNodeField(title, 'doubao-template-transport-summary__title', 'doubao-template-transport-summary__title-text');
92
+ const priceNode = renderTemplateTransportSummaryNodeField(price, 'doubao-template-transport-summary__price', 'doubao-template-transport-summary__price-text');
93
+ const hasRoute = Boolean(departureNode || transferNode || arrivalNode);
94
+ const hasRouteRow = Boolean(hasRoute || priceNode);
95
+ if (null == titleNode && !hasRouteRow) return null;
96
+ return <view className={clsx('doubao-template-transport-summary', className)}>
97
+ {titleNode}
98
+ {hasRouteRow && <view className="doubao-template-transport-summary__route-row">
99
+ {hasRoute && <view className="doubao-template-transport-summary__route">
100
+ {departureNode}
101
+ {transferNode}
102
+ {arrivalNode}
103
+ {arrivalDayOffsetNode}
104
+ </view>}
105
+ {priceNode}
106
+ </view>}
107
+ </view>;
108
+ }
109
+ export { TemplateTransportSummary };
@@ -0,0 +1,214 @@
1
+ .doubao-template-transport-summary {
2
+ box-sizing: border-box;
3
+ flex-direction: column;
4
+ justify-content: flex-start;
5
+ width: 100%;
6
+ min-width: 0;
7
+ padding: 12px 12px 16px;
8
+ display: flex;
9
+ }
10
+
11
+ .doubao-template-transport-summary__title, .doubao-template-transport-summary__route-point-main, .doubao-template-transport-summary__route-point-sub, .doubao-template-transport-summary__transfer-label, .doubao-template-transport-summary__price {
12
+ flex-direction: row;
13
+ flex-shrink: 0;
14
+ align-items: center;
15
+ min-width: 0;
16
+ display: flex;
17
+ overflow: hidden;
18
+ }
19
+
20
+ .doubao-template-transport-summary__title {
21
+ box-sizing: border-box;
22
+ max-width: 100%;
23
+ height: 20px;
24
+ }
25
+
26
+ .doubao-template-transport-summary__title-text, .doubao-template-transport-summary__route-point-main-text, .doubao-template-transport-summary__arrival-day-offset-text, .doubao-template-transport-summary__route-point-sub-text, .doubao-template-transport-summary__transfer-label-text, .doubao-template-transport-summary__price-text {
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ font-family: PingFang SC, sans-serif;
30
+ font-style: normal;
31
+ overflow: hidden;
32
+ }
33
+
34
+ .doubao-template-transport-summary__title-text {
35
+ color: var(--neutral-100);
36
+ font-size: 13px;
37
+ font-weight: 400;
38
+ line-height: 20px;
39
+ }
40
+
41
+ .doubao-template-transport-summary__route-row {
42
+ flex-direction: row;
43
+ justify-content: space-between;
44
+ align-items: center;
45
+ width: 100%;
46
+ min-width: 0;
47
+ height: 46px;
48
+ margin-top: 2px;
49
+ display: flex;
50
+ position: relative;
51
+ }
52
+
53
+ .doubao-template-transport-summary__route {
54
+ flex-direction: row;
55
+ flex-shrink: 0;
56
+ justify-content: space-between;
57
+ align-items: center;
58
+ width: 200px;
59
+ min-width: 0;
60
+ height: 46px;
61
+ display: flex;
62
+ }
63
+
64
+ .doubao-template-transport-summary__route-point {
65
+ flex-direction: column;
66
+ flex-shrink: 0;
67
+ justify-content: center;
68
+ width: 66px;
69
+ min-width: 0;
70
+ height: 42px;
71
+ display: flex;
72
+ }
73
+
74
+ .doubao-template-transport-summary__route-point--arrival {
75
+ align-items: flex-end;
76
+ }
77
+
78
+ .doubao-template-transport-summary__arrival {
79
+ flex-shrink: 0;
80
+ width: 66px;
81
+ min-width: 0;
82
+ height: 42px;
83
+ display: flex;
84
+ position: relative;
85
+ }
86
+
87
+ .doubao-template-transport-summary__arrival .doubao-template-transport-summary__route-point {
88
+ width: 100%;
89
+ height: 42px;
90
+ }
91
+
92
+ .doubao-template-transport-summary__route-point-main, .doubao-template-transport-summary__route-point-sub {
93
+ width: 100%;
94
+ }
95
+
96
+ .doubao-template-transport-summary__route-point--arrival .doubao-template-transport-summary__route-point-main, .doubao-template-transport-summary__route-point--arrival .doubao-template-transport-summary__route-point-sub {
97
+ justify-content: flex-end;
98
+ }
99
+
100
+ .doubao-template-transport-summary__route-point--arrival .doubao-template-transport-summary__route-point-main-text, .doubao-template-transport-summary__route-point--arrival .doubao-template-transport-summary__route-point-sub-text {
101
+ text-align: right;
102
+ }
103
+
104
+ .doubao-template-transport-summary__route-point-main {
105
+ height: 22px;
106
+ }
107
+
108
+ .doubao-template-transport-summary__route-point-sub {
109
+ height: 16px;
110
+ margin-top: 2px;
111
+ }
112
+
113
+ .doubao-template-transport-summary__route-point-main-text {
114
+ min-width: 0;
115
+ color: var(--neutral-100);
116
+ font-family: SF Pro, sans-serif;
117
+ font-size: 17px;
118
+ font-weight: 600;
119
+ line-height: 22px;
120
+ }
121
+
122
+ .doubao-template-transport-summary__arrival-day-offset {
123
+ flex-direction: column;
124
+ justify-content: flex-start;
125
+ align-items: flex-start;
126
+ height: 14px;
127
+ display: flex;
128
+ position: absolute;
129
+ top: 2px;
130
+ left: 202px;
131
+ }
132
+
133
+ .doubao-template-transport-summary__arrival-day-offset-text {
134
+ color: var(--neutral-100);
135
+ font-size: 11px;
136
+ font-weight: 400;
137
+ line-height: 14px;
138
+ }
139
+
140
+ .doubao-template-transport-summary__route-point-sub-text {
141
+ color: var(--neutral-70);
142
+ font-size: 12px;
143
+ font-weight: 400;
144
+ line-height: 16px;
145
+ }
146
+
147
+ .doubao-template-transport-summary__transfer-label-text {
148
+ color: var(--neutral-50);
149
+ font-size: 12px;
150
+ font-weight: 400;
151
+ line-height: 14px;
152
+ }
153
+
154
+ .doubao-template-transport-summary__transfer {
155
+ box-sizing: border-box;
156
+ flex-direction: row;
157
+ flex: none;
158
+ justify-content: center;
159
+ align-items: center;
160
+ width: 56px;
161
+ min-width: 0;
162
+ height: 42px;
163
+ display: flex;
164
+ }
165
+
166
+ .doubao-template-transport-summary__transfer-inner {
167
+ flex-direction: column;
168
+ justify-content: center;
169
+ align-items: center;
170
+ width: 56px;
171
+ min-width: 0;
172
+ height: 38px;
173
+ display: flex;
174
+ }
175
+
176
+ .doubao-template-transport-summary__transfer-label {
177
+ height: 14px;
178
+ }
179
+
180
+ .doubao-template-transport-summary__transfer-arrow {
181
+ flex-direction: row;
182
+ flex-shrink: 0;
183
+ justify-content: center;
184
+ align-items: center;
185
+ width: 36px;
186
+ height: 6px;
187
+ display: flex;
188
+ }
189
+
190
+ .doubao-template-transport-summary__transfer-arrow-icon {
191
+ flex-shrink: 0;
192
+ width: 36px;
193
+ height: 6px;
194
+ }
195
+
196
+ .doubao-template-transport-summary__price {
197
+ box-sizing: border-box;
198
+ flex-direction: column;
199
+ justify-content: center;
200
+ align-items: flex-end;
201
+ width: 88px;
202
+ height: 42px;
203
+ padding: 0 4px;
204
+ }
205
+
206
+ .doubao-template-transport-summary__price-text {
207
+ color: var(--pink-500);
208
+ text-align: right;
209
+ font-family: SF Pro, sans-serif;
210
+ font-size: 17px;
211
+ font-weight: 600;
212
+ line-height: 22px;
213
+ }
214
+
@@ -0,0 +1,45 @@
1
+ import type { CSSProperties, TouchEvent } from '@lynx-js/types';
2
+ import type { ReactElement, ReactNode } from 'react';
3
+ import { type TemplateExtraAction } from '../components/extra-action/index.js';
4
+ import { type TemplateCardFooterProps } from '../components/footer/index.js';
5
+ import { type TemplateCardHeaderProps } from '../components/header/index.js';
6
+ import type { TemplateKey } from '../types.js';
7
+ import './styles.scss';
8
+ export interface ContentCardProps {
9
+ /** 标题栏配置。 */
10
+ header?: TemplateCardHeaderProps;
11
+ /** 列表内容数据。 */
12
+ items?: ContentCardItem[];
13
+ /** 底部操作区配置。 */
14
+ footer?: TemplateCardFooterProps;
15
+ /** 自定义列表内容区域;传入后不再渲染默认列表内容,标题栏和底部操作区仍由模板渲染。 */
16
+ children?: ReactNode;
17
+ /** 卡片根节点自定义类名。 */
18
+ className?: string;
19
+ /** 卡片根节点自定义样式。 */
20
+ style?: CSSProperties;
21
+ /** 点击卡片根节点时触发。 */
22
+ onClick?: (event: TouchEvent) => void;
23
+ }
24
+ export interface ContentCardItem {
25
+ /** 列表项唯一标识;不传时使用数组下标。 */
26
+ key?: TemplateKey;
27
+ /** 列表项标题。字符串会按默认单行标题样式渲染,传入节点时直接渲染自定义内容。 */
28
+ title?: ReactNode;
29
+ /** 列表项副标题。字符串会按默认单行副标题样式渲染,传入节点时直接渲染自定义内容。 */
30
+ subtitle?: ReactNode;
31
+ /** 列表项左侧缩略视觉内容。 */
32
+ thumbnail?: ReactNode;
33
+ /** 列表项自定义内容;传入后不再渲染默认图文结构。 */
34
+ children?: ReactNode;
35
+ /** 列表项右侧操作区;传标准控件配置时使用模板样式,传节点时直接渲染自定义内容。 */
36
+ action?: TemplateExtraAction | ReactNode;
37
+ /** 列表项根节点自定义类名。 */
38
+ className?: string;
39
+ /** 列表项根节点自定义样式。 */
40
+ style?: CSSProperties;
41
+ /** 点击列表项时触发。 */
42
+ onClick?: (event: TouchEvent) => void;
43
+ }
44
+ export declare function ContentCard(props: ContentCardProps): ReactElement;
45
+ //# sourceMappingURL=index.d.ts.map