@uob-web-and-digital/component-library 0.0.75 → 0.0.76
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/molecules/Tab/Tab.d.ts +16 -1
- package/dist/components/organisms/TabsBlock/TabsBlock.d.ts +12 -1
- package/dist/components/organisms/TabsBlock/TabsBlock.stories.d.ts +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/main.js +4 -4
- package/dist/module.js +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,21 @@ export interface TabProps {
|
|
|
22
22
|
* Is the tab active
|
|
23
23
|
*/
|
|
24
24
|
isActive: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Does the tab have the focus state
|
|
27
|
+
*/
|
|
28
|
+
hasFocus: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* if enabled this will add a hash value to the URL to aid navigation and linking
|
|
31
|
+
* e.g. if you name the block modules and each tab is name term-[1,2,3] etc
|
|
32
|
+
* a hash of '#modules-term-1' will be added to the URL when the user clicks a tab or
|
|
33
|
+
* navigates a tab using the keyboard
|
|
34
|
+
*/
|
|
35
|
+
enableHashNavigation?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* If used, the name of the parent tabs block
|
|
38
|
+
*/
|
|
39
|
+
tabsBlockName?: string;
|
|
25
40
|
/**
|
|
26
41
|
* The ref for the top of the tab list
|
|
27
42
|
*/
|
|
@@ -35,4 +50,4 @@ export interface TabProps {
|
|
|
35
50
|
*/
|
|
36
51
|
handleKeyboardNavigation: (e: KeyboardEvent) => void;
|
|
37
52
|
}
|
|
38
|
-
export default function Tab({ id, theme, inverse, tabItem, isActive, handleClick, handleKeyboardNavigation: handleKeyboardNavigation }: TabProps): ReactElement | null;
|
|
53
|
+
export default function Tab({ id, theme, inverse, tabItem, isActive, hasFocus, tabsBlockName, handleClick, handleKeyboardNavigation: handleKeyboardNavigation }: TabProps): ReactElement | null;
|
|
@@ -37,5 +37,16 @@ export interface TabsBlockProps {
|
|
|
37
37
|
* use CSS rules instead of these spacing props
|
|
38
38
|
*/
|
|
39
39
|
removeBottomPadding?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* a unique name to help identify the tab block on a page with multiple tab blocks
|
|
42
|
+
*/
|
|
43
|
+
name?: string;
|
|
44
|
+
/**
|
|
45
|
+
* if enabled this will add a hash value to the URL to aid navigation and linking
|
|
46
|
+
* e.g. if you name the block modules and each tab is name term-[1,2,3] etc
|
|
47
|
+
* a hash of '#modules-term-1' will be added to the URL when the user clicks a tab or
|
|
48
|
+
* navigates a tab using the keyboard
|
|
49
|
+
*/
|
|
50
|
+
enableHashNavigation?: boolean;
|
|
40
51
|
}
|
|
41
|
-
export default function TabsBlock({ theme, inverse, title, description, tabItems, fullWidth, htmlTag, removeBottomPadding }: TabsBlockProps): ReactElement | null;
|
|
52
|
+
export default function TabsBlock({ theme, inverse, title, description, tabItems, fullWidth, htmlTag, removeBottomPadding, name, enableHashNavigation }: TabsBlockProps): ReactElement | null;
|
|
@@ -15,6 +15,7 @@ export default meta;
|
|
|
15
15
|
type Story = StoryObj<typeof TabsBlock>;
|
|
16
16
|
export declare const Default: Story;
|
|
17
17
|
export declare const LightOrInverse: Story;
|
|
18
|
+
export declare const WithHashNavigation: Story;
|
|
18
19
|
export declare const WithoutHeadingOrDescription: Story;
|
|
19
20
|
export declare const WithoutDescription: Story;
|
|
20
21
|
export declare const OneButton: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -1384,8 +1384,19 @@ interface TabsBlockProps {
|
|
|
1384
1384
|
* use CSS rules instead of these spacing props
|
|
1385
1385
|
*/
|
|
1386
1386
|
removeBottomPadding?: boolean;
|
|
1387
|
+
/**
|
|
1388
|
+
* a unique name to help identify the tab block on a page with multiple tab blocks
|
|
1389
|
+
*/
|
|
1390
|
+
name?: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* if enabled this will add a hash value to the URL to aid navigation and linking
|
|
1393
|
+
* e.g. if you name the block modules and each tab is name term-[1,2,3] etc
|
|
1394
|
+
* a hash of '#modules-term-1' will be added to the URL when the user clicks a tab or
|
|
1395
|
+
* navigates a tab using the keyboard
|
|
1396
|
+
*/
|
|
1397
|
+
enableHashNavigation?: boolean;
|
|
1387
1398
|
}
|
|
1388
|
-
declare function TabsBlock({ theme, inverse, title, description, tabItems, fullWidth, htmlTag, removeBottomPadding }: TabsBlockProps): ReactElement | null;
|
|
1399
|
+
declare function TabsBlock({ theme, inverse, title, description, tabItems, fullWidth, htmlTag, removeBottomPadding, name, enableHashNavigation }: TabsBlockProps): ReactElement | null;
|
|
1389
1400
|
|
|
1390
1401
|
interface TextWithBackgroundProps {
|
|
1391
1402
|
/**
|