@eightshift/ui-components 3.0.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/package.json +101 -101
  2. package/dist/Button-BPLceDeW.js +0 -185
  3. package/dist/Collection-CZxddMZS.js +0 -2332
  4. package/dist/Color-MV5kBVXr.js +0 -2452
  5. package/dist/ColorSwatch-BqQfVu4L.js +0 -64
  6. package/dist/ComboBox-_RfyhwZw.js +0 -1906
  7. package/dist/Dialog-8tYeQ9n4.js +0 -2300
  8. package/dist/FieldError-52GVSGgC.js +0 -42
  9. package/dist/FocusScope-Cri5BFRz.js +0 -831
  10. package/dist/Form-Cq3fu75_.js +0 -5
  11. package/dist/Group-_emcIVxI.js +0 -48
  12. package/dist/Heading-B2153VXe.js +0 -16
  13. package/dist/Hidden-rE6uR-lr.js +0 -41
  14. package/dist/Input-BxpFEIXV.js +0 -133
  15. package/dist/Label-icmbmNdI.js +0 -17
  16. package/dist/List-CZMUbkFU.js +0 -593
  17. package/dist/ListBox-Ca6hiCqz.js +0 -581
  18. package/dist/NumberFormatter-DA8u1Ot7.js +0 -140
  19. package/dist/OverlayArrow-CYXQSlEU.js +0 -629
  20. package/dist/RSPContexts-2lR5GG9p.js +0 -14
  21. package/dist/Select-aab027f3.esm-PDJCDE95.js +0 -2469
  22. package/dist/Separator-4IIDRlV_.js +0 -322
  23. package/dist/Slider-rz2XRMGm.js +0 -853
  24. package/dist/Text-DVSAPY-K.js +0 -16
  25. package/dist/VisuallyHidden-f9zX67a_.js +0 -48
  26. package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
  27. package/dist/assets/index.css +0 -37
  28. package/dist/assets/style-admin.css +0 -5255
  29. package/dist/assets/style-editor.css +0 -5255
  30. package/dist/assets/style.css +0 -5261
  31. package/dist/assets/wp-font-enhancements.css +0 -8
  32. package/dist/assets/wp-ui-enhancements.css +0 -299
  33. package/dist/components/animated-visibility/animated-visibility.js +0 -105
  34. package/dist/components/base-control/base-control.js +0 -86
  35. package/dist/components/breakpoint-preview/breakpoint-preview.js +0 -161
  36. package/dist/components/button/button.js +0 -387
  37. package/dist/components/checkbox/checkbox.js +0 -320
  38. package/dist/components/color-pickers/color-picker.js +0 -272
  39. package/dist/components/color-pickers/color-swatch.js +0 -58
  40. package/dist/components/color-pickers/gradient-editor.js +0 -534
  41. package/dist/components/color-pickers/solid-color-picker.js +0 -1567
  42. package/dist/components/component-toggle/component-toggle.js +0 -158
  43. package/dist/components/container-panel/container-panel.js +0 -131
  44. package/dist/components/draggable/draggable-context.js +0 -5
  45. package/dist/components/draggable/draggable-handle.js +0 -46
  46. package/dist/components/draggable/draggable.js +0 -6207
  47. package/dist/components/draggable-list/draggable-list-context.js +0 -5
  48. package/dist/components/draggable-list/draggable-list-item.js +0 -77
  49. package/dist/components/draggable-list/draggable-list.js +0 -151
  50. package/dist/components/expandable/expandable.js +0 -342
  51. package/dist/components/index.js +0 -137
  52. package/dist/components/input-field/input-field.js +0 -231
  53. package/dist/components/item-collection/item-collection.js +0 -59
  54. package/dist/components/layout/hstack.js +0 -30
  55. package/dist/components/layout/vstack.js +0 -30
  56. package/dist/components/link-input/link-input.js +0 -293
  57. package/dist/components/matrix-align/matrix-align.js +0 -134
  58. package/dist/components/menu/menu.js +0 -285
  59. package/dist/components/modal/modal.js +0 -305
  60. package/dist/components/notice/notice.js +0 -123
  61. package/dist/components/number-picker/number-picker.js +0 -292
  62. package/dist/components/option-select/option-select.js +0 -264
  63. package/dist/components/options-panel/options-panel.js +0 -158
  64. package/dist/components/placeholders/file-placeholder.js +0 -42
  65. package/dist/components/placeholders/image-placeholder.js +0 -88
  66. package/dist/components/placeholders/media-placeholder.js +0 -63
  67. package/dist/components/popover/popover.js +0 -207
  68. package/dist/components/radio/radio.js +0 -579
  69. package/dist/components/repeater/repeater-context.js +0 -5
  70. package/dist/components/repeater/repeater-item.js +0 -119
  71. package/dist/components/repeater/repeater.js +0 -280
  72. package/dist/components/responsive/mini-responsive.js +0 -498
  73. package/dist/components/responsive/responsive-legacy.js +0 -343
  74. package/dist/components/responsive/responsive.js +0 -580
  75. package/dist/components/responsive-preview/responsive-preview.js +0 -123
  76. package/dist/components/rich-label/rich-label.js +0 -66
  77. package/dist/components/select/async-multi-select.js +0 -157
  78. package/dist/components/select/async-single-select.js +0 -137
  79. package/dist/components/select/custom-select-default-components.js +0 -38
  80. package/dist/components/select/multi-select-components.js +0 -8
  81. package/dist/components/select/multi-select.js +0 -151
  82. package/dist/components/select/react-select-component-wrappers.js +0 -90
  83. package/dist/components/select/shared.js +0 -26
  84. package/dist/components/select/single-select.js +0 -131
  85. package/dist/components/select/styles.js +0 -49
  86. package/dist/components/select/v2/async-select.js +0 -297
  87. package/dist/components/select/v2/shared.js +0 -24
  88. package/dist/components/select/v2/single-select.js +0 -990
  89. package/dist/components/slider/column-config-slider.js +0 -210
  90. package/dist/components/slider/slider.js +0 -343
  91. package/dist/components/slider/utils.js +0 -84
  92. package/dist/components/spacer/spacer.js +0 -97
  93. package/dist/components/tabs/tabs.js +0 -702
  94. package/dist/components/toggle/switch.js +0 -155
  95. package/dist/components/toggle/toggle.js +0 -64
  96. package/dist/components/toggle-button/toggle-button.js +0 -324
  97. package/dist/components/tooltip/tooltip.js +0 -525
  98. package/dist/context-D2KUdwNL.js +0 -92
  99. package/dist/default-i18n-CT_oS1Fy.js +0 -922
  100. package/dist/filterDOMProps-EDDcM64A.js +0 -28
  101. package/dist/icons/block-icon.js +0 -42
  102. package/dist/icons/generic-color-swatch.js +0 -113
  103. package/dist/icons/icons.js +0 -30371
  104. package/dist/icons/index.js +0 -11
  105. package/dist/icons/jsx-svg.js +0 -50
  106. package/dist/index-641ee5b8.esm-DIuJijyT.js +0 -3137
  107. package/dist/index-BKGQ6jGS.js +0 -44
  108. package/dist/index-CFozsmNS.js +0 -28321
  109. package/dist/index.js +0 -139
  110. package/dist/lite-DVmmD_-j.js +0 -7
  111. package/dist/modifiers.esm-BuJQPI1X.js +0 -31
  112. package/dist/multi-select-components-Sp-JEFEX.js +0 -3744
  113. package/dist/number-GajL10e1.js +0 -36
  114. package/dist/react-jsx-parser.min-DZCiis5V.js +0 -11753
  115. package/dist/react-select-async.esm-Bql4G5iV.js +0 -107
  116. package/dist/react-select.esm-B_TudhTU.js +0 -15
  117. package/dist/style-admin.js +0 -1
  118. package/dist/style-editor.js +0 -1
  119. package/dist/style.js +0 -1
  120. package/dist/textSelection-0UUS8Yfg.js +0 -46
  121. package/dist/useButton-Cg474OYB.js +0 -71
  122. package/dist/useEvent-B0b-6KBr.js +0 -23
  123. package/dist/useFocusRing-CV5l3lf6.js +0 -107
  124. package/dist/useFormReset-C5OggHsw.js +0 -22
  125. package/dist/useFormValidation-DhDNSjws.js +0 -224
  126. package/dist/useHover-DwDr6ozG.js +0 -900
  127. package/dist/useLabel-D7HkNEHT.js +0 -27
  128. package/dist/useLabels-D8cxd1Z8.js +0 -23
  129. package/dist/useListState-DVr6aYd_.js +0 -161
  130. package/dist/useLocalizedStringFormatter-CFP1YZWQ.js +0 -121
  131. package/dist/useNumberField-TwM0Z9D1.js +0 -1204
  132. package/dist/useNumberFormatter-321rAb4J.js +0 -13
  133. package/dist/usePress-Cucx-xSA.js +0 -664
  134. package/dist/useSingleSelectListState-CMGsRHHh.js +0 -38
  135. package/dist/useToggle-C0I3vs0g.js +0 -59
  136. package/dist/useToggleState-CmQX3SoX.js +0 -19
  137. package/dist/utilities/array-helpers.js +0 -56
  138. package/dist/utilities/debounce-throttle.js +0 -123
  139. package/dist/utilities/es-dash.js +0 -376
  140. package/dist/utilities/index.js +0 -27
  141. package/dist/utilities/text-helpers.js +0 -136
  142. package/dist/utils-DkCSC521.js +0 -370
  143. package/dist/wp/wp-font-enhancements.js +0 -1
  144. package/dist/wp/wp-ui-enhancements.js +0 -1
