@timmbr/ui 1.1.0 → 1.3.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/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Alert/Alert.types.d.ts +2 -4
- package/dist/components/Alert/Alert.types.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +16 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.js +94 -0
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts +8 -0
- package/dist/components/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
- package/dist/components/AlertDialog/AlertDialog.styles.js +25 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +16 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/components/AlertDialog/index.d.ts +4 -0
- package/dist/components/AlertDialog/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.styles.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +8 -6
- package/dist/components/Dialog/Dialog.styles.d.ts +1 -0
- package/dist/components/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.styles.js +7 -4
- package/dist/components/Dialog/Dialog.types.d.ts +4 -6
- package/dist/components/Dialog/Dialog.types.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.types.d.ts +3 -6
- package/dist/components/Drawer/Drawer.types.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.types.d.ts +1 -2
- package/dist/components/Dropdown/Dropdown.types.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +3 -3
- package/dist/components/ImageUpload/ImageUpload.d.ts +4 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.d.ts +30 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.helpers.js +95 -0
- package/dist/components/ImageUpload/ImageUpload.js +365 -0
- package/dist/components/ImageUpload/ImageUpload.styles.d.ts +17 -0
- package/dist/components/ImageUpload/ImageUpload.styles.d.ts.map +1 -0
- package/dist/components/ImageUpload/ImageUpload.styles.js +72 -0
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +112 -0
- package/dist/components/ImageUpload/ImageUpload.types.d.ts.map +1 -0
- package/dist/components/ImageUpload/index.d.ts +6 -0
- package/dist/components/ImageUpload/index.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.d.ts +25 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadDropzone.js +106 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.d.ts +6 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadIcons.js +61 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.d.ts +12 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadModal.js +137 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.d.ts +14 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadSinglePreview.js +142 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.d.ts +23 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.d.ts.map +1 -0
- package/dist/components/ImageUpload/subcomponents/ImageUploadThumbnailCard.js +139 -0
- package/dist/components/ImageUpload/subcomponents/index.d.ts +6 -0
- package/dist/components/ImageUpload/subcomponents/index.d.ts.map +1 -0
- package/dist/components/Input/Input.js +3 -3
- package/dist/components/List/List.types.d.ts +2 -4
- package/dist/components/List/List.types.d.ts.map +1 -1
- package/dist/components/NavHeader/NavHeader.context.d.ts +20 -0
- package/dist/components/NavHeader/NavHeader.context.d.ts.map +1 -0
- package/dist/components/NavHeader/NavHeader.context.js +13 -0
- package/dist/components/NavHeader/NavHeader.d.ts +8 -0
- package/dist/components/NavHeader/NavHeader.d.ts.map +1 -0
- package/dist/components/NavHeader/NavHeader.helpers.d.ts +13 -0
- package/dist/components/NavHeader/NavHeader.helpers.d.ts.map +1 -0
- package/dist/components/NavHeader/NavHeader.helpers.js +14 -0
- package/dist/components/NavHeader/NavHeader.js +532 -0
- package/dist/components/NavHeader/NavHeader.styles.d.ts +67 -0
- package/dist/components/NavHeader/NavHeader.styles.d.ts.map +1 -0
- package/dist/components/NavHeader/NavHeader.styles.js +123 -0
- package/dist/components/NavHeader/NavHeader.types.d.ts +321 -0
- package/dist/components/NavHeader/NavHeader.types.d.ts.map +1 -0
- package/dist/components/NavHeader/index.d.ts +11 -0
- package/dist/components/NavHeader/index.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.d.ts +13 -0
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavActionOverflow.js +169 -0
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts +22 -0
- package/dist/components/NavHeader/subcomponents/NavActions.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavActions.js +228 -0
- package/dist/components/NavHeader/subcomponents/NavBrand.d.ts +12 -0
- package/dist/components/NavHeader/subcomponents/NavBrand.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavBrand.js +96 -0
- package/dist/components/NavHeader/subcomponents/NavItems.d.ts +15 -0
- package/dist/components/NavHeader/subcomponents/NavItems.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavItems.js +141 -0
- package/dist/components/NavHeader/subcomponents/NavItemsOverflow.d.ts +13 -0
- package/dist/components/NavHeader/subcomponents/NavItemsOverflow.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavItemsOverflow.js +165 -0
- package/dist/components/NavHeader/subcomponents/NavMegaMenu.d.ts +12 -0
- package/dist/components/NavHeader/subcomponents/NavMegaMenu.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavMegaMenu.js +73 -0
- package/dist/components/NavHeader/subcomponents/NavMobileSearchDrawer.d.ts +16 -0
- package/dist/components/NavHeader/subcomponents/NavMobileSearchDrawer.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavMobileSearchDrawer.js +149 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabContent.d.ts +11 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabContent.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabContent.js +40 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabSlider.d.ts +13 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabSlider.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavMobileTabSlider.js +111 -0
- package/dist/components/NavHeader/subcomponents/NavSearch.d.ts +15 -0
- package/dist/components/NavHeader/subcomponents/NavSearch.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/NavSearch.js +222 -0
- package/dist/components/NavHeader/subcomponents/OfferBanner.d.ts +11 -0
- package/dist/components/NavHeader/subcomponents/OfferBanner.d.ts.map +1 -0
- package/dist/components/NavHeader/subcomponents/OfferBanner.js +92 -0
- package/dist/components/Popover/Popover.types.d.ts +1 -2
- package/dist/components/Popover/Popover.types.d.ts.map +1 -1
- package/dist/components/Radio/Radio.js +3 -3
- package/dist/components/Select/Select.js +3 -3
- package/dist/components/Stat/Stat.types.d.ts +3 -6
- package/dist/components/Stat/Stat.types.d.ts.map +1 -1
- package/dist/components/Table/Table.types.d.ts +7 -14
- package/dist/components/Table/Table.types.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.js +3 -3
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Toast/Toast.types.d.ts +1 -2
- package/dist/components/Toast/Toast.types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -2
- package/package.json +5 -4
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { AnimatePresence, motion } from '@timmbr/motion';
|
|
5
|
+
import { Search, X, TrendingUp } from '@timmbr/icons';
|
|
6
|
+
import { cn } from '@timmbr/utils';
|
|
7
|
+
import { navActionVariants, searchPopoverCardVariants } from '../NavHeader.styles.js';
|
|
8
|
+
import { resolveNavDestination, isCrossZoneNavigation } from '../NavHeader.helpers.js';
|
|
9
|
+
import { useTimmbrConfig } from '../../../providers/TimmbrConfigProvider.js';
|
|
10
|
+
|
|
11
|
+
const defaultPopularSearches = [
|
|
12
|
+
{ id: "1", label: "Centre Tables" },
|
|
13
|
+
{ id: "2", label: "TV Units" },
|
|
14
|
+
{ id: "3", label: "bed" },
|
|
15
|
+
{ id: "4", label: "bedsheet" },
|
|
16
|
+
{ id: "5", label: "mirror" },
|
|
17
|
+
{ id: "6", label: "office chair" },
|
|
18
|
+
{ id: "7", label: "shoe rack" },
|
|
19
|
+
{ id: "8", label: "sofa cum bed" }
|
|
20
|
+
];
|
|
21
|
+
const NavSearch = ({
|
|
22
|
+
config,
|
|
23
|
+
isOpen,
|
|
24
|
+
onOpenChange,
|
|
25
|
+
value,
|
|
26
|
+
onChange,
|
|
27
|
+
onSubmit,
|
|
28
|
+
shouldAnimate = true,
|
|
29
|
+
motionClass,
|
|
30
|
+
linkComponent: CustomLink
|
|
31
|
+
}) => {
|
|
32
|
+
const globalConfig = useTimmbrConfig();
|
|
33
|
+
const searchConfig = typeof config === "object" ? config : {};
|
|
34
|
+
const {
|
|
35
|
+
placeholder = "Search for furniture, decor, and more...",
|
|
36
|
+
popoverContent,
|
|
37
|
+
popularSearches = defaultPopularSearches,
|
|
38
|
+
popularSearchesTitle = "Popular Searches",
|
|
39
|
+
onPopularSearchClick,
|
|
40
|
+
ariaLabel = "Search store products"
|
|
41
|
+
} = searchConfig;
|
|
42
|
+
const [showPopover, setShowPopover] = React.useState(false);
|
|
43
|
+
const containerRef = React.useRef(null);
|
|
44
|
+
const inputRef = React.useRef(null);
|
|
45
|
+
React.useEffect(() => {
|
|
46
|
+
if (isOpen) {
|
|
47
|
+
inputRef.current?.focus();
|
|
48
|
+
setShowPopover(true);
|
|
49
|
+
} else {
|
|
50
|
+
setShowPopover(false);
|
|
51
|
+
}
|
|
52
|
+
}, [isOpen]);
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
if (!isOpen) return;
|
|
55
|
+
const handleClickOutside = (e) => {
|
|
56
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
57
|
+
setShowPopover(false);
|
|
58
|
+
if (!value.trim()) {
|
|
59
|
+
onOpenChange(false);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
64
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
65
|
+
}, [isOpen, value, onOpenChange]);
|
|
66
|
+
const handleToggle = () => {
|
|
67
|
+
const nextState = !isOpen;
|
|
68
|
+
onOpenChange(nextState);
|
|
69
|
+
if (nextState) {
|
|
70
|
+
setShowPopover(true);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const handleKeyDown = (e) => {
|
|
74
|
+
if (e.key === "Enter") {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
onSubmit(value);
|
|
77
|
+
setShowPopover(false);
|
|
78
|
+
} else if (e.key === "Escape") {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
setShowPopover(false);
|
|
81
|
+
onOpenChange(false);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const handleTagClick = (tag) => {
|
|
85
|
+
onChange(tag.label);
|
|
86
|
+
onPopularSearchClick?.(tag);
|
|
87
|
+
tag.onClick?.(tag);
|
|
88
|
+
onSubmit(tag.label);
|
|
89
|
+
setShowPopover(false);
|
|
90
|
+
};
|
|
91
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: "relative flex items-center", "data-slot": "nav-search-container", children: [
|
|
92
|
+
!isOpen && /* @__PURE__ */ jsxs(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
type: "button",
|
|
96
|
+
onClick: handleToggle,
|
|
97
|
+
"aria-label": "Open search bar",
|
|
98
|
+
"aria-expanded": isOpen,
|
|
99
|
+
className: navActionVariants({ active: isOpen }),
|
|
100
|
+
"data-slot": "nav-search-trigger",
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx(Search, { size: 22, className: "shrink-0 stroke-[1.8]" }),
|
|
103
|
+
/* @__PURE__ */ jsx("span", { className: "font-sans font-bold text-[10px] tracking-[0.0926em] uppercase", children: "SEARCH" })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: isOpen && /* @__PURE__ */ jsxs(
|
|
108
|
+
motion.div,
|
|
109
|
+
{
|
|
110
|
+
initial: shouldAnimate ? { width: 0, opacity: 0 } : false,
|
|
111
|
+
animate: shouldAnimate ? { width: 350, opacity: 1 } : void 0,
|
|
112
|
+
exit: shouldAnimate ? { width: 0, opacity: 0 } : void 0,
|
|
113
|
+
transition: { duration: 0.28, ease: [0.25, 1, 0.5, 1] },
|
|
114
|
+
className: cn("relative flex flex-col", !shouldAnimate && "transition-none", motionClass),
|
|
115
|
+
children: [
|
|
116
|
+
/* @__PURE__ */ jsxs("div", { className: "relative flex items-center w-full h-10 bg-white border border-grey-300 rounded-full shadow-sm focus-within:ring-2 focus-within:ring-[#C0643A]/30 focus-within:border-[#C0643A] overflow-hidden", children: [
|
|
117
|
+
/* @__PURE__ */ jsx(
|
|
118
|
+
Search,
|
|
119
|
+
{
|
|
120
|
+
size: 18,
|
|
121
|
+
className: "absolute left-3.5 top-1/2 -translate-y-1/2 text-grey-500 pointer-events-none shrink-0"
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
"input",
|
|
126
|
+
{
|
|
127
|
+
ref: inputRef,
|
|
128
|
+
type: "text",
|
|
129
|
+
role: "searchbox",
|
|
130
|
+
autoComplete: "off",
|
|
131
|
+
value,
|
|
132
|
+
placeholder,
|
|
133
|
+
"aria-label": ariaLabel,
|
|
134
|
+
onChange: (e) => onChange(e.target.value),
|
|
135
|
+
onFocus: () => setShowPopover(true),
|
|
136
|
+
onKeyDown: handleKeyDown,
|
|
137
|
+
className: "w-full h-full pl-10 pr-9 bg-transparent text-sm text-[#1A1A1A] placeholder:text-grey-400 border-none focus:outline-none [&::-webkit-search-cancel-button]:hidden [&::-webkit-search-decoration]:hidden",
|
|
138
|
+
"data-slot": "nav-search-input"
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
onClick: () => {
|
|
146
|
+
if (value) {
|
|
147
|
+
onChange("");
|
|
148
|
+
} else {
|
|
149
|
+
onOpenChange(false);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"aria-label": "Close search",
|
|
153
|
+
className: "absolute right-2.5 top-1/2 -translate-y-1/2 p-1 text-grey-400 hover:text-grey-700 rounded-full hover:bg-grey-100 transition-colors shrink-0",
|
|
154
|
+
children: /* @__PURE__ */ jsx(X, { size: 15 })
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] }),
|
|
158
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: showPopover && /* @__PURE__ */ jsx(
|
|
159
|
+
motion.div,
|
|
160
|
+
{
|
|
161
|
+
initial: shouldAnimate ? { opacity: 0, y: 4 } : false,
|
|
162
|
+
animate: shouldAnimate ? { opacity: 1, y: 0 } : void 0,
|
|
163
|
+
exit: shouldAnimate ? { opacity: 0, y: 4 } : void 0,
|
|
164
|
+
transition: { duration: 0.18, ease: [0.25, 1, 0.5, 1] },
|
|
165
|
+
className: cn(searchPopoverCardVariants(), !shouldAnimate && "transition-none", motionClass),
|
|
166
|
+
"data-slot": "nav-search-popover",
|
|
167
|
+
children: popoverContent ? popoverContent : /* @__PURE__ */ jsxs("div", { children: [
|
|
168
|
+
popularSearchesTitle && /* @__PURE__ */ jsx("h4", { className: "font-sans font-bold text-sm tracking-wide text-[#E11D48] mb-3 uppercase flex items-center gap-1.5", children: /* @__PURE__ */ jsx("span", { children: popularSearchesTitle }) }),
|
|
169
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: popularSearches.map((tag, idx) => {
|
|
170
|
+
const resolvedTagHref = resolveNavDestination(tag.href, tag.zone, globalConfig.zones?.zones);
|
|
171
|
+
const requiresCrossZone = isCrossZoneNavigation(tag.zone, globalConfig.zones?.currentZone);
|
|
172
|
+
const tagContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
173
|
+
/* @__PURE__ */ jsx(TrendingUp, { size: 13, className: "text-grey-500 shrink-0" }),
|
|
174
|
+
/* @__PURE__ */ jsx("span", { children: tag.label })
|
|
175
|
+
] });
|
|
176
|
+
const tagClass = "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-grey-200 bg-white hover:border-grey-400 hover:bg-grey-50 text-xs font-medium text-grey-800 transition-all cursor-pointer";
|
|
177
|
+
if (resolvedTagHref) {
|
|
178
|
+
if (CustomLink && !requiresCrossZone) {
|
|
179
|
+
return /* @__PURE__ */ jsx(
|
|
180
|
+
CustomLink,
|
|
181
|
+
{
|
|
182
|
+
href: resolvedTagHref,
|
|
183
|
+
className: tagClass,
|
|
184
|
+
onClick: () => handleTagClick(tag),
|
|
185
|
+
children: tagContent
|
|
186
|
+
},
|
|
187
|
+
tag.id ?? idx
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
return /* @__PURE__ */ jsx(
|
|
191
|
+
"a",
|
|
192
|
+
{
|
|
193
|
+
href: resolvedTagHref,
|
|
194
|
+
"data-cross-zone": requiresCrossZone ? "true" : void 0,
|
|
195
|
+
className: tagClass,
|
|
196
|
+
onClick: () => handleTagClick(tag),
|
|
197
|
+
children: tagContent
|
|
198
|
+
},
|
|
199
|
+
tag.id ?? idx
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
return /* @__PURE__ */ jsx(
|
|
203
|
+
"button",
|
|
204
|
+
{
|
|
205
|
+
type: "button",
|
|
206
|
+
onClick: () => handleTagClick(tag),
|
|
207
|
+
className: tagClass,
|
|
208
|
+
children: tagContent
|
|
209
|
+
},
|
|
210
|
+
tag.id ?? idx
|
|
211
|
+
);
|
|
212
|
+
}) })
|
|
213
|
+
] })
|
|
214
|
+
}
|
|
215
|
+
) })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
) })
|
|
219
|
+
] });
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
export { NavSearch };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { OfferBannerConfig } from '../NavHeader.types';
|
|
3
|
+
export interface OfferBannerProps {
|
|
4
|
+
banner?: OfferBannerConfig | React.ReactNode | boolean;
|
|
5
|
+
show?: boolean;
|
|
6
|
+
shouldAnimate?: boolean;
|
|
7
|
+
motionClass?: string;
|
|
8
|
+
linkComponent?: React.ComponentType<any>;
|
|
9
|
+
}
|
|
10
|
+
export declare const OfferBanner: React.FC<OfferBannerProps>;
|
|
11
|
+
//# sourceMappingURL=OfferBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OfferBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/NavHeader/subcomponents/OfferBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC;IACvD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmGlD,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { AnimatePresence, motion, collapseVariants, getTransition } from '@timmbr/motion';
|
|
5
|
+
import { X } from '@timmbr/icons';
|
|
6
|
+
import { cn } from '@timmbr/utils';
|
|
7
|
+
import { offerBannerVariants } from '../NavHeader.styles.js';
|
|
8
|
+
import { resolveNavDestination, isCrossZoneNavigation } from '../NavHeader.helpers.js';
|
|
9
|
+
import { useTimmbrConfig } from '../../../providers/TimmbrConfigProvider.js';
|
|
10
|
+
|
|
11
|
+
const OfferBanner = ({
|
|
12
|
+
banner,
|
|
13
|
+
show = true,
|
|
14
|
+
shouldAnimate = true,
|
|
15
|
+
motionClass,
|
|
16
|
+
linkComponent: CustomLink
|
|
17
|
+
}) => {
|
|
18
|
+
const [dismissed, setDismissed] = React.useState(false);
|
|
19
|
+
const config = useTimmbrConfig();
|
|
20
|
+
if (!show || banner === false || banner === null || banner === void 0 || dismissed) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
if (React.isValidElement(banner) || typeof banner === "string" || typeof banner === "number") {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", { className: offerBannerVariants(), "data-slot": "nav-offer-banner", children: banner });
|
|
25
|
+
}
|
|
26
|
+
const bannerConfig = banner;
|
|
27
|
+
const { content, href, zone, crossZone, dismissible = false, onDismiss, action, className } = bannerConfig;
|
|
28
|
+
const resolvedHref = resolveNavDestination(href, zone, config.zones?.zones);
|
|
29
|
+
const requiresCrossZone = isCrossZoneNavigation(zone, config.zones?.currentZone, crossZone);
|
|
30
|
+
const handleDismiss = (e) => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
setDismissed(true);
|
|
33
|
+
onDismiss?.();
|
|
34
|
+
};
|
|
35
|
+
const renderContent = () => {
|
|
36
|
+
if (resolvedHref) {
|
|
37
|
+
if (CustomLink && !requiresCrossZone) {
|
|
38
|
+
return /* @__PURE__ */ jsxs(CustomLink, { href: resolvedHref, className: "hover:underline flex items-center gap-2", children: [
|
|
39
|
+
/* @__PURE__ */ jsx("span", { children: content }),
|
|
40
|
+
action && /* @__PURE__ */ jsx("span", { className: "ml-2", children: action })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
"a",
|
|
45
|
+
{
|
|
46
|
+
href: resolvedHref,
|
|
47
|
+
"data-cross-zone": requiresCrossZone ? "true" : void 0,
|
|
48
|
+
className: "hover:underline flex items-center gap-2",
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ jsx("span", { children: content }),
|
|
51
|
+
action && /* @__PURE__ */ jsx("span", { className: "ml-2", children: action })
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
57
|
+
/* @__PURE__ */ jsx("span", { children: content }),
|
|
58
|
+
action && /* @__PURE__ */ jsx("span", { className: "ml-2", children: action })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !dismissed && /* @__PURE__ */ jsxs(
|
|
62
|
+
motion.div,
|
|
63
|
+
{
|
|
64
|
+
initial: shouldAnimate ? "visible" : false,
|
|
65
|
+
exit: shouldAnimate ? "exit" : void 0,
|
|
66
|
+
variants: shouldAnimate ? collapseVariants : void 0,
|
|
67
|
+
transition: getTransition("fast"),
|
|
68
|
+
"data-slot": "nav-offer-banner",
|
|
69
|
+
className: cn(
|
|
70
|
+
offerBannerVariants(),
|
|
71
|
+
!shouldAnimate && "transition-none",
|
|
72
|
+
motionClass,
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-full px-8 text-center", children: renderContent() }),
|
|
77
|
+
dismissible && /* @__PURE__ */ jsx(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
type: "button",
|
|
81
|
+
onClick: handleDismiss,
|
|
82
|
+
"aria-label": "Dismiss offer banner",
|
|
83
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 p-1 text-[#F7F1E6]/70 hover:text-[#F7F1E6] hover:bg-white/10 rounded transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-white",
|
|
84
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
) });
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { OfferBanner };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
2
|
import type * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
import type { MotionProp } from '../../types/motion';
|
|
4
|
-
export
|
|
5
|
-
}
|
|
4
|
+
export type PopoverProps = PopoverPrimitive.PopoverProps;
|
|
6
5
|
export interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
7
6
|
/**
|
|
8
7
|
* Motion transition control.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,
|
|
1
|
+
{"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;AAEzD,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC;IACvE;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -110,12 +110,12 @@ const RadioGroup = React.forwardRef(
|
|
|
110
110
|
"p",
|
|
111
111
|
{
|
|
112
112
|
className: cn(
|
|
113
|
-
"text-xs mt-
|
|
113
|
+
"text-xs mt-1 flex items-center gap-1.5",
|
|
114
114
|
isError ? "text-destructive font-medium" : "text-muted"
|
|
115
115
|
),
|
|
116
116
|
children: [
|
|
117
|
-
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "leading-
|
|
117
|
+
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Info, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }),
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "leading-normal", children: errorMessage || helperText })
|
|
119
119
|
]
|
|
120
120
|
}
|
|
121
121
|
)
|
|
@@ -101,12 +101,12 @@ const Select = React.forwardRef(
|
|
|
101
101
|
"p",
|
|
102
102
|
{
|
|
103
103
|
className: cn(
|
|
104
|
-
"text-xs mt-
|
|
104
|
+
"text-xs mt-1 flex items-center gap-1.5",
|
|
105
105
|
isError ? "text-destructive font-medium" : "text-muted"
|
|
106
106
|
),
|
|
107
107
|
children: [
|
|
108
|
-
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0
|
|
109
|
-
/* @__PURE__ */ jsx("span", { className: "leading-
|
|
108
|
+
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Info, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }),
|
|
109
|
+
/* @__PURE__ */ jsx("span", { className: "leading-normal", children: errorMessage || helperText })
|
|
110
110
|
]
|
|
111
111
|
}
|
|
112
112
|
)
|
|
@@ -4,12 +4,9 @@ import type { MotionProp } from '../../types/motion';
|
|
|
4
4
|
export interface StatProps extends React.HTMLAttributes<HTMLDivElement>, StatVariants {
|
|
5
5
|
motion?: MotionProp;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
export
|
|
10
|
-
}
|
|
11
|
-
export interface StatHelpTextProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
-
}
|
|
7
|
+
export type StatLabelProps = React.HTMLAttributes<HTMLDivElement>;
|
|
8
|
+
export type StatValueProps = React.HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
export type StatHelpTextProps = React.HTMLAttributes<HTMLDivElement>;
|
|
13
10
|
export interface StatIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
14
11
|
type?: 'increase' | 'decrease';
|
|
15
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stat.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stat/Stat.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"Stat.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stat/Stat.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAGrE,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IAC7C,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CAChC"}
|
|
@@ -3,20 +3,13 @@ import type { TableVariants } from './Table.styles';
|
|
|
3
3
|
export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement>, TableVariants {
|
|
4
4
|
containerClassName?: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
}
|
|
14
|
-
export interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
15
|
-
}
|
|
16
|
-
export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
17
|
-
}
|
|
18
|
-
export interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
|
|
19
|
-
}
|
|
6
|
+
export type TableHeaderProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
7
|
+
export type TableBodyProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
8
|
+
export type TableFooterProps = React.HTMLAttributes<HTMLTableSectionElement>;
|
|
9
|
+
export type TableRowProps = React.HTMLAttributes<HTMLTableRowElement>;
|
|
10
|
+
export type TableHeadProps = React.ThHTMLAttributes<HTMLTableCellElement>;
|
|
11
|
+
export type TableCellProps = React.TdHTMLAttributes<HTMLTableCellElement>;
|
|
12
|
+
export type TableCaptionProps = React.HTMLAttributes<HTMLTableCaptionElement>;
|
|
20
13
|
export interface TablePaginationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
14
|
/**
|
|
22
15
|
* Current active page (1-indexed).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.types.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EACjD,aAAa;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,
|
|
1
|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AM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CACpF"}
|
|
@@ -145,12 +145,12 @@ const Textarea = React.forwardRef(
|
|
|
145
145
|
{
|
|
146
146
|
id: `${id}-desc`,
|
|
147
147
|
className: cn(
|
|
148
|
-
"text-xs mt-
|
|
148
|
+
"text-xs mt-1 flex items-center gap-1.5 flex-1",
|
|
149
149
|
isError ? "text-destructive font-medium" : "text-muted"
|
|
150
150
|
),
|
|
151
151
|
children: [
|
|
152
|
-
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0
|
|
153
|
-
/* @__PURE__ */ jsx("span", { className: "leading-
|
|
152
|
+
isError ? /* @__PURE__ */ jsx(AlertCircle, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Info, { className: "w-3.5 h-3.5 shrink-0", "aria-hidden": "true" }),
|
|
153
|
+
/* @__PURE__ */ jsx("span", { className: "leading-normal", children: errorMessage || helperText })
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
) : /* @__PURE__ */ jsx("span", {}),
|
|
@@ -32,7 +32,7 @@ const ToastViewport = React.forwardRef(({ className, stacked, position = "bottom
|
|
|
32
32
|
}
|
|
33
33
|
));
|
|
34
34
|
ToastViewport.displayName = ToastPrimitive.Viewport.displayName;
|
|
35
|
-
const Toast = React.forwardRef(({ className, variant, motion, index, total, style, ...props }, ref) => {
|
|
35
|
+
const Toast = React.forwardRef(({ className, variant, motion, index, total: _total, style, ...props }, ref) => {
|
|
36
36
|
const globalMotion = useGlobalAnimation();
|
|
37
37
|
const { shouldAnimate, motionClass } = resolveMotion(motion, globalMotion);
|
|
38
38
|
const isStacked = index !== void 0;
|
|
@@ -56,6 +56,5 @@ export interface ToastViewportProps extends React.ComponentPropsWithoutRef<typeo
|
|
|
56
56
|
*/
|
|
57
57
|
position?: ToastPosition;
|
|
58
58
|
}
|
|
59
|
-
export
|
|
60
|
-
}
|
|
59
|
+
export type ToastActionElement = React.ReactElement<React.ComponentPropsWithoutRef<typeof ToastPrimitive.Action>>;
|
|
61
60
|
//# sourceMappingURL=Toast.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,E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AE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,EAChE,aAAa;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,QAAQ,CAAC;IACtE;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,MAAM,kBAAkB,GAC5B,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export * from './components/Switch';
|
|
|
14
14
|
export * from './components/RangeSlider';
|
|
15
15
|
export * from './components/Label';
|
|
16
16
|
export * from './components/FormField';
|
|
17
|
+
export * from './components/ImageUpload';
|
|
18
|
+
export * from './components/AlertDialog';
|
|
17
19
|
export * from './components/Dialog';
|
|
18
20
|
export * from './components/Drawer';
|
|
19
21
|
export * from './components/Dropdown';
|
|
@@ -22,6 +24,7 @@ export * from './components/Toast';
|
|
|
22
24
|
export * from './components/Tooltip';
|
|
23
25
|
export * from './components/Tabs';
|
|
24
26
|
export * from './components/SideBarNavigation';
|
|
27
|
+
export * from './components/NavHeader';
|
|
25
28
|
export * from './components/Button';
|
|
26
29
|
export * from './components/LinkButton';
|
|
27
30
|
export * from './components/Accordion';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,aAAa,CAAC;AAG5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,aAAa,CAAC;AAG5B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AAGzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AAGvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { resolveMotion } from './types/motion.js';
|
|
2
2
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from './components/Accordion/Accordion.js';
|
|
3
3
|
export { Alert, AlertDescription, AlertTitle } from './components/Alert/Alert.js';
|
|
4
|
+
export { AlertDialog, AlertDialogAction, AlertDialogBody, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from './components/AlertDialog/AlertDialog.js';
|
|
4
5
|
export { AnimationProvider, useGlobalAnimation } from './providers/AnimationProvider.js';
|
|
5
6
|
export { Avatar } from './components/Avatar/Avatar.js';
|
|
6
7
|
export { Badge } from './components/Badge/Badge.js';
|
|
@@ -10,22 +11,36 @@ export { Center } from './components/Center/Center.js';
|
|
|
10
11
|
export { Checkbox } from './components/Checkbox/Checkbox.js';
|
|
11
12
|
export { Chip } from './components/Chip/Chip.js';
|
|
12
13
|
export { Container } from './components/Container/Container.js';
|
|
14
|
+
export { DEFAULT_ALL_ACCEPT, DEFAULT_IMAGE_ACCEPT, DEFAULT_IMAGE_MAX_SIZE, DEFAULT_VIDEO_ACCEPT, DEFAULT_VIDEO_MAX_SIZE, GRID_COLS_MAP, VIDEO_EXTENSIONS, isVideoMedia, normalizeUploadItems, validateUploadFiles } from './components/ImageUpload/ImageUpload.helpers.js';
|
|
13
15
|
export { DEFAULT_STORAGE_KEY, isNavItemActive, isRouteActive, readStoredCollapsed, writeStoredCollapsed } from './components/SideBarNavigation/SideBarNavigation.helpers.js';
|
|
14
16
|
export { DataList, DataListItem, DataListLabel, DataListValue } from './components/DataList/DataList.js';
|
|
15
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/Dialog/Dialog.js';
|
|
17
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/Dialog/Dialog.js';
|
|
16
18
|
export { Divider } from './components/Divider/Divider.js';
|
|
17
19
|
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './components/Drawer/Drawer.js';
|
|
18
20
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/Dropdown/Dropdown.js';
|
|
19
21
|
export { EmptyState } from './components/EmptyState/EmptyState.js';
|
|
22
|
+
export { FilmIcon, ImageIcon, PlayIcon, UploadCloudIcon } from './components/ImageUpload/subcomponents/ImageUploadIcons.js';
|
|
20
23
|
export { FormField } from './components/FormField/FormField.js';
|
|
21
24
|
export { Grid } from './components/Grid/Grid.js';
|
|
25
|
+
export { Header, NavHeader } from './components/NavHeader/NavHeader.js';
|
|
22
26
|
export { Heading } from './components/Heading/Heading.js';
|
|
23
27
|
export { Icon } from './components/Icon/Icon.js';
|
|
28
|
+
export { ImageUpload } from './components/ImageUpload/ImageUpload.js';
|
|
29
|
+
export { ImageUploadDropzone } from './components/ImageUpload/subcomponents/ImageUploadDropzone.js';
|
|
30
|
+
export { ImageUploadModal } from './components/ImageUpload/subcomponents/ImageUploadModal.js';
|
|
31
|
+
export { ImageUploadSinglePreview } from './components/ImageUpload/subcomponents/ImageUploadSinglePreview.js';
|
|
32
|
+
export { ImageUploadTaskCard, ImageUploadThumbnailCard } from './components/ImageUpload/subcomponents/ImageUploadThumbnailCard.js';
|
|
24
33
|
export { Inline } from './components/Inline/Inline.js';
|
|
25
34
|
export { Input } from './components/Input/Input.js';
|
|
26
35
|
export { Label } from './components/Label/Label.js';
|
|
27
36
|
export { LinkButton } from './components/LinkButton/LinkButton.js';
|
|
28
37
|
export { List, ListItem, ListItemAction, ListItemIcon, ListItemText } from './components/List/List.js';
|
|
38
|
+
export { NavActions } from './components/NavHeader/subcomponents/NavActions.js';
|
|
39
|
+
export { NavBrand } from './components/NavHeader/subcomponents/NavBrand.js';
|
|
40
|
+
export { NavItems } from './components/NavHeader/subcomponents/NavItems.js';
|
|
41
|
+
export { NavMegaMenu } from './components/NavHeader/subcomponents/NavMegaMenu.js';
|
|
42
|
+
export { NavSearch } from './components/NavHeader/subcomponents/NavSearch.js';
|
|
43
|
+
export { OfferBanner } from './components/NavHeader/subcomponents/OfferBanner.js';
|
|
29
44
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from './components/Pagination/Pagination.js';
|
|
30
45
|
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger } from './components/Popover/Popover.js';
|
|
31
46
|
export { Progress } from './components/Progress/Progress.js';
|
|
@@ -56,6 +71,7 @@ export { Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastT
|
|
|
56
71
|
export { ToastContainer } from './components/Toast/ToastContainer.js';
|
|
57
72
|
export { Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger } from './components/Tooltip/Tooltip.js';
|
|
58
73
|
export { accordionContentVariants, accordionItemVariants, accordionTriggerVariants } from './components/Accordion/Accordion.styles.js';
|
|
74
|
+
export { alertDialogBodyVariants, alertDialogContentVariants, alertDialogDescriptionVariants, alertDialogFooterVariants, alertDialogHeaderVariants, alertDialogOverlayVariants, alertDialogTitleVariants } from './components/AlertDialog/AlertDialog.styles.js';
|
|
59
75
|
export { alertIconVariants, alertVariants } from './components/Alert/Alert.styles.js';
|
|
60
76
|
export { avatarRootVariants, avatarStatusVariants } from './components/Avatar/Avatar.styles.js';
|
|
61
77
|
export { badgeVariants } from './components/Badge/Badge.styles.js';
|
|
@@ -67,7 +83,7 @@ export { chipVariants } from './components/Chip/Chip.styles.js';
|
|
|
67
83
|
export { colsMap, gridVariants, lgColsMap, mdColsMap, smColsMap, xlColsMap } from './components/Grid/Grid.styles.js';
|
|
68
84
|
export { containerVariants } from './components/Container/Container.styles.js';
|
|
69
85
|
export { dataListItemVariants, dataListLabelVariants, dataListValueVariants, dataListVariants } from './components/DataList/DataList.styles.js';
|
|
70
|
-
export { dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './components/Dialog/Dialog.styles.js';
|
|
86
|
+
export { dialogBodyVariants, dialogContentVariants, dialogDescriptionVariants, dialogFooterVariants, dialogHeaderVariants, dialogOverlayVariants, dialogTitleVariants } from './components/Dialog/Dialog.styles.js';
|
|
71
87
|
export { dividerVariants } from './components/Divider/Divider.styles.js';
|
|
72
88
|
export { drawerContentVariants, drawerFooterVariants, drawerHeaderVariants, drawerOverlayVariants } from './components/Drawer/Drawer.styles.js';
|
|
73
89
|
export { dropdownContentVariants, dropdownItemVariants } from './components/Dropdown/Dropdown.styles.js';
|
|
@@ -75,11 +91,13 @@ export { emptyStateIconWrapperVariants, emptyStateVariants } from './components/
|
|
|
75
91
|
export { formFieldVariants } from './components/FormField/FormField.styles.js';
|
|
76
92
|
export { headingVariants } from './components/Heading/Heading.styles.js';
|
|
77
93
|
export { iconVariants } from './components/Icon/Icon.styles.js';
|
|
94
|
+
export { imagePreviewContainerVariants, imageUploadZoneVariants, thumbnailCardVariants } from './components/ImageUpload/ImageUpload.styles.js';
|
|
78
95
|
export { inlineVariants } from './components/Inline/Inline.styles.js';
|
|
79
96
|
export { inputFieldVariants, inputWrapperVariants } from './components/Input/Input.styles.js';
|
|
80
97
|
export { labelVariants } from './components/Label/Label.styles.js';
|
|
81
98
|
export { linkButtonVariants } from './components/LinkButton/LinkButton.styles.js';
|
|
82
99
|
export { listItemActionVariants, listItemIconVariants, listItemTextVariants, listItemVariants, listVariants } from './components/List/List.styles.js';
|
|
100
|
+
export { megaMenuCardVariants, navActionVariants, navHeaderContainerVariants, navHeaderItemVariants, navHeaderVariants, offerBannerVariants, searchPopoverCardVariants } from './components/NavHeader/NavHeader.styles.js';
|
|
83
101
|
export { navBadgeVariants, navItemVariants, sidebarContainerVariants, sidebarToggleVariants, subItemVariants } from './components/SideBarNavigation/SideBarNavigation.styles.js';
|
|
84
102
|
export { paginationLinkVariants } from './components/Pagination/Pagination.styles.js';
|
|
85
103
|
export { popoverContentVariants } from './components/Popover/Popover.styles.js';
|
|
@@ -99,3 +117,4 @@ export { textareaVariants } from './components/Textarea/Textarea.styles.js';
|
|
|
99
117
|
export { toast, toastStore, useToast } from './components/Toast/toastStore.js';
|
|
100
118
|
export { toastVariants } from './components/Toast/Toast.styles.js';
|
|
101
119
|
export { tooltipContentVariants } from './components/Tooltip/Tooltip.styles.js';
|
|
120
|
+
export { useNavHeaderContext } from './components/NavHeader/NavHeader.context.js';
|