@eightshift/ui-components 5.0.0 → 5.0.1

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-wERNNG0T.js +185 -0
  2. package/dist/Collection-CKsHTyhc.js +2363 -0
  3. package/dist/Color-BhgbJF5x.js +2452 -0
  4. package/dist/ColorSwatch-Bcn6oRSg.js +64 -0
  5. package/dist/ComboBox-D1LPUwWP.js +1906 -0
  6. package/dist/Dialog-D190gMbE.js +2298 -0
  7. package/dist/FieldError-DeUh5Wkw.js +42 -0
  8. package/dist/FocusScope-C-plSxbS.js +831 -0
  9. package/dist/Form-Cq3fu75_.js +5 -0
  10. package/dist/Group-C5iZpSAM.js +48 -0
  11. package/dist/Heading-D-Pboe4p.js +16 -0
  12. package/dist/Hidden-rE6uR-lr.js +41 -0
  13. package/dist/Input--mF4XVE1.js +133 -0
  14. package/dist/Label-Fp6AwSRn.js +17 -0
  15. package/dist/List-CZMUbkFU.js +593 -0
  16. package/dist/ListBox-4oW9kh3R.js +582 -0
  17. package/dist/NumberFormatter-DA8u1Ot7.js +140 -0
  18. package/dist/OverlayArrow-BpB9uB_I.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-B88tj5YD.js +323 -0
  22. package/dist/Slider-CyJzC1bp.js +853 -0
  23. package/dist/Text-DRpwWot2.js +16 -0
  24. package/dist/VisuallyHidden-DsKYcRQ_.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 +5864 -0
  28. package/dist/assets/style-editor.css +5864 -0
  29. package/dist/assets/style.css +5870 -0
  30. package/dist/assets/wp-font-enhancements.css +8 -0
  31. package/dist/assets/wp-ui-enhancements.css +377 -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 +320 -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 +6979 -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 +291 -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 +579 -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 +991 -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 +704 -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-BYWrbm1z.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 +30371 -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-CFozsmNS.js +28321 -0
  107. package/dist/index-wl5606BX.js +44 -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-CCcyjiRP.js +46 -0
  120. package/dist/useButton-BOHxkGQF.js +50 -0
  121. package/dist/useEvent-D5o_CqDH.js +23 -0
  122. package/dist/useFocusRing-nMG2uzxS.js +107 -0
  123. package/dist/useFormReset-DlmRL87g.js +22 -0
  124. package/dist/useFormValidation-D0_aaK-e.js +224 -0
  125. package/dist/useHover-VO5tcIli.js +890 -0
  126. package/dist/useLabel-BKH4fVA4.js +27 -0
  127. package/dist/useLabels-ntF3rFY0.js +23 -0
  128. package/dist/useListState-Cq2Nvr-v.js +161 -0
  129. package/dist/useLocalizedStringFormatter-CGzwx1a0.js +121 -0
  130. package/dist/useNumberField-C9dmERhP.js +1207 -0
  131. package/dist/useNumberFormatter-MrRLgvhj.js +13 -0
  132. package/dist/usePress-DjNo5790.js +677 -0
  133. package/dist/useSingleSelectListState--r3AAhRj.js +38 -0
  134. package/dist/useToggle-CQaXLe-O.js +59 -0
  135. package/dist/useToggleState-C3DLdez5.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-B94NDG0v.js +370 -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 +8 -8
