@eightshift/ui-components 8.1.0 → 8.3.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-Dqkum3dO.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DHgs_rCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-CldDJ_4u.js} +390 -189
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BHNgL5Is.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-CUuL5wjz.js} +13 -8
- 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-CZXso3mJ.js} +14 -38
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-BTByPMrl.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-DkX1vqMN.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-Dw-JjfLx.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-CA2_mHEB.js} +4 -3
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-ZZwHZDro.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/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/{build-module-DG6ZK7Ty.js → build-module-BISCoQjQ.js} +4 -4
- package/dist/{button-XSk_8UW7.js → button-ldR_tlvk.js} +64 -13
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DDyLJRY8.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-DmhdOhe4.js} +15 -16
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.d.ts +1 -1
- 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.d.ts +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 +8 -8
- 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.d.ts +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +3 -3
- 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 +9 -9
- package/dist/components/expandable/expandable.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +18 -17
- package/dist/components/input-field/input-field.d.ts +1 -1
- 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 +7 -7
- 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 +5 -4
- package/dist/components/menu/menu.d.ts +8 -29
- package/dist/components/menu/menu.js +11 -8
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.d.ts +1 -1
- 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 +22 -16
- 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 +3 -2
- package/dist/components/popover/popover.js +5 -5
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/prompt-popover/prompt-popover.d.ts +56 -0
- package/dist/components/prompt-popover/prompt-popover.js +81 -0
- package/dist/components/radio/radio.d.ts +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 +2 -2
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +8 -11
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +31 -31
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +13 -11
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +29 -29
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.d.ts +1 -1
- package/dist/components/rich-label/rich-label.js +2 -2
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +40 -21
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +39 -21
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +20 -20
- package/dist/components/select/shared.d.ts +7 -11
- 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 +17 -17
- package/dist/components/select/styles.d.ts +2 -2
- package/dist/components/slider/column-config-slider.js +8 -6
- package/dist/components/slider/slider.js +16 -12
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.d.ts +1 -2
- package/dist/components/smart-image/smart-image.js +53 -51
- package/dist/components/tabs/tabs.d.ts +16 -64
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.d.ts +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.d.ts +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-oS68xcYX.js} +130 -125
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-DP8ioFX1.js} +39 -30
- 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 +18 -17
- package/dist/{input-field-nN6BO0oz.js → input-field-C-XvZeCZ.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-Cdqi5ZQQ.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-DdwuqoMg.js} +147 -89
- package/dist/{modal-B5axB0Fc.js → modal-DZco5MDu.js} +15 -14
- package/dist/{number-picker-nnOf0XnN.js → number-picker-XqKW0BNi.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-O71mlJXS.js} +250 -266
- package/dist/{shared-Ba_bt4s9.js → shared-YXMIX2ka.js} +60 -44
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-D5LEdmDM.js} +78 -58
- package/dist/{switch-BJ4_OyUm.js → switch-Bo6nmed_.js} +8 -8
- package/dist/{tabs-wAe0AAyu.js → tabs-DE-qb7Kt.js} +35 -30
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-C17LWYmO.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-Cb4yCEua.js} +39 -8
- package/dist/{tooltip-BW9nj5-V.js → tooltip-CT-vzIdz.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-V65TBDGM.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-DqUS7tjk.js} +281 -184
- package/dist/useEvent-C9zwSNzZ.js +18 -0
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-C75IzdIZ.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-JidySWlU.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-Sp8-miDa.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-CpmQEh8J.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CaY3sRjL.js} +250 -46
- 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-CzB3v6M9.js} +6 -11
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-DC3XY3DQ.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-BKmSTK_5.js} +16 -11
- package/dist/{usePress-DRoujMNm.js → usePress-CUCWcP-m.js} +50 -28
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-C3QIkMON.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-bbGRUbo4.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-D_rLMrVW.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +2 -2
- 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 +23 -27
- package/dist/useEvent-CzuFZ2HT.js +0 -22
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--es-uic-tw-shadow:0 0 #0000;--es-uic-tw-shadow-color:initial;--es-uic-tw-shadow-alpha:100%;--es-uic-tw-inset-shadow:0 0 #0000;--es-uic-tw-inset-shadow-color:initial;--es-uic-tw-inset-shadow-alpha:100%;--es-uic-tw-ring-color:initial;--es-uic-tw-ring-shadow:0 0 #0000;--es-uic-tw-inset-ring-color:initial;--es-uic-tw-inset-ring-shadow:0 0 #0000;--es-uic-tw-ring-inset:initial;--es-uic-tw-ring-offset-width:0px;--es-uic-tw-ring-offset-color:#fff;--es-uic-tw-ring-offset-shadow:0 0 #0000}}}.block-editor-block-list__block-crash-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-red-700,oklch(50.5% .213 27.518))!important}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{border-color:color-mix(in oklab, var(--es-color-red-700,oklch(50.5% .213 27.518)) 15%, transparent)!important}}.block-editor-block-list__block-crash-warning{--es-uic-tw-shadow:0 1px 3px 0 var(--es-uic-tw-shadow-color,#0000001a), 0 1px 2px -1px var(--es-uic-tw-shadow-color,#0000001a)!important;box-shadow:var(--es-uic-tw-inset-shadow), var(--es-uic-tw-inset-ring-shadow), var(--es-uic-tw-ring-offset-shadow), var(--es-uic-tw-ring-shadow), var(--es-uic-tw-shadow)!important;--es-uic-tw-shadow-color:var(--es-color-red-700,oklch(50.5% .213 27.518))!important}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{--es-uic-tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--es-color-red-700,oklch(50.5% .213 27.518)) 10%, transparent) var(--es-uic-tw-shadow-alpha), transparent)!important}}.block-editor-block-list__block-crash-warning .block-editor-warning__message{color:var(--es-color-red-950,oklch(25.8% .092 26.042))!important}.wp-block-missing div.block-editor-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-secondary-300,var(--es-color-
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--es-uic-tw-shadow:0 0 #0000;--es-uic-tw-shadow-color:initial;--es-uic-tw-shadow-alpha:100%;--es-uic-tw-inset-shadow:0 0 #0000;--es-uic-tw-inset-shadow-color:initial;--es-uic-tw-inset-shadow-alpha:100%;--es-uic-tw-ring-color:initial;--es-uic-tw-ring-shadow:0 0 #0000;--es-uic-tw-inset-ring-color:initial;--es-uic-tw-inset-ring-shadow:0 0 #0000;--es-uic-tw-ring-inset:initial;--es-uic-tw-ring-offset-width:0px;--es-uic-tw-ring-offset-color:#fff;--es-uic-tw-ring-offset-shadow:0 0 #0000}}}.block-editor-block-list__block-crash-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-red-700,oklch(50.5% .213 27.518))!important}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{border-color:color-mix(in oklab, var(--es-color-red-700,oklch(50.5% .213 27.518)) 15%, transparent)!important}}.block-editor-block-list__block-crash-warning{--es-uic-tw-shadow:0 1px 3px 0 var(--es-uic-tw-shadow-color,#0000001a), 0 1px 2px -1px var(--es-uic-tw-shadow-color,#0000001a)!important;box-shadow:var(--es-uic-tw-inset-shadow), var(--es-uic-tw-inset-ring-shadow), var(--es-uic-tw-ring-offset-shadow), var(--es-uic-tw-ring-shadow), var(--es-uic-tw-shadow)!important;--es-uic-tw-shadow-color:var(--es-color-red-700,oklch(50.5% .213 27.518))!important}@supports (color:color-mix(in lab, red, red)){.block-editor-block-list__block-crash-warning{--es-uic-tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--es-color-red-700,oklch(50.5% .213 27.518)) 10%, transparent) var(--es-uic-tw-shadow-alpha), transparent)!important}}.block-editor-block-list__block-crash-warning .block-editor-warning__message{color:var(--es-color-red-950,oklch(25.8% .092 26.042))!important}.wp-block-missing div.block-editor-warning{border-radius:var(--es-radius-lg,.5rem)!important;border-color:var(--es-color-secondary-300,var(--es-color-neutral-300))!important;background-color:var(--es-color-secondary-50,var(--es-color-neutral-50))!important}@supports (color:color-mix(in lab, red, red)){.wp-block-missing div.block-editor-warning{background-color:color-mix(in oklab, var(--es-color-secondary-50,var(--es-color-neutral-50)) 75%, transparent)!important}}.wp-block-missing div.block-editor-warning{--es-uic-tw-shadow:0 1px 3px 0 var(--es-uic-tw-shadow-color,#0000001a), 0 1px 2px -1px var(--es-uic-tw-shadow-color,#0000001a)!important;box-shadow:var(--es-uic-tw-inset-shadow), var(--es-uic-tw-inset-ring-shadow), var(--es-uic-tw-ring-offset-shadow), var(--es-uic-tw-ring-shadow), var(--es-uic-tw-shadow)!important;--es-uic-tw-shadow-color:var(--es-color-secondary-700,var(--es-color-neutral-700))!important}@supports (color:color-mix(in lab, red, red)){.wp-block-missing div.block-editor-warning{--es-uic-tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--es-color-secondary-700,var(--es-color-neutral-700)) 20%, transparent) var(--es-uic-tw-shadow-alpha), transparent)!important}}.wp-block-missing div.block-editor-warning .block-editor-warning__message{color:var(--es-color-secondary-950,var(--es-color-neutral-950))!important}@property --es-uic-tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --es-uic-tw-shadow-color{syntax:"*";inherits:false}@property --es-uic-tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --es-uic-tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --es-uic-tw-inset-shadow-color{syntax:"*";inherits:false}@property --es-uic-tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --es-uic-tw-ring-color{syntax:"*";inherits:false}@property --es-uic-tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --es-uic-tw-inset-ring-color{syntax:"*";inherits:false}@property --es-uic-tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --es-uic-tw-ring-inset{syntax:"*";inherits:false}@property --es-uic-tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --es-uic-tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --es-uic-tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -145,8 +145,8 @@ var OPERATORS = {
|
|
|
145
145
|
* @return {*} Result of evaluation.
|
|
146
146
|
*/
|
|
147
147
|
function evaluate(postfix, variables) {
|
|
148
|
-
var stack = [], i, j, args, getOperatorResult, term, value;
|
|
149
|
-
for (
|
|
148
|
+
var stack = [], i = 0, j, args, getOperatorResult, term, value;
|
|
149
|
+
for (; i < postfix.length; i++) {
|
|
150
150
|
term = postfix[i];
|
|
151
151
|
getOperatorResult = OPERATORS[term];
|
|
152
152
|
if (getOperatorResult) {
|
|
@@ -272,8 +272,8 @@ var DEFAULT_OPTIONS = {
|
|
|
272
272
|
* @return {string} Plural forms expression.
|
|
273
273
|
*/
|
|
274
274
|
function getPluralExpression(pf) {
|
|
275
|
-
var parts = pf.split(";"), i, part;
|
|
276
|
-
for (
|
|
275
|
+
var parts = pf.split(";"), i = 0, part;
|
|
276
|
+
for (; i < parts.length; i++) {
|
|
277
277
|
part = parts[i].trim();
|
|
278
278
|
if (part.indexOf("plural=") === 0) return part.substr(7);
|
|
279
279
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import {
|
|
4
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
2
|
+
import { h as $c4867b2f328c2698$export$e5c5a5f917a5871c, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { U as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-CaY3sRjL.js";
|
|
4
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
5
5
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
6
|
-
import { a as $6c0095e7e99364f2$export$c17561cb55d4db30, n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-
|
|
7
|
-
import { i as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-
|
|
8
|
-
import { n as Tooltip } from "./tooltip-
|
|
9
|
-
import { t as __ } from "./build-module-
|
|
6
|
+
import { a as $6c0095e7e99364f2$export$c17561cb55d4db30, n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-DHgs_rCq.js";
|
|
7
|
+
import { i as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-CUuL5wjz.js";
|
|
8
|
+
import { n as Tooltip } from "./tooltip-CT-vzIdz.js";
|
|
9
|
+
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
10
10
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
11
11
|
import $3ARPR$react, { createContext, forwardRef, useRef, useState } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -22,11 +22,13 @@ function $afa781ff67c1cd08$export$fa142eb1681c520(props, ref) {
|
|
|
22
22
|
let focusManager = $535772f9d2c1f38d$export$c5251b9e124bf29(ref);
|
|
23
23
|
const onKeyDown = (e) => {
|
|
24
24
|
if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
|
|
25
|
-
if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown")
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
else
|
|
29
|
-
|
|
25
|
+
if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown") {
|
|
26
|
+
if (shouldReverse) focusManager.focusPrevious();
|
|
27
|
+
else focusManager.focusNext();
|
|
28
|
+
} else if (orientation === "horizontal" && e.key === "ArrowLeft" || orientation === "vertical" && e.key === "ArrowUp") {
|
|
29
|
+
if (shouldReverse) focusManager.focusNext();
|
|
30
|
+
else focusManager.focusPrevious();
|
|
31
|
+
} else if (e.key === "Tab") {
|
|
30
32
|
lastFocused.current = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
31
33
|
if (e.shiftKey) focusManager.focusFirst();
|
|
32
34
|
else focusManager.focusLast();
|
|
@@ -104,9 +106,12 @@ var createComponentClasses = ({ className, flat, pending }) => cva([
|
|
|
104
106
|
default: null,
|
|
105
107
|
selected: null,
|
|
106
108
|
selectedGhost: null,
|
|
109
|
+
selectedOutline: null,
|
|
107
110
|
ghost: null,
|
|
111
|
+
outline: null,
|
|
108
112
|
danger: null,
|
|
109
113
|
dangerGhost: null,
|
|
114
|
+
dangerOutline: null,
|
|
110
115
|
glass: null,
|
|
111
116
|
glassDark: null,
|
|
112
117
|
dangerGlass: null,
|
|
@@ -249,6 +254,42 @@ var createComponentClasses = ({ className, flat, pending }) => cva([
|
|
|
249
254
|
"es:focus-visible:bg-accent-50 es:focus-visible:text-accent-950 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
250
255
|
]
|
|
251
256
|
},
|
|
257
|
+
{
|
|
258
|
+
type: "outline",
|
|
259
|
+
disabled: false,
|
|
260
|
+
class: [
|
|
261
|
+
!pending && "es:bg-white es:bg-linear-to-br es:from-surface-200/0 es:to-surface-200/0 es:text-secondary-700",
|
|
262
|
+
pending && "es:shimmer-animation es:-bg-linear-75 es:from-accent-600/0 es:via-accent-600/15 es:to-accent-600/0 es:from-35% es:via-50% es:to-65% es:bg-surface-50 es:inset-ring es:inset-ring-accent-600/5 es:text-accent-900",
|
|
263
|
+
"es:inset-ring es:inset-ring-secondary-700/12",
|
|
264
|
+
"es:hover:from-surface-200/30 es:hover:to-surface-200/50 es:hover:text-accent-950 es:hover:inset-ring-accent-950/6",
|
|
265
|
+
"es:pressed:from-accent-600/5 es:pressed:to-accent-600/15 es:pressed:text-accent-900",
|
|
266
|
+
"es:focus-visible:bg-accent-50 es:focus-visible:text-accent-950 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
type: "dangerOutline",
|
|
271
|
+
disabled: false,
|
|
272
|
+
class: [
|
|
273
|
+
!pending && "es:bg-white es:bg-linear-to-br es:from-surface-200/0 es:to-surface-200/0 es:text-red-700",
|
|
274
|
+
pending && "es:shimmer-animation es:-bg-linear-75 es:from-red-600/0 es:via-red-600/10 es:to-red-600/0 es:from-35% es:via-50% es:to-65% es:bg-secondary-50 es:inset-ring es:inset-ring-red-600/10 es:text-red-700",
|
|
275
|
+
"es:inset-ring es:inset-ring-red-800/12",
|
|
276
|
+
"es:hover:from-red-500/4 es:hover:to-red-500/7 es:hover:inset-ring-red-700/6",
|
|
277
|
+
"es:pressed:from-red-500/10 es:pressed:to-red-500/15 es:pressed:text-red-700",
|
|
278
|
+
"es:focus-visible:bg-red-50 es:focus-visible:text-red-950 es:focus-visible:inset-ring es:focus-visible:ring-red-500/30 es:focus-visible:inset-shadow-red-300/10 es:focus-visible:inset-ring-red-500"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: "selectedOutline",
|
|
283
|
+
disabled: false,
|
|
284
|
+
class: [
|
|
285
|
+
!pending && "es:bg-white es:bg-linear-to-br es:from-surface-200/0 es:to-surface-200/0 es:text-accent-600",
|
|
286
|
+
pending && "es:shimmer-animation es:-bg-linear-75 es:from-accent-600/0 es:via-accent-600/15 es:to-accent-600/0 es:from-35% es:via-50% es:to-65% es:bg-surface-50 es:inset-ring es:inset-ring-accent-600/15 es:text-accent-700",
|
|
287
|
+
"es:inset-ring es:inset-ring-accent-800/12",
|
|
288
|
+
"es:hover:from-accent-500/5 es:hover:to-accent-500/15 es:hover:inset-ring-accent-600/6",
|
|
289
|
+
"es:pressed:from-accent-500/10 es:pressed:to-accent-500/20 es:pressed:text-accent-700",
|
|
290
|
+
"es:focus-visible:bg-accent-50 es:focus-visible:text-accent-950 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
252
293
|
{
|
|
253
294
|
type: [
|
|
254
295
|
"glass",
|
|
@@ -358,6 +399,15 @@ var createComponentClasses = ({ className, flat, pending }) => cva([
|
|
|
358
399
|
disabled: true,
|
|
359
400
|
class: ["es:text-secondary-500 es:any-icon:text-secondary-500/50"]
|
|
360
401
|
},
|
|
402
|
+
{
|
|
403
|
+
type: [
|
|
404
|
+
"outline",
|
|
405
|
+
"dangerOutline",
|
|
406
|
+
"selectedOutline"
|
|
407
|
+
],
|
|
408
|
+
disabled: true,
|
|
409
|
+
class: ["es:bg-gray-50 es:text-secondary-500 es:any-icon:text-secondary-500/50", "es:inset-ring es:inset-ring-secondary-100"]
|
|
410
|
+
},
|
|
361
411
|
{
|
|
362
412
|
type: [
|
|
363
413
|
"glass",
|
|
@@ -442,6 +492,7 @@ var createComponentClasses = ({ className, flat, pending }) => cva([
|
|
|
442
492
|
defaultVariants: { disabled: false }
|
|
443
493
|
});
|
|
444
494
|
var TypedTooltip = Tooltip;
|
|
495
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
445
496
|
/**
|
|
446
497
|
* A simple button component.
|
|
447
498
|
*
|
|
@@ -458,7 +509,7 @@ var TypedTooltip = Tooltip;
|
|
|
458
509
|
*/
|
|
459
510
|
var Button = (props) => {
|
|
460
511
|
const { children, icon, size = "default", type = "default", flat, pending, pendingAriaLabel = __("Loading", "eightshift-ui-components"), disabled, className, tooltip: rawTooltip, onPress, forwardedRef, wrapperClassName, tooltipProps, "aria-label": rawAriaLabel, hidden, ...other } = props;
|
|
461
|
-
const ariaLabel = rawAriaLabel ?? (
|
|
512
|
+
const ariaLabel = rawAriaLabel ?? (isStringValue(children) ? children : __("Menu item", "eightshift-ui-components"));
|
|
462
513
|
let tooltip = rawTooltip;
|
|
463
514
|
if (rawTooltip === true && ariaLabel.length > 0) tooltip = ariaLabel;
|
|
464
515
|
const resolvedTooltip = tooltip === true ? ariaLabel : tooltip;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
2
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
3
|
-
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
4
|
-
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
3
|
+
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
4
|
+
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
5
5
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
6
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
7
|
-
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "./Label-
|
|
8
|
-
import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
9
|
-
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb, r as $fd2148440a13ec26$export$dad6ae84456c676a } from "./useFormValidation-
|
|
6
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
7
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "./Label-C4bJkVti.js";
|
|
8
|
+
import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-ZZwHZDro.js";
|
|
9
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb, r as $fd2148440a13ec26$export$dad6ae84456c676a } from "./useFormValidation-CpmQEh8J.js";
|
|
10
10
|
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BWMVEpwR.js";
|
|
11
|
-
import { t as $876b6f32ca5a04c3$export$cbe85ee05b554577 } from "./useToggle-
|
|
12
|
-
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-
|
|
11
|
+
import { t as $876b6f32ca5a04c3$export$cbe85ee05b554577 } from "./useToggle-bbGRUbo4.js";
|
|
12
|
+
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-D_rLMrVW.js";
|
|
13
13
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
14
14
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
15
15
|
import { check } from "./icons/ui-icons/check.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-
|
|
4
|
-
import { n as $b27c684a33948c64$export$2f817fcdc4b89ae0, r as $a747a10fe70a57da$export$c17fa47878dc55b6, t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
2
|
+
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-R_4IDnf9.js";
|
|
4
|
+
import { n as $b27c684a33948c64$export$2f817fcdc4b89ae0, r as $a747a10fe70a57da$export$c17fa47878dc55b6, t as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-CTCqjYu4.js";
|
|
5
5
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
6
|
-
import { t as $1dfb119a85e764e5$export$cc77c4ff7e8673c5 } from "./NumberFormatter-
|
|
6
|
+
import { t as $1dfb119a85e764e5$export$cc77c4ff7e8673c5 } from "./NumberFormatter-Bwdv413k.js";
|
|
7
7
|
import { n as $240e9101ba2842f5$export$b6268554fba451f, t as $240e9101ba2842f5$export$7d15b64cf5a3a4c4 } from "./number-BeC0ySe4.js";
|
|
8
|
-
import { t as __ } from "./build-module-
|
|
8
|
+
import { t as __ } from "./build-module-BISCoQjQ.js";
|
|
9
9
|
import $3ARPR$react, { createContext, forwardRef, useMemo } from "react";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
11
|
//#region node_modules/react-aria/dist/private/intl/color/ar-AE.mjs
|
|
@@ -1960,9 +1960,10 @@ var $890783418b00a858$var$Color = class {
|
|
|
1960
1960
|
[hue, l] = this.getOklchHue(l, c, h, locale);
|
|
1961
1961
|
let lightness = "";
|
|
1962
1962
|
let chroma = "";
|
|
1963
|
-
if (c <= .1 && c >= $890783418b00a858$var$GRAY_THRESHOLD)
|
|
1964
|
-
|
|
1965
|
-
|
|
1963
|
+
if (c <= .1 && c >= $890783418b00a858$var$GRAY_THRESHOLD) {
|
|
1964
|
+
if (l >= .7) chroma = "pale";
|
|
1965
|
+
else chroma = "grayish";
|
|
1966
|
+
} else if (c >= .15) chroma = "vibrant";
|
|
1966
1967
|
if (l < .3) lightness = "very dark";
|
|
1967
1968
|
else if (l < $890783418b00a858$var$MAX_DARK_LIGHTNESS) lightness = "dark";
|
|
1968
1969
|
else if (l < .7);
|
|
@@ -1993,8 +1994,10 @@ var $890783418b00a858$var$Color = class {
|
|
|
1993
1994
|
let [hue, hueName] = $890783418b00a858$var$OKLCH_HUES[i];
|
|
1994
1995
|
let [nextHue, nextHueName] = $890783418b00a858$var$OKLCH_HUES[i + 1] || [360, "pink"];
|
|
1995
1996
|
if (h >= hue && h < nextHue) {
|
|
1996
|
-
if (hueName === "orange")
|
|
1997
|
-
|
|
1997
|
+
if (hueName === "orange") {
|
|
1998
|
+
if (l < $890783418b00a858$var$ORANGE_LIGHTNESS_THRESHOLD) hueName = "brown";
|
|
1999
|
+
else l = l - $890783418b00a858$var$ORANGE_LIGHTNESS_THRESHOLD + $890783418b00a858$var$MAX_DARK_LIGHTNESS;
|
|
2000
|
+
}
|
|
1998
2001
|
if (h > hue + (nextHue - hue) / 2 && hueName !== nextHueName) hueName = `${hueName} ${nextHueName}`;
|
|
1999
2002
|
else if (hueName === "yellow" && l < $890783418b00a858$var$YELLOW_GREEN_LIGHTNESS_THRESHOLD) hueName = "yellow green";
|
|
2000
2003
|
return [strings.getStringForLocale(hueName, locale).toLocaleLowerCase(locale), l];
|
|
@@ -2082,9 +2085,7 @@ var $890783418b00a858$var$RGBColor = class $890783418b00a858$var$RGBColor extend
|
|
|
2082
2085
|
case green:
|
|
2083
2086
|
hue = (blue - red) / chroma + 2;
|
|
2084
2087
|
break;
|
|
2085
|
-
case blue:
|
|
2086
|
-
hue = (red - green) / chroma + 4;
|
|
2087
|
-
break;
|
|
2088
|
+
case blue: hue = (red - green) / chroma + 4;
|
|
2088
2089
|
}
|
|
2089
2090
|
hue /= 6;
|
|
2090
2091
|
}
|
|
@@ -2116,9 +2117,7 @@ var $890783418b00a858$var$RGBColor = class $890783418b00a858$var$RGBColor extend
|
|
|
2116
2117
|
hue = (blue - red) / chroma + 2;
|
|
2117
2118
|
break;
|
|
2118
2119
|
case blue:
|
|
2119
|
-
default:
|
|
2120
|
-
hue = (red - green) / chroma + 4;
|
|
2121
|
-
break;
|
|
2120
|
+
default: hue = (red - green) / chroma + 4;
|
|
2122
2121
|
}
|
|
2123
2122
|
hue /= 6;
|
|
2124
2123
|
}
|
|
@@ -60,11 +60,13 @@ var AnimatedVisibility = (props) => {
|
|
|
60
60
|
const [isVisibleInner, setIsVisibleInner] = useState(false);
|
|
61
61
|
const [canAnimate, setCanAnimate] = useState(true);
|
|
62
62
|
useEffect(() => {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
queueMicrotask(() => {
|
|
64
|
+
if (visible) setIsVisibleInner(true);
|
|
65
|
+
if (!visible && noExitAnimation) setIsVisibleInner(false);
|
|
66
|
+
});
|
|
65
67
|
}, [noExitAnimation, visible]);
|
|
66
68
|
useEffect(() => {
|
|
67
|
-
if (noInitial && visible) setCanAnimate(false);
|
|
69
|
+
if (noInitial && visible) queueMicrotask(() => setCanAnimate(false));
|
|
68
70
|
}, [noInitial, visible]);
|
|
69
71
|
return jsx(Fragment$1, { children: isVisibleInner && jsx("div", {
|
|
70
72
|
className: clsx(!noEnterAnimation && visible && noInitial && visible && canAnimate && transitions[transition].inClassName, !noEnterAnimation && visible && !noInitial && transitions[transition].inClassName, !noExitAnimation && !visible && transitions[transition].outClassName, "es:motion-duration-300", decreaseBounce && "es:motion-ease-spring-snappy es:motion-ease-linear/opacity", !decreaseBounce && "es:motion-ease-spring-bouncy es:motion-ease-linear/opacity", "es:fill-mode-forwards", className),
|
|
@@ -44,4 +44,4 @@ export type BaseControlProps = {
|
|
|
44
44
|
* <div>Content</div>
|
|
45
45
|
* </BaseControl>
|
|
46
46
|
*/
|
|
47
|
-
export declare const BaseControl: (props: Prettify<BaseControlProps>) => string | number | true |
|
|
47
|
+
export declare const BaseControl: (props: Prettify<BaseControlProps>) => string | number | true | import("react").JSX.Element | Iterable<ReactNode> | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
|
-
import { t as $efe09c6d1c304b50$export$5f1af8db9871e1d6 } from "../../Text-
|
|
2
|
+
import { t as $efe09c6d1c304b50$export$5f1af8db9871e1d6 } from "../../Text-CA2_mHEB.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
import { Children } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -45,22 +45,10 @@ export type ContainerProps<T extends ElementType = 'div'> = {
|
|
|
45
45
|
type ContainerComponent = <T extends ElementType = 'div'>(props: Prettify<ContainerProps<T> & {
|
|
46
46
|
ref?: React.Ref<Element>;
|
|
47
47
|
}>) => ReactNode;
|
|
48
|
-
|
|
49
|
-
* A container component to wrap other components, providing consistent styling and spacing.
|
|
50
|
-
*
|
|
51
|
-
* @component
|
|
52
|
-
* @param {ContainerProps} props - Component props.
|
|
53
|
-
*
|
|
54
|
-
* @returns {JSX.Element} The Container component.
|
|
55
|
-
*
|
|
56
|
-
* @example
|
|
57
|
-
* <Container accent elevated>
|
|
58
|
-
* <p>This is a container with accent and elevated styles.</p>
|
|
59
|
-
* </Container>
|
|
60
|
-
*/
|
|
61
|
-
export declare const Container: ContainerComponent & {
|
|
48
|
+
declare const TypedContainer: ContainerComponent & {
|
|
62
49
|
displayName?: string;
|
|
63
50
|
};
|
|
51
|
+
export { TypedContainer as Container };
|
|
64
52
|
type ContainerGroupProps<T extends ElementType = 'div'> = {
|
|
65
53
|
/** The HTML element to render as the container group. */
|
|
66
54
|
as?: T;
|
|
@@ -79,21 +67,7 @@ type ContainerGroupProps<T extends ElementType = 'div'> = {
|
|
|
79
67
|
type ContainerGroupComponent = <T extends ElementType = 'div'>(props: Prettify<ContainerGroupProps<T> & {
|
|
80
68
|
ref?: React.Ref<Element>;
|
|
81
69
|
}>) => ReactNode;
|
|
82
|
-
|
|
83
|
-
* A container group component to wrap multiple Container components, providing consistent spacing between them.
|
|
84
|
-
*
|
|
85
|
-
* @component
|
|
86
|
-
* @param {ContainerGroupProps} props - Component props.
|
|
87
|
-
*
|
|
88
|
-
* @returns {JSX.Element} The ContainerGroup component.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* <ContainerGroup>
|
|
92
|
-
* <Container>First container</Container>
|
|
93
|
-
* <Container>Second container</Container>
|
|
94
|
-
* </ContainerGroup>
|
|
95
|
-
*/
|
|
96
|
-
export declare const ContainerGroup: ContainerGroupComponent & {
|
|
70
|
+
declare const TypedContainerGroup: ContainerGroupComponent & {
|
|
97
71
|
displayName?: string;
|
|
98
72
|
};
|
|
99
|
-
export {};
|
|
73
|
+
export { TypedContainerGroup as ContainerGroup };
|
|
@@ -133,21 +133,8 @@ var ContainerBase = (props, ref) => {
|
|
|
133
133
|
children
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
*
|
|
139
|
-
* @component
|
|
140
|
-
* @param {ContainerProps} props - Component props.
|
|
141
|
-
*
|
|
142
|
-
* @returns {JSX.Element} The Container component.
|
|
143
|
-
*
|
|
144
|
-
* @example
|
|
145
|
-
* <Container accent elevated>
|
|
146
|
-
* <p>This is a container with accent and elevated styles.</p>
|
|
147
|
-
* </Container>
|
|
148
|
-
*/
|
|
149
|
-
var Container = forwardRef(ContainerBase);
|
|
150
|
-
Container.displayName = "Container";
|
|
136
|
+
var TypedContainer = forwardRef(ContainerBase);
|
|
137
|
+
TypedContainer.displayName = "Container";
|
|
151
138
|
var ContainerGroupBase = (props, ref) => {
|
|
152
139
|
const { className, children, as, hidden, horizontal, label, wrapClassName, ...rest } = props;
|
|
153
140
|
const ComponentToRender = as ?? "div";
|
|
@@ -175,21 +162,7 @@ var ContainerGroupBase = (props, ref) => {
|
|
|
175
162
|
}), inner]
|
|
176
163
|
});
|
|
177
164
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
*
|
|
181
|
-
* @component
|
|
182
|
-
* @param {ContainerGroupProps} props - Component props.
|
|
183
|
-
*
|
|
184
|
-
* @returns {JSX.Element} The ContainerGroup component.
|
|
185
|
-
*
|
|
186
|
-
* @example
|
|
187
|
-
* <ContainerGroup>
|
|
188
|
-
* <Container>First container</Container>
|
|
189
|
-
* <Container>Second container</Container>
|
|
190
|
-
* </ContainerGroup>
|
|
191
|
-
*/
|
|
192
|
-
var ContainerGroup = forwardRef(ContainerGroupBase);
|
|
193
|
-
ContainerGroup.displayName = "ContainerGroup";
|
|
165
|
+
var TypedContainerGroup = forwardRef(ContainerGroupBase);
|
|
166
|
+
TypedContainerGroup.displayName = "ContainerGroup";
|
|
194
167
|
//#endregion
|
|
195
|
-
export { Container, ContainerGroup };
|
|
168
|
+
export { TypedContainer as Container, TypedContainerGroup as ContainerGroup };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
|
-
import { f as upperFirst } from "../../es-dash-
|
|
2
|
+
import { f as upperFirst } from "../../es-dash-DPtJSRjw.js";
|
|
3
3
|
import { Fragment } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/components/breakpoint-preview/breakpoint-preview.tsx
|
|
@@ -20,7 +20,7 @@ type ButtonTooltipProps = {
|
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
};
|
|
22
22
|
type ButtonSize = 'small' | 'default' | 'large';
|
|
23
|
-
type ButtonType = 'default' | 'selected' | 'selectedGhost' | 'ghost' | 'danger' | 'dangerGhost' | 'glass' | 'glassDark' | 'dangerGlass' | 'selectedGlass' | 'simple' | 'selectedSimple' | 'dangerSimple';
|
|
23
|
+
type ButtonType = 'default' | 'selected' | 'selectedGhost' | 'selectedOutline' | 'ghost' | 'outline' | 'danger' | 'dangerGhost' | 'dangerOutline' | 'glass' | 'glassDark' | 'dangerGlass' | 'selectedGlass' | 'simple' | 'selectedSimple' | 'dangerSimple';
|
|
24
24
|
type ButtonGroupType = 'segmented' | 'split';
|
|
25
25
|
type ButtonProps = Omit<ComponentPropsWithoutRef<typeof ReactAriaButton>, 'children' | 'className' | 'isDisabled' | 'isPending' | 'onPress' | 'aria-label' | 'type'> & {
|
|
26
26
|
children?: ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ButtonGroup, t as Button } from "../../button-
|
|
1
|
+
import { n as ButtonGroup, t as Button } from "../../button-ldR_tlvk.js";
|
|
2
2
|
export { Button, ButtonGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Checkbox } from "../../checkbox-
|
|
1
|
+
import { t as Checkbox } from "../../checkbox-DDyLJRY8.js";
|
|
2
2
|
export { Checkbox };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
|
-
import { t as ColorSwatch } from "../../color-swatch-
|
|
2
|
+
import { t as ColorSwatch } from "../../color-swatch-DmhdOhe4.js";
|
|
3
3
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
|
-
import { t as __ } from "../../build-module-
|
|
5
|
+
import { t as __ } from "../../build-module-BISCoQjQ.js";
|
|
6
6
|
import { colorPickerFill } from "../../icons/ui-icons/color-picker-fill.js";
|
|
7
7
|
import { colorPickerListMarker } from "../../icons/ui-icons/color-picker-list-marker.js";
|
|
8
8
|
import { colorPickerText } from "../../icons/ui-icons/color-picker-text.js";
|
|
@@ -39,7 +39,7 @@ var ColorPicker = (props) => {
|
|
|
39
39
|
if (hidden) return null;
|
|
40
40
|
const currentColor = colors.find(({ slug }) => slug === value)?.color;
|
|
41
41
|
const hasColorGroups = !noColorGroups && colors.some(({ slug }) => colorSuffixRegex.test(slug));
|
|
42
|
-
const colorGroupNames =
|
|
42
|
+
const colorGroupNames = new Map([["generic", __("Other colors", "eightshift-ui-components")]]);
|
|
43
43
|
let groupedColors;
|
|
44
44
|
if (hasColorGroups) groupedColors = colors.reduce((output, current) => {
|
|
45
45
|
if (!current?.name || !current?.slug) return output;
|
|
@@ -48,7 +48,7 @@ var ColorPicker = (props) => {
|
|
|
48
48
|
const newSlug = current.slug.replace(colorSuffixRegex, "").trim();
|
|
49
49
|
if (!output[newSlug]) {
|
|
50
50
|
output[newSlug] = [];
|
|
51
|
-
colorGroupNames
|
|
51
|
+
colorGroupNames.set(newSlug, current.name.replace(colorSuffixRegex, "").trim());
|
|
52
52
|
}
|
|
53
53
|
output[newSlug] = [...output[newSlug], {
|
|
54
54
|
...current,
|
|
@@ -124,13 +124,13 @@ var ColorPicker = (props) => {
|
|
|
124
124
|
tooltip: tooltipText,
|
|
125
125
|
triggerProps: {
|
|
126
126
|
...triggerProps,
|
|
127
|
-
"aria-label":
|
|
127
|
+
"aria-label": label !== void 0 ? void 0 : ariaLabel
|
|
128
128
|
},
|
|
129
129
|
...menuProps,
|
|
130
130
|
children: [
|
|
131
131
|
clearable ? jsxs(Fragment$1, { children: [jsx(MenuItem, {
|
|
132
132
|
onClick: () => onChange(void 0),
|
|
133
|
-
selected:
|
|
133
|
+
selected: value === void 0,
|
|
134
134
|
endIcon: jsx(ColorSwatch, {
|
|
135
135
|
className: "es:size-5!",
|
|
136
136
|
flat: true
|
|
@@ -141,11 +141,11 @@ var ColorPicker = (props) => {
|
|
|
141
141
|
hasColorGroups && groupedColors ? jsxs(Fragment$1, { children: [Object.entries(groupedColors).map(([groupSlug, groupedColorItems]) => {
|
|
142
142
|
if (groupSlug === "generic") return null;
|
|
143
143
|
return jsx(MenuSection, {
|
|
144
|
-
"aria-label": colorGroupNames
|
|
144
|
+
"aria-label": colorGroupNames.get(groupSlug),
|
|
145
145
|
children: groupedColorItems.map((color) => jsx(SingleItem, { ...color }, color.slug))
|
|
146
146
|
}, groupSlug);
|
|
147
147
|
}), genericGroupedColors.length > 0 ? jsx(MenuSection, {
|
|
148
|
-
"aria-label": colorGroupNames.generic,
|
|
148
|
+
"aria-label": colorGroupNames.get("generic"),
|
|
149
149
|
children: genericGroupedColors.map((color) => jsx(SingleItem, { ...color }, color.slug))
|
|
150
150
|
}) : null] }) : null,
|
|
151
151
|
extraOptions ? jsx(MenuSeparator, {}) : null,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ColorSwatch } from "../../color-swatch-
|
|
1
|
+
import { t as ColorSwatch } from "../../color-swatch-DmhdOhe4.js";
|
|
2
2
|
export { ColorSwatch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as GradientEditor } from "../../gradient-editor-
|
|
1
|
+
import { t as GradientEditor } from "../../gradient-editor-DP8ioFX1.js";
|
|
2
2
|
export { GradientEditor };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SolidColorPicker } from "../../solid-color-picker-
|
|
1
|
+
import { t as SolidColorPicker } from "../../solid-color-picker-D5LEdmDM.js";
|
|
2
2
|
export { SolidColorPicker };
|
|
@@ -53,5 +53,5 @@ type ComponentToggleProps = {
|
|
|
53
53
|
* ...
|
|
54
54
|
* </ComponentToggle>
|
|
55
55
|
*/
|
|
56
|
-
export declare const ComponentToggle: (props: Prettify<ComponentToggleProps>) => string | number | boolean |
|
|
56
|
+
export declare const ComponentToggle: (props: Prettify<ComponentToggleProps>) => string | number | boolean | import("react").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
57
57
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
2
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
3
|
-
import { t as Switch } from "../../switch-
|
|
4
|
-
import { t as ToggleButton } from "../../toggle-button-
|
|
5
|
-
import { n as ButtonGroup } from "../../button-
|
|
3
|
+
import { t as Switch } from "../../switch-Bo6nmed_.js";
|
|
4
|
+
import { t as ToggleButton } from "../../toggle-button-Cb4yCEua.js";
|
|
5
|
+
import { n as ButtonGroup } from "../../button-ldR_tlvk.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
7
|
import { t as sprintf } from "../../sprintf-xJRAt4p0.js";
|
|
8
|
-
import { t as __ } from "../../build-module-
|
|
8
|
+
import { t as __ } from "../../build-module-BISCoQjQ.js";
|
|
9
9
|
import { componentGeneric } from "../../icons/ui-icons/component-generic.js";
|
|
10
10
|
import { dropdownCaretAlt } from "../../icons/ui-icons/dropdown-caret-alt.js";
|
|
11
11
|
import { Expandable } from "../expandable/expandable.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
|
-
import { n as $a3e16eab0ea4036c$export$feabaa331e1d464c, t as $a3e16eab0ea4036c$export$74a362b31437ec83 } from "../../Disclosure-
|
|
3
|
-
import { t as Switch } from "../../switch-
|
|
4
|
-
import { t as Button } from "../../button-
|
|
2
|
+
import { n as $a3e16eab0ea4036c$export$feabaa331e1d464c, t as $a3e16eab0ea4036c$export$74a362b31437ec83 } from "../../Disclosure-BHNgL5Is.js";
|
|
3
|
+
import { t as Switch } from "../../switch-Bo6nmed_.js";
|
|
4
|
+
import { t as Button } from "../../button-ldR_tlvk.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { chevronDown } from "../../icons/ui-icons/chevron-down.js";
|
|
7
7
|
import { HStack } from "../layout/hstack.js";
|
|
@@ -27,16 +27,16 @@ var ContainerPanel = (props) => {
|
|
|
27
27
|
const { children, className, title, icon, subtitle, use, onUseChange, closable, startOpen = false, topBorder = false, accentLabel = false, accentIcon = false, noLabelInset = false, actions, hidden } = props;
|
|
28
28
|
const [open, setOpen] = useState(startOpen);
|
|
29
29
|
if (hidden) return null;
|
|
30
|
-
if (!title &&
|
|
30
|
+
if (!title && use === void 0) return jsx("div", {
|
|
31
31
|
className: clsx("es:flex es:flex-col es:gap-3 es:p-4", topBorder && "es:border-t es:border-t-secondary-200", className),
|
|
32
32
|
children
|
|
33
33
|
});
|
|
34
|
-
const justUse = !closable &&
|
|
35
|
-
const justClosable = Boolean(closable) &&
|
|
36
|
-
const useAndClosable = Boolean(closable) &&
|
|
37
|
-
const shouldUseDisclosure = Boolean(closable) ||
|
|
34
|
+
const justUse = !closable && onUseChange !== void 0;
|
|
35
|
+
const justClosable = Boolean(closable) && onUseChange === void 0;
|
|
36
|
+
const useAndClosable = Boolean(closable) && onUseChange !== void 0;
|
|
37
|
+
const shouldUseDisclosure = Boolean(closable) || use !== void 0;
|
|
38
38
|
let isExpanded = Boolean(use);
|
|
39
|
-
if (closable) isExpanded =
|
|
39
|
+
if (closable) isExpanded = use !== void 0 ? Boolean(use) && open : open;
|
|
40
40
|
return jsx($a3e16eab0ea4036c$export$74a362b31437ec83, {
|
|
41
41
|
isExpanded: shouldUseDisclosure ? isExpanded : true,
|
|
42
42
|
className: "es:block",
|
|
@@ -61,10 +61,10 @@ var ContainerPanel = (props) => {
|
|
|
61
61
|
type: "ghost",
|
|
62
62
|
size: "small",
|
|
63
63
|
className: clsx("es:icon:size-4! es:icon:transition-transform", isExpanded && "es:icon:-scale-y-100"),
|
|
64
|
-
disabled:
|
|
64
|
+
disabled: use !== void 0 && !use
|
|
65
65
|
}) : null
|
|
66
66
|
})] }),
|
|
67
|
-
className: clsx(topBorder && "es:border-t es:border-t-secondary-200", !closable &&
|
|
67
|
+
className: clsx(topBorder && "es:border-t es:border-t-secondary-200", !closable && use === void 0 && "es:space-y-2", justClosable && open && "es:pb-4", justUse && use && "es:pb-4", useAndClosable && use && open && "es:pb-4", !justClosable && !justUse && !useAndClosable && "es:pb-4", !closable && !onUseChange && use === void 0 && "es:px-4", className),
|
|
68
68
|
labelContainerClassName: clsx((closable || onUseChange) && "es:pl-4 es:pr-3 es:min-h-12", !(closable || onUseChange) && "es:mt-3 es:mb-3", (closable || onUseChange) && "es:mb-0!", "es:pb-0!"),
|
|
69
69
|
controlContainerClassName: "es:px-4",
|
|
70
70
|
labelClassName: clsx(!noLabelInset && "es:px-1", accentLabel && "es:text-accent-800 es:any-icon:text-accent-700", accentIcon && "es:any-icon:text-accent-700", !accentLabel && "es:text-surface-700"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as clsx } from "../../clsx-DQoRUQAf.js";
|
|
2
|
-
import { t as $f2ff30fde7b014be$export$2e1e1122cf0cba88 } from "../../Dialog-
|
|
3
|
-
import { t as Button } from "../../button-
|
|
2
|
+
import { t as $f2ff30fde7b014be$export$2e1e1122cf0cba88 } from "../../Dialog-CldDJ_4u.js";
|
|
3
|
+
import { t as Button } from "../../button-ldR_tlvk.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
|
-
import { t as __ } from "../../build-module-
|
|
5
|
+
import { t as __ } from "../../build-module-BISCoQjQ.js";
|
|
6
6
|
import { clear } from "../../icons/ui-icons/clear.js";
|
|
7
7
|
import { info } from "../../icons/ui-icons/info.js";
|
|
8
8
|
import { warning } from "../../icons/ui-icons/warning.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import type { Prettify } from '../../utilities/types';
|
|
3
3
|
type DragAxis = 'both' | 'horizontal' | 'vertical';
|
|
4
|
-
type DraggableRenderContext<TItem extends
|
|
4
|
+
type DraggableRenderContext<TItem extends object> = TItem & {
|
|
5
5
|
updateData: (newValue: Partial<TItem>) => void;
|
|
6
6
|
itemIndex: number;
|
|
7
7
|
deleteItem: () => void;
|
|
8
8
|
};
|
|
9
|
-
type DraggableProps<TItem extends
|
|
9
|
+
type DraggableProps<TItem extends object> = HTMLAttributes<HTMLDivElement> & {
|
|
10
10
|
children: (item: DraggableRenderContext<TItem>) => ReactNode;
|
|
11
11
|
/** Data to display in the list. */
|
|
12
12
|
items?: TItem[] | null;
|
|
@@ -48,5 +48,5 @@ type DraggableProps<TItem extends Record<string, unknown>> = HTMLAttributes<HTML
|
|
|
48
48
|
* }}
|
|
49
49
|
* </Draggable>
|
|
50
50
|
*/
|
|
51
|
-
export declare const Draggable: <TItem extends
|
|
51
|
+
export declare const Draggable: <TItem extends object>(props: Prettify<DraggableProps<TItem>>) => import("react").JSX.Element | null;
|
|
52
52
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Draggable } from "../../draggable-
|
|
1
|
+
import { t as Draggable } from "../../draggable-oS68xcYX.js";
|
|
2
2
|
export { Draggable };
|