@@ -1,8 +0,0 @@
1
- /*! tailwindcss v4.0.14 | 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
- }
@@ -1,299 +0,0 @@
1
- /*! tailwindcss v4.0.14 | MIT License | https://tailwindcss.com */
2
- .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 {
3
- border-radius: var(--es-radius-md, .375rem) !important;
4
- }
5
-
6
- .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 {
7
- border-radius: .25rem !important;
8
- }
9
-
10
- .components-button-group .components-button:first-child {
11
- border-top-left-radius: var(--es-radius-md, .375rem) !important;
12
- border-bottom-left-radius: var(--es-radius-md, .375rem) !important;
13
- }
14
-
15
- .components-button-group .components-button:last-child {
16
- border-top-right-radius: var(--es-radius-md, .375rem) !important;
17
- border-bottom-right-radius: var(--es-radius-md, .375rem) !important;
18
- }
19
-
20
- .components-popover__content, .components-guide {
21
- border-radius: var(--es-radius-lg, .5rem) !important;
22
- }
23
-
24
- .block-editor-inserter__search {
25
- border-top-left-radius: var(--es-radius-lg, .5rem) !important;
26
- border-top-right-radius: var(--es-radius-lg, .5rem) !important;
27
- }
28
-
29
- .media-menu-item.active {
30
- border-top-left-radius: var(--es-radius-md, .375rem) !important;
31
- border-top-right-radius: var(--es-radius-md, .375rem) !important;
32
- }
33
-
34
- .components-base-control__label, .components-input-control__label, .components-custom-select-control__label {
35
- --tw-font-weight: var(--es-font-weight-normal, 400) !important;
36
- font-size: 13px !important;
37
- font-weight: var(--es-font-weight-normal, 400) !important;
38
- --tw-tracking: var(--es-tracking-normal, 0em) !important;
39
- letter-spacing: var(--es-tracking-normal, 0em) !important;
40
- text-transform: none !important;
41
- }
42
-
43
- .edit-post-sidebar, .interface-interface-skeleton__sidebar:not(:empty) > .interface-complementary-area__fill[style="width: 280px;"], .interface-complementary-area.editor-sidebar {
44
- width: calc(var(--es-spacing, .25rem) * 80) !important;
45
- }
46
-
47
- .block-editor-block-list__block-crash-warning {
48
- border-radius: var(--es-radius-lg, .5rem) !important;
49
- border-color: color-mix(in oklab, var(--es-color-red-700, oklch(.505 .213 27.518)) 15%, transparent) !important;
50
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
51
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
52
- --tw-shadow-color: color-mix(in oklab, var(--es-color-red-700, oklch(.505 .213 27.518)) 10%, transparent) !important;
53
- }
54
-
55
- .block-editor-block-list__block-crash-warning .block-editor-warning__message {
56
- color: var(--es-color-red-950, oklch(.258 .092 26.042)) !important;
57
- }
58
-
59
- .wp-block-missing div.block-editor-warning {
60
- border-radius: var(--es-radius-lg, .5rem) !important;
61
- border-color: var(--es-color-zinc-300, oklch(.871 .006 286.286)) !important;
62
- background-color: color-mix(in oklab, var(--es-color-zinc-50, oklch(.985 0 0)) 75%, transparent) !important;
63
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
64
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
65
- --tw-shadow-color: color-mix(in oklab, var(--es-color-zinc-700, oklch(.37 .013 285.805)) 20%, transparent) !important;
66
- }
67
-
68
- .wp-block-missing div.block-editor-warning .block-editor-warning__message {
69
- color: var(--es-color-zinc-950, oklch(.141 .005 285.823)) !important;
70
- }
71
-
72
- .block-editor-block-contextual-toolbar, .block-editor-block-parent-selector__button {
73
- --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
74
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
75
- border-radius: var(--es-radius-lg, .5rem) !important;
76
- }
77
-
78
- .block-editor-block-types-list .block-editor-block-types-list__item {
79
- border-radius: var(--es-radius-lg, .5rem) !important;
80
- }
81
-
82
- .block-editor-block-types-list .block-editor-block-types-list__item:after {
83
- content: var(--tw-content);
84
- border-radius: var(--es-radius-lg, .5rem) !important;
85
- }
86
-
87
- .block-editor-block-types-list .block-editor-block-types-list__item svg {
88
- --tw-scale-x: 125%;
89
- --tw-scale-y: 125%;
90
- --tw-scale-z: 125%;
91
- scale: var(--tw-scale-x) var(--tw-scale-y);
92
- }
93
-
94
- .block-editor-list-view-tree .block-editor-block-icon {
95
- border-radius: .25rem !important;
96
- }
97
-
98
- .block-editor-list-view-tree .block-editor-list-view-leaf > :first-child {
99
- border-top-left-radius: var(--es-radius-lg, .5rem) !important;
100
- border-bottom-left-radius: var(--es-radius-lg, .5rem) !important;
101
- }
102
-
103
- .block-editor-list-view-tree .block-editor-list-view-leaf > :last-child {
104
- border-top-right-radius: var(--es-radius-lg, .5rem) !important;
105
- border-bottom-right-radius: var(--es-radius-lg, .5rem) !important;
106
- }
107
-
108
- .block-editor-block-inspector .block-editor-block-card .block-editor-block-icon {
109
- border-radius: .25rem !important;
110
- }
111
-
112
- .block-editor-inserter__toggle {
113
- border-radius: var(--es-radius-md, .375rem) !important;
114
- }
115
-
116
- :is(.edit-post-header__toolbar, .edit-post-header__settings, .editor-document-tools__left, .editor-header__center, .editor-header__settings) .components-button {
117
- min-height: calc(var(--es-spacing, .25rem) * 9) !important;
118
- min-width: calc(var(--es-spacing, .25rem) * 9) !important;
119
- }
120
-
121
- .editor-styles-wrapper .wp-block:not(.editor-post-title, .block-list-appender) {
122
- max-width: 100% !important;
123
- }
124
-
125
- .components-tooltip {
126
- border-style: var(--tw-border-style);
127
- border-width: 1px;
128
- border-color: var(--es-color-gray-800, oklch(.278 .033 256.848));
129
- background-color: color-mix(in oklab, var(--es-color-gray-950, oklch(.13 .028 261.692)) 70%, transparent);
130
- padding-inline: calc(var(--es-spacing, .25rem) * 1);
131
- padding-block: calc(var(--es-spacing, .25rem) * .5);
132
- color: var(--es-color-white, #fff);
133
- --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
134
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
135
- --tw-backdrop-blur: blur(var(--es-blur-xl, 24px));
136
- -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, );
137
- 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, );
138
- --tw-backdrop-brightness: brightness(105%);
139
- --tw-backdrop-saturate: saturate(150%);
140
- border-radius: var(--es-radius-md, .375rem) !important;
141
- }
142
-
143
- .components-tooltip:has( > :first-child) {
144
- border-color: var(--es-color-gray-200, oklch(.928 .006 264.531));
145
- background-color: color-mix(in oklab, var(--es-color-white, #fff) 80%, transparent);
146
- color: var(--es-color-gray-700, oklch(.373 .034 259.733));
147
- }
148
-
149
- @property --tw-font-weight {
150
- syntax: "*";
151
- inherits: false
152
- }
153
-
154
- @property --tw-tracking {
155
- syntax: "*";
156
- inherits: false
157
- }
158
-
159
- @property --tw-shadow {
160
- syntax: "*";
161
- inherits: false;
162
- initial-value: 0 0 #0000;
163
- }
164
-
165
- @property --tw-shadow-color {
166
- syntax: "*";
167
- inherits: false
168
- }
169
-
170
- @property --tw-inset-shadow {
171
- syntax: "*";
172
- inherits: false;
173
- initial-value: 0 0 #0000;
174
- }
175
-
176
- @property --tw-inset-shadow-color {
177
- syntax: "*";
178
- inherits: false
179
- }
180
-
181
- @property --tw-ring-color {
182
- syntax: "*";
183
- inherits: false
184
- }
185
-
186
- @property --tw-ring-shadow {
187
- syntax: "*";
188
- inherits: false;
189
- initial-value: 0 0 #0000;
190
- }
191
-
192
- @property --tw-inset-ring-color {
193
- syntax: "*";
194
- inherits: false
195
- }
196
-
197
- @property --tw-inset-ring-shadow {
198
- syntax: "*";
199
- inherits: false;
200
- initial-value: 0 0 #0000;
201
- }
202
-
203
- @property --tw-ring-inset {
204
- syntax: "*";
205
- inherits: false
206
- }
207
-
208
- @property --tw-ring-offset-width {
209
- syntax: "<length>";
210
- inherits: false;
211
- initial-value: 0;
212
- }
213
-
214
- @property --tw-ring-offset-color {
215
- syntax: "*";
216
- inherits: false;
217
- initial-value: #fff;
218
- }
219
-
220
- @property --tw-ring-offset-shadow {
221
- syntax: "*";
222
- inherits: false;
223
- initial-value: 0 0 #0000;
224
- }
225
-
226
- @property --tw-content {
227
- syntax: "*";
228
- inherits: false;
229
- initial-value: "";
230
- }
231
-
232
- @property --tw-scale-x {
233
- syntax: "*";
234
- inherits: false;
235
- initial-value: 1;
236
- }
237
-
238
- @property --tw-scale-y {
239
- syntax: "*";
240
- inherits: false;
241
- initial-value: 1;
242
- }
243
-
244
- @property --tw-scale-z {
245
- syntax: "*";
246
- inherits: false;
247
- initial-value: 1;
248
- }
249
-
250
- @property --tw-border-style {
251
- syntax: "*";
252
- inherits: false;
253
- initial-value: solid;
254
- }
255
-
256
- @property --tw-backdrop-blur {
257
- syntax: "*";
258
- inherits: false
259
- }
260
-
261
- @property --tw-backdrop-brightness {
262
- syntax: "*";
263
- inherits: false
264
- }
265
-
266
- @property --tw-backdrop-contrast {
267
- syntax: "*";
268
- inherits: false
269
- }
270
-
271
- @property --tw-backdrop-grayscale {
272
- syntax: "*";
273
- inherits: false
274
- }
275
-
276
- @property --tw-backdrop-hue-rotate {
277
- syntax: "*";
278
- inherits: false
279
- }
280
-
281
- @property --tw-backdrop-invert {
282
- syntax: "*";
283
- inherits: false
284
- }
285
-
286
- @property --tw-backdrop-opacity {
287
- syntax: "*";
288
- inherits: false
289
- }
290
-
291
- @property --tw-backdrop-saturate {
292
- syntax: "*";
293
- inherits: false
294
- }
295
-
296
- @property --tw-backdrop-sepia {
297
- syntax: "*";
298
- inherits: false
299
- }
@@ -1,105 +0,0 @@
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
- };
@@ -1,86 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../Text-DVSAPY-K.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
- };
@@ -1,161 +0,0 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { Fragment as Fragment$1 } from "react";
3
- import { c as clsx } from "../../lite-DVmmD_-j.js";
4
- import { upperFirst } from "../../utilities/es-dash.js";
5
- /**
6
- * Component that renders a preview of the breakpoints to help users visualize the options they set.
7
- *
8
- * @component
9
- * @param {Object} props - Component props.
10
- * @param {Object[]} [props.blocks] - Blocks to display.
11
- * @param {string} [props.blocks[].width] - Current breakpoint width. Left-aligned with the block.
12
- * @param {string} [props.blocks[].widthEnd] - Current breakpoint width. Right-aligned with the block.
13
- * @param {string} [props.blocks[].breakpoint] - Breakpoint name.
14
- * @param {string} [props.blocks[].value] - Current value at the breakpoint.
15
- * @param {boolean} [props.blocks[].dotsStart=false] - If `true`, dots are displayed at the start of the block.
16
- * @param {boolean} [props.blocks[].dotsEnd=false] - If `true`, dots are displayed at the end of the block.
17
- * @param {boolean} [props.blocks[].active=false] - If `true`, the block is active.
18
- * @param {boolean} [props.blocks[].alignEnd=false] - If `true`, the block is aligned to the end.
19
- * @param {BreakpointColor} [props.blocks[].color] - Color of the block.
20
- * @param {boolean} [props.dotsStart=false] - If `true`, dots are displayed at the start of the preview.
21
- * @param {boolean} [props.dotsEnd=false] - If `true`, dots are displayed at the end of the preview.
22
- * *
23
- * @returns {JSX.Element} The BreakpointPreview component.
24
- *
25
- * @typedef {'blue' | 'green' | 'yellow' | 'red' | 'indigo' | 'orange' | 'cyan' | 'teal' | 'fuchsia' | 'black' | 'default'} BreakpointColor
26
- *
27
- * @example
28
- * <BreakpointPreview
29
- * blocks={[
30
- * {
31
- * breakpoint: 'Mobile',
32
- * widthEnd: '480px',
33
- * value: 'Regular',
34
- * dotsStart: true,
35
- * alignEnd: true,
36
- * active: true,
37
- * },
38
- * {
39
- * breakpoint: 'Default',
40
- * value: 'Small',
41
- * dotsEnd: true,
42
- * },
43
- * ]}
44
- * />
45
- *
46
- * @preserve
47
- */
48
- const BreakpointPreview = (props) => {
49
- const { blocks: rawBlocks, dotsStart = false, dotsEnd = false } = props;
50
- const blocks = rawBlocks.filter(Boolean);
51
- if (!blocks || blocks.length < 1) {
52
- return null;
53
- }
54
- const hasActive = (blocks == null ? void 0 : blocks.some(({ active }) => active)) ?? false;
55
- const activeColors = {
56
- blue: {
57
- text: "es:text-blue-500",
58
- bg: "es:bg-blue-500"
59
- },
60
- green: {
61
- text: "es:text-lime-500",
62
- bg: "es:bg-lime-500"
63
- },
64
- yellow: {
65
- text: "es:text-yellow-400",
66
- bg: "es:bg-yellow-400"
67
- },
68
- red: {
69
- text: "es:text-red-500",
70
- bg: "es:bg-red-500"
71
- },
72
- indigo: {
73
- text: "es:text-indigo-500",
74
- bg: "es:bg-indigo-500"
75
- },
76
- orange: {
77
- text: "es:text-orange-500",
78
- bg: "es:bg-orange-500"
79
- },
80
- cyan: {
81
- text: "es:text-cyan-500",
82
- bg: "es:bg-cyan-500"
83
- },
84
- teal: {
85
- text: "es:text-accent-500",
86
- bg: "es:bg-accent-500"
87
- },
88
- fuchsia: {
89
- text: "es:text-fuchsia-500",
90
- bg: "es:bg-fuchsia-500"
91
- },
92
- black: {
93
- text: "es:text-black",
94
- bg: "es:bg-black"
95
- },
96
- default: {
97
- text: "es:text-secondary-600",
98
- bg: "es:bg-secondary-600"
99
- }
100
- };
101
- return /* @__PURE__ */ jsxs("div", { className: clsx("es:mx-auto es:grid es:w-fit es:shrink-0 es:auto-cols-auto es:grid-rows-[auto_auto] es:gap-x-2 es:gap-y-0.5"), children: [
102
- dotsStart && /* @__PURE__ */ jsxs(Fragment, { children: [
103
- /* @__PURE__ */ jsx("div", { className: "es:row-start-1 es:flex es:shrink-0 es:translate-x-1 es:items-center es:gap-1 es:justify-self-end es:text-secondary-400", children: /* @__PURE__ */ jsxs("div", { className: "es:flex es:gap-0.5 es:text-secondary-300", children: [
104
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
105
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
106
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" })
107
- ] }) }),
108
- /* @__PURE__ */ jsx("div", { className: "es:row-start-2 es:size-px es:justify-self-end" })
109
- ] }),
110
- blocks.map(({ width, widthEnd, breakpoint, value, dotsStart: dotsStart2 = false, dotsEnd: dotsEnd2 = false, active = false, alignEnd = false, color }, i) => {
111
- var _a, _b;
112
- const activeTextColor = ((_a = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _a.text) ?? activeColors.default.text;
113
- const activeBgColor = ((_b = activeColors == null ? void 0 : activeColors[color]) == null ? void 0 : _b.bg) ?? activeColors.default.bg;
114
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
115
- /* @__PURE__ */ jsxs("div", { className: "es:row-start-1 es:flex es:min-w-28 es:items-center es:gap-1 es:font-mono es:font-medium es:text-secondary-400", children: [
116
- dotsStart2 && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:gap-0.5", active ? activeTextColor : "text-secondary-300"), children: [
117
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
118
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
119
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" })
120
- ] }),
121
- width && /* @__PURE__ */ jsx("span", { children: width }),
122
- /* @__PURE__ */ jsx("div", { className: clsx("es:grow es:rounded", active ? "es:h-0.5" : "es:h-px es:bg-secondary-300", active && activeBgColor) }),
123
- widthEnd && /* @__PURE__ */ jsx("span", { children: widthEnd }),
124
- dotsEnd2 && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:gap-0.5", active ? activeTextColor : "es:text-secondary-300"), children: [
125
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
126
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
127
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" })
128
- ] })
129
- ] }),
130
- /* @__PURE__ */ jsxs("div", { className: "es:row-start-2 es:flex es:w-full es:min-w-28 es:flex-col es:items-start es:gap-1", children: [
131
- /* @__PURE__ */ jsx(
132
- "span",
133
- {
134
- className: clsx(
135
- "es:rounded es:px-1 es:py-0.5",
136
- hasActive && active && "es:text-white",
137
- hasActive && active && activeBgColor,
138
- hasActive && !active && "es:bg-secondary-200 es:text-secondary-500",
139
- !hasActive && "es:bg-secondary-600 es:text-white",
140
- alignEnd && "es:ml-auto"
141
- ),
142
- children: upperFirst(breakpoint)
143
- }
144
- ),
145
- value && /* @__PURE__ */ jsx("span", { className: clsx("es:-mt-0.5 es:px-1", active ? "es:text-secondary-400" : "es:text-secondary-400", alignEnd && "es:ml-auto"), children: value })
146
- ] })
147
- ] }, i);
148
- }),
149
- dotsEnd && /* @__PURE__ */ jsxs(Fragment, { children: [
150
- /* @__PURE__ */ jsx("div", { className: "es:row-start-1 es:flex es:shrink-0 es:-translate-x-1 es:items-center es:gap-1 es:font-mono es:font-medium es:text-secondary-400", children: /* @__PURE__ */ jsxs("div", { className: "es:flex es:gap-0.5 es:text-secondary-300", children: [
151
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
152
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" }),
153
- /* @__PURE__ */ jsx("div", { className: "es:size-0.5 es:rounded es:bg-current" })
154
- ] }) }),
155
- /* @__PURE__ */ jsx("div", { className: "es:row-start-2 es:size-px" })
156
- ] })
157
- ] });
158
- };
159
- export {
160
- BreakpointPreview
161
- };