lecom-ui 4.1.9 → 4.2.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 (152) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +5 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/components/Accordion/Accordion.js +40 -37
  4. package/dist/components/Button/Button.js +10 -9
  5. package/dist/components/Button/CustomButton.js +6 -5
  6. package/dist/components/Card/Card.js +7 -6
  7. package/dist/components/Checkbox/Checkbox.js +35 -30
  8. package/dist/components/CustomIcon/Icons/CadastroFacil.js +15 -5
  9. package/dist/components/CustomIcon/Icons/LogoLecom.js +15 -12
  10. package/dist/components/CustomIcon/Icons/LogoLecomBrand.js +8 -5
  11. package/dist/components/CustomIcon/Icons/ModoTeste.js +13 -5
  12. package/dist/components/CustomIcon/Icons/Rpa.js +17 -5
  13. package/dist/components/DataTable/DataTable.js +33 -158
  14. package/dist/components/Dialog/Dialog.js +40 -31
  15. package/dist/components/DropdownMenu/DropdownMenu.js +55 -46
  16. package/dist/components/Header/Header.js +51 -35
  17. package/dist/components/Header/HelpMenu.js +52 -41
  18. package/dist/components/Header/ImgBrand.js +5 -8
  19. package/dist/components/Header/ModulesMenu.js +63 -50
  20. package/dist/components/Header/SocialMenu.js +5 -6
  21. package/dist/components/Header/UserMenu.js +81 -51
  22. package/dist/components/Input/Input.js +11 -2
  23. package/dist/components/Layout/Layout.js +62 -45
  24. package/dist/components/Notification/Notification.js +9 -8
  25. package/dist/components/Notification/NotificationBase.js +5 -5
  26. package/dist/components/Notification/NotificationCallout.js +33 -27
  27. package/dist/components/Notification/NotificationCloseButton.js +4 -3
  28. package/dist/components/Notification/NotificationContent.js +24 -18
  29. package/dist/components/Notification/NotificationIcon.js +9 -6
  30. package/dist/components/Notification/NotificationInline.js +23 -20
  31. package/dist/components/Notification/NotificationToast.js +28 -25
  32. package/dist/components/Notification/useNotificationToast.js +0 -1
  33. package/dist/components/Popover/Popover.js +8 -7
  34. package/dist/components/ScrollArea/ScrollArea.js +18 -15
  35. package/dist/components/Select/Select.js +63 -54
  36. package/dist/components/Separator/Separator.js +5 -4
  37. package/dist/components/Sheet/Sheet.js +35 -26
  38. package/dist/components/Sidebar/Sidebar.js +112 -95
  39. package/dist/components/Skeleton/Skeleton.js +2 -2
  40. package/dist/components/Table/Table.js +15 -26
  41. package/dist/components/Tag/Tag.js +6 -5
  42. package/dist/components/Tooltip/Tooltip.js +17 -15
  43. package/dist/components/Typography/Typography.js +6 -7
  44. package/dist/hooks/use-mobile.js +1 -1
  45. package/dist/i18n/index.js +4 -53
  46. package/dist/i18n/locales/en_us.js +4 -3
  47. package/dist/i18n/locales/es_es.js +4 -3
  48. package/dist/i18n/locales/index.js +4 -4
  49. package/dist/i18n/locales/pt_br.js +4 -3
  50. package/dist/index.d.ts +108 -304
  51. package/dist/index.js +1 -12
  52. package/dist/lib/utils.js +2 -2
  53. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +806 -0
  54. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +726 -0
  55. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +347 -0
  56. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +154 -0
  57. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +136 -0
  58. package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
  59. package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  60. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +303 -0
  61. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
  62. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +157 -0
  63. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +144 -0
  64. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +68 -0
  65. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
  66. package/dist/node_modules/@radix-ui/react-context/dist/index.js +79 -0
  67. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +319 -0
  68. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
  69. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
  70. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +265 -0
  71. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -0
  72. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
  73. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  74. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +831 -0
  75. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +296 -0
  76. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +278 -0
  77. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
  78. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
  79. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
  80. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +220 -0
  81. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +718 -0
  82. package/dist/node_modules/@radix-ui/react-select/dist/index.js +1143 -0
  83. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +30 -0
  84. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +81 -0
  85. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +476 -0
  86. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
  87. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +46 -0
  88. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  89. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  90. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
  91. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
  92. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -0
  93. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +74 -0
  94. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +3023 -0
  95. package/dist/node_modules/aria-hidden/dist/es2015/index.js +136 -0
  96. package/dist/node_modules/class-variance-authority/dist/index.js +44 -0
  97. package/dist/node_modules/clsx/dist/clsx.js +3 -0
  98. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  99. package/dist/node_modules/hex-color-opacity/lib/index.js +22 -0
  100. package/dist/node_modules/i18next/dist/esm/i18next.js +2228 -0
  101. package/dist/node_modules/lucide-react/dist/esm/Icon.js +44 -0
  102. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +26 -0
  103. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
  104. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +13 -0
  105. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +15 -0
  106. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +15 -0
  107. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +13 -0
  108. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +17 -0
  109. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +16 -0
  110. package/dist/node_modules/lucide-react/dist/esm/icons/circle-help.js +17 -0
  111. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +15 -0
  112. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +17 -0
  113. package/dist/node_modules/lucide-react/dist/esm/icons/menu.js +17 -0
  114. package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +15 -0
  115. package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +13 -0
  116. package/dist/node_modules/lucide-react/dist/esm/icons/panel-left.js +16 -0
  117. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +23 -0
  118. package/dist/node_modules/lucide-react/dist/esm/icons/user.js +16 -0
  119. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +16 -0
  120. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +13 -0
  121. package/dist/node_modules/react-i18next/dist/es/context.js +18 -0
  122. package/dist/node_modules/react-i18next/dist/es/defaults.js +21 -0
  123. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +7 -0
  124. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +12 -0
  125. package/dist/node_modules/react-i18next/dist/es/unescape.js +27 -0
  126. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +112 -0
  127. package/dist/node_modules/react-i18next/dist/es/utils.js +63 -0
  128. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  129. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +160 -0
  130. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
  131. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  132. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +109 -0
  133. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  134. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  135. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
  136. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  137. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  138. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  139. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  140. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  141. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2493 -0
  142. package/dist/node_modules/tslib/tslib.es6.js +56 -0
  143. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  144. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  145. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  146. package/dist/node_modules/use-color-luminance/index.es.js +105 -0
  147. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  148. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
  149. package/dist/plugin/typographies.ts +146 -152
  150. package/dist/style.min.css +1 -1
  151. package/dist/utils/cookie.js +9 -6
  152. package/package.json +11 -3
