@eightshift/ui-components 5.0.0 → 5.0.2
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/dist/Button-BpwTmkAe.js +185 -0
- package/dist/Collection-n5d0zIgb.js +2398 -0
- package/dist/Color-lVhk8V_G.js +2452 -0
- package/dist/ColorSwatch-DntWEAC3.js +64 -0
- package/dist/ComboBox-BJpTEATT.js +1915 -0
- package/dist/Dialog-O9uw63D7.js +2317 -0
- package/dist/FieldError-DHrSdE_Q.js +42 -0
- package/dist/FocusScope-BEPI2m7u.js +831 -0
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/Group-DDPhPPTQ.js +48 -0
- package/dist/Heading-ba38ScjJ.js +16 -0
- package/dist/Hidden-rE6uR-lr.js +41 -0
- package/dist/Input-BmDS8Juy.js +133 -0
- package/dist/Label-JS_ob-kh.js +17 -0
- package/dist/List-CZMUbkFU.js +593 -0
- package/dist/ListBox-BTxlCGcc.js +664 -0
- package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
- package/dist/OverlayArrow-5aDgmImj.js +637 -0
- package/dist/RSPContexts-2lR5GG9p.js +14 -0
- package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
- package/dist/Separator-CaTBkETC.js +332 -0
- package/dist/Slider-C-S1oEH9.js +853 -0
- package/dist/Text-BuJgePCv.js +16 -0
- package/dist/VisuallyHidden-BYi0pekx.js +48 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/assets/index.css +57 -0
- package/dist/assets/style-admin.css +5908 -0
- package/dist/assets/style-editor.css +5908 -0
- package/dist/assets/style.css +5914 -0
- package/dist/assets/wp-font-enhancements.css +8 -0
- package/dist/assets/wp-ui-enhancements.css +396 -0
- package/dist/components/animated-visibility/animated-visibility.js +105 -0
- package/dist/components/base-control/base-control.js +86 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
- package/dist/components/button/button.js +387 -0
- package/dist/components/checkbox/checkbox.js +323 -0
- package/dist/components/color-pickers/color-picker.js +272 -0
- package/dist/components/color-pickers/color-swatch.js +59 -0
- package/dist/components/color-pickers/gradient-editor.js +534 -0
- package/dist/components/color-pickers/solid-color-picker.js +1567 -0
- package/dist/components/component-toggle/component-toggle.js +161 -0
- package/dist/components/container-panel/container-panel.js +131 -0
- package/dist/components/draggable/draggable-context.js +5 -0
- package/dist/components/draggable/draggable-handle.js +46 -0
- package/dist/components/draggable/draggable.js +7320 -0
- package/dist/components/draggable-list/draggable-list-context.js +5 -0
- package/dist/components/draggable-list/draggable-list-item.js +77 -0
- package/dist/components/draggable-list/draggable-list.js +151 -0
- package/dist/components/expandable/expandable.js +342 -0
- package/dist/components/index.js +137 -0
- package/dist/components/input-field/input-field.js +231 -0
- package/dist/components/item-collection/item-collection.js +59 -0
- package/dist/components/layout/hstack.js +30 -0
- package/dist/components/layout/vstack.js +30 -0
- package/dist/components/link-input/link-input.js +284 -0
- package/dist/components/matrix-align/matrix-align.js +134 -0
- package/dist/components/menu/menu.js +285 -0
- package/dist/components/modal/modal.js +305 -0
- package/dist/components/notice/notice.js +123 -0
- package/dist/components/number-picker/number-picker.js +292 -0
- package/dist/components/option-select/option-select.js +264 -0
- package/dist/components/options-panel/options-panel.js +158 -0
- package/dist/components/placeholders/file-placeholder.js +42 -0
- package/dist/components/placeholders/image-placeholder.js +88 -0
- package/dist/components/placeholders/media-placeholder.js +63 -0
- package/dist/components/popover/popover.js +207 -0
- package/dist/components/radio/radio.js +582 -0
- package/dist/components/repeater/repeater-context.js +5 -0
- package/dist/components/repeater/repeater-item.js +119 -0
- package/dist/components/repeater/repeater.js +280 -0
- package/dist/components/responsive/mini-responsive.js +498 -0
- package/dist/components/responsive/responsive-legacy.js +343 -0
- package/dist/components/responsive/responsive.js +583 -0
- package/dist/components/responsive-preview/responsive-preview.js +123 -0
- package/dist/components/rich-label/rich-label.js +66 -0
- package/dist/components/select/async-multi-select.js +157 -0
- package/dist/components/select/async-single-select.js +137 -0
- package/dist/components/select/custom-select-default-components.js +38 -0
- package/dist/components/select/multi-select-components.js +8 -0
- package/dist/components/select/multi-select.js +151 -0
- package/dist/components/select/react-select-component-wrappers.js +90 -0
- package/dist/components/select/shared.js +26 -0
- package/dist/components/select/single-select.js +131 -0
- package/dist/components/select/styles.js +49 -0
- package/dist/components/select/v2/async-select.js +297 -0
- package/dist/components/select/v2/shared.js +24 -0
- package/dist/components/select/v2/single-select.js +1004 -0
- package/dist/components/slider/column-config-slider.js +210 -0
- package/dist/components/slider/slider.js +345 -0
- package/dist/components/slider/utils.js +94 -0
- package/dist/components/spacer/spacer.js +97 -0
- package/dist/components/tabs/tabs.js +703 -0
- package/dist/components/toggle/switch.js +156 -0
- package/dist/components/toggle/toggle.js +64 -0
- package/dist/components/toggle-button/toggle-button.js +343 -0
- package/dist/components/tooltip/tooltip.js +527 -0
- package/dist/context-BbYZoHvX.js +92 -0
- package/dist/default-i18n-CT_oS1Fy.js +922 -0
- package/dist/filterDOMProps-EDDcM64A.js +28 -0
- package/dist/icons/block-icon.js +42 -0
- package/dist/icons/generic-color-swatch.js +113 -0
- package/dist/icons/icons.js +30495 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/jsx-svg.js +50 -0
- package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
- package/dist/index-BljRBEr_.js +44 -0
- package/dist/index-CFozsmNS.js +28321 -0
- package/dist/index.js +139 -0
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/modifiers.esm-BuJQPI1X.js +31 -0
- package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
- package/dist/number-GajL10e1.js +36 -0
- package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
- package/dist/react-select-async.esm-D937XTWW.js +107 -0
- package/dist/react-select.esm-Ciai3aKf.js +15 -0
- package/dist/style-admin.js +1 -0
- package/dist/style-editor.js +1 -0
- package/dist/style.js +1 -0
- package/dist/textSelection-8DpK8fJl.js +46 -0
- package/dist/useButton-Bt3BffJm.js +50 -0
- package/dist/useEvent-ICdlokG-.js +23 -0
- package/dist/useFocusRing-Bv0UJQl8.js +107 -0
- package/dist/useFormReset-D2YaWRIA.js +22 -0
- package/dist/useFormValidation-Dy0PXJg5.js +224 -0
- package/dist/useHover-C2SkI1Fn.js +895 -0
- package/dist/useLabel-BPCd5c7-.js +27 -0
- package/dist/useLabels-B7-lUnAF.js +23 -0
- package/dist/useListState-DkyH7elT.js +168 -0
- package/dist/useLocalizedStringFormatter-C9GO0IDB.js +121 -0
- package/dist/useNumberField-CU1_u8ze.js +1215 -0
- package/dist/useNumberFormatter-CZ9QUnRt.js +13 -0
- package/dist/usePress-BrJylgPR.js +688 -0
- package/dist/useSingleSelectListState-C4sorv2p.js +38 -0
- package/dist/useToggle-CDa3YAZI.js +59 -0
- package/dist/useToggleState-ibcBUHnB.js +19 -0
- package/dist/utilities/array-helpers.js +56 -0
- package/dist/utilities/debounce-throttle.js +123 -0
- package/dist/utilities/es-dash.js +382 -0
- package/dist/utilities/index.js +27 -0
- package/dist/utilities/text-helpers.js +136 -0
- package/dist/utils-CZt7LCbO.js +403 -0
- package/dist/wp/wp-font-enhancements.js +1 -0
- package/dist/wp/wp-ui-enhancements.js +1 -0
- package/package.json +24 -24
package/dist/index.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
2
|
+
import { BaseControl } from "./components/base-control/base-control.js";
|
|
3
|
+
import { BreakpointPreview } from "./components/breakpoint-preview/breakpoint-preview.js";
|
|
4
|
+
import { Button, ButtonGroup } from "./components/button/button.js";
|
|
5
|
+
import { Checkbox } from "./components/checkbox/checkbox.js";
|
|
6
|
+
import { ComponentToggle } from "./components/component-toggle/component-toggle.js";
|
|
7
|
+
import { ContainerPanel } from "./components/container-panel/container-panel.js";
|
|
8
|
+
import { ColorSwatch } from "./components/color-pickers/color-swatch.js";
|
|
9
|
+
import { ColorPicker } from "./components/color-pickers/color-picker.js";
|
|
10
|
+
import { ColumnConfigSlider, ColumnConfigSliderOutput } from "./components/slider/column-config-slider.js";
|
|
11
|
+
import { DraggableList } from "./components/draggable-list/draggable-list.js";
|
|
12
|
+
import { DraggableListItem, DraggableListItemHandle } from "./components/draggable-list/draggable-list-item.js";
|
|
13
|
+
import { DraggableContext } from "./components/draggable/draggable-context.js";
|
|
14
|
+
import { Draggable } from "./components/draggable/draggable.js";
|
|
15
|
+
import { DraggableHandle } from "./components/draggable/draggable-handle.js";
|
|
16
|
+
import { Expandable } from "./components/expandable/expandable.js";
|
|
17
|
+
import { FilePlaceholder } from "./components/placeholders/file-placeholder.js";
|
|
18
|
+
import { GradientEditor } from "./components/color-pickers/gradient-editor.js";
|
|
19
|
+
import { HStack } from "./components/layout/hstack.js";
|
|
20
|
+
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
21
|
+
import { InputField } from "./components/input-field/input-field.js";
|
|
22
|
+
import { ImagePlaceholder } from "./components/placeholders/image-placeholder.js";
|
|
23
|
+
import { ItemCollection } from "./components/item-collection/item-collection.js";
|
|
24
|
+
import { LinkInput } from "./components/link-input/link-input.js";
|
|
25
|
+
import { MatrixAlign } from "./components/matrix-align/matrix-align.js";
|
|
26
|
+
import { MediaPlaceholder } from "./components/placeholders/media-placeholder.js";
|
|
27
|
+
import { Menu, MenuItem, MenuSection, MenuSeparator, SubMenuItem } from "./components/menu/menu.js";
|
|
28
|
+
import { MiniResponsive } from "./components/responsive/mini-responsive.js";
|
|
29
|
+
import { Notice } from "./components/notice/notice.js";
|
|
30
|
+
import { NumberPicker } from "./components/number-picker/number-picker.js";
|
|
31
|
+
import { Popover, TriggeredPopover } from "./components/popover/popover.js";
|
|
32
|
+
import { RadioButton, RadioButtonGroup } from "./components/radio/radio.js";
|
|
33
|
+
import { Repeater } from "./components/repeater/repeater.js";
|
|
34
|
+
import { RepeaterItem } from "./components/repeater/repeater-item.js";
|
|
35
|
+
import { Responsive } from "./components/responsive/responsive.js";
|
|
36
|
+
import { ResponsiveLegacy } from "./components/responsive/responsive-legacy.js";
|
|
37
|
+
import { ResponsivePreview } from "./components/responsive-preview/responsive-preview.js";
|
|
38
|
+
import { AsyncMultiSelect } from "./components/select/async-multi-select.js";
|
|
39
|
+
import { AsyncSelect } from "./components/select/async-single-select.js";
|
|
40
|
+
import { __ExperimentalAsyncSelect } from "./components/select/v2/async-select.js";
|
|
41
|
+
import { __ExperimentalSelect } from "./components/select/v2/single-select.js";
|
|
42
|
+
import { Modal } from "./components/modal/modal.js";
|
|
43
|
+
import { MultiSelect } from "./components/select/multi-select.js";
|
|
44
|
+
import { RSClearIndicator, RSDropdownIndicator, RSMultiValue, RSMultiValueContainer, RSMultiValueLabel, RSMultiValueRemove, RSOption, RSSingleValue } from "./components/select/react-select-component-wrappers.js";
|
|
45
|
+
import { OptionSelect } from "./components/option-select/option-select.js";
|
|
46
|
+
import { OptionsPanel, OptionsPanelHeader, OptionsPanelIntro, OptionsPanelSection } from "./components/options-panel/options-panel.js";
|
|
47
|
+
import { Select } from "./components/select/single-select.js";
|
|
48
|
+
import { Slider } from "./components/slider/slider.js";
|
|
49
|
+
import { SolidColorPicker } from "./components/color-pickers/solid-color-picker.js";
|
|
50
|
+
import { Spacer } from "./components/spacer/spacer.js";
|
|
51
|
+
import { Tab, TabList, TabPanel, Tabs } from "./components/tabs/tabs.js";
|
|
52
|
+
import { Toggle } from "./components/toggle/toggle.js";
|
|
53
|
+
import { Switch } from "./components/toggle/switch.js";
|
|
54
|
+
import { ToggleButton } from "./components/toggle-button/toggle-button.js";
|
|
55
|
+
import { DecorativeTooltip, Tooltip } from "./components/tooltip/tooltip.js";
|
|
56
|
+
import { VStack } from "./components/layout/vstack.js";
|
|
57
|
+
import { getColumnConfigOutputText } from "./components/slider/utils.js";
|
|
58
|
+
export {
|
|
59
|
+
AnimatedVisibility,
|
|
60
|
+
AsyncMultiSelect,
|
|
61
|
+
AsyncSelect,
|
|
62
|
+
BaseControl,
|
|
63
|
+
BreakpointPreview,
|
|
64
|
+
Button,
|
|
65
|
+
ButtonGroup,
|
|
66
|
+
Checkbox,
|
|
67
|
+
ColorPicker,
|
|
68
|
+
ColorSwatch,
|
|
69
|
+
ColumnConfigSlider,
|
|
70
|
+
ColumnConfigSliderOutput,
|
|
71
|
+
ComponentToggle,
|
|
72
|
+
ContainerPanel,
|
|
73
|
+
DecorativeTooltip,
|
|
74
|
+
Draggable,
|
|
75
|
+
DraggableContext,
|
|
76
|
+
DraggableHandle,
|
|
77
|
+
DraggableList,
|
|
78
|
+
DraggableListItem,
|
|
79
|
+
DraggableListItemHandle,
|
|
80
|
+
Expandable,
|
|
81
|
+
FilePlaceholder,
|
|
82
|
+
GradientEditor,
|
|
83
|
+
HStack,
|
|
84
|
+
ImagePlaceholder,
|
|
85
|
+
InputField,
|
|
86
|
+
ItemCollection,
|
|
87
|
+
LinkInput,
|
|
88
|
+
MatrixAlign,
|
|
89
|
+
MediaPlaceholder,
|
|
90
|
+
Menu,
|
|
91
|
+
MenuItem,
|
|
92
|
+
MenuSection,
|
|
93
|
+
MenuSeparator,
|
|
94
|
+
MiniResponsive,
|
|
95
|
+
Modal,
|
|
96
|
+
MultiSelect,
|
|
97
|
+
Notice,
|
|
98
|
+
NumberPicker,
|
|
99
|
+
OptionSelect,
|
|
100
|
+
OptionsPanel,
|
|
101
|
+
OptionsPanelHeader,
|
|
102
|
+
OptionsPanelIntro,
|
|
103
|
+
OptionsPanelSection,
|
|
104
|
+
Popover,
|
|
105
|
+
RSClearIndicator,
|
|
106
|
+
RSDropdownIndicator,
|
|
107
|
+
RSMultiValue,
|
|
108
|
+
RSMultiValueContainer,
|
|
109
|
+
RSMultiValueLabel,
|
|
110
|
+
RSMultiValueRemove,
|
|
111
|
+
RSOption,
|
|
112
|
+
RSSingleValue,
|
|
113
|
+
RadioButton,
|
|
114
|
+
RadioButtonGroup,
|
|
115
|
+
Repeater,
|
|
116
|
+
RepeaterItem,
|
|
117
|
+
Responsive,
|
|
118
|
+
ResponsiveLegacy,
|
|
119
|
+
ResponsivePreview,
|
|
120
|
+
RichLabel,
|
|
121
|
+
Select,
|
|
122
|
+
Slider,
|
|
123
|
+
SolidColorPicker,
|
|
124
|
+
Spacer,
|
|
125
|
+
SubMenuItem,
|
|
126
|
+
Switch,
|
|
127
|
+
Tab,
|
|
128
|
+
TabList,
|
|
129
|
+
TabPanel,
|
|
130
|
+
Tabs,
|
|
131
|
+
Toggle,
|
|
132
|
+
ToggleButton,
|
|
133
|
+
Tooltip,
|
|
134
|
+
TriggeredPopover,
|
|
135
|
+
VStack,
|
|
136
|
+
__ExperimentalAsyncSelect,
|
|
137
|
+
__ExperimentalSelect,
|
|
138
|
+
getColumnConfigOutputText
|
|
139
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
function restrictToBoundingRect(transform, rect, boundingRect) {
|
|
3
|
+
const value = {
|
|
4
|
+
...transform
|
|
5
|
+
};
|
|
6
|
+
if (rect.top + transform.y <= boundingRect.top) {
|
|
7
|
+
value.y = boundingRect.top - rect.top;
|
|
8
|
+
} else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {
|
|
9
|
+
value.y = boundingRect.top + boundingRect.height - rect.bottom;
|
|
10
|
+
}
|
|
11
|
+
if (rect.left + transform.x <= boundingRect.left) {
|
|
12
|
+
value.x = boundingRect.left - rect.left;
|
|
13
|
+
} else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {
|
|
14
|
+
value.x = boundingRect.left + boundingRect.width - rect.right;
|
|
15
|
+
}
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
const restrictToParentElement = (_ref) => {
|
|
19
|
+
let {
|
|
20
|
+
containerNodeRect,
|
|
21
|
+
draggingNodeRect,
|
|
22
|
+
transform
|
|
23
|
+
} = _ref;
|
|
24
|
+
if (!draggingNodeRect || !containerNodeRect) {
|
|
25
|
+
return transform;
|
|
26
|
+
}
|
|
27
|
+
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
restrictToParentElement as r
|
|
31
|
+
};
|