prometeo-design-system 3.1.2 → 3.1.4

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 (147) hide show
  1. package/dist/Avatar.es.js +44 -38
  2. package/dist/Button.es.js +27 -27
  3. package/dist/{CardProfile-Ct5Fs60N.js → CardProfile-y9Knsg26.js} +41 -40
  4. package/dist/CardProfile.es.js +1 -1
  5. package/dist/CheckBox.es.js +1 -1
  6. package/dist/DatePicker-CehTiXGa.js +3631 -0
  7. package/dist/DatePicker.es.js +1 -1
  8. package/dist/DialogModal.es.js +1 -1
  9. package/dist/DrawerDesktop.es.js +78 -72
  10. package/dist/DrawerMobile.es.js +1 -1
  11. package/dist/DropZone.es.js +1 -1
  12. package/dist/FAButton.es.js +1 -1
  13. package/dist/Header.es.js +4 -4
  14. package/dist/{HelperComponent-DhGU_ug-.js → HelperComponent-ljsn0xD6.js} +1 -1
  15. package/dist/Icons/AccountCircle.es.js +1 -1
  16. package/dist/Icons/Add.es.js +1 -1
  17. package/dist/Icons/ArrowLeft.es.js +1 -1
  18. package/dist/Icons/ArrowUpDown.es.js +1 -1
  19. package/dist/Icons/AttachFile.es.js +1 -1
  20. package/dist/Icons/Boards.es.js +1 -1
  21. package/dist/Icons/Calendar.es.js +1 -1
  22. package/dist/Icons/Cancel.es.js +1 -1
  23. package/dist/Icons/Check.es.js +1 -1
  24. package/dist/Icons/CheckCircle.es.js +1 -1
  25. package/dist/Icons/CheckList.es.js +1 -1
  26. package/dist/Icons/ChevronDown.es.js +1 -1
  27. package/dist/Icons/Clock.es.js +1 -1
  28. package/dist/Icons/Close.es.js +1 -1
  29. package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
  30. package/dist/Icons/Collapse.es.js +1 -1
  31. package/dist/Icons/Company.es.js +1 -1
  32. package/dist/Icons/Copy.es.js +1 -1
  33. package/dist/Icons/CrevronLeft.es.js +1 -1
  34. package/dist/Icons/CrevronRight.es.js +1 -1
  35. package/dist/Icons/DocumentFill.es.js +1 -1
  36. package/dist/Icons/Download.es.js +1 -1
  37. package/dist/Icons/Edit.es.js +1 -1
  38. package/dist/Icons/EditFill.es.js +1 -1
  39. package/dist/Icons/Email.es.js +1 -1
  40. package/dist/Icons/Error.es.js +1 -1
  41. package/dist/Icons/EyeVisibility.es.js +1 -1
  42. package/dist/Icons/EyeVisibilityOff.es.js +1 -1
  43. package/dist/Icons/FaLock.es.js +1 -1
  44. package/dist/Icons/FastForward.es.js +1 -1
  45. package/dist/Icons/File.es.js +1 -1
  46. package/dist/Icons/Filter.es.js +1 -1
  47. package/dist/Icons/FormatColorText.es.js +1 -1
  48. package/dist/Icons/Help.es.js +1 -1
  49. package/dist/Icons/HistoryActivity.es.js +1 -1
  50. package/dist/Icons/Home.es.js +1 -1
  51. package/dist/Icons/Image.es.js +1 -1
  52. package/dist/Icons/Info.es.js +1 -1
  53. package/dist/Icons/Logout.es.js +1 -1
  54. package/dist/Icons/MessageSquare.es.js +1 -1
  55. package/dist/Icons/MessageSquareFill.es.js +1 -1
  56. package/dist/Icons/MoreVert.es.js +1 -1
  57. package/dist/Icons/Notifications.es.js +1 -1
  58. package/dist/Icons/Pause.es.js +1 -1
  59. package/dist/Icons/Reload.es.js +1 -1
  60. package/dist/Icons/Search.es.js +1 -1
  61. package/dist/Icons/Settings.es.js +1 -1
  62. package/dist/Icons/Shared.es.js +1 -1
  63. package/dist/Icons/Sort.es.js +1 -1
  64. package/dist/Icons/Stars.es.js +1 -1
  65. package/dist/Icons/Ticket.es.js +1 -1
  66. package/dist/Icons/TicketFilled.es.js +1 -1
  67. package/dist/Icons/Trash.es.js +1 -1
  68. package/dist/Icons/TrashFill.es.js +1 -1
  69. package/dist/Icons/Upload.es.js +1 -1
  70. package/dist/Icons/UploadCloud.es.js +1 -1
  71. package/dist/Icons/UserAdd.es.js +1 -1
  72. package/dist/Icons/UserAddFill.es.js +1 -1
  73. package/dist/Icons/UserPerson.es.js +1 -1
  74. package/dist/Icons/WhatsApp.es.js +1 -1
  75. package/dist/Image.es.js +1 -1
  76. package/dist/{ImageGallery-4DdXqwRy.js → ImageGallery-DG9ovlQ-.js} +1 -1
  77. package/dist/ImageGallery.es.js +1 -1
  78. package/dist/Input.es.js +218 -2
  79. package/dist/InputMultiple.es.js +1 -1
  80. package/dist/{LayoutGeneric-CbaoatQB.js → LayoutGeneric-CfWhV1ov.js} +6 -6
  81. package/dist/LayoutGeneric.es.js +1 -1
  82. package/dist/Logo.es.js +1 -1
  83. package/dist/Menu.es.js +1 -1
  84. package/dist/OtpInput.es.js +1 -1
  85. package/dist/Pagination.es.js +1 -1
  86. package/dist/ProfilePictureUpload.es.js +1 -1
  87. package/dist/ProgressBar.es.js +1 -1
  88. package/dist/RadioButton.es.js +2 -2
  89. package/dist/RecurrentDatePicker.es.js +7 -7
  90. package/dist/RecurrentDatePickerRRule.es.js +2 -4
  91. package/dist/Scrollable.d.ts +2 -0
  92. package/dist/Scrollable.es.js +260 -0
  93. package/dist/SegmentedButton.es.js +1 -1
  94. package/dist/{Select-DW30oGym.js → Select-BdxmkrjB.js} +14 -13
  95. package/dist/Select.es.js +1 -1
  96. package/dist/SelectSearch.d.ts +2 -0
  97. package/dist/SelectSearch.es.js +147 -131
  98. package/dist/Skeleton.es.js +1 -1
  99. package/dist/Spinner.es.js +1 -1
  100. package/dist/Steps.es.js +1 -1
  101. package/dist/SwipeContainer.es.js +1 -1
  102. package/dist/Switch.es.js +7 -7
  103. package/dist/TabLinks.es.js +9 -9
  104. package/dist/Table.es.js +1 -1
  105. package/dist/TextArea.es.js +1 -1
  106. package/dist/Toast.es.js +1 -1
  107. package/dist/ToastProvider.es.js +1 -1
  108. package/dist/Tooltip.es.js +1 -1
  109. package/dist/components/Avatar/Avatar.d.ts +1 -1
  110. package/dist/components/Drawer/DrawerDesktop.d.ts +1 -0
  111. package/dist/components/NavigationDrawer/NavItemSecondary.d.ts +1 -0
  112. package/dist/components/NavigationDrawer/NavigationDrawer.d.ts +41 -21
  113. package/dist/components/NavigationDrawer/NavigationDrawerActionItem.d.ts +16 -0
  114. package/dist/components/NavigationDrawer/NavigationDrawerActions.d.ts +9 -0
  115. package/dist/components/NavigationDrawer/NavigationDrawerItemBase.d.ts +18 -0
  116. package/dist/components/NavigationDrawer/{NavItem.d.ts → NavigationDrawerLinkItem.d.ts} +10 -4
  117. package/dist/components/NavigationDrawer/NavigationDrawerNavlinks.d.ts +11 -0
  118. package/dist/components/NotificationCard/NotificationCard.d.ts +25 -0
  119. package/dist/components/PyrionNavigationDrawer/PyrionHelpSection.d.ts +8 -0
  120. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawer.d.ts +130 -0
  121. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerMobileAppSwitcher.d.ts +10 -0
  122. package/dist/components/PyrionNavigationDrawer/PyrionNavigationDrawerSystemLogo.d.ts +7 -0
  123. package/dist/components/PyrionNavigationDrawer/PyrionNotificationsList.d.ts +8 -0
  124. package/dist/components/PyrionNavigationDrawer/SidebarContent.d.ts +13 -0
  125. package/dist/components/PyrionNavigationDrawer/SystemSessions.d.ts +12 -0
  126. package/dist/components/Scrollable/Scrollable.d.ts +31 -0
  127. package/dist/components/SelectSearch/SelectSearch.d.ts +6 -2
  128. package/dist/components/Sidebar/components/badge.d.ts +2 -1
  129. package/dist/components/TabSwitch/TabSwitch.d.ts +0 -20
  130. package/dist/components/TicketCard/TicketCard.d.ts +32 -0
  131. package/dist/components/UserCard/UserCard.d.ts +12 -0
  132. package/dist/exports/Scrollable.d.ts +2 -0
  133. package/dist/exports/SelectSearch.d.ts +2 -0
  134. package/dist/hooks/useLabelBackground.d.ts +1 -0
  135. package/dist/{jsx-runtime-DKDX3adD.js → jsx-runtime-GkKLlHH4.js} +2 -20
  136. package/dist/lib/utils.d.ts +2 -2
  137. package/dist/prometeo-design-system.es.js +54 -51
  138. package/dist/styles.css +1 -1
  139. package/dist/useLabelBackground-BDIHUdND.js +26 -0
  140. package/package.json +9 -5
  141. package/src/styles/base.css +47 -0
  142. package/src/styles/intellisense.css +1 -0
  143. package/src/styles/palette.css +3 -0
  144. package/src/styles/utilities.css +18 -0
  145. package/dist/DatePicker-D1EwMGIN.js +0 -3568
  146. package/dist/Input-EkMrxcNX.js +0 -241
  147. package/dist/components/PyrionNavigationDrawer/PyirionNavigationDrawer.d.ts +0 -40
