@loadsmart/loadsmart-ui 8.0.1 → 8.0.2

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 (183) hide show
  1. package/dist/common/SelectionWrapper.d.ts +1 -1
  2. package/dist/components/Banner/Banner.d.ts +3 -3
  3. package/dist/components/Button/Button.d.ts +3 -2
  4. package/dist/components/Calendar/Calendar.helpers.d.ts +2 -1
  5. package/dist/components/Calendar/Pickers/DayPicker.d.ts +2 -1
  6. package/dist/components/Calendar/Pickers/PickerButton.d.ts +2 -3
  7. package/dist/components/Card/CardTitle.d.ts +2 -1
  8. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  9. package/dist/components/DatePicker/DatePicker.d.ts +4 -4
  10. package/dist/components/DatePicker/DateRangePicker.d.ts +1 -1
  11. package/dist/components/DatePicker/useDatePicker.d.ts +7 -586
  12. package/dist/components/DatePicker/useDateRangePicker.d.ts +5 -889
  13. package/dist/components/Dialog/Dialog.d.ts +1 -3
  14. package/dist/components/DragDropFile/DragDropFile.d.ts +4 -3
  15. package/dist/components/DragDropFile/styles.d.ts +8 -9
  16. package/dist/components/Dropdown/Dropdown.context.d.ts +2 -1
  17. package/dist/components/Dropdown/DropdownMenu.d.ts +2 -1
  18. package/dist/components/Dropdown/DropdownTrigger.d.ts +1 -1
  19. package/dist/components/EmptyState/EmptyState.d.ts +2 -2
  20. package/dist/components/Icon/Icon.d.ts +3 -2
  21. package/dist/components/Label/Label.d.ts +1 -1
  22. package/dist/components/Layout/Stack.d.ts +2 -1
  23. package/dist/components/Loaders/LoadingBar.d.ts +2 -1
  24. package/dist/components/Modal/Modal.d.ts +1 -4
  25. package/dist/components/Radio/Radio.d.ts +1 -1
  26. package/dist/components/Select/Select.context.d.ts +3 -2
  27. package/dist/components/Select/Select.d.ts +1 -1
  28. package/dist/components/Select/SelectTrigger.d.ts +1 -1
  29. package/dist/components/SideNavigation/Logo/Logo.d.ts +2 -1
  30. package/dist/components/SideNavigation/Menu/Menu.d.ts +2 -12
  31. package/dist/components/SideNavigation/Menu/MenuLink.d.ts +2 -1
  32. package/dist/components/SideNavigation/SideNavigation.d.ts +2 -17
  33. package/dist/components/Steps/Steps.d.ts +1 -1
  34. package/dist/components/Steps/StepsStep.d.ts +2 -1
  35. package/dist/components/Table/Selection.d.ts +1 -1
  36. package/dist/components/TablePagination/TablePagination.styles.d.ts +2 -4
  37. package/dist/components/TablePagination/TablePaginationActions.d.ts +2 -7
  38. package/dist/components/Tabs/TabsContext.d.ts +2 -1
  39. package/dist/components/Text/Text.d.ts +2 -1
  40. package/dist/components/TextField/TextField.d.ts +4 -3
  41. package/dist/components/Textarea/Textarea.d.ts +1 -1
  42. package/dist/components/ToggleGroup/Toggle.d.ts +2 -1
  43. package/dist/components/ToggleGroup/ToggleGroup.types.d.ts +1 -1
  44. package/dist/components/ToggleGroup/ToggleGroupContext.d.ts +2 -2
  45. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  46. package/dist/components/TopNavigation/Logo/Logo.d.ts +2 -1
  47. package/dist/components/TopNavigation/Menu/MenuItemDropdown.d.ts +4 -4
  48. package/dist/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.d.ts +2 -1
  49. package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +2 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/prop-Fs2axl9W.js.map +1 -1
  52. package/dist/styles/typography.d.ts +2 -1
  53. package/dist/tests/renderer.d.ts +2 -2
  54. package/dist/utils/types/ColorScheme.d.ts +1 -2
  55. package/package.json +27 -25
  56. package/dist/components/Accordion/Accordion.stories.d.ts +0 -9
  57. package/dist/components/Accordion/Accordion.test.d.ts +0 -1
  58. package/dist/components/Banner/Banner.stories.d.ts +0 -107
  59. package/dist/components/Banner/Banner.test.d.ts +0 -1
  60. package/dist/components/Breadcrumbs/Breadbrumbs.test.d.ts +0 -1
  61. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -5
  62. package/dist/components/Button/Button.stories.d.ts +0 -33
  63. package/dist/components/Button/Button.test.d.ts +0 -1
  64. package/dist/components/Calendar/Calendar.stories.d.ts +0 -22
  65. package/dist/components/Calendar/Calendar.test.d.ts +0 -1
  66. package/dist/components/Calendar/Date.helper.test.d.ts +0 -1
  67. package/dist/components/Calendar/DateFormat.helper.test.d.ts +0 -1
  68. package/dist/components/Calendar/Month.helper.test.d.ts +0 -1
  69. package/dist/components/Calendar/Pickers/DayPicker.test.d.ts +0 -1
  70. package/dist/components/Calendar/Pickers/MonthPicker.test.d.ts +0 -1
  71. package/dist/components/Calendar/Pickers/YearPicker.test.d.ts +0 -1
  72. package/dist/components/Card/Card.stories.d.ts +0 -8
  73. package/dist/components/Card/Card.test.d.ts +0 -1
  74. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -9
  75. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -1
  76. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -23
  77. package/dist/components/DatePicker/DatePicker.test.d.ts +0 -1
  78. package/dist/components/DatePicker/DateRangePicker.stories.d.ts +0 -22
  79. package/dist/components/DatePicker/DateRangePicker.test.d.ts +0 -1
  80. package/dist/components/Dialog/Dialog.stories.d.ts +0 -68
  81. package/dist/components/Dialog/Dialog.test.d.ts +0 -1
  82. package/dist/components/DragDropFile/DragDropFile.stories.d.ts +0 -34
  83. package/dist/components/DragDropFile/components/DropZone.test.d.ts +0 -1
  84. package/dist/components/DragDropFile/components/FileList.test.d.ts +0 -1
  85. package/dist/components/Drawer/Drawer.stories.d.ts +0 -6
  86. package/dist/components/Drawer/Drawer.test.d.ts +0 -1
  87. package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -12
  88. package/dist/components/Dropdown/Dropdown.test.d.ts +0 -1
  89. package/dist/components/Dropdown/useDropdown.test.d.ts +0 -1
  90. package/dist/components/EmptyState/EmptyState.stories.d.ts +0 -33
  91. package/dist/components/EmptyState/EmptyState.test.d.ts +0 -1
  92. package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +0 -14
  93. package/dist/components/ErrorMessage/ErrorMessage.test.d.ts +0 -1
  94. package/dist/components/HighlightMatch/HighlightMatch.stories.d.ts +0 -5
  95. package/dist/components/HighlightMatch/HighlightMatch.test.d.ts +0 -1
  96. package/dist/components/IconFactory/IconFactory.stories.d.ts +0 -6
  97. package/dist/components/IconFactory/IconFactory.test.d.ts +0 -1
  98. package/dist/components/Label/Label.stories.d.ts +0 -15
  99. package/dist/components/Label/Label.test.d.ts +0 -1
  100. package/dist/components/Layout/Layout.stories.d.ts +0 -147
  101. package/dist/components/Link/Link.stories.d.ts +0 -6
  102. package/dist/components/Link/Link.test.d.ts +0 -1
  103. package/dist/components/Loaders/LoadingBar.stories.d.ts +0 -5
  104. package/dist/components/Loaders/LoadingBar.test.d.ts +0 -1
  105. package/dist/components/Loaders/LoadingDots.stories.d.ts +0 -6
  106. package/dist/components/Loaders/LoadingDots.test.d.ts +0 -1
  107. package/dist/components/Loaders/Spinner.stories.d.ts +0 -5
  108. package/dist/components/Loaders/Spinner.test.d.ts +0 -1
  109. package/dist/components/Modal/Modal.stories.d.ts +0 -31
  110. package/dist/components/Modal/Modal.test.d.ts +0 -1
  111. package/dist/components/Pagination/Pagination.stories.d.ts +0 -5
  112. package/dist/components/Pagination/Pagination.test.d.ts +0 -1
  113. package/dist/components/Pagination/usePagination.test.d.ts +0 -1
  114. package/dist/components/Popover/Popover.stories.d.ts +0 -5
  115. package/dist/components/Popover/Popover.test.d.ts +0 -1
  116. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +0 -13
  117. package/dist/components/ProgressBar/ProgressBar.test.d.ts +0 -1
  118. package/dist/components/Radio/Radio.stories.d.ts +0 -9
  119. package/dist/components/Radio/Radio.test.d.ts +0 -1
  120. package/dist/components/Section/Section.test.d.ts +0 -1
  121. package/dist/components/Section/Sections.stories.d.ts +0 -6
  122. package/dist/components/Select/Select.stories.d.ts +0 -19
  123. package/dist/components/Select/Select.test.d.ts +0 -1
  124. package/dist/components/Select/SelectEmpty.test.d.ts +0 -1
  125. package/dist/components/Select/SelectOption.test.d.ts +0 -1
  126. package/dist/components/Select/useSelect.helpers.test.d.ts +0 -1
  127. package/dist/components/Select/useSelect.test.d.ts +0 -1
  128. package/dist/components/SideNavigation/Logo/Logo.test.d.ts +0 -1
  129. package/dist/components/SideNavigation/Menu/Menu.test.d.ts +0 -1
  130. package/dist/components/SideNavigation/Separator/Separator.test.d.ts +0 -1
  131. package/dist/components/SideNavigation/SideNavigation.stories.d.ts +0 -6
  132. package/dist/components/SideNavigation/SideNavigation.test.d.ts +0 -1
  133. package/dist/components/Steps/Steps.stories.d.ts +0 -5
  134. package/dist/components/Steps/Steps.test.d.ts +0 -1
  135. package/dist/components/Steps/useStep.test.d.ts +0 -1
  136. package/dist/components/Switch/Switch.stories.d.ts +0 -5
  137. package/dist/components/Switch/Switch.test.d.ts +0 -1
  138. package/dist/components/Table/Table.stories.d.ts +0 -62
  139. package/dist/components/Table/Table.test.d.ts +0 -1
  140. package/dist/components/Table/useSortBy.test.d.ts +0 -1
  141. package/dist/components/TablePagination/TablePagination.stories.d.ts +0 -5
  142. package/dist/components/TablePagination/TablePagination.test.d.ts +0 -1
  143. package/dist/components/Tabs/Tabs.stories.d.ts +0 -24
  144. package/dist/components/Tabs/Tabs.test.d.ts +0 -1
  145. package/dist/components/Tag/Tag.stories.d.ts +0 -63
  146. package/dist/components/Tag/Tag.test.d.ts +0 -1
  147. package/dist/components/Text/Text.stories.d.ts +0 -7
  148. package/dist/components/Text/Text.test.d.ts +0 -1
  149. package/dist/components/TextField/TextField.stories.d.ts +0 -12
  150. package/dist/components/TextField/TextField.test.d.ts +0 -1
  151. package/dist/components/Textarea/Textarea.stories.d.ts +0 -12
  152. package/dist/components/Textarea/Textarea.test.d.ts +0 -1
  153. package/dist/components/Toast/Toast.stories.d.ts +0 -13
  154. package/dist/components/Toast/Toast.test.d.ts +0 -1
  155. package/dist/components/ToggleGroup/Toggle.test.d.ts +0 -1
  156. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -6
  157. package/dist/components/ToggleGroup/ToggleGroup.test.d.ts +0 -1
  158. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -14
  159. package/dist/components/Tooltip/Tooltip.test.d.ts +0 -1
  160. package/dist/components/TopNavigation/Logo/Logo.test.d.ts +0 -1
  161. package/dist/components/TopNavigation/Menu/Menu.test.d.ts +0 -1
  162. package/dist/components/TopNavigation/TopNavigation.stories.d.ts +0 -6
  163. package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -12
  164. package/dist/components/VisuallyHidden/VisuallyHidden.test.d.ts +0 -1
  165. package/dist/hooks/useClickOutside/useClickOutside.test.d.ts +0 -1
  166. package/dist/hooks/useDidMount/useDidMount.test.d.ts +0 -1
  167. package/dist/hooks/useFingerprint/useFingerprint.test.d.ts +0 -1
  168. package/dist/hooks/useFocusTrap/useFocusTrap.stories.d.ts +0 -7
  169. package/dist/hooks/useFocusTrap/useFocusTrap.test.d.ts +0 -1
  170. package/dist/hooks/useFocusWithin/useFocusWithin.test.d.ts +0 -1
  171. package/dist/hooks/useHeightExpansionToggler/useHeightExpansionToggler.test.d.ts +0 -1
  172. package/dist/hooks/useSelectable/SelectableStrategy.test.d.ts +0 -1
  173. package/dist/hooks/useSelectable/useSelectable.test.d.ts +0 -1
  174. package/dist/styles/font.test.d.ts +0 -1
  175. package/dist/styles/typography.test.d.ts +0 -1
  176. package/dist/testing/SelectEvent/SelectEvent.test.d.ts +0 -1
  177. package/dist/tools/conditional.test.d.ts +0 -1
  178. package/dist/tools/prop.test.d.ts +0 -1
  179. package/dist/utils/toolset/formatBytes.test.d.ts +0 -1
  180. package/dist/utils/toolset/getID.test.d.ts +0 -1
  181. package/dist/utils/toolset/getOrdinalSuffix.test.d.ts +0 -1
  182. package/dist/utils/toolset/highlightMatch.test.d.ts +0 -1
  183. package/dist/utils/toolset/interleave.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"prop-Fs2axl9W.js","sources":["../src/tools/conditional.ts","../src/tools/prop.ts"],"sourcesContent":["import { isObject } from '@loadsmart/utils-object'\nimport { isFunction } from '@loadsmart/utils-function'\nimport type { F } from 'ts-toolbelt'\n\nimport { getToken } from 'theming'\nimport type { ThemeToken, ThemedProps } from 'theming'\nimport get from 'utils/toolset/get'\nimport toArray from 'utils/toolset/toArray'\n\ntype WhenProps<K> = K | undefined | ((value: K) => boolean | undefined)\n\nexport type When<P> = {\n [Key in keyof P]?: WhenProps<P[Key]> | WhenProps<P[Key]>[] | undefined\n}\n\n/**\n * Utility to generate style/class name conditions based on a components props.\n * Expected prop values can be a single value, an array of values or a function/callback.\n * @example\n * ```jsx\n * whenProps({\n * 'prop-a': true, // checks `props['prop-a']` === true`\n * 'prop-b': [1, 2], // checks `toArray([1, 2]).includes(props['prop-b'])`\n * 'prop-c': (value) => value + 1 // checks `Boolean(callback(props['prop-c']))`\n * 'prop-d': Boolean // checks `Boolean(Boolean(props['prop-d']))`\n * })\n * ```\n * @param conditions\n * @returns Returns function that consumes component props.\n */\nexport function whenProps<P>(conditions: When<F.Narrow<P>> | When<F.Narrow<P>>[]) {\n return function (props: P): boolean {\n const safeConditions = toArray(conditions)\n\n return safeConditions.some((condition) => {\n const keys = Object.keys(condition)\n\n return keys.every((key) => {\n const propValue = get(props, key) as P[keyof P]\n const conditionValue = condition[key as keyof typeof condition]\n\n if (Array.isArray(conditionValue)) {\n return toArray(conditionValue).includes(propValue)\n }\n if (isFunction(conditionValue)) {\n return Boolean(conditionValue(propValue))\n }\n return (conditionValue as unknown) === propValue\n })\n })\n }\n}\n\ntype ConditionObject<P> = Record<\n string,\n string | number | boolean | ((props: P) => boolean) | undefined\n>\n\nfunction handleConditionObject<P>(condition: ConditionObject<P>, props: P): string {\n const keys = Object.keys(condition)\n\n const res = keys.reduce<string[]>((acc, key) => {\n let value = condition[key]\n\n if (isFunction(value)) {\n value = value(props)\n }\n\n if (value) {\n const tokenKey = key as ThemeToken\n\n const result = (getToken(tokenKey, props as unknown as ThemedProps) ?? key) as string\n return [...acc, result]\n }\n\n return acc\n }, [])\n\n return res.join(' ')\n}\n\ntype Condition<P> = number | string | ConditionObject<P> | ((props: P) => string)\n\n/**\n * Concatenate style properties or class names conditionally.\n * Conditions can be functions that consume components props,\n * objects, strings, or numbers (that will be coerced to strings).\n * @example\n * ```jsx\n * conditional(1, 'some-class', {\n * 'class-a': true,\n * 'class-b': (props) => props.showClassB,\n * }, (props) => props.className)\n * ```\n * @param conditions\n * @returns Returns function that consumes component props.\n */\nfunction conditional<P>(...conditions: Condition<P>[]) {\n return function (props: P): string {\n let classes: string[] = []\n\n for (let i = 0; i < conditions.length; i++) {\n const condition = conditions[i]\n\n if (isFunction(condition)) {\n classes.push(condition(props))\n } else if (isObject(condition)) {\n classes = classes.concat(handleConditionObject<P>(condition, props))\n } else if (condition) {\n classes.push(String(condition))\n }\n }\n\n return classes.join(' ')\n }\n}\n\nexport default conditional\n","function compare(...args: any[]): unknown {\n const [value, defaultValue] = args\n\n if (value == null || value === false || Number.isNaN(value)) {\n return defaultValue || value\n }\n\n if (typeof value === 'string' && value.length === 0) {\n return defaultValue || value\n }\n\n return value\n}\n\n/**\n * Retrieve the key value from the props object\n * @example\n * ```jsx\n * -transform: scaleY(${(props) => props.$height || 1});\n * +transform: scaleY(${prop('$height', 1)});\n * ```\n * @param name a valid property name from the object\n * @param defaultValue a fallback value in case the property value is invalid\n * @param comparatorFn a function to be used to decide between value or defaultValue\n * @returns Returns function that consumes component props.\n */\nfunction prop<P, K extends keyof P = keyof P>(\n name: K,\n defaultValue?: NonNullable<P[K]>,\n comparatorFn = compare\n) {\n return (props: P): P[K] => comparatorFn(props[name], defaultValue) as P[K]\n}\n\nexport default prop\n"],"names":["whenProps","conditions","props","safeConditions","toArray","some","condition","keys","Object","every","key","propValue","get","conditionValue","Array","isArray","includes","isFunction","Boolean","handleConditionObject","res","reduce","acc","value","tokenKey","result","getToken","join","conditional","classes","i","length","push","isObject","concat","String","compare","args","defaultValue","Number","isNaN","prop","name","comparatorFn"],"mappings":";;;;;AA8BO,SAASA,UAAaC,YAAqD;AAChF,SAAO,SAAUC,OAAmB;AAClC,UAAMC,iBAAiBC,QAAQH,UAAU;AAEzC,WAAOE,eAAeE,KAAMC,CAAAA,cAAc;AACxC,YAAMC,OAAOC,OAAOD,KAAKD,SAAS;AAElC,aAAOC,KAAKE,MAAOC,CAAAA,QAAQ;AACzB,cAAMC,YAAYC,IAAIV,OAAOQ,GAAG;AAChC,cAAMG,iBAAiBP,UAAUI,GAA6B;AAE9D,YAAII,MAAMC,QAAQF,cAAc,GAAG;AACjC,iBAAOT,QAAQS,cAAc,EAAEG,SAASL,SAAS;AAAA,QACnD;AACA,YAAIM,WAAWJ,cAAc,GAAG;AAC9B,iBAAOK,QAAQL,eAAeF,SAAS,CAAC;AAAA,QAC1C;AACA,eAAQE,mBAA+BF;AAAAA,MACzC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAOA,SAASQ,sBAAyBb,WAA+BJ,OAAkB;AACjF,QAAMK,OAAOC,OAAOD,KAAKD,SAAS;AAElC,QAAMc,MAAMb,KAAKc,OAAiB,CAACC,KAAKZ,QAAQ;AAC9C,QAAIa,QAAQjB,UAAUI,GAAG;AAEzB,QAAIO,WAAWM,KAAK,GAAG;AACrBA,cAAQA,MAAMrB,KAAK;AAAA,IACrB;AAEA,QAAIqB,OAAO;AACT,YAAMC,WAAWd;AAEjB,YAAMe,SAAUC,SAASF,UAAUtB,KAA+B,KAAKQ;AACvE,aAAO,CAAC,GAAGY,KAAKG,MAAM;AAAA,IACxB;AAEA,WAAOH;AAAAA,EACT,GAAG,CAAA,CAAE;AAEL,SAAOF,IAAIO,KAAK,GAAG;AACrB;AAkBA,SAASC,eAAkB3B,YAA4B;AACrD,SAAO,SAAUC,OAAkB;AACjC,QAAI2B,UAAoB,CAAA;AAExB,aAASC,IAAI,GAAGA,IAAI7B,WAAW8B,QAAQD,KAAK;AAC1C,YAAMxB,YAAYL,WAAW6B,CAAC;AAE9B,UAAIb,WAAWX,SAAS,GAAG;AACzBuB,gBAAQG,KAAK1B,UAAUJ,KAAK,CAAC;AAAA,MAC/B,WAAW+B,SAAS3B,SAAS,GAAG;AAC9BuB,kBAAUA,QAAQK,OAAOf,sBAAyBb,WAAWJ,KAAK,CAAC;AAAA,MACrE,WAAWI,WAAW;AACpBuB,gBAAQG,KAAKG,OAAO7B,SAAS,CAAC;AAAA,MAChC;AAAA,IACF;AAEA,WAAOuB,QAAQF,KAAK,GAAG;AAAA,EACzB;AACF;ACnHA,SAASS,WAAWC,MAAsB;AACxC,QAAM,CAACd,OAAOe,YAAY,IAAID;AAE9B,MAAId,SAAS,QAAQA,UAAU,SAASgB,OAAOC,MAAMjB,KAAK,GAAG;AAC3D,WAAOe,gBAAgBf;AAAAA,EACzB;AAEA,MAAI,OAAOA,UAAU,YAAYA,MAAMQ,WAAW,GAAG;AACnD,WAAOO,gBAAgBf;AAAAA,EACzB;AAEA,SAAOA;AACT;AAcA,SAASkB,KACPC,MACAJ,cACAK,eAAeP,SACf;AACA,SAAO,CAAClC,UAAmByC,aAAazC,MAAMwC,IAAI,GAAGJ,YAAY;AACnE;"}
