@eightshift/ui-components 5.6.0 → 6.0.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/dist/{Button-BhEIfWLY.js → Button-BXjXzdW_.js} +13 -13
- package/dist/{Dialog-B8p4Ymh7.js → Dialog-D8bjn-nh.js} +404 -77
- package/dist/{FieldError-B8BgFmIQ.js → FieldError-DwBG6m1U.js} +2 -2
- package/dist/{FocusScope-B5vxRkHm.js → FocusScope-BMk5oZCk.js} +8 -8
- package/dist/{Heading-B5aEynOM.js → Heading-BmRX4BRL.js} +3 -3
- package/dist/{Hidden-rE6uR-lr.js → Hidden-Rfj-STx7.js} +4 -4
- package/dist/{Input-8yja_IHC.js → Input-CNNksOWg.js} +11 -11
- package/dist/{Label-DWVaNd2E.js → Label-D8a3eYb-.js} +4 -4
- package/dist/{List-Bll1lQEW.js → List-BGHOoFf0.js} +8 -8
- package/dist/{ListBox-CEpKw7yC.js → ListBox-Dd37zMvs.js} +40 -41
- package/dist/{OverlayArrow-DDfa8khI.js → OverlayArrow-DokC40S3.js} +6 -6
- package/dist/{PortalProvider---wyKpMr.js → PortalProvider-CHPnqDSH.js} +2 -2
- package/dist/RadioGroup-BVFvITWO.js +371 -0
- package/dist/{SearchField-D6mPli0i.js → SearchField-CHYnN-jt.js} +16 -16
- package/dist/{SelectionManager-D77bfEbg.js → SelectionManager-N8X7T_4D.js} +44 -46
- package/dist/{SharedElementTransition-BjRNHsjx.js → SharedElementTransition-BDT84GtD.js} +3 -3
- package/dist/{Slider-DfU6bRtH.js → Slider-CL5CM9S8.js} +23 -23
- package/dist/{Text-AxKZjtFm.js → Text-ztX6G1zR.js} +3 -3
- package/dist/{VisuallyHidden-CgnIuZJ2.js → VisuallyHidden-DTUuKFiI.js} +4 -4
- package/dist/assets/style-admin.css +12156 -2
- package/dist/assets/style-editor.css +12156 -2
- package/dist/assets/style.css +12162 -2
- package/dist/assets/wp-overrides/allow-full-width-blocks.css +6 -0
- package/dist/assets/wp-overrides/fix-label-text-case.css +29 -0
- package/dist/assets/wp-overrides/increase-sidebar-width.css +4 -0
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +155 -0
- package/dist/assets/wp-overrides/replace-fonts.css +8 -0
- package/dist/assets/wp-overrides/restyle-tooltips.css +194 -0
- package/dist/assets/wp-overrides/round-corners.css +200 -0
- package/dist/assets/wp-overrides/unify-button-sizes.css +5 -0
- package/dist/clsx-DgYk2OaC.js +16 -0
- package/dist/{Color-WxFE7lQB.js → color-swatch-CFIuSPcO.js} +124 -6
- package/dist/components/animated-visibility/animated-visibility.js +25 -17
- package/dist/components/base-control/base-control.js +8 -5
- package/dist/components/base-control/container.js +204 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +0 -1
- package/dist/components/button/button.js +249 -155
- package/dist/components/checkbox/checkbox.js +96 -37
- package/dist/components/color-pickers/color-picker.js +16 -7
- package/dist/components/color-pickers/color-swatch.js +5 -57
- package/dist/components/color-pickers/gradient-editor.js +161 -138
- package/dist/components/color-pickers/solid-color-picker.js +308 -206
- package/dist/components/component-toggle/component-toggle.js +12 -8
- package/dist/components/container-panel/container-panel.js +54 -31
- package/dist/components/draggable/draggable-handle.js +8 -7
- package/dist/components/draggable/draggable.js +2 -2
- package/dist/components/draggable-list/draggable-list-item.js +21 -12
- package/dist/components/draggable-list/draggable-list.js +19 -21
- package/dist/components/expandable/expandable.js +56 -28
- package/dist/components/index.js +7 -21
- package/dist/components/input-field/input-field.js +112 -35
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +181 -121
- package/dist/components/matrix-align/matrix-align.js +54 -21
- package/dist/components/menu/menu.js +26 -34
- package/dist/components/modal/modal.js +31 -28
- package/dist/components/notice/notice.js +45 -28
- package/dist/components/number-picker/number-picker.js +151 -101
- package/dist/components/option-select/option-select.js +40 -4
- package/dist/components/options-panel/options-panel.js +52 -25
- package/dist/components/placeholders/file-picker-shell.js +10 -10
- package/dist/components/placeholders/file-placeholder.js +14 -6
- package/dist/components/placeholders/image-placeholder.js +14 -4
- package/dist/components/placeholders/media-placeholder.js +11 -4
- package/dist/components/popover/popover.js +14 -11
- package/dist/components/portal-provider/portal-provider.js +1 -1
- package/dist/components/radio/radio.js +118 -429
- package/dist/components/repeater/repeater-item.js +7 -10
- package/dist/components/repeater/repeater.js +9 -15
- package/dist/components/responsive/mini-responsive.js +53 -62
- package/dist/components/responsive/responsive-legacy.js +1 -2
- package/dist/components/responsive/responsive.js +27 -28
- package/dist/components/responsive-preview/responsive-preview.js +1 -2
- package/dist/components/rich-label/rich-label.js +5 -5
- package/dist/components/select/async-multi-select.js +467 -100
- package/dist/components/select/{v2/async-select.js → async-select.js} +182 -106
- package/dist/components/select/multi-select.js +437 -83
- package/dist/components/select/shared.js +14 -42
- package/dist/components/select/single-select.js +349 -54
- package/dist/components/slider/column-config-slider.js +138 -45
- package/dist/components/slider/slider.js +265 -205
- package/dist/components/slider/utils.js +32 -1
- package/dist/components/smart-image/smart-image.js +27 -6
- package/dist/components/smart-image/worker-inline.js +1 -1
- package/dist/components/spacer/spacer.js +2 -2
- package/dist/components/tabs/tabs.js +370 -101
- package/dist/components/toggle/switch.js +174 -39
- package/dist/components/toggle/toggle.js +6 -3
- package/dist/components/toggle-button/toggle-button.js +140 -56
- package/dist/components/tooltip/tooltip.js +27 -26
- package/dist/{context-DMOmz986.js → context-BQvmiUqb.js} +3 -3
- package/dist/{default-i18n-DBm-GqWM.js → default-i18n-CnQeC5Pl.js} +10 -10
- package/dist/{general-6STKQIrk.js → general-B6pOveVp.js} +13 -12
- package/dist/icons/icons.js +28 -9
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/icons/spinner.js +3 -1
- package/dist/{index-Dq3gT5pW.js → index-BHpUy2Ix.js} +1 -1
- package/dist/{index-DjyEH0Gg.js → index-oFgxU4zs.js} +6 -4
- package/dist/index.js +6 -20
- package/dist/proxy-0B6wWuDe.js +7409 -0
- package/dist/{react-jsx-parser.min-VUl-CuCv.js → react-jsx-parser.min-B_hvYYa1.js} +5 -5
- package/dist/{Select-CHzjZxXy.js → shared-DwjRce5e.js} +170 -36
- package/dist/{textSelection-DbCKqaw8.js → textSelection-CwHUtNVX.js} +1 -1
- package/dist/{useButton-B2EaQJT_.js → useButton-DdZrS1Kz.js} +3 -3
- package/dist/{useEvent-BifIGnVS.js → useEvent-BD7Olibq.js} +1 -1
- package/dist/{useFilter-BPcJ-Jzv.js → useFilter-bhxeEDg8.js} +1 -1
- package/dist/{useFocusRing-Cgm0R4Cf.js → useFocusRing-D3b7Kh4P.js} +1 -1
- package/dist/{useFormReset-yV9VVy9R.js → useFormReset-WUv2PdFO.js} +1 -1
- package/dist/{useFormValidation-CeNsUGWK.js → useFormValidation-DQeXkyLm.js} +2 -2
- package/dist/{useHover-BRDW3y7-.js → useHover-Bycb7BsD.js} +7 -7
- package/dist/{useLabel-C8umX0gk.js → useLabel-Bnv4-T24.js} +2 -2
- package/dist/{useLabels-Cdxi6JSa.js → useLabels-B49ptFDX.js} +1 -1
- package/dist/{useListState-DZycqxCn.js → useListState-ZKhRO8ML.js} +1 -1
- package/dist/{useLocalizedStringFormatter-eaZiN2tE.js → useLocalizedStringFormatter-NETP-8H8.js} +1 -1
- package/dist/{useNumberField-CEA9Q4w_.js → useNumberField-D2fUHql3.js} +10 -10
- package/dist/{useNumberFormatter-BCmkV-7c.js → useNumberFormatter-DGvuRCn7.js} +1 -1
- package/dist/{usePress-BCEPS3hl.js → usePress-B8OteQMu.js} +6 -6
- package/dist/{useSingleSelectListState-BFZEfeqI.js → useSingleSelectListState-BBTu4shO.js} +2 -2
- package/dist/{useToggle-DNoP2bvV.js → useToggle-BZhaYwZl.js} +4 -4
- package/dist/{useToggleState-CzN79ary.js → useToggleState-VkXJjsru.js} +1 -1
- package/dist/utilities/general.js +2 -2
- package/dist/utilities/hash.js +30 -0
- package/dist/utilities/index.js +4 -6
- package/dist/{utils-cvK1vxO7.js → utils-DGpXyJOJ.js} +29 -42
- package/dist/workers/image-analysis.worker.js +3 -3
- package/package.json +26 -23
- package/dist/ColorSwatch-xVS3rMYS.js +0 -66
- package/dist/Select-ef7c0426.esm-BJmjGGzK.js +0 -2474
- package/dist/Separator-DcqCdD4k.js +0 -344
- package/dist/_commonjsHelpers-BhWcALO8.js +0 -38
- package/dist/assets/wp-font-enhancements.css +0 -2
- package/dist/assets/wp-ui-enhancements.css +0 -2
- package/dist/components/select/async-single-select.js +0 -138
- package/dist/components/select/custom-select-default-components.js +0 -38
- package/dist/components/select/multi-select-components.js +0 -8
- package/dist/components/select/react-select-component-wrappers.js +0 -90
- package/dist/components/select/styles.js +0 -49
- package/dist/components/select/v2/async-multi-select.js +0 -433
- package/dist/components/select/v2/multi-select.js +0 -404
- package/dist/components/select/v2/shared.js +0 -69
- package/dist/components/select/v2/single-select.js +0 -358
- package/dist/index-641ee5b8.esm-DiwvO-RP.js +0 -3139
- package/dist/modifiers.esm-BuJQPI1X.js +0 -31
- package/dist/multi-select-components-B3KuDyYd.js +0 -3744
- package/dist/react-select-async.esm-_4pk-41v.js +0 -107
- package/dist/react-select.esm-BeuAkAyY.js +0 -15
- package/dist/sha256-C56UDWfQ.js +0 -533
- package/dist/useDragAndDrop-DUXKDS0N.js +0 -3925
- package/dist/wp/wp-font-enhancements.js +0 -1
- package/dist/wp/wp-ui-enhancements.js +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-
|
|
3
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { w as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-
|
|
7
|
-
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
8
|
-
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-
|
|
2
|
+
import { d as $2d73ec29415bd339$export$712718f7aec83d5, b as $3985021b0ad6602f$export$37fb8590cf2c088c, a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-CNNksOWg.js";
|
|
3
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-D8a3eYb-.js";
|
|
4
|
+
import { $ as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$4d86445c2cf5e3, a as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $64fa3d84918910a7$export$fabf2dc03a41866e, e as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, f as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-DGpXyJOJ.js";
|
|
5
|
+
import $dbSRa$react__default, { forwardRef, createContext, useRef, useState, useCallback } from "react";
|
|
6
|
+
import { w as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-Bycb7BsD.js";
|
|
7
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-D3b7Kh4P.js";
|
|
8
|
+
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DwBG6m1U.js";
|
|
9
9
|
import { a as $4e85f108e88277b8$export$698f465ec27e93df } from "../../RSPContexts-CJ-HBf0L.js";
|
|
10
10
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
11
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-
|
|
12
|
-
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-
|
|
11
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-ztX6G1zR.js";
|
|
12
|
+
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-Rfj-STx7.js";
|
|
13
13
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
14
14
|
import { BaseControl } from "../base-control/base-control.js";
|
|
15
|
-
import { c as
|
|
15
|
+
import { c as cva } from "../../index-BHpUy2Ix.js";
|
|
16
16
|
const $216918bed6669f72$export$2dc6166a7e65358c = /* @__PURE__ */ createContext({});
|
|
17
17
|
let $216918bed6669f72$var$filterHoverProps = (props) => {
|
|
18
18
|
let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
@@ -37,7 +37,7 @@ const $216918bed6669f72$export$f5c9f3c2c4054eec = /* @__PURE__ */ forwardRef(fun
|
|
|
37
37
|
},
|
|
38
38
|
defaultClassName: "react-aria-TextArea"
|
|
39
39
|
});
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ $dbSRa$react__default.createElement("textarea", {
|
|
41
41
|
...$3ef42575df84b30b$export$9d1611c77c2fe928($216918bed6669f72$var$filterHoverProps(props), focusProps, hoverProps),
|
|
42
42
|
...renderProps,
|
|
43
43
|
ref,
|
|
@@ -84,7 +84,7 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
84
84
|
global: true
|
|
85
85
|
});
|
|
86
86
|
delete DOMProps.id;
|
|
87
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ $dbSRa$react__default.createElement("div", {
|
|
88
88
|
...DOMProps,
|
|
89
89
|
...renderProps,
|
|
90
90
|
ref,
|
|
@@ -93,7 +93,7 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
93
93
|
"data-invalid": validation.isInvalid || void 0,
|
|
94
94
|
"data-readonly": props.isReadOnly || void 0,
|
|
95
95
|
"data-required": props.isRequired || void 0
|
|
96
|
-
}, /* @__PURE__ */
|
|
96
|
+
}, /* @__PURE__ */ $dbSRa$react__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
97
97
|
values: [
|
|
98
98
|
[
|
|
99
99
|
$01b77f81d0f07f68$export$75b6ee27786ba447,
|
|
@@ -159,11 +159,14 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
159
159
|
* @param {string} [props.className] - Classes to pass to the input field.
|
|
160
160
|
* @param {string} [props.wrapperClassName] - Classes to pass to the input field wrapping element.
|
|
161
161
|
* @param {boolean} [props.monospaceFont] - If `true`, the input uses a monospace font. Useful for things like IDs to make them easier to read.
|
|
162
|
+
* @param {boolean} [props.flat] - If `true`, component will look more flat. Useful for nested layer of controls.
|
|
163
|
+
* @param {InputSize} [props.size='default'] - Sets the size of the input field.
|
|
162
164
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
163
165
|
*
|
|
164
166
|
* @returns {JSX.Element} The InputField component.
|
|
165
167
|
*
|
|
166
168
|
* @typedef {'text' | 'search' | 'url' | 'tel' | 'email' | 'password' | 'multiline'} InputType
|
|
169
|
+
* @typedef {'small' | 'medium' | 'default' | 'large'} InputSize
|
|
167
170
|
*
|
|
168
171
|
* @example
|
|
169
172
|
* <InputField
|
|
@@ -175,10 +178,103 @@ const $bcdf0525bf22703d$export$2c73285ae9390cec = /* @__PURE__ */ $f39a9eba43920
|
|
|
175
178
|
* @preserve
|
|
176
179
|
*/
|
|
177
180
|
const InputField = (props) => {
|
|
178
|
-
const {
|
|
181
|
+
const {
|
|
182
|
+
icon,
|
|
183
|
+
label,
|
|
184
|
+
subtitle,
|
|
185
|
+
help,
|
|
186
|
+
actions,
|
|
187
|
+
inline,
|
|
188
|
+
value,
|
|
189
|
+
onChange,
|
|
190
|
+
type = "text",
|
|
191
|
+
disabled,
|
|
192
|
+
readOnly,
|
|
193
|
+
className,
|
|
194
|
+
flat,
|
|
195
|
+
size,
|
|
196
|
+
wrapperClassName,
|
|
197
|
+
hidden,
|
|
198
|
+
monospaceFont,
|
|
199
|
+
...other
|
|
200
|
+
} = props;
|
|
179
201
|
if (hidden) {
|
|
180
202
|
return null;
|
|
181
203
|
}
|
|
204
|
+
const inputClass = cva(
|
|
205
|
+
[
|
|
206
|
+
"es:leading-none",
|
|
207
|
+
"es:border-none",
|
|
208
|
+
"es:w-fill",
|
|
209
|
+
"es:rounded-lg es:focus:rounded-xl",
|
|
210
|
+
"es:transition-plus",
|
|
211
|
+
"es:any-focus:outline-hidden",
|
|
212
|
+
"es:inset-ring",
|
|
213
|
+
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/30",
|
|
214
|
+
"es:focus-visible:text-accent-950 es:focus-visible:inset-ring-accent-500",
|
|
215
|
+
"es:focus:placeholder:text-surface-400",
|
|
216
|
+
className
|
|
217
|
+
],
|
|
218
|
+
{
|
|
219
|
+
variants: {
|
|
220
|
+
size: {
|
|
221
|
+
small: ["es:min-h-8", "es:px-2.5"],
|
|
222
|
+
medium: ["es:min-h-9", "es:px-3"],
|
|
223
|
+
default: ["es:min-h-10", "es:px-3"],
|
|
224
|
+
large: ["es:min-h-12", "es:px-4"]
|
|
225
|
+
},
|
|
226
|
+
mono: {
|
|
227
|
+
true: "es:font-mono es:text-12",
|
|
228
|
+
false: [
|
|
229
|
+
'es:text-13 es:font-variation-["wdth"_80,"YTLC"_520,"wght"_300,"slnt"_0]',
|
|
230
|
+
'es:tracking-wide es:placeholder-shown:font-variation-["wdth"_100,"YTLC"_500,"wght"_250,"slnt"_-8]'
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
multiline: {
|
|
234
|
+
false: "es:py-2",
|
|
235
|
+
true: "es:py-3 es:rounded-br-sm!"
|
|
236
|
+
},
|
|
237
|
+
disabled: {
|
|
238
|
+
false: "es:selection:bg-surface-100 es:selection:text-accent-800",
|
|
239
|
+
true: "es:selection:bg-secondary-200 es:selection:text-secondary-600"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
compoundVariants: [
|
|
243
|
+
{
|
|
244
|
+
flat: false,
|
|
245
|
+
disabled: false,
|
|
246
|
+
readOnly: false,
|
|
247
|
+
class: [
|
|
248
|
+
"es:bg-white",
|
|
249
|
+
"es:bg-linear-to-b es:from-secondary-100/0 es:to-secondary-100/50 es:from-25%",
|
|
250
|
+
"es:hover:from-surface-100/0 es:hover:to-surface-100/50",
|
|
251
|
+
"es:inset-ring-secondary-400/50 es:hover:inset-ring-surface-300 es:focus:inset-ring-surface-400",
|
|
252
|
+
"es:inset-shadow-sm es:inset-shadow-secondary-100/50",
|
|
253
|
+
"es:hover:placeholder:text-surface-400",
|
|
254
|
+
"es:placeholder:text-secondary-400",
|
|
255
|
+
"es:shadow-xs es:shadow-black/5"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
flat: true,
|
|
260
|
+
disabled: false,
|
|
261
|
+
readOnly: false,
|
|
262
|
+
class: [
|
|
263
|
+
"es:inset-ring-secondary-100",
|
|
264
|
+
"es:focus:text-accent-950",
|
|
265
|
+
"es:placeholder:text-secondary-500/80",
|
|
266
|
+
"es:bg-secondary-100 es:focus:bg-surface-50",
|
|
267
|
+
"es:inset-ring-secondary-200/15 es:hover:inset-ring-secondary-200/65 es:focus:inset-ring-surface-200",
|
|
268
|
+
"es:shadow-none"
|
|
269
|
+
]
|
|
270
|
+
},
|
|
271
|
+
{ disabled: true, class: ["es:bg-secondary-50 es:inset-ring-secondary-200 es:text-secondary-400"] },
|
|
272
|
+
{ readOnly: true, flat: false, class: ["es:bg-secondary-50 es:inset-ring-secondary-300 es:text-secondary-400"] },
|
|
273
|
+
{ readOnly: true, flat: true, class: ["es:bg-secondary-50 es:inset-ring-secondary-300/60 es:text-secondary-400"] }
|
|
274
|
+
],
|
|
275
|
+
defaultVariants: { disabled: false, flat: false, mono: false, size: "default", multiline: false, readOnly: false }
|
|
276
|
+
}
|
|
277
|
+
);
|
|
182
278
|
return /* @__PURE__ */ jsx(
|
|
183
279
|
$bcdf0525bf22703d$export$2c73285ae9390cec,
|
|
184
280
|
{
|
|
@@ -204,17 +300,7 @@ const InputField = (props) => {
|
|
|
204
300
|
{
|
|
205
301
|
...other,
|
|
206
302
|
type,
|
|
207
|
-
className:
|
|
208
|
-
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950 es:bg-white",
|
|
209
|
-
"es:any-focus:outline-hidden",
|
|
210
|
-
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
211
|
-
"es:focus-visible:border-accent-500",
|
|
212
|
-
"es:inset-ring es:inset-ring-secondary-100",
|
|
213
|
-
"es:disabled:shadow-none! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
|
|
214
|
-
type === "search" && "es:[&::-webkit-search-cancel-button]:hidden",
|
|
215
|
-
(monospaceFont || type === "password") && "es:font-mono",
|
|
216
|
-
className
|
|
217
|
-
),
|
|
303
|
+
className: inputClass({ disabled, flat, size, readOnly, mono: monospaceFont || type === "password" }),
|
|
218
304
|
onKeyUp: (e) => {
|
|
219
305
|
if (type === "search" && e.key === "Escape") {
|
|
220
306
|
onChange("");
|
|
@@ -229,16 +315,7 @@ const InputField = (props) => {
|
|
|
229
315
|
$216918bed6669f72$export$f5c9f3c2c4054eec,
|
|
230
316
|
{
|
|
231
317
|
...other,
|
|
232
|
-
className:
|
|
233
|
-
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:p-2 es:text-sm es:shadow-sm es:not-readonly:focus:shadow-md es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950",
|
|
234
|
-
"es:any-focus:outline-hidden",
|
|
235
|
-
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
236
|
-
"es:focus-visible:border-accent-500",
|
|
237
|
-
"es:inset-ring es:inset-ring-secondary-100",
|
|
238
|
-
"es:disabled:shadow-none! es:readonly:shadow-xs! es:disabled:border-secondary-200 es:disabled:bg-secondary-50 es:disabled:text-secondary-500 es:disabled:cursor-default es:readonly:bg-secondary-50",
|
|
239
|
-
monospaceFont && "es:font-mono",
|
|
240
|
-
className
|
|
241
|
-
)
|
|
318
|
+
className: inputClass({ disabled, flat, size, readOnly, mono: monospaceFont, multiline: true })
|
|
242
319
|
}
|
|
243
320
|
)
|
|
244
321
|
]
|