@fibery/ui-kit 9.0.2 → 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.
- package/lib/a11y-color.js +12 -10
- package/lib/actions-menu/actions-menu-props.d.ts +2 -0
- package/lib/actions-menu/actions-menu-sub-command-menu.js +5 -4
- package/lib/actions-menu/actions-menu.d.ts +1 -1
- package/lib/actions-menu/actions-menu.js +2 -1
- package/lib/actions-menu/contexts/actions-menu-context.js +12 -11
- package/lib/ai/max-tokens.js +6 -5
- package/lib/antd/ant-modal.d.ts +1 -1
- package/lib/antd/ant-modal.js +28 -1
- package/lib/antd/ant-upload.d.ts +1 -1
- package/lib/antd/ant-upload.js +23 -18
- package/lib/antd/input.js +5 -4
- package/lib/antd/utils.js +2 -1
- package/lib/avatar-colors.js +1 -1
- package/lib/avatar.d.ts +1 -10
- package/lib/avatar.js +48 -38
- package/lib/avatar.wyw-in-js.css +1 -1
- package/lib/banner/banner-action.js +2 -1
- package/lib/button/button.js +1 -1
- package/lib/button/icon-button.js +1 -1
- package/lib/canvas-colors.js +2 -2
- package/lib/card-container.d.ts +2 -6
- package/lib/card-container.js +4 -4
- package/lib/color-filter.js +2 -2
- package/lib/color-inspect.js +1 -1
- package/lib/color-picker/color-picker-or-loader.d.ts +2 -2
- package/lib/color-utils.js +1 -1
- package/lib/comment.d.ts +1 -0
- package/lib/comment.js +29 -20
- package/lib/comment.wyw-in-js.css +9 -7
- package/lib/context-menu/index.js +1 -0
- package/lib/context-menu/index.wyw-in-js.css +1 -1
- package/lib/date-picker/autocomplete.js +12 -10
- package/lib/date-picker/date-range-input.js +8 -6
- package/lib/date-picker/day-with-start-end-buttons.js +0 -2
- package/lib/date-picker/get-weekends-for-month.js +4 -2
- package/lib/date-picker/single-date-input.js +8 -6
- package/lib/day-select/day-select.js +2 -1
- package/lib/day-select/week-day-select.d.ts +2 -2
- package/lib/day-select/week-day-select.js +4 -3
- package/lib/design-system/alpha.js +5 -7
- package/lib/design-system/colors-charts.d.ts +4 -0
- package/lib/design-system/colors-charts.js +14 -0
- package/lib/design-system/colors-js.d.ts +2 -4
- package/lib/design-system/colors-js.js +8 -10
- package/lib/design-system/fns.enum.js +7 -4
- package/lib/design-system/fns.icon.js +1 -1
- package/lib/design-system/fns.js +7 -4
- package/lib/design-system/theme.d.ts +7 -7
- package/lib/design-system/theme.js +7 -12
- package/lib/design-system/vars.js +1 -2
- package/lib/design-system.d.ts +3 -2
- package/lib/design-system.js +3 -2
- package/lib/emoji-picker/primitives/content.js +10 -9
- package/lib/emoji-picker/primitives/emoji.js +22 -14
- package/lib/emoji-picker/primitives/emoji.wyw-in-js.css +4 -3
- package/lib/emoji-picker/primitives/grid.js +0 -1
- package/lib/emoji-picker/primitives/preview-provider.js +4 -3
- package/lib/emoji-picker/primitives/root.js +10 -9
- package/lib/emoji-picker/primitives/skin-provider.js +5 -4
- package/lib/emoji-picker/stores/emoji-data-store.d.ts +2 -2
- package/lib/emoji-picker/stores/emoji-data-store.js +8 -8
- package/lib/emoji-picker/stores/static-emoji-data-store.js +2 -1
- package/lib/emoji.js +5 -2
- package/lib/fibermoji-placeholder.js +5 -7
- package/lib/field-type-icon.js +2 -1
- package/lib/file-item/file-icon.js +2 -1
- package/lib/file-item.js +3 -10
- package/lib/highlight-colors.js +2 -1
- package/lib/hotkey-scope.js +2 -1
- package/lib/icons/ast/index.d.ts +1 -4
- package/lib/icons/ast/index.js +2 -5
- package/lib/icons/ast/spinner.js +1 -14
- package/lib/icons/icon.js +4 -3
- package/lib/icons/react/index.d.ts +1 -4
- package/lib/icons/react/index.js +2 -5
- package/lib/images-gallery/get-gallery-src.js +1 -1
- package/lib/images-gallery/slide-buttons.js +8 -4
- package/lib/images-gallery/thumbnails-mime-types-white-list.js +1 -1
- package/lib/integration-compact-info-button.js +1 -1
- package/lib/loading-sausage.js +7 -6
- package/lib/mobile-drawer.d.ts +2 -1
- package/lib/mobile-drawer.js +24 -12
- package/lib/mobile-drawer.wyw-in-js.css +3 -2
- package/lib/mobile-keyboard-aware-popup.js +6 -5
- package/lib/modal-menu/contexts/modal-menu-context.d.ts +1 -0
- package/lib/modal-menu/modal-menu-content.d.ts +1 -1
- package/lib/modal-menu/modal-menu-content.js +16 -6
- package/lib/modal-menu/modal-menu-drawer-content.d.ts +7 -0
- package/lib/modal-menu/modal-menu-drawer-content.js +13 -0
- package/lib/modal-menu/modal-menu-root.d.ts +2 -1
- package/lib/modal-menu/modal-menu-root.js +24 -21
- package/lib/modal-menu/modal-submenu.js +10 -9
- package/lib/nested-menu-item.d.ts +1 -1
- package/lib/number-input/number-input-inline-with-autosize.d.ts +1 -2
- package/lib/number-input/number-input-inline-with-autosize.js +9 -6
- package/lib/number-input/number-input-inline-with-autosize.wyw-in-js.css +0 -1
- package/lib/number-input/number-input.js +13 -11
- package/lib/number-input/styles.d.ts +1 -9
- package/lib/number-input/styles.js +3 -9
- package/lib/number-input/styles.wyw-in-js.css +2 -3
- package/lib/number-input/text-area-auto-sized.d.ts +1 -2
- package/lib/number-input/text-area-auto-sized.js +2 -2
- package/lib/number-input/text-input-auto-sized.d.ts +1 -2
- package/lib/number-input/text-input-auto-sized.js +2 -2
- package/lib/online-users.js +2 -2
- package/lib/open-popover-tracker.js +7 -6
- package/lib/palettes/neutral.js +1 -1
- package/lib/palettes/warm.js +1 -1
- package/lib/phone.js +1 -1
- package/lib/popover/index.d.ts +4 -2
- package/lib/popover/index.js +61 -59
- package/lib/popover/mobile-popover-context.js +12 -11
- package/lib/popover/mobile-popover.js +16 -15
- package/lib/popover/modifiers.js +4 -4
- package/lib/preference-setting.js +6 -8
- package/lib/reactions/reaction-button.js +36 -25
- package/lib/reactions/reaction-button.wyw-in-js.css +16 -16
- package/lib/reactions/reaction-picker.js +22 -10
- package/lib/reactions/reaction-picker.wyw-in-js.css +1 -0
- package/lib/reactions/tootltip.js +2 -1
- package/lib/select/components/option.js +2 -1
- package/lib/select/index.d.ts +2 -1
- package/lib/select/select-trigger.d.ts +4 -0
- package/lib/select/select-trigger.js +25 -0
- package/lib/select/select-trigger.wyw-in-js.css +1 -0
- package/lib/select/select.d.ts +6 -2
- package/lib/select/select.js +10 -5
- package/lib/spinner.d.ts +2 -6
- package/lib/spinner.js +11 -7
- package/lib/spinner.wyw-in-js.css +1 -0
- package/lib/tab-nav/tab-nav.d.ts +4 -2
- package/lib/tab-nav/tab-nav.js +2 -2
- package/lib/thematic.js +322 -321
- package/lib/theme-provider.d.ts +1 -3
- package/lib/toast/toast-action.js +2 -1
- package/lib/toast/toast-provider.d.ts +1 -2
- package/lib/toast/toast-queue.d.ts +1 -2
- package/lib/toast/toast-queue.js +7 -8
- package/lib/toast/toast.js +7 -6
- package/lib/toggle.js +3 -3
- package/lib/tooltip-if-overflown.js +2 -1
- package/lib/tooltip.js +1 -1
- package/lib/type-badge.d.ts +8 -28
- package/lib/type-badge.js +39 -50
- package/lib/type-badge.wyw-in-js.css +11 -10
- package/lib/unit/container.d.ts +12 -0
- package/lib/unit/container.js +50 -0
- package/lib/unit/context.d.ts +29 -0
- package/lib/unit/context.js +9 -0
- package/lib/unit/index.d.ts +4 -2
- package/lib/unit/index.js +2 -1
- package/lib/unit/nav-button.d.ts +12 -0
- package/lib/unit/nav-button.js +18 -0
- package/lib/unit/styles.d.ts +6 -9
- package/lib/unit/styles.js +13 -16
- package/lib/unit/styles.wyw-in-js.css +10 -16
- package/lib/unit/unit-content-layout.d.ts +4 -3
- package/lib/unit/unit-content-layout.js +9 -9
- package/lib/unit/unit-content.d.ts +6 -5
- package/lib/unit/unit-content.js +83 -18
- package/lib/unit/unit-content.wyw-in-js.css +6 -2
- package/lib/unit/unit.d.ts +38 -5
- package/lib/unit/unit.js +43 -12
- package/lib/workflow-progress-icon.js +2 -2
- package/package.json +4 -4
- package/lib/features.d.ts +0 -8
- package/lib/features.js +0 -15
- package/lib/flags.d.ts +0 -4
- package/lib/flags.js +0 -7
- package/lib/icons/ast/alert-triangle.d.ts +0 -5
- package/lib/icons/ast/alert-triangle.js +0 -25
- package/lib/icons/ast/field-units-large.d.ts +0 -5
- package/lib/icons/ast/field-units-large.js +0 -25
- package/lib/icons/ast/plus.d.ts +0 -5
- package/lib/icons/ast/plus.js +0 -25
- package/lib/icons/react/alert-triangle.d.ts +0 -15
- package/lib/icons/react/alert-triangle.js +0 -21
- package/lib/icons/react/field-units-large.d.ts +0 -15
- package/lib/icons/react/field-units-large.js +0 -21
- package/lib/icons/react/plus.d.ts +0 -15
- package/lib/icons/react/plus.js +0 -21
- package/lib/unit/primitive.d.ts +0 -5
- package/lib/unit/primitive.js +0 -108
- package/lib/unit/primitive.wyw-in-js.css +0 -3
- package/lib/unit/types.d.ts +0 -34
- package/lib/unit/types.js +0 -0
- package/lib/unit/unit-button-group.d.ts +0 -13
- package/lib/unit/unit-button-group.js +0 -23
package/lib/icons/react/index.js
CHANGED
|
@@ -67,8 +67,8 @@ import FocusMode from "./focus-mode.js";
|
|
|
67
67
|
import FavoritesFilled from "./favorites-filled.js";
|
|
68
68
|
import Favorites from "./favorites.js";
|
|
69
69
|
import DragHandle from "./drag-handle.js";
|
|
70
|
-
import AlertTriangle from "./alert-triangle.js";
|
|
71
70
|
import CircleCheckFilled from "./circle-check-filled.js";
|
|
71
|
+
import WarningTriangleFilled from "./warning-triangle-filled.js";
|
|
72
72
|
import Remove from "./remove.js";
|
|
73
73
|
import ArrowCollapseVertical from "./arrow-collapse-vertical.js";
|
|
74
74
|
import ReactionsAdd from "./reactions-add.js";
|
|
@@ -79,7 +79,6 @@ import LoupeZoomIn from "./loupe-zoom-in.js";
|
|
|
79
79
|
import LoupeZoomOut from "./loupe-zoom-out.js";
|
|
80
80
|
import Webhooks from "./webhooks.js";
|
|
81
81
|
import Warning from "./warning.js";
|
|
82
|
-
import WarningTriangleFilled from "./warning-triangle-filled.js";
|
|
83
82
|
import Views from "./views.js";
|
|
84
83
|
import ViewTimeline from "./view-timeline.js";
|
|
85
84
|
import ViewTable from "./view-table.js";
|
|
@@ -192,7 +191,6 @@ import Print from "./print.js";
|
|
|
192
191
|
import PresentStop from "./present-stop.js";
|
|
193
192
|
import PresentPlay from "./present-play.js";
|
|
194
193
|
import Preferences from "./preferences.js";
|
|
195
|
-
import Plus from "./plus.js";
|
|
196
194
|
import Photo from "./photo.js";
|
|
197
195
|
import PeopleX from "./people-x.js";
|
|
198
196
|
import PeopleRemove from "./people-remove.js";
|
|
@@ -288,7 +286,6 @@ import Filter from "./filter.js";
|
|
|
288
286
|
import FileMultiple from "./file-multiple.js";
|
|
289
287
|
import FileCounter from "./file-counter.js";
|
|
290
288
|
import Fields from "./fields.js";
|
|
291
|
-
import FieldUnitsLarge from "./field-units-large.js";
|
|
292
289
|
import FiberyMono from "./fibery-mono.js";
|
|
293
290
|
import FavoritesOff from "./favorites-off.js";
|
|
294
291
|
import Eye from "./eye.js";
|
|
@@ -364,4 +361,4 @@ import ActivityLog from "./activity-log.js";
|
|
|
364
361
|
import ActivityFilled from "./activity-filled.js";
|
|
365
362
|
import AccessTemplate from "./access-template.js";
|
|
366
363
|
import Abort from "./abort.js";
|
|
367
|
-
export { Abort, AccessTemplate, Activity, ActivityFilled, ActivityLog, Add, AddAfter, AddBefore, AddCompact, AiAssistant, AiAssistantFilled, AiFiberyBuild,
|
|
364
|
+
export { Abort, AccessTemplate, Activity, ActivityFilled, ActivityLog, Add, AddAfter, AddBefore, AddCompact, AiAssistant, AiAssistantFilled, AiFiberyBuild, App, AppearanceAuto, AppearanceDark, AppearanceLight, Architect, ArrowBack, ArrowBarDown, ArrowBarLeft, ArrowBarRight, ArrowBarUp, ArrowCollapse, ArrowCollapseVertical, ArrowDown, ArrowForward, ArrowLeft, ArrowRight, ArrowSend, ArrowUp, ArrowUpCircle, ArrowsRightLeft, AskForInput, Asterisk, Atom, Avatar, Backlog, BellCircle, BellOff, BellRinging, BellX, BringForward, BringToFront, Build, Cards, ChatBubble, ChatFloat, ChatSidebar, Checked, CircleCheck, CircleCheckFilled, CircleCross, CircleCrossFilled, CircleInfo, CircleInfoFilled, CirclePause, CirclePlay, Clear, ClearInputFilled, Clock, ClockAlarm, ClockForward, Close, CollapseAll, CollapseAllHorizontal, ColorCoding, Columns, Columns2, Columns4, CommentBubble, Comments, Copy, CreditsFilled, Crosshair, Database, DatabaseAdd, DatabaseOutline, DateRange, Delete, DragBlockHandle, DragHandle, Duplicate, DynamicFilterValue, Email, EmojiDelete, EntityCreate, EntityCreateFilled, EntityMerge, Equation, ExpandAll, ExpandAllHorizontal, Export, Eye, EyeOff, Favorites, FavoritesFilled, FavoritesOff, FiberyMono, Fields, FileArchive, FileCounter, FileDocument, FileDownload, FileImage, FileMultiple, FileOther, FilePresentation, FileTable, FileUpload, FileVideo, Files, Filter, FitToScreen, FocusMode, FocusModeOff, Folder, FolderFavorite, FolderSmart, FormWithCover, FormWithoutCover, FullscreenModeOff, FullscreenModeOn, Gift, GlobeSimple, GlobeUnpublish, GoTo, GraduationCapFilled, GroupAdd, Headphones, HeadphonesAi, Highlights, Hint, Home, HomeFilled, ImageError, Import, ImportFilled, Integration, IntegrationAdd, IntegrationDiscourse, IntegrationFibery, IntegrationFigma, IntegrationGithub, IntegrationGitlab, IntegrationGoogleDrive, IntegrationGoogleMap, IntegrationIntercom, IntegrationJira, IntegrationLoom, IntegrationMiro, IntegrationMixpanel, IntegrationSlack, IntegrationSuggest, IntegrationTwitter, IntegrationUnsplash, IntegrationYoutube, IntegrationZendesk, IntegrationsFilled, Items, ItemsTimeline, Key, KeyboardHideDown, Lab, LayoutDouble, LayoutMultiple, LayoutSingle, Levels, Limits, LineDivider, LineJump, Link, LocationEdit, Lock, LockFilled, Logout, LoupeZoomIn, LoupeZoomOut, MapMode, Markdown, MenuCollapser, Mermaid, MessagePlus, Milestones, Minus, MirrorOff, MirrorOn, Monitor, More, MoreCompact, MoveDown, MoveLeft, MoveRight, MoveUp, NoBorder, NoFill, ObjChild, ObjM2M, ObjO2O, ObjParent, ObjSelf, OnSchedule, OpenInPanel, OpenLink, PageRegularMode, PageWideMode, PanelAdd, Pencil, People, PeopleAll, PeopleCheck, PeopleEdit, PeopleGroup, PeopleGroupRemove, PeopleInvite, PeopleRemove, PeopleRole, PeopleX, Photo, Pin, PinFilled, Preferences, PresentPlay, PresentStop, Print, PrivateItems, Propagate, Question, ReactionsAdd, ReadOnly, Redo, References, Refresh, Remove, ResetPassword, RicheditorBlockCallout, RicheditorBlockCode, RicheditorBlockEmbed, RicheditorBlockEntity, RicheditorBlockFile, RicheditorBlockH1, RicheditorBlockH2, RicheditorBlockH3, RicheditorBlockH4, RicheditorBlockMention, RicheditorBlockParagraph, RicheditorBlockQuote, RicheditorChecklistCreate, RicheditorImage, RicheditorImageAlignCenter, RicheditorImageAlignLeft, RicheditorImageAlignRight, RicheditorLinkedhighlightCreate, RicheditorListBullet, RicheditorListIndent, RicheditorListOrdered, RicheditorListUnindent, RicheditorMarkCode, RicheditorMarkEm, RicheditorMarkHighlight, RicheditorMarkStrike, RicheditorMarkStrong, RicheditorMarkTextBackgroundColor, RicheditorMarkUnderline, RicheditorTableCreate, RicheditorVideoUpload, Rows, Rule, Search, SearchAdd, SearchFilled, SearchRemove, SelfReferenceOff, SelfReferenceOn, SendBackward, SendToBack, Settings, SettingsFilled, Share, ShieldKeyhole, ShowAuthor, SimpleCompass, SlideMenu, SlideMenuFilled, Sort, SpaceAdd, SpaceApp, SpaceGenerate, SpaceMove, SpaceScratch, SpaceTemplate, Spinner, SwitchToText, SwitchToWidget, TableLayout, Templates, TemplatesFilled, Terminal, TextNoWrap, TextToolAlignBottom, TextToolAlignMiddle, TextToolAlignTop, TextWrap, Toc, TypeButton, TypeCheckbox, TypeDate, TypeEmail, TypeEmoji, TypeFormula, TypeLocation, TypeLookup, TypeMoney, TypeMultiSelect, TypeNumber, TypePercent, TypePhone, TypeRelation, TypeRichText, TypeSingleSelect, TypeText, Undo, UnitsAvatar, UnitsCollection, UnitsCounter, UnitsDate, UnitsField, UnitsFieldIconButton, UnitsInput, UnitsNormal, UnitsProgressBar, UnitsRichText, UnitsSnippet, Unlink, Unlock, UnlockFilled, UsbFlashDrive, ValueClear, ValueEdit, ViewAi, ViewApp, ViewBoard, ViewCalendar, ViewCanvas, ViewChart, ViewDashboard, ViewDetails, ViewDocument, ViewEmbed, ViewFeed, ViewForm, ViewGallery, ViewGantt, ViewList, ViewMap, ViewPage, ViewTable, ViewTimeline, Views, Warning, WarningTriangle, WarningTriangleFilled, Webhooks, Workflow };
|
|
@@ -2,7 +2,7 @@ import { thumbnailsMimeTypesWhiteList } from "./thumbnails-mime-types-white-list
|
|
|
2
2
|
//#region src/images-gallery/get-gallery-src.ts
|
|
3
3
|
function getGallerySrc({ src, contentType, contentLength, isPhone }) {
|
|
4
4
|
const isFiberyFile = src?.startsWith("/api/files");
|
|
5
|
-
if (!isPhone && isFiberyFile && contentType?.startsWith("text/") && contentLength <
|
|
5
|
+
if (!isPhone && isFiberyFile && contentType?.startsWith("text/") && contentLength < 2097152) {
|
|
6
6
|
const url = new URL(src, `${window.location}`);
|
|
7
7
|
url.searchParams.append("plain-text", "true");
|
|
8
8
|
return {
|
|
@@ -116,6 +116,7 @@ function SlideButtons({ pswp, toastQueue, items, uiHandlers }) {
|
|
|
116
116
|
}
|
|
117
117
|
function SlideActionsMenu({ actions, uiHandlers }) {
|
|
118
118
|
const [container, setContainer] = useState();
|
|
119
|
+
const isPhone = isPhoneMode();
|
|
119
120
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(ActionsMenu, {
|
|
120
121
|
modal: true,
|
|
121
122
|
onOpenChange: (value) => {
|
|
@@ -124,7 +125,7 @@ function SlideActionsMenu({ actions, uiHandlers }) {
|
|
|
124
125
|
contentStyles: "c1fnnhcm-content",
|
|
125
126
|
container,
|
|
126
127
|
trigger: /* @__PURE__ */ jsx(ActionsButtonCompact, {
|
|
127
|
-
size:
|
|
128
|
+
size: isPhone ? "large" : "medium",
|
|
128
129
|
color: "neutral",
|
|
129
130
|
variant: "soft"
|
|
130
131
|
}),
|
|
@@ -133,8 +134,9 @@ function SlideActionsMenu({ actions, uiHandlers }) {
|
|
|
133
134
|
}
|
|
134
135
|
function ShareButton({ pswp, showUI }) {
|
|
135
136
|
const toast = useToast();
|
|
137
|
+
const isPhone = isPhoneMode();
|
|
136
138
|
return /* @__PURE__ */ jsx(IconButton, {
|
|
137
|
-
size:
|
|
139
|
+
size: isPhone ? "large" : "medium",
|
|
138
140
|
color: "neutral",
|
|
139
141
|
variant: "soft",
|
|
140
142
|
onClick: () => {
|
|
@@ -162,7 +164,8 @@ function ZoomButton({ pswp, showUI }) {
|
|
|
162
164
|
const slide = pswp.currSlide;
|
|
163
165
|
if (!slide) return;
|
|
164
166
|
setIsVisible(slide.zoomLevels.fit !== 1);
|
|
165
|
-
|
|
167
|
+
const zoomed = slide.currZoomLevel > slide.zoomLevels.fit;
|
|
168
|
+
setZoomed(zoomed);
|
|
166
169
|
}
|
|
167
170
|
pswp.on("afterInit", handleZoomChange);
|
|
168
171
|
pswp.on("zoomPanUpdate", handleZoomChange);
|
|
@@ -186,6 +189,7 @@ function ZoomButton({ pswp, showUI }) {
|
|
|
186
189
|
}
|
|
187
190
|
function CopyURLButton({ pswp, showUI }) {
|
|
188
191
|
const toast = useToast();
|
|
192
|
+
const isPhone = isPhoneMode();
|
|
189
193
|
return /* @__PURE__ */ jsx(Button, {
|
|
190
194
|
onClick: () => {
|
|
191
195
|
showUI();
|
|
@@ -204,7 +208,7 @@ function CopyURLButton({ pswp, showUI }) {
|
|
|
204
208
|
subTitle: error.message
|
|
205
209
|
}));
|
|
206
210
|
},
|
|
207
|
-
size:
|
|
211
|
+
size: isPhone ? "large" : "medium",
|
|
208
212
|
variant: "soft",
|
|
209
213
|
color: "neutral",
|
|
210
214
|
iconStart: jsx(Link, {}),
|
|
@@ -2,8 +2,8 @@ import "./integration-compact-info-button.wyw-in-js.css";
|
|
|
2
2
|
import { textClasses } from "./design-system/typography.js";
|
|
3
3
|
import { useTheme } from "./theme-provider.js";
|
|
4
4
|
import { Tooltip } from "./tooltip.js";
|
|
5
|
-
import { BaseButton } from "./button/base-button.js";
|
|
6
5
|
import { Spinner } from "./spinner.js";
|
|
6
|
+
import { BaseButton } from "./button/base-button.js";
|
|
7
7
|
import WarningTriangle from "./icons/react/warning-triangle.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
package/lib/loading-sausage.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import "./loading-sausage.wyw-in-js.css";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { memoize } from "@fibery/helpers/src/_";
|
|
4
3
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
4
|
import { memo, useState } from "react";
|
|
6
5
|
import cx from "classnames";
|
|
7
6
|
import { styled } from "@linaria/react";
|
|
8
7
|
//#region src/loading-sausage.tsx
|
|
9
|
-
var getRandomWithSeed =
|
|
8
|
+
var getRandomWithSeed = (seed) => {
|
|
10
9
|
const x = Math.sin(seed + 1) * 1e4;
|
|
11
10
|
return x - Math.floor(x);
|
|
12
|
-
}
|
|
11
|
+
};
|
|
13
12
|
var getRandomInt = (min, max, seed) => {
|
|
14
|
-
const random = seed ? getRandomWithSeed(seed) : Math.random();
|
|
13
|
+
const random = seed !== void 0 ? getRandomWithSeed(seed) : Math.random();
|
|
15
14
|
return Math.floor(random * (max - min + 1)) + min;
|
|
16
15
|
};
|
|
17
16
|
var loadingSausageStyle = "l16t34ge-loadingSausage";
|
|
@@ -39,9 +38,11 @@ var LoadingSausage = memo(function LoadingSausage({ minWidth = 80, maxWidth = 12
|
|
|
39
38
|
});
|
|
40
39
|
var LoadingSausageList = memo(function LoadingSausageList({ amount, minAmount = 1, maxAmount = 1, WrapperComponent, ...restProps }) {
|
|
41
40
|
const calculatedAmount = amount || getRandomInt(minAmount, maxAmount);
|
|
42
|
-
|
|
41
|
+
const list = new Array(calculatedAmount).fill(null);
|
|
42
|
+
return /* @__PURE__ */ jsx(Fragment, { children: list.map((_, index) => {
|
|
43
|
+
const style = { opacity: (calculatedAmount - index) / calculatedAmount };
|
|
43
44
|
return /* @__PURE__ */ jsx("div", {
|
|
44
|
-
style
|
|
45
|
+
style,
|
|
45
46
|
children: WrapperComponent ? /* @__PURE__ */ jsx(WrapperComponent, { children: /* @__PURE__ */ jsx(LoadingSausage, {
|
|
46
47
|
index: index + 1,
|
|
47
48
|
...restProps
|
package/lib/mobile-drawer.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, Ref } from "react";
|
|
2
2
|
//#region src/mobile-drawer.d.ts
|
|
3
|
-
declare function MobileDrawer({ open, onOpenChange, title, trigger, triggerRef, children }: {
|
|
3
|
+
declare function MobileDrawer({ open, onOpenChange, title, trigger, triggerRef, onNavigateBack, children }: {
|
|
4
4
|
open: boolean;
|
|
5
5
|
onOpenChange: (open: boolean) => void;
|
|
6
6
|
title: string;
|
|
7
7
|
trigger?: ReactElement;
|
|
8
8
|
triggerRef?: Ref<HTMLDivElement>;
|
|
9
|
+
onNavigateBack?: () => void;
|
|
9
10
|
children: ReactNode;
|
|
10
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
//#endregion
|
package/lib/mobile-drawer.js
CHANGED
|
@@ -3,6 +3,7 @@ import { textClasses } from "./design-system/typography.js";
|
|
|
3
3
|
import { ThemeProvider } from "./theme-provider.js";
|
|
4
4
|
import { IconButton } from "./button/icon-button.js";
|
|
5
5
|
import Close from "./icons/react/close.js";
|
|
6
|
+
import ArrowLeft from "./icons/react/arrow-left.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import cx from "classnames";
|
|
@@ -13,9 +14,10 @@ var overlayClassName = "ojyfzum-overlay";
|
|
|
13
14
|
var contentClassName = "c1vy11tb-content";
|
|
14
15
|
var handleClassName = "h18829ip-handle";
|
|
15
16
|
var headerClassName = "hosmc1y-header";
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
|
|
17
|
+
var headerWithBackClassName = "huxrkcm-headerWithBack";
|
|
18
|
+
var titleClassName = "t1hd7yu8-title";
|
|
19
|
+
var bodyClassName = "b1j7dhvd-body";
|
|
20
|
+
function MobileDrawer({ open, onOpenChange, title, trigger, triggerRef, onNavigateBack, children }) {
|
|
19
21
|
return /* @__PURE__ */ jsxs(Drawer.Root, {
|
|
20
22
|
open,
|
|
21
23
|
onOpenChange,
|
|
@@ -32,15 +34,25 @@ function MobileDrawer({ open, onOpenChange, title, trigger, triggerRef, children
|
|
|
32
34
|
children: [
|
|
33
35
|
/* @__PURE__ */ jsx(Drawer.Handle, { className: handleClassName }),
|
|
34
36
|
/* @__PURE__ */ jsxs("div", {
|
|
35
|
-
className: headerClassName,
|
|
36
|
-
children: [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
className: cx(headerClassName, onNavigateBack && headerWithBackClassName),
|
|
38
|
+
children: [
|
|
39
|
+
onNavigateBack ? /* @__PURE__ */ jsx(IconButton, {
|
|
40
|
+
onClick: onNavigateBack,
|
|
41
|
+
size: "xLarge",
|
|
42
|
+
"aria-label": "Back",
|
|
43
|
+
children: /* @__PURE__ */ jsx(ArrowLeft, {})
|
|
44
|
+
}) : null,
|
|
45
|
+
/* @__PURE__ */ jsx(Drawer.Title, {
|
|
46
|
+
className: cx(textClasses.heading3, titleClassName),
|
|
47
|
+
children: title
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx(IconButton, {
|
|
50
|
+
onClick: () => onOpenChange(false),
|
|
51
|
+
size: "xLarge",
|
|
52
|
+
"aria-label": "Close",
|
|
53
|
+
children: /* @__PURE__ */ jsx(Close, {})
|
|
54
|
+
})
|
|
55
|
+
]
|
|
44
56
|
}),
|
|
45
57
|
/* @__PURE__ */ jsx("div", {
|
|
46
58
|
className: bodyClassName,
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
.c1vy11tb-content{position:fixed;left:0;right:0;bottom:0;z-index:1002;display:grid;grid-template-rows:auto 60px 1fr;height:calc(100% - var(--safe-area-inset-top) - 24px);background:var(--actionMenuBg);border-top-left-radius:16px;border-top-right-radius:16px;}
|
|
3
3
|
.h18829ip-handle{margin:8px auto 0;width:36px;height:4px;border-radius:2px;background:var(--borderSeparator);}
|
|
4
4
|
.hosmc1y-header{display:flex;align-items:center;gap:8px;padding:8px 8px 8px 20px;min-width:0;}
|
|
5
|
-
.
|
|
6
|
-
.
|
|
5
|
+
.huxrkcm-headerWithBack{padding-left:4px;}
|
|
6
|
+
.t1hd7yu8-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;}
|
|
7
|
+
.b1j7dhvd-body{border-top:var(--borderSeparatorDimmed);min-width:0;min-height:0;overflow-y:auto;padding-bottom:var(--safe-area-inset-bottom);display:flex;flex-direction:column;}
|
|
@@ -36,13 +36,14 @@ function MobileKeyboardAwarePopup({ children, className }) {
|
|
|
36
36
|
viewport.removeEventListener("resize", viewportHandler);
|
|
37
37
|
};
|
|
38
38
|
}, []);
|
|
39
|
+
const res = /* @__PURE__ */ jsx("div", {
|
|
40
|
+
ref,
|
|
41
|
+
className: cx("c1fufpc2", className),
|
|
42
|
+
children
|
|
43
|
+
});
|
|
39
44
|
return createPortal(/* @__PURE__ */ jsx(ThemeProvider, {
|
|
40
45
|
portal: true,
|
|
41
|
-
children:
|
|
42
|
-
ref,
|
|
43
|
-
className: cx("c1fufpc2", className),
|
|
44
|
-
children
|
|
45
|
-
})
|
|
46
|
+
children: res
|
|
46
47
|
}), document.body);
|
|
47
48
|
}
|
|
48
49
|
//#endregion
|
|
@@ -3,6 +3,6 @@ import { ReactNode } from "react";
|
|
|
3
3
|
interface ModalMenuContentProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
declare const ModalMenuContent: ({ children }: ModalMenuContentProps) => import("react").
|
|
6
|
+
declare const ModalMenuContent: ({ children }: ModalMenuContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { ModalMenuContent };
|
|
@@ -2,13 +2,14 @@ import "./modal-menu-content.wyw-in-js.css";
|
|
|
2
2
|
import { MobilePopover } from "../popover/mobile-popover.js";
|
|
3
3
|
import { useModalMenu } from "./contexts/modal-menu-context.js";
|
|
4
4
|
import { getPopupContainerElement } from "../dom-utils.js";
|
|
5
|
+
import { ModalMenuDrawerContent } from "./modal-menu-drawer-content.js";
|
|
5
6
|
/* empty css */
|
|
6
7
|
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import { createPortal } from "react-dom";
|
|
8
9
|
//#region src/modal-menu/modal-menu-content.tsx
|
|
9
10
|
var ModalMenuContent = ({ children }) => {
|
|
10
|
-
const { open, title, submenuStack, setContentContainer, onOpenChange, onNavigateBack, height } = useModalMenu();
|
|
11
|
-
if (!open) return null;
|
|
11
|
+
const { open, title, variant, submenuStack, setContentContainer, onOpenChange, onNavigateBack, height } = useModalMenu();
|
|
12
|
+
if (!open && variant !== "drawer") return null;
|
|
12
13
|
const content = /* @__PURE__ */ jsx("div", {
|
|
13
14
|
ref: setContentContainer,
|
|
14
15
|
className: "c1i3syqm",
|
|
@@ -17,14 +18,23 @@ var ModalMenuContent = ({ children }) => {
|
|
|
17
18
|
children
|
|
18
19
|
})
|
|
19
20
|
});
|
|
21
|
+
const currentTitle = submenuStack.at(-1)?.title ?? title;
|
|
22
|
+
const handleNavigateBack = submenuStack.length === 0 ? void 0 : () => onNavigateBack();
|
|
23
|
+
if (variant === "drawer") return /* @__PURE__ */ jsx(ModalMenuDrawerContent, {
|
|
24
|
+
open,
|
|
25
|
+
onOpenChange: (nextOpen) => {
|
|
26
|
+
if (!nextOpen) onOpenChange(false);
|
|
27
|
+
},
|
|
28
|
+
title: currentTitle,
|
|
29
|
+
onNavigateBack: handleNavigateBack,
|
|
30
|
+
children: content
|
|
31
|
+
});
|
|
20
32
|
return createPortal(/* @__PURE__ */ jsx(MobilePopover, {
|
|
21
33
|
height,
|
|
22
|
-
title:
|
|
34
|
+
title: currentTitle,
|
|
23
35
|
content,
|
|
24
36
|
onClose: () => onOpenChange(false),
|
|
25
|
-
onNavigateBack:
|
|
26
|
-
onNavigateBack();
|
|
27
|
-
}
|
|
37
|
+
onNavigateBack: handleNavigateBack
|
|
28
38
|
}), getPopupContainerElement());
|
|
29
39
|
};
|
|
30
40
|
//#endregion
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MobileDrawer } from "../mobile-drawer.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
//#region src/modal-menu/modal-menu-drawer-content.d.ts
|
|
4
|
+
declare const LazyMobileDrawer: import("react").LazyExoticComponent<typeof MobileDrawer>;
|
|
5
|
+
declare const ModalMenuDrawerContent: (props: ComponentProps<typeof LazyMobileDrawer>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { ModalMenuDrawerContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense, lazy } from "react";
|
|
3
|
+
//#region src/modal-menu/modal-menu-drawer-content.tsx
|
|
4
|
+
var LazyMobileDrawer = lazy(async () => {
|
|
5
|
+
const { MobileDrawer } = await import("../mobile-drawer.js");
|
|
6
|
+
return { default: MobileDrawer };
|
|
7
|
+
});
|
|
8
|
+
var ModalMenuDrawerContent = (props) => /* @__PURE__ */ jsx(Suspense, {
|
|
9
|
+
fallback: null,
|
|
10
|
+
children: /* @__PURE__ */ jsx(LazyMobileDrawer, { ...props })
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ModalMenuDrawerContent };
|
|
@@ -3,11 +3,12 @@ import { ReactNode, RefObject } from "react";
|
|
|
3
3
|
interface ModalMenuRootProps {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
title?: string;
|
|
6
|
+
variant?: "popover" | "drawer";
|
|
6
7
|
height?: string;
|
|
7
8
|
contentRef?: RefObject<HTMLDivElement>;
|
|
8
9
|
onOpenChange?: (open: boolean) => void;
|
|
9
10
|
children?: ReactNode;
|
|
10
11
|
}
|
|
11
|
-
declare const ModalMenuRoot: ({ open, title, children, onOpenChange: _onOpenChange, height }: ModalMenuRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const ModalMenuRoot: ({ open, title, variant, children, onOpenChange: _onOpenChange, height }: ModalMenuRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//#endregion
|
|
13
14
|
export { ModalMenuRoot };
|
|
@@ -2,7 +2,7 @@ import { ModalMenuContextProvider } from "./contexts/modal-menu-context.js";
|
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
4
|
//#region src/modal-menu/modal-menu-root.tsx
|
|
5
|
-
var ModalMenuRoot = ({ open, title = "Actions", children, onOpenChange: _onOpenChange, height }) => {
|
|
5
|
+
var ModalMenuRoot = ({ open, title = "Actions", variant = "popover", children, onOpenChange: _onOpenChange, height }) => {
|
|
6
6
|
const [submenuStack, setSubmenuStack] = useState([]);
|
|
7
7
|
const [contentContainer, setContentContainer] = useState(null);
|
|
8
8
|
const onOpenChange = useCallback((open) => {
|
|
@@ -15,27 +15,30 @@ var ModalMenuRoot = ({ open, title = "Actions", children, onOpenChange: _onOpenC
|
|
|
15
15
|
const onNavigateBack = useCallback(() => {
|
|
16
16
|
setSubmenuStack((stack) => stack.slice(0, -1));
|
|
17
17
|
}, []);
|
|
18
|
+
const contextValue = useMemo(() => ({
|
|
19
|
+
title,
|
|
20
|
+
variant,
|
|
21
|
+
open: open ?? false,
|
|
22
|
+
submenuStack,
|
|
23
|
+
contentContainer,
|
|
24
|
+
setContentContainer,
|
|
25
|
+
onOpenChange,
|
|
26
|
+
onOpenSubmenu,
|
|
27
|
+
onNavigateBack,
|
|
28
|
+
height
|
|
29
|
+
}), [
|
|
30
|
+
open,
|
|
31
|
+
title,
|
|
32
|
+
variant,
|
|
33
|
+
submenuStack,
|
|
34
|
+
contentContainer,
|
|
35
|
+
onOpenChange,
|
|
36
|
+
onOpenSubmenu,
|
|
37
|
+
onNavigateBack,
|
|
38
|
+
height
|
|
39
|
+
]);
|
|
18
40
|
return /* @__PURE__ */ jsx(ModalMenuContextProvider, {
|
|
19
|
-
value:
|
|
20
|
-
title,
|
|
21
|
-
open: open ?? false,
|
|
22
|
-
submenuStack,
|
|
23
|
-
contentContainer,
|
|
24
|
-
setContentContainer,
|
|
25
|
-
onOpenChange,
|
|
26
|
-
onOpenSubmenu,
|
|
27
|
-
onNavigateBack,
|
|
28
|
-
height
|
|
29
|
-
}), [
|
|
30
|
-
open,
|
|
31
|
-
title,
|
|
32
|
-
submenuStack,
|
|
33
|
-
contentContainer,
|
|
34
|
-
onOpenChange,
|
|
35
|
-
onOpenSubmenu,
|
|
36
|
-
onNavigateBack,
|
|
37
|
-
height
|
|
38
|
-
]),
|
|
41
|
+
value: contextValue,
|
|
39
42
|
children
|
|
40
43
|
});
|
|
41
44
|
};
|
|
@@ -5,16 +5,17 @@ import { useId, useMemo } from "react";
|
|
|
5
5
|
var ModalSubmenu = ({ title = "Submenu", children }) => {
|
|
6
6
|
const id = useId();
|
|
7
7
|
const { depth } = useModalSubmenu();
|
|
8
|
+
const contextValue = useMemo(() => ({
|
|
9
|
+
id,
|
|
10
|
+
title,
|
|
11
|
+
depth: depth + 1
|
|
12
|
+
}), [
|
|
13
|
+
id,
|
|
14
|
+
title,
|
|
15
|
+
depth
|
|
16
|
+
]);
|
|
8
17
|
return /* @__PURE__ */ jsx(ModalSubmenuContextPovider, {
|
|
9
|
-
value:
|
|
10
|
-
id,
|
|
11
|
-
title,
|
|
12
|
-
depth: depth + 1
|
|
13
|
-
}), [
|
|
14
|
-
id,
|
|
15
|
-
title,
|
|
16
|
-
depth
|
|
17
|
-
]),
|
|
18
|
+
value: contextValue,
|
|
18
19
|
children
|
|
19
20
|
});
|
|
20
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {}
|
|
@@ -3,8 +3,7 @@ import { NumberInputProps } from "./types.js";
|
|
|
3
3
|
type Props = NumberInputProps & {
|
|
4
4
|
width?: number;
|
|
5
5
|
invalid?: boolean;
|
|
6
|
-
pill?: boolean;
|
|
7
6
|
};
|
|
8
|
-
declare const NumberInputInlineWithAutosize: ({ value, numberFormat, numberPrecision, format, autoFocus, placeholder, invalid,
|
|
7
|
+
declare const NumberInputInlineWithAutosize: ({ value, numberFormat, numberPrecision, format, autoFocus, placeholder, invalid, onFocus, onBlur, onChange, onKeyDown, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { NumberInputInlineWithAutosize };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./number-input-inline-with-autosize.wyw-in-js.css";
|
|
2
|
-
import {
|
|
2
|
+
import { UnitContainer } from "../unit/container.js";
|
|
3
|
+
import { UnitContent } from "../unit/unit-content.js";
|
|
3
4
|
import { add, sub } from "./decimal.js";
|
|
4
5
|
import { formatValue, getStep, parseValue } from "./utils.js";
|
|
5
6
|
import { Stack } from "./stack.js";
|
|
@@ -15,8 +16,7 @@ import InputNumber from "rc-input-number";
|
|
|
15
16
|
//#region src/number-input/number-input-inline-with-autosize.tsx
|
|
16
17
|
var invalidCss = "i11rhkx7-invalid";
|
|
17
18
|
var inputCss = "i1gne592-input";
|
|
18
|
-
var
|
|
19
|
-
var NumberInputInlineWithAutosize = ({ value, numberFormat, numberPrecision, format = identity, autoFocus, placeholder, invalid, pill, onFocus, onBlur, onChange = () => {}, onKeyDown, ...rest }) => {
|
|
19
|
+
var NumberInputInlineWithAutosize = ({ value, numberFormat, numberPrecision, format = identity, autoFocus, placeholder, invalid, onFocus, onBlur, onChange = () => {}, onKeyDown, ...rest }) => {
|
|
20
20
|
const [isEditing, setIsEditing] = useState(false);
|
|
21
21
|
const handleFocus = useCallback((e) => {
|
|
22
22
|
if (onFocus) onFocus(e);
|
|
@@ -54,9 +54,12 @@ var NumberInputInlineWithAutosize = ({ value, numberFormat, numberPrecision, for
|
|
|
54
54
|
return /* @__PURE__ */ jsx(Stack, {
|
|
55
55
|
bottom: jsx("div", {
|
|
56
56
|
className: hiddenCss,
|
|
57
|
-
children: /* @__PURE__ */ jsx(
|
|
57
|
+
children: /* @__PURE__ */ jsx(UnitContainer, {
|
|
58
58
|
invalid,
|
|
59
|
-
children: /* @__PURE__ */ jsx(
|
|
59
|
+
children: /* @__PURE__ */ jsx(UnitContent, {
|
|
60
|
+
truncate: true,
|
|
61
|
+
children: /* @__PURE__ */ jsx(ValueWithStepperWrapper, { children: formattedValue })
|
|
62
|
+
})
|
|
60
63
|
})
|
|
61
64
|
}),
|
|
62
65
|
top: jsx(InputNumber, {
|
|
@@ -82,7 +85,7 @@ var NumberInputInlineWithAutosize = ({ value, numberFormat, numberPrecision, for
|
|
|
82
85
|
onClick: stopPropagation,
|
|
83
86
|
wheel: false,
|
|
84
87
|
...rest,
|
|
85
|
-
className: cx(inputCss,
|
|
88
|
+
className: cx(inputCss, invalid && invalidCss)
|
|
86
89
|
})
|
|
87
90
|
});
|
|
88
91
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
|
|
2
2
|
.i1gne592-input{position:relative;min-width:36px;}.i1gne592-input input{position:relative;background-color:var(--inputBgColor);border:none;box-shadow:inset 0 0 0 1px var(--separatorColorDimmed);border-radius:6px;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:20px;font-weight:410;color:var(--textColor);text-transform:none;padding:2px 6px;margin:0;outline:none;text-wrap:normal;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}.i1gne592-input input::placeholder{color:var(--inputPlaceholderTextColor);}.i1gne592-input input:focus{box-shadow:var(--inputBorderFocusColor) inset;}.i1gne592-input .rc-input-number-input-wrap{display:grid;}.i1gne592-input .step-button{z-index:1;}.i1gne592-input.i11rhkx7-invalid input{box-shadow:var(--inputBorderWarningColor) inset;}.i1gne592-input.i11rhkx7-invalid input:hover{box-shadow:var(--inputBorderWarningColor) inset;}.i1gne592-input.i11rhkx7-invalid input:focus{box-shadow:var(--inputBorderWarningColor) inset;}
|
|
3
|
-
.plj39c8-pill input{border-radius:16px;box-shadow:inset 0 0 0 0.5px var(--separatorColorDimmed);}.plj39c8-pill input:focus{box-shadow:var(--inputBorderFocusColorThin) inset;}
|
|
@@ -24,16 +24,17 @@ var NumberInput = ({ className, value, numberFormat, numberPrecision, format, on
|
|
|
24
24
|
numberFormat,
|
|
25
25
|
onChange
|
|
26
26
|
]);
|
|
27
|
+
const formattedValue = useMemo(() => {
|
|
28
|
+
return formatValue(value, isEditing, numberFormat, format);
|
|
29
|
+
}, [
|
|
30
|
+
value,
|
|
31
|
+
isEditing,
|
|
32
|
+
numberFormat,
|
|
33
|
+
format
|
|
34
|
+
]);
|
|
27
35
|
return /* @__PURE__ */ jsx(AntInputNumber, {
|
|
28
36
|
className,
|
|
29
|
-
value:
|
|
30
|
-
return formatValue(value, isEditing, numberFormat, format);
|
|
31
|
-
}, [
|
|
32
|
-
value,
|
|
33
|
-
isEditing,
|
|
34
|
-
numberFormat,
|
|
35
|
-
format
|
|
36
|
-
]),
|
|
37
|
+
value: formattedValue,
|
|
37
38
|
onFocus: handleFocus,
|
|
38
39
|
onBlur: handleBlur,
|
|
39
40
|
onChange: handleChange,
|
|
@@ -44,11 +45,12 @@ var NumberInput = ({ className, value, numberFormat, numberPrecision, format, on
|
|
|
44
45
|
var NumberInputField = (props) => {
|
|
45
46
|
const { input, ...rest } = props;
|
|
46
47
|
const { value, onBlur, ...inputRest } = input;
|
|
48
|
+
const handleBlur = useCallback(() => {
|
|
49
|
+
onBlur(isEmpty(value) ? null : value);
|
|
50
|
+
}, [onBlur, value]);
|
|
47
51
|
return /* @__PURE__ */ jsx(NumberInput, {
|
|
48
52
|
value,
|
|
49
|
-
onBlur:
|
|
50
|
-
onBlur(isEmpty(value) ? null : value);
|
|
51
|
-
}, [onBlur, value]),
|
|
53
|
+
onBlur: handleBlur,
|
|
52
54
|
...inputRest,
|
|
53
55
|
...rest
|
|
54
56
|
});
|
|
@@ -23,14 +23,6 @@ declare const inputStyle: {
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
declare const inputCss: import("@linaria/core").LinariaClassName;
|
|
26
|
-
declare const pillInputStyle: {
|
|
27
|
-
borderRadius: 16;
|
|
28
|
-
boxShadow: string;
|
|
29
|
-
"&:focus": {
|
|
30
|
-
boxShadow: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
declare const pillInputCss: import("@linaria/core").LinariaClassName;
|
|
34
26
|
declare const textInlineStyle: {
|
|
35
27
|
textWrap: string;
|
|
36
28
|
textOverflow: string;
|
|
@@ -40,4 +32,4 @@ declare const textInlineStyle: {
|
|
|
40
32
|
declare const textInlineCss: import("@linaria/core").LinariaClassName;
|
|
41
33
|
declare const textAreaCss: import("@linaria/core").LinariaClassName;
|
|
42
34
|
//#endregion
|
|
43
|
-
export { hiddenCss, inputCss, inputStyle,
|
|
35
|
+
export { hiddenCss, inputCss, inputStyle, textAreaCss, textInlineCss, textInlineStyle };
|
|
@@ -20,19 +20,13 @@ var inputStyle = {
|
|
|
20
20
|
"&:focus": { boxShadow: `${themeVars.inputBorderFocusColor} inset` }
|
|
21
21
|
};
|
|
22
22
|
var inputCss = "ifv2880-input";
|
|
23
|
-
var pillInputStyle = {
|
|
24
|
-
borderRadius: border.radius16,
|
|
25
|
-
boxShadow: `inset 0 0 0 0.5px ${themeVars.separatorColorDimmed}`,
|
|
26
|
-
"&:focus": { boxShadow: `${themeVars.inputBorderFocusColorThin} inset` }
|
|
27
|
-
};
|
|
28
|
-
var pillInputCss = "p1rgjq48-pillInput";
|
|
29
23
|
var textInlineStyle = {
|
|
30
24
|
textWrap: "normal",
|
|
31
25
|
textOverflow: "ellipsis",
|
|
32
26
|
whiteSpace: "nowrap",
|
|
33
27
|
overflow: "hidden"
|
|
34
28
|
};
|
|
35
|
-
var textInlineCss = "
|
|
36
|
-
var textAreaCss = "
|
|
29
|
+
var textInlineCss = "t1rgjq48-textInline";
|
|
30
|
+
var textAreaCss = "t103b4ms-textArea";
|
|
37
31
|
//#endregion
|
|
38
|
-
export { hiddenCss, inputCss, inputStyle,
|
|
32
|
+
export { hiddenCss, inputCss, inputStyle, textAreaCss, textInlineCss, textInlineStyle };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
.h1ugjm3f-hidden{visibility:hidden;}
|
|
2
2
|
.ifv2880-input{position:relative;background-color:var(--inputBgColor);border:none;box-shadow:inset 0 0 0 1px var(--separatorColorDimmed);border-radius:6px;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:20px;font-weight:410;color:var(--textColor);text-transform:none;padding:2px 6px;margin:0;outline:none;}.ifv2880-input::placeholder{color:var(--inputPlaceholderTextColor);}.ifv2880-input:focus{box-shadow:var(--inputBorderFocusColor) inset;}
|
|
3
|
-
.
|
|
4
|
-
.t103b4ms-
|
|
5
|
-
.tf7r9zf-textArea{display:block;resize:none;white-space:pre-wrap;overflow:hidden;}
|
|
3
|
+
.t1rgjq48-textInline{text-wrap:normal;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}
|
|
4
|
+
.t103b4ms-textArea{display:block;resize:none;white-space:pre-wrap;overflow:hidden;}
|
|
@@ -3,8 +3,7 @@ type Props = {
|
|
|
3
3
|
width?: number;
|
|
4
4
|
invalid?: boolean;
|
|
5
5
|
autoSelect?: boolean;
|
|
6
|
-
pill?: boolean;
|
|
7
6
|
} & React.ComponentProps<"textarea">;
|
|
8
|
-
declare const TextAreaAutoSized: ({ value, placeholder, invalid, autoSelect,
|
|
7
|
+
declare const TextAreaAutoSized: ({ value, placeholder, invalid, autoSelect, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//#endregion
|
|
10
9
|
export { TextAreaAutoSized };
|