@techsio/ui-kit 0.54.2 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/molecules/totals-summary.js +103 -0
- package/dist/organisms/line-item.js +199 -0
- package/dist/src/molecules/totals-summary.d.ts +31 -0
- package/dist/src/molecules/totals-summary.d.ts.map +1 -0
- package/dist/src/organisms/line-item.d.ts +51 -0
- package/dist/src/organisms/line-item.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/tokens/components/components.css +2 -0
- package/src/tokens/components/molecules/_totals-summary.css +25 -0
- package/src/tokens/components/organisms/_line-item.css +31 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { tv } from "../utils.js";
|
|
4
|
+
const totalsSummaryVariants = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "flex min-w-0 flex-col gap-totals-summary text-totals-summary-fg text-totals-summary-size",
|
|
7
|
+
list: "flex min-w-0 flex-col gap-totals-summary-rows",
|
|
8
|
+
row: "flex min-w-0 items-baseline justify-between gap-totals-summary-columns",
|
|
9
|
+
label: "min-w-0 flex-1 break-words",
|
|
10
|
+
value: "min-w-0 flex-1 break-words text-end",
|
|
11
|
+
note: "block text-totals-summary-note-fg text-totals-summary-note-size",
|
|
12
|
+
total: "flex min-w-0 items-baseline justify-between gap-totals-summary-columns border-t-(length:--border-width-totals-summary-divider) border-totals-summary-divider-border pt-totals-summary-total font-totals-summary-total text-totals-summary-total-size",
|
|
13
|
+
footer: "text-totals-summary-note-fg text-totals-summary-note-size",
|
|
14
|
+
actions: "flex flex-col gap-totals-summary-actions",
|
|
15
|
+
pending: "text-totals-summary-note-fg text-totals-summary-note-size"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
emphasis: {
|
|
19
|
+
default: {
|
|
20
|
+
row: ""
|
|
21
|
+
},
|
|
22
|
+
discount: {
|
|
23
|
+
row: "text-totals-summary-discount-fg"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
emphasis: "default"
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
function TotalsSummary({ rows, totalLabel, totalValue, footer, actions, pending, pendingLabel, className, "aria-describedby": describedBy, ...props }) {
|
|
32
|
+
const pendingId = useId();
|
|
33
|
+
const styles = totalsSummaryVariants();
|
|
34
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
35
|
+
...props,
|
|
36
|
+
"aria-busy": pending || void 0,
|
|
37
|
+
"aria-describedby": [
|
|
38
|
+
describedBy,
|
|
39
|
+
pending ? pendingId : void 0
|
|
40
|
+
].filter(Boolean).join(" ") || void 0,
|
|
41
|
+
className: styles.root({
|
|
42
|
+
className
|
|
43
|
+
}),
|
|
44
|
+
"data-scope": "totals-summary",
|
|
45
|
+
"data-state": pending ? "pending" : "ready",
|
|
46
|
+
children: [
|
|
47
|
+
/*#__PURE__*/ jsxs("dl", {
|
|
48
|
+
className: styles.list(),
|
|
49
|
+
children: [
|
|
50
|
+
rows.map(({ id, label, value, emphasis, note })=>/*#__PURE__*/ jsxs("div", {
|
|
51
|
+
className: totalsSummaryVariants({
|
|
52
|
+
emphasis
|
|
53
|
+
}).row(),
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ jsx("dt", {
|
|
56
|
+
className: styles.label(),
|
|
57
|
+
children: label
|
|
58
|
+
}),
|
|
59
|
+
/*#__PURE__*/ jsxs("dd", {
|
|
60
|
+
className: styles.value(),
|
|
61
|
+
children: [
|
|
62
|
+
value,
|
|
63
|
+
note ? /*#__PURE__*/ jsx("span", {
|
|
64
|
+
className: styles.note(),
|
|
65
|
+
children: note
|
|
66
|
+
}) : null
|
|
67
|
+
]
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}, id)),
|
|
71
|
+
/*#__PURE__*/ jsxs("div", {
|
|
72
|
+
className: styles.total(),
|
|
73
|
+
children: [
|
|
74
|
+
/*#__PURE__*/ jsx("dt", {
|
|
75
|
+
className: styles.label(),
|
|
76
|
+
children: totalLabel
|
|
77
|
+
}),
|
|
78
|
+
/*#__PURE__*/ jsx("dd", {
|
|
79
|
+
className: styles.value(),
|
|
80
|
+
children: totalValue
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
}),
|
|
86
|
+
pending ? /*#__PURE__*/ jsx("p", {
|
|
87
|
+
className: styles.pending(),
|
|
88
|
+
id: pendingId,
|
|
89
|
+
children: pendingLabel
|
|
90
|
+
}) : null,
|
|
91
|
+
footer ? /*#__PURE__*/ jsx("div", {
|
|
92
|
+
className: styles.footer(),
|
|
93
|
+
children: footer
|
|
94
|
+
}) : null,
|
|
95
|
+
actions ? /*#__PURE__*/ jsx("div", {
|
|
96
|
+
className: styles.actions(),
|
|
97
|
+
inert: pending || void 0,
|
|
98
|
+
children: actions
|
|
99
|
+
}) : null
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export { TotalsSummary };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useId } from "react";
|
|
4
|
+
import { Button } from "../atoms/button.js";
|
|
5
|
+
import { StatusText } from "../atoms/status-text.js";
|
|
6
|
+
import { tv } from "../utils.js";
|
|
7
|
+
const lineItemVariants = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
root: "grid min-w-0 gap-line-item text-line-item-content-fg has-[>[data-part=image]]:grid-cols-line-item",
|
|
10
|
+
image: "size-line-item-image overflow-hidden rounded-line-item-image [&>img]:size-full [&>img]:object-contain",
|
|
11
|
+
body: "flex min-w-0 flex-col gap-line-item-content",
|
|
12
|
+
heading: "flex min-w-0 flex-wrap items-start gap-line-item-heading",
|
|
13
|
+
title: "min-w-0 break-words font-line-item-title text-line-item-title-size [[data-part=heading]>&]:flex-1 [[data-part=heading]>&]:basis-line-item-title-min-width",
|
|
14
|
+
price: "min-w-0 max-w-full",
|
|
15
|
+
options: "break-words text-line-item-detail-size text-line-item-options-fg",
|
|
16
|
+
controls: "flex min-w-0 flex-wrap items-end gap-line-item-controls",
|
|
17
|
+
quantity: "min-w-0 max-w-full flex-1 basis-line-item-quantity-width",
|
|
18
|
+
quantityLabel: "break-words text-line-item-detail-size",
|
|
19
|
+
actions: "flex flex-wrap items-center gap-line-item-controls",
|
|
20
|
+
pending: "col-span-full text-line-item-content-fg"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
layout: {
|
|
24
|
+
default: {},
|
|
25
|
+
compact: {
|
|
26
|
+
image: "size-line-item-image-compact",
|
|
27
|
+
root: "gap-line-item-compact"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
layout: "default"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const LineItemContext = /*#__PURE__*/ createContext(null);
|
|
36
|
+
function useLineItemContext() {
|
|
37
|
+
const context = useContext(LineItemContext);
|
|
38
|
+
if (!context) throw new Error("LineItem parts must be rendered inside LineItem");
|
|
39
|
+
return context;
|
|
40
|
+
}
|
|
41
|
+
function LineItem({ title, children, readOnly = false, pending = false, pendingLabel, layout = "default", className, ref, "aria-describedby": ariaDescribedBy, ...props }) {
|
|
42
|
+
const pendingId = useId();
|
|
43
|
+
const describedBy = [
|
|
44
|
+
ariaDescribedBy,
|
|
45
|
+
pending ? pendingId : void 0
|
|
46
|
+
].filter(Boolean).join(" ") || void 0;
|
|
47
|
+
const styles = lineItemVariants({
|
|
48
|
+
layout
|
|
49
|
+
});
|
|
50
|
+
return /*#__PURE__*/ jsx(LineItemContext.Provider, {
|
|
51
|
+
value: {
|
|
52
|
+
title,
|
|
53
|
+
readOnly,
|
|
54
|
+
pending,
|
|
55
|
+
styles
|
|
56
|
+
},
|
|
57
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
58
|
+
...props,
|
|
59
|
+
"aria-busy": pending || void 0,
|
|
60
|
+
"aria-describedby": describedBy,
|
|
61
|
+
className: styles.root({
|
|
62
|
+
className
|
|
63
|
+
}),
|
|
64
|
+
"data-layout": layout,
|
|
65
|
+
"data-pending": pending || void 0,
|
|
66
|
+
"data-readonly": readOnly || void 0,
|
|
67
|
+
"data-scope": "line-item",
|
|
68
|
+
ref: ref,
|
|
69
|
+
children: [
|
|
70
|
+
children,
|
|
71
|
+
pending ? /*#__PURE__*/ jsx(StatusText, {
|
|
72
|
+
className: styles.pending(),
|
|
73
|
+
id: pendingId,
|
|
74
|
+
children: pendingLabel
|
|
75
|
+
}) : null
|
|
76
|
+
]
|
|
77
|
+
})
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
LineItem.Image = function({ className, ...props }) {
|
|
81
|
+
const { styles } = useLineItemContext();
|
|
82
|
+
return /*#__PURE__*/ jsx("div", {
|
|
83
|
+
...props,
|
|
84
|
+
className: styles.image({
|
|
85
|
+
className
|
|
86
|
+
}),
|
|
87
|
+
"data-part": "image"
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
LineItem.Body = function({ className, ...props }) {
|
|
91
|
+
const { styles } = useLineItemContext();
|
|
92
|
+
return /*#__PURE__*/ jsx("div", {
|
|
93
|
+
...props,
|
|
94
|
+
className: styles.body({
|
|
95
|
+
className
|
|
96
|
+
}),
|
|
97
|
+
"data-part": "body"
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
LineItem.Heading = function({ className, ...props }) {
|
|
101
|
+
const { styles } = useLineItemContext();
|
|
102
|
+
return /*#__PURE__*/ jsx("div", {
|
|
103
|
+
...props,
|
|
104
|
+
className: styles.heading({
|
|
105
|
+
className
|
|
106
|
+
}),
|
|
107
|
+
"data-part": "heading"
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
LineItem.Title = function({ className, children, ...props }) {
|
|
111
|
+
const { title, styles } = useLineItemContext();
|
|
112
|
+
return /*#__PURE__*/ jsx("div", {
|
|
113
|
+
...props,
|
|
114
|
+
className: styles.title({
|
|
115
|
+
className
|
|
116
|
+
}),
|
|
117
|
+
"data-part": "title",
|
|
118
|
+
children: children ?? title
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
LineItem.Price = function({ className, ...props }) {
|
|
122
|
+
const { styles } = useLineItemContext();
|
|
123
|
+
return /*#__PURE__*/ jsx("div", {
|
|
124
|
+
...props,
|
|
125
|
+
className: styles.price({
|
|
126
|
+
className
|
|
127
|
+
}),
|
|
128
|
+
"data-part": "price"
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
LineItem.Options = function({ className, ...props }) {
|
|
132
|
+
const { styles } = useLineItemContext();
|
|
133
|
+
return /*#__PURE__*/ jsx("div", {
|
|
134
|
+
...props,
|
|
135
|
+
className: styles.options({
|
|
136
|
+
className
|
|
137
|
+
}),
|
|
138
|
+
"data-part": "options"
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
LineItem.Controls = function({ className, ...props }) {
|
|
142
|
+
const { styles } = useLineItemContext();
|
|
143
|
+
return /*#__PURE__*/ jsx("div", {
|
|
144
|
+
...props,
|
|
145
|
+
className: styles.controls({
|
|
146
|
+
className
|
|
147
|
+
}),
|
|
148
|
+
"data-part": "controls"
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
LineItem.Quantity = function({ readOnlyLabel, children, className, ...props }) {
|
|
152
|
+
const { styles, readOnly, pending } = useLineItemContext();
|
|
153
|
+
return readOnly ? /*#__PURE__*/ jsx("div", {
|
|
154
|
+
...props,
|
|
155
|
+
className: styles.quantityLabel({
|
|
156
|
+
className
|
|
157
|
+
}),
|
|
158
|
+
"data-part": "quantity",
|
|
159
|
+
children: readOnlyLabel
|
|
160
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
161
|
+
...props,
|
|
162
|
+
className: styles.quantity({
|
|
163
|
+
className
|
|
164
|
+
}),
|
|
165
|
+
"data-part": "quantity",
|
|
166
|
+
inert: pending || void 0,
|
|
167
|
+
children: children
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
LineItem.Actions = function({ className, ...props }) {
|
|
171
|
+
const { styles, readOnly, pending } = useLineItemContext();
|
|
172
|
+
if (readOnly) return null;
|
|
173
|
+
return /*#__PURE__*/ jsx("div", {
|
|
174
|
+
...props,
|
|
175
|
+
className: styles.actions({
|
|
176
|
+
className
|
|
177
|
+
}),
|
|
178
|
+
"data-part": "actions",
|
|
179
|
+
inert: pending || void 0
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
LineItem.Remove = function({ label, onClick, disabled, size = "sm", theme = "borderless", ...props }) {
|
|
183
|
+
const { title, readOnly, pending } = useLineItemContext();
|
|
184
|
+
if (readOnly) return null;
|
|
185
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
186
|
+
...props,
|
|
187
|
+
"aria-label": `${label}: ${title}`,
|
|
188
|
+
"data-part": "remove",
|
|
189
|
+
disabled: pending || disabled,
|
|
190
|
+
onClick: (event)=>{
|
|
191
|
+
if (!(pending || disabled)) onClick?.(event);
|
|
192
|
+
},
|
|
193
|
+
size: size,
|
|
194
|
+
theme: theme,
|
|
195
|
+
type: "button",
|
|
196
|
+
children: label
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
export { LineItem };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TotalsSummary — @techsio/ui-kit molecule.
|
|
3
|
+
* @component TotalsSummary
|
|
4
|
+
* @componentVersion v1.0.0
|
|
5
|
+
* @skill totals-summary-usage
|
|
6
|
+
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
7
|
+
*/
|
|
8
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
9
|
+
export type TotalsSummaryRow = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
emphasis?: "default" | "discount";
|
|
14
|
+
note?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TotalsSummaryProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
17
|
+
rows: readonly TotalsSummaryRow[];
|
|
18
|
+
totalLabel: string;
|
|
19
|
+
totalValue: string;
|
|
20
|
+
footer?: ReactNode;
|
|
21
|
+
actions?: ReactNode;
|
|
22
|
+
ref?: Ref<HTMLDivElement>;
|
|
23
|
+
} & ({
|
|
24
|
+
pending: true;
|
|
25
|
+
pendingLabel: string;
|
|
26
|
+
} | {
|
|
27
|
+
pending?: false;
|
|
28
|
+
pendingLabel?: string;
|
|
29
|
+
});
|
|
30
|
+
export declare function TotalsSummary({ rows, totalLabel, totalValue, footer, actions, pending, pendingLabel, className, "aria-describedby": describedBy, ...props }: TotalsSummaryProps): import("react").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=totals-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"totals-summary.d.ts","sourceRoot":"","sources":["../../../src/molecules/totals-summary.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAS,MAAM,OAAO,CAAA;AA0B5E,MAAM,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;IACjC,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACpC,cAAc,CAAC,cAAc,CAAC,EAC9B,UAAU,CACV,GAAG;IACH,IAAI,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CACzB,GAAG,CACA;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAC5C,CAAA;AAEF,wBAAgB,aAAa,CAAC,EAC7B,IAAI,EACJ,UAAU,EACV,UAAU,EACV,MAAM,EACN,OAAO,EACP,OAAO,EACP,YAAY,EACZ,SAAS,EACT,kBAAkB,EAAE,WAAW,EAC/B,GAAG,KAAK,EACR,EAAE,kBAAkB,+BA4CpB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LineItem — @techsio/ui-kit organism.
|
|
3
|
+
* @component LineItem
|
|
4
|
+
* @componentVersion v1.0.2
|
|
5
|
+
* @skill line-item-usage
|
|
6
|
+
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
7
|
+
*/
|
|
8
|
+
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
9
|
+
import { type ButtonProps } from "../atoms/button.js";
|
|
10
|
+
export type LineItemPartProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
|
+
ref?: Ref<HTMLDivElement>;
|
|
12
|
+
};
|
|
13
|
+
export type LineItemQuantityProps = LineItemPartProps & {
|
|
14
|
+
readOnlyLabel: string;
|
|
15
|
+
};
|
|
16
|
+
export type LineItemRemoveProps = Omit<ButtonProps, "children" | "aria-label" | "aria-labelledby" | "type"> & {
|
|
17
|
+
label: string;
|
|
18
|
+
ref?: Ref<HTMLButtonElement>;
|
|
19
|
+
children?: never;
|
|
20
|
+
"aria-label"?: never;
|
|
21
|
+
"aria-labelledby"?: never;
|
|
22
|
+
};
|
|
23
|
+
export type LineItemProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> & {
|
|
24
|
+
title: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
layout?: "default" | "compact";
|
|
28
|
+
ref?: Ref<HTMLDivElement>;
|
|
29
|
+
} & ({
|
|
30
|
+
pending: true;
|
|
31
|
+
pendingLabel: string;
|
|
32
|
+
} | {
|
|
33
|
+
pending?: false;
|
|
34
|
+
pendingLabel?: string;
|
|
35
|
+
});
|
|
36
|
+
export declare function LineItem({ title, children, readOnly, pending, pendingLabel, layout, className, ref, "aria-describedby": ariaDescribedBy, ...props }: LineItemProps): import("react").JSX.Element;
|
|
37
|
+
export declare namespace LineItem {
|
|
38
|
+
var _a: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
39
|
+
export { _a as Image };
|
|
40
|
+
export var _b: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
41
|
+
export { _b as Body };
|
|
42
|
+
export var Heading: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
43
|
+
export var Title: ({ className, children, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
44
|
+
export var Price: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
45
|
+
export var Options: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
46
|
+
export var Controls: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element;
|
|
47
|
+
export var Quantity: ({ readOnlyLabel, children, className, ...props }: LineItemQuantityProps) => import("react").JSX.Element;
|
|
48
|
+
export var Actions: ({ className, ...props }: LineItemPartProps) => import("react").JSX.Element | null;
|
|
49
|
+
export var Remove: ({ label, onClick, disabled, size, theme, ...props }: LineItemRemoveProps) => import("react").JSX.Element | null;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=line-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-item.d.ts","sourceRoot":"","sources":["../../../src/organisms/line-item.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,GAAG,EAGT,MAAM,OAAO,CAAA;AACd,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAgD1D,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC/D,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AACD,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACtD,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,WAAW,EACX,UAAU,GAAG,YAAY,GAAG,iBAAiB,GAAG,MAAM,CACvD,GAAG;IACF,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,iBAAiB,CAAC,EAAE,KAAK,CAAA;CAC1B,CAAA;AACD,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,cAAc,CAAC,EAC9B,OAAO,GAAG,UAAU,CACrB,GAAG;IACF,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;IAC9B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,GAAG,CACE;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAC7C,CAAA;AAEH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,OAAe,EACf,YAAY,EACZ,MAAkB,EAClB,SAAS,EACT,GAAG,EACH,kBAAkB,EAAE,eAAe,EACnC,GAAG,KAAK,EACT,EAAE,aAAa,+BA6Bf;yBAxCe,QAAQ;sCA6CrB,iBAAiB;;6CASjB,iBAAiB;;kDASjB,iBAAiB;0DAcjB,iBAAiB;gDAWjB,iBAAiB;kDASjB,iBAAiB;mDAajB,iBAAiB;4EAejB,qBAAqB;kDAwBrB,iBAAiB;6EAqBjB,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
@import "./molecules/_popover.css";
|
|
36
36
|
@import "./molecules/_price-block.css";
|
|
37
37
|
@import "./molecules/_quantity-field.css";
|
|
38
|
+
@import "./molecules/_totals-summary.css";
|
|
38
39
|
@import "./molecules/_radio-card.css";
|
|
39
40
|
@import "./molecules/_radio-group.css";
|
|
40
41
|
@import "./molecules/_menu.css";
|
|
@@ -55,6 +56,7 @@
|
|
|
55
56
|
@import "./organisms/_footer.css";
|
|
56
57
|
@import "./organisms/_header.css";
|
|
57
58
|
@import "./organisms/_gallery.css";
|
|
59
|
+
@import "./organisms/_line-item.css";
|
|
58
60
|
@import "./organisms/_sidebar.css";
|
|
59
61
|
|
|
60
62
|
@import "./templates/_facet-filter-panel.css";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* Reference layer */
|
|
3
|
+
--color-totals-summary-content: var(--color-fg-primary);
|
|
4
|
+
--color-totals-summary-muted: var(--color-fg-primary);
|
|
5
|
+
--color-totals-summary-positive: var(--color-success-fg);
|
|
6
|
+
--color-totals-summary-divider: var(--color-border-secondary);
|
|
7
|
+
--spacing-totals-summary-related: var(--spacing-150);
|
|
8
|
+
--spacing-totals-summary-section: var(--spacing-250);
|
|
9
|
+
|
|
10
|
+
/* Derived layer */
|
|
11
|
+
--color-totals-summary-fg: var(--color-totals-summary-content);
|
|
12
|
+
--color-totals-summary-note-fg: var(--color-totals-summary-muted);
|
|
13
|
+
--color-totals-summary-discount-fg: var(--color-totals-summary-positive);
|
|
14
|
+
--color-totals-summary-divider-border: var(--color-totals-summary-divider);
|
|
15
|
+
--border-width-totals-summary-divider: var(--border-width-sm);
|
|
16
|
+
--gap-totals-summary: var(--spacing-totals-summary-section);
|
|
17
|
+
--gap-totals-summary-rows: var(--spacing-totals-summary-related);
|
|
18
|
+
--gap-totals-summary-columns: var(--spacing-totals-summary-related);
|
|
19
|
+
--gap-totals-summary-actions: var(--spacing-totals-summary-related);
|
|
20
|
+
--padding-totals-summary-total: var(--spacing-totals-summary-related);
|
|
21
|
+
--text-totals-summary-size: var(--text-sm);
|
|
22
|
+
--text-totals-summary-note-size: var(--text-xs);
|
|
23
|
+
--text-totals-summary-total-size: var(--text-lg);
|
|
24
|
+
--font-weight-totals-summary-total: var(--font-weight-semibold);
|
|
25
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
/* Reference layer */
|
|
3
|
+
--color-line-item-content: var(--color-fg-primary);
|
|
4
|
+
--color-line-item-muted: var(--color-fg-primary);
|
|
5
|
+
--spacing-line-item-related: var(--spacing-150);
|
|
6
|
+
--spacing-line-item-separated: var(--spacing-200);
|
|
7
|
+
--spacing-line-item-thumbnail: var(--spacing-850);
|
|
8
|
+
--spacing-line-item-thumbnail-compact: var(--spacing-700);
|
|
9
|
+
|
|
10
|
+
/* Derived layer */
|
|
11
|
+
--color-line-item-content-fg: var(--color-line-item-content);
|
|
12
|
+
--color-line-item-options-fg: var(--color-line-item-muted);
|
|
13
|
+
--gap-line-item: var(--spacing-line-item-separated);
|
|
14
|
+
--gap-line-item-compact: var(--spacing-line-item-related);
|
|
15
|
+
--gap-line-item-content: var(--spacing-line-item-related);
|
|
16
|
+
--gap-line-item-heading: var(--spacing-line-item-related);
|
|
17
|
+
--gap-line-item-controls: var(--spacing-line-item-related);
|
|
18
|
+
--spacing-line-item-image: var(--spacing-line-item-thumbnail);
|
|
19
|
+
--spacing-line-item-image-compact: var(--spacing-line-item-thumbnail-compact);
|
|
20
|
+
--spacing-line-item-title-min-width: var(--spacing-950);
|
|
21
|
+
--spacing-line-item-quantity-width: calc(var(--spacing-950) * 2);
|
|
22
|
+
--grid-template-columns-line-item: auto minmax(0, 1fr);
|
|
23
|
+
--radius-line-item-image: var(--radius-sm);
|
|
24
|
+
--text-line-item-title-size: var(--text-md);
|
|
25
|
+
--text-line-item-detail-size: var(--text-sm);
|
|
26
|
+
--font-weight-line-item-title: var(--font-weight-medium);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@utility grid-cols-line-item {
|
|
30
|
+
grid-template-columns: var(--grid-template-columns-line-item);
|
|
31
|
+
}
|