@janbox/storefront-builder 2.0.1 → 2.0.3

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 (51) hide show
  1. package/README.md +2 -2
  2. package/dist/{dialog-header-DPLOS7TT.js → countdown-timer.node-CZrTzirS.js} +3939 -2463
  3. package/dist/editor/components/index.d.ts +0 -1
  4. package/dist/editor/hooks/index.d.ts +0 -12
  5. package/dist/editor/hooks/use-editor.d.ts +6 -2
  6. package/dist/editor/index.d.ts +4 -0
  7. package/dist/editor/lib/index.d.ts +6 -4
  8. package/dist/editor/toolbars/css-font-weight/index.d.ts +9 -0
  9. package/dist/editor/toolbars/{width/width.d.ts → css-width/index.d.ts} +5 -5
  10. package/dist/editor/toolbars/html-anchor-target/index.d.ts +7 -0
  11. package/dist/editor/toolbars/index.d.ts +3 -3
  12. package/dist/editor/toolbars/text-align/index.d.ts +9 -1
  13. package/dist/editor/ui/button-group/button-group.d.ts +1 -1
  14. package/dist/editor/ui/dialog/dialog-body/dialog-body.d.ts +1 -1
  15. package/dist/editor/ui/form-label/form-label.d.ts +1 -1
  16. package/dist/editor/ui/input/input.d.ts +1 -2
  17. package/dist/editor/ui/loading-overlay/loading-overlay.d.ts +1 -1
  18. package/dist/editor/ui/popover/popover-close.d.ts +1 -1
  19. package/dist/editor/ui/tabs/tab-content.d.ts +1 -1
  20. package/dist/editor/ui/tabs/tab-list.d.ts +2 -4
  21. package/dist/editor/ui/tabs/tab-panel.d.ts +1 -1
  22. package/dist/editor/ui/tabs/tab.d.ts +2 -5
  23. package/dist/editor/ui/tabs/tabs.d.ts +1 -1
  24. package/dist/editor.js +1471 -739
  25. package/dist/index-B1b2lC5K.js +4 -0
  26. package/dist/index-CdI5y-ul.js +8326 -0
  27. package/dist/index.js +176 -334
  28. package/dist/style.css +1 -1
  29. package/dist/templates.js +27 -31
  30. package/dist/theme/index.d.ts +293 -0
  31. package/dist/tooltip-npH7aBjY.js +75 -0
  32. package/dist/utils/common.d.ts +0 -2
  33. package/package.json +1 -11
  34. package/dist/anchor-target-BlOvysAr.js +0 -2329
  35. package/dist/color-picker-popover-B3AVFuei.js +0 -201
  36. package/dist/countdown-timer.node-OmDiT-pz.js +0 -825
  37. package/dist/date-picker-B4Rju7gG.js +0 -115
  38. package/dist/dropzone-Dbfed3jK.js +0 -490
  39. package/dist/editor/components/toolbar-container.d.ts +0 -1
  40. package/dist/editor/toolbars/anchor-target/anchor-target.d.ts +0 -7
  41. package/dist/editor/toolbars/anchor-target/index.d.ts +0 -1
  42. package/dist/editor/toolbars/font-weight/dataset.d.ts +0 -5
  43. package/dist/editor/toolbars/font-weight/font-weight.d.ts +0 -9
  44. package/dist/editor/toolbars/font-weight/index.d.ts +0 -1
  45. package/dist/editor/toolbars/text-align/text-align.d.ts +0 -8
  46. package/dist/editor/toolbars/width/index.d.ts +0 -1
  47. package/dist/editor/toolbars.js +0 -336
  48. package/dist/editor/ui.js +0 -110
  49. package/dist/index-BbiQ0n_-.js +0 -4
  50. package/dist/index-CwrFnubn.js +0 -4448
  51. package/dist/tooltip-KbIHELP2.js +0 -65
@@ -1,65 +0,0 @@
1
- import { jsxs as y, jsx as s } from "@emotion/react/jsx-runtime";
2
- import { useRef as C, Fragment as E, isValidElement as I, cloneElement as N } from "react";
3
- import { useFloating as O, autoUpdate as P, flip as j, offset as V, size as k, arrow as z, useHover as D, safePolygon as M, useFocus as S, useDismiss as T, useRole as W, useInteractions as _, useMergeRefs as A, FloatingPortal as G } from "@floating-ui/react";
4
- import { get as H } from "lodash-es";
5
- import { c as L } from "./dialog-header-DPLOS7TT.js";
6
- import { FLOATING_Z_INDEX as U } from "@janbox/storefront-ui/theme";
7
- import { useControllableState as X } from "@janbox/storefront-ui/hooks";
8
- const Y = ({ placement: f = "top", open: c, onOpenChange: m, children: e, content: d }) => {
9
- const [r, p] = X({
10
- defaultValue: !1,
11
- value: c
12
- }), u = C(null), g = (o, n, R) => {
13
- p(o), m?.(o, n, R);
14
- }, { refs: i, floatingStyles: w, context: t } = O({
15
- open: r,
16
- onOpenChange: g,
17
- placement: f,
18
- middleware: [
19
- j(),
20
- V(4),
21
- k({
22
- apply({ elements: o }) {
23
- const n = {
24
- zIndex: `${U}`
25
- };
26
- Object.assign(o.floating.style, n);
27
- }
28
- }),
29
- z({ element: u })
30
- ],
31
- whileElementsMounted: P
32
- }), b = D(t, { move: !1, handleClose: M() }), h = S(t), v = T(t, {}), x = W(t, {
33
- role: "tooltip"
34
- }), { getReferenceProps: l, getFloatingProps: F } = _([b, h, v, x]), a = A([i.setReference, H(e, "ref")]);
35
- return /* @__PURE__ */ y(E, { children: [
36
- I(e) ? N(
37
- e,
38
- l({
39
- ...e.props ?? {},
40
- ref: a
41
- })
42
- ) : /* @__PURE__ */ s("div", { ...l(), ref: a, children: e }),
43
- r && /* @__PURE__ */ s(G, { children: /* @__PURE__ */ s(
44
- "div",
45
- {
46
- style: w,
47
- ...F(),
48
- className: "tw:bg-ic-ink-6s tw:rounded-lg",
49
- ref: i.setFloating,
50
- children: /* @__PURE__ */ s(
51
- "div",
52
- {
53
- className: L(
54
- "tw:focus-visible:outline-none tw:rounded-lg tw:p-2 tw:shadow tw:animate-fade tw:animate-duration-300 tw:bg-ic-ink-6s tw:border tw:border-ic-white-1s tw:text-ic-white-6s tw:text-xs"
55
- ),
56
- children: d
57
- }
58
- )
59
- }
60
- ) })
61
- ] });
62
- };
63
- export {
64
- Y as W
65
- };