@fibery/ui-kit 9.0.1 → 9.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 (240) hide show
  1. package/lib/a11y-color.js +12 -10
  2. package/lib/actions-menu/actions-menu-item.js +1 -1
  3. package/lib/actions-menu/actions-menu-props.d.ts +2 -0
  4. package/lib/actions-menu/actions-menu-separator.d.ts +2 -2
  5. package/lib/actions-menu/actions-menu-sub-command-menu.js +5 -4
  6. package/lib/actions-menu/actions-menu.d.ts +1 -1
  7. package/lib/actions-menu/actions-menu.js +2 -1
  8. package/lib/actions-menu/contexts/actions-menu-context.js +12 -11
  9. package/lib/actions-menu/index.d.ts +3 -3
  10. package/lib/ai/max-tokens.js +6 -5
  11. package/lib/antd/ant-modal.d.ts +1 -1
  12. package/lib/antd/ant-modal.js +28 -1
  13. package/lib/antd/ant-upload.d.ts +1 -1
  14. package/lib/antd/ant-upload.js +23 -18
  15. package/lib/antd/input-number.js +2 -2
  16. package/lib/antd/input.js +7 -6
  17. package/lib/antd/utils.js +2 -1
  18. package/lib/avatar-colors.js +1 -1
  19. package/lib/avatar.d.ts +1 -10
  20. package/lib/avatar.js +48 -38
  21. package/lib/avatar.wyw-in-js.css +1 -1
  22. package/lib/banner/banner-action.js +2 -1
  23. package/lib/board-table-loader.js +1 -1
  24. package/lib/button/button.js +1 -1
  25. package/lib/button/icon-button.js +1 -1
  26. package/lib/canvas-colors.js +2 -2
  27. package/lib/card-container.d.ts +2 -6
  28. package/lib/card-container.js +5 -5
  29. package/lib/color-filter.js +2 -2
  30. package/lib/color-inspect.js +1 -1
  31. package/lib/color-picker/color-picker-or-loader.d.ts +2 -2
  32. package/lib/color-utils.js +1 -1
  33. package/lib/comment.d.ts +1 -0
  34. package/lib/comment.js +29 -20
  35. package/lib/comment.wyw-in-js.css +9 -7
  36. package/lib/context-menu/index.js +1 -0
  37. package/lib/context-menu/index.wyw-in-js.css +1 -1
  38. package/lib/copy-to-clipboard.js +2 -1
  39. package/lib/date-picker/autocomplete.js +12 -10
  40. package/lib/date-picker/date-range-input.js +9 -7
  41. package/lib/date-picker/day-with-start-end-buttons.js +0 -2
  42. package/lib/date-picker/get-weekends-for-month.js +4 -2
  43. package/lib/date-picker/relative-date-picker.js +5 -3
  44. package/lib/date-picker/single-date-input.js +9 -7
  45. package/lib/date-picker/single-date-picker.d.ts +1 -2
  46. package/lib/date-picker/single-date-picker.js +2 -1
  47. package/lib/date-picker/types.d.ts +1 -2
  48. package/lib/day-select/day-select.js +2 -1
  49. package/lib/day-select/week-day-select.d.ts +2 -2
  50. package/lib/day-select/week-day-select.js +4 -3
  51. package/lib/design-system/alpha.d.ts +6 -0
  52. package/lib/design-system/alpha.js +11 -7
  53. package/lib/design-system/colors-charts.d.ts +4 -0
  54. package/lib/design-system/colors-charts.js +14 -0
  55. package/lib/design-system/colors-js.d.ts +2 -4
  56. package/lib/design-system/colors-js.js +8 -10
  57. package/lib/design-system/fns.enum.js +7 -4
  58. package/lib/design-system/fns.icon.js +1 -1
  59. package/lib/design-system/fns.js +7 -4
  60. package/lib/design-system/theme.d.ts +7 -7
  61. package/lib/design-system/theme.js +7 -12
  62. package/lib/design-system/vars.js +1 -2
  63. package/lib/design-system.d.ts +3 -2
  64. package/lib/design-system.js +3 -2
  65. package/lib/emoji-picker/app-icon-picker.d.ts +2 -2
  66. package/lib/emoji-picker/emoji-picker-content-with-color.d.ts +2 -2
  67. package/lib/emoji-picker/emoji-picker.d.ts +2 -2
  68. package/lib/emoji-picker/icon-emoji-picker.d.ts +1 -2
  69. package/lib/emoji-picker/primitives/content.js +10 -9
  70. package/lib/emoji-picker/primitives/emoji.js +22 -14
  71. package/lib/emoji-picker/primitives/emoji.wyw-in-js.css +4 -3
  72. package/lib/emoji-picker/primitives/grid.js +0 -1
  73. package/lib/emoji-picker/primitives/preview-provider.js +4 -3
  74. package/lib/emoji-picker/primitives/root.js +10 -9
  75. package/lib/emoji-picker/primitives/skin-provider.js +5 -4
  76. package/lib/emoji-picker/stores/emoji-data-store.d.ts +2 -2
  77. package/lib/emoji-picker/stores/emoji-data-store.js +8 -8
  78. package/lib/emoji-picker/stores/static-emoji-data-store.js +2 -1
  79. package/lib/emoji.js +5 -2
  80. package/lib/errors.d.ts +2 -3
  81. package/lib/fibermoji-placeholder.js +5 -7
  82. package/lib/field-type-icon.js +2 -1
  83. package/lib/file-item/file-icon.js +2 -1
  84. package/lib/file-item.js +3 -10
  85. package/lib/guide-link.js +1 -1
  86. package/lib/highlight-colors.js +2 -1
  87. package/lib/hotkey-scope.js +2 -1
  88. package/lib/icons/ast/build.d.ts +5 -0
  89. package/lib/icons/ast/build.js +25 -0
  90. package/lib/icons/ast/index.d.ts +2 -4
  91. package/lib/icons/ast/index.js +5 -7
  92. package/lib/icons/ast/spinner.js +8 -15
  93. package/lib/icons/icon.js +4 -3
  94. package/lib/icons/react/{plus.d.ts → build.d.ts} +4 -4
  95. package/lib/icons/react/{plus.js → build.js} +6 -6
  96. package/lib/icons/react/index.d.ts +2 -4
  97. package/lib/icons/react/index.js +5 -7
  98. package/lib/images-gallery/get-gallery-src.js +1 -1
  99. package/lib/images-gallery/slide-buttons.js +8 -4
  100. package/lib/images-gallery/thumbnails-mime-types-white-list.js +1 -1
  101. package/lib/integration-compact-info-button.js +1 -2
  102. package/lib/is-in-popup.d.ts +1 -2
  103. package/lib/is-in-popup.js +6 -0
  104. package/lib/loaders.d.ts +1 -9
  105. package/lib/loaders.js +2 -39
  106. package/lib/loaders.wyw-in-js.css +2 -4
  107. package/lib/loading-sausage.js +7 -6
  108. package/lib/mobile-drawer.d.ts +2 -1
  109. package/lib/mobile-drawer.js +24 -12
  110. package/lib/mobile-drawer.wyw-in-js.css +4 -3
  111. package/lib/mobile-keyboard-aware-popup.js +6 -5
  112. package/lib/modal-menu/contexts/modal-menu-context.d.ts +1 -0
  113. package/lib/modal-menu/modal-menu-content.d.ts +1 -1
  114. package/lib/modal-menu/modal-menu-content.js +16 -6
  115. package/lib/modal-menu/modal-menu-drawer-content.d.ts +7 -0
  116. package/lib/modal-menu/modal-menu-drawer-content.js +13 -0
  117. package/lib/modal-menu/modal-menu-root.d.ts +2 -1
  118. package/lib/modal-menu/modal-menu-root.js +24 -21
  119. package/lib/modal-menu/modal-submenu.js +10 -9
  120. package/lib/nested-menu-item.d.ts +1 -1
  121. package/lib/number-input/number-input-inline-with-autosize.d.ts +1 -2
  122. package/lib/number-input/number-input-inline-with-autosize.js +9 -6
  123. package/lib/number-input/number-input-inline-with-autosize.wyw-in-js.css +0 -1
  124. package/lib/number-input/number-input.js +13 -11
  125. package/lib/number-input/styles.d.ts +1 -9
  126. package/lib/number-input/styles.js +3 -9
  127. package/lib/number-input/styles.wyw-in-js.css +2 -3
  128. package/lib/number-input/text-area-auto-sized.d.ts +1 -2
  129. package/lib/number-input/text-area-auto-sized.js +2 -2
  130. package/lib/number-input/text-input-auto-sized.d.ts +1 -2
  131. package/lib/number-input/text-input-auto-sized.js +2 -2
  132. package/lib/online-users.js +2 -2
  133. package/lib/open-popover-tracker.js +7 -6
  134. package/lib/palettes/neutral.js +1 -1
  135. package/lib/palettes/warm.js +1 -1
  136. package/lib/phone.js +1 -1
  137. package/lib/popover/index.d.ts +9 -12
  138. package/lib/popover/index.js +66 -75
  139. package/lib/popover/mobile-popover-context.js +12 -11
  140. package/lib/popover/mobile-popover.d.ts +2 -2
  141. package/lib/popover/mobile-popover.js +16 -15
  142. package/lib/popover/modifiers.js +4 -4
  143. package/lib/popover/popup-modifiers-context.d.ts +3 -5
  144. package/lib/preference-setting.js +6 -8
  145. package/lib/reactions/reaction-button.js +36 -25
  146. package/lib/reactions/reaction-button.wyw-in-js.css +16 -16
  147. package/lib/reactions/reaction-picker.js +22 -10
  148. package/lib/reactions/reaction-picker.wyw-in-js.css +1 -0
  149. package/lib/reactions/tootltip.js +2 -1
  150. package/lib/select/components/drop-down-indicator.js +1 -1
  151. package/lib/select/components/menu-list-virtualized.js +1 -1
  152. package/lib/select/components/option.js +2 -1
  153. package/lib/select/index.d.ts +2 -1
  154. package/lib/select/select-in-popover.js +1 -1
  155. package/lib/select/select-trigger.d.ts +4 -0
  156. package/lib/select/select-trigger.js +25 -0
  157. package/lib/select/select-trigger.wyw-in-js.css +1 -0
  158. package/lib/select/select.d.ts +6 -2
  159. package/lib/select/select.js +13 -8
  160. package/lib/select/styles.js +2 -2
  161. package/lib/spinner.d.ts +5 -0
  162. package/lib/spinner.js +17 -0
  163. package/lib/spinner.wyw-in-js.css +1 -0
  164. package/lib/tab-nav/tab-nav.d.ts +4 -2
  165. package/lib/tab-nav/tab-nav.js +2 -2
  166. package/lib/thematic.js +322 -321
  167. package/lib/theme-provider.d.ts +1 -3
  168. package/lib/theme-settings-core.d.ts +13 -1
  169. package/lib/theme-settings-core.js +37 -1
  170. package/lib/theme-settings.d.ts +3 -2
  171. package/lib/theme-settings.js +7 -2
  172. package/lib/toast/toast-action.js +2 -1
  173. package/lib/toast/toast-provider.d.ts +1 -2
  174. package/lib/toast/toast-queue.d.ts +1 -2
  175. package/lib/toast/toast-queue.js +7 -8
  176. package/lib/toast/toast.js +7 -6
  177. package/lib/toggle.js +3 -3
  178. package/lib/tooltip-if-overflown.js +2 -1
  179. package/lib/tooltip.js +1 -1
  180. package/lib/type-badge.d.ts +8 -28
  181. package/lib/type-badge.js +39 -50
  182. package/lib/type-badge.wyw-in-js.css +11 -10
  183. package/lib/unit/container.d.ts +12 -0
  184. package/lib/unit/container.js +50 -0
  185. package/lib/unit/context.d.ts +29 -0
  186. package/lib/unit/context.js +9 -0
  187. package/lib/unit/index.d.ts +4 -2
  188. package/lib/unit/index.js +2 -1
  189. package/lib/unit/nav-button.d.ts +12 -0
  190. package/lib/unit/nav-button.js +18 -0
  191. package/lib/unit/styles.d.ts +6 -9
  192. package/lib/unit/styles.js +13 -16
  193. package/lib/unit/styles.wyw-in-js.css +10 -16
  194. package/lib/unit/unit-content-layout.d.ts +4 -3
  195. package/lib/unit/unit-content-layout.js +9 -9
  196. package/lib/unit/unit-content.d.ts +6 -5
  197. package/lib/unit/unit-content.js +83 -18
  198. package/lib/unit/unit-content.wyw-in-js.css +6 -2
  199. package/lib/unit/unit.d.ts +38 -5
  200. package/lib/unit/unit.js +43 -12
  201. package/lib/use-long-press.d.ts +6 -6
  202. package/lib/with-data.d.ts +35 -37
  203. package/lib/with-data.js +23 -22
  204. package/lib/workflow-progress-icon.js +2 -2
  205. package/package.json +4 -4
  206. package/lib/beta-badge.d.ts +0 -8
  207. package/lib/beta-badge.js +0 -13
  208. package/lib/beta-badge.wyw-in-js.css +0 -1
  209. package/lib/checkbox-multi-select.d.ts +0 -21
  210. package/lib/checkbox-multi-select.js +0 -41
  211. package/lib/checkbox-multi-select.wyw-in-js.css +0 -3
  212. package/lib/country-selector.d.ts +0 -9
  213. package/lib/country-selector.js +0 -21
  214. package/lib/features.d.ts +0 -8
  215. package/lib/features.js +0 -15
  216. package/lib/flags.d.ts +0 -4
  217. package/lib/flags.js +0 -7
  218. package/lib/icons/ast/alert-triangle.d.ts +0 -5
  219. package/lib/icons/ast/alert-triangle.js +0 -25
  220. package/lib/icons/ast/field-units-large.d.ts +0 -5
  221. package/lib/icons/ast/field-units-large.js +0 -25
  222. package/lib/icons/ast/plus.d.ts +0 -5
  223. package/lib/icons/ast/plus.js +0 -25
  224. package/lib/icons/react/alert-triangle.d.ts +0 -15
  225. package/lib/icons/react/alert-triangle.js +0 -21
  226. package/lib/icons/react/field-units-large.d.ts +0 -15
  227. package/lib/icons/react/field-units-large.js +0 -21
  228. package/lib/layout.d.ts +0 -28
  229. package/lib/layout.js +0 -66
  230. package/lib/layout.wyw-in-js.css +0 -2
  231. package/lib/new-card-placeholder.d.ts +0 -26
  232. package/lib/new-card-placeholder.js +0 -141
  233. package/lib/new-card-placeholder.wyw-in-js.css +0 -5
  234. package/lib/unit/primitive.d.ts +0 -5
  235. package/lib/unit/primitive.js +0 -108
  236. package/lib/unit/primitive.wyw-in-js.css +0 -3
  237. package/lib/unit/types.d.ts +0 -34
  238. package/lib/unit/types.js +0 -0
  239. package/lib/unit/unit-button-group.d.ts +0 -13
  240. package/lib/unit/unit-button-group.js +0 -23
