@fluidattacks/design 1.2.16 → 1.2.17
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 +133 -131
- package/dist/design.mjs +6747 -6742
- package/dist/src/components/accordion/accordion-content/index.d.ts +3 -0
- package/dist/src/components/accordion/accordion-content/types.d.ts +15 -0
- package/dist/src/components/accordion/platform/index.stories.d.ts +6 -0
- package/dist/src/components/accordion/types.d.ts +3 -4
- package/dist/src/components/accordion/utils.d.ts +14 -6
- package/dist/src/components/language-selector/index.stories.d.ts +2 -1
- package/dist/src/components/search-bar/styles.d.ts +6 -0
- package/dist/src/components/search-bar/types.d.ts +14 -0
- package/package.json +2 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IAccordionItemProps, TVariant } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Accordion Content props
|
|
4
|
+
* @property {boolean} [isSelectedAndOpen] If item in accordion is selected and open.
|
|
5
|
+
* @property {IAccordionItemProps} [item] Accordion item.
|
|
6
|
+
* @property {TVariant} [variant] Type of accordion.
|
|
7
|
+
* @property {boolean} [render] Render condition.
|
|
8
|
+
*/
|
|
9
|
+
interface IAccordionContentProps {
|
|
10
|
+
isSelectedAndOpen: boolean;
|
|
11
|
+
item: IAccordionItemProps;
|
|
12
|
+
variant: TVariant;
|
|
13
|
+
render: boolean;
|
|
14
|
+
}
|
|
15
|
+
export type { IAccordionContentProps };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { IAccordionProps } from '../types';
|
|
3
|
+
declare const config: Meta;
|
|
4
|
+
declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, IAccordionProps>;
|
|
5
|
+
export { Default };
|
|
6
|
+
export default config;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { ICloudImageProps } from '../cloud-image';
|
|
2
1
|
type TVariant = "progress" | "simple" | "platform";
|
|
3
2
|
type TAligned = "end" | "start";
|
|
4
3
|
/**
|
|
5
4
|
* Accordion item props
|
|
6
5
|
* @property {string} [title] Accordion title.
|
|
7
6
|
* @property {string} [description] Accordion description.
|
|
8
|
-
* @property {
|
|
7
|
+
* @property {JSX.Element} [extraElement] Accordion extra components.
|
|
9
8
|
*/
|
|
10
9
|
interface IAccordionItemProps {
|
|
11
10
|
title: string;
|
|
12
|
-
description
|
|
13
|
-
|
|
11
|
+
description?: string;
|
|
12
|
+
extraElement?: JSX.Element;
|
|
14
13
|
}
|
|
15
14
|
/**
|
|
16
15
|
* Pass more than 1 item to activate progress variant
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { IconName } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
3
|
import { SetStateAction } from 'react';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
4
|
+
import { TAligned, TVariant } from './types';
|
|
5
|
+
import { TSpacing } from '../@core';
|
|
6
|
+
declare const getItemBorderBottom: (index: number, isSelectedAndOpen: boolean, totalItems: number, variant: TVariant) => string | undefined;
|
|
7
|
+
declare const getItemBorderTop: (isSelectedAndOpen: boolean, variant: TVariant) => string | undefined;
|
|
8
|
+
declare const getIcon: (isSelectedAndOpen: boolean, variant: TVariant) => IconName;
|
|
9
|
+
declare const getContentDisplay: (isSelectedAndOpen: boolean) => Property.Display;
|
|
9
10
|
declare const handleContentVisibility: (index: number, currentItem: number, setIsOpen: (value: SetStateAction<boolean>) => void) => void;
|
|
11
|
+
declare const getTitlePadding: (variant: TVariant) => [TSpacing, TSpacing, TSpacing, TSpacing];
|
|
12
|
+
declare const getContentPadding: (variant: TVariant) => [TSpacing, TSpacing, TSpacing, TSpacing] | undefined;
|
|
13
|
+
declare const getHoverBgColor: (variant: TVariant) => string | undefined;
|
|
14
|
+
declare const getBorderColor: (variant: TVariant) => string;
|
|
15
|
+
declare const getIconColor: (variant: TVariant) => string;
|
|
16
|
+
declare const getFlexDirection: (aligned: TAligned) => Property.FlexDirection;
|
|
17
|
+
declare const getFontSize: (variant: TVariant) => Property.FontSize;
|
|
10
18
|
declare const getDelay: (progressTime: number) => number;
|
|
11
19
|
declare const sleep: (seconds: number) => Promise<PromiseConstructor>;
|
|
12
|
-
export { getItemBorderBottom, getItemBorderTop, getContentDisplay,
|
|
20
|
+
export { getItemBorderBottom, getItemBorderTop, getBorderColor, getContentDisplay, getDelay, getFlexDirection, getFontSize, getHoverBgColor, getIconColor, getTitlePadding, getContentPadding, getIcon, handleContentVisibility, sleep, };
|
|
@@ -2,6 +2,7 @@ import { Meta } from '@storybook/react';
|
|
|
2
2
|
import { ILangSelectorProps } from './types';
|
|
3
3
|
declare const config: Meta;
|
|
4
4
|
declare const Default: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
|
|
5
|
+
declare const FullLanguage: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
|
|
5
6
|
declare const DarkMode: import('@storybook/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, ILangSelectorProps>;
|
|
6
|
-
export { Default, DarkMode };
|
|
7
|
+
export { Default, FullLanguage, DarkMode };
|
|
7
8
|
export default config;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IItemSearchingProps } from './types';
|
|
2
|
+
interface IItemProps {
|
|
3
|
+
$size: IItemSearchingProps["size"];
|
|
4
|
+
}
|
|
5
|
+
declare const StyledItemSearching: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, IItemProps>> & string;
|
|
6
|
+
export { StyledItemSearching };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IIconModifiable } from '../@core';
|
|
2
|
+
type TSize = "lg" | "md" | "sm" | "xs";
|
|
3
|
+
/**
|
|
4
|
+
* Item searching component props.
|
|
5
|
+
* @property {IconName} [icon] Icon to show with item.
|
|
6
|
+
* @property {boolean} [showIcon] True if the item includes an icon.
|
|
7
|
+
* @property {TSize} size The item size according to window resolution.
|
|
8
|
+
*/
|
|
9
|
+
interface IItemSearchingProps {
|
|
10
|
+
icon?: IIconModifiable["icon"];
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
size: TSize;
|
|
13
|
+
}
|
|
14
|
+
export type { IItemSearchingProps };
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@storybook/addon-essentials": "8.3.5",
|
|
20
20
|
"@storybook/addon-interactions": "8.3.5",
|
|
21
21
|
"@storybook/addon-links": "8.3.5",
|
|
22
|
+
"@storybook/addon-viewport": "8.3.5",
|
|
22
23
|
"@storybook/blocks": "8.3.5",
|
|
23
24
|
"@storybook/react": "8.3.5",
|
|
24
25
|
"@storybook/react-vite": "8.3.5",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"preview": "vite preview",
|
|
79
80
|
"storybook": "storybook dev"
|
|
80
81
|
},
|
|
81
|
-
"version": "1.2.
|
|
82
|
+
"version": "1.2.17",
|
|
82
83
|
"eslintConfig": {
|
|
83
84
|
"extends": [
|
|
84
85
|
"plugin:storybook/recommended"
|