@caseparts-org/caseblocks 0.0.10 → 0.0.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/assets/Input.css +1 -0
- package/dist/atoms/Input/Input.d.ts +6 -0
- package/dist/atoms/Input/Input.js +24 -0
- package/dist/atoms/Input/Input.stories.d.ts +14 -0
- package/dist/atoms/Input/Input.stories.js +27 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +24 -22
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._input-container_1fwgs_1{display:flex;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input-container_1fwgs_1>label{font-family:var(--font-family-label);font-size:var(--font-size-xs)}._input_1fwgs_1{height:32px;border-radius:var(--radius-radius-minimal, 2px);border:1px solid var(--border-border-primary, #dfdfdf);background:var(--surface-surface-secondary, #f6f6f6);padding:0px var(--spacing-spacing-1xs, 12px);outline:none;font-size:var(--font-size-sm);width:100%}._input_1fwgs_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { HideAtProps } from '../HideAt';
|
|
3
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, HideAtProps {
|
|
4
|
+
label: string | null;
|
|
5
|
+
}
|
|
6
|
+
export declare function Input({ label, hideAt, className, ...otherProps }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { getHideAtStyles as r } from "../HideAt.js";
|
|
4
|
+
import '../../assets/Input.css';const u = "_input_1fwgs_1", e = {
|
|
5
|
+
"input-container": "_input-container_1fwgs_1",
|
|
6
|
+
input: u
|
|
7
|
+
};
|
|
8
|
+
function f({ label: n, hideAt: s, className: c, ...t }) {
|
|
9
|
+
return /* @__PURE__ */ p("div", { className: e["input-container"], children: [
|
|
10
|
+
n && /* @__PURE__ */ i("label", { htmlFor: t.name, children: n }),
|
|
11
|
+
/* @__PURE__ */ i(
|
|
12
|
+
"input",
|
|
13
|
+
{
|
|
14
|
+
id: t.name,
|
|
15
|
+
type: "text",
|
|
16
|
+
className: m(e.input, r(s), c),
|
|
17
|
+
...t
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
f as Input
|
|
24
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Input } from './Input';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Input;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithHideAt: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Input as e } from "./Input.js";
|
|
2
|
+
const a = {
|
|
3
|
+
title: "Case Parts/Atoms/Input",
|
|
4
|
+
component: e,
|
|
5
|
+
parameters: {
|
|
6
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
7
|
+
layout: "centered"
|
|
8
|
+
},
|
|
9
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
10
|
+
tags: ["autodocs"]
|
|
11
|
+
}, l = {
|
|
12
|
+
args: {
|
|
13
|
+
label: "Label",
|
|
14
|
+
placeholder: "Type here..."
|
|
15
|
+
}
|
|
16
|
+
}, o = {
|
|
17
|
+
args: {
|
|
18
|
+
label: "Label",
|
|
19
|
+
placeholder: "Hidden at md",
|
|
20
|
+
hideAt: "md"
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
l as Default,
|
|
25
|
+
o as WithHideAt,
|
|
26
|
+
a as default
|
|
27
|
+
};
|
package/dist/main.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export { Separator } from './atoms/Separator/Separator';
|
|
|
13
13
|
export type { SeparatorProps } from './atoms/Separator/Separator';
|
|
14
14
|
export { Text } from './atoms/Text/Text';
|
|
15
15
|
export type { TextProps } from './atoms/Text/Text';
|
|
16
|
+
export { Input } from './atoms/Input/Input';
|
|
17
|
+
export type { InputProps } from './atoms/Input/Input';
|
|
16
18
|
export { Account } from './molecules/Account/Account';
|
|
17
19
|
export type { AccountProps } from './molecules/Account/Account';
|
|
18
20
|
export { Avatar } from './molecules/Avatar/Avatar';
|
package/dist/main.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import { Button as e } from "./atoms/Button/Button.js";
|
|
2
2
|
import { Flex as p } from "./atoms/Flex/Flex.js";
|
|
3
3
|
import { Column as m, Grid as f } from "./atoms/Grid/Grid.js";
|
|
4
|
-
import { Head as
|
|
4
|
+
import { Head as n } from "./atoms/Root/Head.js";
|
|
5
5
|
import { Icon as c } from "./atoms/Icon/Icon.js";
|
|
6
|
-
import { Link as
|
|
7
|
-
import { Root as
|
|
6
|
+
import { Link as u } from "./atoms/Link/Link.js";
|
|
7
|
+
import { Root as h } from "./atoms/Root/Root.js";
|
|
8
8
|
import { Separator as S } from "./atoms/Separator/Separator.js";
|
|
9
9
|
import { Text as v } from "./atoms/Text/Text.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { Input as B } from "./atoms/Input/Input.js";
|
|
11
|
+
import { Account as L } from "./molecules/Account/Account.js";
|
|
12
|
+
import { Avatar as k } from "./molecules/Avatar/Avatar.js";
|
|
13
|
+
import { Chip as F } from "./molecules/Chip/Chip.js";
|
|
14
|
+
import { Logo as H } from "./molecules/Logo/Logo.js";
|
|
15
|
+
import { SearchBox as N } from "./molecules/SearchBox/SearchBox.js";
|
|
16
|
+
import { ToggleView as V } from "./molecules/ToggleView/ToggleView.js";
|
|
17
|
+
import { MainNav as j } from "./organisms/MainNav/MainNav.js";
|
|
18
|
+
import { ChipSelector as s } from "./organisms/ChipSelector/ChipSelector.js";
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
L as Account,
|
|
21
|
+
k as Avatar,
|
|
21
22
|
e as Button,
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
F as Chip,
|
|
24
|
+
s as ChipSelector,
|
|
24
25
|
m as Column,
|
|
25
26
|
p as Flex,
|
|
26
27
|
f as Grid,
|
|
27
|
-
|
|
28
|
+
n as Head,
|
|
28
29
|
c as Icon,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
B as Input,
|
|
31
|
+
u as Link,
|
|
32
|
+
H as Logo,
|
|
33
|
+
j as MainNav,
|
|
34
|
+
h as Root,
|
|
35
|
+
N as SearchBox,
|
|
34
36
|
S as Separator,
|
|
35
37
|
v as Text,
|
|
36
|
-
|
|
38
|
+
V as ToggleView
|
|
37
39
|
};
|