1
+ {"version":3,"file":"prop-Fs2axl9W.js","sources":["../src/tools/conditional.ts","../src/tools/prop.ts"],"sourcesContent":["import { isObject } from '@loadsmart/utils-object'\nimport { isFunction } from '@loadsmart/utils-function'\nimport type { F } from 'ts-toolbelt'\n\nimport { getToken } from 'theming'\nimport type { ThemeToken, ThemedProps } from 'theming'\nimport get from 'utils/toolset/get'\nimport toArray from 'utils/toolset/toArray'\n\ntype WhenProps<K> = K | undefined | ((value: K) => boolean | undefined)\n\nexport type When<P> = {\n [Key in keyof P]?: WhenProps<P[Key]> | WhenProps<P[Key]>[] | undefined\n}\n\n/**\n * Utility to generate style/class name conditions based on a components props.\n * Expected prop values can be a single value, an array of values or a function/callback.\n * @example\n * ```jsx\n * whenProps({\n * 'prop-a': true, // checks `props['prop-a']` === true`\n * 'prop-b': [1, 2], // checks `toArray([1, 2]).includes(props['prop-b'])`\n * 'prop-c': (value) => value + 1 // checks `Boolean(callback(props['prop-c']))`\n * 'prop-d': Boolean // checks `Boolean(Boolean(props['prop-d']))`\n * })\n * ```\n * @param conditions\n * @returns Returns function that consumes component props.\n */\nexport function whenProps<P>(conditions: When<F.Narrow<P>> | When<F.Narrow<P>>[]) {\n return function (props: P): boolean {\n const safeConditions = toArray(conditions)\n\n return safeConditions.some((condition) => {\n const keys = Object.keys(condition)\n\n return keys.every((key) => {\n const propValue = get(props, key) as P[keyof P]\n const conditionValue = condition[key as keyof typeof condition]\n\n if (Array.isArray(conditionValue)) {\n return toArray(conditionValue).includes(propValue)\n }\n if (isFunction(conditionValue)) {\n return Boolean(conditionValue(propValue))\n }\n return (conditionValue as unknown) === propValue\n })\n })\n }\n}\n\ntype ConditionObject<P> = Record<\n string,\n string | number | boolean | ((props: P) => boolean) | undefined\n>\n\nfunction handleConditionObject<P>(condition: ConditionObject<P>, props: P): string {\n const keys = Object.keys(condition)\n\n const res = keys.reduce<string[]>((acc, key) => {\n let value = condition[key]\n\n if (isFunction(value)) {\n value = value(props)\n }\n\n if (value) {\n const tokenKey = key as ThemeToken\n\n const result = (getToken(tokenKey, props as unknown as ThemedProps) ?? key) as string\n return [...acc, result]\n }\n\n return acc\n }, [])\n\n return res.join(' ')\n}\n\ntype Condition<P> = number | string | ConditionObject<P> | ((props: P) => string)\n\n/**\n * Concatenate style properties or class names conditionally.\n * Conditions can be functions that consume components props,\n * objects, strings, or numbers (that will be coerced to strings).\n * @example\n * ```jsx\n * conditional(1, 'some-class', {\n * 'class-a': true,\n * 'class-b': (props) => props.showClassB,\n * }, (props) => props.className)\n * ```\n * @param conditions\n * @returns Returns function that consumes component props.\n */\nfunction conditional<P>(...conditions: Condition<P>[]) {\n return function (props: P): string {\n let classes: string[] = []\n\n for (let i = 0; i < conditions.length; i++) {\n const condition = conditions[i]\n\n if (isFunction(condition)) {\n classes.push(condition(props))\n } else if (isObject(condition)) {\n classes = classes.concat(handleConditionObject(condition, props))\n } else if (condition) {\n classes.push(String(condition))\n }\n }\n\n return classes.join(' ')\n }\n}\n\nexport default conditional\n","function compare(...args: any[]): unknown {\n const [value, defaultValue] = args\n\n if (value == null || value === false || Number.isNaN(value)) {\n return defaultValue || value\n }\n\n if (typeof value === 'string' && value.length === 0) {\n return defaultValue || value\n }\n\n return value\n}\n\n/**\n * Retrieve the key value from the props object\n * @example\n * ```jsx\n * -transform: scaleY(${(props) => props.$height || 1});\n * +transform: scaleY(${prop('$height', 1)});\n * ```\n * @param name a valid property name from the object\n * @param defaultValue a fallback value in case the property value is invalid\n * @param comparatorFn a function to be used to decide between value or defaultValue\n * @returns Returns function that consumes component props.\n */\nfunction prop<P, K extends keyof P = keyof P>(\n name: K,\n defaultValue?: NonNullable<P[K]>,\n comparatorFn = compare\n) {\n return (props: P): P[K] => comparatorFn(props[name], defaultValue) as P[K]\n}\n\nexport default prop\n"],"names":["whenProps","conditions","props","safeConditions","toArray","some","condition","keys","Object","every","key","propValue","get","conditionValue","Array","isArray","includes","isFunction","Boolean","handleConditionObject","res","reduce","acc","value","tokenKey","result","getToken","join","conditional","classes","i","length","push","isObject","concat","String","compare","args","defaultValue","Number","isNaN","prop","name","comparatorFn"],"mappings":";;;;;AA8BO,SAASA,UAAaC,YAAqD;AAChF,SAAO,SAAUC,OAAmB;AAClC,UAAMC,iBAAiBC,QAAQH,UAAU;AAEzC,WAAOE,eAAeE,KAAMC,CAAAA,cAAc;AACxC,YAAMC,OAAOC,OAAOD,KAAKD,SAAS;AAElC,aAAOC,KAAKE,MAAOC,CAAAA,QAAQ;AACzB,cAAMC,YAAYC,IAAIV,OAAOQ,GAAG;AAChC,cAAMG,iBAAiBP,UAAUI,GAA6B;AAE9D,YAAII,MAAMC,QAAQF,cAAc,GAAG;AACjC,iBAAOT,QAAQS,cAAc,EAAEG,SAASL,SAAS;AAAA,QACnD;AACA,YAAIM,WAAWJ,cAAc,GAAG;AAC9B,iBAAOK,QAAQL,eAAeF,SAAS,CAAC;AAAA,QAC1C;AACA,eAAQE,mBAA+BF;AAAAA,MACzC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACF;AAOA,SAASQ,sBAAyBb,WAA+BJ,OAAkB;AACjF,QAAMK,OAAOC,OAAOD,KAAKD,SAAS;AAElC,QAAMc,MAAMb,KAAKc,OAAiB,CAACC,KAAKZ,QAAQ;AAC9C,QAAIa,QAAQjB,UAAUI,GAAG;AAEzB,QAAIO,WAAWM,KAAK,GAAG;AACrBA,cAAQA,MAAMrB,KAAK;AAAA,IACrB;AAEA,QAAIqB,OAAO;AACT,YAAMC,WAAWd;AAEjB,YAAMe,SAAUC,SAASF,UAAUtB,KAA+B,KAAKQ;AACvE,aAAO,CAAC,GAAGY,KAAKG,MAAM;AAAA,IACxB;AAEA,WAAOH;AAAAA,EACT,GAAG,CAAA,CAAE;AAEL,SAAOF,IAAIO,KAAK,GAAG;AACrB;AAkBA,SAASC,eAAkB3B,YAA4B;AACrD,SAAO,SAAUC,OAAkB;AACjC,QAAI2B,UAAoB,CAAA;AAExB,aAASC,IAAI,GAAGA,IAAI7B,WAAW8B,QAAQD,KAAK;AAC1C,YAAMxB,YAAYL,WAAW6B,CAAC;AAE9B,UAAIb,WAAWX,SAAS,GAAG;AACzBuB,gBAAQG,KAAK1B,UAAUJ,KAAK,CAAC;AAAA,MAC/B,WAAW+B,SAAS3B,SAAS,GAAG;AAC9BuB,kBAAUA,QAAQK,OAAOf,sBAAsBb,WAAWJ,KAAK,CAAC;AAAA,MAClE,WAAWI,WAAW;AACpBuB,gBAAQG,KAAKG,OAAO7B,SAAS,CAAC;AAAA,MAChC;AAAA,IACF;AAEA,WAAOuB,QAAQF,KAAK,GAAG;AAAA,EACzB;AACF;ACnHA,SAASS,WAAWC,MAAsB;AACxC,QAAM,CAACd,OAAOe,YAAY,IAAID;AAE9B,MAAId,SAAS,QAAQA,UAAU,SAASgB,OAAOC,MAAMjB,KAAK,GAAG;AAC3D,WAAOe,gBAAgBf;AAAAA,EACzB;AAEA,MAAI,OAAOA,UAAU,YAAYA,MAAMQ,WAAW,GAAG;AACnD,WAAOO,gBAAgBf;AAAAA,EACzB;AAEA,SAAOA;AACT;AAcA,SAASkB,KACPC,MACAJ,cACAK,eAAeP,SACf;AACA,SAAO,CAAClC,UAAmByC,aAAazC,MAAMwC,IAAI,GAAGJ,YAAY;AACnE;"}
@@ -1,4 +1,5 @@
1
1
  import { ThemeToken } from '../theming';
