@redsift/design-system 6.0.0 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CONTRIBUTING.md +382 -0
  2. package/index.d.ts +830 -0
  3. package/index.js +3182 -0
  4. package/index.js.map +1 -0
  5. package/package.json +16 -35
  6. package/style/redsift.css +10 -0
  7. package/esm/_internal/AppBar.js +0 -75
  8. package/esm/_internal/AppBar.js.map +0 -1
  9. package/esm/_internal/AppContainer.js +0 -86
  10. package/esm/_internal/AppContainer.js.map +0 -1
  11. package/esm/_internal/AppContent.js +0 -58
  12. package/esm/_internal/AppContent.js.map +0 -1
  13. package/esm/_internal/AppSidePanel.js +0 -81
  14. package/esm/_internal/AppSidePanel.js.map +0 -1
  15. package/esm/_internal/Badge2.js +0 -73
  16. package/esm/_internal/Badge2.js.map +0 -1
  17. package/esm/_internal/BreadcrumbItem.js +0 -80
  18. package/esm/_internal/BreadcrumbItem.js.map +0 -1
  19. package/esm/_internal/Breadcrumbs2.js +0 -81
  20. package/esm/_internal/Breadcrumbs2.js.map +0 -1
  21. package/esm/_internal/Button2.js +0 -74
  22. package/esm/_internal/Button2.js.map +0 -1
  23. package/esm/_internal/ButtonLink.js +0 -70
  24. package/esm/_internal/ButtonLink.js.map +0 -1
  25. package/esm/_internal/Checkbox2.js +0 -192
  26. package/esm/_internal/Checkbox2.js.map +0 -1
  27. package/esm/_internal/CheckboxGroup.js +0 -150
  28. package/esm/_internal/CheckboxGroup.js.map +0 -1
  29. package/esm/_internal/FloatingActionButton.js +0 -154
  30. package/esm/_internal/FloatingActionButton.js.map +0 -1
  31. package/esm/_internal/Icon2.js +0 -102
  32. package/esm/_internal/Icon2.js.map +0 -1
  33. package/esm/_internal/IconButton.js +0 -90
  34. package/esm/_internal/IconButton.js.map +0 -1
  35. package/esm/_internal/Link2.js +0 -46
  36. package/esm/_internal/Link2.js.map +0 -1
  37. package/esm/_internal/LinkButton.js +0 -53
  38. package/esm/_internal/LinkButton.js.map +0 -1
  39. package/esm/_internal/SideNavigationMenu.js +0 -412
  40. package/esm/_internal/SideNavigationMenu.js.map +0 -1
  41. package/esm/_internal/SideNavigationMenuItem.js +0 -142
  42. package/esm/_internal/SideNavigationMenuItem.js.map +0 -1
  43. package/esm/_internal/_rollupPluginBabelHelpers.js +0 -108
  44. package/esm/_internal/_rollupPluginBabelHelpers.js.map +0 -1
  45. package/esm/_internal/app-bar.js +0 -14
  46. package/esm/_internal/app-bar.js.map +0 -1
  47. package/esm/_internal/app-container.js +0 -17
  48. package/esm/_internal/app-container.js.map +0 -1
  49. package/esm/_internal/app-content.js +0 -8
  50. package/esm/_internal/app-content.js.map +0 -1
  51. package/esm/_internal/app-side-panel.js +0 -18
  52. package/esm/_internal/app-side-panel.js.map +0 -1
  53. package/esm/_internal/badge.js +0 -7
  54. package/esm/_internal/badge.js.map +0 -1
  55. package/esm/_internal/breadcrumb-item.js +0 -9
  56. package/esm/_internal/breadcrumb-item.js.map +0 -1
  57. package/esm/_internal/breadcrumbs.js +0 -10
  58. package/esm/_internal/breadcrumbs.js.map +0 -1
  59. package/esm/_internal/button-link.js +0 -9
  60. package/esm/_internal/button-link.js.map +0 -1
  61. package/esm/_internal/button.js +0 -10
  62. package/esm/_internal/button.js.map +0 -1
  63. package/esm/_internal/checkbox-group.js +0 -8
  64. package/esm/_internal/checkbox-group.js.map +0 -1
  65. package/esm/_internal/checkbox.js +0 -12
  66. package/esm/_internal/checkbox.js.map +0 -1
  67. package/esm/_internal/context.js +0 -6
  68. package/esm/_internal/context.js.map +0 -1
  69. package/esm/_internal/context2.js +0 -6
  70. package/esm/_internal/context2.js.map +0 -1
  71. package/esm/_internal/floating-action-button.js +0 -10
  72. package/esm/_internal/floating-action-button.js.map +0 -1
  73. package/esm/_internal/icon-button.js +0 -10
  74. package/esm/_internal/icon-button.js.map +0 -1
  75. package/esm/_internal/icon.js +0 -7
  76. package/esm/_internal/icon.js.map +0 -1
  77. package/esm/_internal/link-button.js +0 -8
  78. package/esm/_internal/link-button.js.map +0 -1
  79. package/esm/_internal/link.js +0 -7
  80. package/esm/_internal/link.js.map +0 -1
  81. package/esm/_internal/side-navigation-menu-bar.js +0 -14
  82. package/esm/_internal/side-navigation-menu-bar.js.map +0 -1
  83. package/esm/_internal/side-navigation-menu-item.js +0 -11
  84. package/esm/_internal/side-navigation-menu-item.js.map +0 -1
  85. package/esm/_internal/side-navigation-menu.js +0 -13
  86. package/esm/_internal/side-navigation-menu.js.map +0 -1
  87. package/esm/_internal/styles.js +0 -101
  88. package/esm/_internal/styles.js.map +0 -1
  89. package/esm/_internal/styles2.js +0 -17
  90. package/esm/_internal/styles2.js.map +0 -1
  91. package/esm/_internal/types.js +0 -31
  92. package/esm/_internal/types.js.map +0 -1
  93. package/esm/_internal/useAppSidePanel.js +0 -22
  94. package/esm/_internal/useAppSidePanel.js.map +0 -1
  95. package/esm/_internal/useIsLoaded.js +0 -14
  96. package/esm/_internal/useIsLoaded.js.map +0 -1
  97. package/esm/_internal/useSideNavigationMenuBar.js +0 -303
  98. package/esm/_internal/useSideNavigationMenuBar.js.map +0 -1
  99. package/esm/_internal/warnIfNoAccessibleLabelFound.js +0 -21
  100. package/esm/_internal/warnIfNoAccessibleLabelFound.js.map +0 -1
  101. package/esm/index.js +0 -35
  102. package/esm/index.js.map +0 -1
  103. package/types.d.ts +0 -782
