@eightshift/ui-components 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/Button-BpwTmkAe.js +185 -0
  2. package/dist/Collection-n5d0zIgb.js +2398 -0
  3. package/dist/Color-lVhk8V_G.js +2452 -0
  4. package/dist/ColorSwatch-DntWEAC3.js +64 -0
  5. package/dist/ComboBox-BJpTEATT.js +1915 -0
  6. package/dist/Dialog-O9uw63D7.js +2317 -0
  7. package/dist/FieldError-DHrSdE_Q.js +42 -0
  8. package/dist/FocusScope-BEPI2m7u.js +831 -0
  9. package/dist/Form-Cq3fu75_.js +5 -0
  10. package/dist/Group-DDPhPPTQ.js +48 -0
  11. package/dist/Heading-ba38ScjJ.js +16 -0
  12. package/dist/Hidden-rE6uR-lr.js +41 -0
  13. package/dist/Input-BmDS8Juy.js +133 -0
  14. package/dist/Label-JS_ob-kh.js +17 -0
  15. package/dist/List-CZMUbkFU.js +593 -0
  16. package/dist/ListBox-BTxlCGcc.js +664 -0
  17. package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
  18. package/dist/OverlayArrow-5aDgmImj.js +637 -0
  19. package/dist/RSPContexts-2lR5GG9p.js +14 -0
  20. package/dist/Select-aab027f3.esm-BKIJGje-.js +2469 -0
  21. package/dist/Separator-CaTBkETC.js +332 -0
  22. package/dist/Slider-C-S1oEH9.js +853 -0
  23. package/dist/Text-BuJgePCv.js +16 -0
  24. package/dist/VisuallyHidden-BYi0pekx.js +48 -0
  25. package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
  26. package/dist/assets/index.css +57 -0
  27. package/dist/assets/style-admin.css +5908 -0
  28. package/dist/assets/style-editor.css +5908 -0
  29. package/dist/assets/style.css +5914 -0
  30. package/dist/assets/wp-font-enhancements.css +8 -0
  31. package/dist/assets/wp-ui-enhancements.css +396 -0
  32. package/dist/components/animated-visibility/animated-visibility.js +105 -0
  33. package/dist/components/base-control/base-control.js +86 -0
  34. package/dist/components/breakpoint-preview/breakpoint-preview.js +161 -0
  35. package/dist/components/button/button.js +387 -0
  36. package/dist/components/checkbox/checkbox.js +323 -0
  37. package/dist/components/color-pickers/color-picker.js +272 -0
  38. package/dist/components/color-pickers/color-swatch.js +59 -0
  39. package/dist/components/color-pickers/gradient-editor.js +534 -0
  40. package/dist/components/color-pickers/solid-color-picker.js +1567 -0
  41. package/dist/components/component-toggle/component-toggle.js +161 -0
  42. package/dist/components/container-panel/container-panel.js +131 -0
  43. package/dist/components/draggable/draggable-context.js +5 -0
  44. package/dist/components/draggable/draggable-handle.js +46 -0
  45. package/dist/components/draggable/draggable.js +7320 -0
  46. package/dist/components/draggable-list/draggable-list-context.js +5 -0
  47. package/dist/components/draggable-list/draggable-list-item.js +77 -0
  48. package/dist/components/draggable-list/draggable-list.js +151 -0
  49. package/dist/components/expandable/expandable.js +342 -0
  50. package/dist/components/index.js +137 -0
  51. package/dist/components/input-field/input-field.js +231 -0
  52. package/dist/components/item-collection/item-collection.js +59 -0
  53. package/dist/components/layout/hstack.js +30 -0
  54. package/dist/components/layout/vstack.js +30 -0
  55. package/dist/components/link-input/link-input.js +284 -0
  56. package/dist/components/matrix-align/matrix-align.js +134 -0
  57. package/dist/components/menu/menu.js +285 -0
  58. package/dist/components/modal/modal.js +305 -0
  59. package/dist/components/notice/notice.js +123 -0
  60. package/dist/components/number-picker/number-picker.js +292 -0
  61. package/dist/components/option-select/option-select.js +264 -0
  62. package/dist/components/options-panel/options-panel.js +158 -0
  63. package/dist/components/placeholders/file-placeholder.js +42 -0
  64. package/dist/components/placeholders/image-placeholder.js +88 -0
  65. package/dist/components/placeholders/media-placeholder.js +63 -0
  66. package/dist/components/popover/popover.js +207 -0
  67. package/dist/components/radio/radio.js +582 -0
  68. package/dist/components/repeater/repeater-context.js +5 -0
  69. package/dist/components/repeater/repeater-item.js +119 -0
  70. package/dist/components/repeater/repeater.js +280 -0
  71. package/dist/components/responsive/mini-responsive.js +498 -0
  72. package/dist/components/responsive/responsive-legacy.js +343 -0
  73. package/dist/components/responsive/responsive.js +583 -0
  74. package/dist/components/responsive-preview/responsive-preview.js +123 -0
  75. package/dist/components/rich-label/rich-label.js +66 -0
  76. package/dist/components/select/async-multi-select.js +157 -0
  77. package/dist/components/select/async-single-select.js +137 -0
  78. package/dist/components/select/custom-select-default-components.js +38 -0
  79. package/dist/components/select/multi-select-components.js +8 -0
  80. package/dist/components/select/multi-select.js +151 -0
  81. package/dist/components/select/react-select-component-wrappers.js +90 -0
  82. package/dist/components/select/shared.js +26 -0
  83. package/dist/components/select/single-select.js +131 -0
  84. package/dist/components/select/styles.js +49 -0
  85. package/dist/components/select/v2/async-select.js +297 -0
  86. package/dist/components/select/v2/shared.js +24 -0
  87. package/dist/components/select/v2/single-select.js +1004 -0
  88. package/dist/components/slider/column-config-slider.js +210 -0
  89. package/dist/components/slider/slider.js +345 -0
  90. package/dist/components/slider/utils.js +94 -0
  91. package/dist/components/spacer/spacer.js +97 -0
  92. package/dist/components/tabs/tabs.js +703 -0
  93. package/dist/components/toggle/switch.js +156 -0
  94. package/dist/components/toggle/toggle.js +64 -0
  95. package/dist/components/toggle-button/toggle-button.js +343 -0
  96. package/dist/components/tooltip/tooltip.js +527 -0
  97. package/dist/context-BbYZoHvX.js +92 -0
  98. package/dist/default-i18n-CT_oS1Fy.js +922 -0
  99. package/dist/filterDOMProps-EDDcM64A.js +28 -0
  100. package/dist/icons/block-icon.js +42 -0
  101. package/dist/icons/generic-color-swatch.js +113 -0
  102. package/dist/icons/icons.js +30495 -0
  103. package/dist/icons/index.js +11 -0
  104. package/dist/icons/jsx-svg.js +50 -0
  105. package/dist/index-641ee5b8.esm-BPU8rMZr.js +3137 -0
  106. package/dist/index-BljRBEr_.js +44 -0
  107. package/dist/index-CFozsmNS.js +28321 -0
  108. package/dist/index.js +139 -0
  109. package/dist/lite-DVmmD_-j.js +7 -0
  110. package/dist/modifiers.esm-BuJQPI1X.js +31 -0
  111. package/dist/multi-select-components-Sp-JEFEX.js +3744 -0
  112. package/dist/number-GajL10e1.js +36 -0
  113. package/dist/react-jsx-parser.min-DZCiis5V.js +11753 -0
  114. package/dist/react-select-async.esm-D937XTWW.js +107 -0
  115. package/dist/react-select.esm-Ciai3aKf.js +15 -0
  116. package/dist/style-admin.js +1 -0
  117. package/dist/style-editor.js +1 -0
  118. package/dist/style.js +1 -0
  119. package/dist/textSelection-8DpK8fJl.js +46 -0
  120. package/dist/useButton-Bt3BffJm.js +50 -0
  121. package/dist/useEvent-ICdlokG-.js +23 -0
  122. package/dist/useFocusRing-Bv0UJQl8.js +107 -0
  123. package/dist/useFormReset-D2YaWRIA.js +22 -0
  124. package/dist/useFormValidation-Dy0PXJg5.js +224 -0
  125. package/dist/useHover-C2SkI1Fn.js +895 -0
  126. package/dist/useLabel-BPCd5c7-.js +27 -0
  127. package/dist/useLabels-B7-lUnAF.js +23 -0
  128. package/dist/useListState-DkyH7elT.js +168 -0
  129. package/dist/useLocalizedStringFormatter-C9GO0IDB.js +121 -0
  130. package/dist/useNumberField-CU1_u8ze.js +1215 -0
  131. package/dist/useNumberFormatter-CZ9QUnRt.js +13 -0
  132. package/dist/usePress-BrJylgPR.js +688 -0
  133. package/dist/useSingleSelectListState-C4sorv2p.js +38 -0
  134. package/dist/useToggle-CDa3YAZI.js +59 -0
  135. package/dist/useToggleState-ibcBUHnB.js +19 -0
  136. package/dist/utilities/array-helpers.js +56 -0
  137. package/dist/utilities/debounce-throttle.js +123 -0
  138. package/dist/utilities/es-dash.js +382 -0
  139. package/dist/utilities/index.js +27 -0
  140. package/dist/utilities/text-helpers.js +136 -0
  141. package/dist/utils-CZt7LCbO.js +403 -0
  142. package/dist/wp/wp-font-enhancements.js +1 -0
  143. package/dist/wp/wp-ui-enhancements.js +1 -0
  144. package/package.json +24 -24