2
+ import { FlattenInterpolation, ThemeProps } from 'styled-components';
2
3
  export interface TypographyOptions {
3
4
  italic?: boolean;
4
5
  color?: ThemeToken;
@@ -19,5 +20,5 @@ export declare const typographyProperties: TypographyProperties;
19
20
  * @param variant Name of the variant
20
21
  * @param options Add boldness, italics and color
21
22
  */
22
- declare function typography<P>(variant?: TypographyVariants | ((props: P) => string), options?: TypographyOptions): import('styled-components').FlattenInterpolation<import('styled-components').ThemedStyledProps<import('../theming').ThemedProps, any>> | ((props: P) => import('styled-components').FlattenInterpolation<import('styled-components').ThemedStyledProps<import('../theming').ThemedProps, any>> | ((props: unknown) => import('styled-components').FlattenInterpolation<import('styled-components').ThemedStyledProps<import('../theming').ThemedProps, any>> | /*elided*/ any));
23
+ declare function typography<P>(variant?: TypographyVariants | ((props: P) => string), options?: TypographyOptions): FlattenInterpolation<ThemeProps<any>> | ((props: P) => FlattenInterpolation<ThemeProps<any>> | ((props: unknown) => FlattenInterpolation<ThemeProps<any>> | /*elided*/ any));
23
24
  export default typography;
@@ -1,10 +1,10 @@
1
- import { RenderOptions, fireEvent, within, waitFor, waitForElementToBeRemoved, act, screen, queries } from '@testing-library/react';
1
+ import { RenderOptions, fireEvent, within, waitFor, waitForElementToBeRemoved, act, screen, queries, RenderResult } from '@testing-library/react';
2
2
  import { default as userEvent } from '@testing-library/user-event';
3
3
  import { ReactNode } from 'react';
4
4
  declare class Renderer {
5
5
  result: ReactNode;
6
6
  constructor(children: ReactNode);
7
- render(options?: Omit<RenderOptions, 'queries'>): import('@testing-library/react').RenderResult<typeof queries, HTMLElement, HTMLElement>;
7
+ render(options?: Omit<RenderOptions, 'queries'>): RenderResult<typeof queries, HTMLElement, HTMLElement>;
8
8
  }
9
9
  export default function customRenderer(children: ReactNode): Renderer;
10
10
  export { act, fireEvent as fire, queries, screen, userEvent as user, waitFor, waitForElementToBeRemoved, within, };
@@ -1,2 +1 @@
1
- type ColorScheme = 'dark' | 'light';
2
- export default ColorScheme;
1
+ export type ColorScheme = 'dark' | 'light';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loadsmart/loadsmart-ui",
3
- "version": "8.0.1",
3
+ "version": "8.0.2",
4
4
  "description": "Miranda UI, a React UI library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -27,7 +27,7 @@
27
27
  "postpack": "pinst --enable",
28
28
  "format": "prettier . --write",
29
29
  "check:format:ci": "prettier . --check",
30
- "check:type": "tsc",
30
+ "check:type": "tsc -b",
31
31
  "check:type:ci": "yarn check:type"
32
32
  },
