@loadsmart/loadsmart-ui 7.3.2 → 7.3.3

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 (70) hide show
  1. package/dist/common/BackButton/BackButton.d.ts +1 -0
  2. package/dist/common/CloseButton/CloseButton.d.ts +1 -0
  3. package/dist/components/Accordion/Accordion.stories.d.ts +1 -0
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/Calendar/Calendar.d.ts +1 -0
  6. package/dist/components/Calendar/Calendar.stories.d.ts +1 -0
  7. package/dist/components/Calendar/PickerModeToggle.d.ts +1 -0
  8. package/dist/components/Calendar/Pickers/DayPicker.d.ts +1 -0
  9. package/dist/components/Calendar/Pickers/MonthPicker.d.ts +1 -0
  10. package/dist/components/Calendar/Pickers/YearPicker.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
  12. package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
  13. package/dist/components/DatePicker/DateRangePicker.d.ts +1 -0
  14. package/dist/components/DatePicker/DateRangePicker.stories.d.ts +1 -0
  15. package/dist/components/DatePicker/useDatePicker.d.ts +102 -102
  16. package/dist/components/DatePicker/useDateRangePicker.d.ts +153 -154
  17. package/dist/components/Dialog/Dialog.stories.d.ts +1 -0
  18. package/dist/components/DragDropFile/DragDropFile.stories.d.ts +1 -0
  19. package/dist/components/DragDropFile/components/DropZone.d.ts +1 -0
  20. package/dist/components/DragDropFile/components/FileItem.d.ts +1 -0
  21. package/dist/components/DragDropFile/components/FileList.d.ts +1 -0
  22. package/dist/components/DragDropFile/styles.d.ts +1 -1
  23. package/dist/components/EmptyState/EmptyState.stories.d.ts +1 -0
  24. package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +1 -0
  25. package/dist/components/Icon/Icon.d.ts +2 -1
  26. package/dist/components/IconFactory/IconFactory.d.ts +2 -1
  27. package/dist/components/Label/Label.stories.d.ts +1 -0
  28. package/dist/components/Layout/Layout.stories.d.ts +1 -0
  29. package/dist/components/Link/Link.stories.d.ts +1 -0
  30. package/dist/components/Loaders/LoadingDots.d.ts +1 -0
  31. package/dist/components/Loaders/Spinner.d.ts +1 -0
  32. package/dist/components/Modal/Modal.stories.d.ts +1 -0
  33. package/dist/components/Pagination/Pagination.d.ts +1 -0
  34. package/dist/components/Pagination/PaginationItem.d.ts +1 -0
  35. package/dist/components/Popover/Popover.d.ts +1 -0
  36. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +1 -0
  37. package/dist/components/Radio/Radio.stories.d.ts +1 -0
  38. package/dist/components/Section/Sections.stories.d.ts +1 -0
  39. package/dist/components/Select/SelectCreatableOption.d.ts +1 -0
  40. package/dist/components/Select/SelectEmpty.d.ts +1 -0
  41. package/dist/components/Select/SelectOption.d.ts +1 -0
  42. package/dist/components/SideNavigation/Separator/Separator.d.ts +1 -0
  43. package/dist/components/SideNavigation/SideNavigation.stories.d.ts +1 -0
  44. package/dist/components/Steps/ProgressSteps/ProgressSteps.d.ts +1 -0
  45. package/dist/components/Table/Table.d.ts +1 -0
  46. package/dist/components/Table/Table.stories.d.ts +1 -0
  47. package/dist/components/Table/TableSortHandle.d.ts +1 -0
  48. package/dist/components/TablePagination/RowsPerPage.d.ts +1 -0
  49. package/dist/components/TablePagination/TablePagination.d.ts +1 -0
  50. package/dist/components/TablePagination/TablePaginationActions.d.ts +2 -1
  51. package/dist/components/Tabs/Tabs.stories.d.ts +1 -0
  52. package/dist/components/TextField/TextField.stories.d.ts +1 -0
  53. package/dist/components/Textarea/Textarea.stories.d.ts +1 -0
  54. package/dist/components/Toast/Toast.stories.d.ts +1 -0
  55. package/dist/components/ToggleGroup/Toggle.d.ts +1 -0
  56. package/dist/components/ToggleGroup/ToggleGroup.d.ts +1 -0
  57. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  58. package/dist/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.d.ts +1 -0
  59. package/dist/components/TopNavigation/TopNavigation.stories.d.ts +1 -0
  60. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +1 -0
  61. package/dist/index.js +1 -1
  62. package/dist/index.js.map +1 -1
  63. package/dist/utils/toolset/highlightMatch.d.ts +1 -0
  64. package/package.json +11 -6
  65. package/src/components/Dropdown/Dropdown.stories.tsx +1 -2
  66. package/src/components/IconFactory/IconFactory.tsx +2 -2
  67. package/src/components/Select/Select.constants.ts +2 -2
  68. package/src/components/Steps/useSteps.ts +1 -1
  69. package/src/components/Tag/Tag.tsx +1 -1
  70. package/src/hooks/useSelectable/SelectableStrategy.ts +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * A function that wraps a match into `mark` element to be highlighted.
3
4
  * @example
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/loadsmart-ui",
3
- "version": "7.3.2",
3
+ "version": "7.3.3",
4
4
  "description": "Miranda UI, a React UI library",
