@dxc-technology/halstack-react 0.0.0-1bf97dd → 0.0.0-1bfe223
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/BackgroundColorContext.d.ts +1 -10
- package/BackgroundColorContext.js +5 -23
- package/HalstackContext.d.ts +1221 -0
- package/HalstackContext.js +310 -0
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +117 -193
- package/accordion/Accordion.stories.tsx +283 -0
- package/accordion/Accordion.test.js +56 -0
- package/accordion/types.d.ts +12 -23
- package/accordion-group/AccordionGroup.d.ts +5 -4
- package/accordion-group/AccordionGroup.js +38 -107
- package/accordion-group/AccordionGroup.stories.tsx +95 -68
- package/accordion-group/AccordionGroup.test.js +98 -0
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/types.d.ts +18 -23
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +47 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.js +23 -59
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +75 -0
- package/alert/types.d.ts +5 -5
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +142 -40
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +54 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +43 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +37 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +30 -81
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +13 -0
- package/box/types.d.ts +3 -14
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +89 -0
- package/bulleted-list/BulletedList.stories.tsx +115 -0
- package/bulleted-list/types.d.ts +38 -0
- package/bulleted-list/types.js +5 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +63 -122
- package/button/Button.stories.tsx +164 -96
- package/button/Button.test.js +38 -0
- package/button/types.d.ts +12 -12
- package/card/Card.d.ts +1 -1
- package/card/Card.js +58 -102
- package/card/Card.stories.tsx +13 -43
- package/card/Card.test.js +39 -0
- package/card/types.d.ts +6 -11
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +144 -182
- package/checkbox/Checkbox.stories.tsx +166 -136
- package/checkbox/Checkbox.test.js +199 -0
- package/checkbox/types.d.ts +19 -7
- package/chip/Chip.d.ts +1 -1
- package/chip/Chip.js +47 -125
- package/chip/Chip.stories.tsx +123 -30
- package/chip/Chip.test.js +41 -0
- package/chip/types.d.ts +10 -18
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +6 -12
- package/common/variables.d.ts +1367 -0
- package/common/variables.js +1001 -1340
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/container/types.js +5 -0
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +214 -0
- package/date-input/DateInput.js +173 -308
- package/date-input/DateInput.stories.tsx +203 -56
- package/date-input/DateInput.test.js +808 -0
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +115 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +58 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +100 -0
- package/date-input/types.d.ts +86 -22
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +68 -129
- package/dialog/Dialog.stories.tsx +320 -167
- package/dialog/Dialog.test.js +307 -0
- package/dialog/types.d.ts +18 -25
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +244 -327
- package/dropdown/Dropdown.stories.tsx +438 -0
- package/dropdown/Dropdown.test.js +599 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +63 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +67 -0
- package/dropdown/types.d.ts +36 -27
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +266 -298
- package/file-input/FileInput.stories.tsx +618 -0
- package/file-input/FileInput.test.js +459 -0
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +51 -100
- package/file-input/types.d.ts +53 -11
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +57 -0
- package/flex/Flex.stories.tsx +112 -0
- package/flex/types.d.ts +97 -0
- package/flex/types.js +5 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +72 -200
- package/footer/Footer.stories.tsx +57 -37
- package/footer/Footer.test.js +85 -0
- package/footer/Icons.d.ts +3 -0
- package/footer/Icons.js +67 -8
- package/footer/types.d.ts +25 -26
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/grid/types.js +5 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +99 -203
- package/header/Header.stories.tsx +152 -63
- package/header/Header.test.js +66 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +4 -9
- package/header/types.d.ts +5 -19
- package/heading/Heading.js +10 -32
- package/heading/Heading.stories.tsx +3 -2
- package/heading/Heading.test.js +169 -0
- package/heading/types.d.ts +7 -7
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +43 -0
- package/inset/Inset.stories.tsx +230 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +16 -6
- package/layout/ApplicationLayout.js +83 -174
- package/layout/ApplicationLayout.stories.tsx +85 -94
- package/layout/Icons.d.ts +8 -0
- package/layout/Icons.js +51 -48
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +13 -0
- package/layout/types.d.ts +19 -35
- package/link/Link.d.ts +3 -2
- package/link/Link.js +64 -110
- package/link/Link.stories.tsx +159 -52
- package/link/Link.test.js +63 -0
- package/link/types.d.ts +15 -35
- package/main.d.ts +17 -18
- package/main.js +68 -120
- package/nav-tabs/NavTabs.d.ts +8 -0
- package/nav-tabs/NavTabs.js +93 -0
- package/nav-tabs/NavTabs.stories.tsx +276 -0
- package/nav-tabs/NavTabs.test.js +76 -0
- package/nav-tabs/Tab.d.ts +4 -0
- package/nav-tabs/Tab.js +118 -0
- package/nav-tabs/types.d.ts +52 -0
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +27 -43
- package/number-input/NumberInput.stories.tsx +44 -28
- package/number-input/NumberInput.test.js +830 -0
- package/number-input/types.d.ts +28 -15
- package/package.json +46 -45
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +21 -47
- package/paginator/Paginator.js +34 -91
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +335 -0
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.d.ts +5 -0
- package/paragraph/Paragraph.js +22 -0
- package/paragraph/Paragraph.stories.tsx +27 -0
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -123
- package/password-input/PasswordInput.stories.tsx +3 -35
- package/password-input/PasswordInput.test.js +198 -0
- package/password-input/types.d.ts +21 -17
- package/progress-bar/ProgressBar.js +65 -91
- package/progress-bar/ProgressBar.stories.tsx +93 -0
- package/progress-bar/ProgressBar.test.js +93 -0
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +94 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +124 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +235 -0
- package/radio-group/RadioGroup.stories.tsx +214 -0
- package/radio-group/RadioGroup.test.js +756 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultset-table/Icons.d.ts +7 -0
- package/resultset-table/Icons.js +47 -0
- package/resultset-table/ResultsetTable.js +159 -0
- package/resultset-table/ResultsetTable.stories.tsx +300 -0
- package/resultset-table/ResultsetTable.test.js +305 -0
- package/{resultsetTable → resultset-table}/types.d.ts +8 -8
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +89 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +143 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +87 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +230 -503
- package/select/Select.stories.tsx +603 -204
- package/select/Select.test.js +2370 -0
- package/select/types.d.ts +209 -0
- package/select/types.js +5 -0
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +47 -0
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +131 -71
- package/sidenav/Sidenav.stories.tsx +251 -134
- package/sidenav/Sidenav.test.js +37 -0
- package/sidenav/types.d.ts +52 -26
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +148 -180
- package/slider/Slider.test.js +254 -0
- package/slider/types.d.ts +11 -3
- package/spinner/Spinner.js +31 -75
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -26
- package/spinner/Spinner.test.js +55 -0
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +149 -114
- package/switch/Switch.stories.tsx +45 -68
- package/switch/Switch.test.js +180 -0
- package/switch/types.d.ts +13 -5
- package/table/Table.js +8 -30
- package/table/{Table.stories.jsx → Table.stories.tsx} +81 -1
- package/table/Table.test.js +21 -0
- package/table/types.d.ts +8 -8
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +116 -0
- package/tabs/Tabs.d.ts +1 -1
- package/tabs/Tabs.js +317 -146
- package/tabs/Tabs.stories.tsx +123 -18
- package/tabs/Tabs.test.js +294 -0
- package/tabs/types.d.ts +46 -24
- package/tag/Tag.d.ts +1 -1
- package/tag/Tag.js +43 -85
- package/tag/Tag.stories.tsx +38 -28
- package/tag/Tag.test.js +49 -0
- package/tag/types.d.ts +25 -16
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +56 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +67 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +84 -0
- package/text-input/TextInput.js +325 -539
- package/text-input/TextInput.stories.tsx +280 -271
- package/text-input/TextInput.test.js +1739 -0
- package/text-input/types.d.ts +71 -25
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +85 -165
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.js +406 -0
- package/textarea/types.d.ts +141 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +95 -111
- package/toggle-group/ToggleGroup.stories.tsx +76 -36
- package/toggle-group/ToggleGroup.test.js +137 -0
- package/toggle-group/types.d.ts +66 -36
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +23 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +1119 -1
- package/useTheme.js +4 -11
- package/useTranslatedLabels.d.ts +85 -0
- package/useTranslatedLabels.js +14 -0
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +94 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +124 -0
- package/wizard/Wizard.d.ts +1 -1
- package/wizard/Wizard.js +122 -103
- package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +48 -19
- package/wizard/Wizard.test.js +114 -0
- package/wizard/types.d.ts +14 -14
- package/ThemeContext.d.ts +0 -15
- package/ThemeContext.js +0 -243
- package/V3Select/V3Select.js +0 -455
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -260
- package/V3Textarea/index.d.ts +0 -27
- package/card/ice-cream.jpg +0 -0
- package/common/RequiredComponent.js +0 -32
- package/date/Date.js +0 -373
- package/date/index.d.ts +0 -27
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -611
- package/input-text/index.d.ts +0 -36
- package/list/List.d.ts +0 -7
- package/list/List.js +0 -37
- package/list/List.stories.tsx +0 -70
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/progress-bar/ProgressBar.stories.jsx +0 -58
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -174
- package/radio/Radio.stories.tsx +0 -192
- package/radio/types.d.ts +0 -54
- package/resultsetTable/ResultsetTable.js +0 -251
- package/row/Row.d.ts +0 -11
- package/row/Row.js +0 -124
- package/row/Row.stories.tsx +0 -223
- package/select/index.d.ts +0 -131
- package/slider/Slider.stories.tsx +0 -177
- package/stack/Stack.d.ts +0 -10
- package/stack/Stack.js +0 -94
- package/stack/Stack.stories.tsx +0 -150
- package/text/Text.d.ts +0 -7
- package/text/Text.js +0 -30
- package/text/Text.stories.tsx +0 -19
- package/textarea/Textarea.stories.jsx +0 -135
- package/textarea/index.d.ts +0 -127
- package/toggle/Toggle.js +0 -186
- package/toggle/index.d.ts +0 -21
- package/upload/Upload.js +0 -201
- package/upload/buttons-upload/ButtonsUpload.js +0 -111
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -115
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -109
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -104
- package/upload/transactions/Transactions.js +0 -94
- package/wizard/Icons.js +0 -65
- /package/{radio → action-icon}/types.js +0 -0
- /package/{resultsetTable → badge}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → bleed/types.js} +0 -0
- /package/{resultsetTable → resultset-table}/ResultsetTable.d.ts +0 -0
package/select/index.d.ts
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
-
type Margin = {
|
|
3
|
-
top?: Space;
|
|
4
|
-
bottom?: Space;
|
|
5
|
-
left?: Space;
|
|
6
|
-
right?: Space;
|
|
7
|
-
};
|
|
8
|
-
type SVG = React.SVGProps<SVGSVGElement> | React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
9
|
-
|
|
10
|
-
type OptionGroup = {
|
|
11
|
-
/**
|
|
12
|
-
* Label of the group to be shown in the select's listbox.
|
|
13
|
-
*/
|
|
14
|
-
label: string;
|
|
15
|
-
/**
|
|
16
|
-
* List of the grouped options.
|
|
17
|
-
*/
|
|
18
|
-
options: Option[];
|
|
19
|
-
};
|
|
20
|
-
type Option = {
|
|
21
|
-
/**
|
|
22
|
-
* Element used as the icon that will be placed before the option label.
|
|
23
|
-
* It can be a url of an image or an inline SVG. If the url option
|
|
24
|
-
* is the chosen one, take into account that the component's
|
|
25
|
-
* color styling tokens will not be applied to the image.
|
|
26
|
-
*/
|
|
27
|
-
icon?: string | SVG;
|
|
28
|
-
/**
|
|
29
|
-
* Label of the option to be shown in the select's listbox.
|
|
30
|
-
*/
|
|
31
|
-
label: string;
|
|
32
|
-
/**
|
|
33
|
-
* Value of the option. It should be unique and
|
|
34
|
-
* not an empty string, which is reserved to the empty option added
|
|
35
|
-
* by optional prop.
|
|
36
|
-
*/
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
type Props = {
|
|
41
|
-
/**
|
|
42
|
-
* Text to be placed above the select.
|
|
43
|
-
*/
|
|
44
|
-
label?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Name attribute of the input element. This attribute will allow users
|
|
47
|
-
* to find the component's value during the submit event. In this event,
|
|
48
|
-
* the component's value will always be a regular string, for both single
|
|
49
|
-
* and multiple selection modes, been in the first one a single option
|
|
50
|
-
* value and in the multiple variant more than one option value,
|
|
51
|
-
* separated by commas.
|
|
52
|
-
*/
|
|
53
|
-
name?: string;
|
|
54
|
-
/**
|
|
55
|
-
* Value of the select. If undefined, the component will be uncontrolled
|
|
56
|
-
* and the value will be managed internally by the component.
|
|
57
|
-
*/
|
|
58
|
-
value?: string | string[];
|
|
59
|
-
/**
|
|
60
|
-
* An array of objects representing the selectable options.
|
|
61
|
-
*/
|
|
62
|
-
options?: Option[] | OptionGroup[];
|
|
63
|
-
/**
|
|
64
|
-
* Helper text to be placed above the select.
|
|
65
|
-
*/
|
|
66
|
-
helperText?: string;
|
|
67
|
-
/**
|
|
68
|
-
* Text to be put as placeholder of the select.
|
|
69
|
-
*/
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/**
|
|
72
|
-
* If true, the component will be disabled.
|
|
73
|
-
*/
|
|
74
|
-
disabled?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* If true, the select will be optional, showing '(Optional)'
|
|
77
|
-
* next to the label and adding a default first option with an empty string as value,
|
|
78
|
-
* been the placeholder (if defined) its label. Otherwise, the field will be
|
|
79
|
-
* considered required and an error will be passed as a parameter to the
|
|
80
|
-
* OnBlur and onChange functions if an option wasn't selected.
|
|
81
|
-
*/
|
|
82
|
-
optional?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* If true, enables search functionality.
|
|
85
|
-
*/
|
|
86
|
-
searchable?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* If true, the select component will support multiple selected options.
|
|
89
|
-
* In that case, value will be an array of strings with each selected
|
|
90
|
-
* option value.
|
|
91
|
-
*/
|
|
92
|
-
multiple?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* This function will be called when the user selects an option.
|
|
95
|
-
* An object including the current value and the error (if the value entered is not valid)
|
|
96
|
-
* will be passed to this function. If there is no error, error will be null.
|
|
97
|
-
*/
|
|
98
|
-
onChange?: (value: string | string[]) => void;
|
|
99
|
-
/**
|
|
100
|
-
* This function will be called when the select loses the focus. An
|
|
101
|
-
* object including the value (or values) and the error (if the value
|
|
102
|
-
* selected is not valid) will be passed to this function. If there is no error,
|
|
103
|
-
* error will be null.
|
|
104
|
-
*/
|
|
105
|
-
onBlur?: (val: { value: string | string[]; error: string }) => void;
|
|
106
|
-
/**
|
|
107
|
-
* If it is defined, the component will change its appearance, showing
|
|
108
|
-
* the error below the select component. If it is not defined, the error
|
|
109
|
-
* messages will be managed internally, but never displayed on its own.
|
|
110
|
-
*/
|
|
111
|
-
error?: string;
|
|
112
|
-
/**
|
|
113
|
-
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
114
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
|
115
|
-
*/
|
|
116
|
-
margin?: Space | Margin;
|
|
117
|
-
/**
|
|
118
|
-
* Size of the component ('small' | 'medium' | 'large' | 'fillParent').
|
|
119
|
-
*/
|
|
120
|
-
size?: "small" | "medium" | "large" | "fillParent";
|
|
121
|
-
/**
|
|
122
|
-
* Value of the tabindex attribute.
|
|
123
|
-
*/
|
|
124
|
-
tabIndex?: number;
|
|
125
|
-
/**
|
|
126
|
-
* Reference to the component.
|
|
127
|
-
*/
|
|
128
|
-
ref?: React.RefObject<HTMLDivElement>;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
export default function DxcSelect(props: Props): JSX.Element;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import DxcSlider from "./Slider";
|
|
3
|
-
import { BackgroundColorProvider } from "../BackgroundColorContext";
|
|
4
|
-
import Title from "../../.storybook/components/Title";
|
|
5
|
-
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
6
|
-
import DarkContainer from "../../.storybook/components/DarkSection";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
title: "Slider",
|
|
10
|
-
component: DxcSlider,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const labelFormat = (value) => `${value}E100000000000000000000000`;
|
|
14
|
-
|
|
15
|
-
export const Chromatic = () => (
|
|
16
|
-
<>
|
|
17
|
-
<Title title="States" theme="light" level={2} />
|
|
18
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
19
|
-
<Title title="Hovered" theme="light" level={4} />
|
|
20
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
21
|
-
</ExampleContainer>
|
|
22
|
-
<ExampleContainer pseudoState="pseudo-active">
|
|
23
|
-
<Title title="Active" theme="light" level={4} />
|
|
24
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
25
|
-
</ExampleContainer>
|
|
26
|
-
<ExampleContainer pseudoState="pseudo-focus">
|
|
27
|
-
<Title title="Focused" theme="light" level={4} />
|
|
28
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
29
|
-
</ExampleContainer>
|
|
30
|
-
<ExampleContainer>
|
|
31
|
-
<Title title="Disabled" theme="light" level={4} />
|
|
32
|
-
<DxcSlider label="Slider" helperText="Help message" disabled showLimitsValues />
|
|
33
|
-
</ExampleContainer>
|
|
34
|
-
<ExampleContainer>
|
|
35
|
-
<Title title="Disabled discrete slider with input" theme="light" level={4} />
|
|
36
|
-
<DxcSlider
|
|
37
|
-
label="Slider"
|
|
38
|
-
helperText="Help message"
|
|
39
|
-
disabled
|
|
40
|
-
value={40}
|
|
41
|
-
minValue={0}
|
|
42
|
-
maxValue={50}
|
|
43
|
-
showLimitsValues
|
|
44
|
-
showInput
|
|
45
|
-
marks
|
|
46
|
-
step={10}
|
|
47
|
-
/>
|
|
48
|
-
</ExampleContainer>
|
|
49
|
-
<Title title="Variants" theme="light" level={2} />
|
|
50
|
-
<ExampleContainer>
|
|
51
|
-
<Title title="Continuous slider" theme="light" level={4} />
|
|
52
|
-
<DxcSlider value={65} label="Slider" helperText="Help message" showLimitsValues />
|
|
53
|
-
</ExampleContainer>
|
|
54
|
-
<ExampleContainer>
|
|
55
|
-
<Title title="Discrete slider" theme="light" level={4} />
|
|
56
|
-
<DxcSlider value={20} label="Slider" helperText="Help message" showLimitsValues marks step={5} />
|
|
57
|
-
</ExampleContainer>
|
|
58
|
-
<ExampleContainer>
|
|
59
|
-
<Title title="Discrete slider with input" theme="light" level={4} />
|
|
60
|
-
<DxcSlider
|
|
61
|
-
value={20}
|
|
62
|
-
minValue={0}
|
|
63
|
-
maxValue={50}
|
|
64
|
-
label="Slider"
|
|
65
|
-
helperText="Help message"
|
|
66
|
-
showLimitsValues
|
|
67
|
-
showInput
|
|
68
|
-
marks
|
|
69
|
-
step={10}
|
|
70
|
-
/>
|
|
71
|
-
</ExampleContainer>
|
|
72
|
-
<BackgroundColorProvider color="#333333">
|
|
73
|
-
<DarkContainer>
|
|
74
|
-
<Title title="Dark" theme="dark" level={2} />
|
|
75
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
76
|
-
<Title title="Hovered" theme="dark" level={4} />
|
|
77
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
78
|
-
</ExampleContainer>
|
|
79
|
-
<ExampleContainer pseudoState="pseudo-active">
|
|
80
|
-
<Title title="Active" theme="dark" level={4} />
|
|
81
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
82
|
-
</ExampleContainer>
|
|
83
|
-
<ExampleContainer pseudoState="pseudo-focus">
|
|
84
|
-
<Title title="Focused" theme="dark" level={4} />
|
|
85
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues />
|
|
86
|
-
</ExampleContainer>
|
|
87
|
-
<ExampleContainer>
|
|
88
|
-
<Title title="Disabled" theme="dark" level={4} />
|
|
89
|
-
<DxcSlider label="Slider" helperText="Help message" disabled showLimitsValues />
|
|
90
|
-
</ExampleContainer>
|
|
91
|
-
<ExampleContainer>
|
|
92
|
-
<Title title="Disabled discrete slider with input" theme="dark" level={4} />
|
|
93
|
-
<DxcSlider
|
|
94
|
-
label="Slider"
|
|
95
|
-
helperText="Help message"
|
|
96
|
-
disabled
|
|
97
|
-
value={40}
|
|
98
|
-
minValue={0}
|
|
99
|
-
maxValue={50}
|
|
100
|
-
showLimitsValues
|
|
101
|
-
showInput
|
|
102
|
-
marks
|
|
103
|
-
step={5}
|
|
104
|
-
/>
|
|
105
|
-
</ExampleContainer>
|
|
106
|
-
<ExampleContainer>
|
|
107
|
-
<Title title="Continuous slider" theme="dark" level={4} />
|
|
108
|
-
<DxcSlider value={65} label="Slider" helperText="Help message" showLimitsValues />
|
|
109
|
-
</ExampleContainer>
|
|
110
|
-
<ExampleContainer>
|
|
111
|
-
<Title title="Discrete slider" theme="dark" level={4} />
|
|
112
|
-
<DxcSlider value={20} label="Slider" helperText="Help message" showLimitsValues marks step={5} />
|
|
113
|
-
</ExampleContainer>
|
|
114
|
-
<ExampleContainer>
|
|
115
|
-
<Title title="Discrete slider with input" theme="dark" level={4} />
|
|
116
|
-
<DxcSlider
|
|
117
|
-
value={20}
|
|
118
|
-
minValue={0}
|
|
119
|
-
maxValue={50}
|
|
120
|
-
label="Slider"
|
|
121
|
-
helperText="Help message"
|
|
122
|
-
showLimitsValues
|
|
123
|
-
showInput
|
|
124
|
-
marks
|
|
125
|
-
step={10}
|
|
126
|
-
/>
|
|
127
|
-
</ExampleContainer>
|
|
128
|
-
</DarkContainer>
|
|
129
|
-
</BackgroundColorProvider>
|
|
130
|
-
<Title title="Margins" theme="light" level={2} />
|
|
131
|
-
<ExampleContainer>
|
|
132
|
-
<Title title="Xxsmall" theme="light" level={4} />
|
|
133
|
-
<DxcSlider label="Xxsmall" margin="xxsmall" />
|
|
134
|
-
</ExampleContainer>
|
|
135
|
-
<ExampleContainer>
|
|
136
|
-
<Title title="Xsmall" theme="light" level={4} />
|
|
137
|
-
<DxcSlider label="Xsmall" margin="xsmall" />
|
|
138
|
-
</ExampleContainer>
|
|
139
|
-
<ExampleContainer>
|
|
140
|
-
<Title title="Small" theme="light" level={4} />
|
|
141
|
-
<DxcSlider label="Small" margin="small" />
|
|
142
|
-
</ExampleContainer>
|
|
143
|
-
<ExampleContainer>
|
|
144
|
-
<Title title="Medium" theme="light" level={4} />
|
|
145
|
-
<DxcSlider label="Medium" margin="medium" />
|
|
146
|
-
</ExampleContainer>
|
|
147
|
-
<ExampleContainer>
|
|
148
|
-
<Title title="Large" theme="light" level={4} />
|
|
149
|
-
<DxcSlider label="Large" margin="large" />
|
|
150
|
-
</ExampleContainer>
|
|
151
|
-
<ExampleContainer>
|
|
152
|
-
<Title title="Xlarge" theme="light" level={4} />
|
|
153
|
-
<DxcSlider label="Xlarge" margin="xlarge" />
|
|
154
|
-
</ExampleContainer>
|
|
155
|
-
<ExampleContainer>
|
|
156
|
-
<Title title="Xxlarge" theme="light" level={4} />
|
|
157
|
-
<DxcSlider label="Xxlarge" margin="xxlarge" />
|
|
158
|
-
</ExampleContainer>
|
|
159
|
-
<Title title="Sizes" theme="light" level={2} />
|
|
160
|
-
<ExampleContainer>
|
|
161
|
-
<Title title="Medium" theme="light" level={4} />
|
|
162
|
-
<DxcSlider label="Medium" size="medium" />
|
|
163
|
-
</ExampleContainer>
|
|
164
|
-
<ExampleContainer>
|
|
165
|
-
<Title title="Large" theme="light" level={4} />
|
|
166
|
-
<DxcSlider label="Large" size="large" />
|
|
167
|
-
</ExampleContainer>
|
|
168
|
-
<ExampleContainer>
|
|
169
|
-
<Title title="FillParent" theme="light" level={4} />
|
|
170
|
-
<DxcSlider label="FillParent" size="fillParent" />
|
|
171
|
-
</ExampleContainer>
|
|
172
|
-
<ExampleContainer>
|
|
173
|
-
<Title title="Large limit values labels" theme="light" level={4} />
|
|
174
|
-
<DxcSlider label="Slider" helperText="Help message" showLimitsValues labelFormatCallback={labelFormat} size="large" />
|
|
175
|
-
</ExampleContainer>
|
|
176
|
-
</>
|
|
177
|
-
);
|
package/stack/Stack.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare type StackProps = {
|
|
3
|
-
gutter?: "none" | "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
|
|
4
|
-
divider?: boolean;
|
|
5
|
-
align?: "start" | "center" | "end" | "baseline" | "stretch";
|
|
6
|
-
as?: React.ElementType;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export default function Stack({ gutter, divider, align, as, children }: StackProps): JSX.Element;
|
|
10
|
-
export {};
|
package/stack/Stack.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = Stack;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _templateObject, _templateObject2;
|
|
17
|
-
|
|
18
|
-
function Stack(_ref) {
|
|
19
|
-
var gutter = _ref.gutter,
|
|
20
|
-
divider = _ref.divider,
|
|
21
|
-
align = _ref.align,
|
|
22
|
-
_ref$as = _ref.as,
|
|
23
|
-
as = _ref$as === void 0 ? "div" : _ref$as,
|
|
24
|
-
children = _ref.children;
|
|
25
|
-
return /*#__PURE__*/_react["default"].createElement(StyledStack, {
|
|
26
|
-
gutter: gutter,
|
|
27
|
-
divider: divider,
|
|
28
|
-
align: align,
|
|
29
|
-
as: as
|
|
30
|
-
}, _react["default"].Children.map(children, function (child, index) {
|
|
31
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, child, divider && index !== _react["default"].Children.count(children) - 1 && /*#__PURE__*/_react["default"].createElement(Divider, null));
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
var Divider = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n height: 1px;\n background-color: #999999;\n"])));
|
|
36
|
-
|
|
37
|
-
var StyledStack = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n align-items: ", "};\n gap: ", ";\n margin: 0;\n padding: 0;\n"])), function (_ref2) {
|
|
38
|
-
var align = _ref2.align;
|
|
39
|
-
|
|
40
|
-
switch (align) {
|
|
41
|
-
case "start":
|
|
42
|
-
return "flex-start";
|
|
43
|
-
|
|
44
|
-
case "center":
|
|
45
|
-
return "center";
|
|
46
|
-
|
|
47
|
-
case "end":
|
|
48
|
-
return "flex-end";
|
|
49
|
-
|
|
50
|
-
case "baseline":
|
|
51
|
-
return "baseline";
|
|
52
|
-
|
|
53
|
-
case "stretch":
|
|
54
|
-
return "stretch";
|
|
55
|
-
|
|
56
|
-
default:
|
|
57
|
-
return "initial";
|
|
58
|
-
}
|
|
59
|
-
}, function (_ref3) {
|
|
60
|
-
var gutter = _ref3.gutter,
|
|
61
|
-
divider = _ref3.divider;
|
|
62
|
-
|
|
63
|
-
switch (gutter) {
|
|
64
|
-
case "none":
|
|
65
|
-
return "0";
|
|
66
|
-
|
|
67
|
-
case "xxsmall":
|
|
68
|
-
return "calc(0.125rem / ".concat(divider ? 2 : 1, ")");
|
|
69
|
-
|
|
70
|
-
case "xsmall":
|
|
71
|
-
return "calc(0.25rem / ".concat(divider ? 2 : 1, ")");
|
|
72
|
-
|
|
73
|
-
case "small":
|
|
74
|
-
return "calc(0.5rem / ".concat(divider ? 2 : 1, ")");
|
|
75
|
-
|
|
76
|
-
case "medium":
|
|
77
|
-
return "calc(1rem / ".concat(divider ? 2 : 1, ")");
|
|
78
|
-
|
|
79
|
-
case "large":
|
|
80
|
-
return "calc(1.5rem / ".concat(divider ? 2 : 1, ")");
|
|
81
|
-
|
|
82
|
-
case "xlarge":
|
|
83
|
-
return "calc(2rem / ".concat(divider ? 2 : 1, ")");
|
|
84
|
-
|
|
85
|
-
case "xxlarge":
|
|
86
|
-
return "calc(3rem / ".concat(divider ? 2 : 1, ")");
|
|
87
|
-
|
|
88
|
-
case "xxxlarge":
|
|
89
|
-
return "calc(4rem / ".concat(divider ? 2 : 1, ")");
|
|
90
|
-
|
|
91
|
-
default:
|
|
92
|
-
return "0";
|
|
93
|
-
}
|
|
94
|
-
});
|
package/stack/Stack.stories.tsx
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Title from "../../.storybook/components/Title";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
import DxcStack from "./Stack";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: "Stack",
|
|
8
|
-
component: DxcStack,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const Chromatic = () => (
|
|
12
|
-
<>
|
|
13
|
-
<Title title="Default" theme="light" level={4} />
|
|
14
|
-
<Container>
|
|
15
|
-
<DxcStack>
|
|
16
|
-
<Placeholder></Placeholder>
|
|
17
|
-
<Placeholder></Placeholder>
|
|
18
|
-
<Placeholder></Placeholder>
|
|
19
|
-
</DxcStack>
|
|
20
|
-
</Container>
|
|
21
|
-
<Title title="Align = baseline" theme="light" level={4} />
|
|
22
|
-
<Container>
|
|
23
|
-
<DxcStack align="baseline">
|
|
24
|
-
<Placeholder paddingLeft={20}></Placeholder>
|
|
25
|
-
<Placeholder></Placeholder>
|
|
26
|
-
<Placeholder paddingRight={60}></Placeholder>
|
|
27
|
-
</DxcStack>
|
|
28
|
-
</Container>
|
|
29
|
-
<Title title="Align = center" theme="light" level={4} />
|
|
30
|
-
<Container>
|
|
31
|
-
<DxcStack align="center">
|
|
32
|
-
<Placeholder paddingLeft={20}></Placeholder>
|
|
33
|
-
<Placeholder></Placeholder>
|
|
34
|
-
<Placeholder paddingLeft={60}></Placeholder>
|
|
35
|
-
</DxcStack>
|
|
36
|
-
</Container>
|
|
37
|
-
<Title title="Align = end" theme="light" level={4} />
|
|
38
|
-
<Container>
|
|
39
|
-
<DxcStack align="end">
|
|
40
|
-
<Placeholder paddingLeft={20}></Placeholder>
|
|
41
|
-
<Placeholder></Placeholder>
|
|
42
|
-
<Placeholder paddingLeft={60}></Placeholder>
|
|
43
|
-
</DxcStack>
|
|
44
|
-
</Container>
|
|
45
|
-
<Title title="Align = start" theme="light" level={4} />
|
|
46
|
-
<Container>
|
|
47
|
-
<DxcStack align="start">
|
|
48
|
-
<Placeholder paddingLeft={20}></Placeholder>
|
|
49
|
-
<Placeholder></Placeholder>
|
|
50
|
-
<Placeholder paddingLeft={60}></Placeholder>
|
|
51
|
-
</DxcStack>
|
|
52
|
-
</Container>
|
|
53
|
-
<Title title="Align = stretch" theme="light" level={4} />
|
|
54
|
-
<Container>
|
|
55
|
-
<DxcStack align="stretch">
|
|
56
|
-
<Placeholder paddingLeft={20}></Placeholder>
|
|
57
|
-
<Placeholder></Placeholder>
|
|
58
|
-
<Placeholder paddingLeft={60}></Placeholder>
|
|
59
|
-
</DxcStack>
|
|
60
|
-
</Container>
|
|
61
|
-
<Title title="gutter = xxsmall" theme="light" level={4} />
|
|
62
|
-
<Container>
|
|
63
|
-
<DxcStack gutter="xxsmall">
|
|
64
|
-
<Placeholder></Placeholder>
|
|
65
|
-
<Placeholder></Placeholder>
|
|
66
|
-
<Placeholder></Placeholder>
|
|
67
|
-
</DxcStack>
|
|
68
|
-
</Container>
|
|
69
|
-
<Title title="gutter = xsmall" theme="light" level={4} />
|
|
70
|
-
<Container>
|
|
71
|
-
<DxcStack gutter="xsmall">
|
|
72
|
-
<Placeholder></Placeholder>
|
|
73
|
-
<Placeholder></Placeholder>
|
|
74
|
-
<Placeholder></Placeholder>
|
|
75
|
-
</DxcStack>
|
|
76
|
-
</Container>
|
|
77
|
-
<Title title="gutter = small" theme="light" level={4} />
|
|
78
|
-
<Container>
|
|
79
|
-
<DxcStack gutter="small">
|
|
80
|
-
<Placeholder></Placeholder>
|
|
81
|
-
<Placeholder></Placeholder>
|
|
82
|
-
<Placeholder></Placeholder>
|
|
83
|
-
</DxcStack>
|
|
84
|
-
</Container>
|
|
85
|
-
<Title title="gutter = medium" theme="light" level={4} />
|
|
86
|
-
<Container>
|
|
87
|
-
<DxcStack gutter="medium">
|
|
88
|
-
<Placeholder></Placeholder>
|
|
89
|
-
<Placeholder></Placeholder>
|
|
90
|
-
<Placeholder></Placeholder>
|
|
91
|
-
</DxcStack>
|
|
92
|
-
</Container>
|
|
93
|
-
<Title title="gutter = large" theme="light" level={4} />
|
|
94
|
-
<Container>
|
|
95
|
-
<DxcStack gutter="large">
|
|
96
|
-
<Placeholder></Placeholder>
|
|
97
|
-
<Placeholder></Placeholder>
|
|
98
|
-
<Placeholder></Placeholder>
|
|
99
|
-
</DxcStack>
|
|
100
|
-
</Container>
|
|
101
|
-
<Title title="gutter = xlarge" theme="light" level={4} />
|
|
102
|
-
<Container>
|
|
103
|
-
<DxcStack gutter="xlarge">
|
|
104
|
-
<Placeholder></Placeholder>
|
|
105
|
-
<Placeholder></Placeholder>
|
|
106
|
-
<Placeholder></Placeholder>
|
|
107
|
-
</DxcStack>
|
|
108
|
-
</Container>
|
|
109
|
-
<Title title="gutter = xxlarge" theme="light" level={4} />
|
|
110
|
-
<Container>
|
|
111
|
-
<DxcStack gutter="xxlarge">
|
|
112
|
-
<Placeholder></Placeholder>
|
|
113
|
-
<Placeholder></Placeholder>
|
|
114
|
-
<Placeholder></Placeholder>
|
|
115
|
-
</DxcStack>
|
|
116
|
-
</Container>
|
|
117
|
-
<Title title="gutter = xxlarge && divider" theme="light" level={4} />
|
|
118
|
-
<Container>
|
|
119
|
-
<DxcStack gutter="xxlarge" divider>
|
|
120
|
-
<Placeholder></Placeholder>
|
|
121
|
-
<Placeholder></Placeholder>
|
|
122
|
-
<Placeholder></Placeholder>
|
|
123
|
-
</DxcStack>
|
|
124
|
-
</Container>
|
|
125
|
-
<Title title="gutter = none" theme="light" level={4} />
|
|
126
|
-
<Container>
|
|
127
|
-
<DxcStack gutter="none">
|
|
128
|
-
<Placeholder></Placeholder>
|
|
129
|
-
<Placeholder></Placeholder>
|
|
130
|
-
<Placeholder></Placeholder>
|
|
131
|
-
</DxcStack>
|
|
132
|
-
</Container>
|
|
133
|
-
</>
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
const Container = styled.div`
|
|
137
|
-
background: #d0d0d0;
|
|
138
|
-
padding: 10px;
|
|
139
|
-
border-radius: 10px;
|
|
140
|
-
`;
|
|
141
|
-
|
|
142
|
-
const Placeholder = styled.div`
|
|
143
|
-
min-height: 80px;
|
|
144
|
-
min-width: 120px;
|
|
145
|
-
border: 1px solid #fabada;
|
|
146
|
-
background-color: #fff7fb;
|
|
147
|
-
border-radius: 5px;
|
|
148
|
-
padding-left: ${({ paddingLeft }) => `${paddingLeft ?? 0}px`};
|
|
149
|
-
padding-right: ${({ paddingRight }) => `${paddingRight ?? 0}px`};
|
|
150
|
-
`;
|
package/text/Text.d.ts
DELETED
package/text/Text.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
|
-
var _templateObject;
|
|
17
|
-
|
|
18
|
-
function Text(_ref) {
|
|
19
|
-
var _ref$as = _ref.as,
|
|
20
|
-
as = _ref$as === void 0 ? "span" : _ref$as,
|
|
21
|
-
children = _ref.children;
|
|
22
|
-
return /*#__PURE__*/_react["default"].createElement(StyledText, {
|
|
23
|
-
as: as
|
|
24
|
-
}, children);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var StyledText = _styledComponents["default"].span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n margin: 0px;\n font-family: Open Sans, sans-serif;\n"])));
|
|
28
|
-
|
|
29
|
-
var _default = Text;
|
|
30
|
-
exports["default"] = _default;
|
package/text/Text.stories.tsx
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Title from "../../.storybook/components/Title";
|
|
3
|
-
import DxcText from "./Text";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Text",
|
|
7
|
-
component: DxcText,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Chromatic = () => (
|
|
11
|
-
<>
|
|
12
|
-
<Title title="Two texts as span" theme="light" level={4} />
|
|
13
|
-
<DxcText>Text 1.</DxcText>
|
|
14
|
-
<DxcText>Text 2.</DxcText>
|
|
15
|
-
<Title title="Two texts as p" theme="light" level={4} />
|
|
16
|
-
<DxcText as="p">Text 1.</DxcText>
|
|
17
|
-
<DxcText as="p">Text 2.</DxcText>
|
|
18
|
-
</>
|
|
19
|
-
);
|