@telus-uds/components-base 4.0.0-alpha.2 → 4.0.0-beta.1

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/lib/cjs/Autocomplete/Autocomplete.js +13 -1
  3. package/lib/cjs/Autocomplete/constants.js +1 -1
  4. package/lib/cjs/Button/ButtonGroup.js +91 -23
  5. package/lib/cjs/Card/CardBase.js +75 -47
  6. package/lib/cjs/ColourToggle/ColourBubble.js +66 -13
  7. package/lib/cjs/ColourToggle/ColourToggle.js +41 -11
  8. package/lib/cjs/ColourToggle/constants.js +15 -0
  9. package/lib/cjs/ColourToggle/dictionary.js +14 -0
  10. package/lib/cjs/Listbox/ListboxOverlay.js +7 -1
  11. package/lib/cjs/MultiSelectFilter/ModalOverlay.js +7 -1
  12. package/lib/cjs/MultiSelectFilter/MultiSelectFilter.js +2 -28
  13. package/lib/cjs/TextInput/TextInputBase.js +2 -1
  14. package/lib/cjs/Validator/Validator.js +5 -1
  15. package/lib/cjs/utils/useOverlaidPosition.js +83 -42
  16. package/lib/esm/Autocomplete/Autocomplete.js +13 -1
  17. package/lib/esm/Autocomplete/constants.js +1 -1
  18. package/lib/esm/Button/ButtonGroup.js +91 -23
  19. package/lib/esm/Card/CardBase.js +75 -47
  20. package/lib/esm/ColourToggle/ColourBubble.js +67 -14
  21. package/lib/esm/ColourToggle/ColourToggle.js +41 -11
  22. package/lib/esm/ColourToggle/constants.js +8 -0
  23. package/lib/esm/ColourToggle/dictionary.js +8 -0
  24. package/lib/esm/Listbox/ListboxOverlay.js +7 -1
  25. package/lib/esm/MultiSelectFilter/ModalOverlay.js +8 -2
  26. package/lib/esm/MultiSelectFilter/MultiSelectFilter.js +2 -28
  27. package/lib/esm/TextInput/TextInputBase.js +2 -1
  28. package/lib/esm/Validator/Validator.js +5 -1
  29. package/lib/esm/utils/useOverlaidPosition.js +83 -42
  30. package/lib/package.json +3 -3
  31. package/package.json +3 -3
  32. package/src/Autocomplete/Autocomplete.jsx +11 -2
  33. package/src/Autocomplete/constants.js +1 -1
  34. package/src/Button/ButtonGroup.jsx +93 -24
  35. package/src/Card/CardBase.jsx +94 -75
  36. package/src/ColourToggle/ColourBubble.jsx +62 -7
  37. package/src/ColourToggle/ColourToggle.jsx +43 -9
  38. package/src/ColourToggle/constants.js +10 -0
  39. package/src/ColourToggle/dictionary.js +4 -0
  40. package/src/Listbox/ListboxOverlay.jsx +6 -2
  41. package/src/MultiSelectFilter/ModalOverlay.jsx +9 -3
  42. package/src/MultiSelectFilter/MultiSelectFilter.jsx +1 -31
  43. package/src/TextInput/TextInputBase.jsx +2 -1
  44. package/src/Validator/Validator.jsx +5 -1
  45. package/src/utils/useOverlaidPosition.js +84 -34
  46. package/types/A11yInfoProvider.d.ts +9 -0
  47. package/types/A11yText.d.ts +13 -0
  48. package/types/ActionCard.d.ts +19 -0
  49. package/types/ActivityIndicator.d.ts +13 -0
  50. package/types/Autocomplete.d.ts +27 -0
  51. package/types/Badge.d.ts +15 -4
  52. package/types/BaseProvider.d.ts +26 -0
  53. package/types/Box.d.ts +13 -3
  54. package/types/Button.d.ts +35 -0
  55. package/types/Card.d.ts +19 -0
  56. package/types/CardGroup.d.ts +23 -0
  57. package/types/Carousel.d.ts +25 -0
  58. package/types/Checkbox.d.ts +15 -2
  59. package/types/CheckboxCard.d.ts +20 -0
  60. package/types/CheckboxCardGroup.d.ts +10 -4
  61. package/types/ChevronLink.d.ts +9 -2
  62. package/types/ColourToggle.d.ts +16 -0
  63. package/types/Common.d.ts +7 -3
  64. package/types/Divider.d.ts +13 -1
  65. package/types/DownloadApp.d.ts +19 -0
  66. package/types/ExpandCollapse.d.ts +16 -9
  67. package/types/ExpandCollapseMini.d.ts +16 -0
  68. package/types/Feedback.d.ts +16 -0
  69. package/types/Fieldset.d.ts +17 -0
  70. package/types/FileUpload.d.ts +6 -0
  71. package/types/FlexGrid.d.ts +57 -0
  72. package/types/Footnote.d.ts +18 -0
  73. package/types/HorizontalScroll.d.ts +15 -0
  74. package/types/HorizontalScrollButton.d.ts +17 -1
  75. package/types/Icon.d.ts +13 -2
  76. package/types/IconButton.d.ts +19 -0
  77. package/types/InputLabel.d.ts +12 -0
  78. package/types/InputSupports.d.ts +19 -0
  79. package/types/Link.d.ts +20 -4
  80. package/types/List.d.ts +11 -4
  81. package/types/Listbox.d.ts +13 -3
  82. package/types/Modal.d.ts +25 -0
  83. package/types/MultiSelectFilter.d.ts +24 -0
  84. package/types/Notification.d.ts +19 -0
  85. package/types/OrderedList.d.ts +17 -0
  86. package/types/Pagination.d.ts +25 -0
  87. package/types/Portal.d.ts +5 -1
  88. package/types/PriceLockup.d.ts +28 -0
  89. package/types/ProductCard.d.ts +20 -0
  90. package/types/ProductCardGroup.d.ts +21 -0
  91. package/types/Progress.d.ts +22 -0
  92. package/types/QuickLinks.d.ts +27 -0
  93. package/types/QuickLinksFeature.d.ts +27 -0
  94. package/types/Radio.d.ts +22 -0
  95. package/types/RadioCard.d.ts +21 -0
  96. package/types/Responsive.d.ts +14 -0
  97. package/types/Scroll.d.ts +2 -2
  98. package/types/Search.d.ts +15 -2
  99. package/types/Select.d.ts +12 -4
  100. package/types/SideNav.d.ts +38 -0
  101. package/types/Skeleton.d.ts +17 -0
  102. package/types/SkipLink.d.ts +14 -0
  103. package/types/Spacer.d.ts +8 -1
  104. package/types/StackView.d.ts +8 -2
  105. package/types/Status.d.ts +2 -3
  106. package/types/StepTracker.d.ts +16 -0
  107. package/types/TabBar.d.ts +25 -0
  108. package/types/Tabs.d.ts +12 -3
  109. package/types/Tags.d.ts +24 -0
  110. package/types/TextButton.d.ts +11 -4
  111. package/types/TextInput.d.ts +38 -0
  112. package/types/ThemeProvider.d.ts +29 -0
  113. package/types/Timeline.d.ts +16 -0
  114. package/types/ToggleSwitch.d.ts +11 -2
  115. package/types/ToolTip.d.ts +7 -3
  116. package/types/TooltipButton.d.ts +20 -0
  117. package/types/Typography.d.ts +8 -2
  118. package/types/Validator.d.ts +16 -0
  119. package/types/ViewportProvider.d.ts +12 -0
  120. package/types/index.d.ts +197 -50