5
5
  "main": "dist",
6
6
  "files": [
@@ -82,10 +82,10 @@
82
82
  "@types/lodash.range": "^3.2.6",
83
83
  "@types/mdx": "^2.0.2",
84
84
  "@types/node": "^18.11.18",
85
- "@types/react": "^17.0.59",
86
- "@types/react-dom": "^17.0.20",
85
+ "@types/react": "^17.0.83",
86
+ "@types/react-dom": "^17.0.25",
87
87
  "@types/react-test-renderer": "^17.0.1",
88
- "@types/styled-components": "^5.1.26",
88
+ "@types/styled-components": "^5.1.34",
89
89
  "@typescript-eslint/eslint-plugin": "^4.22.1",
90
90
  "@typescript-eslint/parser": "^4.22.1",
91
91
  "@zerollup/ts-transform-paths": "^1.7.18",
@@ -132,7 +132,7 @@
132
132
  "rollup-plugin-visualizer": "^5.5.2",
133
133
  "semantic-release": "^17.4.2",
134
134
  "storybook": "^7.0.17",
135
- "styled-components": "^5.3.0",
135
+ "styled-components": "^5.3.11",
136
136
  "stylelint": "^13.13.1",
137
137
  "stylelint-config-prettier": "^8.0.2",
138
138
  "stylelint-config-rational-order": "^0.1.2",
@@ -181,6 +181,11 @@
181
181
  }
182
182
  },
183
183
  "resolutions": {
184
- "@stylelint/postcss-css-in-js": "0.37.2"
184
+ "@stylelint/postcss-css-in-js": "0.37.2",
185
+ "react": "17.0.2",
186
+ "react-dom": "17.0.2",
187
+ "@types/react": "17.0.83",
188
+ "@types/react-dom": "17.0.25",
189
+ "react-is": "17.0.2"
185
190
  }
186
191
  }
@@ -80,7 +80,7 @@ export const WithSections: Story<DropdownStoryProps> = (args) => {
80
80
  <div className="flex flex-col">
81
81
  <Dropdown {...args}>
82
82
  <Dropdown.Trigger outlined={args.outlined}>Sections</Dropdown.Trigger>
83
- <Dropdown.Menu align={args.align}>
83
+ <Dropdown.Menu>
84
84
  <Dropdown.Section header="My profile">
85
85
  {PROFILE_ACTIONS.map(({ label, value }) => (
86
86
  <Dropdown.Item
@@ -128,7 +128,6 @@ export const Extended: Story<DropdownStoryProps> = (args) => {
128
128
  <Dropdown {...args}>
129
129
  <Dropdown.Trigger outlined={args.outlined}>With Header &amp; Footer</Dropdown.Trigger>
130
130
  <Dropdown.Menu
131
- align={args.align}
132
131
  header={<p className="px-2">Header</p>}
133
132
  footer={<p className="px-2">A cool footer</p>}
134
133
  >
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react'
1
+ import React, { ReactNode, ComponentType } from 'react'
2
2
  import styled from 'styled-components'
3
3
 
4
4
  import transition from 'styles/transition'
@@ -50,7 +50,7 @@ export function UnknownIcon(): JSX.Element {
50
50
  return <span aria-label="Unknown icon">&#9785;</span>
51
51
  }
52
52
 
53
- function IconFactory(map: IconMapping): (props: IconProps<typeof map>) => JSX.Element {
53
+ function IconFactory(map: IconMapping): ComponentType<IconProps<typeof map>> {
54
54
  function getIcon(name: keyof typeof map): ReactNode | null {
55
55
  // eslint-disable-next-line no-param-reassign
56
56
  name = String(name || '').toLowerCase()
@@ -4,9 +4,9 @@ import type { SelectAdapter } from './Select.types'
4
4
 
5
5
  export const GenericAdapter: SelectAdapter<unknown> = {
6
6
  getKey(o): string {
7
- return get(o, 'value') as string
7
+ return get(o, 'value')!
8
8
  },
9
9
  getLabel(o): string {
10
- return get(o, 'label') as string
10
+ return get(o, 'label')!
11
11
  },
12
12
  }
@@ -115,7 +115,7 @@ function useSteps({ steps, current: currentProp }: useStepsProps): [State, Dispa
115
115
  // TODO: gather step info to feed Steps component
116
116
  function init(steps: Array<Step>, current?: number | string): State {
117
117
  return {
118
- current: current || (get(steps, '0.id') as number | string),
118
+ current: current || get(steps, '0.id')!,
119
119
  steps,
120
120
  }
121
121
  }
@@ -315,7 +315,7 @@ const StyledCloseButton = styled.button<WithSizeProps & WithVariantProps>`
315
315
  'tag-warning-background--focus': whenProps({ variant: 'warning' }),
316
316
  'tag-danger-background--focus': whenProps({ variant: 'danger' }),
317
317
  })};
318
- box-shadow: ${token('tag-outline')};
318
+ box-shadow: ${token('tag-box-shadow')};
319
319
  }
320
320
  `
321
321
 
@@ -14,7 +14,7 @@ export type SelectableStrategyContext<T extends Selectable> = {
14
14
 
15
15
  const GenericAdapter: SelectableAdapter<unknown> = {
16
16
  getKey(o): string {
17
- return get(o, 'value') as string
17
+ return get(o, 'value')!
18
18
  },
19
19
  }
20
20