@fibery/ui-kit 9.0.2 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +2 -1
- package/lib/comment.js +44 -27
- package/lib/comment.wyw-in-js.css +11 -8
- 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 +6 -6
- 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
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
.rv145dc-reactionButton{min-width:36px;}.fibery-mobile .rv145dc-reactionButton{height:28px;padding-inline:6px;}
|
|
2
|
-
.
|
|
3
|
-
.
|
|
4
|
-
.cq405te{
|
|
5
|
-
.
|
|
6
|
-
.
|
|
7
|
-
.
|
|
8
|
-
.c2vgbrn{display:flex;
|
|
9
|
-
.c22d8hq{
|
|
10
|
-
.czoxmhd{
|
|
11
|
-
.c1s3fkw3{
|
|
12
|
-
.c1qgjat1{
|
|
13
|
-
.cfl9ju8{
|
|
14
|
-
.cciqw09{
|
|
15
|
-
.czzpq0p{
|
|
16
|
-
.cu8y17z{overflow-
|
|
17
|
-
.cred4fn{
|
|
2
|
+
.e1h22put-emojiSlot{display:flex;align-items:center;justify-content:center;}
|
|
3
|
+
.o1dzgtj7-overlay{position:absolute;z-index:10001;display:flex;flex-direction:column;inset:0;}
|
|
4
|
+
.cq405te{background-color:var(--modalBg);flex-grow:1;}
|
|
5
|
+
.c1ce8695{flex-shrink:0;height:70vh;background-color:var(--panelBg);padding-bottom:var(--safe-area-inset-bottom);}
|
|
6
|
+
.n1b4qxjg-navLink.t1taqu8p-tabButton{height:32px;}
|
|
7
|
+
.t15bt0sq-tabNavRootWithShadow{padding:0;display:flex;overflow-x:auto;scrollbar-width:none;position:relative;align-items:center;border-bottom:var(--borderSeparator);}.t15bt0sq-tabNavRootWithShadow>div{flex-grow:1;top:6px;}.t15bt0sq-tabNavRootWithShadow :not(ul) ul{gap:12px;}@keyframes detect-scroll-t15bt0sq-tabNavRootWithShadow{from,to{--can-scroll-fibery-reaction:1;}}@keyframes reveal-t15bt0sq-tabNavRootWithShadow{0%{opacity:0;}100%{opacity:1;}}.t15bt0sq-tabNavRootWithShadow::before,.t15bt0sq-tabNavRootWithShadow::after{content:"";display:block;flex-shrink:0;width:12px;height:56px;position:sticky;visibility:hidden;}@supports (animation-timeline: scroll()){.t15bt0sq-tabNavRootWithShadow{scroll-timeline:--scroll-timeline x;}.t15bt0sq-tabNavRootWithShadow::before{background:linear-gradient(to right, var(--colorBgScrollFade), transparent);}.t15bt0sq-tabNavRootWithShadow::after{background:linear-gradient(to left, var(--colorBgScrollFade), transparent);animation-direction:reverse;animation-range:calc(100% - 40px) calc(100% - 20px);}.t15bt0sq-tabNavRootWithShadow::before,.t15bt0sq-tabNavRootWithShadow::after{animation-name:reveal-t15bt0sq-tabNavRootWithShadow;animation-timeline:--scroll-timeline;animation-fill-mode:both;}.t15bt0sq-tabNavRootWithShadow::before{left:0;animation-range:1em 2em;}.t15bt0sq-tabNavRootWithShadow::after{right:0;animation-direction:reverse;animation-range:calc(100% - 2em) calc(100% - 1em);}.t15bt0sq-tabNavRootWithShadow{animation:detect-scroll-t15bt0sq-tabNavRootWithShadow;animation-timeline:--scroll-timeline;animation-fill-mode:none;}.t15bt0sq-tabNavRootWithShadow::before,.t15bt0sq-tabNavRootWithShadow::after{--visibility-if-can-scroll:var(--can-scroll-fibery-reaction) visible;--visibility-if-cant-scroll:hidden;visibility:var(--visibility-if-can-scroll, var(--visibility-if-cant-scroll));}}
|
|
8
|
+
.c2vgbrn{display:flex;flex-direction:column;gap:16px;}
|
|
9
|
+
.c22d8hq{display:flex;align-items:center;gap:16px;}
|
|
10
|
+
.czoxmhd{font-size:15px;font-weight:500;}
|
|
11
|
+
.c1s3fkw3{color:var(--accentTextColor);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;}
|
|
12
|
+
.c1qgjat1{display:flex;flex-direction:column;gap:16px;}
|
|
13
|
+
.cfl9ju8{font-weight:500;}
|
|
14
|
+
.cciqw09{display:flex;align-items:center;gap:12px;}
|
|
15
|
+
.czzpq0p{overflow-wrap:anywhere;font-size:15px;font-weight:500;}
|
|
16
|
+
.cu8y17z{padding:12px;overflow-y:auto;}
|
|
17
|
+
.cred4fn{overflow-wrap:anywhere;}
|
|
18
18
|
.c1a91j23{color:var(--shortcutTextColor);}
|
|
19
19
|
.c9o0r1y{display:flex;height:100%;flex-direction:column;}
|
|
@@ -4,6 +4,7 @@ import { useIsPhone } from "../use-is-phone.js";
|
|
|
4
4
|
import { Tooltip } from "../tooltip.js";
|
|
5
5
|
import { IconButton } from "../button/icon-button.js";
|
|
6
6
|
import { Popover } from "../popover/index.js";
|
|
7
|
+
import { MobileDrawer } from "../mobile-drawer.js";
|
|
7
8
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
8
9
|
import { useResponsiveEmojiSize } from "../emoji-picker/use-responsive-emoji-size.js";
|
|
9
10
|
import ReactionsAdd from "../icons/react/reactions-add.js";
|
|
@@ -12,11 +13,16 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
13
|
import { useCallback, useState } from "react";
|
|
13
14
|
import { useControllableState } from "@fibery/react/src/use-controllable-state";
|
|
14
15
|
//#region src/reactions/reaction-picker.tsx
|
|
15
|
-
var zIndex = 1031;
|
|
16
16
|
var popupContainerCss = "pg4dout-popupContainer";
|
|
17
17
|
var buttonCss = "b1txn7o8-button";
|
|
18
18
|
var popupCss = "pihz71l-popup";
|
|
19
19
|
var pickerOffset = [0, space.s4];
|
|
20
|
+
var drawerBodyCss = "dk5hyy2-drawerBody";
|
|
21
|
+
var drawerPickerStyle = {
|
|
22
|
+
"--fibery-emoji-container-width": "100%",
|
|
23
|
+
"--fibery-emoji-grid-height": "auto",
|
|
24
|
+
"--fibery-emoji-content-max-height": "auto"
|
|
25
|
+
};
|
|
20
26
|
var ReactionPicker = ({ mode, onSelect, open, onOpenChange, EmojiPicker }) => {
|
|
21
27
|
const [isOpen = false, setOpen] = useControllableState({
|
|
22
28
|
value: open,
|
|
@@ -54,18 +60,24 @@ var ReactionPicker = ({ mode, onSelect, open, onOpenChange, EmojiPicker }) => {
|
|
|
54
60
|
supportMobile: true,
|
|
55
61
|
children: /* @__PURE__ */ jsx(ReactionsAdd, {})
|
|
56
62
|
})
|
|
57
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), isPhone ? /* @__PURE__ */ jsx(MobileDrawer, {
|
|
64
|
+
open: isOpen,
|
|
65
|
+
onOpenChange: setOpen,
|
|
66
|
+
title: "Add reaction",
|
|
67
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
68
|
+
className: drawerBodyCss,
|
|
69
|
+
style: drawerPickerStyle,
|
|
70
|
+
children: /* @__PURE__ */ jsx(EmojiPicker, {
|
|
71
|
+
searchAutofocus: false,
|
|
72
|
+
emojiSize,
|
|
73
|
+
showSkinTones: true,
|
|
74
|
+
onSelect: onEmojiSelect
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
}) : /* @__PURE__ */ jsxs(Popover.Root, {
|
|
58
78
|
open: isOpen,
|
|
59
79
|
onOpenChange: setOpen,
|
|
60
80
|
children: [/* @__PURE__ */ jsx(Popover.Trigger, { reference: triggerDomElement }), /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(Popover.Content, {
|
|
61
|
-
supportMobile: true,
|
|
62
|
-
mobilePopupStyle: {
|
|
63
|
-
"--fibery-emoji-container-width": "100%",
|
|
64
|
-
"--fibery-emoji-grid-height": "auto",
|
|
65
|
-
"--fibery-emoji-content-max-height": "auto",
|
|
66
|
-
zIndex
|
|
67
|
-
},
|
|
68
|
-
title: "Add reaction",
|
|
69
81
|
placement: "auto",
|
|
70
82
|
offset: pickerOffset,
|
|
71
83
|
popupContainerClassName: popupContainerCss,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
.pg4dout-popupContainer{z-index:1031;}
|
|
2
2
|
.fibery-mobile .b1txn7o8-button{min-width:28px;height:28px;padding-inline:8px;}
|
|
3
3
|
.pihz71l-popup{max-height:calc(100vh - 84px - 24px);overflow:hidden;}.pihz71l-popup .ant-tabs-nav{align-items:baseline;}.pihz71l-popup .ant-tabs-nav::before{border-bottom:var(--borderSolidSeparator);}.pihz71l-popup .ant-tabs-nav-container{margin-left:14px;}
|
|
4
|
+
.dk5hyy2-drawerBody{flex:1;min-height:0;}
|
|
@@ -18,8 +18,9 @@ var EmojiTooltipTitle = ({ emoji }) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
var EmojiTooltipDescription = ({ children }) => {
|
|
21
|
+
const isPhone = useIsPhone();
|
|
21
22
|
return /* @__PURE__ */ jsx("div", {
|
|
22
|
-
className: cx("c4ndf3", !
|
|
23
|
+
className: cx("c4ndf3", !isPhone && "c1rpnj0z"),
|
|
23
24
|
children
|
|
24
25
|
});
|
|
25
26
|
};
|
|
@@ -71,8 +71,9 @@ function Option({ children, ...rest }) {
|
|
|
71
71
|
* Excluding onMouseOver, onMouseMove makes ReactSelect not rerender the whole list on option hover
|
|
72
72
|
*/
|
|
73
73
|
const { onMouseOver, onMouseMove, ...truncatedInnerProps } = rest.innerProps;
|
|
74
|
+
const props = Object.assign(rest, { innerProps: truncatedInnerProps });
|
|
74
75
|
return /* @__PURE__ */ jsx(OptionSlow, {
|
|
75
|
-
...
|
|
76
|
+
...props,
|
|
76
77
|
children
|
|
77
78
|
});
|
|
78
79
|
}
|
package/lib/select/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { GroupBase } from "./util.js";
|
|
|
2
2
|
import { MenuListVirtualized } from "./components/menu-list-virtualized.js";
|
|
3
3
|
import { MenuListVirtua } from "./components/menu-list-virtua.js";
|
|
4
4
|
import { ActionMeta, BaseSelectProps, ControlProps, CreatableSelect, MenuListProps, MenuProps, MultiValue, MultiValueProps, MultiValueRemoveProps, OnChangeValue, OptionProps, OptionsOrGroups, PropsValue, SelectInstance, SelectProps, SingleValue, SingleValueProps, StylesConfig, components as reactSelectComponents, composeStyles, createFilter } from "./select.js";
|
|
5
|
+
import React from "react";
|
|
5
6
|
//#region src/select/index.d.ts
|
|
6
7
|
declare const Select: <Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectProps<Option, IsMulti, Group> & {
|
|
7
|
-
ref?:
|
|
8
|
+
ref?: React.Ref<SelectInstance<Option, IsMulti, Group>>;
|
|
8
9
|
}) => JSX.Element;
|
|
9
10
|
declare function SingleRowSelect<T = unknown, U extends boolean = boolean, V extends GroupBase<T> = GroupBase<T>>({ styles, ...rest }: SelectProps<T, U, V>): import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
//#endregion
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/select/select-trigger.d.ts
|
|
2
|
+
declare const SelectTrigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
//#endregion
|
|
4
|
+
export { SelectTrigger };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "./select-trigger.wyw-in-js.css";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import cx from "classnames";
|
|
6
|
+
//#region src/select/select-trigger.tsx
|
|
7
|
+
var triggerClassName = "t4y1qef-trigger";
|
|
8
|
+
var SelectTrigger = forwardRef(function SelectTrigger({ children, className, onKeyDown, ...rest }, ref) {
|
|
9
|
+
const handleKeyDown = (e) => {
|
|
10
|
+
onKeyDown?.(e);
|
|
11
|
+
if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.key !== "Enter" && e.key !== " ") return;
|
|
12
|
+
e.preventDefault();
|
|
13
|
+
e.currentTarget.click();
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
ref,
|
|
17
|
+
tabIndex: 0,
|
|
18
|
+
className: cx(triggerClassName, className),
|
|
19
|
+
onKeyDown: handleKeyDown,
|
|
20
|
+
...rest,
|
|
21
|
+
children
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { SelectTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.t4y1qef-trigger{min-width:0;border-radius:6px;--input-focus-border:0 0 0 1px var(--colorAccentStrokeFocus) inset;--input-focus-shadow:0 0 0 2px var(--colorAccentStroke);}.t4y1qef-trigger:focus{outline:none;}.t4y1qef-trigger:focus-visible{outline:none;box-shadow:var(--input-focus-border, 0 0 0 1px var(--colorAccentStroke)),var(--input-focus-shadow)!important;transition:box-shadow 120ms ease-in-out;}
|
package/lib/select/select.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GroupBase } from "./util.js";
|
|
2
2
|
import { MenuListVirtualized } from "./components/menu-list-virtualized.js";
|
|
3
3
|
import { MenuListVirtua } from "./components/menu-list-virtua.js";
|
|
4
|
+
import { ForwardedRef, Ref } from "react";
|
|
4
5
|
import { ActionMeta, ControlProps, MenuListProps, MenuProps, MultiValue, MultiValueProps, MultiValueRemoveProps, OnChangeValue, OptionProps, OptionsOrGroups, Props as BaseSelectProps, PropsValue, SelectInstance, SingleValue, SingleValueProps, StylesConfig, components as reactSelectComponents, createFilter } from "react-select";
|
|
5
6
|
import { CreatableProps } from "react-select/creatable";
|
|
6
7
|
//#region src/select/select.d.ts
|
|
@@ -16,8 +17,11 @@ type SelectProps<T = unknown, U extends boolean = boolean, V extends GroupBase<T
|
|
|
16
17
|
mobileContainerClassName?: string;
|
|
17
18
|
};
|
|
18
19
|
declare const SelectComponent: <Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectProps<Option, IsMulti, Group> & {
|
|
19
|
-
ref?:
|
|
20
|
+
ref?: Ref<SelectInstance<Option, IsMulti, Group>>;
|
|
20
21
|
}) => JSX.Element;
|
|
21
|
-
declare
|
|
22
|
+
declare function CreatableSelectInner<T = unknown, U extends boolean = boolean, V extends GroupBase<T> = GroupBase<T>>({ components, isCollectionMode, menuPortalTarget, styles, virtualized, forbidValuesClearInCollnMode, ...rest }: CreatableProps<T, U, V> & SelectProps<T, U, V>, ref: ForwardedRef<SelectInstance<T, U, V>>): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare const CreatableSelect: <T = unknown, U extends boolean = boolean, V extends GroupBase<T> = GroupBase<T>>(props: CreatableProps<T, U, V> & SelectProps<T, U, V> & {
|
|
24
|
+
ref?: Ref<SelectInstance<T, U, V>>;
|
|
25
|
+
}) => ReturnType<typeof CreatableSelectInner>;
|
|
22
26
|
//#endregion
|
|
23
27
|
export { type ActionMeta, type BaseSelectProps, type ControlProps, CreatableSelect, type GroupBase, type MenuListProps, MenuListVirtua, MenuListVirtualized, type MenuProps, type MultiValue, type MultiValueProps, type MultiValueRemoveProps, type OnChangeValue, type OptionProps, type OptionsOrGroups, type PropsValue, SelectComponent, type SelectInstance, SelectProps, type SingleValue, type SingleValueProps, type StylesConfig, reactSelectComponents as components, composeStyles, createFilter };
|
package/lib/select/select.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useIsPhone } from "../use-is-phone.js";
|
|
1
2
|
import { ReactSelectRefContext, countOptions } from "./util.js";
|
|
2
3
|
import { GroupHeading } from "./components/group-heading.js";
|
|
3
4
|
import { Menu, MenuPortal } from "./components/menu.js";
|
|
@@ -55,6 +56,7 @@ function useSelectStyles({ virtualized, zIndex, styles }) {
|
|
|
55
56
|
}
|
|
56
57
|
var SelectComponent = forwardRef(function Select({ components, isCollectionMode, menuPortalTarget, styles, virtualized = true, forbidValuesClearInCollnMode, inline, onMenuOpen, onMenuClose, onChange, onKeyDown, ...rest }, forwardedRef) {
|
|
57
58
|
const { getPopupContainerElement, zIndex } = useSelectControlSettings();
|
|
59
|
+
const isPhone = useIsPhone();
|
|
58
60
|
const [menuOpenState, setMenuOpenState] = useState(rest.defaultMenuIsOpen);
|
|
59
61
|
const optionsCount = useMemo(() => countOptions(rest.options), [rest.options]);
|
|
60
62
|
const onMenuOpenWrapped = useCallback(() => {
|
|
@@ -82,7 +84,6 @@ var SelectComponent = forwardRef(function Select({ components, isCollectionMode,
|
|
|
82
84
|
else e.target.setSelectionRange(len, len);
|
|
83
85
|
break;
|
|
84
86
|
}
|
|
85
|
-
default:
|
|
86
87
|
}
|
|
87
88
|
});
|
|
88
89
|
const selectRef = useRef(null);
|
|
@@ -111,6 +112,7 @@ var SelectComponent = forwardRef(function Select({ components, isCollectionMode,
|
|
|
111
112
|
tabSelectsValue: false,
|
|
112
113
|
components: selectComponents,
|
|
113
114
|
...rest,
|
|
115
|
+
menuShouldBlockScroll: isPhone ? false : rest.menuShouldBlockScroll,
|
|
114
116
|
onKeyDown: onKeyDownComposed,
|
|
115
117
|
onMenuOpen: onMenuOpenWrapped,
|
|
116
118
|
onMenuClose: onMenuCloseWrapped,
|
|
@@ -120,6 +122,7 @@ var SelectComponent = forwardRef(function Select({ components, isCollectionMode,
|
|
|
120
122
|
});
|
|
121
123
|
});
|
|
122
124
|
function CreatableSelectInner({ components, isCollectionMode, menuPortalTarget, styles = {}, virtualized = true, forbidValuesClearInCollnMode, ...rest }, ref) {
|
|
125
|
+
const isPhone = useIsPhone();
|
|
123
126
|
const selectComponents = useSelectComponents({
|
|
124
127
|
components,
|
|
125
128
|
optionsCount: useMemo(() => countOptions(rest.options), [rest.options]),
|
|
@@ -127,19 +130,21 @@ function CreatableSelectInner({ components, isCollectionMode, menuPortalTarget,
|
|
|
127
130
|
isCollectionMode,
|
|
128
131
|
forbidValuesClearInCollnMode
|
|
129
132
|
});
|
|
133
|
+
const combinedStyles = useSelectStyles({
|
|
134
|
+
virtualized,
|
|
135
|
+
styles
|
|
136
|
+
});
|
|
130
137
|
return /* @__PURE__ */ jsx(BaseCreatableSelect, {
|
|
131
138
|
ref,
|
|
132
139
|
menuPortalTarget,
|
|
133
140
|
menuPlacement: "auto",
|
|
134
|
-
styles:
|
|
135
|
-
virtualized,
|
|
136
|
-
styles
|
|
137
|
-
}),
|
|
141
|
+
styles: combinedStyles,
|
|
138
142
|
isMulti: isCollectionMode,
|
|
139
143
|
backspaceRemovesValue: isCollectionMode,
|
|
140
144
|
tabSelectsValue: false,
|
|
141
145
|
components: selectComponents,
|
|
142
146
|
...rest,
|
|
147
|
+
menuShouldBlockScroll: isPhone ? false : rest.menuShouldBlockScroll,
|
|
143
148
|
isDisabled: rest.disabled
|
|
144
149
|
});
|
|
145
150
|
}
|
package/lib/spinner.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import { IconBaseProps } from "./icons/types.js";
|
|
1
2
|
//#region src/spinner.d.ts
|
|
2
|
-
|
|
3
|
-
iconSize?: number;
|
|
4
|
-
containerSize?: number;
|
|
5
|
-
color?: string;
|
|
6
|
-
};
|
|
7
|
-
declare const Spinner: import("react").NamedExoticComponent<Props>;
|
|
3
|
+
declare const Spinner: import("react").NamedExoticComponent<IconBaseProps>;
|
|
8
4
|
//#endregion
|
|
9
5
|
export { Spinner };
|
package/lib/spinner.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./spinner.wyw-in-js.css";
|
|
2
2
|
import Spinner$1 from "./icons/react/spinner.js";
|
|
3
|
+
/* empty css */
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { memo } from "react";
|
|
6
|
+
import { cx } from "@linaria/core";
|
|
5
7
|
//#region src/spinner.tsx
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var spinningCss = "s1puy9zd-spinning";
|
|
9
|
+
var Spinner = memo(function Spinner({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Spinner$1, {
|
|
11
|
+
colorProcessed: true,
|
|
12
|
+
...props,
|
|
13
|
+
className: cx(spinningCss, className)
|
|
14
|
+
});
|
|
15
|
+
});
|
|
12
16
|
//#endregion
|
|
13
17
|
export { Spinner };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.s1puy9zd-spinning{animation:spinner-rotate-s1puy9zd-spinning 0.5s linear infinite;}@keyframes spinner-rotate-s1puy9zd-spinning{to{transform:rotate(360deg);}}
|
package/lib/tab-nav/tab-nav.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuProps } from "@radix-ui/react-navigation-menu";
|
|
3
3
|
//#region src/tab-nav/tab-nav.d.ts
|
|
4
4
|
declare const tabButton: import("@linaria/core").LinariaClassName;
|
|
5
|
-
type TabNavRootProps = NavigationMenuProps
|
|
6
|
-
|
|
5
|
+
type TabNavRootProps = NavigationMenuProps & {
|
|
6
|
+
trackClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const TabNavRoot: ({ className, trackClassName, children, orientation, ...props }: TabNavRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
type TabNavListProps = NavigationMenuListProps & {
|
|
8
10
|
onListChange?: (listEl: HTMLElement) => void;
|
|
9
11
|
};
|
package/lib/tab-nav/tab-nav.js
CHANGED
|
@@ -25,7 +25,7 @@ var positionIndicator = (indicator, activeItem) => {
|
|
|
25
25
|
indicator.classList.add(tabNavIndicatorMounted);
|
|
26
26
|
};
|
|
27
27
|
var [TabNavContextProvider, useTabNavCtx] = createContext$1("TabNavContext");
|
|
28
|
-
var TabNavRoot = ({ className, children, orientation = "horizontal", ...props }) => {
|
|
28
|
+
var TabNavRoot = ({ className, trackClassName, children, orientation = "horizontal", ...props }) => {
|
|
29
29
|
const indicatorRef = useRef(null);
|
|
30
30
|
const activeItemRef = useRef(null);
|
|
31
31
|
const [ctx] = useState(() => ({
|
|
@@ -37,7 +37,7 @@ var TabNavRoot = ({ className, children, orientation = "horizontal", ...props })
|
|
|
37
37
|
orientation,
|
|
38
38
|
...props,
|
|
39
39
|
children: jsxs("div", {
|
|
40
|
-
className: tabNavIndicatorTrack,
|
|
40
|
+
className: cx(tabNavIndicatorTrack, trackClassName),
|
|
41
41
|
children: [orientation === "horizontal" && /* @__PURE__ */ jsx("div", {
|
|
42
42
|
ref: indicatorRef,
|
|
43
43
|
className: tabNavIndicator
|