@taiv/ui 1.12.0 → 1.14.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/dist/assets/assets.d.ts +5 -0
- package/dist/assets/assets.d.ts.map +1 -0
- package/dist/assets/assets.js +18 -0
- package/dist/assets/icons.d.ts +12 -0
- package/dist/assets/icons.d.ts.map +1 -0
- package/dist/assets/icons.js +62 -0
- package/dist/assets/svgs/GoogleIcon.d.ts +5 -0
- package/dist/assets/svgs/GoogleIcon.d.ts.map +1 -0
- package/dist/assets/svgs/GoogleIcon.js +2 -0
- package/dist/components/Data/Cards/ChartCard/ChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/ChartCard/ChartCard.js +3 -2
- package/dist/components/Data/Cards/PieChartCard/PieChartCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/PieChartCard/PieChartCard.js +2 -1
- package/dist/components/Data/Cards/StatsCard/StatsCard.d.ts.map +1 -1
- package/dist/components/Data/Cards/StatsCard/StatsCard.js +2 -1
- package/dist/components/Data/Chart/Chart.d.ts.map +1 -1
- package/dist/components/Data/Chart/Chart.js +5 -4
- package/dist/components/Data/Chart/Chart.stories.d.ts.map +1 -1
- package/dist/components/Data/Chart/Chart.stories.js +6 -5
- package/dist/components/Data/CheckboxTable/CheckboxTable.d.ts.map +1 -1
- package/dist/components/Data/CheckboxTable/CheckboxTable.js +15 -14
- package/dist/components/Data/PieChart/PieChart.d.ts.map +1 -1
- package/dist/components/Data/PieChart/PieChart.js +4 -3
- package/dist/components/Data/PieChart/PieChart.stories.d.ts.map +1 -1
- package/dist/components/Data/PieChart/PieChart.stories.js +4 -3
- package/dist/components/Data/Progress/Progress.stories.d.ts.map +1 -1
- package/dist/components/Data/Progress/Progress.stories.js +7 -6
- package/dist/components/Data/RemovableItemList/RemovableItemList.d.ts.map +1 -1
- package/dist/components/Data/RemovableItemList/RemovableItemList.js +4 -3
- package/dist/components/Info/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/Info/Badge/Badge.stories.js +5 -4
- package/dist/components/Info/Badge/sizes.d.ts.map +1 -1
- package/dist/components/Info/Badge/sizes.js +7 -6
- package/dist/components/Info/Badge/variants.d.ts.map +1 -1
- package/dist/components/Info/Badge/variants.js +3 -2
- package/dist/components/Info/InfoCard/InfoCard.d.ts.map +1 -1
- package/dist/components/Info/InfoCard/InfoCard.js +2 -1
- package/dist/components/Info/Modals/FormModal/FormModal.d.ts.map +1 -1
- package/dist/components/Info/Modals/FormModal/FormModal.js +12 -11
- package/dist/components/Info/Modals/FormModal/FormModal.stories.js +11 -11
- package/dist/components/Info/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Info/Modals/Modal/Modal.js +7 -6
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts +7 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modal/Modal.stories.js +61 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts +16 -0
- package/dist/components/Info/Modals/Modals.stories.d.ts.map +1 -0
- package/dist/components/Info/Modals/Modals.stories.js +102 -0
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.d.ts.map +1 -1
- package/dist/components/Info/Notifications/NotificationProvider/NotificationProvider.js +7 -6
- package/dist/components/Info/Notifications/Notifications.stories.d.ts +10 -0
- package/dist/components/Info/Notifications/Notifications.stories.d.ts.map +1 -0
- package/dist/components/Info/Notifications/Notifications.stories.js +107 -0
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/FormulaTooltip/FormulaTooltip.js +2 -1
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.d.ts +4 -4
- package/dist/components/Info/Tooltips/InfoTooltip/InfoTooltip.js +4 -4
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Info/Tooltips/Tooltip/Tooltip.js +2 -1
- package/dist/components/Inputs/Buttons/Button/Button.js +2 -2
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts +1 -0
- package/dist/components/Inputs/Buttons/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/Button.stories.js +53 -46
- package/dist/components/Inputs/Buttons/Button/sizes.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/Button/sizes.js +4 -3
- package/dist/components/Inputs/Buttons/IconButton/IconButton.js +2 -2
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/IconButton.stories.js +7 -6
- package/dist/components/Inputs/Buttons/IconButton/sizes.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/IconButton/sizes.js +4 -3
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts +35 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.js +37 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.d.ts +14 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.d.ts.map +1 -0
- package/dist/components/Inputs/Buttons/SSOButton/SSOButton.stories.js +121 -0
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.js +4 -3
- package/dist/components/Inputs/Buttons/shared/variants.d.ts +29 -29
- package/dist/components/Inputs/Buttons/shared/variants.d.ts.map +1 -1
- package/dist/components/Inputs/Buttons/shared/variants.js +6 -5
- package/dist/components/Inputs/Controls/Checkbox/Checkbox.stories.js +3 -3
- package/dist/components/Inputs/Controls/Radio/Radio.js +1 -1
- package/dist/components/Inputs/Controls/Radio/Radio.stories.js +3 -3
- package/dist/components/Inputs/Controls/RadioList/RadioList.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.js +3 -2
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/RadioList/RadioList.stories.js +3 -2
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.js +6 -5
- package/dist/components/Inputs/Controls/Toggle/Toggle.d.ts +4 -4
- package/dist/components/Inputs/Controls/Toggle/Toggle.js +5 -5
- package/dist/components/Inputs/Controls/Toggle/Toggle.stories.js +4 -4
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.js +5 -4
- package/dist/components/Inputs/Dates/DatePicker/DatePicker.stories.js +4 -4
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.js +6 -5
- package/dist/components/Inputs/Dropdowns/CascadingSelect/CascadingSelect.stories.js +5 -5
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.js +3 -3
- package/dist/components/Inputs/Dropdowns/FontSelect/FontSelect.stories.js +5 -5
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.js +7 -6
- package/dist/components/Inputs/Dropdowns/MultiSelect/MultiSelect.stories.js +5 -5
- package/dist/components/Inputs/Dropdowns/Select/Select.d.ts.map +1 -1
- package/dist/components/Inputs/Dropdowns/Select/Select.js +6 -5
- package/dist/components/Inputs/Dropdowns/Select/Select.stories.js +4 -4
- package/dist/components/Inputs/Dropdowns/shared/sizes.js +18 -18
- package/dist/components/Inputs/Sliders/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Inputs/Sliders/Slider/Slider.js +15 -14
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.d.ts.map +1 -1
- package/dist/components/Inputs/Sliders/VolumeSlider/VolumeSlider.js +5 -4
- package/dist/components/Inputs/Sliders/shared/sizes.d.ts +9 -9
- package/dist/components/Inputs/Sliders/shared/sizes.js +9 -9
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.js +5 -4
- package/dist/components/Inputs/TextInputs/AutoComplete/AutoComplete.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.js +10 -10
- package/dist/components/Inputs/TextInputs/NumberInput/NumberInput.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.js +8 -8
- package/dist/components/Inputs/TextInputs/PasswordInput/PasswordInput.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.js +4 -3
- package/dist/components/Inputs/TextInputs/SearchBar/SearchBar.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.js +6 -5
- package/dist/components/Inputs/TextInputs/TextArea/TextArea.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.js +5 -5
- package/dist/components/Inputs/TextInputs/TextInput/TextInput.stories.js +5 -5
- package/dist/components/Inputs/TextInputs/shared/sizes.d.ts +6 -6
- package/dist/components/Inputs/TextInputs/shared/sizes.js +3 -3
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts +7 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.d.ts.map +1 -0
- package/dist/components/Layout/AutoGrid/AutoGrid.stories.js +78 -0
- package/dist/components/Layout/Box/Box.d.ts +1 -3
- package/dist/components/Layout/Box/Box.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.js +2 -2
- package/dist/components/Layout/Box/Box.stories.d.ts +1 -2
- package/dist/components/Layout/Box/Box.stories.d.ts.map +1 -1
- package/dist/components/Layout/Box/Box.stories.js +28 -98
- package/dist/components/Layout/Card/Card.d.ts +1 -1
- package/dist/components/Layout/Card/Card.d.ts.map +1 -1
- package/dist/components/Layout/Card/Card.js +2 -2
- package/dist/components/Layout/Card/Card.stories.d.ts +10 -0
- package/dist/components/Layout/Card/Card.stories.d.ts.map +1 -0
- package/dist/components/Layout/Card/Card.stories.js +92 -0
- package/dist/components/Layout/Center/Center.d.ts +2 -3
- package/dist/components/Layout/Center/Center.d.ts.map +1 -1
- package/dist/components/Layout/Center/Center.js +2 -2
- package/dist/components/Layout/Center/Center.stories.d.ts +8 -0
- package/dist/components/Layout/Center/Center.stories.d.ts.map +1 -0
- package/dist/components/Layout/Center/Center.stories.js +70 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts +7 -0
- package/dist/components/Layout/Divider/Divider.stories.d.ts.map +1 -0
- package/dist/components/Layout/Divider/Divider.stories.js +67 -0
- package/dist/components/Layout/Frame/Frame.js +1 -1
- package/dist/components/Layout/Frame/Frame.stories.d.ts +8 -0
- package/dist/components/Layout/Frame/Frame.stories.d.ts.map +1 -0
- package/dist/components/Layout/Frame/Frame.stories.js +78 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts +8 -0
- package/dist/components/Layout/Grid/Grid.stories.d.ts.map +1 -0
- package/dist/components/Layout/Grid/Grid.stories.js +72 -0
- package/dist/components/Layout/Group/Group.stories.d.ts +10 -0
- package/dist/components/Layout/Group/Group.stories.d.ts.map +1 -0
- package/dist/components/Layout/Group/Group.stories.js +114 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts +10 -0
- package/dist/components/Layout/Loader/Loader.stories.d.ts.map +1 -0
- package/dist/components/Layout/Loader/Loader.stories.js +68 -0
- package/dist/components/Layout/SectionCard/SectionCard.d.ts +3 -5
- package/dist/components/Layout/SectionCard/SectionCard.d.ts.map +1 -1
- package/dist/components/Layout/SectionCard/SectionCard.js +3 -8
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts +9 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.d.ts.map +1 -0
- package/dist/components/Layout/SectionCard/SectionCard.stories.js +98 -0
- package/dist/components/Layout/Stack/Stack.stories.d.ts +1 -2
- package/dist/components/Layout/Stack/Stack.stories.d.ts.map +1 -1
- package/dist/components/Layout/Stack/Stack.stories.js +47 -66
- package/dist/components/Layout/Table/Table.stories.d.ts.map +1 -1
- package/dist/components/Layout/Table/Table.stories.js +4 -3
- package/dist/components/Layout/Tabs/Tabs.d.ts +2 -4
- package/dist/components/Layout/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Layout/Tabs/Tabs.js +7 -6
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts +9 -0
- package/dist/components/Layout/Tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/components/Layout/Tabs/Tabs.stories.js +141 -0
- package/dist/components/Misc/IconBadge/IconBadge.js +1 -1
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts +7 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.d.ts.map +1 -0
- package/dist/components/Misc/IconBadge/IconBadge.stories.js +48 -0
- package/dist/components/Misc/Stepper/Step.d.ts +16 -0
- package/dist/components/Misc/Stepper/Step.d.ts.map +1 -0
- package/dist/components/Misc/Stepper/Step.js +7 -0
- package/dist/components/Misc/Stepper/Step.stories.d.ts +477 -0
- package/dist/components/Misc/Stepper/Step.stories.d.ts.map +1 -0
- package/dist/components/Misc/Stepper/Step.stories.js +83 -0
- package/dist/components/Misc/Stepper/Stepper.d.ts +10 -0
- package/dist/components/Misc/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/Misc/Stepper/Stepper.js +72 -0
- package/dist/components/Misc/Stepper/Stepper.stories.d.ts +13 -0
- package/dist/components/Misc/Stepper/Stepper.stories.d.ts.map +1 -0
- package/dist/components/Misc/Stepper/Stepper.stories.js +126 -0
- package/dist/components/Misc/Stepper/variants.d.ts +54 -0
- package/dist/components/Misc/Stepper/variants.d.ts.map +1 -0
- package/dist/components/Misc/Stepper/variants.js +48 -0
- package/dist/components/Typography/CollapsibleText/CollapsibleText.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.js +2 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.stories.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleText/CollapsibleText.stories.js +4 -3
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.js +2 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.stories.d.ts.map +1 -1
- package/dist/components/Typography/CollapsibleTitle/CollapsibleTitle.stories.js +4 -3
- package/dist/components/Typography/Formula/Formula.d.ts.map +1 -1
- package/dist/components/Typography/Formula/Formula.js +5 -4
- package/dist/components/Typography/Formula/Formula.stories.d.ts +10 -0
- package/dist/components/Typography/Formula/Formula.stories.d.ts.map +1 -0
- package/dist/components/Typography/Formula/Formula.stories.js +85 -0
- package/dist/components/Typography/Fraction/Fraction.d.ts.map +1 -1
- package/dist/components/Typography/Fraction/Fraction.js +2 -1
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts +9 -0
- package/dist/components/Typography/Fraction/Fraction.stories.d.ts.map +1 -0
- package/dist/components/Typography/Fraction/Fraction.stories.js +87 -0
- package/dist/components/Typography/Text/Text.d.ts.map +1 -1
- package/dist/components/Typography/Text/Text.js +6 -0
- package/dist/components/Typography/Text/Text.stories.d.ts +10 -0
- package/dist/components/Typography/Text/Text.stories.d.ts.map +1 -0
- package/dist/components/Typography/Text/Text.stories.js +101 -0
- package/dist/components/Typography/Title/Title.stories.d.ts +9 -0
- package/dist/components/Typography/Title/Title.stories.d.ts.map +1 -0
- package/dist/components/Typography/Title/Title.stories.js +98 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/constants/breakpoints.d.ts +1 -1
- package/dist/constants/breakpoints.js +1 -1
- package/dist/constants/colors.d.ts +1 -0
- package/dist/constants/colors.d.ts.map +1 -1
- package/dist/constants/colors.js +1 -0
- package/dist/constants/font.js +10 -10
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +1 -0
- package/dist/constants/spacing.d.ts +12 -0
- package/dist/constants/spacing.d.ts.map +1 -0
- package/dist/constants/spacing.js +11 -0
- package/dist/docs/AIGeneratedBanner.d.ts +2 -0
- package/dist/docs/AIGeneratedBanner.d.ts.map +1 -0
- package/dist/docs/AIGeneratedBanner.js +5 -0
- package/dist/docs/design/Colors.stories.d.ts +7 -0
- package/dist/docs/design/Colors.stories.d.ts.map +1 -0
- package/dist/docs/design/Colors.stories.js +29 -0
- package/dist/docs/design/Spacing.stories.d.ts +6 -0
- package/dist/docs/design/Spacing.stories.d.ts.map +1 -0
- package/dist/docs/design/Spacing.stories.js +24 -0
- package/dist/docs/hooks/Copy.stories.d.ts +6 -0
- package/dist/docs/hooks/Copy.stories.d.ts.map +1 -0
- package/dist/docs/hooks/Copy.stories.js +61 -0
- package/dist/hooks/useConfirmationModal.d.ts.map +1 -1
- package/dist/hooks/useConfirmationModal.js +10 -9
- package/dist/hooks/useInfoModal.d.ts.map +1 -1
- package/dist/hooks/useInfoModal.js +10 -9
- package/dist/hooks/useMediaQuery.d.ts +2 -2
- package/dist/hooks/useMediaQuery.js +6 -6
- package/package.json +43 -32
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SSOButton } from './SSOButton';
|
|
3
|
+
import { Group } from '../../../Layout/Group/Group';
|
|
4
|
+
import { Stack } from '../../../Layout/Stack/Stack';
|
|
5
|
+
import { IconBrandApple, IconBrandGithub, IconBrandWindows } from '@tabler/icons-react';
|
|
6
|
+
import { GoogleIcon } from '../../../../assets/icons';
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Inputs/Buttons/SSOButton',
|
|
9
|
+
component: SSOButton,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: 'A sign-in button for third-party authentication providers. Use the `provider` shorthand for built-in providers, or pass `providerName` and `providerIcon` for any custom provider.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
provider: {
|
|
20
|
+
control: { type: 'select' },
|
|
21
|
+
options: ['google'],
|
|
22
|
+
description: 'Shorthand — resolves the provider name and icon automatically',
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: "'google'" },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
providerName: {
|
|
28
|
+
control: { type: 'text' },
|
|
29
|
+
description: 'Display name of the provider. Overrides provider lookup.',
|
|
30
|
+
table: {
|
|
31
|
+
type: { summary: 'string' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
providerIcon: {
|
|
35
|
+
control: false,
|
|
36
|
+
description: 'Provider icon rendered to the left of the label. Overrides provider lookup.',
|
|
37
|
+
table: {
|
|
38
|
+
type: { summary: 'ReactNode' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
control: { type: 'select' },
|
|
43
|
+
options: ['sm', 'md', 'lg'],
|
|
44
|
+
description: "Controls the button's height, padding, and font size",
|
|
45
|
+
table: {
|
|
46
|
+
type: { summary: "'sm' | 'md' | 'lg'" },
|
|
47
|
+
defaultValue: { summary: "'md'" },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
children: {
|
|
51
|
+
control: { type: 'text' },
|
|
52
|
+
description: 'Custom label. Defaults to "Continue with {providerName}"',
|
|
53
|
+
table: {
|
|
54
|
+
type: { summary: 'ReactNode' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
fullWidth: {
|
|
58
|
+
control: { type: 'boolean' },
|
|
59
|
+
description: 'Makes the button span the full width of its container',
|
|
60
|
+
table: {
|
|
61
|
+
type: { summary: 'boolean' },
|
|
62
|
+
defaultValue: { summary: 'false' },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
disabled: {
|
|
66
|
+
control: { type: 'boolean' },
|
|
67
|
+
description: 'Disabled state',
|
|
68
|
+
table: {
|
|
69
|
+
type: { summary: 'boolean' },
|
|
70
|
+
defaultValue: { summary: 'false' },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
loading: {
|
|
74
|
+
control: { type: 'boolean' },
|
|
75
|
+
description: 'Indicate loading state',
|
|
76
|
+
table: {
|
|
77
|
+
type: { summary: 'boolean' },
|
|
78
|
+
defaultValue: { summary: 'false' },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
onClick: {
|
|
82
|
+
action: 'clicked',
|
|
83
|
+
description: 'Click handler function',
|
|
84
|
+
table: {
|
|
85
|
+
type: { summary: '() => void' },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
export default meta;
|
|
91
|
+
export const Default = {
|
|
92
|
+
args: {
|
|
93
|
+
provider: 'google',
|
|
94
|
+
size: 'md',
|
|
95
|
+
disabled: false,
|
|
96
|
+
loading: false,
|
|
97
|
+
fullWidth: false,
|
|
98
|
+
onClick: () => { },
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
export const BuiltInProvider = {
|
|
102
|
+
render: () => (_jsx(Stack, { gap: "1.2rem", children: _jsx(SSOButton, { provider: "google" }) })),
|
|
103
|
+
};
|
|
104
|
+
export const CustomProviders = {
|
|
105
|
+
render: () => (_jsxs(Stack, { gap: "1.2rem", children: [_jsx(SSOButton, { providerName: "Apple", providerIcon: _jsx(IconBrandApple, { size: 18 }) }), _jsx(SSOButton, { providerName: "GitHub", providerIcon: _jsx(IconBrandGithub, { size: 18 }) }), _jsx(SSOButton, { providerName: "Microsoft", providerIcon: _jsx(IconBrandWindows, { size: 18 }) })] })),
|
|
106
|
+
};
|
|
107
|
+
export const Sizes = {
|
|
108
|
+
render: () => (_jsxs(Group, { gap: "1.6rem", align: "center", children: [_jsx(SSOButton, { provider: "google", size: "sm" }), _jsx(SSOButton, { provider: "google", size: "md" }), _jsx(SSOButton, { provider: "google", size: "lg" })] })),
|
|
109
|
+
};
|
|
110
|
+
export const States = {
|
|
111
|
+
render: () => (_jsxs(Group, { gap: "1.6rem", children: [_jsx(SSOButton, { provider: "google" }), _jsx(SSOButton, { provider: "google", disabled: true }), _jsx(SSOButton, { provider: "google", loading: true })] })),
|
|
112
|
+
};
|
|
113
|
+
export const CustomLabels = {
|
|
114
|
+
render: () => (_jsxs(Stack, { gap: "1.2rem", children: [_jsx(SSOButton, { provider: "google", children: "Sign in with Google" }), _jsx(SSOButton, { providerName: "Apple", providerIcon: _jsx(IconBrandApple, { size: 18 }), children: "Sign in with Apple" })] })),
|
|
115
|
+
};
|
|
116
|
+
export const FullWidth = {
|
|
117
|
+
render: () => (_jsx("div", { style: { width: '360px' }, children: _jsxs(Stack, { gap: "1.2rem", children: [_jsx(SSOButton, { provider: "google", fullWidth: true }), _jsx(SSOButton, { providerName: "Apple", providerIcon: _jsx(IconBrandApple, { size: 18 }), fullWidth: true }), _jsx(SSOButton, { providerName: "GitHub", providerIcon: _jsx(IconBrandGithub, { size: 18 }), fullWidth: true })] }) })),
|
|
118
|
+
};
|
|
119
|
+
export const ProviderOverride = {
|
|
120
|
+
render: () => (_jsx(Stack, { gap: "1.2rem", children: _jsx(SSOButton, { provider: "google", providerIcon: _jsx(GoogleIcon, { size: 24 }), children: "Custom icon size override" }) })),
|
|
121
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnstyledButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"UnstyledButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/UnstyledButton/UnstyledButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAmCrC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA2D1B,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { UnstyledButton } from './UnstyledButton';
|
|
3
|
+
import { spacing } from '../../../../constants/spacing';
|
|
3
4
|
const meta = {
|
|
4
5
|
title: 'Components/Inputs/Buttons/UnstyledButton',
|
|
5
6
|
component: UnstyledButton,
|
|
@@ -49,9 +50,9 @@ export const Default = {
|
|
|
49
50
|
},
|
|
50
51
|
};
|
|
51
52
|
export const CustomStyles = {
|
|
52
|
-
render: () => (_jsxs("div", { style: { display: 'flex', gap: '
|
|
53
|
+
render: () => (_jsxs("div", { style: { display: 'flex', gap: '10px', flexWrap: 'wrap' }, children: [_jsx(UnstyledButton, { styles: {
|
|
53
54
|
root: {
|
|
54
|
-
padding:
|
|
55
|
+
padding: `${spacing.md} ${spacing.xl}`,
|
|
55
56
|
borderRadius: '8px',
|
|
56
57
|
background: 'linear-gradient(45deg, #667eea, #764ba2)',
|
|
57
58
|
color: 'white',
|
|
@@ -69,7 +70,7 @@ export const CustomStyles = {
|
|
|
69
70
|
},
|
|
70
71
|
}, children: "Gradient Button" }), _jsx(UnstyledButton, { styles: {
|
|
71
72
|
root: {
|
|
72
|
-
padding:
|
|
73
|
+
padding: `${spacing.sm} ${spacing.lg}`,
|
|
73
74
|
borderRadius: '20px',
|
|
74
75
|
background: 'transparent',
|
|
75
76
|
color: '#667eea',
|
|
@@ -25,10 +25,10 @@ export declare const componentVariants: {
|
|
|
25
25
|
readonly stroke: "white";
|
|
26
26
|
};
|
|
27
27
|
readonly '&:before': {
|
|
28
|
-
readonly top: "-
|
|
29
|
-
readonly right: "-
|
|
30
|
-
readonly left: "-
|
|
31
|
-
readonly bottom: "-
|
|
28
|
+
readonly top: "-1px";
|
|
29
|
+
readonly right: "-1px";
|
|
30
|
+
readonly left: "-1px";
|
|
31
|
+
readonly bottom: "-1px";
|
|
32
32
|
readonly borderRadius: "8px";
|
|
33
33
|
};
|
|
34
34
|
};
|
|
@@ -61,10 +61,10 @@ export declare const componentVariants: {
|
|
|
61
61
|
readonly stroke: "#6D6D6D";
|
|
62
62
|
};
|
|
63
63
|
readonly '&:before': {
|
|
64
|
-
readonly top: "-
|
|
65
|
-
readonly right: "-
|
|
66
|
-
readonly left: "-
|
|
67
|
-
readonly bottom: "-
|
|
64
|
+
readonly top: "-1px";
|
|
65
|
+
readonly right: "-1px";
|
|
66
|
+
readonly left: "-1px";
|
|
67
|
+
readonly bottom: "-1px";
|
|
68
68
|
readonly borderRadius: "8px";
|
|
69
69
|
};
|
|
70
70
|
};
|
|
@@ -96,10 +96,10 @@ export declare const componentVariants: {
|
|
|
96
96
|
readonly stroke: "white";
|
|
97
97
|
};
|
|
98
98
|
readonly '&:before': {
|
|
99
|
-
readonly top: "-
|
|
100
|
-
readonly right: "-
|
|
101
|
-
readonly left: "-
|
|
102
|
-
readonly bottom: "-
|
|
99
|
+
readonly top: "-1px";
|
|
100
|
+
readonly right: "-1px";
|
|
101
|
+
readonly left: "-1px";
|
|
102
|
+
readonly bottom: "-1px";
|
|
103
103
|
readonly borderRadius: "8px";
|
|
104
104
|
};
|
|
105
105
|
};
|
|
@@ -130,10 +130,10 @@ export declare const componentVariants: {
|
|
|
130
130
|
readonly stroke: "white";
|
|
131
131
|
};
|
|
132
132
|
readonly '&:before': {
|
|
133
|
-
readonly top: "-
|
|
134
|
-
readonly right: "-
|
|
135
|
-
readonly left: "-
|
|
136
|
-
readonly bottom: "-
|
|
133
|
+
readonly top: "-1px";
|
|
134
|
+
readonly right: "-1px";
|
|
135
|
+
readonly left: "-1px";
|
|
136
|
+
readonly bottom: "-1px";
|
|
137
137
|
readonly borderRadius: "8px";
|
|
138
138
|
};
|
|
139
139
|
};
|
|
@@ -164,10 +164,10 @@ export declare const componentVariants: {
|
|
|
164
164
|
readonly stroke: "white";
|
|
165
165
|
};
|
|
166
166
|
readonly '&:before': {
|
|
167
|
-
readonly top: "-
|
|
168
|
-
readonly right: "-
|
|
169
|
-
readonly left: "-
|
|
170
|
-
readonly bottom: "-
|
|
167
|
+
readonly top: "-1px";
|
|
168
|
+
readonly right: "-1px";
|
|
169
|
+
readonly left: "-1px";
|
|
170
|
+
readonly bottom: "-1px";
|
|
171
171
|
readonly borderRadius: "8px";
|
|
172
172
|
};
|
|
173
173
|
};
|
|
@@ -200,17 +200,17 @@ export declare const componentVariants: {
|
|
|
200
200
|
readonly stroke: "#6D6D6D";
|
|
201
201
|
};
|
|
202
202
|
readonly '&:before': {
|
|
203
|
-
readonly top: "-
|
|
204
|
-
readonly right: "-
|
|
205
|
-
readonly left: "-
|
|
206
|
-
readonly bottom: "-
|
|
203
|
+
readonly top: "-1px";
|
|
204
|
+
readonly right: "-1px";
|
|
205
|
+
readonly left: "-1px";
|
|
206
|
+
readonly bottom: "-1px";
|
|
207
207
|
readonly borderRadius: "8px";
|
|
208
208
|
};
|
|
209
209
|
};
|
|
210
210
|
};
|
|
211
211
|
readonly nav: {
|
|
212
212
|
readonly background: "white";
|
|
213
|
-
readonly paddingLeft:
|
|
213
|
+
readonly paddingLeft: string;
|
|
214
214
|
readonly color: "#6D6D6D";
|
|
215
215
|
readonly '& .mantine-Button-inner': {
|
|
216
216
|
readonly justifyContent: "flex-start";
|
|
@@ -235,10 +235,10 @@ export declare const componentVariants: {
|
|
|
235
235
|
readonly stroke: "#6D6D6D";
|
|
236
236
|
};
|
|
237
237
|
readonly '&:before': {
|
|
238
|
-
readonly top: "-
|
|
239
|
-
readonly right: "-
|
|
240
|
-
readonly left: "-
|
|
241
|
-
readonly bottom: "-
|
|
238
|
+
readonly top: "-1px";
|
|
239
|
+
readonly right: "-1px";
|
|
240
|
+
readonly left: "-1px";
|
|
241
|
+
readonly bottom: "-1px";
|
|
242
242
|
readonly borderRadius: "8px";
|
|
243
243
|
};
|
|
244
244
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/shared/variants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Buttons/shared/variants.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyLpB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;CAQjB,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { primary, neutral, error, success, warning } from '../../../../constants/colors';
|
|
2
|
+
import { spacing } from '../../../../constants/spacing';
|
|
2
3
|
// Overrides mantine due to rem difference
|
|
3
4
|
const loading = {
|
|
4
|
-
top: '-
|
|
5
|
-
right: '-
|
|
6
|
-
left: '-
|
|
7
|
-
bottom: '-
|
|
5
|
+
top: '-1px',
|
|
6
|
+
right: '-1px',
|
|
7
|
+
left: '-1px',
|
|
8
|
+
bottom: '-1px',
|
|
8
9
|
borderRadius: '8px',
|
|
9
10
|
};
|
|
10
11
|
const disabled = {
|
|
@@ -170,7 +171,7 @@ export const componentVariants = {
|
|
|
170
171
|
},
|
|
171
172
|
nav: {
|
|
172
173
|
background: 'white',
|
|
173
|
-
paddingLeft:
|
|
174
|
+
paddingLeft: spacing.sm,
|
|
174
175
|
color: neutral[200],
|
|
175
176
|
'& .mantine-Button-inner': {
|
|
176
177
|
justifyContent: 'flex-start',
|
|
@@ -100,7 +100,7 @@ export const Default = {
|
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
102
|
export const Sizes = {
|
|
103
|
-
render: () => (_jsxs(Group, { gap: "
|
|
103
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Checkbox, { size: "sm", label: "Small Checkbox", checked: false }), _jsx(Checkbox, { size: "md", label: "Medium Checkbox (Default)", checked: true }), _jsx(Checkbox, { size: "lg", label: "Large Checkbox", checked: false })] })),
|
|
104
104
|
parameters: {
|
|
105
105
|
docs: {
|
|
106
106
|
source: {
|
|
@@ -110,7 +110,7 @@ export const Sizes = {
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
export const States = {
|
|
113
|
-
render: () => (_jsxs(Group, { gap: "
|
|
113
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Checkbox, { label: "Normal Checkbox", checked: true }), _jsx(Checkbox, { label: "Disabled Checkbox", checked: false, disabled: true }), _jsx(Checkbox, { label: "Checkbox with Description", description: "This is a description that provides additional context", checked: false }), _jsx(Checkbox, { label: "Checkbox with Error", error: "This field is required", checked: false })] })),
|
|
114
114
|
parameters: {
|
|
115
115
|
docs: {
|
|
116
116
|
source: {
|
|
@@ -120,7 +120,7 @@ export const States = {
|
|
|
120
120
|
},
|
|
121
121
|
};
|
|
122
122
|
export const CustomStyles = {
|
|
123
|
-
render: () => (_jsxs(Group, { gap: "
|
|
123
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Checkbox, { label: "Custom Styled Checkbox", checked: true, styles: {
|
|
124
124
|
input: {
|
|
125
125
|
'&:checked': {
|
|
126
126
|
backgroundColor: '#ff6b6b',
|
|
@@ -90,7 +90,7 @@ export const Default = {
|
|
|
90
90
|
},
|
|
91
91
|
};
|
|
92
92
|
export const RadioGroup = {
|
|
93
|
-
render: () => (_jsxs(Group, { gap: "
|
|
93
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Radio, { label: "Option 1", value: "option1", checked: true }), _jsx(Radio, { label: "Option 2", value: "option2", checked: false }), _jsx(Radio, { label: "Option 3", value: "option3", checked: false })] })),
|
|
94
94
|
parameters: {
|
|
95
95
|
docs: {
|
|
96
96
|
source: {
|
|
@@ -100,7 +100,7 @@ export const RadioGroup = {
|
|
|
100
100
|
},
|
|
101
101
|
};
|
|
102
102
|
export const States = {
|
|
103
|
-
render: () => (_jsxs(Group, { gap: "
|
|
103
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Radio, { label: "Normal Radio", value: "normal", checked: true }), _jsx(Radio, { label: "Disabled Radio", value: "disabled", checked: false, disabled: true }), _jsx(Radio, { label: "Radio with Description", description: "This is a description that provides additional context", value: "description", checked: false }), _jsx(Radio, { label: "Radio with Error", error: "This field is required", value: "error", checked: false })] })),
|
|
104
104
|
parameters: {
|
|
105
105
|
docs: {
|
|
106
106
|
source: {
|
|
@@ -110,7 +110,7 @@ export const States = {
|
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
export const CustomStyles = {
|
|
113
|
-
render: () => (_jsxs(Group, { gap: "
|
|
113
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Radio, { label: "Custom Styled Radio", value: "custom1", checked: true, styles: {
|
|
114
114
|
radio: {
|
|
115
115
|
'&:checked': {
|
|
116
116
|
backgroundColor: '#ff6b6b',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/RadioList/RadioList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioList.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/RadioList/RadioList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;CACtC;AAED,QAAA,MAAM,SAAS,GAAI,4CAAoD,cAAc,4CAkCpF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Stack } from '../../../Layout/Stack/Stack';
|
|
3
3
|
import { Radio } from '../Radio/Radio';
|
|
4
4
|
import { neutral } from '../../../../constants/colors';
|
|
5
|
+
import { spacing } from '../../../../constants/spacing';
|
|
5
6
|
import { Group } from '../../../Layout/Group/Group';
|
|
6
7
|
const RadioList = ({ data, value, onChange, disabled = false, width }) => {
|
|
7
8
|
const handleChange = (optionValue) => {
|
|
@@ -13,10 +14,10 @@ const RadioList = ({ data, value, onChange, disabled = false, width }) => {
|
|
|
13
14
|
border: `1px solid ${neutral[100]}`,
|
|
14
15
|
borderRadius: '16px',
|
|
15
16
|
overflow: 'hidden',
|
|
16
|
-
padding:
|
|
17
|
+
padding: `${spacing.xxs} 0 ${spacing.xxs} 0`,
|
|
17
18
|
width,
|
|
18
19
|
}, children: data.map((option, index) => (_jsxs(Group, { position: "apart", style: {
|
|
19
|
-
padding:
|
|
20
|
+
padding: `10px ${spacing.md} ${spacing.sm} ${spacing.md}`,
|
|
20
21
|
borderBottom: index < data.length - 1 ? `1px solid ${neutral[100]}` : 'none',
|
|
21
22
|
backgroundColor: 'white',
|
|
22
23
|
}, children: [_jsx(Radio, { value: option.value, label: option.label, checked: value === option.value, onChange: () => handleChange(option.value), disabled: disabled }), option.rightContent && option.rightContent] }, option.value))) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/RadioList/RadioList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/RadioList/RadioList.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA4ChC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgCnC,eAAO,MAAM,OAAO,EAAE,KAsBrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KASvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAoBpB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { RadioList } from './RadioList';
|
|
3
|
+
import { spacing } from '../../../../constants/spacing';
|
|
3
4
|
const meta = {
|
|
4
5
|
title: 'Components/Inputs/Controls/RadioList',
|
|
5
6
|
component: RadioList,
|
|
@@ -117,7 +118,7 @@ export const WithIcons = {
|
|
|
117
118
|
},
|
|
118
119
|
};
|
|
119
120
|
export const States = {
|
|
120
|
-
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '
|
|
121
|
+
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '20px' }, children: [_jsxs("div", { children: [_jsx("h4", { style: { marginBottom: spacing.xs }, children: "Normal State" }), _jsx(RadioList, { data: basicOptions, value: "option2", width: "300px" })] }), _jsxs("div", { children: [_jsx("h4", { style: { marginBottom: spacing.xs }, children: "Disabled State" }), _jsx(RadioList, { data: basicOptions, value: "option1", disabled: true, width: "300px" })] })] })),
|
|
121
122
|
parameters: {
|
|
122
123
|
docs: {
|
|
123
124
|
source: {
|
|
@@ -127,7 +128,7 @@ export const States = {
|
|
|
127
128
|
},
|
|
128
129
|
};
|
|
129
130
|
export const CustomWidth = {
|
|
130
|
-
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '
|
|
131
|
+
render: () => (_jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '20px' }, children: [_jsxs("div", { children: [_jsx("h4", { style: { marginBottom: spacing.xs }, children: "Narrow Width (200px)" }), _jsx(RadioList, { data: basicOptions, value: "option1", width: "200px" })] }), _jsxs("div", { children: [_jsx("h4", { style: { marginBottom: spacing.xs }, children: "Wide Width (500px)" }), _jsx(RadioList, { data: optionsWithDescriptions, value: "pro", width: "500px" })] })] })),
|
|
131
132
|
parameters: {
|
|
132
133
|
docs: {
|
|
133
134
|
source: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"SegmentedControl.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Controls/SegmentedControl/SegmentedControl.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAWtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAkHvC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAenB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAwBpB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAavB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA2B1B,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { SegmentedControl } from './SegmentedControl';
|
|
4
4
|
import { Group } from '../../../Layout/Group/Group';
|
|
5
5
|
import { Stack } from '../../../Layout/Stack/Stack';
|
|
6
|
+
import { spacing } from '../../../../constants/spacing';
|
|
6
7
|
const sampleData = [
|
|
7
8
|
{ label: 'React', value: 'react' },
|
|
8
9
|
{ label: 'Angular', value: 'ng' },
|
|
@@ -157,7 +158,7 @@ export const Default = {
|
|
|
157
158
|
},
|
|
158
159
|
};
|
|
159
160
|
export const Sizes = {
|
|
160
|
-
render: () => (_jsxs(Stack, { gap:
|
|
161
|
+
render: () => (_jsxs(Stack, { gap: spacing.lg, children: [_jsx(SegmentedControl, { size: "sm", data: sampleData, value: "react", onChange: () => { } }), _jsx(SegmentedControl, { size: "md", data: sampleData, value: "ng", onChange: () => { } }), _jsx(SegmentedControl, { size: "lg", data: sampleData, value: "vue", onChange: () => { } })] })),
|
|
161
162
|
parameters: {
|
|
162
163
|
docs: {
|
|
163
164
|
source: {
|
|
@@ -177,7 +178,7 @@ export const StringData = {
|
|
|
177
178
|
},
|
|
178
179
|
};
|
|
179
180
|
export const States = {
|
|
180
|
-
render: () => (_jsxs(Stack, { gap:
|
|
181
|
+
render: () => (_jsxs(Stack, { gap: spacing.lg, style: { minWidth: '280px' }, children: [_jsx(SegmentedControl, { data: sampleData, value: "react", onChange: () => { } }), _jsx(SegmentedControl, { data: sampleData, value: "react", onChange: () => { }, disabled: true }), _jsx(SegmentedControl, { data: [
|
|
181
182
|
{ value: 'preview', label: 'Preview', disabled: true },
|
|
182
183
|
{ value: 'code', label: 'Code' },
|
|
183
184
|
{ value: 'export', label: 'Export' },
|
|
@@ -191,7 +192,7 @@ export const States = {
|
|
|
191
192
|
},
|
|
192
193
|
};
|
|
193
194
|
export const FullWidth = {
|
|
194
|
-
render: () => (_jsx("div", { style: { width: '
|
|
195
|
+
render: () => (_jsx("div", { style: { width: '360px', maxWidth: '100%' }, children: _jsx(SegmentedControl, { fullWidth: true, data: sampleData, value: "react", onChange: () => { } }) })),
|
|
195
196
|
parameters: {
|
|
196
197
|
docs: {
|
|
197
198
|
source: {
|
|
@@ -201,7 +202,7 @@ export const FullWidth = {
|
|
|
201
202
|
},
|
|
202
203
|
};
|
|
203
204
|
export const Orientation = {
|
|
204
|
-
render: () => (_jsxs(Group, { gap:
|
|
205
|
+
render: () => (_jsxs(Group, { gap: spacing.xxl, align: "flex-start", children: [_jsx(SegmentedControl, { data: sampleData, value: "ng", onChange: () => { }, orientation: "horizontal" }), _jsx(SegmentedControl, { data: sampleData, value: "vue", onChange: () => { }, orientation: "vertical" })] })),
|
|
205
206
|
parameters: {
|
|
206
207
|
docs: {
|
|
207
208
|
source: {
|
|
@@ -211,7 +212,7 @@ export const Orientation = {
|
|
|
211
212
|
},
|
|
212
213
|
};
|
|
213
214
|
export const CustomStyles = {
|
|
214
|
-
render: () => (_jsx(Group, { gap: "
|
|
215
|
+
render: () => (_jsx(Group, { gap: "20px", children: _jsx(SegmentedControl, { data: sampleData, value: "react", onChange: () => { }, styles: {
|
|
215
216
|
root: {
|
|
216
217
|
backgroundColor: '#f0f4f8',
|
|
217
218
|
},
|
|
@@ -3,8 +3,8 @@ declare const componentSizes: {
|
|
|
3
3
|
readonly sm: {
|
|
4
4
|
readonly fontSize: string;
|
|
5
5
|
readonly lineHeight: string;
|
|
6
|
-
readonly width:
|
|
7
|
-
readonly height:
|
|
6
|
+
readonly width: 24;
|
|
7
|
+
readonly height: 18;
|
|
8
8
|
readonly mantineSize: "md";
|
|
9
9
|
readonly thumbScale: 1.3;
|
|
10
10
|
readonly thumbTranslate: 2;
|
|
@@ -12,8 +12,8 @@ declare const componentSizes: {
|
|
|
12
12
|
readonly md: {
|
|
13
13
|
readonly fontSize: string;
|
|
14
14
|
readonly lineHeight: string;
|
|
15
|
-
readonly width:
|
|
16
|
-
readonly height:
|
|
15
|
+
readonly width: 48;
|
|
16
|
+
readonly height: 28;
|
|
17
17
|
readonly mantineSize: "xl";
|
|
18
18
|
readonly thumbScale: 1.3;
|
|
19
19
|
readonly thumbTranslate: 10;
|
|
@@ -4,8 +4,8 @@ import { neutral, primary } from '../../../../constants/colors';
|
|
|
4
4
|
import { fontBase, fontSize } from '../../../../constants/font';
|
|
5
5
|
// Size Presets
|
|
6
6
|
const componentSizes = {
|
|
7
|
-
sm: { width:
|
|
8
|
-
md: { width:
|
|
7
|
+
sm: { width: 24, height: 18, mantineSize: 'md', thumbScale: 1.3, thumbTranslate: 2, ...fontSize['sm'] },
|
|
8
|
+
md: { width: 48, height: 28, mantineSize: 'xl', thumbScale: 1.3, thumbTranslate: 10, ...fontSize['md'] },
|
|
9
9
|
};
|
|
10
10
|
const Toggle = ({ checked, onChange, styles, size = 'md', label, ...props }) => {
|
|
11
11
|
const selectedSize = componentSizes[size];
|
|
@@ -13,11 +13,11 @@ const Toggle = ({ checked, onChange, styles, size = 'md', label, ...props }) =>
|
|
|
13
13
|
container: {
|
|
14
14
|
display: 'flex',
|
|
15
15
|
alignItems: 'center',
|
|
16
|
-
gap: '
|
|
16
|
+
gap: '10px',
|
|
17
17
|
},
|
|
18
18
|
track: {
|
|
19
|
-
width: `${selectedSize.width}
|
|
20
|
-
height: `${selectedSize.height}
|
|
19
|
+
width: `${selectedSize.width}px`,
|
|
20
|
+
height: `${selectedSize.height}px`,
|
|
21
21
|
transition: 'background-color 300ms ease-in-out',
|
|
22
22
|
cursor: 'pointer',
|
|
23
23
|
backgroundColor: checked ? primary[200] : neutral[50],
|
|
@@ -114,7 +114,7 @@ export const Default = {
|
|
|
114
114
|
},
|
|
115
115
|
};
|
|
116
116
|
export const Sizes = {
|
|
117
|
-
render: () => (_jsxs(Group, { gap: "
|
|
117
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { size: "sm", label: "Small Toggle", checked: true }), _jsx(Toggle, { size: "md", label: "Medium Toggle (Default)", checked: false })] })),
|
|
118
118
|
parameters: {
|
|
119
119
|
docs: {
|
|
120
120
|
source: {
|
|
@@ -124,7 +124,7 @@ export const Sizes = {
|
|
|
124
124
|
},
|
|
125
125
|
};
|
|
126
126
|
export const States = {
|
|
127
|
-
render: () => (_jsxs(Group, { gap: "
|
|
127
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { label: "Normal Toggle", checked: true }), _jsx(Toggle, { label: "Disabled Toggle", checked: false, disabled: true }), _jsx(Toggle, { label: "Toggle with Description", description: "This is a description that provides additional context", checked: true }), _jsx(Toggle, { label: "Toggle with Error", error: "This field is required", checked: false })] })),
|
|
128
128
|
parameters: {
|
|
129
129
|
docs: {
|
|
130
130
|
source: {
|
|
@@ -134,7 +134,7 @@ export const States = {
|
|
|
134
134
|
},
|
|
135
135
|
};
|
|
136
136
|
export const WithoutLabel = {
|
|
137
|
-
render: () => (_jsxs(Group, { gap: "
|
|
137
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { checked: true }), _jsx(Toggle, { checked: false })] })),
|
|
138
138
|
parameters: {
|
|
139
139
|
docs: {
|
|
140
140
|
source: {
|
|
@@ -144,7 +144,7 @@ export const WithoutLabel = {
|
|
|
144
144
|
},
|
|
145
145
|
};
|
|
146
146
|
export const CustomStyles = {
|
|
147
|
-
render: () => (_jsxs(Group, { gap: "
|
|
147
|
+
render: () => (_jsxs(Group, { gap: "20px", children: [_jsx(Toggle, { label: "Custom Styled Toggle", checked: true, styles: {
|
|
148
148
|
track: {
|
|
149
149
|
backgroundColor: '#ff6b6b',
|
|
150
150
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEhI,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../../src/components/Inputs/Dates/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6C,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEhI,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAE,SAAQ,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IAC7I,IAAI,CAAC,EAAE,MAAM,OAAO,cAAc,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,EAAE,qEAQhF,eAAe,CAAC,CAAC,CAAC,4CA+EpB,CAAC"}
|
|
@@ -3,15 +3,16 @@ import { DatePickerInput as MantineDatePickerInput } from '@mantine/dates';
|
|
|
3
3
|
import { createStyles } from '@mantine/core';
|
|
4
4
|
import { neutral } from '../../../../constants/colors';
|
|
5
5
|
import { fontBase } from '../../../../constants/font';
|
|
6
|
+
import { spacing } from '../../../../constants/spacing';
|
|
6
7
|
import { componentSizes } from '../../Dropdowns/shared/sizes';
|
|
7
8
|
export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder = 'Pick Date', showIcon = true, styles, ...props }) => {
|
|
8
9
|
const selectedSize = componentSizes[size];
|
|
9
10
|
const { classes } = createStyles(() => ({
|
|
10
11
|
root: {
|
|
11
|
-
width: fullWidth ? '100%' : width || (props.type === 'range' ? `${selectedSize.minWidth * 1.2}
|
|
12
|
+
width: fullWidth ? '100%' : width || (props.type === 'range' ? `${selectedSize.minWidth * 1.2}px` : `${selectedSize.minWidth}px`), // Range inputs are slightly wider than regular inputs
|
|
12
13
|
},
|
|
13
14
|
input: {
|
|
14
|
-
height: `${selectedSize.height}
|
|
15
|
+
height: `${selectedSize.height}px`,
|
|
15
16
|
paddingRight: selectedSize.inputPadding,
|
|
16
17
|
...fontBase,
|
|
17
18
|
fontSize: selectedSize.fontSize,
|
|
@@ -30,7 +31,7 @@ export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder
|
|
|
30
31
|
},
|
|
31
32
|
label: {
|
|
32
33
|
...fontBase,
|
|
33
|
-
fontSize: `calc(${selectedSize.fontSize} -
|
|
34
|
+
fontSize: `calc(${selectedSize.fontSize} - 1px)`,
|
|
34
35
|
color: neutral[200],
|
|
35
36
|
},
|
|
36
37
|
calendar: {
|
|
@@ -64,7 +65,7 @@ export const DatePicker = ({ size = 'md', width, fullWidth = false, placeholder
|
|
|
64
65
|
},
|
|
65
66
|
...styles,
|
|
66
67
|
}))();
|
|
67
|
-
return (_jsx(MantineDatePickerInput, { icon: showIcon ? _jsx("i", { className: "far fa-calendar", style: { fontSize: 14, marginLeft:
|
|
68
|
+
return (_jsx(MantineDatePickerInput, { icon: showIcon ? _jsx("i", { className: "far fa-calendar", style: { fontSize: 14, marginLeft: spacing.xxs } }) : undefined, radius: "lg", size: "xl", classNames: {
|
|
68
69
|
root: classes.root,
|
|
69
70
|
input: classes.input,
|
|
70
71
|
placeholder: classes.placeholder,
|