@fluidattacks/design 1.2.8-pr → 1.2.9
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/design.js +236 -135
- package/dist/design.mjs +6926 -6762
- package/dist/src/components/@core/styles.d.ts +2 -1
- package/dist/src/components/@core/types.d.ts +1 -1
- package/dist/src/components/@core/variants/utils.d.ts +4 -5
- package/dist/src/components/button/index.d.ts +4 -0
- package/dist/src/components/button/index.stories.d.ts +10 -0
- package/dist/src/components/button/styles.d.ts +13 -0
- package/dist/src/components/button/types.d.ts +29 -0
- package/dist/src/components/container/types.d.ts +1 -1
- package/dist/src/components/logo/types.d.ts +1 -1
- package/dist/src/components/tooltip/types.d.ts +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/package.json +4 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TModifiable } from './types';
|
|
2
2
|
declare const BaseComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, TModifiable>> & string;
|
|
3
|
+
declare const BaseButtonComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, TModifiable>> & string;
|
|
3
4
|
declare const BaseTextComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, TModifiable>> & string;
|
|
4
5
|
declare const BaseSpanComponent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, TModifiable>> & string;
|
|
5
|
-
export { BaseComponent, BaseTextComponent, BaseSpanComponent };
|
|
6
|
+
export { BaseComponent, BaseButtonComponent, BaseTextComponent, BaseSpanComponent, };
|
|
@@ -82,7 +82,7 @@ interface DefaultTheme {
|
|
|
82
82
|
}
|
|
83
83
|
type TSpacing = keyof DefaultTheme["spacing"];
|
|
84
84
|
type TShadows = keyof DefaultTheme["shadows"];
|
|
85
|
-
type TIconSize = "xl" | "lg" | "md" | "sm" | "xs";
|
|
85
|
+
type TIconSize = "xl" | "lg" | "md" | "sm" | "xs" | "xxs";
|
|
86
86
|
interface IPaddingModifiable {
|
|
87
87
|
padding?: [TSpacing, TSpacing, TSpacing, TSpacing];
|
|
88
88
|
px?: TSpacing;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IconPrefix } from '@fortawesome/free-solid-svg-icons';
|
|
2
|
-
import { DefaultTheme
|
|
3
|
-
type TCssString = Interpolation<object>[];
|
|
2
|
+
import { DefaultTheme } from 'styled-components';
|
|
4
3
|
/**
|
|
5
4
|
* Object with the icons to be printed on Iconography section.
|
|
6
5
|
* The key is the name of the icon and the value is an array of icon prefixes.
|
|
@@ -27,7 +26,7 @@ interface IComponentVariant<T extends string> {
|
|
|
27
26
|
* @param variant Variant to get
|
|
28
27
|
* @returns Css string for the variant
|
|
29
28
|
*/
|
|
30
|
-
getVariant: (theme: Readonly<DefaultTheme>, variant: T) =>
|
|
29
|
+
getVariant: (theme: Readonly<DefaultTheme>, variant: T) => string;
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
33
32
|
* Builder function to create a function for getting component variants
|
|
@@ -55,6 +54,6 @@ interface IComponentVariant<T extends string> {
|
|
|
55
54
|
* an object with variants as keys and values as css strings.
|
|
56
55
|
* @returns An object with a function to get the variant.
|
|
57
56
|
*/
|
|
58
|
-
declare const variantBuilder: <T extends string>(variants: (theme: Readonly<DefaultTheme>) => Record<T,
|
|
59
|
-
export type {
|
|
57
|
+
declare const variantBuilder: <T extends string>(variants: (theme: Readonly<DefaultTheme>) => Record<T, string>) => IComponentVariant<T>;
|
|
58
|
+
export type { IComponentVariant, TIconsList };
|
|
60
59
|
export { variantBuilder };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { IButtonProps } from '.';
|
|
4
|
+
declare const config: Meta;
|
|
5
|
+
declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
|
|
6
|
+
declare const Secondary: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
|
|
7
|
+
declare const SecondaryDark: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
|
|
8
|
+
declare const Ghost: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, PropsWithChildren<IButtonProps>>;
|
|
9
|
+
export { Default, Secondary, SecondaryDark, Ghost };
|
|
10
|
+
export default config;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TType, TVariant } from './types';
|
|
2
|
+
interface IStyledButtonProps {
|
|
3
|
+
$resolution?: TType;
|
|
4
|
+
$variant?: TVariant;
|
|
5
|
+
}
|
|
6
|
+
declare const StyledWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('styled-components').FastOmit<import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
+
}>, never>, Partial<IStyledButtonProps>>> & string;
|
|
9
|
+
declare const StyledButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<Omit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, keyof import('../@core').IPaddingModifiable | keyof import('../@core').IMarginModifiable | keyof import('../@core').IPositionModifiable | keyof import('../@core').IBorderModifiable | keyof import('../@core').IDisplayModifiable | keyof import('../@core').ITextModifiable | keyof import('../@core').IInteractionModifiable> & import('../@core').IBorderModifiable & import('../@core').IDisplayModifiable & import('../@core').IInteractionModifiable & import('../@core').IMarginModifiable & import('../@core').IPaddingModifiable & import('../@core').IPositionModifiable & import('../@core').ITextModifiable, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import('react').RefObject<HTMLButtonElement> | null | undefined;
|
|
11
|
+
}, IStyledButtonProps>> & string;
|
|
12
|
+
export type { IStyledButtonProps, TVariant };
|
|
13
|
+
export { StyledButton, StyledWrapper };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import { IBorderModifiable, IDisplayModifiable, IIconModifiable, IMarginModifiable, IPaddingModifiable } from '../@core';
|
|
3
|
+
import { TPlace } from '../tooltip/types';
|
|
4
|
+
type TMode = "dark" | "light";
|
|
5
|
+
type TType = "desktop" | "mobile";
|
|
6
|
+
type TVariant = "primaryWeb" | "secondaryWeb" | "ghost";
|
|
7
|
+
/**
|
|
8
|
+
* Button component props.
|
|
9
|
+
* @extends IBorderModifiable
|
|
10
|
+
* @extends IDisplayModifiable
|
|
11
|
+
* @extends IMarginModifiable
|
|
12
|
+
* @extends IPaddingModifiable
|
|
13
|
+
* @extends IIconModifiable
|
|
14
|
+
* @extends ButtonHTMLAttributes<HTMLButtonElement>
|
|
15
|
+
* @property {TMode} [mode] The background theme: dark or light.
|
|
16
|
+
* @property {TType} [resolution] The page resolution: desktop or mobile.
|
|
17
|
+
* @property {string} [tooltip] Tooltip message.
|
|
18
|
+
* @property {TPlace} [tooltipPlace] Tooltip message relative place.
|
|
19
|
+
* @property {TVariant} [variant] The button variant type.
|
|
20
|
+
*/
|
|
21
|
+
interface IButtonProps extends IBorderModifiable, IDisplayModifiable, IMarginModifiable, IPaddingModifiable, Partial<IIconModifiable>, ButtonHTMLAttributes<HTMLButtonElement> {
|
|
22
|
+
mode?: TMode;
|
|
23
|
+
resolution?: TType;
|
|
24
|
+
showArrow?: boolean;
|
|
25
|
+
tooltip?: string;
|
|
26
|
+
tooltipPlace?: TPlace;
|
|
27
|
+
variant?: TVariant;
|
|
28
|
+
}
|
|
29
|
+
export type { IButtonProps, TMode, TType, TVariant };
|
|
@@ -15,7 +15,7 @@ type TEffect = "float" | "solid";
|
|
|
15
15
|
* @property {string} [tip] The tooltip content, only as string.
|
|
16
16
|
* @property {title} [title] The tooltip title.
|
|
17
17
|
*/
|
|
18
|
-
interface ITooltipProps extends IIconModifiable
|
|
18
|
+
interface ITooltipProps extends Partial<IIconModifiable>, Pick<IDisplayModifiable, "display" | "height" | "maxWidth" | "width"> {
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
effect?: TEffect;
|
|
21
21
|
hide?: boolean;
|
package/dist/src/index.d.ts
CHANGED
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.relative{position:relative}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.max-w-min{max-width:-moz-min-content;max-width:min-content}.flex-grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-wrap{flex-wrap:wrap}.border{border-width:1px}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.p-4{padding:1rem}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@property --animate-position{syntax: "<angle>"; initial-value: 45deg; inherits: false;}@property --border-angle{syntax: "<angle>"; initial-value: 0deg; inherits: false;}@property --color-1{syntax: "<color>"; initial-value: #f32637; inherits: false;}@property --color-2{syntax: "<color>"; initial-value: #b8075d; inherits: false;}@property --btn-padding{syntax: "<custom-ident>"; initial-value: 16px; inherits: false;}@keyframes spinAnimation{to{--border-angle: 360deg}}@keyframes gradientAnimation{0%{--animate-position: 45deg}33%{--animate-position: -50deg}66%{--animate-position: -100deg}to{--animate-position: 45deg}}
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@types/react": "18.2.0",
|
|
27
27
|
"@types/react-dom": "18.2.0",
|
|
28
28
|
"@vitejs/plugin-react-swc": "3.7.1",
|
|
29
|
+
"autoprefixer": "10.4.20",
|
|
29
30
|
"eslint": "9.12.0",
|
|
30
31
|
"eslint-config-prettier": "9.1.0",
|
|
31
32
|
"eslint-import-resolver-typescript": "3.6.3",
|
|
@@ -36,11 +37,13 @@
|
|
|
36
37
|
"eslint-plugin-prettier": "5.2.1",
|
|
37
38
|
"eslint-plugin-project-structure": "3.0.1",
|
|
38
39
|
"eslint-plugin-react": "7.37.0",
|
|
40
|
+
"postcss": "8.4.47",
|
|
39
41
|
"postcss-styled-syntax": "0.6.4",
|
|
40
42
|
"remark-gfm": "4.0.0",
|
|
41
43
|
"storybook": "8.3.5",
|
|
42
44
|
"stylelint": "16.9.0",
|
|
43
45
|
"stylelint-config-standard": "36.0.1",
|
|
46
|
+
"tailwindcss": "3.4.13",
|
|
44
47
|
"typescript": "5.6.2",
|
|
45
48
|
"typescript-eslint": "8.8.0",
|
|
46
49
|
"vite": "5.4.8",
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
"preview": "vite preview",
|
|
75
78
|
"storybook": "storybook dev"
|
|
76
79
|
},
|
|
77
|
-
"version": "1.2.
|
|
80
|
+
"version": "1.2.9",
|
|
78
81
|
"eslintConfig": {
|
|
79
82
|
"extends": [
|
|
80
83
|
"plugin:storybook/recommended"
|