@measured/puck 0.17.0-canary.552c8f9 → 0.17.0-canary.5e57623

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.css CHANGED
@@ -140,50 +140,61 @@
140
140
  }
141
141
 
142
142
  /* css-module:/home/runner/work/puck/puck/packages/core/components/ActionBar/styles.module.css/#css-module-data */
143
- ._ActionBar_151w5_1 {
143
+ ._ActionBar_1lbm7_1 {
144
+ align-items: center;
145
+ cursor: default;
144
146
  display: flex;
145
147
  width: auto;
146
148
  padding: 4px;
147
- padding-right: 4px;
149
+ padding-left: 0;
150
+ padding-right: 0;
148
151
  border-top-left-radius: 8px;
149
152
  border-top-right-radius: 8px;
150
153
  border-radius: 8px;
151
154
  background: var(--puck-color-grey-01);
152
155
  color: var(--puck-color-white);
153
156
  font-family: var(--puck-font-family);
154
- gap: 4px;
155
157
  min-height: 26px;
156
158
  }
157
- ._ActionBar-actionsLabel_151w5_16 {
159
+ ._ActionBar-label_1lbm7_18 {
158
160
  color: var(--puck-color-grey-08);
159
- display: flex;
160
161
  font-size: var(--puck-font-size-xxxs);
161
162
  font-weight: 500;
162
- justify-content: center;
163
- align-items: center;
164
163
  padding-left: 8px;
165
164
  padding-right: 8px;
165
+ margin-left: 4px;
166
+ margin-right: 4px;
166
167
  text-overflow: ellipsis;
167
168
  white-space: nowrap;
168
169
  }
169
- ._ActionBar-group_151w5_29 {
170
+ ._ActionBar-action_1lbm7_30 + ._ActionBar-label_1lbm7_18 {
171
+ padding-left: 0;
172
+ }
173
+ ._ActionBar-label_1lbm7_18 + ._ActionBar-action_1lbm7_30 {
174
+ margin-left: -4px;
175
+ }
176
+ ._ActionBar-group_1lbm7_38 {
177
+ align-items: center;
170
178
  border-inline-start: 0.5px solid var(--puck-color-grey-05);
171
179
  display: flex;
180
+ height: 100%;
172
181
  padding-left: 4px;
173
182
  padding-right: 4px;
174
183
  }
175
- ._ActionBar-group_151w5_29:last-of-type {
176
- padding-right: 0;
184
+ ._ActionBar-group_1lbm7_38:first-of-type {
185
+ border-inline-start: 0;
177
186
  }
178
- ._ActionBar-group_151w5_29:empty {
187
+ ._ActionBar-group_1lbm7_38:empty {
179
188
  display: none;
180
189
  }
181
- ._ActionBar-action_151w5_16 {
190
+ ._ActionBar-action_1lbm7_30 {
182
191
  background: transparent;
183
192
  border: none;
184
193
  color: var(--puck-color-grey-08);
185
194
  cursor: pointer;
186
195
  padding: 6px 8px;
196
+ margin-left: 4px;
197
+ margin-right: 4px;
187
198
  border-radius: 4px;
188
199
  overflow: hidden;
189
200
  display: flex;
@@ -191,20 +202,23 @@
191
202
  justify-content: center;
192
203
  transition: color 50ms ease-in;
193
204
  }
194
- ._ActionBar-action_151w5_16:focus-visible {
205
+ ._ActionBar-action_1lbm7_30:focus-visible {
195
206
  outline: 2px solid var(--puck-color-azure-05);
196
207
  outline-offset: -2px;
197
208
  }
198
209
  @media (hover: hover) and (pointer: fine) {
199
- ._ActionBar-action_151w5_16:hover {
210
+ ._ActionBar-action_1lbm7_30:hover {
200
211
  color: var(--puck-color-azure-06);
201
212
  transition: none;
202
213
  }
203
214
  }
204
- ._ActionBar-action_151w5_16:active {
215
+ ._ActionBar-action_1lbm7_30:active {
205
216
  color: var(--puck-color-azure-07);
206
217
  transition: none;
207
218
  }
219
+ ._ActionBar-group_1lbm7_38 * {
220
+ margin: 0;
221
+ }
208
222
 
209
223
  /* css-module:/home/runner/work/puck/puck/packages/core/components/AutoField/styles.module.css/#css-module-data */
210
224
  ._InputWrapper_1l5m8_1 {
@@ -1177,6 +1191,40 @@ textarea._Input-input_1l5m8_47 {
1177
1191
  transform-origin: right top;
1178
1192
  }
1179
1193
 
1194
+ /* components/DraggableComponent/styles.css */
1195
+ [data-puck-component] * {
1196
+ pointer-events: none;
1197
+ user-select: none;
1198
+ -webkit-user-select: none;
1199
+ }
1200
+ [data-puck-component] {
1201
+ cursor: grab;
1202
+ pointer-events: auto !important;
1203
+ user-select: none;
1204
+ -webkit-user-select: none;
1205
+ }
1206
+ [data-puck-disabled] {
1207
+ cursor: pointer;
1208
+ }
1209
+ [data-puck-dragging]:not([data-dnd-dragging]) {
1210
+ background: var(--puck-color-azure-06) !important;
1211
+ border: none !important;
1212
+ color: #00000000 !important;
1213
+ opacity: 0.3 !important;
1214
+ outline: none !important;
1215
+ transition: none !important;
1216
+ }
1217
+ [data-puck-dragging]:not([data-dnd-dragging]) *,
1218
+ [data-puck-dragging]:not([data-dnd-dragging])::after,
1219
+ [data-puck-dragging]:not([data-dnd-dragging])::before {
1220
+ opacity: 0 !important;
1221
+ }
1222
+ [data-dnd-dragging] {
1223
+ pointer-events: none !important;
1224
+ outline: 2px var(--puck-color-azure-09) solid !important;
1225
+ outline-offset: -2px !important;
1226
+ }
1227
+
1180
1228
  /* css-module:/home/runner/work/puck/puck/packages/core/components/DropZone/styles.module.css/#css-module-data */
1181
1229
  ._DropZone_74ebh_1 {
1182
1230
  --drop-animation-ms: 250ms;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-Fx9YY5bj.mjs';
2
- export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.mjs';
1
+ import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-ZKVfUAQq.mjs';
2
+ export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-ZKVfUAQq.mjs';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -16,6 +16,9 @@ declare const ActionBar: {
16
16
  label?: string;
17
17
  onClick: (e: SyntheticEvent) => void;
18
18
  }) => react_jsx_runtime.JSX.Element;
19
+ Label: ({ label }: {
20
+ label: string;
21
+ }) => react_jsx_runtime.JSX.Element;
19
22
  Group: ({ children }: {
20
23
  children: ReactNode;
21
24
  }) => react_jsx_runtime.JSX.Element;
@@ -28,6 +31,9 @@ declare const Action: ({ children, label, onClick, }: {
28
31
  declare const Group: ({ children }: {
29
32
  children: ReactNode;
30
33
  }) => react_jsx_runtime.JSX.Element;
34
+ declare const Label: ({ label }: {
35
+ label: string;
36
+ }) => react_jsx_runtime.JSX.Element;
31
37
 
32
38
  declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
33
39
  children?: ReactNode;
@@ -233,4 +239,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
233
239
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
234
240
  };
235
241
 
236
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
242
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-Fx9YY5bj.js';
2
- export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-Fx9YY5bj.js';
1
+ import { F as FieldProps, a as Field, C as Config, D as Data, I as ItemSelector, P as PuckAction, b as DropZoneProps, U as UserGenerics, c as UiState, O as OnAction, d as Permissions, e as Plugin, f as Overrides, V as Viewports, g as IframeConfig, h as InitialHistory, i as DefaultComponentProps, j as DefaultRootFieldProps, H as History, A as AppState, E as ExtractPropsFromConfig, k as ExtractRootPropsFromConfig, l as ComponentDataMap } from './resolve-all-data-ZKVfUAQq.js';
2
+ export { W as Adaptor, L as ArrayField, t as ArrayState, a4 as AsFieldProps, B as BaseData, G as BaseField, v as ComponentConfig, y as ComponentData, z as Content, Z as CustomField, a1 as DefaultRootProps, a0 as DefaultRootRenderProps, m as Direction, n as DragAxis, Y as ExternalField, X as ExternalFieldWithAdaptor, r as FieldRenderFunctions, _ as Fields, s as ItemWithId, M as MappedItem, N as NumberField, Q as ObjectField, q as OverrideKey, u as PuckComponent, $ as PuckContext, K as RadioField, x as RootData, R as RootDataWithProps, w as RootDataWithoutProps, S as SelectField, T as TextField, J as TextareaField, o as Viewport, a5 as WithChildren, a2 as WithId, a3 as WithPuckProps, p as overrideKeys, a6 as resolveAllData } from './resolve-all-data-ZKVfUAQq.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode, SyntheticEvent, ReactElement } from 'react';
@@ -16,6 +16,9 @@ declare const ActionBar: {
16
16
  label?: string;
17
17
  onClick: (e: SyntheticEvent) => void;
18
18
  }) => react_jsx_runtime.JSX.Element;
19
+ Label: ({ label }: {
20
+ label: string;
21
+ }) => react_jsx_runtime.JSX.Element;
19
22
  Group: ({ children }: {
20
23
  children: ReactNode;
21
24
  }) => react_jsx_runtime.JSX.Element;
@@ -28,6 +31,9 @@ declare const Action: ({ children, label, onClick, }: {
28
31
  declare const Group: ({ children }: {
29
32
  children: ReactNode;
30
33
  }) => react_jsx_runtime.JSX.Element;
34
+ declare const Label: ({ label }: {
35
+ label: string;
36
+ }) => react_jsx_runtime.JSX.Element;
31
37
 
32
38
  declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
33
39
  children?: ReactNode;
@@ -233,4 +239,4 @@ declare const usePuck: <UserConfig extends Config = Config>() => {
233
239
  selectedItem: ComponentDataMap<ExtractPropsFromConfig<UserConfig>> | null;
234
240
  };
235
241
 
236
- export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };
242
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentDataMap, Config, Data, DefaultComponentProps, DefaultRootFieldProps, Drawer, DropZone, type DropZoneDndData, DropZoneProvider, ExtractPropsFromConfig, ExtractRootPropsFromConfig, Field, FieldLabel, FieldProps, Group, History, IconButton, IframeConfig, InitialHistory, Label, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, Render, UiState, UserGenerics, Viewports, dropZoneContext, migrate, transformProps, usePuck };