@eightshift/ui-components 8.1.0 → 8.2.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/{Autocomplete-BUU44AuW.js → Autocomplete-CO9aIsTe.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DO3oQfCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-Bdqjmtt2.js} +293 -160
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BTSsPhG9.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-Cj6cUR6X.js} +8 -6
- package/dist/{Heading-BWTs9ckA.js → Heading-BQje2nS2.js} +1 -1
- package/dist/{I18nProvider-BskRMK8G.js → I18nProvider-R_4IDnf9.js} +1 -1
- package/dist/{Label-UpU4cKPh.js → Label-C4bJkVti.js} +1 -1
- package/dist/{ListBox-DepY-52g.js → ListBox-CBvtIFuB.js} +20 -16
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-Dxzko0ma.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-zY9JqR1c.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-BXc72kE0.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-i-ZK4MiL.js} +1 -1
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-CsM0VnV1.js} +2 -2
- package/dist/{animation-DpSgtWyu.js → animation-COc9P6ap.js} +2 -4
- package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-XSk_8UW7.js → button-C7mc6eS1.js} +15 -12
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DlG5DILl.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-D6xMLGU-.js} +14 -15
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.d.ts +4 -30
- package/dist/components/base-control/container.js +5 -32
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +7 -7
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +3 -3
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +2 -2
- package/dist/components/draggable/draggable.d.ts +3 -3
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list.d.ts +3 -3
- package/dist/components/draggable-list/draggable-list.js +8 -8
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/index.js +16 -16
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.d.ts +3 -28
- package/dist/components/item-collection/item-collection.js +6 -6
- package/dist/components/link-input/link-input.d.ts +0 -2
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +4 -3
- package/dist/components/menu/menu.js +10 -7
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.d.ts +1 -1
- package/dist/components/option-select/option-select.js +21 -15
- package/dist/components/options-panel/options-panel.js +4 -4
- package/dist/components/placeholders/file-picker-shell.js +4 -3
- package/dist/components/placeholders/file-placeholder.js +2 -1
- package/dist/components/popover/popover.js +3 -3
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater-context.d.ts +0 -1
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +7 -10
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +30 -30
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +12 -10
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +28 -28
- package/dist/components/responsive-preview/responsive-preview.js +3 -3
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +39 -20
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +38 -20
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +19 -19
- package/dist/components/select/shared.d.ts +5 -9
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.d.ts +2 -8
- package/dist/components/select/single-select.js +16 -16
- package/dist/components/slider/column-config-slider.js +7 -5
- package/dist/components/slider/slider.js +15 -11
- package/dist/components/smart-image/smart-image.d.ts +0 -1
- package/dist/components/smart-image/smart-image.js +52 -50
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +2 -2
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-9MfdTVWP.js → draggable-BUfOpGSZ.js} +129 -124
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-_q3XF10i.js} +38 -29
- package/dist/icons/block-icon.js +1 -1
- package/dist/icons/icon.d.ts +3 -3
- package/dist/icons/icon.js +21 -9
- package/dist/icons/icons.d.ts +210 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.d.ts +5 -4
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +16 -16
- package/dist/{input-field-nN6BO0oz.js → input-field-QzBpjm-m.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-BxnnQA2Z.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-CElQp3lP.js} +145 -87
- package/dist/{modal-B5axB0Fc.js → modal-BeacK9N_.js} +14 -13
- package/dist/{number-picker-nnOf0XnN.js → number-picker-CK_OHBXw.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-C6Y6cCOx.js} +194 -215
- package/dist/{shared-Ba_bt4s9.js → shared-DBCipn_m.js} +59 -43
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-2-X3ridX.js} +58 -53
- package/dist/{switch-BJ4_OyUm.js → switch-B87lQ1V0.js} +6 -6
- package/dist/{tabs-wAe0AAyu.js → tabs-DgkJUkIX.js} +33 -28
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-5Qk8tLtm.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-B2-f2rU6.js} +8 -7
- package/dist/{tooltip-BW9nj5-V.js → tooltip-AzOLps8g.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-BIrfoiY8.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-LQlZnc1u.js} +267 -180
- package/dist/{useEvent-CzuFZ2HT.js → useEvent-Bih8lvtM.js} +1 -1
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-BFaOw4yi.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-ZXFsftJJ.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-DDJhIIfG.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-BfnJKcdX.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CbyH227W.js} +216 -39
- package/dist/{useLabel-DuxAjaic.js → useLabel-gfFDE4bn.js} +2 -2
- package/dist/{useLabels-NUsp5IW3.js → useLabels-Dcg-cEyM.js} +1 -1
- package/dist/{useListState-FLxa7R_U.js → useListState-I22DfnmE.js} +4 -2
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-C1gD0RuW.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-Cpc_IbQf.js} +12 -9
- package/dist/{usePress-DRoujMNm.js → usePress-BF7otjax.js} +30 -19
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-CnTuCBMs.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-Cgv5UXaB.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-Cy1E36QZ.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +1 -1
- package/dist/utilities/array-helpers.js +4 -3
- package/dist/utilities/debounce-throttle.d.ts +9 -2
- package/dist/utilities/es-dash.d.ts +11 -8
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/text-helpers.js +1 -1
- package/dist/utilities/web-workers.d.ts +7 -7
- package/dist/utilities/web-workers.js +5 -5
- package/dist/{utils-Czi6q2Ub.js → utils-ClM91CuL.js} +30 -19
- package/package.json +21 -25
|
@@ -75,6 +75,11 @@ function has$1(obj, propsArg) {
|
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region lib/utilities/es-dash.ts
|
|
78
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
79
|
+
var isRuntimeValueArray = (value) => Array.isArray(value);
|
|
80
|
+
var getObjectEntries = (value) => {
|
|
81
|
+
return Object.entries(value);
|
|
82
|
+
};
|
|
78
83
|
/**
|
|
79
84
|
* Returns a camelCase-formatted string.
|
|
80
85
|
*
|
|
@@ -165,8 +170,8 @@ var isEmpty = (input) => objectIsEmpty(input);
|
|
|
165
170
|
* upperFirst('new super Test-title') // => 'New super Test-title'
|
|
166
171
|
*/
|
|
167
172
|
var upperFirst = (input) => {
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
if (input === void 0) return "";
|
|
174
|
+
const normalizedInput = isStringValue(input) ? input : String(input);
|
|
170
175
|
if (input === true) return "True";
|
|
171
176
|
else if (input === false) return "False";
|
|
172
177
|
if (normalizedInput.length < 2) return normalizedInput.toUpperCase();
|
|
@@ -183,8 +188,8 @@ var upperFirst = (input) => {
|
|
|
183
188
|
* lowerFirst('New super Test-title') // => 'new super Test-title'
|
|
184
189
|
*/
|
|
185
190
|
var lowerFirst = (input) => {
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
if (input === void 0) return "";
|
|
192
|
+
const normalizedInput = isStringValue(input) ? input : String(input);
|
|
188
193
|
if (input === true) return "true";
|
|
189
194
|
else if (input === false) return "false";
|
|
190
195
|
if (normalizedInput.length < 2) return normalizedInput.toLowerCase();
|
|
@@ -223,12 +228,9 @@ var has = (obj, key) => objectHas(obj, key);
|
|
|
223
228
|
* ```
|
|
224
229
|
*/
|
|
225
230
|
var isPlainObject = (value) => {
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (proto === null) return true;
|
|
230
|
-
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
231
|
-
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
|
231
|
+
if (value === null || Object.prototype.toString.call(value) !== "[object Object]") return false;
|
|
232
|
+
const prototype = Object.getPrototypeOf(value);
|
|
233
|
+
return prototype === null || prototype === Object.prototype;
|
|
232
234
|
};
|
|
233
235
|
/**
|
|
234
236
|
* Checks if value is the language type of `Object`.
|
|
@@ -265,48 +267,17 @@ var isObject = (input) => input instanceof Object;
|
|
|
265
267
|
* ```
|
|
266
268
|
*/
|
|
267
269
|
var isEqual = (first, second) => {
|
|
268
|
-
if (first
|
|
269
|
-
if ((first
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if (firstType === "Array") {
|
|
273
|
-
const firstArr = first;
|
|
274
|
-
const secondArr = second;
|
|
275
|
-
if (firstArr.length !== secondArr.length) return false;
|
|
276
|
-
let equal = true;
|
|
277
|
-
for (let i = 0; i < firstArr.length; i++) if (!isEqual(firstArr[i], secondArr[i])) {
|
|
278
|
-
equal = false;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
return equal;
|
|
282
|
-
}
|
|
283
|
-
if (firstType === "Object") {
|
|
284
|
-
let equal = true;
|
|
285
|
-
const fKeys = Object.keys(first);
|
|
286
|
-
const sKeys = Object.keys(second);
|
|
287
|
-
if (fKeys.length !== sKeys.length) return false;
|
|
288
|
-
const firstObj = first;
|
|
289
|
-
const secondObj = second;
|
|
290
|
-
for (let i = 0; i < fKeys.length; i++) {
|
|
291
|
-
const key = fKeys[i];
|
|
292
|
-
if (firstObj[key] && secondObj[key]) {
|
|
293
|
-
if (firstObj[key] === secondObj[key]) continue;
|
|
294
|
-
const firstValType = firstObj[key]?.constructor?.name;
|
|
295
|
-
if (firstObj[key] && (firstValType === "Array" || firstValType === "Object")) {
|
|
296
|
-
equal = isEqual(firstObj[key], secondObj[key]);
|
|
297
|
-
if (!equal) break;
|
|
298
|
-
} else if (firstObj[key] !== secondObj[key]) {
|
|
299
|
-
equal = false;
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
} else if (firstObj[key] && !secondObj[key] || !firstObj[key] && secondObj[key]) {
|
|
303
|
-
equal = false;
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
return equal;
|
|
270
|
+
if (Object.is(first, second)) return true;
|
|
271
|
+
if (isRuntimeValueArray(first) || isRuntimeValueArray(second)) {
|
|
272
|
+
if (!isRuntimeValueArray(first) || !isRuntimeValueArray(second) || first.length !== second.length) return false;
|
|
273
|
+
return first.every((value, index) => isEqual(value, second[index]));
|
|
308
274
|
}
|
|
309
|
-
|
|
275
|
+
if (!isPlainObject(first) || !isPlainObject(second)) return false;
|
|
276
|
+
const firstEntries = getObjectEntries(first);
|
|
277
|
+
const secondEntries = new Map(getObjectEntries(second));
|
|
278
|
+
if (firstEntries.length !== secondEntries.size) return false;
|
|
279
|
+
for (const [key, value] of firstEntries) if (!secondEntries.has(key) || !isEqual(value, secondEntries.get(key))) return false;
|
|
280
|
+
return true;
|
|
310
281
|
};
|
|
311
282
|
/**
|
|
312
283
|
* Checks if value is the language type of `String`.
|
|
@@ -322,6 +293,6 @@ var isEqual = (first, second) => {
|
|
|
322
293
|
* isString(new String('Lorem')) // => false
|
|
323
294
|
* ```
|
|
324
295
|
*/
|
|
325
|
-
var isString = (value) =>
|
|
296
|
+
var isString = (value) => isStringValue(value);
|
|
326
297
|
//#endregion
|
|
327
298
|
export { isObject as a, kebabCase as c, snakeCase as d, upperFirst as f, isEqual as i, lowerFirst as l, has as n, isPlainObject as o, isEmpty as r, isString as s, camelCase as t, pascalCase as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { t as SolidColorPicker } from "./solid-color-picker-
|
|
3
|
-
import { t as ColorSwatch } from "./color-swatch-
|
|
4
|
-
import { t as NumberPicker } from "./number-picker-
|
|
5
|
-
import { n as ButtonGroup, t as Button } from "./button-
|
|
2
|
+
import { t as SolidColorPicker } from "./solid-color-picker-2-X3ridX.js";
|
|
3
|
+
import { t as ColorSwatch } from "./color-swatch-D6xMLGU-.js";
|
|
4
|
+
import { t as NumberPicker } from "./number-picker-CK_OHBXw.js";
|
|
5
|
+
import { n as ButtonGroup, t as Button } from "./button-C7mc6eS1.js";
|
|
6
6
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
7
7
|
import { isColorDark } from "./utilities/general.js";
|
|
8
8
|
import { t as sprintf } from "./sprintf-xJRAt4p0.js";
|
|
@@ -17,7 +17,7 @@ import { sliders } from "./icons/ui-icons/sliders.js";
|
|
|
17
17
|
import { trash } from "./icons/ui-icons/trash.js";
|
|
18
18
|
import { TriggeredPopover } from "./components/popover/popover.js";
|
|
19
19
|
import { Menu, MenuItem } from "./components/menu/menu.js";
|
|
20
|
-
import { Container, ContainerGroup } from "./components/base-control/container.js";
|
|
20
|
+
import { Container as TypedContainer, ContainerGroup as TypedContainerGroup } from "./components/base-control/container.js";
|
|
21
21
|
import { DraggableList } from "./components/draggable-list/draggable-list.js";
|
|
22
22
|
import { DraggableListItem } from "./components/draggable-list/draggable-list-item.js";
|
|
23
23
|
import { MatrixAlign } from "./components/matrix-align/matrix-align.js";
|
|
@@ -734,7 +734,6 @@ var parseHex = (src) => {
|
|
|
734
734
|
case 4: return rotateRight(interleave4_16_32(val), 8);
|
|
735
735
|
case 6: return (val | 4278190080) >>> 0;
|
|
736
736
|
case 8: return rotateRight(val, 8);
|
|
737
|
-
default:
|
|
738
737
|
}
|
|
739
738
|
}
|
|
740
739
|
return illegalArgs(`invalid hex color: "${src}"`);
|
|
@@ -1202,8 +1201,12 @@ var defaultGradientData = {
|
|
|
1202
1201
|
}
|
|
1203
1202
|
}]
|
|
1204
1203
|
};
|
|
1204
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
1205
|
+
var isObjectValue = (value) => value !== null && Object.prototype.toString.call(value) === "[object Object]";
|
|
1206
|
+
var isGradientType = (value) => value === "linear" || value === "radial" || value === "conic";
|
|
1207
|
+
var isGradientForm = (value) => value === "circle" || value === "ellipse";
|
|
1205
1208
|
var getGradientResult = (input, type) => {
|
|
1206
|
-
if (!input || !type ||
|
|
1209
|
+
if (!input || !type || isStringValue(input) || !input.stops) return "";
|
|
1207
1210
|
let output = "";
|
|
1208
1211
|
if (input.repeating) output += "repeating-";
|
|
1209
1212
|
output += `${type}-gradient(`;
|
|
@@ -1213,11 +1216,11 @@ var getGradientResult = (input, type) => {
|
|
|
1213
1216
|
else if (orientation?.type === "directional") output += `to ${orientation.value}, `;
|
|
1214
1217
|
}
|
|
1215
1218
|
if (type === "radial") {
|
|
1216
|
-
const radialPosition =
|
|
1217
|
-
output += `${input
|
|
1219
|
+
const radialPosition = isObjectValue(input.position) ? input.position : void 0;
|
|
1220
|
+
output += `${input["shape"] ?? "circle"} at ${radialPosition?.x?.value ?? "center"} ${radialPosition?.y?.value ?? "center"}, `;
|
|
1218
1221
|
}
|
|
1219
1222
|
if (type === "conic") {
|
|
1220
|
-
const conicPosition =
|
|
1223
|
+
const conicPosition = isStringValue(input.position) ? input.position : "center";
|
|
1221
1224
|
output += `from ${input.angle ?? "0deg"} at ${conicPosition}, `;
|
|
1222
1225
|
}
|
|
1223
1226
|
output += input.stops.map((stop) => `${stop.color} ${stop.offset?.value ?? ""}${stop.offset?.unit ?? ""}`.trim()).join(", ");
|
|
@@ -1296,7 +1299,7 @@ var getGradientType = (value) => {
|
|
|
1296
1299
|
if (value?.startsWith("conic-gradient") || value?.startsWith("repeating-conic-gradient")) return "conic";
|
|
1297
1300
|
return "linear";
|
|
1298
1301
|
};
|
|
1299
|
-
var stringifyGradientAxisValue = (value) =>
|
|
1302
|
+
var stringifyGradientAxisValue = (value) => isStringValue(value) ? value : `${value.value}${value.unit}`;
|
|
1300
1303
|
var parseGradientData = (value, type) => {
|
|
1301
1304
|
try {
|
|
1302
1305
|
if (type === "radial") {
|
|
@@ -1325,7 +1328,11 @@ var parseGradientData = (value, type) => {
|
|
|
1325
1328
|
return defaultGradientData;
|
|
1326
1329
|
}
|
|
1327
1330
|
};
|
|
1328
|
-
var toMatrixAlignValue = (x = "center", y = "center") =>
|
|
1331
|
+
var toMatrixAlignValue = (x = "center", y = "center") => {
|
|
1332
|
+
const value = `${y} ${x}`;
|
|
1333
|
+
if (value === "top left" || value === "top center" || value === "top right" || value === "center left" || value === "center center" || value === "center right" || value === "bottom left" || value === "bottom center" || value === "bottom right") return value;
|
|
1334
|
+
return "center center";
|
|
1335
|
+
};
|
|
1329
1336
|
var parseMatrixAlignValue = (value) => {
|
|
1330
1337
|
const [y = "center", x = "center"] = value.split(" ");
|
|
1331
1338
|
return {
|
|
@@ -1359,12 +1366,12 @@ var GradientEditor = (props) => {
|
|
|
1359
1366
|
onChange(getGradientResult(data, gradientType));
|
|
1360
1367
|
};
|
|
1361
1368
|
const stops = gradientData.stops ?? defaultGradientData.stops;
|
|
1362
|
-
const radialPosition =
|
|
1363
|
-
const conicPosition =
|
|
1369
|
+
const radialPosition = isObjectValue(gradientData.position) ? gradientData.position : void 0;
|
|
1370
|
+
const conicPosition = isStringValue(gradientData.position) ? gradientData.position : "center center";
|
|
1364
1371
|
return jsxs("div", {
|
|
1365
1372
|
className: "es:w-full es:space-y-2.5",
|
|
1366
1373
|
children: [
|
|
1367
|
-
jsx(
|
|
1374
|
+
jsx(TypedContainerGroup, { children: jsxs(TypedContainer, { children: [jsx("button", {
|
|
1368
1375
|
className: clsx("es:shadow-sm, es:mx-auto es:block es:h-40 es:rounded-lg es:border es:border-secondary-300 es:transition-[width] es:duration-300 es:ease-spring-snappy", "es:mb-2", squarePreview ? "es:w-40" : "es:w-full"),
|
|
1369
1376
|
style: { backgroundImage: outputGradient },
|
|
1370
1377
|
onClick: () => setSquarePreview((previousValue) => !previousValue),
|
|
@@ -1410,16 +1417,18 @@ var GradientEditor = (props) => {
|
|
|
1410
1417
|
tooltipContent: (currentValue) => `${Math.round(currentValue)}%`
|
|
1411
1418
|
})
|
|
1412
1419
|
})] }) }),
|
|
1413
|
-
jsxs(
|
|
1414
|
-
jsx(
|
|
1420
|
+
jsxs(TypedContainerGroup, { children: [
|
|
1421
|
+
jsx(TypedContainer, { children: jsx(OptionSelect, {
|
|
1415
1422
|
label: __("Type", "eightshift-ui-components"),
|
|
1416
1423
|
value: gradientType,
|
|
1417
|
-
onChange: (nextType) =>
|
|
1424
|
+
onChange: (nextType) => {
|
|
1425
|
+
if (isGradientType(nextType)) onChange(getGradientResult({ stops }, nextType));
|
|
1426
|
+
},
|
|
1418
1427
|
options: gradientTypes,
|
|
1419
1428
|
type: "toggleButtons",
|
|
1420
1429
|
inline: true
|
|
1421
1430
|
}) }),
|
|
1422
|
-
jsx(
|
|
1431
|
+
jsx(TypedContainer, {
|
|
1423
1432
|
hidden: gradientType !== "linear",
|
|
1424
1433
|
children: jsx(NumberPicker, {
|
|
1425
1434
|
inline: true,
|
|
@@ -1468,7 +1477,7 @@ var GradientEditor = (props) => {
|
|
|
1468
1477
|
})
|
|
1469
1478
|
})
|
|
1470
1479
|
}),
|
|
1471
|
-
jsx(
|
|
1480
|
+
jsx(TypedContainer, {
|
|
1472
1481
|
hidden: gradientType !== "radial",
|
|
1473
1482
|
children: jsx(OptionSelect, {
|
|
1474
1483
|
label: __("Shape", "eightshift-ui-components"),
|
|
@@ -1481,16 +1490,16 @@ var GradientEditor = (props) => {
|
|
|
1481
1490
|
label: __("Ellipse", "eightshift-ui-components"),
|
|
1482
1491
|
value: "ellipse"
|
|
1483
1492
|
}],
|
|
1484
|
-
value: gradientData
|
|
1493
|
+
value: gradientData["shape"],
|
|
1485
1494
|
onChange: (nextValue) => {
|
|
1486
|
-
setGradientData({
|
|
1495
|
+
if (isGradientForm(nextValue)) setGradientData({
|
|
1487
1496
|
...gradientData,
|
|
1488
|
-
shape: nextValue
|
|
1497
|
+
"shape": nextValue
|
|
1489
1498
|
});
|
|
1490
1499
|
}
|
|
1491
1500
|
})
|
|
1492
1501
|
}),
|
|
1493
|
-
jsx(
|
|
1502
|
+
jsx(TypedContainer, {
|
|
1494
1503
|
hidden: gradientType !== "radial",
|
|
1495
1504
|
children: jsx(MatrixAlign, {
|
|
1496
1505
|
icon: centerPoint,
|
|
@@ -1514,7 +1523,7 @@ var GradientEditor = (props) => {
|
|
|
1514
1523
|
}
|
|
1515
1524
|
})
|
|
1516
1525
|
}),
|
|
1517
|
-
jsx(
|
|
1526
|
+
jsx(TypedContainer, {
|
|
1518
1527
|
hidden: gradientType !== "conic",
|
|
1519
1528
|
children: jsx(NumberPicker, {
|
|
1520
1529
|
inline: true,
|
|
@@ -1534,7 +1543,7 @@ var GradientEditor = (props) => {
|
|
|
1534
1543
|
suffix: "°"
|
|
1535
1544
|
})
|
|
1536
1545
|
}),
|
|
1537
|
-
jsx(
|
|
1546
|
+
jsx(TypedContainer, {
|
|
1538
1547
|
hidden: gradientType !== "conic",
|
|
1539
1548
|
children: jsx(MatrixAlign, {
|
|
1540
1549
|
icon: centerPoint,
|
|
@@ -1552,7 +1561,7 @@ var GradientEditor = (props) => {
|
|
|
1552
1561
|
}
|
|
1553
1562
|
})
|
|
1554
1563
|
}),
|
|
1555
|
-
jsx(
|
|
1564
|
+
jsx(TypedContainer, { children: jsx(Toggle, {
|
|
1556
1565
|
checked: Boolean(gradientData.repeating),
|
|
1557
1566
|
onChange: (nextValue) => {
|
|
1558
1567
|
setGradientData({
|
|
@@ -1581,13 +1590,13 @@ var GradientEditor = (props) => {
|
|
|
1581
1590
|
"aria-label": __("Add stop", "eightshift-ui-components")
|
|
1582
1591
|
})
|
|
1583
1592
|
}),
|
|
1584
|
-
jsx(
|
|
1593
|
+
jsx(TypedContainerGroup, { children: jsx(TypedDraggableList, {
|
|
1585
1594
|
items: stops,
|
|
1586
1595
|
onChange: (items) => {
|
|
1587
1596
|
setGradientData({
|
|
1588
1597
|
...gradientData,
|
|
1589
1598
|
stops: items.map(({ color }, index) => ({
|
|
1590
|
-
...stops[index]
|
|
1599
|
+
...stops[index],
|
|
1591
1600
|
color
|
|
1592
1601
|
}))
|
|
1593
1602
|
});
|
package/dist/icons/block-icon.js
CHANGED
|
@@ -26,7 +26,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
26
26
|
* @returns {JSX.Element} The BlockIcon component.
|
|
27
27
|
*/
|
|
28
28
|
var BlockIcon = ({ iconName }) => jsx("i", {
|
|
29
|
-
dangerouslySetInnerHTML: { __html: blockIcons[iconName] ?? "" },
|
|
29
|
+
dangerouslySetInnerHTML: { __html: Object.entries(blockIcons).find(([name]) => name === iconName)?.[1] ?? "" },
|
|
30
30
|
style: { lineHeight: 0 }
|
|
31
31
|
});
|
|
32
32
|
//#endregion
|
package/dist/icons/icon.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type JSX } from 'react';
|
|
2
|
-
|
|
1
|
+
import { type ComponentPropsWithoutRef, type JSX } from 'react';
|
|
2
|
+
type IconPresentationProps = Omit<ComponentPropsWithoutRef<'svg'>, 'children'>;
|
|
3
|
+
interface IconProps extends IconPresentationProps {
|
|
3
4
|
icon?: JSX.Element | string | null;
|
|
4
5
|
fallback?: JSX.Element | null;
|
|
5
|
-
[key: string]: unknown;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Renders an icon by name without eagerly importing the entire icon set.
|
package/dist/icons/icon.js
CHANGED
|
@@ -5,6 +5,7 @@ import { cloneElement, memo, useEffect, useState } from "react";
|
|
|
5
5
|
var normalizeIconName = (name) => name.replace(/[-_]+([a-z0-9])/gi, (_, char) => char.toUpperCase()).replace(/^([A-Z])/, (char) => char.toLowerCase());
|
|
6
6
|
var iconCache = new Map();
|
|
7
7
|
var iconLoads = new Map();
|
|
8
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
8
9
|
var loadIcon = (iconName) => {
|
|
9
10
|
if (iconCache.has(iconName)) return Promise.resolve(iconCache.get(iconName) ?? null);
|
|
10
11
|
if (!iconLoads.has(iconName)) {
|
|
@@ -37,23 +38,34 @@ var renderIcon = (iconToRender, rest) => {
|
|
|
37
38
|
* @returns {JSX.Element | null} The Icon component.
|
|
38
39
|
*/
|
|
39
40
|
var Icon = memo(({ icon, fallback = null, ...rest }) => {
|
|
40
|
-
const normalizedIconName =
|
|
41
|
+
const normalizedIconName = isStringValue(icon) ? normalizeIconName(icon) : null;
|
|
41
42
|
const [loadedIcon, setLoadedIcon] = useState(() => normalizedIconName && iconCache.has(normalizedIconName) ? iconCache.get(normalizedIconName) ?? null : void 0);
|
|
42
43
|
useEffect(() => {
|
|
43
44
|
let isDisposed = false;
|
|
45
|
+
const updateLoadedIcon = (nextIcon) => {
|
|
46
|
+
queueMicrotask(() => {
|
|
47
|
+
if (!isDisposed) setLoadedIcon(nextIcon);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
44
50
|
if (!normalizedIconName) {
|
|
45
|
-
|
|
46
|
-
return
|
|
51
|
+
updateLoadedIcon(void 0);
|
|
52
|
+
return () => {
|
|
53
|
+
isDisposed = true;
|
|
54
|
+
};
|
|
47
55
|
}
|
|
48
56
|
if (iconCache.has(normalizedIconName)) {
|
|
49
|
-
|
|
50
|
-
return
|
|
57
|
+
updateLoadedIcon(iconCache.get(normalizedIconName) ?? null);
|
|
58
|
+
return () => {
|
|
59
|
+
isDisposed = true;
|
|
60
|
+
};
|
|
51
61
|
}
|
|
52
62
|
if (!hasIconLoader(normalizedIconName)) {
|
|
53
|
-
|
|
54
|
-
return
|
|
63
|
+
updateLoadedIcon(null);
|
|
64
|
+
return () => {
|
|
65
|
+
isDisposed = true;
|
|
66
|
+
};
|
|
55
67
|
}
|
|
56
|
-
|
|
68
|
+
updateLoadedIcon(void 0);
|
|
57
69
|
loadIcon(normalizedIconName).then((resolvedIcon) => {
|
|
58
70
|
if (!isDisposed) setLoadedIcon(resolvedIcon);
|
|
59
71
|
}).catch(() => void 0);
|
|
@@ -62,7 +74,7 @@ var Icon = memo(({ icon, fallback = null, ...rest }) => {
|
|
|
62
74
|
};
|
|
63
75
|
}, [normalizedIconName]);
|
|
64
76
|
if (!icon) return fallback;
|
|
65
|
-
if (
|
|
77
|
+
if (!isStringValue(icon)) return icon;
|
|
66
78
|
if (loadedIcon === void 0) return renderIcon(dummySpacer, rest);
|
|
67
79
|
if (!loadedIcon) return fallback;
|
|
68
80
|
return renderIcon(loadedIcon, rest);
|
package/dist/icons/icons.d.ts
CHANGED
|
@@ -4,4 +4,213 @@
|
|
|
4
4
|
* - `es-` prefixed icons are Eightshift blocks.
|
|
5
5
|
* - `esf-` prefixed icons are Eightshift forms blocks.
|
|
6
6
|
*/
|
|
7
|
-
export declare const blockIcons:
|
|
7
|
+
export declare const blockIcons: {
|
|
8
|
+
'es-button': string;
|
|
9
|
+
'es-card': string;
|
|
10
|
+
'es-columns': string;
|
|
11
|
+
'es-group': string;
|
|
12
|
+
'es-heading': string;
|
|
13
|
+
'es-image': string;
|
|
14
|
+
'es-link': string;
|
|
15
|
+
'es-lists': string;
|
|
16
|
+
'es-paragraph': string;
|
|
17
|
+
'es-accordion': string;
|
|
18
|
+
'es-column': string;
|
|
19
|
+
'es-carousel': string;
|
|
20
|
+
'es-featured-categories': string;
|
|
21
|
+
'es-featured-posts': string;
|
|
22
|
+
'es-video': string;
|
|
23
|
+
'es-button-block': string;
|
|
24
|
+
'es-card-simple': string;
|
|
25
|
+
'es-jumbotron': string;
|
|
26
|
+
'es-modal': string;
|
|
27
|
+
'es-map': string;
|
|
28
|
+
'es-tabs': string;
|
|
29
|
+
'es-audio': string;
|
|
30
|
+
'es-image-text': string;
|
|
31
|
+
'es-gallery': string;
|
|
32
|
+
'es-example': string;
|
|
33
|
+
'es-card-list': string;
|
|
34
|
+
'es-counter-card': string;
|
|
35
|
+
'es-video-text': string;
|
|
36
|
+
'es-team-member': string;
|
|
37
|
+
'es-timeline-item': string;
|
|
38
|
+
'es-simple-cta': string;
|
|
39
|
+
'es-video-button': string;
|
|
40
|
+
'es-featured-categories-posts': string;
|
|
41
|
+
'es-shortcode': string;
|
|
42
|
+
'es-email': string;
|
|
43
|
+
'es-card-buttons': string;
|
|
44
|
+
'es-card-person': string;
|
|
45
|
+
'es-card-bottom-image': string;
|
|
46
|
+
'es-card-number': string;
|
|
47
|
+
'es-card-comparison': string;
|
|
48
|
+
'es-card-featured': string;
|
|
49
|
+
'es-card-review': string;
|
|
50
|
+
'es-grid': string;
|
|
51
|
+
'es-grid-item': string;
|
|
52
|
+
'es-social-share': string;
|
|
53
|
+
'es-language-switcher': string;
|
|
54
|
+
'es-card-teaser': string;
|
|
55
|
+
'es-tab': string;
|
|
56
|
+
'es-tab-content': string;
|
|
57
|
+
'es-person-profile': string;
|
|
58
|
+
'es-footnotes': string;
|
|
59
|
+
'es-media': string;
|
|
60
|
+
'es-list-item': string;
|
|
61
|
+
'es-code': string;
|
|
62
|
+
'es-prev-next': string;
|
|
63
|
+
'es-accordion-item': string;
|
|
64
|
+
'es-price-card': string;
|
|
65
|
+
'es-toggle': string;
|
|
66
|
+
'es-card-vertical-image': string;
|
|
67
|
+
'es-accented-info': string;
|
|
68
|
+
'es-hero-special-1': string;
|
|
69
|
+
'es-stats': string;
|
|
70
|
+
'es-stats-with-image': string;
|
|
71
|
+
'es-lottie': string;
|
|
72
|
+
'es-fifty-fifty-text': string;
|
|
73
|
+
'es-fifty-fifty-img-text': string;
|
|
74
|
+
'es-fifty-fifty-list': string;
|
|
75
|
+
'es-fifty-fifty-img-text-alt': string;
|
|
76
|
+
'es-blog-content': string;
|
|
77
|
+
'es-divider': string;
|
|
78
|
+
'es-table': string;
|
|
79
|
+
'es-column-chart': string;
|
|
80
|
+
'es-highlighted-text': string;
|
|
81
|
+
'es-job-locations': string;
|
|
82
|
+
'es-marquee': string;
|
|
83
|
+
'es-masonry': string;
|
|
84
|
+
'es-multicolumn-list': string;
|
|
85
|
+
'es-card-side-image': string;
|
|
86
|
+
'es-button-scroll': string;
|
|
87
|
+
'es-horizontal-carousel': string;
|
|
88
|
+
'es-vertical-carousel': string;
|
|
89
|
+
'es-horizontal-carousel-auto': string;
|
|
90
|
+
'es-vertical-carousel-auto': string;
|
|
91
|
+
'es-side-scroll': string;
|
|
92
|
+
'es-list-container': string;
|
|
93
|
+
'es-text-on-image': string;
|
|
94
|
+
'es-hero-special-2': string;
|
|
95
|
+
'es-gallery-menu': string;
|
|
96
|
+
'es-filter-list': string;
|
|
97
|
+
'es-highlighted-columns': string;
|
|
98
|
+
'es-row': string;
|
|
99
|
+
'es-fifty-fifty-cards': string;
|
|
100
|
+
'es-fifty-fifty-item-list': string;
|
|
101
|
+
'es-event-list': string;
|
|
102
|
+
'es-iframe': string;
|
|
103
|
+
'es-iframe-modal': string;
|
|
104
|
+
'es-iframe-modal-trigger': string;
|
|
105
|
+
'es-simple-info': string;
|
|
106
|
+
'es-fifty-fifty-with-cta': string;
|
|
107
|
+
'es-fifty-fifty-with-cta-alt': string;
|
|
108
|
+
'es-fifty-fifty-item-list-star': string;
|
|
109
|
+
'es-navbar': string;
|
|
110
|
+
'es-multicolumn-list-alt': string;
|
|
111
|
+
'es-card-teaser-alt': string;
|
|
112
|
+
'es-fifty-fifty-three-rows': string;
|
|
113
|
+
'es-six-row-info': string;
|
|
114
|
+
'es-link-list': string;
|
|
115
|
+
'es-two-cards': string;
|
|
116
|
+
'es-link-banner': string;
|
|
117
|
+
'es-card-vertical-image-alt': string;
|
|
118
|
+
'es-card-vertical-image-alt-2': string;
|
|
119
|
+
'es-text-with-big-image': string;
|
|
120
|
+
'es-list-with-filters': string;
|
|
121
|
+
'es-blog-content-alt': string;
|
|
122
|
+
'es-two-items-with-images': string;
|
|
123
|
+
'es-card-bottom-image-alt': string;
|
|
124
|
+
'es-event-recording': string;
|
|
125
|
+
'es-four-image-masonry': string;
|
|
126
|
+
'es-text-on-image-alt': string;
|
|
127
|
+
'es-h-card-with-image': string;
|
|
128
|
+
'es-hero-special-3': string;
|
|
129
|
+
'es-blog-content-alt-2': string;
|
|
130
|
+
'es-card-teaser-alt-1': string;
|
|
131
|
+
'es-card-teaser-alt-2': string;
|
|
132
|
+
'es-podcast': string;
|
|
133
|
+
'es-fifty-fifty-item-list-alt': string;
|
|
134
|
+
'es-two-items-generic': string;
|
|
135
|
+
'es-card-teaser-alt-3': string;
|
|
136
|
+
'es-card-teaser-alt-4': string;
|
|
137
|
+
'es-multi-items-with-images': string;
|
|
138
|
+
'es-multi-h-cards': string;
|
|
139
|
+
'es-auto-scroll-h-cards': string;
|
|
140
|
+
'es-fifty-fifty-img-text-alt-2': string;
|
|
141
|
+
'es-card-teaser-alt-5': string;
|
|
142
|
+
'es-four-items-w-text-generic': string;
|
|
143
|
+
'es-overflow-image': string;
|
|
144
|
+
'es-text-l-with-two-cards': string;
|
|
145
|
+
'es-text-l-with-two-cards-alt': string;
|
|
146
|
+
'es-card-teaser-alt-6': string;
|
|
147
|
+
'es-two-cards-w-nav-and-filters': string;
|
|
148
|
+
'es-two-cards-featured': string;
|
|
149
|
+
'es-circular-progress': string;
|
|
150
|
+
'es-infinum': string;
|
|
151
|
+
'es-table-of-contents': string;
|
|
152
|
+
'es-locations': string;
|
|
153
|
+
'es-tiktok': string;
|
|
154
|
+
'es-search-field': string;
|
|
155
|
+
'es-special-header-1': string;
|
|
156
|
+
'esf-captcha-basic': string;
|
|
157
|
+
'esf-checkbox': string;
|
|
158
|
+
'esf-form': string;
|
|
159
|
+
'esf-form-picker': string;
|
|
160
|
+
'esf-input': string;
|
|
161
|
+
'esf-radio': string;
|
|
162
|
+
'esf-select': string;
|
|
163
|
+
'esf-select-option': string;
|
|
164
|
+
'esf-submit': string;
|
|
165
|
+
'esf-textarea': string;
|
|
166
|
+
'esf-checkboxes': string;
|
|
167
|
+
'esf-radios': string;
|
|
168
|
+
'esf-custom-data': string;
|
|
169
|
+
'esf-file': string;
|
|
170
|
+
'esf-sender-email': string;
|
|
171
|
+
'esf-form-custom': string;
|
|
172
|
+
'esf-form-mailchimp': string;
|
|
173
|
+
'esf-form-greenhouse': string;
|
|
174
|
+
'esf-form-goodbits': string;
|
|
175
|
+
'esf-form-mailerlite': string;
|
|
176
|
+
'esf-form-hubspot': string;
|
|
177
|
+
'esf-form-salesforce': string;
|
|
178
|
+
'esf-form-zapier': string;
|
|
179
|
+
'esf-form-talentify': string;
|
|
180
|
+
'esf-form-airtable': string;
|
|
181
|
+
'esf-form-productive': string;
|
|
182
|
+
'esf-form-active-campaign': string;
|
|
183
|
+
'esf-form-campaign-monitor': string;
|
|
184
|
+
'esf-form-pardot': string;
|
|
185
|
+
'esf-form-clearbit': string;
|
|
186
|
+
'esf-google-optimize': string;
|
|
187
|
+
'esf-infobip': string;
|
|
188
|
+
'esf-workable': string;
|
|
189
|
+
'esf-country': string;
|
|
190
|
+
'esf-date': string;
|
|
191
|
+
'esf-time': string;
|
|
192
|
+
'esf-phone': string;
|
|
193
|
+
'esf-jira': string;
|
|
194
|
+
'esf-steps': string;
|
|
195
|
+
'esf-form-chilli-piper': string;
|
|
196
|
+
'esf-form-pipedrive': string;
|
|
197
|
+
'esf-form-cloudflare': string;
|
|
198
|
+
'esf-form-wp-rocket': string;
|
|
199
|
+
'esf-form-wpml': string;
|
|
200
|
+
'esf-star-rating': string;
|
|
201
|
+
'esf-store-entries': string;
|
|
202
|
+
'esf-calculate': string;
|
|
203
|
+
'esf-compute': string;
|
|
204
|
+
'esf-slider': string;
|
|
205
|
+
'esf-calculate-output': string;
|
|
206
|
+
'esf-calculate-field': string;
|
|
207
|
+
'esf-result-output': string;
|
|
208
|
+
'esf-success-output': string;
|
|
209
|
+
'esf-form-output': string;
|
|
210
|
+
'esf-variable-output': string;
|
|
211
|
+
'esf-block-filter': string;
|
|
212
|
+
'esf-talentlyft': string;
|
|
213
|
+
'esf-corvus-pay': string;
|
|
214
|
+
'esf-paycek': string;
|
|
215
|
+
'esf-nation-builder': string;
|
|
216
|
+
};
|
package/dist/icons/index.js
CHANGED
|
@@ -755,5 +755,5 @@ import { verticalAlignBetweenAlt } from "./ui-icons/vertical-align-between-alt.j
|
|
|
755
755
|
import { horizontalAlignAround } from "./ui-icons/horizontal-align-around.js";
|
|
756
756
|
import { horizontalAlignEvenly } from "./ui-icons/horizontal-align-evenly.js";
|
|
757
757
|
import { horizontalAlignBetweenAlt } from "./ui-icons/horizontal-align-between-alt.js";
|
|
758
|
-
import { t as JsxSvg } from "../jsx-svg-
|
|
758
|
+
import { t as JsxSvg } from "../jsx-svg-DRwJdRpA.js";
|
|
759
759
|
export { BlockIcon, GenericColorSwatch, Icon, JsxSvg, Spinner, a11y, a11yWarning, accelerometer, activityLog, add, alert, alignHorizontalVertical, alignHorizontalVerticalAlt, alignHorizontalVerticalAlt2, altText, altTextGeneric, altTextGenericAlt, anchor, anchorPage, angle, animation, animationFile, animationGeneric, animationListGeneric, animationSettingsGeneric, archive, archiveFile, ariaLabel, arrowDown, arrowDownCircle, arrowDownCircleAlt, arrowDownSquare, arrowDownSquareAlt, arrowLeft, arrowLeftCircle, arrowLeftCircleAlt, arrowLeftSquare, arrowLeftSquareAlt, arrowRight, arrowRightCircle, arrowRightCircleAlt, arrowRightSquare, arrowRightSquareAlt, arrowUp, arrowUpCircle, arrowUpCircleAlt, arrowUpSquare, arrowUpSquareAlt, arrowsDown, arrowsHorizontal, arrowsLeft, arrowsLeftDiagonal, arrowsRight, arrowsRightDiagonal, arrowsUp, arrowsVertical, aspectRatio, aspectRatioAuto, aspectRatioNineSixteen, aspectRatioSixteenNine, aspectRatioSquare, aspectRatioThreeTwo, aspectRatioTwentyOneNine, attachment, autoClose, autoPause, autoPauseScroll, automatic, automaticAlt, autoplay, autoplayAlt, autoplayAlt2, award, backgroundBlur, backgroundColorSwatch, backgroundImage, backgroundRepeat, backgroundType, backgroundTypeAlt, backgroundTypeAlt2, blockIcons, blockParts, bold, book, bookmark, booleanExclude, booleanIntersect, booleanSubtract, booleanUnion, border, borderColor, bot, botDeny, box, brain, branch, branchFork, briefcase, browser, buttonDisabled, buttonFilled, buttonGhost, buttonOutline, calculator, calendar, calendarAdd, calendarDownload, calendarRemove, captionGeneric, cardFeatured, caretDown, caretDownFill, caretLeft, caretLeftFill, caretRight, caretRightFill, caretUp, caretUpFill, centerPoint, chat, chatBubble, chatBubbleAlt, check, checkCircle, checkCircleFill, checkCircleFillTransparent, checkSquare, checks, checksCircle, chevronDown, chevronLeft, chevronRight, chevronUp, clear, clearAlt, clipboard, clipboardPlain, clock, closedCaptions, code, codeVariable, color, colorAlt, colorFillSwatch, colorPickerFill, colorPickerListMarker, colorPickerText, colorPickerTextHighlight, colorSelect, columnGuttersLr, columns, columns3366, columns6633, componentGeneric, componentOptions, conditionH, conditionV, conditionalVisibility, containerHeight, containerSpacing, containerSpacingH, containerWidth, contentBottomLeft, contentBottomRight, contentCenter, contentTopLeft, contentTopRight, contrast, contrastAlt, cookie, cookieAlt, copy, currency, currentPage, cursorDisabled, cursorMove, darkMode, data, dateTime, defer, descriptionLink, design, dice, divider, dividerBottom, dividerSide, dividerStatus, dividerTop, door, doorIn, doorOut, download, dropdown, dropdownCaret, dropdownCaretAlt, dropdownClose, dropdownOpen, dummySpacer, edit, editOptions, email, emailRemove, embed, emptyCircle, emptyRect, equalColumns, equalRows, equals, errorCircle, errorCircleFill, errorCircleFillTransparent, exclude, excludeItem, excludeItemAlt, expand, expandXl, experiment, externalLink, extract, extractAlt, eyedropper, fastForward, fastReverse, fieldAfterText, fieldBeforeText, fieldDisabled, fieldHelp, fieldLabel, fieldName, fieldPlaceholder, fieldReadonly, fieldRequired, fieldType, fieldValue, fieldWidth, file, fileDownload, fileError, fileMetadata, filePdf, fileSize, fileSizeMax, fileSizeMin, fileType, fileUpload, files, fillColor, filter, filterAlt, flag, flagAlt, flipH, flipV, focus, folder, folderAdd, folderOpen, folderOpenSolid, folderSolid, folderTopLevel, fontFamily, footer, form, formAlt, fourColumns, frame, fullMaxShield, fullMaxText, fullWidthImage, gears, gearsFill, genericColorSwatch, genericShapes, genericShapesAlt, globe, globeAnchor, globeHash, googleTagManager, gradient, gradientRepeat, gradientStop, gridAlt, gridAutoCols, gridAutoRows, gridCol, gridHeight, gridListToggle, gridManual, gridRow, gridWidth, group, gutter, gyroscope, h1, h2, h3, h4, h5, h6, hamburgerMenu, hardDrive, header, heading, headingLevel, headingLevelAlt, heart, heartFill, heartFillTransparent, height, help, helpFill, hide, highlightedCheckmark, highlightedExclamationMark, history, horizontalAlign, horizontalAlignAlt, horizontalAlignAround, horizontalAlignBetween, horizontalAlignBetweenAlt, horizontalAlignCenter, horizontalAlignEvenly, horizontalAlignLeft, horizontalAlignRight, horizontalAlignStretch, hoverBackgroundGlow, hoverBackgroundType, hoverInvertObject, hoverInvertText, hoverRotate, hoverZoom, hyphenate, hyphenateAlt, hyphenateAlt2, iconGeneric, id, idCard, image, imageBlur, imageCaption, imageError, imageFile, imageLazyLoad, imageOpacity, imageOverlay, imageOverlayAlt, imageOverlayAlt2, imageRemove, info, infoCircle, infoCircleFill, infoCircleFillTransparent, inherit, inlineGradientFormat, inputField, italic, itemLimit, itemSelect, itemWrap, itemsPerPage, itemsPerRow, key, keyboard, large, latestPosts, layer, layerOff, layers, layout, layoutAlt, layoutAlt2, layoutAlt3, layoutAlt4, layoutBentoBox, layoutMasonry, leftPanel, leftPanelAlt, lightBulb, lightBulbAlt, lightMode, limitWidth, lineBreak, lineBreakAlt, lineBreakAltOff, lineBreakOff, lineBreakOffAlt, lineBreaksHyphenation, link, linkAdd, linkNav, linkRemove, listIndent, listOrdered, listOutdent, listUnordered, loader, loaderAlt, location, locationAdd, locationAllow, locationDeny, locationSettings, lock, loopMode, magic, magicAlt, magicAltFill, magicAltFillTransparent, magicFill, magicFillTransparent, mapLayer, mapLayerJson, mapLayerRaster, mapLayerVector, mapPin, matrixAlignControlDotActive, matrixAlignControlDotInactive, media, medium, menuItemCheck, menuItemCircle, microphone, migration, migrationAlt, migrationAltV, module, moneyPaper, moreH, moreHCircle, moreV, moreVCircle, mouseCursor, mouseWheel, multiItemLeftInset, multiItemLeftInsetMobile, multiItemRightInset, multiItemRightInsetMobile, multiple, musicNote, mute, muteCentered, narrowBottom, narrowLeft, narrowRight, narrowTop, navigationButtons, newTab, newspaper, none, notebook, num0Circle, num0CircleAlt, num0Square, num0SquareAlt, num1Circle, num1CircleAlt, num1Square, num1SquareAlt, num2Circle, num2CircleAlt, num2Square, num2SquareAlt, num3Circle, num3CircleAlt, num3Square, num3SquareAlt, num4Circle, num4CircleAlt, num4Square, num4SquareAlt, num5Circle, num5CircleAlt, num5Square, num5SquareAlt, num6Circle, num6CircleAlt, num6Square, num6SquareAlt, num7Circle, num7CircleAlt, num7Square, num7SquareAlt, num8Circle, num8CircleAlt, num8Square, num8SquareAlt, num9Circle, num9CircleAlt, num9Square, num9SquareAlt, officeBuilding, officeBuildings, offset, offsetAuto, optionList, optionListAlt, options, order, padding, paddingBottom, paddingTop, pagination, paletteColor, panelCollapse, panelExpand, paragraph, paste, pause, people, peopleGroup, person, photoCamera, pictureInPicture, play, playReverse, playbackOptions, plusCircle, plusCircleFill, plusCircleFillAlt, plusMinusButtonsH, plusMinusButtonsV, plusSquare, plusSquareFill, plusSquareFillTransparent, pointerHand, pointerHandDisabled, position2x2BottomLeft, position2x2BottomRight, position2x2Empty, position2x2TopLeft, position2x2TopRight, position3x3BottomCenter, position3x3BottomLeft, position3x3BottomRight, position3x3CenterCenter, position3x3CenterLeft, position3x3CenterRight, position3x3Empty, position3x3TopCenter, position3x3TopLeft, position3x3TopRight, positionArrows, positionArrowsH, positionArrowsInverted, positionArrowsInvertedH, positionArrowsInvertedV, positionArrowsV, positionHCenter, positionHEnd, positionHStart, positionLeft, positionRight, positionVCenter, positionVEnd, positionVStart, positioningGuide, positioningGuideAlt, positioningWidthGuide, preload, preview, previewResponsive, progressbar, progressbarIntermittent, range, rangeMax, rangeMid, rangeMin, readOnly, reduceHeightBottom, reduceHeightTop, regex, remove, rename, reorder, reorderGrabberH, reorderGrabberV, required, requiredAlt, reset, resetToZero, responsive, responsiveOverrides, responsiveOverridesAlt, responsiveOverridesAlt2, responsiveOverridesAlt2Fill, responsiveOverridesAlt3Fill, responsiveOverridesAltFill, rightPanel, rightPanelAlt, rotateLeft, rotateRight, roundedCorners, route, row, rowAdd, rowEmpty, rows, ruler, save, screenDesktop, screenLarge, screenMobile, screenTablet, screenTabletLarge, scrollbarH, scrollbarV, scrollbars, search, searchEmpty, separatorH, separatorV, shadow, share, shield, shieldPlus, shieldPlusAlt, shrink, shrinkDiagonalLeft, shrinkDiagonalLeftXl, shrinkDiagonalRight, shrinkDiagonalRightXl, shrinkXl, shuffle, sidebar, sidebarFlip, singleItemLeftInset, singleItemLeftInsetMobile, singleItemRightInset, singleItemRightInsetMobile, size, sizeAlt, slider, sliders, small, solidCircle, solidCircleFillTransparent, solidCircleFilled, solidCircleGradient, solidColor, solidRect, solidRectFillTransparent, solidRectFilled, solidRectGradient, sortAsc, sortDesc, sortGeneric, spacingBottom, spacingBottomIn, spacingLeft, spacingLeftIn, spacingRight, spacingRightIn, spacingTop, spacingTopIn, speed, stagger, star, step, stop, swap, tag, tagAlt, textAbc, textAbove, textAlignCenter, textAlignGeneric, textAlignJustify, textAlignLeft, textAlignRight, textBelow, textBoxEdit, textColorSwatch, textHighlightColorSwatch, textHighlightColorSwatchAlt, textLarger, textLength, textSize, textSizeAlt, textSmaller, textStrikethrough, textUppercase, textWrite, thumbsDown, thumbsUp, titleGeneric, toggleOff, toggleOn, toggleOnAlt, tools, totalItems, trash, trashAlt, tree, treeAlt, treeAlt2, troubleshootAlt, twoCardsLeft, twoCardsRight, twoColumns, typography, typographyOptions, underline, ungroup, upload, vennDiagram, vennDiagramAlt, vennDiagramAlt2, vennDiagramAlt3, vennDiagramAlt4, vennDiagramAlt5, vennDiagramAlt6, vennDiagramAlt7, verticalAlign, verticalAlignAlt, verticalAlignAround, verticalAlignBetween, verticalAlignBetweenAlt, verticalAlignBottom, verticalAlignCenter, verticalAlignEvenly, verticalAlignStretch, verticalAlignTop, verticalSpacing, video, videoChapters, videoControls, videoFile, videoPosterImage, videoSubtitle, videoSubtitleAlt, visibility, visibilityAlt, visibilityAlt2, visible, volume, warning, warningCircle, warningCircleFill, warningCircleFillTransparent, warningFill, warningFillTransparent, webVideo, wideBottom, wideLeft, wideRight, wideTop, width, wordpress, wrapper, wrapperAlt, wrapperConfig, wrapperOffAlt, wrapperOverflow, wrapperSimple, wrapperSimpleAlt, wrench, zap, zapFill };
|
package/dist/icons/jsx-svg.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type ComponentProps, type JSX } from 'react';
|
|
2
|
+
import JsxParser from 'react-jsx-parser';
|
|
3
|
+
type JsxParserProps = ComponentProps<typeof JsxParser>;
|
|
4
|
+
interface JsxSvgProps extends Omit<JsxParserProps, 'bindings' | 'components' | 'jsx' | 'renderInWrapper'> {
|
|
3
5
|
svg: string;
|
|
4
6
|
className?: string;
|
|
5
7
|
ariaHidden?: boolean;
|
|
6
8
|
'aria-hidden'?: boolean;
|
|
7
9
|
customProps?: string;
|
|
8
|
-
customPropBindings?:
|
|
10
|
+
customPropBindings?: JsxParserProps['bindings'];
|
|
9
11
|
noIdRandomization?: boolean;
|
|
10
12
|
idRandomizationPrefix?: string;
|
|
11
|
-
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Renders SVG string as JSX SVGs.
|
package/dist/icons/jsx-svg.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as JsxSvg } from "../jsx-svg-
|
|
1
|
+
import { t as JsxSvg } from "../jsx-svg-DRwJdRpA.js";
|
|
2
2
|
export { JsxSvg };
|