@@ -1,7 +1,7 @@
1
1
  import "./card-container.wyw-in-js.css";
2
2
  import { visuallyHidden } from "./styles-utils.js";
3
- import { getBg } from "./box.js";
4
3
  import { CardHiddenLink } from "./card-hidden-link.js";
4
+ import { getBg } from "./box.js";
5
5
  /* empty css */
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import cx from "classnames";
@@ -158,13 +158,13 @@ var CompactCardContainer = ({ title, floating, backgroundColors }) => {
158
158
  };
159
159
  var titleUnitsContainerClassName = "t5lzfm0-titleUnitsContainer";
160
160
  var UnitGroup = ({ renderedUnits }) => {
161
- return renderedUnits ? /* @__PURE__ */ jsx(Fragment, { children: renderedUnits.map((x) => x.reactElement) }) : null;
161
+ return renderedUnits ? /* @__PURE__ */ jsx(Fragment, { children: renderedUnits }) : null;
162
162
  };
163
163
  var TitleUnitGroup = ({ renderedUnits, className }) => {
164
- return renderedUnits ? /* @__PURE__ */ jsx(Fragment, { children: renderedUnits.map((x) => /* @__PURE__ */ jsx("div", {
164
+ return renderedUnits ? /* @__PURE__ */ jsx(Fragment, { children: renderedUnits.map((element) => /* @__PURE__ */ jsx("div", {
165
165
  className: cx(titleUnitsContainerClassName, className),
166
- children: x.reactElement
167
- }, x.reactElement.key)) }) : null;
166
+ children: element
167
+ }, element.key)) }) : null;
168
168
  };
