dfh-ui-library 1.0.1 → 1.0.2
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/cjs/index.js +0 -1
- package/dist/esm/index.js +0 -1
- package/package.json +1 -1
- package/dist/cjs/assets/output-N6vATm4l.css +0 -3
- package/dist/cjs/types/components/Button/Button.stories.d.ts +0 -11
- package/dist/cjs/types/components/Typhography/Typhography.stories.d.ts +0 -9
- package/dist/cjs/types/stories/Button.d.ts +0 -29
- package/dist/cjs/types/stories/Button.stories.d.ts +0 -8
- package/dist/cjs/types/stories/Header.d.ts +0 -13
- package/dist/cjs/types/stories/Header.stories.d.ts +0 -6
- package/dist/cjs/types/stories/Page.d.ts +0 -3
- package/dist/cjs/types/stories/Page.stories.d.ts +0 -13
- package/dist/esm/assets/output-N6vATm4l.css +0 -3
- package/dist/esm/types/components/Button/Button.stories.d.ts +0 -11
- package/dist/esm/types/components/Typhography/Typhography.stories.d.ts +0 -9
- package/dist/esm/types/stories/Button.d.ts +0 -29
- package/dist/esm/types/stories/Button.stories.d.ts +0 -8
- package/dist/esm/types/stories/Header.d.ts +0 -13
- package/dist/esm/types/stories/Header.stories.d.ts +0 -6
- package/dist/esm/types/stories/Page.d.ts +0 -3
- package/dist/esm/types/stories/Page.stories.d.ts +0 -13
package/dist/cjs/index.js
CHANGED
|
@@ -13,4 +13,3 @@
|
|
|
13
13
|
Licensed under the MIT License (MIT), see
|
|
14
14
|
http://jedwatson.github.io/classnames
|
|
15
15
|
*/l=f,function(){var e={}.hasOwnProperty;function t(){for(var r=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)r.push(o);else if(Array.isArray(o)){if(o.length){var u=t.apply(null,o);u&&r.push(u)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var i in o)e.call(o,i)&&o[i]&&r.push(i)}}}return r.join(" ")}l.exports?(t.default=t,l.exports=t):window.classNames=t}();var p=e(f.exports);"function"==typeof SuppressedError&&SuppressedError;exports.Button=({type:e="button",isDisabled:t=!1,buttonLabel:r,iconType:n,iconColor:o,iconAlignment:a="left",isIconEnabled:i,variants:s="default",additionalClasses:l,iconClass:f,onClick:d})=>{const y=t?"opacity-[0.38] pointer-events-none":"opacity-100",m=["flex rounded-lg justify-center items-center px-2",c(s),l,y];return u.createElement("button",{type:e,disabled:t,className:p(m),onClick:d},"left"===a&&i&&u.createElement("span",{className:`${o||"text-inherit"} ${f||"mr-2"}`}),r,"right"===a&&i&&u.createElement("span",{className:`${o||"text-inherit"} ${f||"ml-2 "}`}))},exports.Typhography=e=>{var{type:t,component:r="span",color:n,additionalClasses:o,children:a,onClick:i}=e,s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["type","component","color","additionalClasses","children","onClick"]);const c=(e=>{switch(e){case"h1":return"text-12s font-medium";case"h1Bold":return"text-12s font-semibold";case"h1ExtraBold":return"text-12s font-extrabold";case"h2":return"text-14s font-medium";case"h2Bold":return"text-14s font-semibold";case"h2ExtraBold":return"text-14s font-extrabold";case"h6":return"text-28s font-medium";case"h6Bold":return"text-28s font-semibold";case"h6ExtraBold":return"text-28s font-extrabold";case"h10":return"text-10s font-medium";case"h10Bold":return"text-10s font-semibold";case"h10ExtraBold":return"text-10s font-extrabold"}})(t)+" "+o+" "+n;return u.createElement(u.Fragment,null,"p"===r?u.createElement("p",Object.assign({className:c},s,{onClick:i}),a):"span"===r?u.createElement("span",Object.assign({className:c},s,{onClick:i}),a):"em"===r?u.createElement("em",Object.assign({className:c},s,{onClick:i}),a):"div"===r?u.createElement("div",Object.assign({className:c},s,{onClick:i}),a):u.createElement("div",Object.assign({className:o},s,{onClick:i}),a))};
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -13,4 +13,3 @@ function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"de
|
|
|
13
13
|
Licensed under the MIT License (MIT), see
|
|
14
14
|
http://jedwatson.github.io/classnames
|
|
15
15
|
*/!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)){if(o.length){var u=r.apply(null,o);u&&e.push(u)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var i in o)t.call(o,i)&&o[i]&&e.push(i)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(p);var d=e(p.exports);const y=({type:e="button",isDisabled:t=!1,buttonLabel:r,iconType:n,iconColor:o,iconAlignment:a="left",isIconEnabled:u,variants:i="default",additionalClasses:c,iconClass:l,onClick:p})=>{const y=t?"opacity-[0.38] pointer-events-none":"opacity-100",m=["flex rounded-lg justify-center items-center px-2",f(i),c,y];return s.createElement("button",{type:e,disabled:t,className:d(m),onClick:p},"left"===a&&u&&s.createElement("span",{className:`${o||"text-inherit"} ${l||"mr-2"}`}),r,"right"===a&&u&&s.createElement("span",{className:`${o||"text-inherit"} ${l||"ml-2 "}`}))};"function"==typeof SuppressedError&&SuppressedError;const m=e=>{var{type:t,component:r="span",color:n,additionalClasses:o,children:a,onClick:u}=e,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["type","component","color","additionalClasses","children","onClick"]);const c=(e=>{switch(e){case"h1":return"text-12s font-medium";case"h1Bold":return"text-12s font-semibold";case"h1ExtraBold":return"text-12s font-extrabold";case"h2":return"text-14s font-medium";case"h2Bold":return"text-14s font-semibold";case"h2ExtraBold":return"text-14s font-extrabold";case"h6":return"text-28s font-medium";case"h6Bold":return"text-28s font-semibold";case"h6ExtraBold":return"text-28s font-extrabold";case"h10":return"text-10s font-medium";case"h10Bold":return"text-10s font-semibold";case"h10ExtraBold":return"text-10s font-extrabold"}})(t)+" "+o+" "+n;return s.createElement(s.Fragment,null,"p"===r?s.createElement("p",Object.assign({className:c},i,{onClick:u}),a):"span"===r?s.createElement("span",Object.assign({className:c},i,{onClick:u}),a):"em"===r?s.createElement("em",Object.assign({className:c},i,{onClick:u}),a):"div"===r?s.createElement("div",Object.assign({className:c},i,{onClick:u}),a):s.createElement("div",Object.assign({className:o},i,{onClick:u}),a))};export{y as Button,m as Typhography};
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Button from "./Button";
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Button>;
|
|
6
|
-
export declare const Primary: Story;
|
|
7
|
-
export declare const Secondary: Story;
|
|
8
|
-
export declare const Disabled: Story;
|
|
9
|
-
export declare const Small: Story;
|
|
10
|
-
export declare const Medium: Story;
|
|
11
|
-
export declare const Large: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Typhography from "./Typhography";
|
|
3
|
-
declare const meta: Meta<typeof Typhography>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Typhography>;
|
|
6
|
-
export declare const H1: Story;
|
|
7
|
-
export declare const H1Bold: Story;
|
|
8
|
-
export declare const H1ExtraBold: Story;
|
|
9
|
-
export declare const H10: Story;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './button.css';
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Is this the principal call to action on the page?
|
|
6
|
-
*/
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* What background color to use
|
|
10
|
-
*/
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
/**
|
|
13
|
-
* How large should the button be?
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/**
|
|
17
|
-
* Button contents
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional click handler
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Primary UI component for user interaction
|
|
27
|
-
*/
|
|
28
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => React.JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
declare const meta: any;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj<typeof meta>;
|
|
5
|
-
export declare const Primary: Story;
|
|
6
|
-
export declare const Secondary: Story;
|
|
7
|
-
export declare const Large: Story;
|
|
8
|
-
export declare const Small: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './header.css';
|
|
3
|
-
type User = {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
interface HeaderProps {
|
|
7
|
-
user?: User;
|
|
8
|
-
onLogin: () => void;
|
|
9
|
-
onLogout: () => void;
|
|
10
|
-
onCreateAccount: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import("react").FC<{}>;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const LoggedOut: Story;
|
|
13
|
-
export declare const LoggedIn: Story;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Button from "./Button";
|
|
3
|
-
declare const meta: Meta<typeof Button>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Button>;
|
|
6
|
-
export declare const Primary: Story;
|
|
7
|
-
export declare const Secondary: Story;
|
|
8
|
-
export declare const Disabled: Story;
|
|
9
|
-
export declare const Small: Story;
|
|
10
|
-
export declare const Medium: Story;
|
|
11
|
-
export declare const Large: Story;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import Typhography from "./Typhography";
|
|
3
|
-
declare const meta: Meta<typeof Typhography>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof Typhography>;
|
|
6
|
-
export declare const H1: Story;
|
|
7
|
-
export declare const H1Bold: Story;
|
|
8
|
-
export declare const H1ExtraBold: Story;
|
|
9
|
-
export declare const H10: Story;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './button.css';
|
|
3
|
-
interface ButtonProps {
|
|
4
|
-
/**
|
|
5
|
-
* Is this the principal call to action on the page?
|
|
6
|
-
*/
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* What background color to use
|
|
10
|
-
*/
|
|
11
|
-
backgroundColor?: string;
|
|
12
|
-
/**
|
|
13
|
-
* How large should the button be?
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'medium' | 'large';
|
|
16
|
-
/**
|
|
17
|
-
* Button contents
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Optional click handler
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Primary UI component for user interaction
|
|
27
|
-
*/
|
|
28
|
-
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => React.JSX.Element;
|
|
29
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from "@storybook/react";
|
|
2
|
-
declare const meta: any;
|
|
3
|
-
export default meta;
|
|
4
|
-
type Story = StoryObj<typeof meta>;
|
|
5
|
-
export declare const Primary: Story;
|
|
6
|
-
export declare const Secondary: Story;
|
|
7
|
-
export declare const Large: Story;
|
|
8
|
-
export declare const Small: Story;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './header.css';
|
|
3
|
-
type User = {
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
interface HeaderProps {
|
|
7
|
-
user?: User;
|
|
8
|
-
onLogin: () => void;
|
|
9
|
-
onLogout: () => void;
|
|
10
|
-
onCreateAccount: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => React.JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { StoryObj } from '@storybook/react';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: import("react").FC<{}>;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const LoggedOut: Story;
|
|
13
|
-
export declare const LoggedIn: Story;
|