@snacky/ui 0.9.1 → 0.10.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/CHANGELOG.md +60 -0
- package/dist/index.cjs +144 -138
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +67 -57
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +144 -138
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAtt
|
|
|
25
25
|
type IconButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
26
26
|
interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
27
27
|
variant?: IconButtonVariant;
|
|
28
|
-
/**
|
|
28
|
+
/** 32px circle with a 16px icon (default) or 24px circle with a full-size 24px icon (small), primary only. */
|
|
29
29
|
size?: 'default' | 'small';
|
|
30
30
|
icon: ReactNode;
|
|
31
31
|
/** Toggled/favorited state on the Secondary variant - tints the icon with icon-active, fill unchanged. */
|
|
@@ -40,7 +40,8 @@ interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
40
40
|
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
41
41
|
|
|
42
42
|
interface UploadButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
43
|
-
icon
|
|
43
|
+
/** Defaults to the camera glyph Figma draws in this button (its `picture` icon). */
|
|
44
|
+
icon?: ReactNode;
|
|
44
45
|
ariaLabel?: string;
|
|
45
46
|
}
|
|
46
47
|
/** Snacky Upload Button - circular dashed-border image drop zone. */
|
|
@@ -339,9 +340,11 @@ interface BottomSheetProps {
|
|
|
339
340
|
open: boolean;
|
|
340
341
|
onDismiss: () => void;
|
|
341
342
|
children: ReactNode;
|
|
342
|
-
/** Show the drag-handle bar.
|
|
343
|
-
*
|
|
344
|
-
*
|
|
343
|
+
/** Show the drag-handle bar. Defaults to false because 8 of Figma's 9
|
|
344
|
+
* Modal variants have no handle. The `driver` variant does: it draws a
|
|
345
|
+
* visible 40x4 `Driver Slider` (node 8693:6233). An earlier pass read
|
|
346
|
+
* that as "no variant shows one", which was wrong, so a Driver Tracking
|
|
347
|
+
* composition should pass showHandle. */
|
|
345
348
|
showHandle?: boolean;
|
|
346
349
|
className?: string;
|
|
347
350
|
}
|
|
@@ -357,7 +360,7 @@ declare function BottomSheet({ open, onDismiss, children, showHandle, className
|
|
|
357
360
|
|
|
358
361
|
interface SectionProps {
|
|
359
362
|
title: string;
|
|
360
|
-
/**
|
|
363
|
+
/** "See more" action, shown when provided: Figma's small Icon-Button (24px circle, full-size angle chevron). */
|
|
361
364
|
onAction?: () => void;
|
|
362
365
|
children: ReactNode;
|
|
363
366
|
className?: string;
|
|
@@ -639,6 +642,7 @@ declare namespace outline {
|
|
|
639
642
|
}
|
|
640
643
|
|
|
641
644
|
declare const account: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
645
|
+
declare const angleSmallRight: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
642
646
|
declare const balance: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
643
647
|
declare const bell: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
644
648
|
declare const cart: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
@@ -651,6 +655,7 @@ declare const star: ({ width, height, color, ...rest }: IconProps) => react.JSX.
|
|
|
651
655
|
declare const truck: ({ width, height, color, ...rest }: IconProps) => react.JSX.Element;
|
|
652
656
|
|
|
653
657
|
declare const solid_account: typeof account;
|
|
658
|
+
declare const solid_angleSmallRight: typeof angleSmallRight;
|
|
654
659
|
declare const solid_balance: typeof balance;
|
|
655
660
|
declare const solid_bell: typeof bell;
|
|
656
661
|
declare const solid_cart: typeof cart;
|
|
@@ -662,7 +667,7 @@ declare const solid_points: typeof points;
|
|
|
662
667
|
declare const solid_star: typeof star;
|
|
663
668
|
declare const solid_truck: typeof truck;
|
|
664
669
|
declare namespace solid {
|
|
665
|
-
export { solid_account as account, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
670
|
+
export { solid_account as account, solid_angleSmallRight as angleSmallRight, solid_balance as balance, solid_bell as bell, solid_cart as cart, solid_category as category, solid_heart as heart, solid_history as history, solid_home as home, solid_points as points, solid_star as star, solid_truck as truck };
|
|
666
671
|
}
|
|
667
672
|
|
|
668
673
|
/** Matches the `<SnackyIcons.outline.home />` / `<SnackyIcons.solid.home />` namespace used throughout the design system's documented code samples. */
|
package/dist/index.js
CHANGED
|
@@ -92,141 +92,6 @@ var IconButton = forwardRef2(function IconButton2({ variant = "primary", size =
|
|
|
92
92
|
|
|
93
93
|
// src/components/IconButton/UploadButton.tsx
|
|
94
94
|
import { forwardRef as forwardRef3 } from "react";
|
|
95
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
96
|
-
var UploadButton = forwardRef3(function UploadButton2({ icon: icon3, ariaLabel = "Upload image", className, ...rest }, ref) {
|
|
97
|
-
return /* @__PURE__ */ jsx3("button", { ref, type: "button", "aria-label": ariaLabel, className: cx("snacky-upload", className), ...rest, children: icon3 });
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
// src/components/Input/TextField.tsx
|
|
101
|
-
import { forwardRef as forwardRef4, useId } from "react";
|
|
102
|
-
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
103
|
-
var TextField = forwardRef4(function TextField2({
|
|
104
|
-
value,
|
|
105
|
-
onChange,
|
|
106
|
-
label,
|
|
107
|
-
leadingIcon,
|
|
108
|
-
trailingIcon,
|
|
109
|
-
trailingIconRotated = false,
|
|
110
|
-
error,
|
|
111
|
-
disabled,
|
|
112
|
-
className,
|
|
113
|
-
id,
|
|
114
|
-
...rest
|
|
115
|
-
}, ref) {
|
|
116
|
-
const autoId = useId();
|
|
117
|
-
const fieldId = id ?? autoId;
|
|
118
|
-
const errorMessage = typeof error === "string" ? error : void 0;
|
|
119
|
-
return /* @__PURE__ */ jsxs2("div", { className, children: [
|
|
120
|
-
label && /* @__PURE__ */ jsx4("label", { className: "snacky-field-label", htmlFor: fieldId, children: label }),
|
|
121
|
-
/* @__PURE__ */ jsxs2(
|
|
122
|
-
"div",
|
|
123
|
-
{
|
|
124
|
-
className: cx("snacky-field", !!error && "snacky-field--error", disabled && "snacky-field--disabled"),
|
|
125
|
-
children: [
|
|
126
|
-
leadingIcon && /* @__PURE__ */ jsx4("span", { className: "snacky-field__icon", children: leadingIcon }),
|
|
127
|
-
/* @__PURE__ */ jsx4(
|
|
128
|
-
"input",
|
|
129
|
-
{
|
|
130
|
-
ref,
|
|
131
|
-
id: fieldId,
|
|
132
|
-
className: "snacky-field__input",
|
|
133
|
-
value,
|
|
134
|
-
onChange: (e) => onChange(e.target.value),
|
|
135
|
-
disabled,
|
|
136
|
-
...rest
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
trailingIcon && /* @__PURE__ */ jsx4(
|
|
140
|
-
"span",
|
|
141
|
-
{
|
|
142
|
-
className: "snacky-field__icon",
|
|
143
|
-
style: trailingIconRotated ? { transform: "rotate(180deg)" } : void 0,
|
|
144
|
-
children: trailingIcon
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
),
|
|
150
|
-
errorMessage && /* @__PURE__ */ jsx4("span", { className: "snacky-field-error", children: errorMessage })
|
|
151
|
-
] });
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
// src/components/Input/SearchField.tsx
|
|
155
|
-
import { forwardRef as forwardRef5 } from "react";
|
|
156
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
157
|
-
var SearchField = forwardRef5(function SearchField2({ value, onChange, searchIcon, onClear, className, placeholder = "Search products...", ...rest }, ref) {
|
|
158
|
-
return /* @__PURE__ */ jsxs3("div", { className: cx("snacky-search", className), children: [
|
|
159
|
-
searchIcon && /* @__PURE__ */ jsx5("span", { className: "snacky-search__icon", children: searchIcon }),
|
|
160
|
-
/* @__PURE__ */ jsx5(
|
|
161
|
-
"input",
|
|
162
|
-
{
|
|
163
|
-
ref,
|
|
164
|
-
className: "snacky-search__input",
|
|
165
|
-
value,
|
|
166
|
-
placeholder,
|
|
167
|
-
onChange: (e) => onChange(e.target.value),
|
|
168
|
-
...rest
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
value && onClear && /* @__PURE__ */ jsx5("button", { type: "button", className: "snacky-search__clear", onClick: onClear, "aria-label": "Clear search", children: "\u2715" })
|
|
172
|
-
] });
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// src/components/Input/OtpField.tsx
|
|
176
|
-
import { useRef } from "react";
|
|
177
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
178
|
-
function OtpField({ value, onChange, length = 6, disabled }) {
|
|
179
|
-
const cellRefs = useRef([]);
|
|
180
|
-
const digits = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
181
|
-
function setDigit(index, digit) {
|
|
182
|
-
const next = digits.slice();
|
|
183
|
-
next[index] = digit;
|
|
184
|
-
onChange(next.join(""));
|
|
185
|
-
if (digit && index < length - 1) cellRefs.current[index + 1]?.focus();
|
|
186
|
-
}
|
|
187
|
-
function handleKeyDown(index, e) {
|
|
188
|
-
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
189
|
-
cellRefs.current[index - 1]?.focus();
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return /* @__PURE__ */ jsx6("div", { className: "snacky-otp", children: digits.map((digit, i) => /* @__PURE__ */ jsx6(
|
|
193
|
-
"input",
|
|
194
|
-
{
|
|
195
|
-
ref: (el) => {
|
|
196
|
-
cellRefs.current[i] = el;
|
|
197
|
-
},
|
|
198
|
-
className: "snacky-otp__cell",
|
|
199
|
-
inputMode: "numeric",
|
|
200
|
-
maxLength: 1,
|
|
201
|
-
value: digit,
|
|
202
|
-
disabled,
|
|
203
|
-
onChange: (e) => setDigit(i, e.target.value.replace(/\D/g, "").slice(-1)),
|
|
204
|
-
onKeyDown: (e) => handleKeyDown(i, e),
|
|
205
|
-
"aria-label": `Digit ${i + 1}`
|
|
206
|
-
},
|
|
207
|
-
i
|
|
208
|
-
)) });
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
// src/components/Input/CopyField.tsx
|
|
212
|
-
import { useState } from "react";
|
|
213
|
-
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
214
|
-
function CopyField({ value, onCopy, className }) {
|
|
215
|
-
const [copied, setCopied] = useState(false);
|
|
216
|
-
async function handleCopy() {
|
|
217
|
-
try {
|
|
218
|
-
await navigator.clipboard.writeText(value);
|
|
219
|
-
} catch {
|
|
220
|
-
}
|
|
221
|
-
onCopy?.(value);
|
|
222
|
-
setCopied(true);
|
|
223
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
224
|
-
}
|
|
225
|
-
return /* @__PURE__ */ jsxs4("div", { className: cx("snacky-copy", className), children: [
|
|
226
|
-
/* @__PURE__ */ jsx7("span", { className: "snacky-copy__value", children: value }),
|
|
227
|
-
/* @__PURE__ */ jsx7("button", { type: "button", className: cx("snacky-copy__action", copied && "snacky-copy__action--copied"), onClick: handleCopy, children: copied ? "Copied" : "Copy" })
|
|
228
|
-
] });
|
|
229
|
-
}
|
|
230
95
|
|
|
231
96
|
// src/icons/outline.tsx
|
|
232
97
|
var outline_exports = {};
|
|
@@ -274,10 +139,10 @@ __export(outline_exports, {
|
|
|
274
139
|
truck: () => truck,
|
|
275
140
|
unsent: () => unsent
|
|
276
141
|
});
|
|
277
|
-
import { jsx as
|
|
142
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
278
143
|
function icon(viewBox, paths) {
|
|
279
144
|
return function SnackyIcon({ width = viewBox, height = viewBox, color = "currentColor", ...rest }) {
|
|
280
|
-
return /* @__PURE__ */
|
|
145
|
+
return /* @__PURE__ */ jsx3("svg", { width, height, viewBox: `0 0 ${viewBox} ${viewBox}`, fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: paths.map(([d, fillRule], i) => /* @__PURE__ */ jsx3(
|
|
281
146
|
"path",
|
|
282
147
|
{
|
|
283
148
|
d,
|
|
@@ -451,6 +316,143 @@ var unsent = icon(24, [
|
|
|
451
316
|
["M11.9999 7C11.7788 7 11.5669 7.0878 11.4106 7.24408C11.2543 7.40036 11.1665 7.61232 11.1665 7.83333V11.4375L8.35735 13.1975C8.16949 13.3148 8.03594 13.502 7.98609 13.7179C7.93624 13.9337 7.97416 14.1605 8.09152 14.3483C8.20888 14.5362 8.39606 14.6697 8.61188 14.7196C8.8277 14.7694 9.05449 14.7315 9.24235 14.6142L12.4424 12.6142C12.5633 12.5384 12.6627 12.4329 12.7311 12.3077C12.7996 12.1825 12.8347 12.0418 12.8332 11.8992V7.83333C12.8332 7.61232 12.7454 7.40036 12.5891 7.24408C12.4328 7.0878 12.2209 7 11.9999 7Z", "nonzero"]
|
|
452
317
|
]);
|
|
453
318
|
|
|
319
|
+
// src/components/IconButton/UploadButton.tsx
|
|
320
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
321
|
+
var UploadButton = forwardRef3(function UploadButton2({ icon: icon3 = /* @__PURE__ */ jsx4(camera, {}), ariaLabel = "Upload image", className, ...rest }, ref) {
|
|
322
|
+
return /* @__PURE__ */ jsx4("button", { ref, type: "button", "aria-label": ariaLabel, className: cx("snacky-upload", className), ...rest, children: icon3 });
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// src/components/Input/TextField.tsx
|
|
326
|
+
import { forwardRef as forwardRef4, useId } from "react";
|
|
327
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
328
|
+
var TextField = forwardRef4(function TextField2({
|
|
329
|
+
value,
|
|
330
|
+
onChange,
|
|
331
|
+
label,
|
|
332
|
+
leadingIcon,
|
|
333
|
+
trailingIcon,
|
|
334
|
+
trailingIconRotated = false,
|
|
335
|
+
error,
|
|
336
|
+
disabled,
|
|
337
|
+
className,
|
|
338
|
+
id,
|
|
339
|
+
...rest
|
|
340
|
+
}, ref) {
|
|
341
|
+
const autoId = useId();
|
|
342
|
+
const fieldId = id ?? autoId;
|
|
343
|
+
const errorMessage = typeof error === "string" ? error : void 0;
|
|
344
|
+
return /* @__PURE__ */ jsxs2("div", { className, children: [
|
|
345
|
+
label && /* @__PURE__ */ jsx5("label", { className: "snacky-field-label", htmlFor: fieldId, children: label }),
|
|
346
|
+
/* @__PURE__ */ jsxs2(
|
|
347
|
+
"div",
|
|
348
|
+
{
|
|
349
|
+
className: cx("snacky-field", !!error && "snacky-field--error", disabled && "snacky-field--disabled"),
|
|
350
|
+
children: [
|
|
351
|
+
leadingIcon && /* @__PURE__ */ jsx5("span", { className: "snacky-field__icon", children: leadingIcon }),
|
|
352
|
+
/* @__PURE__ */ jsx5(
|
|
353
|
+
"input",
|
|
354
|
+
{
|
|
355
|
+
ref,
|
|
356
|
+
id: fieldId,
|
|
357
|
+
className: "snacky-field__input",
|
|
358
|
+
value,
|
|
359
|
+
onChange: (e) => onChange(e.target.value),
|
|
360
|
+
disabled,
|
|
361
|
+
...rest
|
|
362
|
+
}
|
|
363
|
+
),
|
|
364
|
+
trailingIcon && /* @__PURE__ */ jsx5(
|
|
365
|
+
"span",
|
|
366
|
+
{
|
|
367
|
+
className: "snacky-field__icon",
|
|
368
|
+
style: trailingIconRotated ? { transform: "rotate(180deg)" } : void 0,
|
|
369
|
+
children: trailingIcon
|
|
370
|
+
}
|
|
371
|
+
)
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
errorMessage && /* @__PURE__ */ jsx5("span", { className: "snacky-field-error", children: errorMessage })
|
|
376
|
+
] });
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
// src/components/Input/SearchField.tsx
|
|
380
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
381
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
382
|
+
var SearchField = forwardRef5(function SearchField2({ value, onChange, searchIcon, onClear, className, placeholder = "Search products...", ...rest }, ref) {
|
|
383
|
+
return /* @__PURE__ */ jsxs3("div", { className: cx("snacky-search", className), children: [
|
|
384
|
+
searchIcon && /* @__PURE__ */ jsx6("span", { className: "snacky-search__icon", children: searchIcon }),
|
|
385
|
+
/* @__PURE__ */ jsx6(
|
|
386
|
+
"input",
|
|
387
|
+
{
|
|
388
|
+
ref,
|
|
389
|
+
className: "snacky-search__input",
|
|
390
|
+
value,
|
|
391
|
+
placeholder,
|
|
392
|
+
onChange: (e) => onChange(e.target.value),
|
|
393
|
+
...rest
|
|
394
|
+
}
|
|
395
|
+
),
|
|
396
|
+
value && onClear && /* @__PURE__ */ jsx6("button", { type: "button", className: "snacky-search__clear", onClick: onClear, "aria-label": "Clear search", children: "\u2715" })
|
|
397
|
+
] });
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
// src/components/Input/OtpField.tsx
|
|
401
|
+
import { useRef } from "react";
|
|
402
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
403
|
+
function OtpField({ value, onChange, length = 6, disabled }) {
|
|
404
|
+
const cellRefs = useRef([]);
|
|
405
|
+
const digits = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
406
|
+
function setDigit(index, digit) {
|
|
407
|
+
const next = digits.slice();
|
|
408
|
+
next[index] = digit;
|
|
409
|
+
onChange(next.join(""));
|
|
410
|
+
if (digit && index < length - 1) cellRefs.current[index + 1]?.focus();
|
|
411
|
+
}
|
|
412
|
+
function handleKeyDown(index, e) {
|
|
413
|
+
if (e.key === "Backspace" && !digits[index] && index > 0) {
|
|
414
|
+
cellRefs.current[index - 1]?.focus();
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return /* @__PURE__ */ jsx7("div", { className: "snacky-otp", children: digits.map((digit, i) => /* @__PURE__ */ jsx7(
|
|
418
|
+
"input",
|
|
419
|
+
{
|
|
420
|
+
ref: (el) => {
|
|
421
|
+
cellRefs.current[i] = el;
|
|
422
|
+
},
|
|
423
|
+
className: "snacky-otp__cell",
|
|
424
|
+
inputMode: "numeric",
|
|
425
|
+
maxLength: 1,
|
|
426
|
+
value: digit,
|
|
427
|
+
disabled,
|
|
428
|
+
onChange: (e) => setDigit(i, e.target.value.replace(/\D/g, "").slice(-1)),
|
|
429
|
+
onKeyDown: (e) => handleKeyDown(i, e),
|
|
430
|
+
"aria-label": `Digit ${i + 1}`
|
|
431
|
+
},
|
|
432
|
+
i
|
|
433
|
+
)) });
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// src/components/Input/CopyField.tsx
|
|
437
|
+
import { useState } from "react";
|
|
438
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
439
|
+
function CopyField({ value, onCopy, className }) {
|
|
440
|
+
const [copied, setCopied] = useState(false);
|
|
441
|
+
async function handleCopy() {
|
|
442
|
+
try {
|
|
443
|
+
await navigator.clipboard.writeText(value);
|
|
444
|
+
} catch {
|
|
445
|
+
}
|
|
446
|
+
onCopy?.(value);
|
|
447
|
+
setCopied(true);
|
|
448
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
449
|
+
}
|
|
450
|
+
return /* @__PURE__ */ jsxs4("div", { className: cx("snacky-copy", className), children: [
|
|
451
|
+
/* @__PURE__ */ jsx8("span", { className: "snacky-copy__value", children: value }),
|
|
452
|
+
/* @__PURE__ */ jsx8("button", { type: "button", className: cx("snacky-copy__action", copied && "snacky-copy__action--copied"), onClick: handleCopy, children: copied ? "Copied" : "Copy" })
|
|
453
|
+
] });
|
|
454
|
+
}
|
|
455
|
+
|
|
454
456
|
// src/components/Input/ChatInput.tsx
|
|
455
457
|
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
456
458
|
function ChatInput({ value, onChange, onSend, sendIcon, className, placeholder = "Write your message here", ...rest }) {
|
|
@@ -641,6 +643,7 @@ function TabRow({ tabs, selected, onSelect, className }) {
|
|
|
641
643
|
var solid_exports = {};
|
|
642
644
|
__export(solid_exports, {
|
|
643
645
|
account: () => account2,
|
|
646
|
+
angleSmallRight: () => angleSmallRight,
|
|
644
647
|
balance: () => balance2,
|
|
645
648
|
bell: () => bell2,
|
|
646
649
|
cart: () => cart2,
|
|
@@ -671,6 +674,9 @@ var account2 = icon2(20, [
|
|
|
671
674
|
["M10 10C12.7614 10 15 7.76142 15 5C15 2.23858 12.7614 0 10 0C7.23858 0 5 2.23858 5 5C5 7.76142 7.23858 10 10 10Z", "nonzero"],
|
|
672
675
|
["M10 11.6659C5.85977 11.6705 2.50461 15.0257 2.5 19.1659C2.5 19.6261 2.87309 19.9992 3.33332 19.9992H16.6666C17.1269 19.9992 17.5 19.6261 17.5 19.1659C17.4954 15.0257 14.1402 11.6705 10 11.6659Z", "nonzero"]
|
|
673
676
|
]);
|
|
677
|
+
var angleSmallRight = icon2(24, [
|
|
678
|
+
["M15.75 9.525L11.164 4.939C10.8827 4.65774 10.5011 4.49978 10.1032 4.49988C9.70534 4.49997 9.32381 4.65811 9.04255 4.9395C8.76129 5.2209 8.60333 5.6025 8.60342 6.00036C8.60352 6.39822 8.76166 6.77974 9.04305 7.061L13.629 11.646C13.6756 11.6925 13.7125 11.7476 13.7378 11.8084C13.763 11.8691 13.7759 11.9342 13.7759 12C13.7759 12.0658 13.763 12.1309 13.7378 12.1916C13.7125 12.2524 13.6756 12.3076 13.629 12.354L9.04305 16.939C8.76166 17.2203 8.60352 17.6018 8.60342 17.9997C8.60333 18.3975 8.76129 18.7791 9.04255 19.0605C9.32381 19.3419 9.70534 19.5 10.1032 19.5001C10.5011 19.5002 10.8827 19.3423 11.164 19.061L15.75 14.475C16.4053 13.818 16.7732 12.9279 16.7732 12C16.7732 11.0721 16.4053 10.182 15.75 9.525Z", "nonzero"]
|
|
679
|
+
]);
|
|
674
680
|
var balance2 = icon2(24, [
|
|
675
681
|
["M19 4.00031H5C3.67441 4.00189 2.40356 4.52919 1.46622 5.46653C0.528882 6.40386 0.00158786 7.67471 0 9.00031L0 15.0003C0.00158786 16.3259 0.528882 17.5967 1.46622 18.5341C2.40356 19.4714 3.67441 19.9987 5 20.0003H19C20.3256 19.9987 21.5964 19.4714 22.5338 18.5341C23.4711 17.5967 23.9984 16.3259 24 15.0003V9.00031C23.9984 7.67471 23.4711 6.40386 22.5338 5.46653C21.5964 4.52919 20.3256 4.00189 19 4.00031ZM4 17.0003C3.80222 17.0003 3.60888 16.9417 3.44443 16.8318C3.27998 16.7219 3.15181 16.5657 3.07612 16.383C3.00043 16.2003 2.98063 15.9992 3.01921 15.8052C3.0578 15.6112 3.15304 15.4331 3.29289 15.2932C3.43275 15.1533 3.61093 15.0581 3.80491 15.0195C3.99889 14.9809 4.19996 15.0007 4.38268 15.0764C4.56541 15.1521 4.72159 15.2803 4.83147 15.4447C4.94135 15.6092 5 15.8025 5 16.0003C5 16.2655 4.89464 16.5199 4.70711 16.7074C4.51957 16.8949 4.26522 17.0003 4 17.0003ZM4 9.00031C3.80222 9.00031 3.60888 8.94166 3.44443 8.83177C3.27998 8.72189 3.15181 8.56571 3.07612 8.38299C3.00043 8.20026 2.98063 7.9992 3.01921 7.80521C3.0578 7.61123 3.15304 7.43305 3.29289 7.2932C3.43275 7.15335 3.61093 7.0581 3.80491 7.01952C3.99889 6.98093 4.19996 7.00074 4.38268 7.07643C4.56541 7.15211 4.72159 7.28029 4.83147 7.44474C4.94135 7.60918 5 7.80252 5 8.00031C5 8.26552 4.89464 8.51988 4.70711 8.70741C4.51957 8.89495 4.26522 9.00031 4 9.00031ZM12 16.0003C11.2089 16.0003 10.4355 15.7657 9.77772 15.3262C9.11992 14.8867 8.60723 14.2619 8.30448 13.531C8.00173 12.8001 7.92252 11.9959 8.07686 11.2199C8.2312 10.444 8.61216 9.73129 9.17157 9.17188C9.73098 8.61247 10.4437 8.2315 11.2196 8.07716C11.9956 7.92282 12.7998 8.00204 13.5307 8.30479C14.2616 8.60754 14.8864 9.12023 15.3259 9.77802C15.7654 10.4358 16 11.2092 16 12.0003C16 13.0612 15.5786 14.0786 14.8284 14.8287C14.0783 15.5789 13.0609 16.0003 12 16.0003ZM20 17.0003C19.8022 17.0003 19.6089 16.9417 19.4444 16.8318C19.28 16.7219 19.1518 16.5657 19.0761 16.383C19.0004 16.2003 18.9806 15.9992 19.0192 15.8052C19.0578 15.6112 19.153 15.4331 19.2929 15.2932C19.4327 15.1533 19.6109 15.0581 19.8049 15.0195C19.9989 14.9809 20.2 15.0007 20.3827 15.0764C20.5654 15.1521 20.7216 15.2803 20.8315 15.4447C20.9414 15.6092 21 15.8025 21 16.0003C21 16.2655 20.8946 16.5199 20.7071 16.7074C20.5196 16.8949 20.2652 17.0003 20 17.0003ZM20 9.00031C19.8022 9.00031 19.6089 8.94166 19.4444 8.83177C19.28 8.72189 19.1518 8.56571 19.0761 8.38299C19.0004 8.20026 18.9806 7.9992 19.0192 7.80521C19.0578 7.61123 19.153 7.43305 19.2929 7.2932C19.4327 7.15335 19.6109 7.0581 19.8049 7.01952C19.9989 6.98093 20.2 7.00074 20.3827 7.07643C20.5654 7.15211 20.7216 7.28029 20.8315 7.44474C20.9414 7.60918 21 7.80252 21 8.00031C21 8.26552 20.8946 8.51988 20.7071 8.70741C20.5196 8.89495 20.2652 9.00031 20 9.00031ZM14 12.0003C14 12.3959 13.8827 12.7825 13.6629 13.1114C13.4432 13.4403 13.1308 13.6967 12.7654 13.8481C12.3999 13.9994 11.9978 14.039 11.6098 13.9619C11.2219 13.8847 10.8655 13.6942 10.5858 13.4145C10.3061 13.1348 10.1156 12.7784 10.0384 12.3905C9.96126 12.0025 10.0009 11.6004 10.1522 11.2349C10.3036 10.8695 10.56 10.5571 10.8889 10.3374C11.2178 10.1176 11.6044 10.0003 12 10.0003C12.5304 10.0003 13.0391 10.211 13.4142 10.5861C13.7893 10.9612 14 11.4699 14 12.0003Z", "nonzero"]
|
|
676
682
|
]);
|
|
@@ -968,7 +974,7 @@ function Section({ title, onAction, children, className }) {
|
|
|
968
974
|
return /* @__PURE__ */ jsxs19("section", { className: cx("snacky-section", className), children: [
|
|
969
975
|
/* @__PURE__ */ jsxs19("div", { className: "snacky-section__header", children: [
|
|
970
976
|
/* @__PURE__ */ jsx26("h3", { className: "snacky-section__title", children: title }),
|
|
971
|
-
onAction && /* @__PURE__ */ jsx26(
|
|
977
|
+
onAction && /* @__PURE__ */ jsx26(IconButton, { size: "small", icon: /* @__PURE__ */ jsx26(angleSmallRight, {}), onClick: onAction, ariaLabel: `See more: ${title}` })
|
|
972
978
|
] }),
|
|
973
979
|
children
|
|
974
980
|
] });
|