@designbasekorea/figma-ui 0.2.9 → 0.2.11
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/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +19 -2
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +26 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useRef, useState, useEffect, createContext, useContext, useCallback } from 'react';
|
|
2
|
-
import { HeartFilledIcon, CoffeeFilledIcon, ChevronDownIcon, AppWindowIcon, YoutubeIcon, InstagramIcon, FigmaIcon, MailIcon, ExternalLinkIcon,
|
|
3
|
-
import { Button, Badge, Toggle, Spinner, SegmentControl, Logo, ToastContainer, Toast, Input, Modal, Progressbar, RandomGradient } from '@designbasekorea/ui';
|
|
2
|
+
import { HeartFilledIcon, CoffeeFilledIcon, ChevronLeftIcon, MoreHorizontalIcon, ChevronDownIcon, AppWindowIcon, YoutubeIcon, InstagramIcon, FigmaIcon, MailIcon, ExternalLinkIcon, CloseIcon, CircleCheckFilledIcon, ResizableIcon, GripVerticalIcon, ChevronRightIcon } from '@designbasekorea/icons';
|
|
3
|
+
import { Button, Dropdown, Badge, Toggle, Spinner, SegmentControl, Logo, ToastContainer, Toast, Input, Modal, Progressbar, RandomGradient } from '@designbasekorea/ui';
|
|
4
4
|
export * from '@designbasekorea/ui';
|
|
5
5
|
|
|
6
6
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
@@ -77,6 +77,29 @@ const FigmaHeader = ({ children, actions = [], searchBar, sticky = true, classNa
|
|
|
77
77
|
};
|
|
78
78
|
FigmaHeader.displayName = 'FigmaHeader';
|
|
79
79
|
|
|
80
|
+
const FigmaPageHead = ({ onBack, title, description, actions = [], moreActions = [], className, t }) => {
|
|
81
|
+
const classes = clsx('designbase-figma-page-head', className);
|
|
82
|
+
const displayTitle = resolveText(t, title);
|
|
83
|
+
const displayDescription = description ? resolveText(t, description) : undefined;
|
|
84
|
+
const dropdownItems = moreActions.map(action => ({
|
|
85
|
+
id: action.id,
|
|
86
|
+
label: resolveText(t, action.label),
|
|
87
|
+
onClick: action.onClick
|
|
88
|
+
}));
|
|
89
|
+
return (React.createElement("div", { className: classes },
|
|
90
|
+
React.createElement("div", { className: "designbase-figma-page-head__left" },
|
|
91
|
+
React.createElement(Button, { variant: "tertiary", size: "s", iconOnly: true, onPress: onBack, "aria-label": "\uB4A4\uB85C\uAC00\uAE30" },
|
|
92
|
+
React.createElement(ChevronLeftIcon, { size: 14 })),
|
|
93
|
+
React.createElement("div", { className: "designbase-figma-page-head__titles" },
|
|
94
|
+
React.createElement("h2", null, displayTitle),
|
|
95
|
+
displayDescription && React.createElement("p", null, displayDescription))),
|
|
96
|
+
React.createElement("div", { className: "designbase-figma-page-head__actions" },
|
|
97
|
+
actions.map((action, index) => (React.createElement(React.Fragment, { key: index }, action))),
|
|
98
|
+
moreActions.length > 0 && (React.createElement(Dropdown, { trigger: React.createElement("button", { type: "button", className: "designbase-figma-page-head__more-button", "aria-label": "\uB354\uBCF4\uAE30" },
|
|
99
|
+
React.createElement(MoreHorizontalIcon, { size: 16 })), items: dropdownItems, placement: "bottom-right", size: "s" })))));
|
|
100
|
+
};
|
|
101
|
+
FigmaPageHead.displayName = 'FigmaPageHead';
|
|
102
|
+
|
|
80
103
|
const FigmaSection = ({ title, dataCategory, iconButton, children, marginBottom, isEnabled = true, onToggle, className, enableScrollNavigation = false, headerHeight = 94, onActiveSectionChange, t, collapsible = false, defaultCollapsed = false, onCollapseChange, badge, overflowVisible = false, }) => {
|
|
81
104
|
const sectionRef = useRef(null);
|
|
82
105
|
const clipRef = useRef(null);
|
|
@@ -1045,5 +1068,5 @@ const UpgradeBanner = ({ onClick, variant = 'button', isLoading = false, title =
|
|
|
1045
1068
|
};
|
|
1046
1069
|
UpgradeBanner.displayName = 'UpgradeBanner';
|
|
1047
1070
|
|
|
1048
|
-
export { DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, SettingsModal, TitleDescription, UpgradeBanner, getActiveSection, resolveText, scrollToSection, useFigmaToast, useToast };
|
|
1071
|
+
export { DonationBadge, FigmaContainer, FigmaFooter, FigmaHeader, FigmaPageHead, FigmaSection, FigmaSidebar, FigmaToast, FigmaToastProvider, FormWithSubmit, InteractionFeedback, LanguageSelector, LogoDropdown, PageLicense, PaymentBadge, PaymentStatusSection, PricingComparison, ProgressModal, ResizablePlugin, SettingsModal, TitleDescription, UpgradeBanner, getActiveSection, resolveText, scrollToSection, useFigmaToast, useToast };
|
|
1049
1072
|
//# sourceMappingURL=index.esm.js.map
|