@youngonesworks/ui 0.1.33 → 0.1.35
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/breadCrumb/index.d.ts +6 -2
- package/dist/components/favouriteButton/index.d.ts +4 -4
- package/dist/components/tabs/index.d.ts +1 -0
- package/dist/components/timeInput/TimeInput.stories.d.ts +17 -0
- package/dist/components/timeInput/TimeInput.test.d.ts +1 -0
- package/dist/components/timeInput/index.d.ts +8 -0
- package/dist/index.cjs +48 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/linkText/LinkText.stories.d.ts +0 -6
- package/dist/components/linkText/index.d.ts +0 -11
- package/dist/components/phoneInput/index.d.ts +0 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type FC, type ReactNode } from 'react';
|
|
2
2
|
interface IBreadCrumb {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
LinkText: FC<{
|
|
5
|
+
classNames: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}>;
|
|
4
8
|
}
|
|
5
9
|
export declare const BreadCrumb: {
|
|
6
|
-
({ children }: IBreadCrumb): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
({ children, LinkText }: IBreadCrumb): import("react/jsx-runtime").JSX.Element;
|
|
7
11
|
displayName: string;
|
|
8
12
|
};
|
|
9
13
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type JSX, type ReactNode } from 'react';
|
|
2
|
-
interface IFavouriteButtonProps extends Omit<
|
|
1
|
+
import { type ButtonHTMLAttributes, type JSX, type ReactNode, type Ref } from 'react';
|
|
2
|
+
interface IFavouriteButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'size'> {
|
|
3
3
|
onClick: () => void;
|
|
4
4
|
favourite: boolean;
|
|
5
5
|
iconOutline?: ReactNode;
|
|
@@ -11,9 +11,9 @@ interface IFavouriteButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButt
|
|
|
11
11
|
iconColor?: string;
|
|
12
12
|
iconColorSelected?: string;
|
|
13
13
|
styleVariant?: 'transparent' | 'small' | 'default' | 'round' | undefined;
|
|
14
|
-
children?:
|
|
14
|
+
children?: ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare const FavouriteButton: (props: IFavouriteButtonProps & {
|
|
17
|
-
ref?:
|
|
17
|
+
ref?: Ref<HTMLButtonElement>;
|
|
18
18
|
}) => JSX.Element;
|
|
19
19
|
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./index").ITimeInput & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const WithLabel: Story;
|
|
14
|
+
export declare const WithError: Story;
|
|
15
|
+
export declare const WithSeconds: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
17
|
+
export declare const WithDefaultValue: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ITimeInput extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
+
'data-testid'?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
withSeconds?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const TimeInput: React.ForwardRefExoticComponent<ITimeInput & React.RefAttributes<HTMLInputElement>>;
|
package/dist/index.cjs
CHANGED
|
@@ -103307,18 +103307,9 @@ const BigBadge = ({ styleVariant = COLOR.GREEN, className, children,...props })
|
|
|
103307
103307
|
children
|
|
103308
103308
|
});
|
|
103309
103309
|
|
|
103310
|
-
//#endregion
|
|
103311
|
-
//#region src/components/linkText/index.tsx
|
|
103312
|
-
/** @deprecated dont use this anymore, instead use the next link */
|
|
103313
|
-
const LinkText = ({ children, classNames: classNames$1 }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
103314
|
-
className: classNames$1,
|
|
103315
|
-
children
|
|
103316
|
-
});
|
|
103317
|
-
LinkText.displayName = "LinkText";
|
|
103318
|
-
|
|
103319
103310
|
//#endregion
|
|
103320
103311
|
//#region src/components/breadCrumb/index.tsx
|
|
103321
|
-
const BreadCrumb = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkText, {
|
|
103312
|
+
const BreadCrumb = ({ children, LinkText }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkText, {
|
|
103322
103313
|
"data-component": "BreadCrumb",
|
|
103323
103314
|
classNames: "flex items-center",
|
|
103324
103315
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconArrowNarrowLeft, { size: 20 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -115934,6 +115925,21 @@ const Tab = (0, react.forwardRef)(({ tabId, activeTab, tabContent, clickFnc, rig
|
|
|
115934
115925
|
})]
|
|
115935
115926
|
}));
|
|
115936
115927
|
|
|
115928
|
+
//#endregion
|
|
115929
|
+
//#region src/components/tabs/TabsBadge.tsx
|
|
115930
|
+
const TabsBadge = ({ children }) => {
|
|
115931
|
+
const isCircular = typeof children === "number" && children <= 9 || typeof children === "string" && children.length === 1 || false;
|
|
115932
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
115933
|
+
"data-testid": "tabs-badge",
|
|
115934
|
+
className: clsx_default("bg-pink h-5 rounded-full text-xs leading-5 font-medium text-white", {
|
|
115935
|
+
"w-5 text-center": isCircular,
|
|
115936
|
+
"px-2": !isCircular
|
|
115937
|
+
}),
|
|
115938
|
+
children
|
|
115939
|
+
});
|
|
115940
|
+
};
|
|
115941
|
+
TabsBadge.displayName = "TabsBadge";
|
|
115942
|
+
|
|
115937
115943
|
//#endregion
|
|
115938
115944
|
//#region src/components/tabs/TabsWrapper.tsx
|
|
115939
115945
|
const TabsWrapper = ({ setActiveTab, activeTab, tabs }) => {
|
|
@@ -115999,21 +116005,6 @@ const TabContent = (0, react.forwardRef)(({ tab, setActiveTab, activeTab }, ref)
|
|
|
115999
116005
|
}));
|
|
116000
116006
|
TabContent.displayName = "TabContent";
|
|
116001
116007
|
|
|
116002
|
-
//#endregion
|
|
116003
|
-
//#region src/components/tabs/TabsBadge.tsx
|
|
116004
|
-
const TabsBadge = ({ children }) => {
|
|
116005
|
-
const isCircular = typeof children === "number" && children <= 9 || typeof children === "string" && children.length === 1 || false;
|
|
116006
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
116007
|
-
"data-testid": "tabs-badge",
|
|
116008
|
-
className: clsx_default("bg-pink h-5 rounded-full text-xs leading-5 font-medium text-white", {
|
|
116009
|
-
"w-5 text-center": isCircular,
|
|
116010
|
-
"px-2": !isCircular
|
|
116011
|
-
}),
|
|
116012
|
-
children
|
|
116013
|
-
});
|
|
116014
|
-
};
|
|
116015
|
-
TabsBadge.displayName = "TabsBadge";
|
|
116016
|
-
|
|
116017
116008
|
//#endregion
|
|
116018
116009
|
//#region src/components/textArea/index.tsx
|
|
116019
116010
|
const Textarea = (0, react.forwardRef)(({ className, label, error: error$1, rows = 8,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -116064,6 +116055,37 @@ function ThemeIcon({ styleVariant = "black", className, icon, adjustedSize, titl
|
|
|
116064
116055
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(M, { id: title })] });
|
|
116065
116056
|
}
|
|
116066
116057
|
|
|
116058
|
+
//#endregion
|
|
116059
|
+
//#region src/components/timeInput/index.tsx
|
|
116060
|
+
const TimeInput = (0, react.forwardRef)(({ label, error: error$1, withSeconds, className = "",...props }, ref) => {
|
|
116061
|
+
const handleTimeChange = (e$2) => {
|
|
116062
|
+
if (props.onChange) props.onChange(e$2);
|
|
116063
|
+
};
|
|
116064
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
116065
|
+
className: "leading-none",
|
|
116066
|
+
"data-component": "timeInput",
|
|
116067
|
+
children: [
|
|
116068
|
+
label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
116069
|
+
className: "mb-2 block text-xs font-medium",
|
|
116070
|
+
htmlFor: props.id,
|
|
116071
|
+
children: label
|
|
116072
|
+
}),
|
|
116073
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
116074
|
+
...props,
|
|
116075
|
+
ref,
|
|
116076
|
+
type: "time",
|
|
116077
|
+
step: withSeconds ? "1" : "60",
|
|
116078
|
+
onChange: handleTimeChange,
|
|
116079
|
+
className: `bg-ultra-light-gray focus:border-primary flex h-10 min-h-[36px] w-full items-center rounded-[5px] border border-solid border-gray-200 px-3 text-sm font-normal focus:outline-hidden ${error$1 ? "border-red-500" : ""} ${className}`
|
|
116080
|
+
}),
|
|
116081
|
+
error$1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
116082
|
+
className: "pt-2 text-xs font-normal text-red-500",
|
|
116083
|
+
children: error$1
|
|
116084
|
+
})
|
|
116085
|
+
]
|
|
116086
|
+
});
|
|
116087
|
+
});
|
|
116088
|
+
|
|
116067
116089
|
//#endregion
|
|
116068
116090
|
//#region src/components/toggle/index.tsx
|
|
116069
116091
|
const Toggle = ({ onClick, value, disabled = false }) => {
|
|
@@ -140444,7 +140466,6 @@ exports.HR = HR;
|
|
|
140444
140466
|
exports.HamburgerMenuButton = HamburgerMenuButton;
|
|
140445
140467
|
exports.Island = Island;
|
|
140446
140468
|
exports.Label = Label;
|
|
140447
|
-
exports.LinkText = LinkText;
|
|
140448
140469
|
exports.Loader = Loader;
|
|
140449
140470
|
exports.LogoBlack = LogoBlack;
|
|
140450
140471
|
exports.Modal = Modal;
|
|
@@ -140478,6 +140499,7 @@ exports.TabsWrapper = TabsWrapper;
|
|
|
140478
140499
|
exports.TextInput = TextInput;
|
|
140479
140500
|
exports.Textarea = Textarea;
|
|
140480
140501
|
exports.ThemeIcon = ThemeIcon;
|
|
140502
|
+
exports.TimeInput = TimeInput;
|
|
140481
140503
|
exports.Toggle = Toggle;
|
|
140482
140504
|
exports.Tooltip = Tooltip;
|
|
140483
140505
|
exports.TruncatedText = TruncatedText;
|