se-design 1.1.0 → 1.1.1-dev-01

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/index44.js CHANGED
@@ -1,24 +1,24 @@
1
- import t, { useState as p, useEffect as g } from "react";
1
+ import t, { useState as d, useEffect as g } from "react";
2
2
  import { Icon as S } from "./index6.js";
3
3
  import { Button as A } from "./index4.js";
4
4
  import { getRegionAttributes as P } from "./index72.js";
5
5
  import "./index78.js";
6
6
  import { useStableId as w } from "./index227.js";
7
7
  /* empty css */
8
- function x() {
9
- return x = Object.assign ? Object.assign.bind() : function(i) {
10
- for (var n = 1; n < arguments.length; n++) {
11
- var a = arguments[n];
12
- for (var s in a) ({}).hasOwnProperty.call(a, s) && (i[s] = a[s]);
8
+ function f() {
9
+ return f = Object.assign ? Object.assign.bind() : function(i) {
10
+ for (var r = 1; r < arguments.length; r++) {
11
+ var n = arguments[r];
12
+ for (var s in n) ({}).hasOwnProperty.call(n, s) && (i[s] = n[s]);
13
13
  }
14
14
  return i;
15
- }, x.apply(null, arguments);
15
+ }, f.apply(null, arguments);
16
16
  }
17
17
  const l = {
18
- bannerCtn: "relative overflow-hidden rounded-[8px] bg-[var(--color-white)] flex items-center py-[16px] pl-[16px] pr-[48px] w-full",
18
+ bannerCtn: "relative overflow-hidden rounded-[8px] bg-[var(--color-white)] flex items-center py-[18px] pl-[20px] pr-[64px] w-full",
19
19
  content: "relative flex items-center justify-between w-full gap-[24px]",
20
20
  textCtn: "flex flex-col gap-[4px] items-start",
21
- closeBtn: "absolute top-[4px] right-[4px]"
21
+ closeBtn: "absolute top-[12px] right-[12px]"
22
22
  }, D = [{
23
23
  key: "ring-3",
24
24
  rx: 357,
@@ -34,10 +34,10 @@ const l = {
34
34
  rx: 255,
35
35
  ry: 132.5,
36
36
  opacity: 1
37
- }], I = 1600, O = 952, f = O * 0.6, T = 1550, X = ({
37
+ }], I = 1600, O = 952, x = O * 0.6, T = 1550, X = ({
38
38
  bannerClassName: i = "",
39
- title: n = "Nicely done, you're a Pro now!",
40
- description: a = "Get Business Plan which adds unlimited signatures, AI insights and bulk signing.",
39
+ title: r = "Nicely done, you're a Pro now!",
40
+ description: n = "Get Business Plan which adds unlimited signatures, AI insights and bulk signing.",
41
41
  buttonLabel: s = "Upgrade to Business",
42
42
  buttonIconProps: k = {
43
43
  name: "upload"
@@ -51,7 +51,7 @@ const l = {
51
51
  const b = w(), y = w(), C = P({
52
52
  titleId: b,
53
53
  descriptionId: y
54
- }), [L, h] = p(!1), [v, d] = p(!1), [E, M] = p(0);
54
+ }), [L, h] = d(!1), [v, p] = d(!1), [E, M] = d(0);
55
55
  g(() => {
56
56
  const e = window.matchMedia("(prefers-reduced-motion: reduce)");
57
57
  h(e.matches);
@@ -60,19 +60,19 @@ const l = {
60
60
  }, []), g(() => {
61
61
  u && M((e) => e + 1);
62
62
  }, [u]);
63
- const r = !u || L;
63
+ const a = !u || L;
64
64
  return g(() => {
65
- if (r) {
66
- d(!0);
65
+ if (a) {
66
+ p(!0);
67
67
  return;
68
68
  }
69
- d(!1);
69
+ p(!1);
70
70
  const e = setTimeout(() => {
71
- d(!0), _?.();
71
+ p(!0), _?.();
72
72
  }, T);
73
73
  return () => clearTimeout(e);
74
- }, [E, r]), /* @__PURE__ */ t.createElement("div", x({
75
- className: `${l.bannerCtn} ${i} upgrade-banner-ctn ${r ? "upgrade-banner-ctn--static" : ""}`,
74
+ }, [E, a]), /* @__PURE__ */ t.createElement("div", f({
75
+ className: `${l.bannerCtn} ${i} upgrade-banner-ctn ${a ? "upgrade-banner-ctn--static" : ""}`,
76
76
  "data-automation-id": B
77
77
  }, C), /* @__PURE__ */ t.createElement("svg", {
78
78
  key: E,
@@ -81,16 +81,16 @@ const l = {
81
81
  preserveAspectRatio: "xMidYMid slice",
82
82
  "aria-hidden": "true"
83
83
  }, D.map((e, o) => {
84
- const c = f, N = -e.rx * 0.6;
84
+ const c = x, N = -e.rx * 0.6;
85
85
  return /* @__PURE__ */ t.createElement("ellipse", {
86
86
  key: e.key,
87
87
  className: `upgrade-banner-ring upgrade-banner-ring--${e.key}`,
88
- cx: r ? c : N,
88
+ cx: a ? c : N,
89
89
  cy: "42",
90
90
  rx: e.rx,
91
91
  ry: e.ry,
92
92
  opacity: e.opacity
93
- }, !r && /* @__PURE__ */ t.createElement("animate", {
93
+ }, !a && /* @__PURE__ */ t.createElement("animate", {
94
94
  attributeName: "cx",
95
95
  from: N,
96
96
  to: c,
@@ -101,15 +101,15 @@ const l = {
101
101
  }));
102
102
  }), /* @__PURE__ */ t.createElement("ellipse", {
103
103
  className: "upgrade-banner-ring upgrade-banner-ring--fill",
104
- cx: r ? f : -1640,
104
+ cx: a ? x : -1640,
105
105
  cy: "42",
106
106
  rx: I,
107
107
  ry: I,
108
108
  opacity: "1"
109
- }, !r && /* @__PURE__ */ t.createElement("animate", {
109
+ }, !a && /* @__PURE__ */ t.createElement("animate", {
110
110
  attributeName: "cx",
111
111
  from: -1640,
112
- to: f,
112
+ to: x,
113
113
  dur: "1.2s",
114
114
  begin: "0.35s",
115
115
  calcMode: "linear",
@@ -121,17 +121,17 @@ const l = {
121
121
  }, /* @__PURE__ */ t.createElement("span", {
122
122
  id: b,
123
123
  className: "upgrade-banner-title text-[var(--color-white)]"
124
- }, n), /* @__PURE__ */ t.createElement("span", {
124
+ }, r), /* @__PURE__ */ t.createElement("span", {
125
125
  id: y,
126
126
  className: "upgrade-banner-description text-[var(--color-white)]"
127
- }, a)), /* @__PURE__ */ t.createElement(A, {
127
+ }, n)), /* @__PURE__ */ t.createElement(A, {
128
128
  type: "secondary",
129
129
  theme: "blue",
130
130
  size: "sm",
131
131
  label: s,
132
132
  iconProps: k,
133
133
  onClick: R,
134
- className: "shrink-0"
134
+ className: "shrink-0 !gap-[6px] !py-[10px] !px-[20px]"
135
135
  })), m && v && /* @__PURE__ */ t.createElement("div", {
136
136
  className: l.closeBtn
137
137
  }, /* @__PURE__ */ t.createElement(S, {
@@ -147,6 +147,7 @@ const l = {
147
147
  }, v ? "Dismiss button available." : ""));
148
148
  };
149
149
  export {
150
- X as UpgradeBanner
150
+ X as UpgradeBanner,
151
+ X as default
151
152
  };
152
153
  //# sourceMappingURL=index44.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index44.js","sources":["../src/components/UpgradeBanner/index.tsx"],"sourcesContent":["import React, { FC, useState, useEffect } from \"react\";\nimport { Icon, IconProps } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport { Map } from \"../../utils/common.types\";\nimport { getRegionAttributes } from \"../../utils/a11y\";\nimport { useStableId } from \"../../utils/useStableId\";\nimport \"./style.scss\";\n\nexport interface UpgradeBannerProps {\n /** Additional class name applied to the banner container. */\n bannerClassName?: string;\n /** Headline text. */\n title?: string;\n /** Supporting description text below the title. */\n description?: string;\n /** Label for the call-to-action button. */\n buttonLabel?: string;\n /** Icon props for the call-to-action button. */\n buttonIconProps?: IconProps;\n /** Called when the call-to-action button is activated. */\n onButtonClick?: () => void;\n /** Called when the dismiss (close) icon is activated. When omitted, no close icon is rendered. */\n onClose?: () => void;\n /**\n * Pass `true` at the moment the banner should animate in (e.g. when a\n * preceding task list completes) — the animation runs once per\n * `false` -> `true` transition, not on mount. When `false` (default), the\n * banner renders in its fully-settled solid state with no animation.\n */\n playAnimation?: boolean;\n /** Called once the fill animation finishes. */\n onAnimationComplete?: () => void;\n /** Automation ID for testing, applied as data-automation-id on the root element. */\n automationId?: string;\n}\n\nconst className: Map = {\n bannerCtn:\n \"relative overflow-hidden rounded-[8px] bg-[var(--color-white)] flex items-center py-[16px] pl-[16px] pr-[48px] w-full\",\n content: \"relative flex items-center justify-between w-full gap-[24px]\",\n textCtn: \"flex flex-col gap-[4px] items-start\",\n closeBtn: \"absolute top-[4px] right-[4px]\"\n};\n\nconst RING_LAYERS = [\n { key: \"ring-3\", rx: 357, ry: 185.5, opacity: 0.3 },\n { key: \"ring-2\", rx: 306, ry: 159, opacity: 0.5 },\n { key: \"ring-1\", rx: 255, ry: 132.5, opacity: 1 }\n];\n\nconst FILL_RADIUS = 1600;\nconst VIEWBOX_WIDTH = 952;\nconst RIPPLE_REST_CX = VIEWBOX_WIDTH * 0.6;\nconst FILL_ANIMATION_END_MS = 1550;\n\nexport const UpgradeBanner: FC<UpgradeBannerProps> = ({\n bannerClassName = \"\",\n title = \"Nicely done, you're a Pro now!\",\n description = \"Get Business Plan which adds unlimited signatures, AI insights and bulk signing.\",\n buttonLabel = \"Upgrade to Business\",\n buttonIconProps = { name: \"upload\" },\n onButtonClick,\n onClose,\n playAnimation = false,\n onAnimationComplete,\n automationId\n}) => {\n const titleId = useStableId();\n const descriptionId = useStableId();\n const regionAttributes = getRegionAttributes({ titleId, descriptionId });\n\n const [reduceMotion, setReduceMotion] = useState(false);\n const [showCloseButton, setShowCloseButton] = useState(false);\n const [animationRunId, setAnimationRunId] = useState(0);\n\n useEffect(() => {\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n setReduceMotion(query.matches);\n\n const handleChange = (event: MediaQueryListEvent) => setReduceMotion(event.matches);\n query.addEventListener(\"change\", handleChange);\n return () => query.removeEventListener(\"change\", handleChange);\n }, []);\n\n useEffect(() => {\n if (!playAnimation) {\n return;\n }\n setAnimationRunId((id) => id + 1);\n }, [playAnimation]);\n\n const showStatic = !playAnimation || reduceMotion;\n\n useEffect(() => {\n if (showStatic) {\n setShowCloseButton(true);\n return;\n }\n\n setShowCloseButton(false);\n const timer = setTimeout(() => {\n setShowCloseButton(true);\n onAnimationComplete?.();\n }, FILL_ANIMATION_END_MS);\n return () => clearTimeout(timer);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animationRunId, showStatic]);\n\n return (\n <div\n className={`${className.bannerCtn} ${bannerClassName} upgrade-banner-ctn ${\n showStatic ? \"upgrade-banner-ctn--static\" : \"\"\n }`}\n data-automation-id={automationId}\n {...regionAttributes}\n >\n <svg\n key={animationRunId}\n className=\"upgrade-banner-rings\"\n viewBox=\"0 0 952 84\"\n preserveAspectRatio=\"xMidYMid slice\"\n aria-hidden=\"true\"\n >\n {RING_LAYERS.map((ring, index) => {\n const restCx = RIPPLE_REST_CX;\n const fromCx = -ring.rx * 0.6;\n return (\n <ellipse\n key={ring.key}\n className={`upgrade-banner-ring upgrade-banner-ring--${ring.key}`}\n cx={showStatic ? restCx : fromCx}\n cy=\"42\"\n rx={ring.rx}\n ry={ring.ry}\n opacity={ring.opacity}\n >\n {!showStatic && (\n <animate\n attributeName=\"cx\"\n from={fromCx}\n to={restCx}\n dur=\"1.1s\"\n begin={`${index * 0.12}s`}\n calcMode=\"linear\"\n fill=\"freeze\"\n />\n )}\n </ellipse>\n );\n })}\n <ellipse\n className=\"upgrade-banner-ring upgrade-banner-ring--fill\"\n cx={showStatic ? RIPPLE_REST_CX : -(FILL_RADIUS + 40)}\n cy=\"42\"\n rx={FILL_RADIUS}\n ry={FILL_RADIUS}\n opacity=\"1\"\n >\n {!showStatic && (\n <animate\n attributeName=\"cx\"\n from={-(FILL_RADIUS + 40)}\n to={RIPPLE_REST_CX}\n dur=\"1.2s\"\n begin=\"0.35s\"\n calcMode=\"linear\"\n fill=\"freeze\"\n />\n )}\n </ellipse>\n </svg>\n\n <div className={className.content}>\n <div className={className.textCtn}>\n <span id={titleId} className=\"upgrade-banner-title text-[var(--color-white)]\">\n {title}\n </span>\n <span id={descriptionId} className=\"upgrade-banner-description text-[var(--color-white)]\">\n {description}\n </span>\n </div>\n <Button\n type=\"secondary\"\n theme=\"blue\"\n size=\"sm\"\n label={buttonLabel}\n iconProps={buttonIconProps}\n onClick={onButtonClick}\n className=\"shrink-0\"\n />\n </div>\n\n {onClose && showCloseButton && (\n <div className={className.closeBtn}>\n <Icon name=\"close\" size={16} stroke=\"var(--color-white)\" onClick={onClose} ariaLabel=\"Dismiss\" />\n </div>\n )}\n\n {onClose && (\n <span className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {showCloseButton ? \"Dismiss button available.\" : \"\"}\n </span>\n )}\n </div>\n );\n};\n\nexport default UpgradeBanner;\n"],"names":["className","bannerCtn","content","textCtn","closeBtn","RING_LAYERS","key","rx","ry","opacity","FILL_RADIUS","VIEWBOX_WIDTH","RIPPLE_REST_CX","FILL_ANIMATION_END_MS","UpgradeBanner","bannerClassName","title","description","buttonLabel","buttonIconProps","name","onButtonClick","onClose","playAnimation","onAnimationComplete","automationId","titleId","useStableId","descriptionId","regionAttributes","getRegionAttributes","reduceMotion","setReduceMotion","useState","showCloseButton","setShowCloseButton","animationRunId","setAnimationRunId","useEffect","query","window","matchMedia","matches","handleChange","event","addEventListener","removeEventListener","id","showStatic","timer","setTimeout","clearTimeout","React","createElement","_extends","viewBox","preserveAspectRatio","map","ring","index","restCx","fromCx","cx","cy","attributeName","from","to","dur","begin","calcMode","fill","Button","type","theme","size","label","iconProps","onClick","Icon","stroke","ariaLabel","role"],"mappings":";;;;;;;;;;;;;;;;AAoCA,MAAMA,IAAiB;AAAA,EACrBC,WACE;AAAA,EACFC,SAAS;AAAA,EACTC,SAAS;AAAA,EACTC,UAAU;AACZ,GAEMC,IAAc,CAClB;AAAA,EAAEC,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAOC,SAAS;AAAI,GAClD;AAAA,EAAEH,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAKC,SAAS;AAAI,GAChD;AAAA,EAAEH,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAOC,SAAS;AAAE,CAAC,GAG7CC,IAAc,MACdC,IAAgB,KAChBC,IAAiBD,IAAgB,KACjCE,IAAwB,MAEjBC,IAAwCA,CAAC;AAAA,EACpDC,iBAAAA,IAAkB;AAAA,EAClBC,OAAAA,IAAQ;AAAA,EACRC,aAAAA,IAAc;AAAA,EACdC,aAAAA,IAAc;AAAA,EACdC,iBAAAA,IAAkB;AAAA,IAAEC,MAAM;AAAA,EAAA;AAAA,EAC1BC,eAAAA;AAAAA,EACAC,SAAAA;AAA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AAUE;AAAAA,EAAAA,GACxBkD,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKrD,WAAWA,EAAUG;AAAAA,EAAAA,GACxBiD,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMN,IAAIrB;AAAAA,IAAS1B,WAAU;AAAA,EAAA,GAC1BgB,CACG,GACNoC,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMN,IAAInB;AAAAA,IAAe5B,WAAU;AAAA,EAAA,GAChCiB,CACG,CACH,GACLmC,gBAAAA,EAAAC,cAACkB,GAAM;AAAA,IACLC,MAAK;AAAA,IACLC,OAAM;AAAA,IACNC,MAAK;AAAA,IACLC,OAAOzD;AAAAA,IACP0D,WAAWzD;AAAAA,IACX0D,SAASxD;AAAAA,IACTrB,WAAU;AAAA,EAAA,CACX,CACE,GAEJsB,KAAWY,KACVkB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKrD,WAAWA,EAAUI;AAAAA,EAAAA,GACxBgD,gBAAAA,EAAAC,cAACyB,GAAI;AAAA,IAAC1D,MAAK;AAAA,IAAQsD,MAAM;AAAA,IAAIK,QAAO;AAAA,IAAqBF,SAASvD;AAAAA,IAAS0D,WAAU;AAAA,EAAA,CAAW,CAC7F,GAGN1D,KACC8B,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMrD,WAAU;AAAA,IAAUiF,MAAK;AAAA,IAAS,aAAU;AAAA,EAAA,GAC/C/C,IAAkB,8BAA8B,EAC7C,CAEL;AAET;"}
1
+ {"version":3,"file":"index44.js","sources":["../src/components/UpgradeBanner/index.tsx"],"sourcesContent":["import React, { FC, useState, useEffect } from \"react\";\nimport { Icon, IconProps } from \"../Icon\";\nimport { Button } from \"../Button\";\nimport { Map } from \"../../utils/common.types\";\nimport { getRegionAttributes } from \"../../utils/a11y\";\nimport { useStableId } from \"../../utils/useStableId\";\nimport \"./style.scss\";\n\nexport interface UpgradeBannerProps {\n /** Additional class name applied to the banner container. */\n bannerClassName?: string;\n /** Headline text. */\n title?: string;\n /** Supporting description text below the title. */\n description?: string;\n /** Label for the call-to-action button. */\n buttonLabel?: string;\n /** Icon props for the call-to-action button. */\n buttonIconProps?: IconProps;\n /** Called when the call-to-action button is activated. */\n onButtonClick?: () => void;\n /** Called when the dismiss (close) icon is activated. When omitted, no close icon is rendered. */\n onClose?: () => void;\n /**\n * Pass `true` at the moment the banner should animate in (e.g. when a\n * preceding task list completes) — the animation runs once per\n * `false` -> `true` transition, not on mount. When `false` (default), the\n * banner renders in its fully-settled solid state with no animation.\n */\n playAnimation?: boolean;\n /** Called once the fill animation finishes. */\n onAnimationComplete?: () => void;\n /** Automation ID for testing, applied as data-automation-id on the root element. */\n automationId?: string;\n}\n\nconst className: Map = {\n bannerCtn:\n \"relative overflow-hidden rounded-[8px] bg-[var(--color-white)] flex items-center py-[18px] pl-[20px] pr-[64px] w-full\",\n content: \"relative flex items-center justify-between w-full gap-[24px]\",\n textCtn: \"flex flex-col gap-[4px] items-start\",\n closeBtn: \"absolute top-[12px] right-[12px]\"\n};\n\nconst RING_LAYERS = [\n { key: \"ring-3\", rx: 357, ry: 185.5, opacity: 0.3 },\n { key: \"ring-2\", rx: 306, ry: 159, opacity: 0.5 },\n { key: \"ring-1\", rx: 255, ry: 132.5, opacity: 1 }\n];\n\nconst FILL_RADIUS = 1600;\nconst VIEWBOX_WIDTH = 952;\nconst RIPPLE_REST_CX = VIEWBOX_WIDTH * 0.6;\nconst FILL_ANIMATION_END_MS = 1550;\n\nexport const UpgradeBanner: FC<UpgradeBannerProps> = ({\n bannerClassName = \"\",\n title = \"Nicely done, you're a Pro now!\",\n description = \"Get Business Plan which adds unlimited signatures, AI insights and bulk signing.\",\n buttonLabel = \"Upgrade to Business\",\n buttonIconProps = { name: \"upload\" },\n onButtonClick,\n onClose,\n playAnimation = false,\n onAnimationComplete,\n automationId\n}) => {\n const titleId = useStableId();\n const descriptionId = useStableId();\n const regionAttributes = getRegionAttributes({ titleId, descriptionId });\n\n const [reduceMotion, setReduceMotion] = useState(false);\n const [showCloseButton, setShowCloseButton] = useState(false);\n const [animationRunId, setAnimationRunId] = useState(0);\n\n useEffect(() => {\n const query = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n setReduceMotion(query.matches);\n\n const handleChange = (event: MediaQueryListEvent) => setReduceMotion(event.matches);\n query.addEventListener(\"change\", handleChange);\n return () => query.removeEventListener(\"change\", handleChange);\n }, []);\n\n useEffect(() => {\n if (!playAnimation) {\n return;\n }\n setAnimationRunId((id) => id + 1);\n }, [playAnimation]);\n\n const showStatic = !playAnimation || reduceMotion;\n\n useEffect(() => {\n if (showStatic) {\n setShowCloseButton(true);\n return;\n }\n\n setShowCloseButton(false);\n const timer = setTimeout(() => {\n setShowCloseButton(true);\n onAnimationComplete?.();\n }, FILL_ANIMATION_END_MS);\n return () => clearTimeout(timer);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [animationRunId, showStatic]);\n\n return (\n <div\n className={`${className.bannerCtn} ${bannerClassName} upgrade-banner-ctn ${\n showStatic ? \"upgrade-banner-ctn--static\" : \"\"\n }`}\n data-automation-id={automationId}\n {...regionAttributes}\n >\n <svg\n key={animationRunId}\n className=\"upgrade-banner-rings\"\n viewBox=\"0 0 952 84\"\n preserveAspectRatio=\"xMidYMid slice\"\n aria-hidden=\"true\"\n >\n {RING_LAYERS.map((ring, index) => {\n const restCx = RIPPLE_REST_CX;\n const fromCx = -ring.rx * 0.6;\n return (\n <ellipse\n key={ring.key}\n className={`upgrade-banner-ring upgrade-banner-ring--${ring.key}`}\n cx={showStatic ? restCx : fromCx}\n cy=\"42\"\n rx={ring.rx}\n ry={ring.ry}\n opacity={ring.opacity}\n >\n {!showStatic && (\n <animate\n attributeName=\"cx\"\n from={fromCx}\n to={restCx}\n dur=\"1.1s\"\n begin={`${index * 0.12}s`}\n calcMode=\"linear\"\n fill=\"freeze\"\n />\n )}\n </ellipse>\n );\n })}\n <ellipse\n className=\"upgrade-banner-ring upgrade-banner-ring--fill\"\n cx={showStatic ? RIPPLE_REST_CX : -(FILL_RADIUS + 40)}\n cy=\"42\"\n rx={FILL_RADIUS}\n ry={FILL_RADIUS}\n opacity=\"1\"\n >\n {!showStatic && (\n <animate\n attributeName=\"cx\"\n from={-(FILL_RADIUS + 40)}\n to={RIPPLE_REST_CX}\n dur=\"1.2s\"\n begin=\"0.35s\"\n calcMode=\"linear\"\n fill=\"freeze\"\n />\n )}\n </ellipse>\n </svg>\n\n <div className={className.content}>\n <div className={className.textCtn}>\n <span id={titleId} className=\"upgrade-banner-title text-[var(--color-white)]\">\n {title}\n </span>\n <span id={descriptionId} className=\"upgrade-banner-description text-[var(--color-white)]\">\n {description}\n </span>\n </div>\n <Button\n type=\"secondary\"\n theme=\"blue\"\n size=\"sm\"\n label={buttonLabel}\n iconProps={buttonIconProps}\n onClick={onButtonClick}\n className=\"shrink-0 !gap-[6px] !py-[10px] !px-[20px]\"\n />\n </div>\n\n {onClose && showCloseButton && (\n <div className={className.closeBtn}>\n <Icon name=\"close\" size={16} stroke=\"var(--color-white)\" onClick={onClose} ariaLabel=\"Dismiss\" />\n </div>\n )}\n\n {onClose && (\n <span className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {showCloseButton ? \"Dismiss button available.\" : \"\"}\n </span>\n )}\n </div>\n );\n};\n\nexport default UpgradeBanner;\n"],"names":["className","bannerCtn","content","textCtn","closeBtn","RING_LAYERS","key","rx","ry","opacity","FILL_RADIUS","VIEWBOX_WIDTH","RIPPLE_REST_CX","FILL_ANIMATION_END_MS","UpgradeBanner","bannerClassName","title","description","buttonLabel","buttonIconProps","name","onButtonClick","onClose","playAnimation","onAnimationComplete","automationId","titleId","useStableId","descriptionId","regionAttributes","getRegionAttributes","reduceMotion","setReduceMotion","useState","showCloseButton","setShowCloseButton","animationRunId","setAnimationRunId","useEffect","query","window","matchMedia","matches","handleChange","event","addEventListener","removeEventListener","id","showStatic","timer","setTimeout","clearTimeout","React","createElement","_extends","viewBox","preserveAspectRatio","map","ring","index","restCx","fromCx","cx","cy","attributeName","from","to","dur","begin","calcMode","fill","Button","type","theme","size","label","iconProps","onClick","Icon","stroke","ariaLabel","role"],"mappings":";;;;;;;;;;;;;;;;AAoCA,MAAMA,IAAiB;AAAA,EACrBC,WACE;AAAA,EACFC,SAAS;AAAA,EACTC,SAAS;AAAA,EACTC,UAAU;AACZ,GAEMC,IAAc,CAClB;AAAA,EAAEC,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAOC,SAAS;AAAI,GAClD;AAAA,EAAEH,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAKC,SAAS;AAAI,GAChD;AAAA,EAAEH,KAAK;AAAA,EAAUC,IAAI;AAAA,EAAKC,IAAI;AAAA,EAAOC,SAAS;AAAE,CAAC,GAG7CC,IAAc,MACdC,IAAgB,KAChBC,IAAiBD,IAAgB,KACjCE,IAAwB,MAEjBC,IAAwCA,CAAC;AAAA,EACpDC,iBAAAA,IAAkB;AAAA,EAClBC,OAAAA,IAAQ;AAAA,EACRC,aAAAA,IAAc;AAAA,EACdC,aAAAA,IAAc;AAAA,EACdC,iBAAAA,IAAkB;AAAA,IAAEC,MAAM;AAAA,EAAA;AAAA,EAC1BC,eAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,qBAAAA;AAAAA,EACAC,cAAAA;AACF,MAAM;AACJ,QAAMC,IAAUC,EAAAA,GACVC,IAAgBD,EAAAA,GAChBE,IAAmBC,EAAoB;AAAA,IAAEJ,SAAAA;AAAAA,IAASE,eAAAA;AAAAA,EAAAA,CAAe,GAEjE,CAACG,GAAcC,CAAe,IAAIC,EAAS,EAAK,GAChD,CAACC,GAAiBC,CAAkB,IAAIF,EAAS,EAAK,GACtD,CAACG,GAAgBC,CAAiB,IAAIJ,EAAS,CAAC;AAEtDK,EAAAA,EAAU,MAAM;AACd,UAAMC,IAAQC,OAAOC,WAAW,kCAAkC;AAClET,IA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,IACP0D,WAAWzD;AAAAA,IACX0D,SAASxD;AAAAA,IACTrB,WAAU;AAAA,EAAA,CACX,CACE,GAEJsB,KAAWY,KACVkB,gBAAAA,EAAAC,cAAA,OAAA;AAAA,IAAKrD,WAAWA,EAAUI;AAAAA,EAAAA,GACxBgD,gBAAAA,EAAAC,cAACyB,GAAI;AAAA,IAAC1D,MAAK;AAAA,IAAQsD,MAAM;AAAA,IAAIK,QAAO;AAAA,IAAqBF,SAASvD;AAAAA,IAAS0D,WAAU;AAAA,EAAA,CAAW,CAC7F,GAGN1D,KACC8B,gBAAAA,EAAAC,cAAA,QAAA;AAAA,IAAMrD,WAAU;AAAA,IAAUiF,MAAK;AAAA,IAAS,aAAU;AAAA,EAAA,GAC/C/C,IAAkB,8BAA8B,EAC7C,CAEL;AAET;"}
package/dist/index45.js CHANGED
@@ -110,6 +110,7 @@ const f = {
110
110
  }));
111
111
  };
112
112
  export {
113
- U as MessageBar
113
+ U as MessageBar,
114
+ U as default
114
115
  };
115
116
  //# sourceMappingURL=index45.js.map
package/dist/index61.js CHANGED
@@ -1,4 +1,4 @@
1
- import a from "react";
1
+ import t from "react";
2
2
  /* empty css */
3
3
  const n = ({
4
4
  element: e,
@@ -15,12 +15,12 @@ const n = ({
15
15
  "--shimmer-base-color": s,
16
16
  "--shimmer-highlight-color": m
17
17
  }, r = `se-design-shimmer-element se-design-shimmer-${e.type}`;
18
- return /* @__PURE__ */ a.createElement("div", {
18
+ return /* @__PURE__ */ t.createElement("div", {
19
19
  className: r,
20
20
  style: i
21
- }, e.children && e.children.map((t, p) => /* @__PURE__ */ a.createElement(n, {
21
+ }, e.children && e.children.map((a, p) => /* @__PURE__ */ t.createElement(n, {
22
22
  key: p,
23
- element: t,
23
+ element: a,
24
24
  animationDuration: d,
25
25
  baseColor: s,
26
26
  highlightColor: m
@@ -40,48 +40,48 @@ const n = ({
40
40
  alignItems: e.alignItems,
41
41
  flex: e.flex
42
42
  };
43
- return /* @__PURE__ */ a.createElement("div", {
43
+ return /* @__PURE__ */ t.createElement("div", {
44
44
  className: `se-design-shimmer-container ${e.className || ""}`,
45
45
  style: i
46
- }, e.children.map((r, t) => r.type === "container" ? /* @__PURE__ */ a.createElement(y, {
47
- key: t,
46
+ }, e.children.map((r, a) => r.type === "container" ? /* @__PURE__ */ t.createElement(y, {
47
+ key: a,
48
48
  container: r,
49
49
  animationDuration: d,
50
50
  baseColor: s,
51
51
  highlightColor: m
52
- }) : /* @__PURE__ */ a.createElement(n, {
53
- key: t,
52
+ }) : /* @__PURE__ */ t.createElement(n, {
53
+ key: a,
54
54
  element: r,
55
55
  animationDuration: d,
56
56
  baseColor: s,
57
57
  highlightColor: m
58
58
  })));
59
- }, g = ({
59
+ }, l = ({
60
60
  structure: e,
61
61
  className: d = "",
62
62
  animationDuration: s = 3,
63
63
  baseColor: m = "var(--color-gray-700)",
64
64
  highlightColor: i = "var(--color-gray-600)",
65
65
  width: r,
66
- height: t
66
+ height: a
67
67
  }) => {
68
68
  const p = {
69
69
  width: r ? typeof r == "number" ? `${r}px` : r : "100%",
70
- height: t ? typeof t == "number" ? `${t}px` : t : "auto",
70
+ height: a ? typeof a == "number" ? `${a}px` : a : "auto",
71
71
  "--shimmer-duration": `${s}s`,
72
72
  "--shimmer-base-color": m,
73
73
  "--shimmer-highlight-color": i
74
74
  };
75
- return /* @__PURE__ */ a.createElement("div", {
75
+ return /* @__PURE__ */ t.createElement("div", {
76
76
  className: `se-design-shimmer-loader ${d}`,
77
77
  style: p
78
- }, e.map((c, o) => c.type === "container" ? /* @__PURE__ */ a.createElement(y, {
78
+ }, e.map((c, o) => c.type === "container" ? /* @__PURE__ */ t.createElement(y, {
79
79
  key: o,
80
80
  container: c,
81
81
  animationDuration: s,
82
82
  baseColor: m,
83
83
  highlightColor: i
84
- }) : /* @__PURE__ */ a.createElement(n, {
84
+ }) : /* @__PURE__ */ t.createElement(n, {
85
85
  key: o,
86
86
  element: c,
87
87
  animationDuration: s,
@@ -90,6 +90,7 @@ const n = ({
90
90
  })));
91
91
  };
92
92
  export {
93
- g as ShimmerLoader
93
+ l as ShimmerLoader,
94
+ l as default
94
95
  };
95
96
  //# sourceMappingURL=index61.js.map
package/dist/index7.js CHANGED
@@ -1,11 +1,11 @@
1
- import c, { useState as h, useCallback as i } from "react";
1
+ import s, { 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: r = ""
6
+ className: c = ""
7
7
  }) => {
8
- const [s, u] = h(n), l = i(() => {
8
+ const [r, 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__ */ 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}`,
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}`,
35
35
  onFocus: a
36
- }, s.map((t) => /* @__PURE__ */ c.createElement("a", {
36
+ }, r.map((t) => /* @__PURE__ */ s.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,6 +43,7 @@ const x = ({
43
43
  }, t.label)));
44
44
  };
45
45
  export {
46
- x as SkipLinksBar
46
+ x as SkipLinksBar,
47
+ x as default
47
48
  };
48
49
  //# sourceMappingURL=index7.js.map
package/dist/index71.js CHANGED
@@ -142,6 +142,7 @@ const K = {
142
142
  }));
143
143
  };
144
144
  export {
145
- ea as Paywall
145
+ ea as Paywall,
146
+ ea as default
146
147
  };
147
148
  //# sourceMappingURL=index71.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "se-design",
3
- "version": "1.1.0",
3
+ "version": "1.1.1-dev-01",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "exports": {