@local-civics/hub-ui 0.1.110 → 0.1.112
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.d.ts +20 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -891,6 +891,25 @@ type LogServiceButtonProps = {
|
|
|
891
891
|
*/
|
|
892
892
|
declare const LogServiceButton: (props: LogServiceButtonProps) => JSX.Element;
|
|
893
893
|
|
|
894
|
+
/**
|
|
895
|
+
* StopwatchProps
|
|
896
|
+
*/
|
|
897
|
+
type CtaListProps = {
|
|
898
|
+
readOnly?: boolean;
|
|
899
|
+
ctaLabel?: string;
|
|
900
|
+
};
|
|
901
|
+
type StopwatchProps = {
|
|
902
|
+
time?: string;
|
|
903
|
+
ctaList?: CtaListProps[];
|
|
904
|
+
onCTAClick?: (ctaLabel: string) => void;
|
|
905
|
+
};
|
|
906
|
+
/**
|
|
907
|
+
* A component for Stopwatch.
|
|
908
|
+
* @param props
|
|
909
|
+
* @constructor
|
|
910
|
+
*/
|
|
911
|
+
declare const Stopwatch: (props: StopwatchProps) => JSX.Element;
|
|
912
|
+
|
|
894
913
|
/**
|
|
895
914
|
* TaskItemProps
|
|
896
915
|
*/
|
|
@@ -1053,4 +1072,4 @@ type HomeLayoutProps = {
|
|
|
1053
1072
|
*/
|
|
1054
1073
|
declare const HomeLayout: (props: HomeLayoutProps) => JSX.Element;
|
|
1055
1074
|
|
|
1056
|
-
export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, Board, BoardProps, Button, ButtonBorder, ButtonColor, ButtonFilter, ButtonJustify, ButtonProps, ButtonSize, ButtonSpacing, ButtonTheme, Card, CardProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, Home, HomeLayout, HomeLayoutProps, Icon, IconName, IconProps, ImpactWidget, ImpactWidgetProps, LearningForm, LearningFormProps, Loader, LoaderProps, LogServiceButton, LogServiceButtonProps, Logo, Modal, ModalProps, NavBar, NavBarProps, NavLink, NavLinkName, NavLinkProps, NotFound, NotFoundProps, Onboarding, OnboardingProps, Overlay, OverlayProps, PathwayButton, PathwayButtonProps, PathwayFilter, PathwayFilterProps, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayWidget, PathwayWidgetProps, ProfileWidget, Progress, ProgressProps, ResidentWidgetProps, Search, SearchButton, SearchButtonProps, SearchProps, SearchResult, SearchResultProps, SettingsCard, SettingsCardProps, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };
|
|
1075
|
+
export { AboutWidget, AboutWidgetProps, AchievementWidget, AchievementWidgetProps, ActivityCard, ActivityCardProps, ActivityItem, ActivityItemProps, ActivityList, ActivityListProps, ActivityReflection, ActivityReflectionProps, AuthLayout, AuthLayoutProps, Badge, BadgeActivityMenu, BadgeActivityMenuProps, BadgeFilterOption, BadgeProps, BadgeSection, BadgeSectionProps, BadgeSuccessDialog, BadgeSuccessDialogProps, Board, BoardProps, Button, ButtonBorder, ButtonColor, ButtonFilter, ButtonJustify, ButtonProps, ButtonSize, ButtonSpacing, ButtonTheme, Card, CardProps, CtaListProps, DateSelection, DateSelectionProps, DaySelectionOptionProps, EventItem, EventItemProps, EventList, EventListProps, Home, HomeLayout, HomeLayoutProps, Icon, IconName, IconProps, ImpactWidget, ImpactWidgetProps, LearningForm, LearningFormProps, Loader, LoaderProps, LogServiceButton, LogServiceButtonProps, Logo, Modal, ModalProps, NavBar, NavBarProps, NavLink, NavLinkName, NavLinkProps, NotFound, NotFoundProps, Onboarding, OnboardingProps, Overlay, OverlayProps, PathwayButton, PathwayButtonProps, PathwayFilter, PathwayFilterProps, PathwayProgress, PathwayProgressHeight, PathwayProgressProps, PathwayWidget, PathwayWidgetProps, ProfileWidget, Progress, ProgressProps, ResidentWidgetProps, Search, SearchButton, SearchButtonProps, SearchProps, SearchResult, SearchResultProps, SettingsCard, SettingsCardProps, Stopwatch, StopwatchProps, Tab, TabProps, TagFilter, TagFilterProps, TaskItem, TaskItemProps, TaskList, TaskListProps, Widget, WidgetBody, WidgetBodyProps, WidgetHeader, WidgetHeaderLink, WidgetHeaderLinkProps, WidgetHeaderProps, WidgetProps, WidgetTitle, WidgetTitleProps };
|
package/dist/index.js
CHANGED
|
@@ -5722,6 +5722,36 @@ const LogServiceButton = (props) => {
|
|
|
5722
5722
|
), isOpen && /* @__PURE__ */ React.createElement(Form, __spreadProps(__spreadValues({ onSubmit: props.onSubmit }, props.form), { onClose })));
|
|
5723
5723
|
};
|
|
5724
5724
|
|
|
5725
|
+
const Stopwatch = (props) => {
|
|
5726
|
+
const ctaList = (props == null ? void 0 : props.ctaList) || [];
|
|
5727
|
+
const getColor = (label) => {
|
|
5728
|
+
if (label.toLowerCase() === "start") {
|
|
5729
|
+
return "green";
|
|
5730
|
+
} else if (label.toLowerCase() === "stop") {
|
|
5731
|
+
return "rose";
|
|
5732
|
+
}
|
|
5733
|
+
return "blue";
|
|
5734
|
+
};
|
|
5735
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "shadow-2xl shadow-gray-400 h-30 w-48 grid grid-cols-1 justify-items-center text-slate-600 text-md gap-4 p-4 box-border" }, /* @__PURE__ */ React.createElement("div", { className: "shadow-xl w-36 text-center text-lg p-2" }, props.time), /* @__PURE__ */ React.createElement("div", { className: "grid grid-cols-3 gap-2" }, ctaList && ctaList.length && ctaList.map((ctaObj, i) => {
|
|
5736
|
+
const color = getColor(ctaObj.ctaLabel || "");
|
|
5737
|
+
return /* @__PURE__ */ React.createElement(
|
|
5738
|
+
Button,
|
|
5739
|
+
{
|
|
5740
|
+
key: i,
|
|
5741
|
+
onClick: () => props.onCTAClick && props.onCTAClick(ctaObj.ctaLabel || ""),
|
|
5742
|
+
theme: "dark",
|
|
5743
|
+
border: "rounded",
|
|
5744
|
+
size: "sm",
|
|
5745
|
+
spacing: "xs",
|
|
5746
|
+
color,
|
|
5747
|
+
text: ctaObj.ctaLabel,
|
|
5748
|
+
active: false,
|
|
5749
|
+
disabled: ctaObj.readOnly
|
|
5750
|
+
}
|
|
5751
|
+
);
|
|
5752
|
+
}))));
|
|
5753
|
+
};
|
|
5754
|
+
|
|
5725
5755
|
const TaskItem = (props) => {
|
|
5726
5756
|
const color = props.status === "done" ? "text-green-500" : props.status === "in-progress" ? "text-cyan-100" : "text-gray-300";
|
|
5727
5757
|
const border = props.full ? "border-b border-gray-100" : props.status === "done" ? "border rounded border-gray-200" : "border rounded border-gray-200";
|
|
@@ -5832,6 +5862,7 @@ exports.Search = Search;
|
|
|
5832
5862
|
exports.SearchButton = SearchButton;
|
|
5833
5863
|
exports.SearchResult = SearchResult;
|
|
5834
5864
|
exports.SettingsCard = SettingsCard;
|
|
5865
|
+
exports.Stopwatch = Stopwatch;
|
|
5835
5866
|
exports.Tab = Tab;
|
|
5836
5867
|
exports.TagFilter = TagFilter;
|
|
5837
5868
|
exports.TaskItem = TaskItem;
|