@@ -0,0 +1,136 @@
1
+ var getDefaultParent = function (originalTarget) {
2
+ if (typeof document === 'undefined') {
3
+ return null;
4
+ }
5
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
6
+ return sampleTarget.ownerDocument.body;
7
+ };
8
+ var counterMap = new WeakMap();
9
+ var uncontrolledNodes = new WeakMap();
10
+ var markerMap = {};
11
+ var lockCount = 0;
12
+ var unwrapHost = function (node) {
13
+ return node && (node.host || unwrapHost(node.parentNode));
14
+ };
15
+ var correctTargets = function (parent, targets) {
16
+ return targets
17
+ .map(function (target) {
18
+ if (parent.contains(target)) {
19
+ return target;
20
+ }
21
+ var correctedTarget = unwrapHost(target);
22
+ if (correctedTarget && parent.contains(correctedTarget)) {
23
+ return correctedTarget;
24
+ }
25
+ console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
26
+ return null;
27
+ })
28
+ .filter(function (x) { return Boolean(x); });
29
+ };
30
+ /**
31
+ * Marks everything except given node(or nodes) as aria-hidden
32
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
33
+ * @param [parentNode] - top element, defaults to document.body
34
+ * @param {String} [markerName] - a special attribute to mark every node
35
+ * @param {String} [controlAttribute] - html Attribute to control
36
+ * @return {Undo} undo command
37
+ */
38
+ var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
39
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
40
+ if (!markerMap[markerName]) {
41
+ markerMap[markerName] = new WeakMap();
42
+ }
43
+ var markerCounter = markerMap[markerName];
44
+ var hiddenNodes = [];
45
+ var elementsToKeep = new Set();
46
+ var elementsToStop = new Set(targets);
47
+ var keep = function (el) {
48
+ if (!el || elementsToKeep.has(el)) {
49
+ return;
50
+ }
51
+ elementsToKeep.add(el);
52
+ keep(el.parentNode);
53
+ };
54
+ targets.forEach(keep);
55
+ var deep = function (parent) {
56
+ if (!parent || elementsToStop.has(parent)) {
57
+ return;
58
+ }
59
+ Array.prototype.forEach.call(parent.children, function (node) {
60
+ if (elementsToKeep.has(node)) {
61
+ deep(node);
62
+ }
63
+ else {
64
+ try {
65
+ var attr = node.getAttribute(controlAttribute);
66
+ var alreadyHidden = attr !== null && attr !== 'false';
67
+ var counterValue = (counterMap.get(node) || 0) + 1;
68
+ var markerValue = (markerCounter.get(node) || 0) + 1;
69
+ counterMap.set(node, counterValue);
70
+ markerCounter.set(node, markerValue);
71
+ hiddenNodes.push(node);
72
+ if (counterValue === 1 && alreadyHidden) {
73
+ uncontrolledNodes.set(node, true);
74
+ }
75
+ if (markerValue === 1) {
76
+ node.setAttribute(markerName, 'true');
77
+ }
78
+ if (!alreadyHidden) {
79
+ node.setAttribute(controlAttribute, 'true');
80
+ }
81
+ }
82
+ catch (e) {
83
+ console.error('aria-hidden: cannot operate on ', node, e);
84
+ }
85
+ }
86
+ });
87
+ };
88
+ deep(parentNode);
89
+ elementsToKeep.clear();
90
+ lockCount++;
91
+ return function () {
92
+ hiddenNodes.forEach(function (node) {
93
+ var counterValue = counterMap.get(node) - 1;
94
+ var markerValue = markerCounter.get(node) - 1;
95
+ counterMap.set(node, counterValue);
96
+ markerCounter.set(node, markerValue);
97
+ if (!counterValue) {
98
+ if (!uncontrolledNodes.has(node)) {
99
+ node.removeAttribute(controlAttribute);
100
+ }
101
+ uncontrolledNodes.delete(node);
102
+ }
103
+ if (!markerValue) {
104
+ node.removeAttribute(markerName);
105
+ }
106
+ });
107
+ lockCount--;
108
+ if (!lockCount) {
109
+ // clear
110
+ counterMap = new WeakMap();
111
+ counterMap = new WeakMap();
112
+ uncontrolledNodes = new WeakMap();
113
+ markerMap = {};
114
+ }
115
+ };
116
+ };
117
+ /**
118
+ * Marks everything except given node(or nodes) as aria-hidden
119
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
120
+ * @param [parentNode] - top element, defaults to document.body
121
+ * @param {String} [markerName] - a special attribute to mark every node
122
+ * @return {Undo} undo command
123
+ */
124
+ var hideOthers = function (originalTarget, parentNode, markerName) {
125
+ if (markerName === void 0) { markerName = 'data-aria-hidden'; }
126
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
127
+ var activeParentNode = getDefaultParent(originalTarget);
128
+ if (!activeParentNode) {
129
+ return function () { return null; };
130
+ }
131
+ // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
132
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
133
+ return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
134
+ };
135
+
136
+ export { hideOthers };
@@ -0,0 +1,44 @@
1
+ import { clsx } from '../../clsx/dist/clsx.js';
2
+
3
+ const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
4
+ const cx = clsx;
5
+ const cva = (base, config)=>(props)=>{
6
+ var _config_compoundVariants;
7
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
8
+ const { variants, defaultVariants } = config;
9
+ const getVariantClassNames = Object.keys(variants).map((variant)=>{
10
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
11
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
12
+ if (variantProp === null) return null;
13
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
14
+ return variants[variant][variantKey];
15
+ });
16
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
17
+ let [key, value] = param;
18
+ if (value === undefined) {
19
+ return acc;
20
+ }
21
+ acc[key] = value;
22
+ return acc;
23
+ }, {});
24
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
25
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
26
+ return Object.entries(compoundVariantOptions).every((param)=>{
27
+ let [key, value] = param;
28
+ return Array.isArray(value) ? value.includes({
29
+ ...defaultVariants,
30
+ ...propsWithoutUndefined
31
+ }[key]) : ({
32
+ ...defaultVariants,
33
+ ...propsWithoutUndefined
34
+ })[key] === value;
35
+ }) ? [
36
+ ...acc,
37
+ cvClass,
38
+ cvClassName
39
+ ] : acc;
40
+ }, []);
41
+ return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
42
+ };
43
+
44
+ export { cva, cx };
@@ -0,0 +1,3 @@
1
+ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
2
+
3
+ export { clsx, clsx as default };
@@ -0,0 +1,8 @@
1
+ var getNonce = function () {
2
+ if (typeof __webpack_nonce__ !== 'undefined') {
3
+ return __webpack_nonce__;
4
+ }
5
+ return undefined;
6
+ };
7
+
8
+ export { getNonce };
@@ -0,0 +1,22 @@
1
+ var lib;
2
+ var hasRequiredLib;
3
+
4
+ function requireLib () {
5
+ if (hasRequiredLib) return lib;
6
+ hasRequiredLib = 1;
7
+
8
+ const opacity = (hex, opacity) => {
9
+ if (typeof hex !== 'string' || !/^#([A-Fa-f0-9]{3}$|[A-Fa-f0-9]{6}$|[A-Fa-f0-9]{8}$)/.test(hex)) throw new Error('Invalid hexadecimal color value')
10
+ if (typeof opacity !== 'number' || opacity > 1 || opacity < 0) throw new Error('Opacity should be float between 0 - 1')
11
+ let color = hex.substring(1);
12
+ if (color.length === 8) color = color.substring(0, color.length - 2);
13
+ if (color.length === 3) color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2];
14
+ color += Math.round(opacity * 255).toString(16).padStart(2, '0');
15
+ return `#${color}`.toUpperCase()
16
+ };
17
+
18
+ lib = opacity;
19
+ return lib;
20
+ }
21
+
22
+ export { requireLib as __require };