se-design 1.1.1-dev-01 → 1.1.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.
package/dist/index65.js CHANGED
@@ -1,95 +1,106 @@
1
- import e, { useRef as T, useState as g } from "react";
2
- import { CustomModal as C } from "./index13.js";
3
- import { Icon as E } from "./index6.js";
1
+ import e, { useRef as $, useState as E, useLayoutEffect as R } from "react";
2
+ import { CustomModal as D } from "./index13.js";
3
+ import { Icon as k } from "./index6.js";
4
4
  /* empty css */
5
- const M = ({
6
- children: l = null,
7
- title: n = "",
8
- onClose: s = () => {
5
+ const I = ({
6
+ isOpen: n,
7
+ children: m = null,
8
+ title: t = "",
9
+ onClose: c = () => {
9
10
  },
10
- showCloseIcon: m = !1,
11
- showBackButton: a = !1,
12
- onBack: i = () => {
11
+ showCloseIcon: u = !1,
12
+ showBackButton: r = !1,
13
+ onBack: f = () => {
13
14
  },
14
- className: u = "",
15
- automationId: r = "",
15
+ className: h = "",
16
+ automationId: s = "",
16
17
  minHeight: d = "auto",
17
- maxHeight: c = ""
18
+ maxHeight: l = ""
18
19
  }) => {
19
- const t = T(null), [p, b] = g(0), [k, h] = g(0), [Y, x] = g(!1), N = (o) => {
20
- b(o.touches[0].clientY), h(o.touches[0].clientY), x(!0);
21
- }, y = (o) => {
22
- if (!Y) return;
23
- const f = o.touches[0].clientY, v = f - p;
24
- v > 0 && (h(f), t.current && (t.current.style.transform = `translateY(${v}px)`));
20
+ const a = $(null), [v, g] = E(0), [y, i] = E(0), [b, p] = E(!1), Y = () => {
21
+ a.current && (a.current.style.transform = "translateY(0)");
22
+ };
23
+ R(() => {
24
+ n && Y();
25
+ }, [n]);
26
+ const C = (o) => {
27
+ g(o.touches[0].clientY), i(o.touches[0].clientY), p(!0);
28
+ }, N = (o) => {
29
+ if (!b) return;
30
+ const x = o.touches[0].clientY, T = x - v;
31
+ T > 0 && (i(x), a.current && (a.current.style.transform = `translateY(${T}px)`));
25
32
  }, S = () => {
26
- if (!Y) return;
27
- k - p > 60 ? s() : t.current && (t.current.style.transform = "translateY(0)"), x(!1), b(0), h(0);
33
+ if (!b) return;
34
+ y - v > 60 ? c() : Y(), p(!1), g(0), i(0);
35
+ }, M = () => {
36
+ b && (Y(), p(!1), g(0), i(0));
28
37
  };
29
38
  return /* @__PURE__ */ e.createElement("div", {
30
- ref: t,
31
- className: `se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${u}`,
39
+ ref: a,
40
+ className: `se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${h}`,
32
41
  onClick: (o) => o.stopPropagation(),
33
- onTouchStart: N,
34
- onTouchMove: y,
42
+ onTouchStart: C,
43
+ onTouchMove: N,
35
44
  onTouchEnd: S,
36
- "data-automation-id": r,
45
+ onTouchCancel: M,
46
+ "data-automation-id": s,
37
47
  style: {
38
48
  minHeight: d,
39
- ...c ? {
40
- maxHeight: c
49
+ ...l ? {
50
+ maxHeight: l
41
51
  } : {}
42
52
  }
43
- }, (n || a) && /* @__PURE__ */ e.createElement("div", {
53
+ }, (t || r) && /* @__PURE__ */ e.createElement("div", {
44
54
  className: "se-design-bottom-sheet-header flex items-center justify-left gap-3 mr-6 px-4"
45
- }, a && /* @__PURE__ */ e.createElement(E, {
55
+ }, r && /* @__PURE__ */ e.createElement(k, {
46
56
  name: "back",
47
57
  stroke: "var(--color-gray-700)",
48
- onClick: i,
58
+ onClick: f,
49
59
  className: "se-design-bottom-sheet-back-icon cursor-pointer",
50
- automationId: `${r}-back-icon`
51
- }), n && /* @__PURE__ */ e.createElement("div", {
60
+ automationId: `${s}-back-icon`
61
+ }), t && /* @__PURE__ */ e.createElement("div", {
52
62
  className: "se-design-bottom-sheet-title text-lg font-semibold"
53
- }, n)), m && /* @__PURE__ */ e.createElement(E, {
63
+ }, t)), u && /* @__PURE__ */ e.createElement(k, {
54
64
  name: "close",
55
- onClick: s,
65
+ onClick: c,
56
66
  className: "se-design-bottom-sheet-close-icon absolute top-6 right-4 cursor-pointer z-10",
57
- automationId: `${r}-close-icon`
67
+ automationId: `${s}-close-icon`
58
68
  }), /* @__PURE__ */ e.createElement("div", {
59
69
  className: "se-design-bottom-sheet-content px-4 pb-5 flex-1 min-h-0 overflow-y-auto"
60
- }, l));
61
- }, _ = ({
62
- isOpen: l = !1,
63
- title: n = "",
64
- onClose: s = () => {
70
+ }, m));
71
+ }, L = ({
72
+ isOpen: n = !1,
73
+ title: m = "",
74
+ onClose: t = () => {
65
75
  },
66
- children: m = null,
67
- showCloseIcon: a = !0,
68
- showBackButton: i = !1,
69
- onBack: u = () => {
76
+ children: c = null,
77
+ showCloseIcon: u = !0,
78
+ showBackButton: r = !1,
79
+ onBack: f = () => {
70
80
  },
71
- className: r = "",
72
- automationId: d = "bottomsheet",
73
- minHeight: c = "",
74
- maxHeight: t = ""
75
- }) => /* @__PURE__ */ e.createElement(C, {
76
- isOpen: l,
77
- onClose: s,
78
- onModalClick: s,
81
+ className: h = "",
82
+ automationId: s = "bottomsheet",
83
+ minHeight: d = "",
84
+ maxHeight: l = ""
85
+ }) => /* @__PURE__ */ e.createElement(D, {
86
+ isOpen: n,
87
+ onClose: t,
88
+ onModalClick: t,
79
89
  className: "custom-bottom-sheet",
80
- renderModalContent: () => /* @__PURE__ */ e.createElement(M, {
81
- title: n,
82
- onClose: s,
83
- showCloseIcon: a,
84
- showBackButton: i,
85
- onBack: u,
86
- className: r,
87
- automationId: d,
88
- minHeight: c,
89
- maxHeight: t
90
- }, m)
90
+ renderModalContent: () => /* @__PURE__ */ e.createElement(I, {
91
+ isOpen: n,
92
+ title: m,
93
+ onClose: t,
94
+ showCloseIcon: u,
95
+ showBackButton: r,
96
+ onBack: f,
97
+ className: h,
98
+ automationId: s,
99
+ minHeight: d,
100
+ maxHeight: l
101
+ }, c)
91
102
  });
92
103
  export {
93
- _ as BottomSheet
104
+ L as BottomSheet
94
105
  };
95
106
  //# sourceMappingURL=index65.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index65.js","sources":["../src/components/BottomSheet/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef } from 'react';\nimport { CustomModal } from '../CustomModal';\nimport { Icon } from '../Icon';\n\nimport './style.scss';\n\nexport interface BottomSheetProps {\n isOpen: boolean;\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n maxHeight?: string;\n}\n\ninterface BottomSheetContentProps {\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n maxHeight?: string;\n}\n\nconst BottomSheetContent: FC<BottomSheetContentProps> = ({\n children = null,\n title = '',\n onClose = () => {},\n showCloseIcon = false,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = '',\n minHeight = 'auto',\n maxHeight = ''\n}) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const [startY, setStartY] = useState<number>(0);\n const [currentY, setCurrentY] = useState<number>(0);\n const [isDragging, setIsDragging] = useState<boolean>(false);\n\n const handleTouchStart = (e: React.TouchEvent) => {\n setStartY(e.touches[0].clientY);\n setCurrentY(e.touches[0].clientY);\n setIsDragging(true);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!isDragging) return;\n\n const touchY = e.touches[0].clientY;\n const deltaY = touchY - startY;\n\n // Only allow dragging down\n if (deltaY > 0) {\n setCurrentY(touchY);\n if (contentRef.current) {\n contentRef.current.style.transform = `translateY(${deltaY}px)`;\n }\n }\n };\n\n const handleTouchEnd = () => {\n if (!isDragging) return;\n\n const deltaY = currentY - startY;\n const threshold = 60; // pixels to swipe down to trigger close\n\n if (deltaY > threshold) {\n // Trigger close\n onClose();\n } else {\n // Reset position\n if (contentRef.current) {\n contentRef.current.style.transform = 'translateY(0)';\n }\n }\n\n setIsDragging(false);\n setStartY(0);\n setCurrentY(0);\n };\n\n return (\n <div\n ref={contentRef}\n className={`se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${className}`}\n onClick={(e) => e.stopPropagation()}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n data-automation-id={automationId}\n style={{ minHeight, ...(maxHeight ? { maxHeight } : {}) }}\n >\n {(title || showBackButton) && (\n <div className=\"se-design-bottom-sheet-header flex items-center justify-left gap-3 mr-6 px-4\">\n {showBackButton && (\n <Icon\n name=\"back\"\n stroke=\"var(--color-gray-700)\"\n onClick={onBack}\n className=\"se-design-bottom-sheet-back-icon cursor-pointer\"\n automationId={`${automationId}-back-icon`}\n />\n )}\n {title && <div className=\"se-design-bottom-sheet-title text-lg font-semibold\">{title}</div>}\n </div>\n )}\n {showCloseIcon && (\n <Icon\n name=\"close\"\n onClick={onClose}\n className=\"se-design-bottom-sheet-close-icon absolute top-6 right-4 cursor-pointer z-10\"\n automationId={`${automationId}-close-icon`}\n />\n )}\n <div className=\"se-design-bottom-sheet-content px-4 pb-5 flex-1 min-h-0 overflow-y-auto\">{children}</div>\n </div>\n );\n};\n\nexport const BottomSheet: FC<BottomSheetProps> = ({\n isOpen = false,\n title = '',\n onClose = () => {},\n children = null,\n showCloseIcon = true,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = 'bottomsheet',\n minHeight = '',\n maxHeight = ''\n}) => {\n return (\n <CustomModal\n isOpen={isOpen}\n onClose={onClose}\n onModalClick={onClose}\n className=\"custom-bottom-sheet\"\n renderModalContent={() => (\n <BottomSheetContent\n title={title}\n onClose={onClose}\n showCloseIcon={showCloseIcon}\n showBackButton={showBackButton}\n onBack={onBack}\n className={className}\n automationId={automationId}\n minHeight={minHeight}\n maxHeight={maxHeight}\n >\n {children}\n </BottomSheetContent>\n )}\n />\n );\n};\n"],"names":["BottomSheetContent","children","title","onClose","showCloseIcon","showBackButton","onBack","className","automationId","minHeight","maxHeight","contentRef","useRef","startY","setStartY","useState","currentY","setCurrentY","isDragging","setIsDragging","handleTouchStart","e","touches","clientY","handleTouchMove","touchY","deltaY","current","style","transform","handleTouchEnd","React","createElement","ref","onClick","stopPropagation","onTouchStart","onTouchMove","onTouchEnd","Icon","name","stroke","BottomSheet","isOpen","CustomModal","onModalClick","renderModalContent"],"mappings":";;;;AAiCA,MAAMA,IAAkDA,CAAC;AAAA,EACvDC,UAAAA,IAAW;AAAA,EACXC,OAAAA,IAAQ;AAAA,EACRC,SAAAA,IAAUA,MAAM;AAAA,EAAC;AAAA,EACjBC,eAAAA,IAAgB;AAAA,EAChBC,gBAAAA,IAAiB;AAAA,EACjBC,QAAAA,IAASA,MAAM;AAAA,EAAC;AAAA,EAChBC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA,IAAY;AAAA,EACZC,WAAAA,IAAY;AACd,MAAM;AACJ,QAAMC,IAAaC,EAAuB,IAAI,GACxC,CAACC,GAAQC,CAAS,IAAIC,EAAiB,CAAC,GACxC,CAACC,GAAUC,CAAW,IAAIF,EAAiB,CAAC,GAC5C,CAACG,GAAYC,CAAa,IAAIJ,EAAkB,EAAK,GAErDK,IAAmBA,CAACC,MAAwB;AAChDP,IAAAA,EAAUO,EAAEC,QAAQ,CAAC,EAAEC,OAAO,GAC9BN,EAAYI,EAAEC,QAAQ,CAAC,EAAEC,OAAO,GAChCJ,EAAc,EAAI;AAAA,EACpB,GAEMK,IAAkBA,CAACH,MAAwB;AAC/C,QAAI,CAACH,EAAY;AAEjB,UAAMO,IAASJ,EAAEC,QAAQ,CAAC,EAAEC,SACtBG,IAASD,IAASZ;AAGxB,IAAIa,IAAS,MACXT,EAAYQ,CAAM,GACdd,EAAWgB,YACbhB,EAAWgB,QAAQC,MAAMC,YAAY,cAAcH,CAAM;AAAA,EAG/D,GAEMI,IAAiBA,MAAM;AAC3B,QAAI,CAACZ,EAAY;AAKjB,IAHeF,IAAWH,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A,EACjBF,UAAAA,IAAW;AAAA,EACXG,eAAAA,IAAgB;AAAA,EAChBC,gBAAAA,IAAiB;AAAA,EACjBC,QAAAA,IAASA,MAAM;AAAA,EAAC;AAAA,EAChBC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA,IAAY;AAAA,EACZC,WAAAA,IAAY;AACd,MAEIqB,gBAAAA,EAAAC,cAACY,GAAW;AAAA,EACVD,QAAAA;AAAAA,EACAxC,SAAAA;AAAAA,EACA0C,cAAc1C;AAAAA,EACdI,WAAU;AAAA,EACVuC,oBAAoBA,MAClBf,gBAAAA,EAAAC,cAAChC,GAAkB;AAAA,IACjBE,OAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,WAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,WAAAA;AAAAA,IACAC,WAAAA;AAAAA,EAAAA,GAECT,CACiB;AAAA,CAEvB;"}
1
+ {"version":3,"file":"index65.js","sources":["../src/components/BottomSheet/index.tsx"],"sourcesContent":["import React, { FC, useLayoutEffect, useState, useRef } from 'react';\nimport { CustomModal } from '../CustomModal';\nimport { Icon } from '../Icon';\n\nimport './style.scss';\n\nexport interface BottomSheetProps {\n isOpen: boolean;\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n maxHeight?: string;\n}\n\ninterface BottomSheetContentProps {\n isOpen: boolean;\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n maxHeight?: string;\n}\n\nconst BottomSheetContent: FC<BottomSheetContentProps> = ({\n isOpen,\n children = null,\n title = '',\n onClose = () => {},\n showCloseIcon = false,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = '',\n minHeight = 'auto',\n maxHeight = ''\n}) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const [startY, setStartY] = useState<number>(0);\n const [currentY, setCurrentY] = useState<number>(0);\n const [isDragging, setIsDragging] = useState<boolean>(false);\n\n const resetPosition = () => {\n if (contentRef.current) {\n contentRef.current.style.transform = 'translateY(0)';\n }\n };\n\n // The modal keeps this content mounted while closed, so a swipe-to-close would leave its drag offset\n // on the sheet and the next open would start that far down.\n useLayoutEffect(() => {\n if (isOpen) {\n resetPosition();\n }\n }, [isOpen]);\n\n const handleTouchStart = (e: React.TouchEvent) => {\n setStartY(e.touches[0].clientY);\n setCurrentY(e.touches[0].clientY);\n setIsDragging(true);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!isDragging) return;\n\n const touchY = e.touches[0].clientY;\n const deltaY = touchY - startY;\n\n // Only allow dragging down\n if (deltaY > 0) {\n setCurrentY(touchY);\n if (contentRef.current) {\n contentRef.current.style.transform = `translateY(${deltaY}px)`;\n }\n }\n };\n\n const handleTouchEnd = () => {\n if (!isDragging) return;\n\n const deltaY = currentY - startY;\n const threshold = 60; // pixels to swipe down to trigger close\n\n if (deltaY > threshold) {\n // Trigger close\n onClose();\n } else {\n resetPosition();\n }\n\n setIsDragging(false);\n setStartY(0);\n setCurrentY(0);\n };\n\n // A touch the browser takes over (a scroll, an alert, a tab switch) ends without touchend.\n const handleTouchCancel = () => {\n if (!isDragging) return;\n\n resetPosition();\n setIsDragging(false);\n setStartY(0);\n setCurrentY(0);\n };\n\n return (\n <div\n ref={contentRef}\n className={`se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${className}`}\n onClick={(e) => e.stopPropagation()}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n onTouchCancel={handleTouchCancel}\n data-automation-id={automationId}\n style={{ minHeight, ...(maxHeight ? { maxHeight } : {}) }}\n >\n {(title || showBackButton) && (\n <div className=\"se-design-bottom-sheet-header flex items-center justify-left gap-3 mr-6 px-4\">\n {showBackButton && (\n <Icon\n name=\"back\"\n stroke=\"var(--color-gray-700)\"\n onClick={onBack}\n className=\"se-design-bottom-sheet-back-icon cursor-pointer\"\n automationId={`${automationId}-back-icon`}\n />\n )}\n {title && <div className=\"se-design-bottom-sheet-title text-lg font-semibold\">{title}</div>}\n </div>\n )}\n {showCloseIcon && (\n <Icon\n name=\"close\"\n onClick={onClose}\n className=\"se-design-bottom-sheet-close-icon absolute top-6 right-4 cursor-pointer z-10\"\n automationId={`${automationId}-close-icon`}\n />\n )}\n <div className=\"se-design-bottom-sheet-content px-4 pb-5 flex-1 min-h-0 overflow-y-auto\">{children}</div>\n </div>\n );\n};\n\nexport const BottomSheet: FC<BottomSheetProps> = ({\n isOpen = false,\n title = '',\n onClose = () => {},\n children = null,\n showCloseIcon = true,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = 'bottomsheet',\n minHeight = '',\n maxHeight = ''\n}) => {\n return (\n <CustomModal\n isOpen={isOpen}\n onClose={onClose}\n onModalClick={onClose}\n className=\"custom-bottom-sheet\"\n renderModalContent={() => (\n <BottomSheetContent\n isOpen={isOpen}\n title={title}\n onClose={onClose}\n showCloseIcon={showCloseIcon}\n showBackButton={showBackButton}\n onBack={onBack}\n className={className}\n automationId={automationId}\n minHeight={minHeight}\n maxHeight={maxHeight}\n >\n {children}\n </BottomSheetContent>\n )}\n />\n );\n};\n"],"names":["BottomSheetContent","isOpen","children","title","onClose","showCloseIcon","showBackButton","onBack","className","automationId","minHeight","maxHeight","contentRef","useRef","startY","setStartY","useState","currentY","setCurrentY","isDragging","setIsDragging","resetPosition","current","style","transform","useLayoutEffect","handleTouchStart","e","touches","clientY","handleTouchMove","touchY","deltaY","handleTouchEnd","handleTouchCancel","React","createElement","ref","onClick","stopPropagation","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","Icon","name","stroke","BottomSheet","CustomModal","onModalClick","renderModalContent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AAS;AAAA,EACTE,OAAAA,IAAQ;AAAA,EACRC,SAAAA,IAAUA,MAAM;AAAA,EAAC;AAAA,EACjBF,UAAAA,IAAW;AAAA,EACXG,eAAAA,IAAgB;AAAA,EAChBC,gBAAAA,IAAiB;AAAA,EACjBC,QAAAA,IAASA,MAAM;AAAA,EAAC;AAAA,EAChBC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA,IAAY;AAAA,EACZC,WAAAA,IAAY;AACd,MAEIwB,gBAAAA,EAAAC,cAACY,GAAW;AAAA,EACV/C,QAAAA;AAAAA,EACAG,SAAAA;AAAAA,EACA6C,cAAc7C;AAAAA,EACdI,WAAU;AAAA,EACV0C,oBAAoBA,MAClBf,gBAAAA,EAAAC,cAACpC,GAAkB;AAAA,IACjBC,QAAAA;AAAAA,IACAE,OAAAA;AAAAA,IACAC,SAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,QAAAA;AAAAA,IACAC,WAAAA;AAAAA,IACAC,cAAAA;AAAAA,IACAC,WAAAA;AAAAA,IACAC,WAAAA;AAAAA,EAAAA,GAECT,CACiB;AAAA,CAEvB;"}
package/dist/index7.js CHANGED
@@ -1,11 +1,11 @@
1
- import s, { useState as h, useCallback as i } from "react";
1
+ import c, { useState as h, useCallback as i } from "react";
2
2
  import "./index78.js";
3
3
  import { isElementVisible as p } from "./index226.js";
4
4
  const x = ({
5
5
  skipLinks: n,
6
- className: c = ""
6
+ className: r = ""
7
7
  }) => {
8
- const [r, u] = h(n), l = i(() => {
8
+ const [s, u] = h(n), l = i(() => {
9
9
  const t = n.filter((e) => {
10
10
  const o = document.getElementById(e.id);
11
11
  return p(o);
@@ -30,10 +30,10 @@ const x = ({
30
30
  });
31
31
  }
32
32
  }, []);
33
- return n.length === 0 ? null : /* @__PURE__ */ s.createElement("div", {
34
- className: `se-design-skip-links-bar relative w-full h-0 overflow-hidden p-0 flex items-center justify-center bg-[var(--color-blue-50)] transition-[height] duration-300 ease-out focus-within:h-auto focus-within:py-1 focus-within:px-2 ${c}`,
33
+ return n.length === 0 ? null : /* @__PURE__ */ c.createElement("div", {
34
+ className: `se-design-skip-links-bar relative w-full h-0 overflow-hidden p-0 flex items-center justify-center bg-[var(--color-blue-50)] transition-[height] duration-300 ease-out focus-within:h-auto focus-within:py-1 focus-within:px-2 ${r}`,
35
35
  onFocus: a
36
- }, r.map((t) => /* @__PURE__ */ s.createElement("a", {
36
+ }, s.map((t) => /* @__PURE__ */ c.createElement("a", {
37
37
  key: t.id,
38
38
  href: `#${t.id}`,
39
39
  className: "absolute -left-[9999px] [clip:rect(0,0,0,0)] no-underline text-[var(--color-blue-500)] text-md py-1 px-2.5 rounded capitalize focus:static focus:left-auto focus:[clip:auto] focus:outline-none focus-visible:!outline-none hover:text-[var(--color-blue-600)] hover:bg-[var(--color-blue-200)]",
@@ -43,7 +43,6 @@ const x = ({
43
43
  }, t.label)));
44
44
  };
45
45
  export {
46
- x as SkipLinksBar,
47
- x as default
46
+ x as SkipLinksBar
48
47
  };
49
48
  //# sourceMappingURL=index7.js.map
package/dist/index71.js CHANGED
@@ -142,7 +142,6 @@ const K = {
142
142
  }));
143
143
  };
144
144
  export {
145
- ea as Paywall,
146
- ea as default
145
+ ea as Paywall
147
146
  };
148
147
  //# sourceMappingURL=index71.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "se-design",
3
- "version": "1.1.1-dev-01",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "exports": {