33
33
  "storybook-deployer": {
@@ -37,53 +37,55 @@
37
37
  "addFileAttribute": "true"
38
38
  },
39
39
  "devDependencies": {
40
- "@commitlint/cli": "^20.4.3",
41
- "@commitlint/config-conventional": "^20.4.3",
42
- "@loadsmart/miranda-tokens": "^4.25.2",
43
- "@storybook/addon-a11y": "^8.6.12",
44
- "@storybook/addon-docs": "^8.6.12",
45
- "@storybook/addon-essentials": "^8.6.12",
46
- "@storybook/addon-links": "^8.6.12",
47
- "@storybook/react": "^8.6.12",
48
- "@storybook/react-vite": "^8.6.12",
49
- "@storybook/theming": "^8.6.12",
50
- "@swc/core": "^1.15.18",
40
+ "@commitlint/cli": "^20.5.0",
41
+ "@commitlint/config-conventional": "^20.5.0",
42
+ "@loadsmart/miranda-tokens": "^4.25.7",
43
+ "@rolldown/plugin-babel": "^0.2.2",
44
+ "@storybook/addon-a11y": "^8.6.18",
45
+ "@storybook/addon-docs": "^8.6.18",
46
+ "@storybook/addon-essentials": "^8.6.18",
47
+ "@storybook/addon-links": "^8.6.18",
48
+ "@storybook/react": "^8.6.18",
49
+ "@storybook/react-vite": "^8.6.18",
50
+ "@storybook/theming": "^8.6.18",
51
+ "@swc/core": "^1.15.21",
51
52
  "@swc/jest": "^0.2.39",
52
- "@tailwindcss/vite": "^4.2.1",
53
+ "@tailwindcss/vite": "^4.2.2",
53
54
  "@testing-library/dom": "^10.4.1",
54
55
  "@testing-library/jest-dom": "^6.9.1",
55
56
  "@testing-library/react": "^16.3.2",
56
57
  "@testing-library/react-hooks": "^8.0.1",
57
58
  "@testing-library/user-event": "^13.5.0",
58
59
  "@types/chance": "^1.1.7",
59
- "@types/jest": "^29.5.14",
60
- "@types/node": "^22.19.15",
60
+ "@types/jest": "^30.0.0",
61
+ "@types/node": "^24.12.0",
61
62
  "@types/react": "^18.3.28",
62
63
  "@types/react-dom": "^18.3.7",
63
64
  "@types/styled-components": "^5.1.36",
64
- "@vitejs/plugin-react": "^5.1.4",
65
+ "@vitejs/plugin-react": "^5.2.0",
65
66
  "babel-plugin-styled-components": "^2.1.4",
66
67
  "chance": "^1.1.13",
67
68
  "commitizen": "^4.3.1",
68
69
  "cz-conventional-changelog": "^3.3.0",
69
70
  "eslint": "^9.39.4",
70
71
  "eslint-config-prettier": "^10.1.8",
72
+ "eslint-plugin-jest": "^29.15.1",
71
73
  "eslint-plugin-jest-dom": "^5.5.0",
72
74
  "eslint-plugin-jsx-a11y": "^6.10.2",
73
75
  "eslint-plugin-prettier": "^5.5.5",
74
76
  "eslint-plugin-promise": "^7.2.1",
75
77
  "eslint-plugin-react": "^7.37.5",
76
78
  "eslint-plugin-react-hooks": "^7.0.1",
77
- "eslint-plugin-testing-library": "^7.16.0",
79
+ "eslint-plugin-testing-library": "^7.16.2",
78
80
  "eslint-plugin-unicorn": "^63.0.0",
79
81
  "gh-pages": "^6.3.0",
80
82
  "husky": "^9.1.7",
81
- "jest": "^29.7.0",
82
- "jest-environment-jsdom": "^29.7.0",
83
+ "jest": "^30.3.0",
84
+ "jest-environment-jsdom": "^30.3.0",
83
85
  "jest-junit": "^16.0.0",
84
86
  "jest-transformer-svg": "^2.1.0",
85
- "lint-staged": "^16.3.2",
86
- "nanoid": "^5.1.6",
87
+ "lint-staged": "^16.4.0",
88
+ "nanoid": "^5.1.7",
87
89
  "pinst": "^3.0.0",
88
90
  "prettier": "^3.8.1",
89
91
  "react": "^18.3.1",
@@ -93,10 +95,10 @@
93
95
  "semantic-release": "^25.0.3",
94
96
  "storybook": "^8.6.18",
95
97
  "styled-components": "^5.3.11",
96
- "tailwindcss": "^4.2.1",
98
+ "tailwindcss": "^4.2.2",
97
99
  "ts-toolbelt": "^9.6.0",
98
- "typescript": "^5.9.3",
99
- "typescript-eslint": "^8.57.0",
100
+ "typescript": "^6.0.2",
101
+ "typescript-eslint": "^8.57.2",
100
102
  "vite": "^7.3.1",
101
103
  "vite-plugin-dts": "^4.5.4",
102
104
  "vite-plugin-svgr": "^4.5.0"
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { AccordionProps } from './Accordion';
3
- import { Meta } from '@storybook/react';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare function Playground(args: AccordionProps): React.JSX.Element;
7
- export declare function CustomIndicators(): React.JSX.Element;
8
- export declare function ControlledOpened(args: AccordionProps): React.JSX.Element;
9
- export declare function ControlledBasedOnExpandedProp(args: AccordionProps): React.JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,107 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { BannerProps, BannerActionProps } from './Banner';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare function Playground(args: BannerProps): React.JSX.Element;
7
- export declare namespace Playground {
8
- var args: {
9
- scale: string;
10
- variant: string;
11
- title: string;
12
- };
13
- }
14
- export declare function Warning(args: BannerProps): React.JSX.Element;
15
- export declare namespace Warning {
16
- var args: {
17
- scale: string;
18
- variant: string;
19
- title: string;
20
- };
21
- }
22
- export declare function Danger(args: BannerProps): React.JSX.Element;
23
- export declare namespace Danger {
24
- var args: {
25
- scale: string;
26
- variant: string;
27
- title: string;
28
- };
29
- }
30
- export declare function Neutral(args: BannerProps): React.JSX.Element;
31
- export declare namespace Neutral {
32
- var args: {
33
- scale: string;
34
- variant: string;
35
- title: string;
36
- };
37
- }
38
- export declare function CustomIcon(args: BannerProps): React.JSX.Element;
39
- export declare namespace CustomIcon {
40
- var args: {
41
- scale: string;
42
- variant: string;
43
- title: string;
44
- icon: React.JSX.Element;
45
- };
46
- }
47
- export declare function Large(args: BannerProps): React.JSX.Element;
48
- export declare namespace Large {
49
- var args: {
50
- scale: string;
51
- variant: string;
52
- title: string;
53
- description: string;
54
- };
55
- }
56
- export declare function Action(args: BannerActionProps): React.JSX.Element;
57
- export declare namespace Action {
58
- var args: {
59
- scale: string;
60
- variant: string;
61
- title: string;
62
- action: string;
63
- };
64
- }
65
- export declare function ActionWithSecondaryAction(args: BannerActionProps): React.JSX.Element;
66
- export declare namespace ActionWithSecondaryAction {
67
- var args: {
68
- scale: string;
69
- variant: string;
70
- title: string;
71
- action: string;
72
- secondaryAction: string;
73
- };
74
- }
75
- export declare function ActionLarge(args: BannerActionProps): React.JSX.Element;
76
- export declare namespace ActionLarge {
77
- var args: {
78
- scale: string;
79
- variant: string;
80
- title: string;
81
- description: string;
82
- action: string;
83
- };
84
- }
85
- export declare function ActionLargeWithSecondaryAction(args: BannerActionProps): React.JSX.Element;
86
- export declare namespace ActionLargeWithSecondaryAction {
87
- var args: {
88
- scale: string;
89
- variant: string;
90
- title: string;
91
- description: string;
92
- action: string;
93
- secondaryAction: string;
94
- };
95
- }
96
- export declare function ActionLargeDismissibleWithSecondaryAction(args: BannerActionProps): React.JSX.Element;
97
- export declare namespace ActionLargeDismissibleWithSecondaryAction {
98
- var args: {
99
- scale: string;
100
- variant: string;
101
- title: string;
102
- description: string;
103
- action: string;
104
- secondaryAction: string;
105
- dismissible: boolean;
106
- };
107
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { BreadcrumbsProps } from './Breadcrumbs';
2
- import { Meta } from '@storybook/react';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, BreadcrumbsProps>;
@@ -1,33 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { BackButtonProps } from '../../common/BackButton';
4
- import { ButtonProps } from './Button';
5
- import { CloseButtonProps } from '../../common/CloseButton';
6
- declare const _default: Meta;
7
- export default _default;
8
- export declare function Playground(args: ButtonProps): React.JSX.Element;
9
- export declare namespace Playground {
10
- var args: {
11
- scale: string;
12
- variant: string;
13
- leading: React.JSX.Element;
14
- trailing: React.JSX.Element;
15
- };
16
- }
17
- export declare function Base(args: ButtonProps): React.JSX.Element;
18
- export declare function Selector(args: ButtonProps): React.JSX.Element;
19
- export declare namespace Selector {
20
- var args: {
21
- scale: string;
22
- variant: string;
23
- };
24
- }
25
- export declare function Icon(args: ButtonProps): React.JSX.Element;
26
- export declare namespace Icon {
27
- var args: {
28
- scale: string;
29
- };
30
- }
31
- export declare function Back(args: BackButtonProps): React.JSX.Element;
32
- export declare function Close(args: CloseButtonProps): React.JSX.Element;
33
- export declare function Loading(args: ButtonProps): React.JSX.Element;
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { CalendarDate } from './Date.helper';
4
- import { CalendarProps } from './Calendar.types';
5
- declare const _default: Meta;
6
- export default _default;
7
- export declare const Playground: import('@storybook/core/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, CalendarProps>;
8
- export declare function Selection(): React.JSX.Element;
9
- declare function isWeekend(date: CalendarDate): boolean;
10
- export declare function CalendarConstraints(args: CalendarProps): React.JSX.Element;
11
- export declare namespace CalendarConstraints {
12
- var args: {
13
- constraints: ((string | null)[] | typeof isWeekend)[];
14
- };
15
- var parameters: {
16
- docs: {
17
- description: {
18
- story: string;
19
- };
20
- };
21
- };
22
- }
@@ -1 +0,0 @@
1
- export declare const formatter: import('./DateFormat.helper').DateFormat;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- import { StoryFn, Meta } from '@storybook/react';
2
- import { CardProps } from './Card';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<CardProps>;
6
- export declare const Default: StoryFn<CardProps>;
7
- export declare const TitleOnly: StoryFn<CardProps>;
8
- export declare const Flagged: StoryFn<CardProps>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { CheckboxProps } from './Checkbox';
3
- import { Meta } from '@storybook/react';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare function Playground(args: CheckboxProps): React.JSX.Element;
7
- export declare namespace Playground {
8
- var args: {};
9
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,23 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StoryFn, Meta } from '@storybook/react';
3
- import { DatePickerProps } from './DatePicker.types';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare const Playground: StoryFn<DatePickerProps>;
7
- export declare const WithValue: StoryFn<DatePickerProps>;
8
- export declare function DatePickerConstraints(args: DatePickerProps): React.JSX.Element;
9
- export declare namespace DatePickerConstraints {
10
- var args: {
11
- id: string;
12
- name: string;
13
- constraints: (string | null)[][];
14
- value: string;
15
- };
16
- var parameters: {
17
- docs: {
18
- description: {
19
- story: string;
20
- };
21
- };
22
- };
23
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import { default as React } from 'react';
2
- import { StoryFn, Meta } from '@storybook/react';
3
- import { DateRangePickerProps } from './DatePicker.types';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare const Playground: StoryFn<DateRangePickerProps>;
7
- export declare const WithValue: StoryFn<DateRangePickerProps>;
8
- export declare function DateRangePickerConstraints(args: DateRangePickerProps): React.JSX.Element;
9
- export declare namespace DateRangePickerConstraints {
10
- var args: {
11
- id: string;
12
- name: string;
13
- constraints: (string | null)[][];
14
- };
15
- var parameters: {
16
- docs: {
17
- description: {
18
- story: string;
19
- };
20
- };
21
- };
22
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,68 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { DialogProps } from './Dialog';
4
- declare const _default: Meta;
5
- export default _default;
6
- export declare function WithoutHeader(args: DialogProps): React.JSX.Element;
7
- export declare namespace WithoutHeader {
8
- var args: {
9
- scale: string;
10
- open: boolean;
11
- };
12
- }
13
- export declare function WithHeader(args: DialogProps): React.JSX.Element;
14
- export declare namespace WithHeader {
15
- var args: {
16
- scale: string;
17
- open: boolean;
18
- };
19
- }
20
- export declare function WithHeaderAndBody(args: DialogProps): React.JSX.Element;
21
- export declare namespace WithHeaderAndBody {
22
- var args: {
23
- scale: string;
24
- open: boolean;
25
- };
26
- }
27
- export declare function WithCloseButton(args: DialogProps): React.JSX.Element;
28
- export declare namespace WithCloseButton {
29
- var args: {
30
- scale: string;
31
- open: boolean;
32
- };
33
- }
34
- export declare function WithActionConfirm(args: DialogProps): React.JSX.Element;
35
- export declare namespace WithActionConfirm {
36
- var args: {
37
- scale: string;
38
- open: boolean;
39
- };
40
- }
41
- export declare function WithCustomActionConfirmLabel(args: DialogProps): React.JSX.Element;
42
- export declare namespace WithCustomActionConfirmLabel {
43
- var args: {
44
- scale: string;
45
- open: boolean;
46
- };
47
- }
48
- export declare function WithCustomActionCancelLabel(args: DialogProps): React.JSX.Element;
49
- export declare namespace WithCustomActionCancelLabel {
50
- var args: {
51
- scale: string;
52
- open: boolean;
53
- };
54
- }
55
- export declare function WithActionConfirmAndCancel(args: DialogProps): React.JSX.Element;
56
- export declare namespace WithActionConfirmAndCancel {
57
- var args: {
58
- scale: string;
59
- open: boolean;
60
- };
61
- }
62
- export declare function WithInlineActions(args: DialogProps): React.JSX.Element;
63
- export declare namespace WithInlineActions {
64
- var args: {
65
- scale: string;
66
- open: boolean;
67
- };
68
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,34 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Meta } from '@storybook/react';
3
- import { DropZoneProps } from './types';
4
- declare const _default: Meta;
5
- export default _default;
6
- type PlaygroundProps = DropZoneProps & {
7
- readonly errorMessage?: string;
8
- };
9
- export declare function Playground({ errorMessage, ...args }: PlaygroundProps): React.JSX.Element;
10
- export declare namespace Playground {
11
- var args: {
12
- hint: string;
13
- accept: string;
14
- multiple: boolean;
15
- };
16
- }
17
- export declare function WithInitialFileList({ errorMessage, ...args }: PlaygroundProps): React.JSX.Element;
18
- export declare namespace WithInitialFileList {
19
- var args: {
20
- hint: string;
21
- accept: string;
22
- multiple: boolean;
23
- };
24
- }
25
- export declare function GeneralError({ errorMessage, ...args }: PlaygroundProps): React.JSX.Element;
26
- export declare namespace GeneralError {
27
- var args: {
28
- hint: string;
29
- accept: string;
30
- multiple: boolean;
31
- error: boolean;
32
- errorMessage: string;
33
- };
34
- }
@@ -1,6 +0,0 @@
1
- import { Meta, StoryFn } from '@storybook/react';
2
- import { DrawerProps } from './Drawer';
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const Playground: StoryFn<DrawerProps>;
6
- export declare const SmallerContentPlayground: StoryFn<DrawerProps>;
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import { StoryFn, Meta } from '@storybook/react';
2
- import { DropdownProps, DropdownTriggerProps } from './Dropdown.types';
3
- declare const meta: Meta;
4
- export default meta;
5
- export type DropdownStoryProps = DropdownProps & {
6
- scale: DropdownTriggerProps['scale'];
7
- outlined?: DropdownTriggerProps['outlined'];
8
- };
9
- export declare const Playground: StoryFn<DropdownStoryProps>;
10
- export declare const WithSections: StoryFn<DropdownStoryProps>;
11
- export declare const Extended: StoryFn<DropdownStoryProps>;
12
- export declare const CustomTrigger: StoryFn<DropdownStoryProps>;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};