@@ -1,241 +0,0 @@
1
- import { j as r } from "./jsx-runtime-DKDX3adD.js";
2
- import { c as t } from "./cn-B6yFEsav.js";
3
- import { useRef as _, useLayoutEffect as q, memo as V, forwardRef as F, useState as ee } from "react";
4
- import te from "./Spinner.es.js";
5
- import { H as re } from "./HelperComponent-DhGU_ug-.js";
6
- import { EyeVisibility as oe } from "./Icons/EyeVisibility.es.js";
7
- import { EyeVisibilityOff as le } from "./Icons/EyeVisibilityOff.es.js";
8
- import { Close as se } from "./Icons/Close.es.js";
9
- const ae = (o) => {
10
- let e = o;
11
- for (; e && e !== document.body; ) {
12
- const n = window.getComputedStyle(e).backgroundColor;
13
- if (n && n !== "transparent" && n !== "rgba(0, 0, 0, 0)")
14
- return n;
15
- e = e.parentElement;
16
- }
17
- const l = window.getComputedStyle(document.body).backgroundColor;
18
- return l && l !== "transparent" && l !== "rgba(0, 0, 0, 0)" ? l : "rgb(255, 255, 255)";
19
- };
20
- function ne() {
21
- const o = _(null);
22
- return q(() => {
23
- if (!o.current || !o.current.parentElement) return;
24
- const e = ae(o.current.parentElement);
25
- o.current.style.backgroundColor = e;
26
- }, []), {
27
- ref: o
28
- };
29
- }
30
- const b = {
31
- default: {
32
- container: "",
33
- input: t(
34
- "border-neutral-default-default text-neutral-default-default!",
35
- "focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
36
- "hover:border-neutral-strong-default"
37
- ),
38
- label: t("text-neutral-medium-default"),
39
- icon: t(
40
- "text-neutral-medium-default",
41
- "peer-focus:text-primary-default-default"
42
- )
43
- },
44
- error: {
45
- container: "",
46
- input: t(
47
- "border-error-default-default text-neutral-default-default",
48
- "focus:border-error-default focus:border-2",
49
- "focus:ring-0 focus:ring-error-default/20"
50
- ),
51
- label: t("text-lime-500", "peer-focus:text-error-light"),
52
- icon: t("text-error-light", "peer-focus:text-error-light")
53
- },
54
- success: {
55
- container: "",
56
- input: t(
57
- "border-success-default-default text-neutral-default-default",
58
- "focus:border-success-default focus:border-2",
59
- "focus:ring-0 focus:ring-success-default/20"
60
- ),
61
- label: t("text-success", "peer-focus:text-success-light"),
62
- icon: t("text-success-light", "peer-focus:text-success-light")
63
- }
64
- }, v = F(
65
- ({
66
- label: o,
67
- icon: e,
68
- iconPosition: l = "left",
69
- onChange: N,
70
- value: n,
71
- name: g,
72
- width: x = "100%",
73
- height: u,
74
- variant: c = "default",
75
- labelVariant: a = "default",
76
- size: H = "medium",
77
- disabled: f = !1,
78
- type: s = "text",
79
- isFetching: p,
80
- errorComponent: h,
81
- helperComponent: w,
82
- placeholder: $,
83
- required: z = !1,
84
- onFocus: k,
85
- onBlur: I,
86
- onKeyDown: L,
87
- onKeyUp: R,
88
- className: B,
89
- style: P,
90
- readOnly: D = !1,
91
- onClear: C,
92
- ...E
93
- }, A) => {
94
- const [y, M] = ee(!1), { ref: O } = ne();
95
- let d = H;
96
- u && (d = "customHeight");
97
- const i = {
98
- small: {
99
- container: "text-sm",
100
- input: "h-10 px-3 text-[1rem] prometeo-fonts-body-large",
101
- label: ` prometeo-fonts-label-large
102
- peer-focus:prometeo-fonts-label-large
103
- peer-placeholder-shown:${a === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default peer-focus:text-neutral-medium-default `,
104
- icon: "w-4 h-4 right-3"
105
- },
106
- medium: {
107
- container: "text-base",
108
- input: "h-12 px-3 prometeo-fonts-body-large",
109
- label: ` prometeo-fonts-label-large
110
- peer-focus:prometeo-fonts-label-large
111
- peer-placeholder-shown:${a === "default" ? "prometeo-fonts-body-large" : "prometeo-fonts-label-large"} peer-placeholder-shown:text-neutral-medium-default text-neutral-medium-default peer-focus:text-neutral-medium-default `,
112
- icon: "w-5 h-5 right-3"
113
- },
114
- large: {
115
- container: "text-lg",
116
- input: "h-14 px-3 text-lg border-b border-t-0 border-x-0 rounded-none focus:ring-0 prometeo-fonts-body-xlarge ",
117
- label: "peer-placeholder-shown:prometeo-fonts-body-xlarge peer-focus:prometeo-fonts-label-large peer-focus:text-neutral-medium-default prometeo-fonts-label-large ",
118
- icon: "w-6 h-6 right-3"
119
- },
120
- customHeight: {
121
- container: "text-base",
122
- input: "text-base",
123
- label: "text-sm peer-focus:text-sm peer-placeholder-shown:text-xs ",
124
- icon: "w-6 h-6 right-3"
125
- }
126
- }, T = () => {
127
- M(!y);
128
- }, j = {};
129
- x && x !== "100%" && (j.width = x), u && (j.height = u);
130
- const S = c === "error" && h, G = !S && w, J = s === "password", K = () => a === "static" ? "-top-1 -translate-y-full left-0 pl-3" : e ? `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1 peer-focus:ml-0 peer-focus:mr-0 ${l === "left" ? "peer-placeholder-shown:ml-6" : "peer-placeholder-shown:mr-6"}` : `${m ? "peer-placeholder-shown:top-[calc(50%-12px)]" : "peer-placeholder-shown:top-1/2"} -translate-y-1/2 peer-focus:top-0 peer-focus:left-3 peer-focus:px-1`, Q = () => u ? i.customHeight.label : i[d].label, U = () => u ? { height: u } : {}, W = () => a === "default" ? o : $ || o || "", X = () => J ? e ? l === "left" ? "pl-10 pr-10" : "pr-16" : "pr-10" : e ? l === "left" ? "pl-10 pr-3" : "pr-10 pl-3" : "", Y = a === "default" && "transition-all duration-200 ease-in-out", m = h || w;
131
- return /* @__PURE__ */ r.jsxs(
132
- "div",
133
- {
134
- className: t(
135
- "relative",
136
- i[d].container,
137
- !x && "w-full",
138
- "bg-inherit",
139
- a === "static" && "mt-2",
140
- B
141
- ),
142
- style: { ...P, ...j },
143
- children: [
144
- /* @__PURE__ */ r.jsx(
145
- "input",
146
- {
147
- id: g,
148
- name: g,
149
- ref: A,
150
- value: n,
151
- placeholder: W(),
152
- type: s === "password" && y ? "text" : s,
153
- className: t(
154
- "peer w-full border rounded-lg bg-transparent appearance-none transition-all duration-200 ease-in-out",
155
- "focus:outline-none px-3",
156
- a === "default" && "placeholder:text-transparent",
157
- a === "static" && "placeholder:text-neutral-medium-default ",
158
- b[c].input,
159
- i[d].input,
160
- e && "pr-10",
161
- f && "bg-transparent opacity-60 border-neutral-strong-default text-neutral-medium-disabled",
162
- b[c].container,
163
- X()
164
- ),
165
- style: U(),
166
- onChange: N,
167
- onFocus: k,
168
- onBlur: I,
169
- disabled: f,
170
- required: z,
171
- onKeyDown: L,
172
- onKeyUp: R,
173
- defaultValue: E.defaultValue,
174
- readOnly: D,
175
- ...E
176
- }
177
- ),
178
- /* @__PURE__ */ r.jsx(
179
- "label",
180
- {
181
- ref: O,
182
- htmlFor: g,
183
- className: t(
184
- "absolute left-3 pointer-events-none px-1 z-10",
185
- Y,
186
- Q(),
187
- b[c].label,
188
- K(),
189
- z && "after:content-['*'] after:text-error-default after:ml-1",
190
- f && "text-neutral-medium-disabled prometeo-fonts-label-large"
191
- ),
192
- children: o
193
- }
194
- ),
195
- (e || s === "password" || p) && /* @__PURE__ */ r.jsx(
196
- "button",
197
- {
198
- tabIndex: -1,
199
- type: "button",
200
- className: t(
201
- `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10`,
202
- i[d].icon,
203
- b[c].icon,
204
- s === "password" && !p ? "cursor-pointer" : "pointer-events-none",
205
- l === "right" ? "right-3" : "left-3"
206
- ),
207
- onClick: s === "password" && !p ? T : void 0,
208
- onMouseDown: (Z) => s === "password" && !p && Z.preventDefault(),
209
- children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
210
- p && s !== "password" ? /* @__PURE__ */ r.jsx(te, { variant: "sync", size: "small", className: "size-5" }) : e,
211
- s === "password" && (y ? /* @__PURE__ */ r.jsx(oe, { size: 24, className: "" }) : /* @__PURE__ */ r.jsx(le, { size: 24, className: "" }))
212
- ] })
213
- }
214
- ),
215
- C && /* @__PURE__ */ r.jsx(
216
- "button",
217
- {
218
- type: "button",
219
- className: t(
220
- `absolute ${m ? "top-[calc(50%-12px)]" : "top-1/2"} -translate-y-1/2 flex items-center justify-center z-10 right-1`,
221
- "size-6 p-1 rounded-full",
222
- "hover:bg-neutral-medium-hover transition-colors",
223
- f && "opacity-50 cursor-not-allowed"
224
- ),
225
- disabled: f,
226
- onClick: C,
227
- children: /* @__PURE__ */ r.jsx(se, { size: 20, className: "" })
228
- }
229
- ),
230
- m && /* @__PURE__ */ r.jsx("div", { className: "min-h-6", children: (S || G) && /* @__PURE__ */ r.jsx(re, { className: "absolute ", variant: c, children: h || w }) })
231
- ]
232
- }
233
- );
234
- }
235
- );
236
- v.displayName = "Input";
237
- const be = V(v);
238
- export {
239
- be as I,
240
- ne as u
241
- };
@@ -1,40 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { NavItemProps } from '../NavigationDrawer/NavItem';
3
- type TProduct = {
4
- name: string;
5
- domain: string;
6
- active: boolean;
7
- coverImage?: string;
8
- thumbnail?: string;
9
- };
10
- type TCompany = {
11
- name: string;
12
- products?: TProduct[];
13
- icon?: string;
14
- };
15
- type TSystem = {
16
- name: string;
17
- url: string;
18
- coverImage?: string;
19
- thumbnail?: string;
20
- };
21
- type TUser = {
22
- name: string;
23
- surname?: string;
24
- email?: string;
25
- profile_picture?: string;
26
- area?: string;
27
- };
28
- export interface PyirionNavigationDrawerProps {
29
- links?: NavItemProps[];
30
- children?: ReactNode;
31
- state: {
32
- company: TCompany;
33
- enabled_systems: TSystem[];
34
- user: TUser;
35
- };
36
- onLinkClick?: (path: string) => void;
37
- onNavigate?: (from: string, to: string) => void;
38
- }
39
- declare const PyirionNavigationDrawer: ({ children, state, links: navlinks, onLinkClick, onNavigate }: PyirionNavigationDrawerProps) => import("react/jsx-runtime").JSX.Element;
40
- export default PyirionNavigationDrawer;