@youngonesworks/ui 0.1.34 → 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/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 +33 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +33 -11
- 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 {};
|
|
@@ -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", {
|
|
@@ -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;
|