@westpac/ui 0.16.0 → 0.18.0
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/CHANGELOG.md +12 -0
- package/dist/component-type.json +1 -1
- package/dist/components/accordion/accordion.component.d.ts +2 -1
- package/dist/components/autocomplete/autocomplete.component.js +4 -2
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.d.ts +1 -1
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.js +1 -1
- package/dist/components/autocomplete/components/autocomplete-popover/autocomplete-popover.component.js +2 -1
- package/dist/components/badge/badge.component.js +3 -1
- package/dist/components/badge/badge.styles.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.component.d.ts +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.component.js +7 -2
- package/dist/components/bottom-sheet/bottom-sheet.types.d.ts +20 -0
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.component.d.ts +1 -1
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.component.js +26 -11
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.styles.d.ts +47 -0
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.styles.js +20 -0
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.types.d.ts +17 -1
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.component.d.ts +1 -1
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.component.js +8 -14
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.d.ts +11 -0
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.js +17 -0
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.types.d.ts +0 -5
- package/dist/components/button-group/button-group.component.js +58 -11
- package/dist/components/button-group/button-group.types.d.ts +9 -1
- package/dist/components/button-group/components/button-group-button/button-group-button.component.js +1 -2
- package/dist/components/checkbox-group/checkbox-group.component.js +61 -10
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +5 -1
- package/dist/components/checkbox-group/components/checkbox-group-checkbox/checkbox-group-checkbox.component.js +1 -2
- package/dist/components/date-picker/date-picker.types.d.ts +1 -0
- package/dist/components/error-message/error-message.types.d.ts +3 -2
- package/dist/components/icon/components/x-icon.d.ts +2 -0
- package/dist/components/icon/components/x-icon.js +40 -0
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/list/components/list-item/list-item.component.d.ts +1 -1
- package/dist/components/list/list.utils.d.ts +1 -1
- package/dist/components/modal/components/modal-backdrop/modal-backdrop.component.js +4 -2
- package/dist/components/modal/components/modal-backdrop/modal-backdrop.styles.d.ts +10 -0
- package/dist/components/modal/components/modal-backdrop/modal-backdrop.styles.js +7 -2
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.component.js +7 -2
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.styles.d.ts +43 -5
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.styles.js +30 -1
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.component.d.ts +1 -1
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.component.js +21 -4
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.styles.d.ts +47 -5
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.styles.js +32 -1
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.types.d.ts +16 -0
- package/dist/components/modal/components/modal-dialog/modal-dialog.component.d.ts +2 -1
- package/dist/components/modal/components/modal-dialog/modal-dialog.component.js +11 -2
- package/dist/components/modal/components/modal-dialog/modal-dialog.styles.d.ts +18 -0
- package/dist/components/modal/components/modal-dialog/modal-dialog.styles.js +16 -7
- package/dist/components/modal/components/modal-dialog/modal-dialog.types.d.ts +6 -0
- package/dist/components/popover/components/panel/panel.styles.js +2 -2
- package/dist/components/radio-group/components/radio-group-radio/radio-group-radio.component.js +1 -2
- package/dist/components/radio-group/radio-group.component.js +58 -11
- package/dist/components/radio-group/radio-group.types.d.ts +5 -1
- package/dist/components/repeater/repeater.component.js +4 -2
- package/dist/components/selector/components/selector-button-group/selector-button-group.component.js +9 -7
- package/dist/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.js +50 -1
- package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.js +1 -1
- package/dist/components/selector/components/selector-radio-group/selector-radio-group.component.js +58 -11
- package/dist/components/selector/components/selector-radio-group/selector-radio-group.types.d.ts +5 -1
- package/dist/components/tabs/components/tabs-tab/tabs-tab.component.js +1 -1
- package/dist/components/tabs/tabs.component.d.ts +6 -2
- package/dist/components/tabs/tabs.component.js +7 -1
- package/dist/constants/message.d.ts +1 -0
- package/dist/constants/message.js +1 -0
- package/dist/css/westpac-ui.css +192 -100
- package/dist/css/westpac-ui.min.css +192 -100
- package/package.json +10 -10
- package/src/components/accordion/accordion.component.tsx +3 -3
- package/src/components/accordion/components/accordion-item/accordion-item.component.tsx +2 -2
- package/src/components/autocomplete/autocomplete.component.tsx +5 -1
- package/src/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.component.tsx +1 -1
- package/src/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.ts +1 -1
- package/src/components/autocomplete/components/autocomplete-popover/autocomplete-popover.component.tsx +4 -1
- package/src/components/badge/badge.component.tsx +2 -1
- package/src/components/badge/badge.styles.ts +1 -1
- package/src/components/bottom-sheet/bottom-sheet.component.tsx +20 -2
- package/src/components/bottom-sheet/bottom-sheet.types.ts +20 -0
- package/src/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.component.tsx +33 -14
- package/src/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.styles.ts +16 -0
- package/src/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.types.ts +17 -1
- package/src/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.component.tsx +11 -26
- package/src/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.ts +14 -0
- package/src/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.types.ts +0 -5
- package/src/components/button-group/button-group.component.tsx +58 -11
- package/src/components/button-group/button-group.types.ts +9 -2
- package/src/components/button-group/components/button-group-button/button-group-button.component.tsx +1 -2
- package/src/components/checkbox-group/checkbox-group.component.tsx +62 -10
- package/src/components/checkbox-group/checkbox-group.types.ts +5 -1
- package/src/components/checkbox-group/components/checkbox-group-checkbox/checkbox-group-checkbox.component.tsx +1 -2
- package/src/components/date-picker/date-picker.types.ts +4 -0
- package/src/components/error-message/error-message.component.tsx +2 -2
- package/src/components/error-message/error-message.types.ts +2 -1
- package/src/components/icon/components/x-icon.tsx +37 -0
- package/src/components/icon/index.ts +1 -1
- package/src/components/modal/components/modal-backdrop/modal-backdrop.component.tsx +5 -2
- package/src/components/modal/components/modal-backdrop/modal-backdrop.styles.ts +7 -2
- package/src/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.component.tsx +6 -2
- package/src/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.styles.ts +15 -3
- package/src/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.component.tsx +25 -4
- package/src/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.styles.ts +15 -3
- package/src/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.types.ts +16 -0
- package/src/components/modal/components/modal-dialog/modal-dialog.component.tsx +10 -3
- package/src/components/modal/components/modal-dialog/modal-dialog.styles.ts +14 -5
- package/src/components/modal/components/modal-dialog/modal-dialog.types.ts +7 -0
- package/src/components/pagination/pagination.component.tsx +6 -6
- package/src/components/popover/components/panel/panel.styles.ts +2 -2
- package/src/components/radio-group/components/radio-group-radio/radio-group-radio.component.tsx +1 -2
- package/src/components/radio-group/radio-group.component.tsx +57 -13
- package/src/components/radio-group/radio-group.types.ts +5 -1
- package/src/components/repeater/repeater.component.tsx +2 -0
- package/src/components/selector/components/selector-button-group/selector-button-group.component.tsx +10 -7
- package/src/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.tsx +49 -0
- package/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx +1 -1
- package/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx +58 -11
- package/src/components/selector/components/selector-radio-group/selector-radio-group.types.ts +5 -1
- package/src/components/tabs/components/tabs-tab/tabs-tab.component.tsx +1 -1
- package/src/components/tabs/tabs.component.tsx +26 -5
- package/src/constants/message.ts +1 -0
- package/src/tailwind/utils/create-font-sizes.ts +11 -8
- package/src/tailwind/utils/generate-font-components.ts +18 -15
- package/src/tailwind/utils/generate-form-control.ts +11 -8
- package/dist/components/icon/components/twitter-icon.d.ts +0 -2
- package/dist/components/icon/components/twitter-icon.js +0 -35
- package/src/components/icon/components/twitter-icon.tsx +0 -37
package/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx
CHANGED
|
@@ -4,23 +4,70 @@ import React, { createContext } from 'react';
|
|
|
4
4
|
import { useRadioGroup } from 'react-aria';
|
|
5
5
|
import { useRadioGroupState } from 'react-stately';
|
|
6
6
|
|
|
7
|
+
import { FUNCTION_NOT_IMPLEMENTED } from '../../../../constants/message.js';
|
|
7
8
|
import { ErrorMessage, Hint, Label } from '../../../index.js';
|
|
8
9
|
|
|
9
10
|
import { styles } from './selector-radio-group.styles.js';
|
|
10
11
|
import { type SelectorRadioGroupContextState, type SelectorRadioGroupProps } from './selector-radio-group.types.js';
|
|
11
12
|
|
|
12
13
|
export const SelectorRadioGroupContext = createContext<SelectorRadioGroupContextState>({
|
|
13
|
-
// TODO: Remove deprecated name prop once React Aria removes it from RadioGroupState
|
|
14
|
-
name: '',
|
|
15
|
-
isDisabled: false,
|
|
16
|
-
isReadOnly: false,
|
|
17
|
-
isRequired: false,
|
|
18
|
-
validationState: null,
|
|
19
|
-
selectedValue: null,
|
|
20
|
-
setSelectedValue: () => null,
|
|
21
|
-
lastFocusedValue: null,
|
|
22
|
-
setLastFocusedValue: () => null,
|
|
23
14
|
orientation: 'vertical',
|
|
15
|
+
state: {
|
|
16
|
+
// TODO: Remove deprecated name prop once React Aria removes it from RadioGroupState
|
|
17
|
+
name: '',
|
|
18
|
+
isDisabled: false,
|
|
19
|
+
isReadOnly: false,
|
|
20
|
+
isRequired: false,
|
|
21
|
+
validationState: null,
|
|
22
|
+
selectedValue: null,
|
|
23
|
+
setSelectedValue: () => null,
|
|
24
|
+
lastFocusedValue: null,
|
|
25
|
+
setLastFocusedValue: () => null,
|
|
26
|
+
isInvalid: false,
|
|
27
|
+
realtimeValidation: {
|
|
28
|
+
isInvalid: false,
|
|
29
|
+
validationErrors: [],
|
|
30
|
+
validationDetails: {
|
|
31
|
+
badInput: false,
|
|
32
|
+
customError: false,
|
|
33
|
+
patternMismatch: false,
|
|
34
|
+
rangeOverflow: false,
|
|
35
|
+
rangeUnderflow: false,
|
|
36
|
+
stepMismatch: false,
|
|
37
|
+
tooLong: false,
|
|
38
|
+
tooShort: false,
|
|
39
|
+
typeMismatch: false,
|
|
40
|
+
valid: false,
|
|
41
|
+
valueMissing: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
displayValidation: {
|
|
45
|
+
isInvalid: false,
|
|
46
|
+
validationErrors: [],
|
|
47
|
+
validationDetails: {
|
|
48
|
+
badInput: false,
|
|
49
|
+
customError: false,
|
|
50
|
+
patternMismatch: false,
|
|
51
|
+
rangeOverflow: false,
|
|
52
|
+
rangeUnderflow: false,
|
|
53
|
+
stepMismatch: false,
|
|
54
|
+
tooLong: false,
|
|
55
|
+
tooShort: false,
|
|
56
|
+
typeMismatch: false,
|
|
57
|
+
valid: false,
|
|
58
|
+
valueMissing: false,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
updateValidation: function (): void {
|
|
62
|
+
throw new Error(FUNCTION_NOT_IMPLEMENTED);
|
|
63
|
+
},
|
|
64
|
+
resetValidation: function (): void {
|
|
65
|
+
throw new Error(FUNCTION_NOT_IMPLEMENTED);
|
|
66
|
+
},
|
|
67
|
+
commitValidation: function (): void {
|
|
68
|
+
throw new Error(FUNCTION_NOT_IMPLEMENTED);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
24
71
|
});
|
|
25
72
|
|
|
26
73
|
export function SelectorRadioGroup({
|
|
@@ -46,7 +93,7 @@ export function SelectorRadioGroup({
|
|
|
46
93
|
<ErrorMessage {...errorMessageProps} message={errorMessage} />
|
|
47
94
|
)}
|
|
48
95
|
<div className={styles({ className, orientation })} {...radioGroupProps}>
|
|
49
|
-
<SelectorRadioGroupContext.Provider value={{
|
|
96
|
+
<SelectorRadioGroupContext.Provider value={{ state, orientation }}>
|
|
50
97
|
{children}
|
|
51
98
|
</SelectorRadioGroupContext.Provider>
|
|
52
99
|
</div>
|
package/src/components/selector/components/selector-radio-group/selector-radio-group.types.ts
CHANGED
|
@@ -24,4 +24,8 @@ export type SelectorRadioGroupContextState = {
|
|
|
24
24
|
* Controls orientation of `Radio` components, can't be applied directly on `Radio`
|
|
25
25
|
*/
|
|
26
26
|
orientation: 'vertical' | 'horizontal';
|
|
27
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Radio group state
|
|
29
|
+
*/
|
|
30
|
+
state: RadioGroupState;
|
|
31
|
+
};
|
|
@@ -6,7 +6,7 @@ import { type TabsTabProps } from './tabs-tab.types.js';
|
|
|
6
6
|
|
|
7
7
|
export function TabsTab({ item: { key, rendered }, state, orientation, justify, color, look }: TabsTabProps) {
|
|
8
8
|
const ref = useRef(null);
|
|
9
|
-
const { tabProps } = useTab({ key }, state, ref);
|
|
9
|
+
const { tabProps } = useTab({ key: key as any }, state, ref);
|
|
10
10
|
const { isFocusVisible, focusProps } = useFocusRing();
|
|
11
11
|
return (
|
|
12
12
|
<div
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import React, { useRef } from 'react';
|
|
4
|
-
import { useTabList } from 'react-aria';
|
|
5
|
-
import { Item, useTabListState } from 'react-stately';
|
|
4
|
+
import { AriaLinkOptions, useTabList } from 'react-aria';
|
|
5
|
+
import { Item, ItemProps, useTabListState } from 'react-stately';
|
|
6
6
|
|
|
7
7
|
import { TabsTab, TabsTabPanel } from './components/index.js';
|
|
8
8
|
import { styles as tabStyles } from './tabs.styles.js';
|
|
@@ -17,13 +17,32 @@ export function Tabs({
|
|
|
17
17
|
look = 'default',
|
|
18
18
|
sticky = false,
|
|
19
19
|
stickyOffset = {},
|
|
20
|
+
disabledKeys,
|
|
21
|
+
selectedKey,
|
|
22
|
+
defaultSelectedKey,
|
|
20
23
|
...props
|
|
21
24
|
}: TabsProps) {
|
|
22
|
-
const state = useTabListState({
|
|
25
|
+
const state = useTabListState({
|
|
26
|
+
...props,
|
|
27
|
+
disabledKeys: disabledKeys as any,
|
|
28
|
+
selectedKey: selectedKey as any,
|
|
29
|
+
defaultSelectedKey: defaultSelectedKey as any,
|
|
30
|
+
children,
|
|
31
|
+
});
|
|
23
32
|
const styles = tabStyles({ orientation, look, sticky });
|
|
24
33
|
|
|
25
34
|
const ref = useRef(null);
|
|
26
|
-
const { tabListProps } = useTabList(
|
|
35
|
+
const { tabListProps } = useTabList(
|
|
36
|
+
{
|
|
37
|
+
...props,
|
|
38
|
+
disabledKeys: disabledKeys as any,
|
|
39
|
+
selectedKey: selectedKey as any,
|
|
40
|
+
defaultSelectedKey: defaultSelectedKey as any,
|
|
41
|
+
orientation,
|
|
42
|
+
},
|
|
43
|
+
state,
|
|
44
|
+
ref,
|
|
45
|
+
);
|
|
27
46
|
return (
|
|
28
47
|
<div className={styles.base({ className })}>
|
|
29
48
|
<div style={{ ...tabListProps.style, ...stickyOffset }} {...tabListProps} className={styles.tabList()} ref={ref}>
|
|
@@ -44,4 +63,6 @@ export function Tabs({
|
|
|
44
63
|
);
|
|
45
64
|
}
|
|
46
65
|
|
|
47
|
-
export const TabsPanel = Item
|
|
66
|
+
export const TabsPanel = Item as (
|
|
67
|
+
props: ItemProps<AriaLinkOptions> & AriaLinkOptions & { href?: string },
|
|
68
|
+
) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const FUNCTION_NOT_IMPLEMENTED = 'Function not implemented';
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { FONT_SIZES } from '../constants/typography.js';
|
|
2
2
|
|
|
3
3
|
export const createFontSizes = (fontTypes: string[]) => {
|
|
4
|
-
return fontTypes.reduce(
|
|
5
|
-
|
|
6
|
-
return {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
return fontTypes.reduce(
|
|
5
|
+
(acc, fontType) => {
|
|
6
|
+
return Object.entries(FONT_SIZES).reduce((acc2, [fontSize, value]) => {
|
|
7
|
+
return {
|
|
8
|
+
...acc2,
|
|
9
|
+
[`${fontType}-${fontSize}`]: value.fontSize,
|
|
10
|
+
};
|
|
11
|
+
}, acc);
|
|
12
|
+
},
|
|
13
|
+
{} as Record<string, any>,
|
|
14
|
+
);
|
|
12
15
|
};
|
|
@@ -4,19 +4,22 @@ export const generateFontComponents = (
|
|
|
4
4
|
typographySizes: Record<string, { fontSize: string; lineHeight: string }>,
|
|
5
5
|
theme: PluginAPI['theme'],
|
|
6
6
|
) => {
|
|
7
|
-
return Object.entries(typographySizes).reduce(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
return Object.entries(typographySizes).reduce(
|
|
8
|
+
(acc, [size, value]) => {
|
|
9
|
+
return {
|
|
10
|
+
...acc,
|
|
11
|
+
[`.typography-body-${size}`]: {
|
|
12
|
+
fontSize: theme(`fontSize.body-${size}`),
|
|
13
|
+
lineHeight: theme(`lineHeight.${value.lineHeight}`),
|
|
14
|
+
fontFamily: theme(`fontFamily.sans`),
|
|
15
|
+
},
|
|
16
|
+
[`.typography-brand-${size}`]: {
|
|
17
|
+
fontSize: theme(`fontSize.brand-${size}`),
|
|
18
|
+
lineHeight: theme(`lineHeight.${value.lineHeight}`),
|
|
19
|
+
fontFamily: theme(`fontFamily.brand`),
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
{} as Record<string, any>,
|
|
24
|
+
);
|
|
22
25
|
};
|
|
@@ -3,14 +3,17 @@ export const generateFormControlComponents = (formControlProps: {
|
|
|
3
3
|
disabled: string;
|
|
4
4
|
sizes: Record<string, string>;
|
|
5
5
|
}) => {
|
|
6
|
-
const sizes = Object.entries(formControlProps.sizes).reduce(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
[
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const sizes = Object.entries(formControlProps.sizes).reduce(
|
|
7
|
+
(acc, [size, value]) => {
|
|
8
|
+
return {
|
|
9
|
+
...acc,
|
|
10
|
+
[`.form-control-${size}`]: {
|
|
11
|
+
[`@apply ${value}`]: {},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
{} as Record<string, any>,
|
|
16
|
+
);
|
|
14
17
|
return {
|
|
15
18
|
'.form-control': {
|
|
16
19
|
[`@apply ${formControlProps.base}`]: {},
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
import React, { Fragment } from 'react';
|
|
16
|
-
import { Icon } from '../icon.component.js';
|
|
17
|
-
export function TwitterIcon({ look ='filled' , 'aria-label': ariaLabel = 'Twitter' , copyrightYear ='2024' , ...props }) {
|
|
18
|
-
return React.createElement(Icon, _extends({
|
|
19
|
-
"aria-label": ariaLabel,
|
|
20
|
-
copyrightYear: copyrightYear
|
|
21
|
-
}, props), look === 'filled' ? React.createElement("path", {
|
|
22
|
-
fillRule: "evenodd",
|
|
23
|
-
clipRule: "evenodd",
|
|
24
|
-
d: "M2 0C0.895431 0 0 0.89543 0 2V22C0 23.1046 0.89543 24 2 24H22C23.1046 24 24 23.1046 24 22V2C24 0.895431 23.1046 0 22 0H2ZM18.1146 7.34209C18.7788 7.26155 19.4119 7.08237 20 6.81641C19.5605 7.48568 19.003 8.07379 18.3618 8.54452C18.368 8.68749 18.3712 8.83233 18.3712 8.97655C18.3712 13.3898 15.0691 18.4799 9.032 18.4799C7.1784 18.4799 5.45216 17.9261 4 16.9784C4.25597 17.0096 4.51506 17.0259 4.7804 17.0259C6.31809 17.0259 7.72905 16.4921 8.85219 15.5962C7.41626 15.5693 6.19572 14.6035 5.77743 13.2768C5.97846 13.3156 6.167 13.3362 6.37802 13.3362C6.6777 13.3362 6.93429 13.2956 7.20899 13.2194C5.70813 12.9122 4.50944 11.5625 4.50944 9.94487V9.90241C5.13376 10.1534 5.52583 10.3032 6.06337 10.3207C5.18308 9.72198 4.67052 8.69935 4.67052 7.54062C4.67052 6.92879 4.83221 6.35504 5.11503 5.86183C6.73451 7.88212 9.15249 9.21192 11.8801 9.35114C11.8239 9.10641 11.7952 8.85169 11.7952 8.58947C11.7952 6.74586 13.2655 5.25 15.0773 5.25C16.0219 5.25 16.8747 5.65581 17.4734 6.30447C18.2213 6.15401 18.9237 5.87681 19.558 5.49473C19.312 6.27388 18.7919 6.92879 18.1146 7.34209Z",
|
|
25
|
-
fill: "currentColor"
|
|
26
|
-
}) : React.createElement(Fragment, null, React.createElement("path", {
|
|
27
|
-
d: "M18.1146 7.34209C18.7788 7.26155 19.4119 7.08237 20 6.81641C19.5605 7.48568 19.003 8.07379 18.3618 8.54452C18.368 8.68749 18.3712 8.83233 18.3712 8.97655C18.3712 13.3898 15.0691 18.4799 9.032 18.4799C7.1784 18.4799 5.45216 17.9261 4 16.9784C4.25597 17.0096 4.51506 17.0259 4.7804 17.0259C6.31809 17.0259 7.72905 16.4921 8.85219 15.5962C7.41626 15.5693 6.19572 14.6035 5.77743 13.2768C5.97846 13.3156 6.167 13.3362 6.37802 13.3362C6.6777 13.3362 6.93429 13.2956 7.20899 13.2194C5.70813 12.9122 4.50944 11.5625 4.50944 9.94487V9.90241C5.13376 10.1534 5.52583 10.3032 6.06337 10.3207C5.18308 9.72198 4.67052 8.69935 4.67052 7.54062C4.67052 6.92879 4.83221 6.35504 5.11503 5.86183C6.73451 7.88212 9.15249 9.21192 11.8801 9.35114C11.8239 9.10641 11.7952 8.85169 11.7952 8.58947C11.7952 6.74586 13.2655 5.25 15.0773 5.25C16.0219 5.25 16.8747 5.65581 17.4734 6.30447C18.2213 6.15401 18.9237 5.87681 19.558 5.49473C19.312 6.27388 18.7919 6.92879 18.1146 7.34209Z",
|
|
28
|
-
fill: "currentColor"
|
|
29
|
-
}), React.createElement("path", {
|
|
30
|
-
fillRule: "evenodd",
|
|
31
|
-
clipRule: "evenodd",
|
|
32
|
-
d: "M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2ZM2 2H22V22H2V2Z",
|
|
33
|
-
fill: "currentColor"
|
|
34
|
-
})));
|
|
35
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React, { Fragment } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Icon } from '../icon.component.js';
|
|
4
|
-
import { type IconProps } from '../icon.types.js';
|
|
5
|
-
|
|
6
|
-
export function TwitterIcon({
|
|
7
|
-
look = 'filled',
|
|
8
|
-
'aria-label': ariaLabel = 'Twitter',
|
|
9
|
-
copyrightYear = '2024',
|
|
10
|
-
...props
|
|
11
|
-
}: IconProps) {
|
|
12
|
-
return (
|
|
13
|
-
<Icon aria-label={ariaLabel} copyrightYear={copyrightYear} {...props}>
|
|
14
|
-
{look === 'filled' ? (
|
|
15
|
-
<path
|
|
16
|
-
fillRule="evenodd"
|
|
17
|
-
clipRule="evenodd"
|
|
18
|
-
d="M2 0C0.895431 0 0 0.89543 0 2V22C0 23.1046 0.89543 24 2 24H22C23.1046 24 24 23.1046 24 22V2C24 0.895431 23.1046 0 22 0H2ZM18.1146 7.34209C18.7788 7.26155 19.4119 7.08237 20 6.81641C19.5605 7.48568 19.003 8.07379 18.3618 8.54452C18.368 8.68749 18.3712 8.83233 18.3712 8.97655C18.3712 13.3898 15.0691 18.4799 9.032 18.4799C7.1784 18.4799 5.45216 17.9261 4 16.9784C4.25597 17.0096 4.51506 17.0259 4.7804 17.0259C6.31809 17.0259 7.72905 16.4921 8.85219 15.5962C7.41626 15.5693 6.19572 14.6035 5.77743 13.2768C5.97846 13.3156 6.167 13.3362 6.37802 13.3362C6.6777 13.3362 6.93429 13.2956 7.20899 13.2194C5.70813 12.9122 4.50944 11.5625 4.50944 9.94487V9.90241C5.13376 10.1534 5.52583 10.3032 6.06337 10.3207C5.18308 9.72198 4.67052 8.69935 4.67052 7.54062C4.67052 6.92879 4.83221 6.35504 5.11503 5.86183C6.73451 7.88212 9.15249 9.21192 11.8801 9.35114C11.8239 9.10641 11.7952 8.85169 11.7952 8.58947C11.7952 6.74586 13.2655 5.25 15.0773 5.25C16.0219 5.25 16.8747 5.65581 17.4734 6.30447C18.2213 6.15401 18.9237 5.87681 19.558 5.49473C19.312 6.27388 18.7919 6.92879 18.1146 7.34209Z"
|
|
19
|
-
fill="currentColor"
|
|
20
|
-
/>
|
|
21
|
-
) : (
|
|
22
|
-
<Fragment>
|
|
23
|
-
<path
|
|
24
|
-
d="M18.1146 7.34209C18.7788 7.26155 19.4119 7.08237 20 6.81641C19.5605 7.48568 19.003 8.07379 18.3618 8.54452C18.368 8.68749 18.3712 8.83233 18.3712 8.97655C18.3712 13.3898 15.0691 18.4799 9.032 18.4799C7.1784 18.4799 5.45216 17.9261 4 16.9784C4.25597 17.0096 4.51506 17.0259 4.7804 17.0259C6.31809 17.0259 7.72905 16.4921 8.85219 15.5962C7.41626 15.5693 6.19572 14.6035 5.77743 13.2768C5.97846 13.3156 6.167 13.3362 6.37802 13.3362C6.6777 13.3362 6.93429 13.2956 7.20899 13.2194C5.70813 12.9122 4.50944 11.5625 4.50944 9.94487V9.90241C5.13376 10.1534 5.52583 10.3032 6.06337 10.3207C5.18308 9.72198 4.67052 8.69935 4.67052 7.54062C4.67052 6.92879 4.83221 6.35504 5.11503 5.86183C6.73451 7.88212 9.15249 9.21192 11.8801 9.35114C11.8239 9.10641 11.7952 8.85169 11.7952 8.58947C11.7952 6.74586 13.2655 5.25 15.0773 5.25C16.0219 5.25 16.8747 5.65581 17.4734 6.30447C18.2213 6.15401 18.9237 5.87681 19.558 5.49473C19.312 6.27388 18.7919 6.92879 18.1146 7.34209Z"
|
|
25
|
-
fill="currentColor"
|
|
26
|
-
/>
|
|
27
|
-
<path
|
|
28
|
-
fillRule="evenodd"
|
|
29
|
-
clipRule="evenodd"
|
|
30
|
-
d="M0 2C0 0.89543 0.895431 0 2 0H22C23.1046 0 24 0.895431 24 2V22C24 23.1046 23.1046 24 22 24H2C0.89543 24 0 23.1046 0 22V2ZM2 2H22V22H2V2Z"
|
|
31
|
-
fill="currentColor"
|
|
32
|
-
/>
|
|
33
|
-
</Fragment>
|
|
34
|
-
)}
|
|
35
|
-
</Icon>
|
|
36
|
-
);
|
|
37
|
-
}
|