169
169
  //#endregion
170
170
  export { CardContainer, CompactCardContainer, TitleUnitGroup, UnitGroup, afterFeedSize, afterListSize, beforeClassName, coverHeightBySize, titleTimelineClassName, titleUnitsContainerClassName };
@@ -1,8 +1,8 @@
1
1
  import { colorFromUnsafe, cssFromColor, oklchFrom, rgbFrom } from "./color-utils.js";
2
+ import { memoizeColor } from "./memoize.js";
2
3
  import { makeAdjust } from "./color-adjuster.js";
3
4
  import { makeDoubleApplyDetector } from "./double-apply.js";
4
5
  import { shiftHueTowards } from "./palette-generator.js";
5
- import { memoize } from "@fibery/helpers/src/_";
6
6
  import { clampRgb, filterDeficiencyDeuter, filterDeficiencyProt, filterDeficiencyTrit, filterHueRotate, filterInvert } from "culori";
7
7
  //#region src/color-filter.ts
8
8
  var cvdChannels = [
@@ -33,7 +33,7 @@ function makeColorFilter(spec) {
33
33
  if (!spec) return (x) => x;
34
34
  const adjust = spec.adjust && makeAdjust(spec.adjust);
35
35
  const detect = makeDoubleApplyDetector();
36
- return memoize(function filterColor(color) {
36
+ return memoizeColor(function filterColor(color) {
37
37
  if (!color) return color;
38
38
  color = spec.swatches?.[color.toUpperCase()] ?? color;
39
39
  const parsed = oklchFrom(color);
@@ -9,7 +9,7 @@ function alignColorComponents(formatted) {
9
9
  pad: (s) => s.padStart(COMPONENT_PAD, " ")
10
10
  }, {
11
11
  prefix: "oklch(",
12
- pad: (s, i, total) => i === total - 1 ? s.padStart(COMPONENT_PAD - 1, " ").padEnd(COMPONENT_PAD, " ") : s.padEnd(COMPONENT_PAD, " ")
12
+ pad: (s, i, total) => i === total - 1 ? s.padStart(3, " ").padEnd(COMPONENT_PAD, " ") : s.padEnd(COMPONENT_PAD, " ")
13
13
  }].find((m) => formatted.startsWith(m.prefix));
14
14
  if (!mode || !formatted.endsWith(")")) return formatted;
15
15
  const inner = formatted.slice(mode.prefix.length, -1);
@@ -1,6 +1,6 @@
1
- import { ColorPickerProps } from "./index.js";
1
+ import { ColorPicker } from "./index.js";
2
2
  //#region src/color-picker/color-picker-or-loader.d.ts
3
- declare const LazyColorPicker: import("react").LazyExoticComponent<({ color, getSwatchHoverColor, getColorOverrideFn, colors, onChangeComplete, containerClassName }: ColorPickerProps) => import("react/jsx-runtime").JSX.Element>;
3
+ declare const LazyColorPicker: import("react").LazyExoticComponent<typeof ColorPicker>;
4
4
  declare const ColorPickerOrLoader: (props: React.ComponentProps<typeof LazyColorPicker>) => import("react/jsx-runtime").JSX.Element;
5
5
  //#endregion
6
6
  export { ColorPickerOrLoader };
@@ -1,5 +1,5 @@
1
1
  import { resolveColorArg } from "./design-system/vars.js";
2
- import { isFlagPresent } from "./flags.js";
2
+ import { isFlagPresent } from "@fibery/helpers/src/flags";
3
3
  import { blend, differenceCie76, formatCss, formatRgb, hsl as hslFrom, interpolate, oklch as oklchFrom, parse, rgb as rgbFrom, serializeHex, serializeHex8, toGamut, wcagLuminance } from "culori";
4
4
  //#region src/color-utils.ts
5
5
  var useOklchDefs = isFlagPresent("oklch-defs");
package/lib/comment.d.ts CHANGED
@@ -18,6 +18,7 @@ interface CommentProps {
18
18
  dateTimeFormat?: string;
19
19
  commentContentStyleClassName?: string;
20
20
  actionsShowed?: boolean;
21
+ badge?: ReactNode;
21
22
  }
22
23
  declare const actionsClassName: import("@linaria/core").LinariaClassName;
23
24
  declare const Comment: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<CommentProps & import("react").RefAttributes<HTMLDivElement>>>;
package/lib/comment.js CHANGED
@@ -15,18 +15,20 @@ var commentContentStyle = "c4bd082-commentContent";
15
15
  var commentStyle = "c99co57-comment";
16
16
  var avatarContainerStyle = "alj6rui-avatarContainer";
17
17
  var infoContainerStyle = "i1jz7n7h-infoContainer";
18
- var authorStyle = "a1ftwecl-author";
19
- var dateStyle = "d1uq6781-date";
20
- var defaultCommentStyle = "d1fgzzhc-defaultComment";
21
- var actionsClassName = "a6fpn3e-actions";
18
+ var infoRowStyle = "i1ftwecl-infoRow";
19
+ var authorStyle = "a1uq6781-author";
20
+ var dateStyle = "d1fgzzhc-date";
21
+ var badgeStyle = "b6fpn3e-badge";
22
+ var defaultCommentStyle = "d1j9f4o5-defaultComment";
23
+ var actionsClassName = "a1slvpm7-actions";
22
24
  var Comment = memo(forwardRef((props, ref) => {
23
- const { author, authorTitle, authorStyleClassName, commentContentStyleClassName = commentContentStyle, date, avatarUrl, hasAccessToAuthor = true, actions, children, customItemStyle, dateTimeFormat, icon, avatarSize = 24, actionsShowed = false } = props;
25
+ const { author, authorTitle, authorStyleClassName, commentContentStyleClassName = commentContentStyle, date, avatarUrl, hasAccessToAuthor = true, actions, children, customItemStyle, dateTimeFormat, icon, avatarSize = 24, actionsShowed = false, badge } = props;
24
26
  const { formatted, relative } = formatDateFromNow(date, { format: dateTimeFormat });
25
27
  const IconComponent = icon ? icon : null;
26
28
  const isPhone = useIsPhone();
27
29
  return /* @__PURE__ */ jsxs("div", {
28
30
  ref,
29
- className: cx("c1j9f4o5", defaultCommentStyle, customItemStyle ?? "c99co57-comment"),
31
+ className: cx("cjnlt45", defaultCommentStyle, customItemStyle ?? "c99co57-comment"),
30
32
  children: [
31
33
  /* @__PURE__ */ jsx("div", { children: IconComponent ? IconComponent : /* @__PURE__ */ jsx(AvatarImage, {
32
34
  avatarUrl,
@@ -35,22 +37,29 @@ var Comment = memo(forwardRef((props, ref) => {
35
37
  hasAccess: hasAccessToAuthor
36
38
  }) }),
37
39
  /* @__PURE__ */ jsxs("div", {
38
- className: "c1slvpm7",
40
+ className: "c1gf494l",
39
41
  children: [/* @__PURE__ */ jsxs("div", {
40
- className: infoContainerStyle,
41
- children: [/* @__PURE__ */ jsx("div", {
42
- className: cx(authorStyle, authorStyleClassName),
43
- children: author
44
- }), date && /* @__PURE__ */ jsx(Tooltip, {
45
- title: formatted,
46
- side: "top",
47
- children: /* @__PURE__ */ jsx("div", {
48
- className: dateStyle,
49
- children: relative
42
+ className: infoRowStyle,
43
+ children: [
44
+ /* @__PURE__ */ jsx("div", {
45
+ className: cx(authorStyle, authorStyleClassName),
46
+ children: author
47
+ }),
48
+ date && /* @__PURE__ */ jsx(Tooltip, {
49
+ title: formatted,
50
+ side: "top",
51
+ children: /* @__PURE__ */ jsx("div", {
52
+ className: dateStyle,
53
+ children: relative
54
+ })
55
+ }),
56
+ badge && /* @__PURE__ */ jsx("span", {
57
+ className: badgeStyle,
58
+ children: badge
50
59
  })
51
- })]
60
+ ]
52
61
  }), actions ? /* @__PURE__ */ jsx("div", {
53
- className: cx(actionsClassName, (actionsShowed || isPhone) && "cjnlt45"),
62
+ className: cx(actionsClassName, (actionsShowed || isPhone) && "c14sd9dn"),
54
63
  children: actions
55
64
  }) : null]
56
65
  }),
@@ -84,7 +93,7 @@ var CommentPlaceholder = () => {
84
93
  };
85
94
  var ErrorComment = ({ error }) => {
86
95
  return /* @__PURE__ */ jsx("div", { children: jsx(Item, {
87
- itemClassName: cx(commentStyle, "i1gf494l-item"),
96
+ itemClassName: cx(commentStyle, "i1fgpr5b-item"),
88
97
  multiline: true,
89
98
  leftContainer: /* @__PURE__ */ jsx("div", {
90
99
  className: avatarContainerStyle,
@@ -2,11 +2,13 @@
2
2
  .c99co57-comment{border-radius:6px;padding-left:12px;padding-right:12px;padding-top:12px;padding-bottom:6px;margin-bottom:1px;background-color:var(--actionMenuBg);transition:box-shadow 120ms ease-in-out;overflow-x:auto;}
3
3
  .alj6rui-avatarContainer{margin-right:8px;}
4
4
  .i1jz7n7h-infoContainer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-height:20px;font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.3;font-weight:600;color:var(--textColor);}
5
- .a1ftwecl-author{display:inline;margin-right:8px;}
6
- .d1uq6781-date{display:inline;white-space:no-wrap;padding-right:8px;font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px;line-height:1.5;font-weight:410;color:var(--accentTextColor);text-transform:none;}
5
+ .i1ftwecl-infoRow{display:flex;align-items:center;min-width:0;min-height:20px;font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.3;font-weight:600;color:var(--textColor);}
6
+ .a1uq6781-author{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline;margin-right:8px;min-width:0;}
7
+ .d1fgzzhc-date{display:inline;white-space:no-wrap;padding-right:8px;flex-shrink:0;font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:12px;line-height:1.5;font-weight:410;color:var(--accentTextColor);text-transform:none;}
8
+ .b6fpn3e-badge{display:flex;flex-shrink:0;}
7
9
 
8
- .a6fpn3e-actions{display:none;position:absolute;top:0;right:0;z-index:1;padding:3px;background-color:var(--colorBgFloatingPanel);border-radius:8px;box-shadow:var(--shadowFloatingPanel);gap:2px;}.d1fgzzhc-defaultComment:hover .a6fpn3e-actions{display:flex;}
9
- .c1j9f4o5{display:grid;grid-template-columns:auto minmax(150px, 1fr);align-items:center;column-gap:12px;}
10
- .c1slvpm7{display:grid;position:relative;grid-template-columns:1fr auto;align-items:center;min-height:24px;}
11
- .cjnlt45{display:flex;}
12
- .i1gf494l-item{background-color:var(--warningBgColor);}
10
+ .a1slvpm7-actions{display:none;position:absolute;top:0;right:0;z-index:1;padding:3px;background-color:var(--colorBgFloatingPanel);border-radius:8px;box-shadow:var(--shadowFloatingPanel);gap:2px;}.d1j9f4o5-defaultComment:hover .a1slvpm7-actions{display:flex;}.fibery-mobile .a1slvpm7-actions{top:-6px;}
11
+ .cjnlt45{display:grid;grid-template-columns:auto minmax(150px, 1fr);align-items:center;column-gap:12px;}
12
+ .c1gf494l{display:grid;position:relative;grid-template-columns:1fr auto;align-items:center;min-height:24px;}.fibery-mobile .c1gf494l{min-height:36px;}
13
+ .c14sd9dn{display:flex;}
14
+ .i1fgpr5b-item{background-color:var(--warningBgColor);}
@@ -104,6 +104,7 @@ var SubContent = forwardRef(function DropdownMenuSubContent({ className, ...rest
104
104
  return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: jsx(RadixPortalThemeProvider, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
105
105
  ref,
106
106
  className: cx(dropdownMenuContentStyles, className),
107
+ collisionPadding: space.s12 + space.s8,
107
108
  ...rest
108
109
  }) }) });
109
110
  });
@@ -1,4 +1,4 @@
1
- .d12eukli-dropdownMenuContent{overflow-y:auto;overflow-x:hidden;z-index:1001;max-height:min(var(--radix-dropdown-menu-content-available-height), 680px);padding-top:4px;padding-bottom:4px;min-width:200px;box-shadow:var(--actionMenuShadow);border-radius:8px;background-color:var(--colorBgActionsMenu);}@keyframes slideDown-d12eukli-dropdownMenuContent{from{opacity:0;transform:translateY(-2px);}to{opacity:1;transform:translateY(0);}}@media (prefers-reduced-motion: no-preference){.d12eukli-dropdownMenuContent{animation-duration:400ms;animation-timing-function:cubic-bezier(0.16, 1, 0.3, 1);animation-fill-mode:forwards;will-change:transform,opacity;}.d12eukli-dropdownMenuContent[data-state="open"]{animation-name:slideDown-d12eukli-dropdownMenuContent;}}
1
+ .d12eukli-dropdownMenuContent{overflow-y:auto;overflow-x:hidden;z-index:1001;max-height:min(var(--radix-context-menu-content-available-height), 680px);padding-top:4px;padding-bottom:4px;min-width:200px;box-shadow:var(--actionMenuShadow);border-radius:8px;background-color:var(--colorBgActionsMenu);}@keyframes slideDown-d12eukli-dropdownMenuContent{from{opacity:0;transform:translateY(-2px);}to{opacity:1;transform:translateY(0);}}@media (prefers-reduced-motion: no-preference){.d12eukli-dropdownMenuContent{animation-duration:400ms;animation-timing-function:cubic-bezier(0.16, 1, 0.3, 1);animation-fill-mode:forwards;will-change:transform,opacity;}.d12eukli-dropdownMenuContent[data-state="open"]{animation-name:slideDown-d12eukli-dropdownMenuContent;}}
2
2
  .i1a6wz4q-Item{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;letter-spacing:normal;display:flex;align-items:center;min-height:32px;outline:none;border-radius:0;padding:0px 8px;margin:0px 4px;cursor:pointer;}.i1a6wz4q-Item:hover,.i1a6wz4q-Item[data-highlighted],.i1a6wz4q-Item[aria-expanded="true"]{inset:10px 4px;margin-left:4px;margin-right:4px;background-color:var(--colorBgActionsMenuItemHover);border-radius:6px;}.i1a6wz4q-Item[data-disabled]{cursor:default;color:var(--disabledTextColor);--actions-menu-item-icon-color:var(--disabledTextColor);}.i1a6wz4q-Item[data-disabled]:hover{color:var(--disabledTextColor);background-color:var(--transparent);}.fibery-mobile .i1a6wz4q-Item{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px;line-height:1.5;font-weight:410;color:var(--textColor);min-height:44px;padding:0px 12px;}
3
3
  .cz86ubx-CheckboxItem{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:14px;line-height:1.5;font-weight:410;color:var(--textColor);text-transform:none;letter-spacing:normal;display:flex;align-items:center;min-height:32px;outline:none;border-radius:0;padding:0px 8px;margin:0px 4px;cursor:pointer;}.cz86ubx-CheckboxItem:hover,.cz86ubx-CheckboxItem[data-highlighted],.cz86ubx-CheckboxItem[aria-expanded="true"]{inset:10px 4px;margin-left:4px;margin-right:4px;background-color:var(--colorBgActionsMenuItemHover);border-radius:6px;}.cz86ubx-CheckboxItem[data-disabled]{cursor:default;color:var(--disabledTextColor);--actions-menu-item-icon-color:var(--disabledTextColor);}.cz86ubx-CheckboxItem[data-disabled]:hover{color:var(--disabledTextColor);background-color:var(--transparent);}.fibery-mobile .cz86ubx-CheckboxItem{font-family:"Inter Variable","SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI Variable Display","Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px;line-height:1.5;font-weight:410;color:var(--textColor);min-height:44px;padding:0px 12px;}
4
4
  .sbtigvo-Separator{background-color:var(--actionMenuSeparatorColor);height:0.5px;margin:4px 0;}
@@ -6,9 +6,10 @@ var copyToClipboard = async (text) => {
6
6
  checkClipboard();
7
7
  await navigator.clipboard.writeText(text);
8
8
  };
9
+ var escapeLabel = (label) => label.replace(/\p{Cc}/gu, " ").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").trim();
9
10
  var copyUrlToClipboard = async ({ url, label }) => {
10
11
  checkClipboard();
11
- const htmlString = `<a href="${url}" target="_blank">${label || url}</a>`;
12
+ const htmlString = `<a href="${url}" target="_blank">${(label ? escapeLabel(label) : "") || url}</a>`;
12
13
  await navigator.clipboard.write([new ClipboardItem({
13
14
  "text/html": new Blob([htmlString], { type: "text/html" }),
14
15
  "text/plain": url
@@ -12,30 +12,32 @@ var AutoComplete = ({ value, timeFormat: timeFormat$1 = timeFormat, onChange, me
12
12
  const isPhone = useIsPhone();
13
13
  const options = useMemo(() => Array.from({ length: 1440 / step }, (value, index) => {
14
14
  const hour = Math.floor(index * step / 60);
15
+ const minute = index * step - hour * 60;
15
16
  const label = moment({
16
17
  hour,
17
- minute: index * step - hour * 60
18
+ minute
18
19
  }).format(timeFormat$1);
19
20
  return {
20
21
  value: label,
21
22
  label
22
23
  };
23
24
  }), [timeFormat$1]);
25
+ const selectedOption = useMemo(() => {
26
+ if (!value) return null;
27
+ const timeValue = moment(value).format(timeFormat$1);
28
+ return options.find((option) => option.value === timeValue);
29
+ }, [
30
+ value,
31
+ timeFormat$1,
32
+ options
33
+ ]);
24
34
  return /* @__PURE__ */ jsx(SelectControlSettingsProvider, {
25
35
  getPopupContainerElement: void 0,
26
36
  children: /* @__PURE__ */ jsx(Select, {
27
37
  inline: true,
28
38
  options,
29
39
  menuIsOpen,
30
- value: useMemo(() => {
31
- if (!value) return null;
32
- const timeValue = moment(value).format(timeFormat$1);
33
- return options.find((option) => option.value === timeValue);
34
- }, [
35
- value,
36
- timeFormat$1,
37
- options
38
- ]),
40
+ value: selectedOption,
39
41
  onChange,
40
42
  components: { Control: () => null },
41
43
  styles: {
@@ -1,7 +1,7 @@
1
1
  import "./date-range-input.wyw-in-js.css";
2
2
  import { IconButton } from "../button/icon-button.js";
3
- import { AntTransparentInput, AntTransparentTextArea } from "../antd/input.js";
4
3
  import Remove from "../icons/react/remove.js";
4
+ import { AntTransparentInput, AntTransparentTextArea } from "../antd/input.js";
5
5
  import { datesSeparator } from "./constants.js";
6
6
  import { formatDateInputValue, formatDateRangeInputValue, getDateRangeIntervals, getDateTimeRangeIntervals, getLocaleSpecificChrono, setTime } from "./utils.js";
7
7
  import { disabledStyle, selectedStyle } from "./styles.js";
@@ -117,12 +117,14 @@ var DateRangeInput = forwardRef(({ startValue, endValue, showTime, dateFormat, t
117
117
  }, [onReset]);
118
118
  const onSaveValue = useCallback((e) => {
119
119
  e.preventDefault();
120
- if (inputValue === "") if (allowClear) onClear();
121
- else setInputValue(formatDateRangeInputValue(startValue, endValue, {
122
- showTime,
123
- dateFormat,
124
- dateTimeFormat
125
- }));
120
+ if (inputValue === "") {
121
+ if (allowClear) onClear();
122
+ else setInputValue(formatDateRangeInputValue(startValue, endValue, {
123
+ showTime,
124
+ dateFormat,
125
+ dateTimeFormat
126
+ }));
127
+ }
126
128
  const [result] = getLocaleSpecificChrono(dateFormat).parse(inputValue.replace(datesSeparator, " - "));
127
129
  let start;
128
130
  let end;
@@ -63,8 +63,6 @@ var DayWithStartEndButtons = (props) => {
63
63
  e.preventDefault();
64
64
  e.stopPropagation();
65
65
  focusEndOfWeek();
66
- break;
67
- default: break;
68
66
  }
69
67
  dayPicker.onDayKeyDown?.(props.date, dayRender.activeModifiers, e);
70
68
  };
@@ -1,9 +1,11 @@
1
1
  import { eachDayOfInterval, endOfMonth, getISODay, startOfMonth } from "date-fns";
2
2
  //#region src/date-picker/get-weekends-for-month.ts
3
3
  var getWeekendsForMonth = (date, weekends) => {
4
+ const start = startOfMonth(date);
5
+ const end = endOfMonth(date);
4
6
  return eachDayOfInterval({
5
- start: startOfMonth(date),
6
- end: endOfMonth(date)
7
+ start,
8
+ end
7
9
  }).filter((date) => weekends.includes(getISODay(date)));
8
10
  };
9
11
  //#endregion
@@ -54,8 +54,10 @@ var RelativeDatePicker = (props) => {
54
54
  const [amount, setAmount] = useState(valueWithDefault.amount);
55
55
  const onAmountChange = useCallback((newAmount) => {
56
56
  if (newAmount === null) return;
57
- if (newAmount < 0) setAmount(0);
58
- else setAmount(Math.floor(newAmount));
57
+ const numericAmount = Number(newAmount);
58
+ if (!Number.isFinite(numericAmount)) return;
59
+ if (numericAmount < 0) setAmount(0);
60
+ else setAmount(Math.floor(numericAmount));
59
61
  }, []);
60
62
  const onKeyDown = useCallback((e) => {
61
63
  if (e.key === "Enter") {
@@ -63,7 +65,7 @@ var RelativeDatePicker = (props) => {
63
65
  ...valueWithDefault,
64
66
  amount
65
67
  });
66
- e.target.blur();
68
+ e.currentTarget.blur();
67
69
  }
68
70
  }, [
69
71
  amount,
@@ -1,7 +1,7 @@
1
1
  import "./single-date-input.wyw-in-js.css";
2
2
  import { IconButton } from "../button/icon-button.js";
3
- import { AntTransparentInput } from "../antd/input.js";
4
3
  import Remove from "../icons/react/remove.js";
4
+ import { AntTransparentInput } from "../antd/input.js";
5
5
  import { formatDateInputValue, getLocaleSpecificChrono, getTimeIntervals, setTime } from "./utils.js";
6
6
  import { disabledStyle, selectedStyle } from "./styles.js";
7
7
  import { AutoComplete } from "./autocomplete.js";
@@ -71,12 +71,14 @@ var SingleDateInput = forwardRef(({ value, showTime, dateFormat, timeFormat, dat
71
71
  }, [onChange]);
72
72
  const onSaveValue = useCallback((e) => {
73
73
  e.preventDefault();
74
- if (inputValue === "") if (allowClear) onClear();
75
- else setInputValue(formatDateInputValue(value, {
76
- showTime,
77
- dateFormat,
78
- dateTimeFormat
79
- }));
74
+ if (inputValue === "") {
75
+ if (allowClear) onClear();
76
+ else setInputValue(formatDateInputValue(value, {
77
+ showTime,
78
+ dateFormat,
79
+ dateTimeFormat
80
+ }));
81
+ }
80
82
  const [result] = getLocaleSpecificChrono(dateFormat).parse(inputValue);
81
83
  if (result && result.start) {
82
84
  const newValue = result.start.date();
@@ -1,8 +1,7 @@
1
- import { $TSFixMe } from "../tsfixme.js";
2
1
  import { ControlledDatePickerProps, RelativeDateValue, SingleDatePickerPopoverContentProps, SingleDatePickerProps } from "./types.js";
3
2
  import "react-day-picker/dist/style.css";
4
3
  //#region src/date-picker/single-date-picker.d.ts
5
- declare const isRelativeDatePlaceholder: (value: $TSFixMe) => boolean;
4
+ declare const isRelativeDatePlaceholder: (value: unknown) => value is RelativeDateValue;
6
5
  declare const formatRelativeDate: (value: RelativeDateValue) => string;
7
6
  type UncontrolledSingleDatePickerProps<IsRelativeDate extends boolean = false> = Omit<SingleDatePickerProps<IsRelativeDate>, keyof ControlledDatePickerProps>;
8
7
  interface SingleDatePickerWithForwardRefType extends React.FC<SingleDatePickerProps<boolean>> {
@@ -22,7 +22,8 @@ import { focusable } from "tabbable";
22
22
  var tabItemClassName = "tg67n1g-tabItem";
23
23
  var tabNavLinkClassName = "t17qtdvh-tabNavLink";
24
24
  var isRelativeDatePlaceholder = (value) => {
25
- return value !== null && Object.hasOwn(value, "isBeforeNow") && Object.hasOwn(value, "unit") && Object.hasOwn(value, "amount");
25
+ if (typeof value !== "object" || value === null) return false;
26
+ return Object.hasOwn(value, "isBeforeNow") && Object.hasOwn(value, "unit") && Object.hasOwn(value, "amount");
26
27
  };
27
28
  var formatRelativeDate = (value) => {
28
29
  if (value.amount === 0) return "today";
@@ -1,4 +1,3 @@
1
- import { $TSFixMe } from "../tsfixme.js";
2
1
  import { ReactNode } from "react";
3
2
  import { Moment, unitOfTime } from "moment";
4
3
  //#region src/date-picker/types.d.ts
@@ -24,7 +23,7 @@ type DatePickerCommonProps = {
24
23
  children?: JSX.Element;
25
24
  allowClear?: boolean;
26
25
  disabled?: boolean;
27
- onKeyDown?: React.KeyboardEventHandler<$TSFixMe>;
26
+ onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
28
27
  placeholder: string;
29
28
  weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined;
30
29
  dateFormat?: string;
@@ -5,9 +5,10 @@ import { RoundToggleButton } from "../toggle-button/round-toggle-button.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  //#region src/day-select/day-select.tsx
7
7
  function DaySelect({ value = [], onChange, days, allowEmpty = false }) {
8
+ const stringifiedValue = value.map((v) => v.toString());
8
9
  return /* @__PURE__ */ jsx(ToggleButtonGroup, {
9
10
  type: "multiple",
10
- value: value.map((v) => v.toString()),
11
+ value: stringifiedValue,
11
12
  onValueChange: (v) => {
12
13
  if (v.length === 0 && !allowEmpty) return;
13
14
  onChange(v.map(Number));
@@ -9,11 +9,11 @@ declare enum Days {
9
9
  SA = 5,
10
10
  SU = 6
11
11
  }
12
- declare const getDays: ((arg: unknown) => {
12
+ declare const getDays: ((arg: number) => {
13
13
  key: string;
14
14
  title: string;
15
15
  value: Days;
16
- }[]) & import("@fibery/helpers/src/_").MemoizedFunction<unknown, {
16
+ }[]) & import("@fibery/helpers/src/_").MemoizedFunction<number, {
17
17
  key: string;
18
18
  title: string;
19
19
  value: Days;
@@ -1,5 +1,5 @@
1
1
  import { DaySelect } from "./day-select.js";
2
- import { memoize } from "@fibery/helpers/src/_";
2
+ import { memoizeLeak } from "@fibery/helpers/src/_";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  //#region src/day-select/week-day-select.tsx
5
5
  var Days = /* @__PURE__ */ function(Days) {
@@ -21,7 +21,7 @@ var WeekDayMap = {
21
21
  SA: 5,
22
22
  SU: 6
23
23
  };
24
- var getDays = memoize((firstDay) => {
24
+ var getDays = memoizeLeak((firstDay) => {
25
25
  const entries = Object.entries(WeekDayMap);
26
26
  const firstDayIndex = entries.findIndex((entry) => entry[1] === firstDay);
27
27
  const partA = entries.slice(firstDayIndex);
@@ -35,10 +35,11 @@ var getDays = memoize((firstDay) => {
35
35
  });
36
36
  });
37
37
  function WeekdaySelect({ value = [], onChange, firstDay }) {
38
+ const days = getDays(firstDay);
38
39
  return /* @__PURE__ */ jsx(DaySelect, {
39
40
  value,
40
41
  onChange,
41
- days: getDays(firstDay)
42
+ days
42
43
  });
43
44
  }
44
45
  //#endregion
@@ -10,6 +10,8 @@ declare const opacity: {
10
10
  readonly opacity70: 0.7;
11
11
  readonly opacity65: 0.65;
12
12
  readonly opacity60: 0.6;
13
+ readonly opacity59: 0.59;
14
+ readonly opacity57: 0.57;
13
15
  readonly opacity55: 0.55;
14
16
  readonly opacity50: 0.5;
15
17
  readonly opacity45: 0.45;
@@ -18,9 +20,13 @@ declare const opacity: {
18
20
  readonly opacity30: 0.3;
19
21
  readonly opacity25: 0.25;
20
22
  readonly opacity20: 0.2;
23
+ readonly opacity18: 0.18;
21
24
  readonly opacity15: 0.15;
25
+ readonly opacity14: 0.14;
22
26
  readonly opacity10: 0.1;
27
+ readonly opacity9: 0.09;
23
28
  readonly opacity5: 0.05;
29
+ readonly opacity3: 0.03;
24
30
  readonly opacity0: 0;
25
31
  };
26
32
  type AlphaValue = (typeof opacity)[keyof typeof opacity];
@@ -1,5 +1,5 @@
1
1
  import { produceColor } from "../color-utils.js";
2
- import { memoize } from "@fibery/helpers/src/_";
2
+ import { memoizeColor } from "../memoize.js";
3
3
  //#region src/design-system/alpha.ts
4
4
  var transparent = "rgba(255, 255, 255, 0)";
5
5
  var opacity = {
@@ -12,6 +12,8 @@ var opacity = {
12
12
  opacity70: .7,
13
13
  opacity65: .65,
14
14
  opacity60: .6,
15
+ opacity59: .59,
16
+ opacity57: .57,
15
17
  opacity55: .55,
16
18
  opacity50: .5,
17
19
  opacity45: .45,
@@ -20,17 +22,19 @@ var opacity = {
20
22
  opacity30: .3,
21
23
  opacity25: .25,
22
24
  opacity20: .2,
25
+ opacity18: .18,
23
26
  opacity15: .15,
27
+ opacity14: .14,
24
28
  opacity10: .1,
29
+ opacity9: .09,
25
30
  opacity5: .05,
31
+ opacity3: .03,
26
32
  opacity0: 0
27
33
  };
28
34
  var defineAlphaCoefficient = (value) => value;
29
- var alpha = memoize((color, alpha) => {
30
- return produceColor(color, (oklch) => ({
31
- ...oklch,
32
- alpha
33
- }));
34
- }, (a, b) => a + b);
35
+ var alpha = memoizeColor((color, alpha) => produceColor(color, (oklch) => ({
36
+ ...oklch,
37
+ alpha
38
+ })), (color, alpha) => `${color}/${alpha}`);
35
39
  //#endregion
36
40
  export { alpha, defineAlphaCoefficient, opacity, transparent };
@@ -0,0 +1,4 @@
1
+ //#region src/design-system/colors-charts.d.ts
2
+ declare const palette: readonly ["#B2E5DC", "#F0939B", "#F4C19F", "#F9DE86", "#97C397", "#BBDCFB", "#C5B6ED", "#FDD8E8", "#57BCCC"];
3
+ //#endregion
4
+ export { palette };
@@ -0,0 +1,14 @@
1
+ //#region src/design-system/colors-charts.ts
2
+ var palette = [
3
+ "#B2E5DC",
4
+ "#F0939B",
5
+ "#F4C19F",
6
+ "#F9DE86",
7
+ "#97C397",
8
+ "#BBDCFB",
9
+ "#C5B6ED",
10
+ "#FDD8E8",
11
+ "#57BCCC"
12
+ ];
13
+ //#endregion
14
+ export { palette };
@@ -1,12 +1,10 @@
1
1
  import { ThemeMode } from "../theme-settings-core.js";
2
2
  //#region src/design-system/colors-js.d.ts
3
3
  declare const getDarkenColor: ((arg: string) => string) & import("@fibery/helpers/src/_").MemoizedFunction<string, string>;
4
- /** @deprecated identity for a while. inline */
5
- declare const getTextColor: ((arg: string) => string) & import("@fibery/helpers/src/_").MemoizedFunction<string, string>;
6
- declare const getObjectColorMemoized: ((arg: string | null | undefined) => string) & import("@fibery/helpers/src/_").MemoizedFunction<string | null | undefined, string>;
4
+ declare function getObjectColor(name: string | null | undefined): string;
7
5
  declare function makeSelect(mode: ThemeMode): <T>(values: {
8
6
  light: T;
9
7
  dark: T;
10
8
  }) => T;
11
9
  //#endregion
12
- export { getDarkenColor, getObjectColorMemoized, getTextColor, makeSelect };
10
+ export { getDarkenColor, getObjectColor, makeSelect };
@@ -1,9 +1,9 @@
1
- import { cssFromUnsafe, produceColor } from "../color-utils.js";
2
- import { memoize } from "@fibery/helpers/src/_";
1
+ import { produceColor } from "../color-utils.js";
2
+ import { memoizeColor } from "../memoize.js";
3
3
  import { clampChroma } from "culori";
4
4
  import ColorHash from "color-hash";
5
5
  //#region src/design-system/colors-js.ts
6
- var getDarkenColor = memoize((color) => {
6
+ var getDarkenColor = memoizeColor((color) => {
7
7
  return produceColor(color, (oklch) => {
8
8
  return clampChroma({
9
9
  ...oklch,
@@ -12,12 +12,7 @@ var getDarkenColor = memoize((color) => {
12
12
  }, "oklch");
13
13
  });
14
14
  });
15
- /** @deprecated identity for a while. inline */
16
- var getTextColor = memoize((color) => {
17
- return cssFromUnsafe(color);
18
- });
19
- var getObjectColorMemoized = memoize((name) => {
20
- if (!name) return "#999999";
15
+ var getObjectColorMemoized = memoizeColor((name) => {
21
16
  return new ColorHash({
22
17
  lightness: [
23
18
  .5,
@@ -33,6 +28,9 @@ var getObjectColorMemoized = memoize((name) => {
33
28
  ]
34
29
  }).hex(name);
35
30
  });
31
+ function getObjectColor(name) {
32
+ return name ? getObjectColorMemoized(name) : "#999999";
33
+ }
36
34
  function makeSelect(mode) {
37
35
  return function select(values) {
38
36
  if (mode in values) return values[mode];
@@ -40,4 +38,4 @@ function makeSelect(mode) {
40
38
  };
41
39
  }
42
40
  //#endregion
43
- export { getDarkenColor, getObjectColorMemoized, getTextColor, makeSelect };
41
+ export { getDarkenColor, getObjectColor, makeSelect };