@@ -0,0 +1,8 @@
1
+ /*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
2
+ .edit-post-header, .components-popover, .edit-post-sidebar, .wp-block-post-title, .components-select-control__input, .components-base-control__field, .components-base-control__label, .components-combobox-control__suggestions-container, .components-input-control__label, .components-input-control__input, .components-checkbox-control__label, .components-menu-group__label, .components-menu-item__button, .components-notice .components-notice__content, .components-tooltip, .components-modal__header, .preferences-modal__section-title, .preferences-modal__section-description, .block-editor-inserter__tabs, .editor-list-view-sidebar, .edit-post-layout__footer, .components-snackbar, .components-text-control__input {
3
+ font-family: var(--es-font-sans, "Geist Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
4
+ }
5
+
6
+ body.wp-admin {
7
+ font-family: var(--es-font-sans, "Geist Variable", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji") !important;
8
+ }
@@ -0,0 +1,396 @@
1
+ /*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
2
+ @layer properties {
3
+ @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
+ *, :before, :after, ::backdrop {
5
+ --tw-font-weight: initial;
6
+ --tw-tracking: initial;
7
+ --tw-shadow: 0 0 #0000;
8
+ --tw-shadow-color: initial;
9
+ --tw-shadow-alpha: 100%;
10
+ --tw-inset-shadow: 0 0 #0000;
11
+ --tw-inset-shadow-color: initial;
12
+ --tw-inset-shadow-alpha: 100%;
13
+ --tw-ring-color: initial;
14
+ --tw-ring-shadow: 0 0 #0000;
15
+ --tw-inset-ring-color: initial;
16
+ --tw-inset-ring-shadow: 0 0 #0000;
17
+ --tw-ring-inset: initial;
18
+ --tw-ring-offset-width: 0px;
19
+ --tw-ring-offset-color: #fff;
20
+ --tw-ring-offset-shadow: 0 0 #0000;
21
+ --tw-content: "";
22
+ --tw-scale-x: 1;
23
+ --tw-scale-y: 1;
24
+ --tw-scale-z: 1;
25
+ --tw-border-style: solid;
26
+ --tw-backdrop-blur: initial;
27
+ --tw-backdrop-brightness: initial;
28
+ --tw-backdrop-contrast: initial;
29
+ --tw-backdrop-grayscale: initial;
30
+ --tw-backdrop-hue-rotate: initial;
31
+ --tw-backdrop-invert: initial;
32
+ --tw-backdrop-opacity: initial;
33
+ --tw-backdrop-saturate: initial;
34
+ --tw-backdrop-sepia: initial;
35
+ }
36
+ }
37
+ }
38
+
39
+ .edit-post-header__toolbar .components-button, .edit-post-header__settings .components-button, .editor-document-tools__left .components-button, .editor-header__center .components-button, .editor-header__settings .components-button, .edit-post-sidebar .components-button:not(.components-panel__body-toggle, .editor-post-last-revision__title), .components-snackbar, .components-toggle-group-control, .editor-post-publish-panel .components-button, .edit-post-text-editor__toolbar .components-button, .edit-post-text-editor__body .components-textarea-control__input, .media-modal-content, .media-modal-content .components-button, .components-guide__container .components-button, .components-notice__content .components-button, .editor-post-featured-image__toggle.components-button {
40
+ border-radius: var(--es-radius-md, .375rem) !important;
41
+ }
42
+
43
+ .components-input-control__container, .components-combobox-control__suggestions-container, .components-checkbox-control__input, button.components-toggle-group-control-option-base, .editor-post-visibility__password-input {
44
+ border-radius: .25rem !important;
45
+ }
46
+
47
+ .components-button-group .components-button:first-child {
48
+ border-top-left-radius: var(--es-radius-md, .375rem) !important;
49
+ border-bottom-left-radius: var(--es-radius-md, .375rem) !important;
50
+ }
51
+
52
+ .components-button-group .components-button:last-child {
53
+ border-top-right-radius: var(--es-radius-md, .375rem) !important;
54
+ border-bottom-right-radius: var(--es-radius-md, .375rem) !important;
55
+ }
56
+
57
+ .components-popover__content, .components-guide {
58
+ border-radius: var(--es-radius-lg, .5rem) !important;
59
+ }
60
+
61
+ .block-editor-inserter__search {
62
+ border-top-left-radius: var(--es-radius-lg, .5rem) !important;
63
+ border-top-right-radius: var(--es-radius-lg, .5rem) !important;
64
+ }
65
+
66
+ .media-menu-item.active {
67
+ border-top-left-radius: var(--es-radius-md, .375rem) !important;
68
+ border-top-right-radius: var(--es-radius-md, .375rem) !important;
69
+ }
70
+
71
+ .components-base-control__label, .components-input-control__label, .components-custom-select-control__label {
72
+ --tw-font-weight: var(--es-font-weight-normal, 400) !important;
73
+ font-size: 13px !important;
74
+ font-weight: var(--es-font-weight-normal, 400) !important;
75
+ --tw-tracking: var(--es-tracking-normal, 0em) !important;
76
+ letter-spacing: var(--es-tracking-normal, 0em) !important;
77
+ text-transform: none !important;
78
+ }
79
+
80
+ .edit-post-sidebar, .interface-interface-skeleton__sidebar:not(:empty) > .interface-complementary-area__fill[style="width: 280px;"], .interface-complementary-area.editor-sidebar {
81
+ width: calc(var(--es-spacing, .25rem) * 80) !important;
82
+ }
83
+
84
+ .block-editor-block-list__block-crash-warning {
85
+ border-radius: var(--es-radius-lg, .5rem) !important;
86
+ border-color: var(--es-color-red-700, oklch(50.5% .213 27.518)) !important;
87
+ }
88
+
89
+ @supports (color: color-mix(in lab, red, red)) {
90
+ .block-editor-block-list__block-crash-warning {
91
+ border-color: color-mix(in oklab, var(--es-color-red-700, oklch(50.5% .213 27.518)) 15%, transparent) !important;
92
+ }
93
+ }
94
+
95
+ .block-editor-block-list__block-crash-warning {
96
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
97
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
98
+ --tw-shadow-color: var(--es-color-red-700, oklch(50.5% .213 27.518)) !important;
99
+ }
100
+
101
+ @supports (color: color-mix(in lab, red, red)) {
102
+ .block-editor-block-list__block-crash-warning {
103
+ --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(--tw-shadow-alpha), transparent) !important;
104
+ }
105
+ }
106
+
107
+ .block-editor-block-list__block-crash-warning .block-editor-warning__message {
108
+ color: var(--es-color-red-950, oklch(25.8% .092 26.042)) !important;
109
+ }
110
+
111
+ .wp-block-missing div.block-editor-warning {
112
+ border-radius: var(--es-radius-lg, .5rem) !important;
113
+ border-color: var(--es-color-zinc-300, oklch(87.1% .006 286.286)) !important;
114
+ background-color: var(--es-color-zinc-50, oklch(98.5% 0 0)) !important;
115
+ }
116
+
117
+ @supports (color: color-mix(in lab, red, red)) {
118
+ .wp-block-missing div.block-editor-warning {
119
+ background-color: color-mix(in oklab, var(--es-color-zinc-50, oklch(98.5% 0 0)) 75%, transparent) !important;
120
+ }
121
+ }
122
+
123
+ .wp-block-missing div.block-editor-warning {
124
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
125
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
126
+ --tw-shadow-color: var(--es-color-zinc-700, oklch(37% .013 285.805)) !important;
127
+ }
128
+
129
+ @supports (color: color-mix(in lab, red, red)) {
130
+ .wp-block-missing div.block-editor-warning {
131
+ --tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--es-color-zinc-700, oklch(37% .013 285.805)) 20%, transparent) var(--tw-shadow-alpha), transparent) !important;
132
+ }
133
+ }
134
+
135
+ .wp-block-missing div.block-editor-warning .block-editor-warning__message {
136
+ color: var(--es-color-zinc-950, oklch(14.1% .005 285.823)) !important;
137
+ }
138
+
139
+ .block-editor-block-contextual-toolbar, .block-editor-block-parent-selector__button {
140
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
141
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
142
+ border-radius: var(--es-radius-lg, .5rem) !important;
143
+ }
144
+
145
+ .block-editor-block-types-list .block-editor-block-types-list__item {
146
+ border-radius: var(--es-radius-lg, .5rem) !important;
147
+ }
148
+
149
+ .block-editor-block-types-list .block-editor-block-types-list__item:after {
150
+ content: var(--tw-content);
151
+ border-radius: var(--es-radius-lg, .5rem) !important;
152
+ }
153
+
154
+ .block-editor-block-types-list .block-editor-block-types-list__item svg {
155
+ --tw-scale-x: 125%;
156
+ --tw-scale-y: 125%;
157
+ --tw-scale-z: 125%;
158
+ scale: var(--tw-scale-x) var(--tw-scale-y);
159
+ }
160
+
161
+ .block-editor-list-view-tree .block-editor-block-icon {
162
+ border-radius: .25rem !important;
163
+ }
164
+
165
+ .block-editor-list-view-tree .block-editor-list-view-leaf > :first-child {
166
+ border-top-left-radius: var(--es-radius-lg, .5rem) !important;
167
+ border-bottom-left-radius: var(--es-radius-lg, .5rem) !important;
168
+ }
169
+
170
+ .block-editor-list-view-tree .block-editor-list-view-leaf > :last-child {
171
+ border-top-right-radius: var(--es-radius-lg, .5rem) !important;
172
+ border-bottom-right-radius: var(--es-radius-lg, .5rem) !important;
173
+ }
174
+
175
+ .block-editor-block-inspector .block-editor-block-card .block-editor-block-icon {
176
+ border-radius: .25rem !important;
177
+ }
178
+
179
+ .block-editor-inserter__toggle {
180
+ border-radius: var(--es-radius-md, .375rem) !important;
181
+ }
182
+
183
+ :is(.edit-post-header__toolbar, .edit-post-header__settings, .editor-document-tools__left, .editor-header__center, .editor-header__settings) .components-button {
184
+ min-height: calc(var(--es-spacing, .25rem) * 9) !important;
185
+ min-width: calc(var(--es-spacing, .25rem) * 9) !important;
186
+ }
187
+
188
+ .editor-styles-wrapper .wp-block:not(.editor-post-title, .block-list-appender) {
189
+ max-width: 100% !important;
190
+ }
191
+
192
+ .components-tooltip {
193
+ border-style: var(--tw-border-style);
194
+ border-width: 1px;
195
+ border-color: var(--es-color-gray-800, oklch(27.8% .033 256.848));
196
+ background-color: var(--es-color-gray-950, oklch(13% .028 261.692));
197
+ border-radius: var(--es-radius-md, .375rem) !important;
198
+ }
199
+
200
+ @supports (color: color-mix(in lab, red, red)) {
201
+ .components-tooltip {
202
+ background-color: color-mix(in oklab, var(--es-color-gray-950, oklch(13% .028 261.692)) 70%, transparent);
203
+ }
204
+ }
205
+
206
+ .components-tooltip {
207
+ padding-inline: calc(var(--es-spacing, .25rem) * 1);
208
+ padding-block: calc(var(--es-spacing, .25rem) * .5);
209
+ color: var(--es-color-white, #fff);
210
+ --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
211
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
212
+ --tw-backdrop-blur: blur(var(--es-blur-xl, 24px));
213
+ -webkit-backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
214
+ backdrop-filter: var(--tw-backdrop-blur, ) var(--tw-backdrop-brightness, ) var(--tw-backdrop-contrast, ) var(--tw-backdrop-grayscale, ) var(--tw-backdrop-hue-rotate, ) var(--tw-backdrop-invert, ) var(--tw-backdrop-opacity, ) var(--tw-backdrop-saturate, ) var(--tw-backdrop-sepia, );
215
+ --tw-backdrop-brightness: brightness(105%);
216
+ --tw-backdrop-saturate: saturate(150%);
217
+ }
218
+
219
+ .components-tooltip:has( > :first-child) {
220
+ border-color: var(--es-color-gray-200, oklch(92.8% .006 264.531));
221
+ background-color: var(--es-color-white, #fff);
222
+ }
223
+
224
+ @supports (color: color-mix(in lab, red, red)) {
225
+ .components-tooltip:has( > :first-child) {
226
+ background-color: color-mix(in oklab, var(--es-color-white, #fff) 80%, transparent);
227
+ }
228
+ }
229
+
230
+ .components-tooltip:has( > :first-child) {
231
+ color: var(--es-color-gray-700, oklch(37.3% .034 259.733));
232
+ }
233
+
234
+ @property --tw-font-weight {
235
+ syntax: "*";
236
+ inherits: false
237
+ }
238
+
239
+ @property --tw-tracking {
240
+ syntax: "*";
241
+ inherits: false
242
+ }
243
+
244
+ @property --tw-shadow {
245
+ syntax: "*";
246
+ inherits: false;
247
+ initial-value: 0 0 #0000;
248
+ }
249
+
250
+ @property --tw-shadow-color {
251
+ syntax: "*";
252
+ inherits: false
253
+ }
254
+
255
+ @property --tw-shadow-alpha {
256
+ syntax: "<percentage>";
257
+ inherits: false;
258
+ initial-value: 100%;
259
+ }
260
+
261
+ @property --tw-inset-shadow {
262
+ syntax: "*";
263
+ inherits: false;
264
+ initial-value: 0 0 #0000;
265
+ }
266
+
267
+ @property --tw-inset-shadow-color {
268
+ syntax: "*";
269
+ inherits: false
270
+ }
271
+
272
+ @property --tw-inset-shadow-alpha {
273
+ syntax: "<percentage>";
274
+ inherits: false;
275
+ initial-value: 100%;
276
+ }
277
+
278
+ @property --tw-ring-color {
279
+ syntax: "*";
280
+ inherits: false
281
+ }
282
+
283
+ @property --tw-ring-shadow {
284
+ syntax: "*";
285
+ inherits: false;
286
+ initial-value: 0 0 #0000;
287
+ }
288
+
289
+ @property --tw-inset-ring-color {
290
+ syntax: "*";
291
+ inherits: false
292
+ }
293
+
294
+ @property --tw-inset-ring-shadow {
295
+ syntax: "*";
296
+ inherits: false;
297
+ initial-value: 0 0 #0000;
298
+ }
299
+
300
+ @property --tw-ring-inset {
301
+ syntax: "*";
302
+ inherits: false
303
+ }
304
+
305
+ @property --tw-ring-offset-width {
306
+ syntax: "<length>";
307
+ inherits: false;
308
+ initial-value: 0;
309
+ }
310
+
311
+ @property --tw-ring-offset-color {
312
+ syntax: "*";
313
+ inherits: false;
314
+ initial-value: #fff;
315
+ }
316
+
317
+ @property --tw-ring-offset-shadow {
318
+ syntax: "*";
319
+ inherits: false;
320
+ initial-value: 0 0 #0000;
321
+ }
322
+
323
+ @property --tw-content {
324
+ syntax: "*";
325
+ inherits: false;
326
+ initial-value: "";
327
+ }
328
+
329
+ @property --tw-scale-x {
330
+ syntax: "*";
331
+ inherits: false;
332
+ initial-value: 1;
333
+ }
334
+
335
+ @property --tw-scale-y {
336
+ syntax: "*";
337
+ inherits: false;
338
+ initial-value: 1;
339
+ }
340
+
341
+ @property --tw-scale-z {
342
+ syntax: "*";
343
+ inherits: false;
344
+ initial-value: 1;
345
+ }
346
+
347
+ @property --tw-border-style {
348
+ syntax: "*";
349
+ inherits: false;
350
+ initial-value: solid;
351
+ }
352
+
353
+ @property --tw-backdrop-blur {
354
+ syntax: "*";
355
+ inherits: false
356
+ }
357
+
358
+ @property --tw-backdrop-brightness {
359
+ syntax: "*";
360
+ inherits: false
361
+ }
362
+
363
+ @property --tw-backdrop-contrast {
364
+ syntax: "*";
365
+ inherits: false
366
+ }
367
+
368
+ @property --tw-backdrop-grayscale {
369
+ syntax: "*";
370
+ inherits: false
371
+ }
372
+
373
+ @property --tw-backdrop-hue-rotate {
374
+ syntax: "*";
375
+ inherits: false
376
+ }
377
+
378
+ @property --tw-backdrop-invert {
379
+ syntax: "*";
380
+ inherits: false
381
+ }
382
+
383
+ @property --tw-backdrop-opacity {
384
+ syntax: "*";
385
+ inherits: false
386
+ }
387
+
388
+ @property --tw-backdrop-saturate {
389
+ syntax: "*";
390
+ inherits: false
391
+ }
392
+
393
+ @property --tw-backdrop-sepia {
394
+ syntax: "*";
395
+ inherits: false
396
+ }
@@ -0,0 +1,105 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { c as clsx } from "../../lite-DVmmD_-j.js";
3
+ import { useState, useEffect } from "react";
4
+ /**
5
+ * Component that allows animating the visibility of its children.
6
+ *
7
+ * @component
8
+ * @param {Object} props - Component props.
9
+ * @param {boolean} props.visible - Whether the content should be visible
10
+ * @param {string} props.className - Classes to pass to the element wrapper.
11
+ * @param {boolean} [props.noInitial=false] - If `true`, the animation when the component is first mounted is disabled.
12
+ * @param {boolean} [props.noExitAnimation=false] - If `true`, the exit animation is not played.
13
+ * @param {boolean} [props.noEnterAnimation=false] - If `true`, the entrance animation is not played.
14
+ * @param {ElementTransition} [props.transition='slideFade'] - The transition to use when showing/hiding the content.
15
+ *
16
+ * @returns {JSX.Element} The AnimatedVisibility component.
17
+ *
18
+ * @typedef {'fade' | 'slideFade' |'scaleFade' | 'scaleRotateFade' | 'slideFadeUpSlight' | 'slideFadeDownSlight' | 'slideInFadeOut' | 'scaleSlideFade'} ElementTransition
19
+ *
20
+ * @example
21
+ * const [visible, setVisible] = useState(false);
22
+ *
23
+ * <AnimatedVisibility visible={visible}>
24
+ * <div>Content</div>
25
+ * </AnimatedVisibility>
26
+ *
27
+ * @preserve
28
+ */
29
+ const AnimatedVisibility = (props) => {
30
+ const { visible, className, children, noInitial = false, transition = "slideFade", noExitAnimation, noEnterAnimation, ...other } = props;
31
+ const [isVisibleInner, setIsVisibleInner] = useState(false);
32
+ const [canAnimate, setCanAnimate] = useState(true);
33
+ useEffect(() => {
34
+ if (visible) {
35
+ setIsVisibleInner(true);
36
+ }
37
+ if (!visible && noExitAnimation) {
38
+ setIsVisibleInner(false);
39
+ }
40
+ }, [visible]);
41
+ useEffect(() => {
42
+ if (noInitial && visible) {
43
+ setCanAnimate(false);
44
+ }
45
+ }, []);
46
+ const transitions = {
47
+ fade: {
48
+ inClassName: "es:motion-opacity-in es:motion-duration-300",
49
+ outClassName: "es:motion-opacity-out es:motion-duration-200"
50
+ },
51
+ slideFade: {
52
+ inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
53
+ outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
54
+ },
55
+ slideInFadeOut: {
56
+ inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
57
+ outClassName: "es:motion-opacity-out es:motion-duration-200"
58
+ },
59
+ slideFadeUpSlight: {
60
+ inClassName: "es:motion-safe:motion-translate-y-in-[0.25rem] es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
61
+ outClassName: "es:motion-safe:motion-translate-y-out-[0.25rem] es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
62
+ },
63
+ slideFadeDownSlight: {
64
+ inClassName: "es:motion-safe:motion-translate-y-in-[-0.25rem] es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
65
+ outClassName: "es:motion-safe:motion-translate-y-out-[-0.25rem] es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
66
+ },
67
+ scaleFade: {
68
+ inClassName: "es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
69
+ outClassName: "es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
70
+ },
71
+ scaleSlideFade: {
72
+ inClassName: "es:motion-safe:motion-translate-y-in-[-5%] es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
73
+ outClassName: "es:motion-safe:motion-translate-y-out-[-5%] es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
74
+ },
75
+ scaleRotateFade: {
76
+ inClassName: "es:motion-rotate-in es:motion-safe:motion-scale-in-95 es:motion-opacity-in es:motion-duration-300 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity",
77
+ outClassName: "es:motion-rotate-out es:motion-safe:motion-scale-out-90 es:motion-opacity-out es:motion-duration-200 es:motion-safe:motion-ease-spring-bouncy es:motion-ease-linear/opacity"
78
+ }
79
+ };
80
+ return /* @__PURE__ */ jsx(Fragment, { children: isVisibleInner && /* @__PURE__ */ jsx(
81
+ "div",
82
+ {
83
+ className: clsx(
84
+ !noEnterAnimation && visible && noInitial && visible && canAnimate && transitions[transition].inClassName,
85
+ !noEnterAnimation && visible && !noInitial && transitions[transition].inClassName,
86
+ !noExitAnimation && !visible && transitions[transition].outClassName,
87
+ "es:fill-mode-forwards",
88
+ className
89
+ ),
90
+ onAnimationEnd: () => {
91
+ if (visible === false) {
92
+ setIsVisibleInner(false);
93
+ }
94
+ if (!canAnimate) {
95
+ setCanAnimate(true);
96
+ }
97
+ },
98
+ ...other,
99
+ children
100
+ }
101
+ ) });
102
+ };
103
+ export {
104
+ AnimatedVisibility
105
+ };
@@ -0,0 +1,86 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-BuJgePCv.js";
3
+ import { c as clsx } from "../../lite-DVmmD_-j.js";
4
+ import { RichLabel } from "../rich-label/rich-label.js";
5
+ /**
6
+ * Component that allows wrapping components with a common layout that includes a label and optional icon, subtitle, actions, and help text.
7
+ *
8
+ * @component
9
+ * @param {Object} props - Component props.
10
+ * @param {JSX.Element} [props.icon] - Icon to display in the label.
11
+ * @param {string} props.label - Label to display.
12
+ * @param {string} props.subtitle - Subtitle to display below the label.
13
+ * @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to show to the right of the label.
14
+ * @param {string} [props.help] - Help text to show below the component.
15
+ * @param {boolean} [props.inline] - If `true`, the component is displayed inline - icon/label/subtitle are on the left, the passed content is on the right. **Note:** not compatible with `actions`.
16
+ * @param {string} [props.className] - Classes to pass to the main element wrapper.
17
+ * @param {string} [props.controlContainerClassName] - Classes to pass to the control container.
18
+ * @param {string} [props.labelContainerClassName] - Classes to pass to the label container.
19
+ * @param {string} [props.labelClassName] - Classes to pass to the label.
20
+ * @param {boolean} [props.fullWidthLabel] - If `true`, the label expands to fill up the whole width, instead of taking up only the space it needs.
21
+ * @param {JSX.Element} [props.labelAs] - If provided, the label (includes icon and subtitle) will be rendered as this element.
22
+ * @param {boolean} [props.hidden] - If `true`, the component is not rendered.
23
+ *
24
+ * @returns {JSX.Element} The BaseControl component.
25
+ *
26
+ * @example
27
+ * <BaseControl label='My component' icon={icons.myIcon}>
28
+ * <div>Content</div>
29
+ * </BaseControl>
30
+ *
31
+ * @preserve
32
+ */
33
+ const BaseControl = (props) => {
34
+ const {
35
+ icon,
36
+ label,
37
+ subtitle,
38
+ actions,
39
+ help,
40
+ children,
41
+ inline,
42
+ className,
43
+ controlContainerClassName,
44
+ labelContainerClassName,
45
+ labelClassName,
46
+ fullWidthLabel,
47
+ labelAs,
48
+ hidden
49
+ } = props;
50
+ if (!children || hidden) {
51
+ return null;
52
+ }
53
+ if (!(label || icon || subtitle)) {
54
+ return children;
55
+ }
56
+ return /* @__PURE__ */ jsxs("div", { className: clsx("es:space-y-1", className), children: [
57
+ /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:items-center es:gap-1", !inline && !icon && "es:pb-0.5", labelContainerClassName), children: [
58
+ (label || icon || subtitle) && /* @__PURE__ */ jsx(
59
+ RichLabel,
60
+ {
61
+ icon,
62
+ label,
63
+ subtitle,
64
+ fullWidth: fullWidthLabel,
65
+ as: labelAs,
66
+ className: labelClassName
67
+ }
68
+ ),
69
+ inline && /* @__PURE__ */ jsx("div", { className: clsx("es:ml-auto es:flex es:items-center es:gap-1", controlContainerClassName), children }),
70
+ !inline && actions && /* @__PURE__ */ jsx("div", { className: clsx("es:flex es:items-center es:gap-1", !inline && "es:ml-auto"), children: actions })
71
+ ] }),
72
+ !inline && Array.isArray(children) && children.filter(Boolean).length > 1 && /* @__PURE__ */ jsx("div", { className: clsx("es:space-y-1", controlContainerClassName), children }),
73
+ !inline && (!Array.isArray(children) || children.filter(Boolean).length < 2) && children,
74
+ help && /* @__PURE__ */ jsx(
75
+ $514c0188e459b4c0$export$5f1af8db9871e1d6,
76
+ {
77
+ className: "es:inline-block es:text-sm es:text-secondary-500",
78
+ slot: "description",
79
+ children: help
80
+ }
81
+ )
82
+ ] });
83
+ };
84
+ export {
85
+ BaseControl
86
+ };