@@ -1,4 +1,5 @@
1
- import { LetterSpacing, TextTransform } from './Common'
1
+ import type { ComponentType, ReactNode } from 'react'
2
+ import { LetterSpacing, TextTransform, tagType, headingType, alignType } from './Common'
2
3
 
3
4
  export interface TypographyProps {
4
5
  tag?: tagType | string
@@ -10,7 +11,8 @@ export interface TypographyProps {
10
11
  heading?: headingType | string
11
12
  accessible?: boolean
12
13
  accessibilityLabel?: string
13
- children?: React.ReactNode
14
+ children?: ReactNode
15
+ dataSet?: Record<string, any>
14
16
  }
15
17
 
16
18
  export type TypographyVariants = {
@@ -38,3 +40,7 @@ export type TypographyTokens = {
38
40
  fontScaleCap?: number
39
41
  letterSpacing?: LetterSpacing
40
42
  }
43
+
44
+ declare const Typography: ComponentType<TypographyProps>
45
+
46
+ export { Typography }
@@ -0,0 +1,16 @@
1
+ import type { ComponentType } from 'react'
2
+
3
+ export interface ValidatorProps {
4
+ value?: string
5
+ inactive?: boolean
6
+ mask?: string
7
+ onChange?: (value: string) => void
8
+ tokens?: Record<string, string | number | boolean | object>
9
+ variant?: Record<string, string | number | boolean | undefined>
10
+ testID?: string
11
+ dataSet?: Record<string, any>
12
+ }
13
+
14
+ declare const Validator: ComponentType<ValidatorProps>
15
+
16
+ export { Validator }
@@ -0,0 +1,12 @@
1
+ import type { ComponentType, ReactNode } from 'react'
2
+
3
+ export type ViewportKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
4
+
5
+ export interface ViewportProviderProps {
6
+ children: ReactNode
7
+ defaultViewport?: ViewportKey
8
+ }
9
+
10
+ declare const ViewportProvider: ComponentType<ViewportProviderProps>
11
+
12
+ export { ViewportProvider }
package/types/index.d.ts CHANGED
@@ -1,27 +1,66 @@
1
- export { default as Badge } from './Badge'
1
+ export { A11yInfoProvider } from './A11yInfoProvider'
2
+ export type { A11yInfoProviderProps } from './A11yInfoProvider'
3
+
4
+ export { A11yText } from './A11yText'
5
+ export type { A11yTextProps } from './A11yText'
6
+
7
+ export { ActionCard } from './ActionCard'
8
+ export type { ActionCardProps } from './ActionCard'
9
+
10
+ export { ActivityIndicator } from './ActivityIndicator'
11
+ export type { ActivityIndicatorProps } from './ActivityIndicator'
12
+
13
+ export { Autocomplete } from './Autocomplete'
14
+ export type { AutocompleteProps, AutocompleteItem } from './Autocomplete'
15
+
16
+ export { Badge } from './Badge'
2
17
  export type { BadgeProps, BadgeVariants, BadgeTokens } from './Badge'
3
18
 
4
- export { default as Box } from './Box'
19
+ export { BaseProvider } from './BaseProvider'
20
+ export type { BaseProviderProps } from './BaseProvider'
21
+
22
+ export { Box } from './Box'
5
23
  export type { BoxVariants, BoxTokens, BoxProps } from './Box'
6
24
 
7
- export { default as ChevronLink } from './ChevronLink'
8
- export { ChevronLinkTokens, ChevronLinkProps, HrefProps } from './ChevronLink'
25
+ export { Button } from './Button'
26
+ export type { ButtonProps, ButtonPressableState } from './Button'
27
+
28
+ export { Card } from './Card'
29
+ export type { CardProps } from './Card'
9
30
 
10
- export { default as Checkbox } from './Checkbox'
11
- export { CheckboxProps, CheckboxTokens } from './Checkbox'
31
+ export { CardGroup } from './CardGroup'
32
+ export type { CardGroupProps, CardGroupItem } from './CardGroup'
12
33
 
13
- export { default as CheckboxCardGroup } from './CheckboxCardGroup'
14
- export {
34
+ export { Carousel } from './Carousel'
35
+ export type { CarouselProps, CarouselItemProps } from './Carousel'
36
+
37
+ export { CheckboxCard } from './CheckboxCard'
38
+ export type { CheckboxCardProps } from './CheckboxCard'
39
+
40
+ export { CheckboxCardGroup } from './CheckboxCardGroup'
41
+ export type {
15
42
  CheckboxCardGroupProps,
16
43
  CheckboxCardGroupTokens,
17
- checkboxCardTokens
44
+ CheckboxCardTokens
18
45
  } from './CheckboxCardGroup'
19
46
 
20
- export { default as Divider } from './Divider'
21
- export { DividerVariants, DividerProps, DividerTokens } from './Divider'
47
+ export { Checkbox } from './Checkbox'
48
+ export type { CheckboxProps, CheckboxTokens } from './Checkbox'
49
+
50
+ export { ChevronLink } from './ChevronLink'
51
+ export type { ChevronLinkTokens, ChevronLinkProps, HrefProps } from './ChevronLink'
52
+
53
+ export { ColourToggle } from './ColourToggle'
54
+ export type { ColourToggleProps } from './ColourToggle'
55
+
56
+ export { Divider } from './Divider'
57
+ export type { DividerVariants, DividerProps, DividerTokens } from './Divider'
22
58
 
23
- export { default as ExpandCollapse } from './ExpandCollapse'
24
- export {
59
+ export { DownloadApp } from './DownloadApp'
60
+ export type { DownloadAppProps } from './DownloadApp'
61
+
62
+ export { ExpandCollapse } from './ExpandCollapse'
63
+ export type {
25
64
  ExpandCollapseVariants,
26
65
  ExpandCollapseTokens,
27
66
  ExpandCollapseControlTokens,
@@ -30,22 +69,100 @@ export {
30
69
  ExpandCollapsePanelProps
31
70
  } from './ExpandCollapse'
32
71
 
33
- export { default as FileUpload } from './FileUpload'
34
- export { FileUploadTokens, FileUploadProps } from './FileUpload'
72
+ export { ExpandCollapseMini } from './ExpandCollapseMini'
73
+ export type { ExpandCollapseMiniProps } from './ExpandCollapseMini'
74
+
75
+ export { Feedback } from './Feedback'
76
+ export type { FeedbackProps } from './Feedback'
77
+
78
+ export { Fieldset } from './Fieldset'
79
+ export type { FieldsetProps } from './Fieldset'
80
+
81
+ export { FileUpload } from './FileUpload'
82
+ export type { FileUploadTokens, FileUploadProps } from './FileUpload'
83
+
84
+ export { FlexGrid } from './FlexGrid'
85
+ export type { FlexGridProps, FlexGridRowProps, FlexGridColProps } from './FlexGrid'
86
+
87
+ export { Footnote } from './Footnote'
88
+ export type { FootnoteProps } from './Footnote'
89
+
90
+ export { HorizontalScroll } from './HorizontalScroll'
91
+ export type { HorizontalScrollProps } from './HorizontalScroll'
92
+
93
+ export { HorizontalScrollButton } from './HorizontalScrollButton'
94
+ export type {
95
+ HorizontalScrollButtonTokens,
96
+ HorizontalScrollButtonProps
97
+ } from './HorizontalScrollButton'
98
+
99
+ export { Icon } from './Icon'
100
+ export type { IconProps, IconTokens, IconVariant, IconPositionLeftRight } from './Icon'
101
+
102
+ export { IconButton } from './IconButton'
103
+ export type { IconButtonProps } from './IconButton'
104
+
105
+ export { InputLabel } from './InputLabel'
106
+ export type { InputLabelProps } from './InputLabel'
35
107
 
36
- export { default as HorizontalScrollButton } from './HorizontalScrollButton'
37
- export { HorizontalScrollButtonTokens } from './HorizontalScrollButton'
108
+ export { InputSupports } from './InputSupports'
109
+ export type { InputSupportsProps } from './InputSupports'
38
110
 
39
- export { default as Icon } from './Icon'
40
- export { IconProps, IconTokens, IconVariant, IconPositionLeftRight } from './Icon'
111
+ export { Link } from './Link'
112
+ export type { LinkProps, LinkSize, LinkAndTextButtonVariants, LinkTokens, HrefAttrs } from './Link'
41
113
 
42
- export { default as Link } from './Link'
43
- export { LinkProps, LinkSize, LinkAndTextButtonVariants, LinkTokens } from './Link'
114
+ export { List } from './List'
115
+ export type { ListVariants, ListTokens, ListProps, ListItemProps, ListItemTokens } from './List'
44
116
 
45
- export { default as List } from './List'
46
- export { ListVariants, ListTokens, ListProps, ListItemProps, ListItemTokens } from './List'
117
+ export { Listbox } from './Listbox'
118
+ export type { ListboxProps, ListboxTokens, ListboxItems } from './Listbox'
47
119
 
48
- export { default as Scroll, ScrollItem } from './Scroll'
120
+ export { Modal } from './Modal'
121
+ export type { ModalProps } from './Modal'
122
+
123
+ export { MultiSelectFilter } from './MultiSelectFilter'
124
+ export type { MultiSelectFilterProps, MultiSelectFilterItem } from './MultiSelectFilter'
125
+
126
+ export { Notification } from './Notification'
127
+ export type { NotificationProps } from './Notification'
128
+
129
+ export { OrderedList } from './OrderedList'
130
+ export type { OrderedListProps, OrderedListItemProps } from './OrderedList'
131
+
132
+ export { Pagination } from './Pagination'
133
+ export type { PaginationProps, PaginationPageButtonProps } from './Pagination'
134
+
135
+ export { Portal } from './Portal'
136
+ export type { PortalProps } from './Portal'
137
+
138
+ export { PriceLockup } from './PriceLockup'
139
+ export type { PriceLockupProps } from './PriceLockup'
140
+
141
+ export { ProductCard } from './ProductCard'
142
+ export type { ProductCardProps, ProductCardImage } from './ProductCard'
143
+
144
+ export { ProductCardGroup } from './ProductCardGroup'
145
+ export type { ProductCardGroupProps, ProductCardGroupCardItem } from './ProductCardGroup'
146
+
147
+ export { Progress } from './Progress'
148
+ export type { ProgressProps, ProgressBarProps } from './Progress'
149
+
150
+ export { QuickLinks } from './QuickLinks'
151
+ export type { QuickLinksProps, QuickLinksItemProps } from './QuickLinks'
152
+
153
+ export { QuickLinksFeature } from './QuickLinksFeature'
154
+ export type { QuickLinksFeatureProps, QuickLinksFeatureItemProps } from './QuickLinksFeature'
155
+
156
+ export { Radio } from './Radio'
157
+ export type { RadioProps } from './Radio'
158
+
159
+ export { RadioCard } from './RadioCard'
160
+ export type { RadioCardProps } from './RadioCard'
161
+
162
+ export { Responsive } from './Responsive'
163
+ export type { ResponsiveProps, ViewportKey } from './Responsive'
164
+
165
+ export { Scroll, ScrollItem } from './Scroll'
49
166
  export type {
50
167
  ScrollProps,
51
168
  ScrollTokens,
@@ -54,14 +171,14 @@ export type {
54
171
  ScrollDictionary
55
172
  } from './Scroll'
56
173
 
57
- export { default as Search } from './Search'
58
- export { SearchTokens, SearchProps } from './Search'
174
+ export { Search } from './Search'
175
+ export type { SearchTokens, SearchProps } from './Search'
59
176
 
60
- export { default as Select } from './Select'
61
- export { SelectTokens, SelectProps, SelectItemProps, SelectGroupProps } from './Select'
177
+ export { Select } from './Select'
178
+ export type { SelectTokens, SelectProps, SelectItemProps, SelectGroupProps } from './Select'
62
179
 
63
- export { default as Shortcuts, ShortcutsItem } from './Shortcuts'
64
- export {
180
+ export { Shortcuts, ShortcutsItem } from './Shortcuts'
181
+ export type {
65
182
  ShortcutsProps,
66
183
  ShortcutsTokens,
67
184
  ShortcutsVariant,
@@ -72,34 +189,64 @@ export {
72
189
  PressableState
73
190
  } from './Shortcuts'
74
191
 
75
- export { default as Spacer } from './Spacer'
76
- export { SpacerProps } from './Spacer'
192
+ export { SideNav } from './SideNav'
193
+ export type { SideNavProps, SideNavItemsGroupProps, SideNavItemProps } from './SideNav'
194
+
195
+ export { Skeleton } from './Skeleton'
196
+ export type { SkeletonProps } from './Skeleton'
197
+
198
+ export { SkipLink } from './SkipLink'
199
+ export type { SkipLinkProps } from './SkipLink'
200
+
201
+ export { Spacer } from './Spacer'
202
+ export type { SpacerProps } from './Spacer'
203
+
204
+ export { StackView } from './StackView'
205
+ export type { StackViewTokens, StackViewProps } from './StackView'
206
+
207
+ export { Status } from './Status'
208
+ export type { StatusProps, StatusTokensProps } from './Status'
209
+
210
+ export { StepTracker } from './StepTracker'
211
+ export type { StepTrackerProps } from './StepTracker'
212
+
213
+ export { TabBar } from './TabBar'
214
+ export type { TabBarProps, TabBarItem } from './TabBar'
215
+
216
+ export { Tabs } from './Tabs'
217
+ export type { TabsProps, TabsTokens, TabSelectorProps, TabsVariant, TabsItem } from './Tabs'
218
+
219
+ export { Tags } from './Tags'
220
+ export type { TagsProps, TagItem } from './Tags'
221
+
222
+ export { TextButton } from './TextButton'
223
+ export type { TextButtonProps } from './TextButton'
77
224
 
78
- export { default as StackView } from './StackView'
79
- export { StackViewTokens, StackViewProps } from './StackView'
225
+ export { TextInput } from './TextInput'
226
+ export type { TextInputProps } from './TextInput'
80
227
 
81
- export { default as Tabs } from './Tabs'
82
- export { TabsProps, TabsTokens, TabSelectorProps, TabsVariant, TabsItem } from './Tabs'
228
+ export { ThemeProvider } from './ThemeProvider'
229
+ export type { ThemeProviderProps, Theme, ThemeMetadata, ThemeOptions } from './ThemeProvider'
83
230
 
84
- export { default as TextButton } from './TextButton'
85
- export { TextButtonProps } from './TextButton'
231
+ export { Timeline } from './Timeline'
232
+ export type { TimelineProps } from './Timeline'
86
233
 
87
- export { default as ToggleSwitch } from './ToggleSwitch'
88
- export { ToggleSwitchTokens, ToggleSwitchProps } from './ToggleSwitch'
234
+ export { ToggleSwitch } from './ToggleSwitch'
235
+ export type { ToggleSwitchTokens, ToggleSwitchProps } from './ToggleSwitch'
89
236
 
90
- export { default as Tooltip } from './ToolTip'
91
- export { TooltipTokens, TooltipVariants, TooltipProps } from './ToolTip'
237
+ export { Tooltip } from './Tooltip'
238
+ export type { TooltipTokens, TooltipVariants, TooltipProps } from './Tooltip'
92
239
 
93
- export { default as Typography } from './Typography'
94
- export { TypographyProps, TypographyVariants, TypographyTokens } from './Typography'
240
+ export { TooltipButton } from './TooltipButton'
241
+ export type { TooltipButtonProps, TooltipButtonPressableState } from './TooltipButton'
95
242
 
96
- export { default as Portal } from './Portal'
97
- export { PortalProps } from './Portal'
243
+ export { Typography } from './Typography'
244
+ export type { TypographyProps, TypographyVariants, TypographyTokens } from './Typography'
98
245
 
99
- export { default as Listbox } from './Listbox'
100
- export { ListboxProps, ListboxTokens } from './Listbox'
246
+ export { Validator } from './Validator'
247
+ export type { ValidatorProps } from './Validator'
101
248
 
102
- export { default as Status } from './Status'
103
- export { StatusProps, StatusTokensProps } from './Status'
249
+ export { ViewportProvider } from './ViewportProvider'
250
+ export type { ViewportProviderProps } from './ViewportProvider'
104
251
 
105
252
  export * from './Common'