@@ -1,108 +0,0 @@
1
- function ownKeys(object, enumerableOnly) {
2
- var keys = Object.keys(object);
3
-
4
- if (Object.getOwnPropertySymbols) {
5
- var symbols = Object.getOwnPropertySymbols(object);
6
- enumerableOnly && (symbols = symbols.filter(function (sym) {
7
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
8
- })), keys.push.apply(keys, symbols);
9
- }
10
-
11
- return keys;
12
- }
13
-
14
- function _objectSpread2(target) {
15
- for (var i = 1; i < arguments.length; i++) {
16
- var source = null != arguments[i] ? arguments[i] : {};
17
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
18
- _defineProperty(target, key, source[key]);
19
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
20
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
21
- });
22
- }
23
-
24
- return target;
25
- }
26
-
27
- function _defineProperty(obj, key, value) {
28
- if (key in obj) {
29
- Object.defineProperty(obj, key, {
30
- value: value,
31
- enumerable: true,
32
- configurable: true,
33
- writable: true
34
- });
35
- } else {
36
- obj[key] = value;
37
- }
38
-
39
- return obj;
40
- }
41
-
42
- function _extends() {
43
- _extends = Object.assign ? Object.assign.bind() : function (target) {
44
- for (var i = 1; i < arguments.length; i++) {
45
- var source = arguments[i];
46
-
47
- for (var key in source) {
48
- if (Object.prototype.hasOwnProperty.call(source, key)) {
49
- target[key] = source[key];
50
- }
51
- }
52
- }
53
-
54
- return target;
55
- };
56
- return _extends.apply(this, arguments);
57
- }
58
-
59
- function _objectWithoutPropertiesLoose(source, excluded) {
60
- if (source == null) return {};
61
- var target = {};
62
- var sourceKeys = Object.keys(source);
63
- var key, i;
64
-
65
- for (i = 0; i < sourceKeys.length; i++) {
66
- key = sourceKeys[i];
67
- if (excluded.indexOf(key) >= 0) continue;
68
- target[key] = source[key];
69
- }
70
-
71
- return target;
72
- }
73
-
74
- function _objectWithoutProperties(source, excluded) {
75
- if (source == null) return {};
76
-
77
- var target = _objectWithoutPropertiesLoose(source, excluded);
78
-
79
- var key, i;
80
-
81
- if (Object.getOwnPropertySymbols) {
82
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
83
-
84
- for (i = 0; i < sourceSymbolKeys.length; i++) {
85
- key = sourceSymbolKeys[i];
86
- if (excluded.indexOf(key) >= 0) continue;
87
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
88
- target[key] = source[key];
89
- }
90
- }
91
-
92
- return target;
93
- }
94
-
95
- function _taggedTemplateLiteral(strings, raw) {
96
- if (!raw) {
97
- raw = strings.slice(0);
98
- }
99
-
100
- return Object.freeze(Object.defineProperties(strings, {
101
- raw: {
102
- value: Object.freeze(raw)
103
- }
104
- }));
105
- }
106
-
107
- export { _taggedTemplateLiteral as _, _objectWithoutProperties as a, _extends as b, _objectSpread2 as c };
108
- //# sourceMappingURL=_rollupPluginBabelHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +0,0 @@
1
- export { A as AppBar } from './AppBar.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@redsift/icons';
6
- import './context.js';
7
- import './useIsLoaded.js';
8
- import 'styled-components';
9
- import './IconButton.js';
10
- import '@react-aria/button';
11
- import './types.js';
12
- import './warnIfNoAccessibleLabelFound.js';
13
- import './Icon2.js';
14
- //# sourceMappingURL=app-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-bar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,17 +0,0 @@
1
- export { A as AppContainerContext } from './context.js';
2
- export { A as AppContainer } from './AppContainer.js';
3
- import 'react';
4
- import './_rollupPluginBabelHelpers.js';
5
- import 'classnames';
6
- import './AppBar.js';
7
- import '@redsift/icons';
8
- import './useIsLoaded.js';
9
- import 'styled-components';
10
- import './IconButton.js';
11
- import '@react-aria/button';
12
- import './types.js';
13
- import './warnIfNoAccessibleLabelFound.js';
14
- import './Icon2.js';
15
- import './AppSidePanel.js';
16
- import './AppContent.js';
17
- //# sourceMappingURL=app-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-container.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -1,8 +0,0 @@
1
- export { A as AppContent } from './AppContent.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './context.js';
6
- import './useIsLoaded.js';
7
- import 'styled-components';
8
- //# sourceMappingURL=app-content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-content.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,18 +0,0 @@
1
- export { A as AppSidePanel } from './AppSidePanel.js';
2
- export { u as useAppSidePanel } from './useAppSidePanel.js';
3
- import './_rollupPluginBabelHelpers.js';
4
- import 'react';
5
- import 'classnames';
6
- import '@redsift/icons';
7
- import './context.js';
8
- import 'styled-components';
9
- import './IconButton.js';
10
- import '@react-aria/button';
11
- import './types.js';
12
- import './warnIfNoAccessibleLabelFound.js';
13
- import './Icon2.js';
14
- import './useSideNavigationMenuBar.js';
15
- import './SideNavigationMenuItem.js';
16
- import './Badge2.js';
17
- import './SideNavigationMenu.js';
18
- //# sourceMappingURL=app-side-panel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-side-panel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1,7 +0,0 @@
1
- export { a as Badge, B as BadgeVariant } from './Badge2.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import 'styled-components';
6
- import './types.js';
7
- //# sourceMappingURL=badge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"badge.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,9 +0,0 @@
1
- export { B as BreadcrumbItem } from './BreadcrumbItem.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './types.js';
6
- import './warnIfNoAccessibleLabelFound.js';
7
- import 'styled-components';
8
- import './Icon2.js';
9
- //# sourceMappingURL=breadcrumb-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumb-item.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,10 +0,0 @@
1
- export { B as Breadcrumbs } from './Breadcrumbs2.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './types.js';
6
- import './warnIfNoAccessibleLabelFound.js';
7
- import 'styled-components';
8
- import './BreadcrumbItem.js';
9
- import './Icon2.js';
10
- //# sourceMappingURL=breadcrumbs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"breadcrumbs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,9 +0,0 @@
1
- export { B as ButtonLink } from './ButtonLink.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './types.js';
6
- import './styles.js';
7
- import 'styled-components';
8
- import './Icon2.js';
9
- //# sourceMappingURL=button-link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button-link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,10 +0,0 @@
1
- export { a as ButtonSize, B as ButtonVariant, S as StyledButton } from './styles.js';
2
- export { B as Button } from './Button2.js';
3
- import './_rollupPluginBabelHelpers.js';
4
- import 'styled-components';
5
- import 'react';
6
- import 'classnames';
7
- import '@react-aria/button';
8
- import './types.js';
9
- import './Icon2.js';
10
- //# sourceMappingURL=button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- export { a as CheckboxGroup, C as CheckboxGroupOrientation } from './CheckboxGroup.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './types.js';
6
- import './context2.js';
7
- import 'styled-components';
8
- //# sourceMappingURL=checkbox-group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox-group.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,12 +0,0 @@
1
- export { a as Checkbox, C as CheckboxSize } from './Checkbox2.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@react-aria/focus';
6
- import '@redsift/icons';
7
- import './types.js';
8
- import './context2.js';
9
- import './warnIfNoAccessibleLabelFound.js';
10
- import 'styled-components';
11
- import './Icon2.js';
12
- //# sourceMappingURL=checkbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkbox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
-
3
- const AppContainerContext = /*#__PURE__*/React.createContext(null);
4
-
5
- export { AppContainerContext as A };
6
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sources":["../../../src/components/app-container/context.ts"],"sourcesContent":["import React from 'react';\nimport { AppContainerState } from './types';\n\nexport const AppContainerContext = React.createContext<AppContainerState | null>(null);\n"],"names":["AppContainerContext","React","createContext"],"mappings":";;AAGO,MAAMA,mBAAmB,gBAAGC,KAAK,CAACC,aAAN,CAA8C,IAA9C;;;;"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
-
3
- const CheckboxGroupContext = /*#__PURE__*/React.createContext(null);
4
-
5
- export { CheckboxGroupContext as C };
6
- //# sourceMappingURL=context2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context2.js","sources":["../../../src/components/checkbox-group/context.ts"],"sourcesContent":["import React from 'react';\nimport { CheckboxGroupState } from './types';\n\nexport const CheckboxGroupContext = React.createContext<CheckboxGroupState | null>(null);\n"],"names":["CheckboxGroupContext","React","createContext"],"mappings":";;AAGO,MAAMA,oBAAoB,gBAAGC,KAAK,CAACC,aAAN,CAA+C,IAA/C;;;;"}
@@ -1,10 +0,0 @@
1
- export { c as FloatingActionButton, b as FloatingActionButtonColor, a as FloatingActionButtonSize, F as FloatingActionButtonVariant } from './FloatingActionButton.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@react-aria/button';
6
- import './types.js';
7
- import './warnIfNoAccessibleLabelFound.js';
8
- import 'styled-components';
9
- import './Icon2.js';
10
- //# sourceMappingURL=floating-action-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"floating-action-button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,10 +0,0 @@
1
- export { a as IconButton, I as IconButtonSize } from './IconButton.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@react-aria/button';
6
- import './types.js';
7
- import './warnIfNoAccessibleLabelFound.js';
8
- import 'styled-components';
9
- import './Icon2.js';
10
- //# sourceMappingURL=icon-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,7 +0,0 @@
1
- export { a as Icon, I as IconSize } from './Icon2.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import 'styled-components';
6
- import './types.js';
7
- //# sourceMappingURL=icon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,8 +0,0 @@
1
- export { L as LinkButton } from './LinkButton.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@react-aria/button';
6
- import './styles2.js';
7
- import 'styled-components';
8
- //# sourceMappingURL=link-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link-button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,7 +0,0 @@
1
- export { S as StyledLink } from './styles2.js';
2
- export { L as Link } from './Link2.js';
3
- import './_rollupPluginBabelHelpers.js';
4
- import 'styled-components';
5
- import 'react';
6
- import 'classnames';
7
- //# sourceMappingURL=link.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"link.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,14 +0,0 @@
1
- export { S as SideNavigationMenuBar, u as useSideNavigationMenuBar } from './useSideNavigationMenuBar.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './warnIfNoAccessibleLabelFound.js';
6
- import 'styled-components';
7
- import './SideNavigationMenuItem.js';
8
- import './context.js';
9
- import './Badge2.js';
10
- import './types.js';
11
- import './Icon2.js';
12
- import './SideNavigationMenu.js';
13
- import '@redsift/icons';
14
- //# sourceMappingURL=side-navigation-menu-bar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"side-navigation-menu-bar.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -1,11 +0,0 @@
1
- export { S as SideNavigationMenuItem } from './SideNavigationMenuItem.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import './warnIfNoAccessibleLabelFound.js';
6
- import './context.js';
7
- import 'styled-components';
8
- import './Badge2.js';
9
- import './types.js';
10
- import './Icon2.js';
11
- //# sourceMappingURL=side-navigation-menu-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"side-navigation-menu-item.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1,13 +0,0 @@
1
- export { a as SideNavigationMenu, S as SideNavigationMenuReducerActionType } from './SideNavigationMenu.js';
2
- import './_rollupPluginBabelHelpers.js';
3
- import 'react';
4
- import 'classnames';
5
- import '@redsift/icons';
6
- import 'styled-components';
7
- import './SideNavigationMenuItem.js';
8
- import './warnIfNoAccessibleLabelFound.js';
9
- import './context.js';
10
- import './Badge2.js';
11
- import './types.js';
12
- import './Icon2.js';
13
- //# sourceMappingURL=side-navigation-menu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"side-navigation-menu.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,101 +0,0 @@
1
- import { _ as _taggedTemplateLiteral } from './_rollupPluginBabelHelpers.js';
2
- import styled, { css } from 'styled-components';
3
-
4
- /**
5
- * Component variant.
6
- */
7
- const ButtonVariant = {
8
- contained: 'contained',
9
- outlined: 'outlined',
10
- text: 'text'
11
- };
12
-
13
- /**
14
- * Component size.
15
- */
16
- const ButtonSize = {
17
- large: 'large',
18
- medium: 'medium',
19
- small: 'small'
20
- };
21
-
22
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
23
- /**
24
- * Component style.
25
- */
26
-
27
- const StyledButton = styled.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n\n ", "\n\n font-family: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n text-transform: ", ";\n\n .redsift-icon {\n ", "\n\n ", "\n\n ", "\n }\n\n .redsift-icon.left {\n margin-right: 8px;\n }\n\n .redsift-icon.right {\n margin-left: 8px;\n }\n\n &:hover,\n &:focus-visible {\n outline: none;\n\n ", "\n }\n\n ", "\n"])), _ref => {
28
- let {
29
- $variant,
30
- $color,
31
- $size,
32
- $isDisabled
33
- } = _ref;
34
-
35
- switch ($variant) {
36
- case ButtonVariant.outlined:
37
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background-color: transparent;\n &, .redsift-icon {\n color: ", ";\n }\n\n padding: ", ";\n "])), $isDisabled ? 'var(--redsift-color-action-disabled-background)' : "var(--redsift-color-".concat($color, "-outlined-resting)"), $isDisabled ? 'var(--redsift-color-action-disabled)' : "var(--redsift-color-".concat($color, "-main)"), $size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px');
38
-
39
- case ButtonVariant.text:
40
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: none;\n background-color: transparent;\n &, .redsift-icon {\n color: ", ";\n }\n\n padding: ", ";\n "])), $isDisabled ? 'var(--redsift-color-action-disabled)' : "var(--redsift-color-".concat($color, "-main)"), $size === ButtonSize.small ? '4px 4px' : $size === ButtonSize.medium ? '6px 8px' : '8px 8px');
41
-
42
- case ButtonVariant.contained:
43
- default:
44
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: none;\n background-color: ", ";\n &, .redsift-icon {\n color: ", ";\n }\n\n padding: ", ";\n "])), $isDisabled ? 'var(--redsift-color-action-disabled-background)' : "var(--redsift-color-".concat($color, "-main)"), $isDisabled ? 'var(--redsift-color-action-disabled)' : "var(--redsift-color-".concat($color, "-contrast)"), $size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px');
45
- }
46
- }, _ref2 => {
47
- let {
48
- $size
49
- } = _ref2;
50
- return "var(--redsift-typography-button-".concat($size, "-font-family)");
51
- }, _ref3 => {
52
- let {
53
- $size
54
- } = _ref3;
55
- return "var(--redsift-typography-button-".concat($size, "-font-weight)");
56
- }, _ref4 => {
57
- let {
58
- $size
59
- } = _ref4;
60
- return "var(--redsift-typography-button-".concat($size, "-font-size)");
61
- }, _ref5 => {
62
- let {
63
- $size
64
- } = _ref5;
65
- return "var(--redsift-typography-button-".concat($size, "-line-height)");
66
- }, _ref6 => {
67
- let {
68
- $size
69
- } = _ref6;
70
- return "var(--redsift-typography-button-".concat($size, "-text-transform)");
71
- }, _ref7 => {
72
- let {
73
- $size
74
- } = _ref7;
75
- return $size === ButtonSize.large ? "\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px;\n " : '';
76
- }, _ref8 => {
77
- let {
78
- $size
79
- } = _ref8;
80
- return $size === ButtonSize.medium ? "\n height: 20px;\n width: 20px;\n font-size: 20px;\n line-height: 20px;\n " : '';
81
- }, _ref9 => {
82
- let {
83
- $size
84
- } = _ref9;
85
- return $size === ButtonSize.small ? "\n height: 18px;\n width: 18px;\n font-size: 18px;\n line-height: 18px;\n " : '';
86
- }, _ref10 => {
87
- let {
88
- $isDisabled,
89
- $variant,
90
- $color
91
- } = _ref10;
92
- return !$isDisabled ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: pointer;\n\n ", "\n\n ", "\n\n ", "\n "])), $variant === ButtonVariant.contained ? css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n background-color: var(--redsift-color-", "-contained-hover);\n "])), $color) : '', $variant === ButtonVariant.outlined ? css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-color: var(--redsift-color-", "-outlined-hover);\n "])), $color) : '', $variant === ButtonVariant.text ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: var(--redsift-color-", "-outlined-hover);\n "])), $color) : '') : '';
93
- }, _ref11 => {
94
- let {
95
- $fullWidth
96
- } = _ref11;
97
- return $fullWidth ? "\n width: 100%;\n flex-grow: 1;\n\n .redsift-icon.left {\n margin-right: unset;\n }\n\n .redsift-icon.right {\n margin-left: unset;\n }\n\n span {\n margin-right: 8px;\n margin-left: 8px;\n }\n " : '';
98
- });
99
-
100
- export { ButtonVariant as B, StyledButton as S, ButtonSize as a };
101
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","sources":["../../../src/components/button/types.ts","../../../src/components/button/styles.ts"],"sourcesContent":["import { ComponentProps } from 'react';\nimport { PressEvent } from '@react-types/shared';\nimport { ColorPalette, ValueOf } from '~/types';\n\n/**\n * Component variant.\n */\nexport const ButtonVariant = {\n contained: 'contained',\n outlined: 'outlined',\n text: 'text',\n} as const;\nexport type ButtonVariant = ValueOf<typeof ButtonVariant>;\n\n/**\n * Component size.\n */\nexport const ButtonSize = {\n large: 'large',\n medium: 'medium',\n small: 'small',\n} as const;\nexport type ButtonSize = ValueOf<typeof ButtonSize>;\n\n/**\n * Component props.\n */\nexport interface ButtonProps extends ComponentProps<'button'> {\n /** Color variant. */\n color?: ColorPalette;\n /** Whether the component take the full width or not. */\n fullWidth?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /**\n * Icon path data (`d` property of the `path` SVG element).<br />\n * See <a href=\"https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />\n * Recommended path data come from mdi/js.<br />\n * See <a href=\"https://www.npmjs.com/package/@mdi/js\">https://www.npmjs.com/package/@mdi/js</a>.\n */\n leftIcon?: string;\n /** Preferred method to handle click, press and touch. */\n onPress?: (e: PressEvent) => void;\n /**\n * Icon path data (`d` property of the `path` SVG element).<br />\n * See <a href=\"https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />\n * Recommended path data come from mdi/js.<br />\n * See <a href=\"https://www.npmjs.com/package/@mdi/js\">https://www.npmjs.com/package/@mdi/js</a>.\n */\n rightIcon?: string;\n /** Button size. */\n size?: ButtonSize;\n /** Button variant. */\n variant?: ButtonVariant;\n}\n\nexport type StyledButtonProps = Omit<ButtonProps, 'isDisabled' | 'variant' | 'color' | 'size' | 'fullWidth'> & {\n $isDisabled: ButtonProps['isDisabled'];\n $variant: ButtonProps['variant'];\n $color: ButtonProps['color'];\n $size: ButtonProps['size'];\n $fullWidth: ButtonProps['fullWidth'];\n};\n","import styled, { css } from 'styled-components';\nimport { StyledButtonProps, ButtonSize, ButtonVariant } from './types';\n\n/**\n * Component style.\n */\nexport const StyledButton = styled.button<StyledButtonProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n text-decoration: none;\n\n ${({ $variant, $color, $size, $isDisabled }) => {\n switch ($variant) {\n case ButtonVariant.outlined:\n return css`\n border: 1px solid ${$isDisabled ? 'var(--redsift-color-action-disabled-background)' : `var(--redsift-color-${$color}-outlined-resting)`};\n background-color: transparent;\n &, .redsift-icon {\n color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-main)`};\n }\n\n padding: ${$size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px'};\n `;\n case ButtonVariant.text:\n return css`\n border: none;\n background-color: transparent;\n &, .redsift-icon {\n color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-main)`};\n }\n\n padding: ${$size === ButtonSize.small ? '4px 4px' : $size === ButtonSize.medium ? '6px 8px' : '8px 8px'};\n `;\n case ButtonVariant.contained:\n default:\n return css`\n border: none;\n background-color: ${$isDisabled ? 'var(--redsift-color-action-disabled-background)' : `var(--redsift-color-${$color}-main)`};\n &, .redsift-icon {\n color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-contrast)`};\n }\n\n padding: ${$size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px'};\n `;\n }\n }}\n\n font-family: ${({ $size }) => `var(--redsift-typography-button-${$size}-font-family)`};\n font-weight: ${({ $size }) => `var(--redsift-typography-button-${$size}-font-weight)`};\n font-size: ${({ $size }) => `var(--redsift-typography-button-${$size}-font-size)`};\n line-height: ${({ $size }) => `var(--redsift-typography-button-${$size}-line-height)`};\n text-transform: ${({ $size }) => `var(--redsift-typography-button-${$size}-text-transform)`};\n\n .redsift-icon {\n ${({ $size }) => $size === ButtonSize.large ? `\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px;\n ` : ''}\n\n ${({ $size }) => $size === ButtonSize.medium ? `\n height: 20px;\n width: 20px;\n font-size: 20px;\n line-height: 20px;\n ` : ''}\n\n ${({ $size }) => $size === ButtonSize.small ? `\n height: 18px;\n width: 18px;\n font-size: 18px;\n line-height: 18px;\n ` : ''}\n }\n\n .redsift-icon.left {\n margin-right: 8px;\n }\n\n .redsift-icon.right {\n margin-left: 8px;\n }\n\n &:hover,\n &:focus-visible {\n outline: none;\n\n ${({ $isDisabled, $variant, $color }) => !$isDisabled ? css`\n cursor: pointer;\n\n ${$variant === ButtonVariant.contained ? css`\n background-color: var(--redsift-color-${$color}-contained-hover);\n ` : ''}\n\n ${$variant === ButtonVariant.outlined ? css`\n background-color: var(--redsift-color-${$color}-outlined-hover);\n ` : ''}\n\n ${$variant === ButtonVariant.text ? css`\n background-color: var(--redsift-color-${$color}-outlined-hover);\n ` : ''}\n ` : ''}\n }\n\n ${({ $fullWidth }) => $fullWidth ? `\n width: 100%;\n flex-grow: 1;\n\n .redsift-icon.left {\n margin-right: unset;\n }\n\n .redsift-icon.right {\n margin-left: unset;\n }\n\n span {\n margin-right: 8px;\n margin-left: 8px;\n }\n ` : ''}\n`\n"],"names":["ButtonVariant","contained","outlined","text","ButtonSize","large","medium","small","StyledButton","styled","button","$variant","$color","$size","$isDisabled","css","$fullWidth"],"mappings":"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"}
@@ -1,17 +0,0 @@
1
- import { _ as _taggedTemplateLiteral } from './_rollupPluginBabelHelpers.js';
2
- import styled, { css } from 'styled-components';
3
-
4
- var _templateObject, _templateObject2;
5
-
6
- /**
7
- * Component style.
8
- */
9
- const StyledLink = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: none;\n border: none;\n color: inherit;\n cursor: text !important;\n font-family: var(--redsift-typography-link-font-family);\n font-size: var(--redsift-typography-link-font-size);\n font-weight: var(--redsift-typography-link-font-weight);\n line-height: var(--redsift-typography-link-line-height);\n padding: unset;\n text-decoration: none;\n\n ", "\n\n &:focus-visible {\n outline: 2px solid var(--redsift-color-link-primary);\n }\n"])), _ref => {
10
- let {
11
- $isDisabled
12
- } = _ref;
13
- return !$isDisabled ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: var(--redsift-color-link-primary);\n text-decoration: underline;\n text-decoration-color: var(--redsift-color-link-underline);\n text-underline-offset: 2px;\n\n &:hover,\n &:focus-visible {\n cursor: pointer !important;\n text-decoration-color: var(--redsift-color-link-primary);\n }\n "]))) : '';
14
- });
15
-
16
- export { StyledLink as S };
17
- //# sourceMappingURL=styles2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles2.js","sources":["../../../src/components/link/styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { StyledLinkProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledLink = styled.a<StyledLinkProps>`\n background: none;\n border: none;\n color: inherit;\n cursor: text !important;\n font-family: var(--redsift-typography-link-font-family);\n font-size: var(--redsift-typography-link-font-size);\n font-weight: var(--redsift-typography-link-font-weight);\n line-height: var(--redsift-typography-link-line-height);\n padding: unset;\n text-decoration: none;\n\n ${({ $isDisabled }) => !$isDisabled ? css`\n color: var(--redsift-color-link-primary);\n text-decoration: underline;\n text-decoration-color: var(--redsift-color-link-underline);\n text-underline-offset: 2px;\n\n &:hover,\n &:focus-visible {\n cursor: pointer !important;\n text-decoration-color: var(--redsift-color-link-primary);\n }\n ` : ''}\n\n &:focus-visible {\n outline: 2px solid var(--redsift-color-link-primary);\n }\n`\n"],"names":["StyledLink","styled","a","$isDisabled","css"],"mappings":";;;;;AAGA;AACA;AACA;MACaA,UAAU,GAAGC,MAAM,CAACC,CAAV,CAYnB,eAAA,KAAA,eAAA,GAAA,sBAAA,CAAA,CAAA,sXAAA,EAAA,2FAAA,CAAA,CAAA,CAAA,EAAA,IAAA,IAAA;EAAA,IAAC;AAAEC,IAAAA,WAAAA;GAAH,GAAA,IAAA,CAAA;AAAA,EAAA,OAAqB,CAACA,WAAD,GAAeC,GAAf,kZAWnB,EAXF,CAAA;AAAA,CAZmB;;;;"}
@@ -1,31 +0,0 @@
1
- /** Component Type. */
2
-
3
- /**
4
- * JS falsy values.
5
- * (excluding `NaN` as it can't be distinguished from `number`)
6
- */
7
-
8
- /** Get types of the values of a record. */
9
-
10
- /**
11
- * Color palette.
12
- */
13
- const ColorPalette = {
14
- primary: 'primary',
15
- secondary: 'secondary',
16
- error: 'error',
17
- warning: 'warning',
18
- info: 'info',
19
- success: 'success'
20
- };
21
-
22
- /**
23
- * Theme
24
- */
25
- const Theme = {
26
- dark: 'dark',
27
- light: 'light'
28
- };
29
-
30
- export { ColorPalette as C, Theme as T };
31
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sources":["../../../src/types.ts"],"sourcesContent":["import { ReactElement, Ref } from 'react';\n\n/** Component Type. */\nexport type Comp<P, T = HTMLElement> = {\n (props: P & { ref?: Ref<T> }): ReactElement | null;\n /** React component type. */\n readonly $$typeof: symbol;\n /** Component default props. */\n defaultProps?: Partial<P>;\n /** Component name. */\n displayName?: string;\n /** Component base class name. */\n className?: string;\n};\n\n/**\n * JS falsy values.\n * (excluding `NaN` as it can't be distinguished from `number`)\n */\nexport type Falsy = false | undefined | null | 0 | '';\n\n/** Get types of the values of a record. */\nexport type ValueOf<T extends Record<any, any>> = T[keyof T];\n\n/**\n * Color palette.\n */\nexport const ColorPalette = {\n primary: 'primary',\n secondary: 'secondary',\n error: 'error',\n warning: 'warning',\n info: 'info',\n success: 'success',\n} as const;\nexport type ColorPalette = ValueOf<typeof ColorPalette>;\nexport type Color = ColorPalette | string;\n\n/**\n * Theme\n */\nexport const Theme = {\n dark: 'dark',\n light: 'light',\n} as const;\nexport type Theme = ValueOf<typeof Theme>;"],"names":["ColorPalette","primary","secondary","error","warning","info","success","Theme","dark","light"],"mappings":"AAEA;;AAaA;AACA;AACA;AACA;;AAGA;;AAGA;AACA;AACA;AACO,MAAMA,YAAY,GAAG;AACxBC,EAAAA,OAAO,EAAE,SADe;AAExBC,EAAAA,SAAS,EAAE,WAFa;AAGxBC,EAAAA,KAAK,EAAE,OAHiB;AAIxBC,EAAAA,OAAO,EAAE,SAJe;AAKxBC,EAAAA,IAAI,EAAE,MALkB;AAMxBC,EAAAA,OAAO,EAAE,SAAA;AANe,EAArB;;AAWP;AACA;AACA;AACO,MAAMC,KAAK,GAAG;AACjBC,EAAAA,IAAI,EAAE,MADW;AAEjBC,EAAAA,KAAK,EAAE,OAAA;AAFU;;;;"}