@@ -0,0 +1,8 @@
1
+ /*! tailwindcss v4.1.5 | 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,377 @@
1
+ /*! tailwindcss v4.1.5 | 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
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
88
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
89
+ --tw-shadow-color: var(--es-color-red-700, oklch(50.5% .213 27.518)) !important;
90
+ }
91
+
92
+ @supports (color: color-mix(in lab, red, red)) {
93
+ .block-editor-block-list__block-crash-warning {
94
+ border-color: color-mix(in oklab, var(--es-color-red-700, oklch(50.5% .213 27.518)) 15%, transparent) !important;
95
+ --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;
96
+ }
97
+ }
98
+
99
+ .block-editor-block-list__block-crash-warning .block-editor-warning__message {
100
+ color: var(--es-color-red-950, oklch(25.8% .092 26.042)) !important;
101
+ }
102
+
103
+ .wp-block-missing div.block-editor-warning {
104
+ border-radius: var(--es-radius-lg, .5rem) !important;
105
+ border-color: var(--es-color-zinc-300, oklch(87.1% .006 286.286)) !important;
106
+ background-color: var(--es-color-zinc-50, oklch(98.5% 0 0)) !important;
107
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a) !important;
108
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
109
+ --tw-shadow-color: var(--es-color-zinc-700, oklch(37% .013 285.805)) !important;
110
+ }
111
+
112
+ @supports (color: color-mix(in lab, red, red)) {
113
+ .wp-block-missing div.block-editor-warning {
114
+ background-color: color-mix(in oklab, var(--es-color-zinc-50, oklch(98.5% 0 0)) 75%, transparent) !important;
115
+ --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;
116
+ }
117
+ }
118
+
119
+ .wp-block-missing div.block-editor-warning .block-editor-warning__message {
120
+ color: var(--es-color-zinc-950, oklch(14.1% .005 285.823)) !important;
121
+ }
122
+
123
+ .block-editor-block-contextual-toolbar, .block-editor-block-parent-selector__button {
124
+ --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, #0000001a), 0 1px 2px -1px var(--tw-shadow-color, #0000001a);
125
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
126
+ border-radius: var(--es-radius-lg, .5rem) !important;
127
+ }
128
+
129
+ .block-editor-block-types-list .block-editor-block-types-list__item {
130
+ border-radius: var(--es-radius-lg, .5rem) !important;
131
+ }
132
+
133
+ .block-editor-block-types-list .block-editor-block-types-list__item:after {
134
+ content: var(--tw-content);
135
+ border-radius: var(--es-radius-lg, .5rem) !important;
136
+ }
137
+
138
+ .block-editor-block-types-list .block-editor-block-types-list__item svg {
139
+ --tw-scale-x: 125%;
140
+ --tw-scale-y: 125%;
141
+ --tw-scale-z: 125%;
142
+ scale: var(--tw-scale-x) var(--tw-scale-y);
143
+ }
144
+
145
+ .block-editor-list-view-tree .block-editor-block-icon {
146
+ border-radius: .25rem !important;
147
+ }
148
+
149
+ .block-editor-list-view-tree .block-editor-list-view-leaf > :first-child {
150
+ border-top-left-radius: var(--es-radius-lg, .5rem) !important;
151
+ border-bottom-left-radius: var(--es-radius-lg, .5rem) !important;
152
+ }
153
+
154
+ .block-editor-list-view-tree .block-editor-list-view-leaf > :last-child {
155
+ border-top-right-radius: var(--es-radius-lg, .5rem) !important;
156
+ border-bottom-right-radius: var(--es-radius-lg, .5rem) !important;
157
+ }
158
+
159
+ .block-editor-block-inspector .block-editor-block-card .block-editor-block-icon {
160
+ border-radius: .25rem !important;
161
+ }
162
+
163
+ .block-editor-inserter__toggle {
164
+ border-radius: var(--es-radius-md, .375rem) !important;
165
+ }
166
+
167
+ :is(.edit-post-header__toolbar, .edit-post-header__settings, .editor-document-tools__left, .editor-header__center, .editor-header__settings) .components-button {
168
+ min-height: calc(var(--es-spacing, .25rem) * 9) !important;
169
+ min-width: calc(var(--es-spacing, .25rem) * 9) !important;
170
+ }
171
+
172
+ .editor-styles-wrapper .wp-block:not(.editor-post-title, .block-list-appender) {
173
+ max-width: 100% !important;
174
+ }
175
+
176
+ .components-tooltip {
177
+ border-style: var(--tw-border-style);
178
+ border-width: 1px;
179
+ border-color: var(--es-color-gray-800, oklch(27.8% .033 256.848));
180
+ background-color: var(--es-color-gray-950, oklch(13% .028 261.692));
181
+ padding-inline: calc(var(--es-spacing, .25rem) * 1);
182
+ padding-block: calc(var(--es-spacing, .25rem) * .5);
183
+ color: var(--es-color-white, #fff);
184
+ --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, #0000001a), 0 2px 4px -2px var(--tw-shadow-color, #0000001a);
185
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
186
+ --tw-backdrop-blur: blur(var(--es-blur-xl, 24px));
187
+ -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, );
188
+ 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, );
189
+ --tw-backdrop-brightness: brightness(105%);
190
+ --tw-backdrop-saturate: saturate(150%);
191
+ border-radius: var(--es-radius-md, .375rem) !important;
192
+ }
193
+
194
+ @supports (color: color-mix(in lab, red, red)) {
195
+ .components-tooltip {
196
+ background-color: color-mix(in oklab, var(--es-color-gray-950, oklch(13% .028 261.692)) 70%, transparent);
197
+ }
198
+ }
199
+
200
+ .components-tooltip:has( > :first-child) {
201
+ border-color: var(--es-color-gray-200, oklch(92.8% .006 264.531));
202
+ background-color: var(--es-color-white, #fff);
203
+ }
204
+
205
+ @supports (color: color-mix(in lab, red, red)) {
206
+ .components-tooltip:has( > :first-child) {
207
+ background-color: color-mix(in oklab, var(--es-color-white, #fff) 80%, transparent);
208
+ }
209
+ }
210
+
211
+ .components-tooltip:has( > :first-child) {
212
+ color: var(--es-color-gray-700, oklch(37.3% .034 259.733));
213
+ }
214
+
215
+ @property --tw-font-weight {
216
+ syntax: "*";
217
+ inherits: false
218
+ }
219
+
220
+ @property --tw-tracking {
221
+ syntax: "*";
222
+ inherits: false
223
+ }
224
+
225
+ @property --tw-shadow {
226
+ syntax: "*";
227
+ inherits: false;
228
+ initial-value: 0 0 #0000;
229
+ }
230
+
231
+ @property --tw-shadow-color {
232
+ syntax: "*";
233
+ inherits: false
234
+ }
235
+
236
+ @property --tw-shadow-alpha {
237
+ syntax: "<percentage>";
238
+ inherits: false;
239
+ initial-value: 100%;
240
+ }
241
+
242
+ @property --tw-inset-shadow {
243
+ syntax: "*";
244
+ inherits: false;
245
+ initial-value: 0 0 #0000;
246
+ }
247
+
248
+ @property --tw-inset-shadow-color {
249
+ syntax: "*";
250
+ inherits: false
251
+ }
252
+
253
+ @property --tw-inset-shadow-alpha {
254
+ syntax: "<percentage>";
255
+ inherits: false;
256
+ initial-value: 100%;
257
+ }
258
+
259
+ @property --tw-ring-color {
260
+ syntax: "*";
261
+ inherits: false
262
+ }
263
+
264
+ @property --tw-ring-shadow {
265
+ syntax: "*";
266
+ inherits: false;
267
+ initial-value: 0 0 #0000;
268
+ }
269
+
270
+ @property --tw-inset-ring-color {
271
+ syntax: "*";
272
+ inherits: false
273
+ }
274
+
275
+ @property --tw-inset-ring-shadow {
276
+ syntax: "*";
277
+ inherits: false;
278
+ initial-value: 0 0 #0000;
279
+ }
280
+
281
+ @property --tw-ring-inset {
282
+ syntax: "*";
283
+ inherits: false
284
+ }
285
+
286
+ @property --tw-ring-offset-width {
287
+ syntax: "<length>";
288
+ inherits: false;
289
+ initial-value: 0;
290
+ }
291
+
292
+ @property --tw-ring-offset-color {
293
+ syntax: "*";
294
+ inherits: false;
295
+ initial-value: #fff;
296
+ }
297
+
298
+ @property --tw-ring-offset-shadow {
299
+ syntax: "*";
300
+ inherits: false;
301
+ initial-value: 0 0 #0000;
302
+ }
303
+
304
+ @property --tw-content {
305
+ syntax: "*";
306
+ inherits: false;
307
+ initial-value: "";
308
+ }
309
+
310
+ @property --tw-scale-x {
311
+ syntax: "*";
312
+ inherits: false;
313
+ initial-value: 1;
314
+ }
315
+
316
+ @property --tw-scale-y {
317
+ syntax: "*";
318
+ inherits: false;
319
+ initial-value: 1;
320
+ }
321
+
322
+ @property --tw-scale-z {
323
+ syntax: "*";
324
+ inherits: false;
325
+ initial-value: 1;
326
+ }
327
+
328
+ @property --tw-border-style {
329
+ syntax: "*";
330
+ inherits: false;
331
+ initial-value: solid;
332
+ }
333
+
334
+ @property --tw-backdrop-blur {
335
+ syntax: "*";
336
+ inherits: false
337
+ }
338
+
339
+ @property --tw-backdrop-brightness {
340
+ syntax: "*";
341
+ inherits: false
342
+ }
343
+
344
+ @property --tw-backdrop-contrast {
345
+ syntax: "*";
346
+ inherits: false
347
+ }
348
+
349
+ @property --tw-backdrop-grayscale {
350
+ syntax: "*";
351
+ inherits: false
352
+ }
353
+
354
+ @property --tw-backdrop-hue-rotate {
355
+ syntax: "*";
356
+ inherits: false
357
+ }
358
+
359
+ @property --tw-backdrop-invert {
360
+ syntax: "*";
361
+ inherits: false
362
+ }
363
+
364
+ @property --tw-backdrop-opacity {
365
+ syntax: "*";
366
+ inherits: false
367
+ }
368
+
369
+ @property --tw-backdrop-saturate {
370
+ syntax: "*";
371
+ inherits: false
372
+ }
373
+
374
+ @property --tw-backdrop-sepia {
375
+ syntax: "*";
376
+ inherits: false
377
+ }
@@ -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-DRpwWot2.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
+ };