@ornikar/bumper 3.14.1 → 4.0.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 +10 -0
- package/dist/definitions/index.d.ts +4 -4
- package/dist/definitions/system/{actions → buttons}/Button/Button.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/components/ButtonBadge.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/components/ButtonIcon.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/components/ButtonText.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/context.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/types.d.ts.map +1 -1
- package/dist/definitions/system/{actions → buttons}/Button/utils/contentColor.d.ts.map +1 -1
- package/dist/definitions/system/{actions/IconButton/IconButton.d.ts → buttons/ButtonIcon/ButtonIcon.d.ts} +8 -8
- package/dist/definitions/system/buttons/ButtonIcon/ButtonIcon.d.ts.map +1 -0
- package/dist/index-metro.es.android.js +10 -10
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +10 -10
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +10 -10
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +10 -10
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +10 -10
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +10 -10
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +10 -10
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +10 -10
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/docs/migration/Button.md +2 -2
- package/package.json +1 -1
- package/src/Bumper.mdx +3 -3
- package/src/index.ts +5 -5
- package/src/system/{actions → buttons}/Button/Button.features.stories.tsx +1 -1
- package/src/system/{actions → buttons}/Button/Button.mdx +1 -1
- package/src/system/{actions → buttons}/Button/Button.stories.tsx +1 -1
- package/src/system/{actions → buttons}/Button/__snapshots__/Button.features.stories.tsx.snap +12 -12
- package/src/system/{actions → buttons}/Button/__snapshots__/Button.stories.tsx.snap +1 -1
- package/src/system/{actions → buttons}/Button/__snapshots_web__/Button.features.stories.tsx.snap +12 -12
- package/src/system/{actions → buttons}/Button/__snapshots_web__/Button.stories.tsx.snap +1 -1
- package/src/system/buttons/ButtonIcon/ButtonIcon.features.stories.tsx +194 -0
- package/src/system/{actions/IconButton/IconButton.mdx → buttons/ButtonIcon/ButtonIcon.mdx} +16 -16
- package/src/system/{actions/IconButton/IconButton.stories.tsx → buttons/ButtonIcon/ButtonIcon.stories.tsx} +7 -7
- package/src/system/{actions/IconButton/IconButton.tsx → buttons/ButtonIcon/ButtonIcon.tsx} +10 -10
- package/src/system/{actions/IconButton/__snapshots__/IconButton.features.stories.tsx.snap → buttons/ButtonIcon/__snapshots__/ButtonIcon.features.stories.tsx.snap} +10 -10
- package/src/system/{actions/IconButton/__snapshots__/IconButton.stories.tsx.snap → buttons/ButtonIcon/__snapshots__/ButtonIcon.stories.tsx.snap} +1 -1
- package/src/system/{actions/IconButton/__snapshots_web__/IconButton.features.stories.tsx.snap → buttons/ButtonIcon/__snapshots_web__/ButtonIcon.features.stories.tsx.snap} +10 -10
- package/src/system/{actions/IconButton/__snapshots_web__/IconButton.stories.tsx.snap → buttons/ButtonIcon/__snapshots_web__/ButtonIcon.stories.tsx.snap} +1 -1
- package/dist/definitions/system/actions/IconButton/IconButton.d.ts.map +0 -1
- package/src/system/actions/IconButton/IconButton.features.stories.tsx +0 -194
- /package/dist/definitions/system/{actions → buttons}/Button/Button.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/components/ButtonBadge.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/components/ButtonIcon.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/components/ButtonText.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/context.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/types.d.ts +0 -0
- /package/dist/definitions/system/{actions → buttons}/Button/utils/contentColor.d.ts +0 -0
- /package/src/system/{actions → buttons}/Button/Button.tsx +0 -0
- /package/src/system/{actions → buttons}/Button/components/ButtonBadge.tsx +0 -0
- /package/src/system/{actions → buttons}/Button/components/ButtonIcon.tsx +0 -0
- /package/src/system/{actions → buttons}/Button/components/ButtonText.tsx +0 -0
- /package/src/system/{actions → buttons}/Button/context.ts +0 -0
- /package/src/system/{actions → buttons}/Button/types.ts +0 -0
- /package/src/system/{actions → buttons}/Button/utils/contentColor.ts +0 -0
|
@@ -5,16 +5,16 @@ import type { ViewProps } from '../../core/primitives/View';
|
|
|
5
5
|
import type { PropsToTamaguiVariants, TamaguiMediaProps } from '../../types';
|
|
6
6
|
import { InternalButton } from '../Button/Button';
|
|
7
7
|
import { ButtonBadge } from '../Button/components/ButtonBadge';
|
|
8
|
-
import { ButtonIcon } from '../Button/components/ButtonIcon';
|
|
8
|
+
import { ButtonIcon as ButtonIconCompound } from '../Button/components/ButtonIcon';
|
|
9
9
|
import { context } from '../Button/context';
|
|
10
10
|
import type { ButtonWithoutMediaProps } from '../Button/types';
|
|
11
11
|
|
|
12
|
-
export interface
|
|
12
|
+
export interface ButtonIconWithoutMediaProps extends Except<ButtonWithoutMediaProps, 'stretch'> {}
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type ButtonIconProps = TamaguiMediaProps<ButtonIconWithoutMediaProps>;
|
|
15
15
|
|
|
16
|
-
export const
|
|
17
|
-
name: '
|
|
16
|
+
export const InternalButtonIconFrame = styled(InternalButton, {
|
|
17
|
+
name: 'ButtonIcon',
|
|
18
18
|
context,
|
|
19
19
|
|
|
20
20
|
variants: {
|
|
@@ -32,14 +32,14 @@ export const InternalIconButtonFrame = styled(InternalButton, {
|
|
|
32
32
|
height: 48,
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
-
} as const satisfies PropsToTamaguiVariants<
|
|
35
|
+
} as const satisfies PropsToTamaguiVariants<ButtonIconWithoutMediaProps, ViewProps>,
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
function
|
|
39
|
-
return <
|
|
38
|
+
function InternalButtonIcon(props: ButtonIconProps): ReactNode {
|
|
39
|
+
return <InternalButtonIconFrame {...props} />;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
export const
|
|
43
|
-
Icon:
|
|
42
|
+
export const ButtonIcon = withStaticProperties(InternalButtonIcon, {
|
|
43
|
+
Icon: ButtonIconCompound,
|
|
44
44
|
Badge: ButtonBadge,
|
|
45
45
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
-
exports[`Bumper/
|
|
3
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Disabled 1`] = `
|
|
4
4
|
<RNCSafeAreaProvider
|
|
5
5
|
onInsetsChange={[Function]}
|
|
6
6
|
style={
|
|
@@ -248,7 +248,7 @@ exports[`Bumper/Actions/IconButton/Features Disabled 1`] = `
|
|
|
248
248
|
</RNCSafeAreaProvider>
|
|
249
249
|
`;
|
|
250
250
|
|
|
251
|
-
exports[`Bumper/
|
|
251
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Loading 1`] = `
|
|
252
252
|
<RNCSafeAreaProvider
|
|
253
253
|
onInsetsChange={[Function]}
|
|
254
254
|
style={
|
|
@@ -1206,7 +1206,7 @@ exports[`Bumper/Actions/IconButton/Features Loading 1`] = `
|
|
|
1206
1206
|
</RNCSafeAreaProvider>
|
|
1207
1207
|
`;
|
|
1208
1208
|
|
|
1209
|
-
exports[`Bumper/
|
|
1209
|
+
exports[`Bumper/Buttons/ButtonIcon/Features OnContrasted 1`] = `
|
|
1210
1210
|
<RNCSafeAreaProvider
|
|
1211
1211
|
onInsetsChange={[Function]}
|
|
1212
1212
|
style={
|
|
@@ -1520,7 +1520,7 @@ exports[`Bumper/Actions/IconButton/Features OnContrasted 1`] = `
|
|
|
1520
1520
|
</RNCSafeAreaProvider>
|
|
1521
1521
|
`;
|
|
1522
1522
|
|
|
1523
|
-
exports[`Bumper/
|
|
1523
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Responsive 1`] = `
|
|
1524
1524
|
<RNCSafeAreaProvider
|
|
1525
1525
|
onInsetsChange={[Function]}
|
|
1526
1526
|
style={
|
|
@@ -1597,7 +1597,7 @@ exports[`Bumper/Actions/IconButton/Features Responsive 1`] = `
|
|
|
1597
1597
|
</RNCSafeAreaProvider>
|
|
1598
1598
|
`;
|
|
1599
1599
|
|
|
1600
|
-
exports[`Bumper/
|
|
1600
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Sizes 1`] = `
|
|
1601
1601
|
<RNCSafeAreaProvider
|
|
1602
1602
|
onInsetsChange={[Function]}
|
|
1603
1603
|
style={
|
|
@@ -1746,7 +1746,7 @@ exports[`Bumper/Actions/IconButton/Features Sizes 1`] = `
|
|
|
1746
1746
|
</RNCSafeAreaProvider>
|
|
1747
1747
|
`;
|
|
1748
1748
|
|
|
1749
|
-
exports[`Bumper/
|
|
1749
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StateFocusVisible 1`] = `
|
|
1750
1750
|
<RNCSafeAreaProvider
|
|
1751
1751
|
onInsetsChange={[Function]}
|
|
1752
1752
|
style={
|
|
@@ -2020,7 +2020,7 @@ exports[`Bumper/Actions/IconButton/Features StateFocusVisible 1`] = `
|
|
|
2020
2020
|
</RNCSafeAreaProvider>
|
|
2021
2021
|
`;
|
|
2022
2022
|
|
|
2023
|
-
exports[`Bumper/
|
|
2023
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StateHover 1`] = `
|
|
2024
2024
|
<RNCSafeAreaProvider
|
|
2025
2025
|
onInsetsChange={[Function]}
|
|
2026
2026
|
style={
|
|
@@ -2294,7 +2294,7 @@ exports[`Bumper/Actions/IconButton/Features StateHover 1`] = `
|
|
|
2294
2294
|
</RNCSafeAreaProvider>
|
|
2295
2295
|
`;
|
|
2296
2296
|
|
|
2297
|
-
exports[`Bumper/
|
|
2297
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StatePress 1`] = `
|
|
2298
2298
|
<RNCSafeAreaProvider
|
|
2299
2299
|
onInsetsChange={[Function]}
|
|
2300
2300
|
style={
|
|
@@ -2568,7 +2568,7 @@ exports[`Bumper/Actions/IconButton/Features StatePress 1`] = `
|
|
|
2568
2568
|
</RNCSafeAreaProvider>
|
|
2569
2569
|
`;
|
|
2570
2570
|
|
|
2571
|
-
exports[`Bumper/
|
|
2571
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Types 1`] = `
|
|
2572
2572
|
<RNCSafeAreaProvider
|
|
2573
2573
|
onInsetsChange={[Function]}
|
|
2574
2574
|
style={
|
|
@@ -2842,7 +2842,7 @@ exports[`Bumper/Actions/IconButton/Features Types 1`] = `
|
|
|
2842
2842
|
</RNCSafeAreaProvider>
|
|
2843
2843
|
`;
|
|
2844
2844
|
|
|
2845
|
-
exports[`Bumper/
|
|
2845
|
+
exports[`Bumper/Buttons/ButtonIcon/Features WithBadge 1`] = `
|
|
2846
2846
|
<RNCSafeAreaProvider
|
|
2847
2847
|
onInsetsChange={[Function]}
|
|
2848
2848
|
style={
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
-
exports[`Bumper/
|
|
3
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Disabled 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<div
|
|
6
6
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -92,7 +92,7 @@ exports[`Bumper/Actions/IconButton/Features Disabled 1`] = `
|
|
|
92
92
|
</DocumentFragment>
|
|
93
93
|
`;
|
|
94
94
|
|
|
95
|
-
exports[`Bumper/
|
|
95
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Loading 1`] = `
|
|
96
96
|
<DocumentFragment>
|
|
97
97
|
<div
|
|
98
98
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -372,7 +372,7 @@ exports[`Bumper/Actions/IconButton/Features Loading 1`] = `
|
|
|
372
372
|
</DocumentFragment>
|
|
373
373
|
`;
|
|
374
374
|
|
|
375
|
-
exports[`Bumper/
|
|
375
|
+
exports[`Bumper/Buttons/ButtonIcon/Features OnContrasted 1`] = `
|
|
376
376
|
<DocumentFragment>
|
|
377
377
|
<div
|
|
378
378
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -473,7 +473,7 @@ exports[`Bumper/Actions/IconButton/Features OnContrasted 1`] = `
|
|
|
473
473
|
</DocumentFragment>
|
|
474
474
|
`;
|
|
475
475
|
|
|
476
|
-
exports[`Bumper/
|
|
476
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Responsive 1`] = `
|
|
477
477
|
<DocumentFragment>
|
|
478
478
|
<div
|
|
479
479
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -512,7 +512,7 @@ exports[`Bumper/Actions/IconButton/Features Responsive 1`] = `
|
|
|
512
512
|
</DocumentFragment>
|
|
513
513
|
`;
|
|
514
514
|
|
|
515
|
-
exports[`Bumper/
|
|
515
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Sizes 1`] = `
|
|
516
516
|
<DocumentFragment>
|
|
517
517
|
<div
|
|
518
518
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -570,7 +570,7 @@ exports[`Bumper/Actions/IconButton/Features Sizes 1`] = `
|
|
|
570
570
|
</DocumentFragment>
|
|
571
571
|
`;
|
|
572
572
|
|
|
573
|
-
exports[`Bumper/
|
|
573
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StateFocusVisible 1`] = `
|
|
574
574
|
<DocumentFragment>
|
|
575
575
|
<div
|
|
576
576
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -662,7 +662,7 @@ exports[`Bumper/Actions/IconButton/Features StateFocusVisible 1`] = `
|
|
|
662
662
|
</DocumentFragment>
|
|
663
663
|
`;
|
|
664
664
|
|
|
665
|
-
exports[`Bumper/
|
|
665
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StateHover 1`] = `
|
|
666
666
|
<DocumentFragment>
|
|
667
667
|
<div
|
|
668
668
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -754,7 +754,7 @@ exports[`Bumper/Actions/IconButton/Features StateHover 1`] = `
|
|
|
754
754
|
</DocumentFragment>
|
|
755
755
|
`;
|
|
756
756
|
|
|
757
|
-
exports[`Bumper/
|
|
757
|
+
exports[`Bumper/Buttons/ButtonIcon/Features StatePress 1`] = `
|
|
758
758
|
<DocumentFragment>
|
|
759
759
|
<div
|
|
760
760
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -846,7 +846,7 @@ exports[`Bumper/Actions/IconButton/Features StatePress 1`] = `
|
|
|
846
846
|
</DocumentFragment>
|
|
847
847
|
`;
|
|
848
848
|
|
|
849
|
-
exports[`Bumper/
|
|
849
|
+
exports[`Bumper/Buttons/ButtonIcon/Features Types 1`] = `
|
|
850
850
|
<DocumentFragment>
|
|
851
851
|
<div
|
|
852
852
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -934,7 +934,7 @@ exports[`Bumper/Actions/IconButton/Features Types 1`] = `
|
|
|
934
934
|
</DocumentFragment>
|
|
935
935
|
`;
|
|
936
936
|
|
|
937
|
-
exports[`Bumper/
|
|
937
|
+
exports[`Bumper/Buttons/ButtonIcon/Features WithBadge 1`] = `
|
|
938
938
|
<DocumentFragment>
|
|
939
939
|
<div
|
|
940
940
|
class="css-view-g5y9jx r-flex-13awgt0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/system/actions/IconButton/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAA0B,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,WAAW,2BAA4B,SAAQ,MAAM,CAAC,uBAAuB,EAAE,SAAS,CAAC;CAAG;AAElG,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;AAE7E,eAAO,MAAM,uBAAuB;;;;;;;8CAoBlC,CAAC;AAEH,iBAAS,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,SAAS,CAE7D;AAED,eAAO,MAAM,UAAU;;;CAGrB,CAAC"}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { StarIcon } from '@ornikar/kitt-icons/ornicons';
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
-
import { Typography } from '../../content/typography';
|
|
4
|
-
import { HStack, VStack } from '../../core/primitives/Stack';
|
|
5
|
-
import { View } from '../../core/primitives/View';
|
|
6
|
-
import { IconButton, InternalIconButtonFrame } from './IconButton';
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof IconButton> = {
|
|
9
|
-
title: 'Bumper/Actions/IconButton/Features',
|
|
10
|
-
component: IconButton,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof meta>;
|
|
15
|
-
|
|
16
|
-
export const Types: Story = {
|
|
17
|
-
render: () => (
|
|
18
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
19
|
-
<IconButton type="primary">
|
|
20
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
21
|
-
</IconButton>
|
|
22
|
-
<IconButton type="secondary">
|
|
23
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
24
|
-
</IconButton>
|
|
25
|
-
<IconButton type="tertiary">
|
|
26
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
27
|
-
</IconButton>
|
|
28
|
-
<IconButton type="danger">
|
|
29
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
30
|
-
</IconButton>
|
|
31
|
-
</HStack>
|
|
32
|
-
),
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export const Sizes: Story = {
|
|
36
|
-
render: () => (
|
|
37
|
-
<HStack gap="$space.16" alignItems="center">
|
|
38
|
-
<IconButton size="large">
|
|
39
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
40
|
-
</IconButton>
|
|
41
|
-
<IconButton size="small">
|
|
42
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
43
|
-
</IconButton>
|
|
44
|
-
</HStack>
|
|
45
|
-
),
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const WithBadge: Story = {
|
|
49
|
-
render: () => (
|
|
50
|
-
<HStack gap="$space.16" alignItems="center">
|
|
51
|
-
<IconButton type="primary">
|
|
52
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
53
|
-
<IconButton.Badge count={3} />
|
|
54
|
-
</IconButton>
|
|
55
|
-
<IconButton type="primary">
|
|
56
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
57
|
-
<IconButton.Badge />
|
|
58
|
-
</IconButton>
|
|
59
|
-
<IconButton type="secondary">
|
|
60
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
61
|
-
<IconButton.Badge count={99} maxCount={99} />
|
|
62
|
-
</IconButton>
|
|
63
|
-
</HStack>
|
|
64
|
-
),
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const Disabled: Story = {
|
|
68
|
-
render: () => (
|
|
69
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
70
|
-
<IconButton disabled type="primary">
|
|
71
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
72
|
-
</IconButton>
|
|
73
|
-
<IconButton disabled type="secondary">
|
|
74
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
75
|
-
</IconButton>
|
|
76
|
-
<IconButton disabled type="tertiary">
|
|
77
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
78
|
-
</IconButton>
|
|
79
|
-
<IconButton disabled type="danger">
|
|
80
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
81
|
-
</IconButton>
|
|
82
|
-
</HStack>
|
|
83
|
-
),
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export const Loading: Story = {
|
|
87
|
-
render: () => (
|
|
88
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
89
|
-
<IconButton isLoading type="primary">
|
|
90
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
91
|
-
</IconButton>
|
|
92
|
-
<IconButton isLoading type="secondary">
|
|
93
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
94
|
-
</IconButton>
|
|
95
|
-
<IconButton isLoading type="tertiary">
|
|
96
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
97
|
-
</IconButton>
|
|
98
|
-
<IconButton isLoading type="danger">
|
|
99
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
100
|
-
</IconButton>
|
|
101
|
-
</HStack>
|
|
102
|
-
),
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const OnContrasted: Story = {
|
|
106
|
-
render: () => (
|
|
107
|
-
<View backgroundColor="$bg.accent.default" padding="$space.16" borderRadius="$radius.m">
|
|
108
|
-
<VStack gap="$space.16">
|
|
109
|
-
<Typography.Text variant="label-l" color="$content.base.onContrasted.hi">
|
|
110
|
-
On contrasted background
|
|
111
|
-
</Typography.Text>
|
|
112
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
113
|
-
<IconButton isOnContrasted type="primary">
|
|
114
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
115
|
-
</IconButton>
|
|
116
|
-
<IconButton isOnContrasted type="secondary">
|
|
117
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
118
|
-
</IconButton>
|
|
119
|
-
<IconButton isOnContrasted type="tertiary">
|
|
120
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
121
|
-
</IconButton>
|
|
122
|
-
<IconButton isOnContrasted type="danger">
|
|
123
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
124
|
-
</IconButton>
|
|
125
|
-
</HStack>
|
|
126
|
-
</VStack>
|
|
127
|
-
</View>
|
|
128
|
-
),
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export const StateHover: Story = {
|
|
132
|
-
render: () => (
|
|
133
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
134
|
-
<InternalIconButtonFrame type="primary" forceStyle="hover">
|
|
135
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
136
|
-
</InternalIconButtonFrame>
|
|
137
|
-
<InternalIconButtonFrame type="secondary" forceStyle="hover">
|
|
138
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
139
|
-
</InternalIconButtonFrame>
|
|
140
|
-
<InternalIconButtonFrame type="tertiary" forceStyle="hover">
|
|
141
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
142
|
-
</InternalIconButtonFrame>
|
|
143
|
-
<InternalIconButtonFrame type="danger" forceStyle="hover">
|
|
144
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
145
|
-
</InternalIconButtonFrame>
|
|
146
|
-
</HStack>
|
|
147
|
-
),
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export const StatePress: Story = {
|
|
151
|
-
render: () => (
|
|
152
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
153
|
-
<InternalIconButtonFrame type="primary" forceStyle="press">
|
|
154
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
155
|
-
</InternalIconButtonFrame>
|
|
156
|
-
<InternalIconButtonFrame type="secondary" forceStyle="press">
|
|
157
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
158
|
-
</InternalIconButtonFrame>
|
|
159
|
-
<InternalIconButtonFrame type="tertiary" forceStyle="press">
|
|
160
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
161
|
-
</InternalIconButtonFrame>
|
|
162
|
-
<InternalIconButtonFrame type="danger" forceStyle="press">
|
|
163
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
164
|
-
</InternalIconButtonFrame>
|
|
165
|
-
</HStack>
|
|
166
|
-
),
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
export const StateFocusVisible: Story = {
|
|
170
|
-
render: () => (
|
|
171
|
-
<HStack gap="$space.16" alignItems="center" flexWrap="wrap">
|
|
172
|
-
<InternalIconButtonFrame type="primary" forceStyle="focusVisible">
|
|
173
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
174
|
-
</InternalIconButtonFrame>
|
|
175
|
-
<InternalIconButtonFrame type="secondary" forceStyle="focusVisible">
|
|
176
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
177
|
-
</InternalIconButtonFrame>
|
|
178
|
-
<InternalIconButtonFrame type="tertiary" forceStyle="focusVisible">
|
|
179
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
180
|
-
</InternalIconButtonFrame>
|
|
181
|
-
<InternalIconButtonFrame type="danger" forceStyle="focusVisible">
|
|
182
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
183
|
-
</InternalIconButtonFrame>
|
|
184
|
-
</HStack>
|
|
185
|
-
),
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
export const Responsive: Story = {
|
|
189
|
-
render: () => (
|
|
190
|
-
<IconButton size="small" $medium={{ size: 'large' }}>
|
|
191
|
-
<IconButton.Icon icon={<StarIcon />} />
|
|
192
|
-
</IconButton>
|
|
193
|
-
),
|
|
194
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|