welcome-ui 7.0.1 → 7.1.0
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/{CustomInput-Cewo45Hd.mjs → CustomInput-BqaOGHm4.mjs} +1 -1
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.mjs +1 -1
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Search.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/TimePicker.mjs +1 -1
- package/dist/{downshift.esm-BOfUfcgd.mjs → downshift.esm-CEHW4VDy.mjs} +1 -1
- package/package.json +6 -6
- package/dist/AXB53BZF-KWM2jKTz.js +0 -1
- package/dist/Accordion.js +0 -75
- package/dist/Alert.js +0 -37
- package/dist/AspectRatio.js +0 -29
- package/dist/Avatar.js +0 -5
- package/dist/BYC7LY2E-BkAEL2VD.js +0 -1
- package/dist/Badge.js +0 -17
- package/dist/Box.js +0 -1
- package/dist/Breadcrumb.js +0 -54
- package/dist/Button.js +0 -78
- package/dist/ButtonGroup.js +0 -32
- package/dist/Card.js +0 -17
- package/dist/Checkbox.js +0 -1
- package/dist/ClearButton.js +0 -14
- package/dist/CloseButton.js +0 -6
- package/dist/CustomInput-DVH2rh9-.js +0 -1070
- package/dist/DatePicker.js +0 -1
- package/dist/DateTimePicker.js +0 -38
- package/dist/DateTimePickerCommon.js +0 -1
- package/dist/Drawer.js +0 -64
- package/dist/DropdownMenu.js +0 -45
- package/dist/Field.js +0 -72
- package/dist/FieldGroup.js +0 -13
- package/dist/FileDrop.js +0 -46
- package/dist/FileUpload.js +0 -3
- package/dist/Files.js +0 -1
- package/dist/Flex.js +0 -1
- package/dist/Grid.js +0 -1
- package/dist/Hint.js +0 -8
- package/dist/ITI7HKP4-BPa8qpnl.js +0 -1
- package/dist/Icon.js +0 -17
- package/dist/Icons.js +0 -40
- package/dist/IconsFont.js +0 -17
- package/dist/InputText.js +0 -8
- package/dist/JC64G2H7-YkBMNrtl.js +0 -1
- package/dist/KUU7WJ55-DN8gk6_R.js +0 -1
- package/dist/LVA2YJMS-B2HZjIhJ.js +0 -14
- package/dist/Label.js +0 -35
- package/dist/Link.js +0 -43
- package/dist/Loader.js +0 -30
- package/dist/Logo.js +0 -3
- package/dist/MTZPJQMC-5Xg78Uyy.js +0 -1
- package/dist/Modal.js +0 -181
- package/dist/NLEBE274-DvH3XTTw.js +0 -1
- package/dist/P2CTZE2T-q8vyaGc0.js +0 -1
- package/dist/P4IRICAX-nhgZ26A1.js +0 -1
- package/dist/Pagination.js +0 -46
- package/dist/PasswordInput.js +0 -1
- package/dist/Picker.js +0 -8
- package/dist/Popover.js +0 -31
- package/dist/QYJ6MIDR-CRK3satR.js +0 -1
- package/dist/Radio.js +0 -60
- package/dist/RadioGroup.js +0 -8
- package/dist/RadioTab.js +0 -61
- package/dist/SYRFVSLH-BpAfr7UE.js +0 -1
- package/dist/Search.js +0 -70
- package/dist/Select.js +0 -122
- package/dist/Shape.js +0 -23
- package/dist/Slider.js +0 -190
- package/dist/Stack.js +0 -1
- package/dist/Swiper.js +0 -141
- package/dist/System.js +0 -1
- package/dist/Table.js +0 -55
- package/dist/Tabs.js +0 -82
- package/dist/Tag.js +0 -78
- package/dist/Text.js +0 -46
- package/dist/Textarea.js +0 -6
- package/dist/TimePicker.js +0 -4
- package/dist/Toast.js +0 -42
- package/dist/Toggle.js +0 -75
- package/dist/Tooltip.js +0 -68
- package/dist/UniversalLink.js +0 -4
- package/dist/VEVQD5MH-mN1wMozH.js +0 -1
- package/dist/VGCJ63VH-BNLwLOaC.js +0 -1
- package/dist/VariantIcon.js +0 -8
- package/dist/WelcomeLoader.js +0 -11
- package/dist/WuiProvider.js +0 -407
- package/dist/X5NMLKT6-BzhcQu_I.js +0 -1
- package/dist/YV4JVR4I-DIthYWMj.js +0 -15
- package/dist/_commonjsHelpers-DvH0V_XJ.js +0 -1
- package/dist/create-event-YSlay9Ef.js +0 -1
- package/dist/downshift.esm-dvOEflhK.js +0 -1
- package/dist/field-styles-DYEc1l_A.js +0 -63
- package/dist/format-bytes-drUpnBnQ.js +0 -1
- package/dist/get-max-width-height-CDLBnp_J.js +0 -1
- package/dist/hex-to-rgba-cCYXRc5D.js +0 -1
- package/dist/hide-focus-rings-root-DGU4Klq5.js +0 -5
- package/dist/index-23RJrN0D.js +0 -1
- package/dist/index-BAD1dszB.js +0 -1
- package/dist/index-BHi0wohR.js +0 -142
- package/dist/index-BJzGkA7x.js +0 -1
- package/dist/index-BLom3M2B.js +0 -2
- package/dist/index-BNwz4P5j.js +0 -1
- package/dist/index-BPeIa2mR.js +0 -1
- package/dist/index-C1FV1q-F.js +0 -1
- package/dist/index-CxDKPhvU.js +0 -1
- package/dist/index-D6MJAN7T.js +0 -1
- package/dist/index-DTx8atxB.js +0 -1
- package/dist/index-Db47iJVz.js +0 -1
- package/dist/index-Dn-QEAu6.js +0 -56
- package/dist/index-_wqLxu7x.js +0 -1
- package/dist/overflow-ellipsis-C2ESrF8C.js +0 -5
- package/dist/radio-group-BpImAAmy.js +0 -1
- package/dist/theme.js +0 -18
- package/dist/throttle-BB1Y3bfD.js +0 -1
- package/dist/use-fork-ref-Bjf1e56Z.js +0 -1
- package/dist/use-isomorphic-layout-effect-C1_Gy5Nu.js +0 -1
- package/dist/use-viewport-BDDjd1nl.js +0 -1
- package/dist/utils.js +0 -1
- package/dist/wrap-children-BLDjJiiy.js +0 -1
|
@@ -9,7 +9,7 @@ import { StyledSelect as yo, Select as gn } from "./Select.mjs";
|
|
|
9
9
|
import { StyledButton as wo, Button as yn } from "./Button.mjs";
|
|
10
10
|
import vt, { css as gt, system as ca, th as Ht } from "@xstyled/styled-components";
|
|
11
11
|
import { d as ua, F as bo } from "./field-styles-DLIhqG_8.mjs";
|
|
12
|
-
import { _ as _o, a as x } from "./downshift.esm-
|
|
12
|
+
import { _ as _o, a as x } from "./downshift.esm-CEHW4VDy.mjs";
|
|
13
13
|
import { r as la, a as ko } from "./index-BYdkhqH4.mjs";
|
|
14
14
|
import { IconGroupWrapper as pa, IconWrapper as da } from "./Field.mjs";
|
|
15
15
|
import { shouldForwardProp as Do } from "./System.mjs";
|
package/dist/DatePicker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import d, { useState as R, useRef as w, useEffect as I } from "react";
|
|
3
3
|
import { forwardRef as G } from "./System.mjs";
|
|
4
|
-
import { S as J, c as Q, b as V, C as W, D as P, g as X } from "./CustomInput-
|
|
4
|
+
import { S as J, c as Q, b as V, C as W, D as P, g as X } from "./CustomInput-BqaOGHm4.mjs";
|
|
5
5
|
const Z = G(
|
|
6
6
|
({
|
|
7
7
|
autoFocus: S,
|
package/dist/DateTimePicker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import r, { Children as p, useState as E, useEffect as P, cloneElement as $ } from "react";
|
|
3
3
|
import x, { css as _, system as b } from "@xstyled/styled-components";
|
|
4
|
-
import { S as w, a as h, D as S, g as A } from "./CustomInput-
|
|
4
|
+
import { S as w, a as h, D as S, g as A } from "./CustomInput-BqaOGHm4.mjs";
|
|
5
5
|
import { DatePicker as N } from "./DatePicker.mjs";
|
|
6
6
|
import { TimePicker as R } from "./TimePicker.mjs";
|
|
7
7
|
import { forwardRef as C } from "./System.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as a, c as t, b as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomInput-
|
|
2
|
+
import { C as a, c as t, b as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomInput-BqaOGHm4.mjs";
|
|
3
3
|
export {
|
|
4
4
|
a as CustomHeader,
|
|
5
5
|
t as CustomInput,
|
package/dist/Search.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import t, { useState as me, useCallback as pe, useMemo as fe, Fragment as ue } from "react";
|
|
3
|
-
import { D as H } from "./downshift.esm-
|
|
3
|
+
import { D as H } from "./downshift.esm-CEHW4VDy.mjs";
|
|
4
4
|
import { c as he } from "./create-event-rXDe5aCQ.mjs";
|
|
5
5
|
import { d as ge, F as Ee } from "./field-styles-DLIhqG_8.mjs";
|
|
6
6
|
import { t as $e } from "./throttle-BDBzFeFj.mjs";
|
package/dist/Select.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import m, { useMemo as Ze, useState as P, useEffect as he, Fragment as Qe } from "react";
|
|
3
|
-
import { D as pe } from "./downshift.esm-
|
|
3
|
+
import { D as pe } from "./downshift.esm-CEHW4VDy.mjs";
|
|
4
4
|
import { g as Xe } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
5
5
|
import { c as Ge } from "./create-event-rXDe5aCQ.mjs";
|
|
6
6
|
import { d as Je, F as qe } from "./field-styles-DLIhqG_8.mjs";
|
package/dist/TimePicker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import c, { useState as T, useEffect as E } from "react";
|
|
3
3
|
import M from "@xstyled/styled-components";
|
|
4
|
-
import { f as Y, a as w, c as I, b as L, D as O, g as U } from "./CustomInput-
|
|
4
|
+
import { f as Y, a as w, c as I, b as L, D as O, g as U } from "./CustomInput-BqaOGHm4.mjs";
|
|
5
5
|
import { forwardRef as W } from "./System.mjs";
|
|
6
6
|
const $ = M.div`
|
|
7
7
|
position: relative;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "welcome-ui",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Customizable design system with react • styled-components • styled-system and ariakit.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
"./theme": {
|
|
11
11
|
"types": "./dist/types/theme/index.d.ts",
|
|
12
12
|
"import": "./dist/theme.mjs",
|
|
13
|
-
"require": "./dist/theme.
|
|
13
|
+
"require": "./dist/theme.mjs"
|
|
14
14
|
},
|
|
15
15
|
"./utils": {
|
|
16
16
|
"types": "./dist/types/utils/index.d.ts",
|
|
17
17
|
"import": "./dist/utils.mjs",
|
|
18
|
-
"require": "./dist/utils.
|
|
18
|
+
"require": "./dist/utils.mjs"
|
|
19
19
|
},
|
|
20
20
|
"./*": {
|
|
21
21
|
"types": "./dist/types/components/*/index.d.ts",
|
|
22
22
|
"import": "./dist/*.mjs",
|
|
23
|
-
"require": "./dist/*.
|
|
23
|
+
"require": "./dist/*.mjs"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
"@babel/eslint-parser": "^7.25.1",
|
|
72
72
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
73
73
|
"@babel/plugin-proposal-optional-chaining": "7.21.0",
|
|
74
|
-
"@babel/plugin-transform-modules-commonjs": "7.
|
|
74
|
+
"@babel/plugin-transform-modules-commonjs": "7.26.3",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.25.4",
|
|
76
76
|
"@babel/preset-env": "^7.26.0",
|
|
77
77
|
"@babel/preset-react": "^7.26.3",
|
|
78
78
|
"@babel/preset-typescript": "^7.22.11",
|
|
79
79
|
"@testing-library/dom": "^10.4.0",
|
|
80
80
|
"@testing-library/jest-dom": "^6.6.3",
|
|
81
|
-
"@testing-library/react": "^16.0
|
|
81
|
+
"@testing-library/react": "^16.2.0",
|
|
82
82
|
"@testing-library/user-event": "^14.5.2",
|
|
83
83
|
"@types/jest": "^29.5.13",
|
|
84
84
|
"@types/lodash.capitalize": "^4.2.9",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const c=require("./P4IRICAX-nhgZ26A1.js"),l=require("./VGCJ63VH-BNLwLOaC.js"),e=require("./LVA2YJMS-B2HZjIhJ.js");var D="button",i=e.createHook(function(t){var s=t,{store:o}=s,r=e.__objRest(s,["store"]);const n=l.useDialogProviderContext();o=o||n,e.invariant(o,process.env.NODE_ENV!=="production"&&"DialogDisclosure must receive a `store` prop or be wrapped in a DialogProvider component.");const u=o.useState("contentElement");return r=e.__spreadValues({"aria-haspopup":e.getPopupRole(u,"dialog")},r),r=c.useDisclosure(e.__spreadValues({store:o},r)),r}),p=e.forwardRef2(function(t){const s=i(t);return e.createElement(D,s)});exports.DialogDisclosure=p;exports.useDialogDisclosure=i;
|
package/dist/Accordion.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("@xstyled/styled-components"),u=require("./P4IRICAX-nhgZ26A1.js"),c=require("./VGCJ63VH-BNLwLOaC.js");require("./Icon.js");const m=require("./index-BNwz4P5j.js"),p=require("./System.js"),g=e.div`
|
|
2
|
-
${e.th("accordions.wrapper")};
|
|
3
|
-
${e.system};
|
|
4
|
-
transition: medium;
|
|
5
|
-
|
|
6
|
-
&:hover {
|
|
7
|
-
border-color: neutral-50;
|
|
8
|
-
}
|
|
9
|
-
`,r=e.divBox`
|
|
10
|
-
flex-shrink: 0;
|
|
11
|
-
${e.th("accordions.icon")};
|
|
12
|
-
transform: rotate3d(0);
|
|
13
|
-
transition: medium;
|
|
14
|
-
width: 24;
|
|
15
|
-
height: 24;
|
|
16
|
-
color: inherit;
|
|
17
|
-
display: flex;
|
|
18
|
-
border-radius: 12;
|
|
19
|
-
|
|
20
|
-
& *:first-child {
|
|
21
|
-
margin: auto;
|
|
22
|
-
}
|
|
23
|
-
`,f=e(u.Disclosure)`
|
|
24
|
-
${e.th("accordions.title")};
|
|
25
|
-
width: 100%;
|
|
26
|
-
padding: ${e.th("accordions.padding")};
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
border: 0;
|
|
29
|
-
display: flex;
|
|
30
|
-
justify-content: space-between;
|
|
31
|
-
align-items: center;
|
|
32
|
-
gap: xxl;
|
|
33
|
-
|
|
34
|
-
&[aria-expanded='true'] {
|
|
35
|
-
${r} {
|
|
36
|
-
transform: rotate3d(0, 0, 1, 90deg);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:focus,
|
|
41
|
-
&:hover {
|
|
42
|
-
cursor: pointer;
|
|
43
|
-
${r} {
|
|
44
|
-
background-color: neutral-30;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:focus {
|
|
49
|
-
outline: 0;
|
|
50
|
-
${r} {
|
|
51
|
-
color: inherit;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
`,h=e(c.DisclosureContent)`
|
|
55
|
-
display: grid;
|
|
56
|
-
grid-template-rows: 0fr;
|
|
57
|
-
transition-property: grid-template-rows;
|
|
58
|
-
transition-timing-function: linear;
|
|
59
|
-
transition-duration: 200ms;
|
|
60
|
-
animation-duration: 200ms;
|
|
61
|
-
|
|
62
|
-
> * {
|
|
63
|
-
overflow: hidden;
|
|
64
|
-
padding: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&[data-enter] {
|
|
68
|
-
grid-template-rows: 1fr;
|
|
69
|
-
}
|
|
70
|
-
`,$=e.div`
|
|
71
|
-
${e.th("accordions.content")};
|
|
72
|
-
padding: ${e.th("accordions.padding")};
|
|
73
|
-
padding-top: 0;
|
|
74
|
-
color: neutral-70;
|
|
75
|
-
`,y=p.forwardRef(({children:o,dataTestId:n,icon:d=t.createElement(m.RightIcon,null),store:i,title:a,...s},l)=>t.createElement(g,{"data-testid":n,ref:l,...s},t.createElement(f,{"data-testid":n?`${n}-title`:void 0,store:i},a,t.createElement(r,null,t.cloneElement(d,{size:"sm"}))),t.createElement(h,{"data-testid":n?`${n}-content`:void 0,store:i},t.createElement("div",null,t.createElement($,null,o)))));function w(o){return c.useDisclosureStore({animated:!0,...o})}exports.Accordion=y;exports.useAccordion=w;
|
package/dist/Alert.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("@xstyled/styled-components"),v=require("./Text.js"),I=require("./VariantIcon.js"),T=require("./CloseButton.js"),x=require("./Button.js"),f=require("./System.js"),u=require("./Box.js"),m=t.divBox`
|
|
2
|
-
flex: 1;
|
|
3
|
-
`,y=t(I.VariantIcon)`
|
|
4
|
-
position: absolute;
|
|
5
|
-
align-self: flex-start;
|
|
6
|
-
`,R=t.divBox(({icon:r,isFullWidth:o,size:s,variant:a})=>t.css`
|
|
7
|
-
position: relative;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: flex-start;
|
|
10
|
-
width: 100%;
|
|
11
|
-
max-width: ${o?"100%":"max-content"};
|
|
12
|
-
${t.th("alerts.default")};
|
|
13
|
-
${t.th(`alerts.${a}`)};
|
|
14
|
-
${t.th(`alerts.sizes.${s}`)};
|
|
15
|
-
${t.system};
|
|
16
|
-
|
|
17
|
-
${r!==null&&s==="sm"&&t.css`
|
|
18
|
-
${m} {
|
|
19
|
-
margin-left: calc(${t.th("icons.sm")} + ${t.th("space.md")});
|
|
20
|
-
}
|
|
21
|
-
`}
|
|
22
|
-
|
|
23
|
-
${r!==null&&s==="md"&&t.css`
|
|
24
|
-
${m} {
|
|
25
|
-
margin-left: calc(${t.th("icons.md")} + ${t.th("space.lg")});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
${y} {
|
|
29
|
-
margin-top: -3;
|
|
30
|
-
}
|
|
31
|
-
`}
|
|
32
|
-
`),V=t(v.Text)(({variant:r})=>t.css`
|
|
33
|
-
font-weight: medium;
|
|
34
|
-
${t.th("alerts.title.default")};
|
|
35
|
-
${t.th(`alerts.title.sizes.${r}`)};
|
|
36
|
-
${t.system};
|
|
37
|
-
`),g=({children:r,dataTestId:o,variant:s})=>e.createElement(V,{"data-testid":o,variant:s},r),j=f.forwardRef(({children:r,cta:o,dataTestId:s,handleClose:a,icon:c,isFullWidth:w,size:l="sm",variant:i="default",...b},h)=>{const q=s?`${s}-close-button`:void 0,A=i==="beige"?"default":i,C=e.Children.toArray(r).map(n=>n.type===g?e.cloneElement(n,{variant:l}):n),p=n=>{var $;if(n){if(n.type===B)return e.cloneElement(n,{size:l});if(n.type===E)return e.cloneElement(n,{size:l});if(($=n.props)!=null&&$.children)return e.cloneElement(n,{...n.props,children:e.Children.map(n.props.children,S=>p(S))})}return n},d=e.isValidElement(o)?p(o):o;return e.createElement(R,{"data-testid":s,icon:c,isFullWidth:w,ref:h,size:l,variant:i,...b},!!a&&e.createElement(T.CloseButton,{dataTestId:q,onClick:a,position:"absolute",right:"sm",size:"xs",top:"sm"}),c!==null&&e.createElement(y,{icon:c,size:l,variant:A}),e.createElement(m,null,e.createElement(u.Box,{alignItems:"flex-start",display:"flex",flexDirection:"column",gap:"md",justifyContent:"space-between"},e.createElement(u.Box,{flex:1},C),!!d&&e.createElement(u.Box,{alignItems:"center",display:"flex",gap:"sm"},d))))}),B=f.forwardRef((r,o)=>e.createElement(x.Button,{flexShrink:0,ref:o,w:"fit-content",...r,variant:"secondary"})),E=f.forwardRef((r,o)=>e.createElement(x.Button,{flexShrink:0,ref:o,w:"fit-content",...r,variant:"tertiary"})),k=Object.assign(j,{Title:g,Button:B,SecondaryButton:E});exports.Alert=k;
|
package/dist/AspectRatio.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("@xstyled/styled-components"),r=require("./System.js"),n=t.divBox(({ratio:e})=>t.css`
|
|
2
|
-
position: relative;
|
|
3
|
-
|
|
4
|
-
& > * {
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
position: absolute;
|
|
7
|
-
top: 0;
|
|
8
|
-
right: 0;
|
|
9
|
-
bottom: 0;
|
|
10
|
-
left: 0;
|
|
11
|
-
display: flex;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
align-items: center;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
& > img,
|
|
19
|
-
& > video {
|
|
20
|
-
object-fit: cover;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&:before {
|
|
24
|
-
height: 0;
|
|
25
|
-
content: '';
|
|
26
|
-
display: block;
|
|
27
|
-
padding-bottom: ${1/e*100}%;
|
|
28
|
-
}
|
|
29
|
-
`),o=r.forwardRef(({ratio:e=4/3,...i},s)=>c.createElement(n,{ratio:e,ref:s,...i}));o.displayName="AspectRatio";exports.AspectRatio=o;
|
package/dist/Avatar.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),s=require("@xstyled/styled-components"),y=require("./Shape.js"),x=require("./Text.js"),S=require("./System.js"),b=require("./Box.js");function q(o,e=""){const t=Object.keys(o).filter(r=>r.startsWith("secondary-")),n=e.length%t.length;return t[n]}function A(o=""){const[e,t]=o.split(" ");return e&&t?`${e.charAt(0).toUpperCase()}${t.charAt(0).toUpperCase()}`:e.substring(0,2).toUpperCase()}const C=s(y.Shape)`
|
|
2
|
-
flex-shrink: 0;
|
|
3
|
-
`,$=s(x.Text)`
|
|
4
|
-
${s.th("avatars.text")};
|
|
5
|
-
`,h=a.memo(S.forwardRef(({color:o,fontSize:e,getInitials:t=A,h:n,name:r,shape:m="circle",size:g="md",src:c,w:i,...d},p)=>{const l=s.useTheme(),f=o||q(l.colors,r),u=l.avatars.sizes[g],v=e||`calc(${i?l.toRem(i):u} / 2.5)`;return a.createElement(C,{"aria-label":r,backgroundColor:f,h:n||u,ref:p,role:"img",shape:m,w:i||u,...d},c&&a.createElement("img",{alt:r,src:c}),!c&&a.createElement(b.Box,null,a.createElement($,{fontSize:v,m:0},t(r))))}));h.displayName="Avatar";exports.Avatar=h;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";const de=require("./JC64G2H7-YkBMNrtl.js"),D=require("./YV4JVR4I-DIthYWMj.js"),c=require("./LVA2YJMS-B2HZjIhJ.js"),ce=require("./MTZPJQMC-5Xg78Uyy.js"),C=require("react");function Je(e={}){var n=e,{popover:o}=n,t=c.__objRest$1(n,["popover"]);const i=D.mergeStore(t.store,D.omit2(o,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"]));D.throwOnConflictingProps(t,i);const r=i==null?void 0:i.getState(),u=de.createDialogStore(c.__spreadProps$1(c.__spreadValues$1({},t),{store:i})),a=c.defaultValue(t.placement,r==null?void 0:r.placement,"bottom"),l=c.__spreadProps$1(c.__spreadValues$1({},u.getState()),{placement:a,currentPlacement:a,anchorElement:c.defaultValue(r==null?void 0:r.anchorElement,null),popoverElement:c.defaultValue(r==null?void 0:r.popoverElement,null),arrowElement:c.defaultValue(r==null?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),s=D.createStore(l,u,i);return c.__spreadProps$1(c.__spreadValues$1(c.__spreadValues$1({},u),s),{setAnchorElement:d=>s.setState("anchorElement",d),setPopoverElement:d=>s.setState("popoverElement",d),setArrowElement:d=>s.setState("arrowElement",d),render:()=>s.setState("rendered",Symbol("rendered"))})}function Ue(e,n,o){return c.useUpdateEffect(n,[o.popover]),D.useStoreProps(e,o,"placement"),de.useDialogStoreProps(e,n,o)}function gt(e={}){const[n,o]=D.useStore(Je,e);return Ue(n,o,e)}function ue(e){return e.split("-")[1]}function Te(e){return e==="y"?"height":"width"}function q(e){return e.split("-")[0]}function ee(e){return["top","bottom"].includes(q(e))?"x":"y"}function ke(e,n,o){let{reference:t,floating:i}=e;const r=t.x+t.width/2-i.width/2,u=t.y+t.height/2-i.height/2,a=ee(n),l=Te(a),s=t[l]/2-i[l]/2,d=a==="x";let f;switch(q(n)){case"top":f={x:r,y:t.y-i.height};break;case"bottom":f={x:r,y:t.y+t.height};break;case"right":f={x:t.x+t.width,y:u};break;case"left":f={x:t.x-i.width,y:u};break;default:f={x:t.x,y:t.y}}switch(ue(n)){case"start":f[a]-=s*(o&&d?-1:1);break;case"end":f[a]+=s*(o&&d?-1:1)}return f}const vt=async(e,n,o)=>{const{placement:t="bottom",strategy:i="absolute",middleware:r=[],platform:u}=o,a=r.filter(Boolean),l=await(u.isRTL==null?void 0:u.isRTL(n));let s=await u.getElementRects({reference:e,floating:n,strategy:i}),{x:d,y:f}=ke(s,t,l),h=t,m={},p=0;for(let g=0;g<a.length;g++){const{name:v,fn:x}=a[g],{x:w,y:b,data:E,reset:y}=await x({x:d,y:f,initialPlacement:t,placement:h,strategy:i,middlewareData:m,rects:s,platform:u,elements:{reference:e,floating:n}});d=w??d,f=b??f,m={...m,[v]:{...m[v],...E}},y&&p<=50&&(p++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(s=y.rects===!0?await u.getElementRects({reference:e,floating:n,strategy:i}):y.rects),{x:d,y:f}=ke(s,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:m}};function X(e,n){return typeof e=="function"?e(n):e}function Ze(e){return typeof e!="number"?function(n){return{top:0,right:0,bottom:0,left:0,...n}}(e):{top:e,right:e,bottom:e,left:e}}function xe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function $e(e,n){var o;n===void 0&&(n={});const{x:t,y:i,platform:r,rects:u,elements:a,strategy:l}=e,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=X(n,e),p=Ze(m),g=a[h?f==="floating"?"reference":"floating":f],v=xe(await r.getClippingRect({element:(o=await(r.isElement==null?void 0:r.isElement(g)))==null||o?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:s,rootBoundary:d,strategy:l})),x=f==="floating"?{...u.floating,x:t,y:i}:u.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),b=await(r.isElement==null?void 0:r.isElement(w))&&await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1},E=xe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:w,strategy:l}):x);return{top:(v.top-E.top+p.top)/b.y,bottom:(E.bottom-v.bottom+p.bottom)/b.y,left:(v.left-E.left+p.left)/b.x,right:(E.right-v.right+p.right)/b.x}}const ae=Math.min,Z=Math.max;function _e(e,n,o){return Z(e,ae(n,o))}const xt=e=>({name:"arrow",options:e,async fn(n){const{x:o,y:t,placement:i,rects:r,platform:u,elements:a}=n,{element:l,padding:s=0}=X(e,n)||{};if(l==null)return{};const d=Ze(s),f={x:o,y:t},h=ee(i),m=Te(h),p=await u.getDimensions(l),g=h==="y",v=g?"top":"left",x=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=r.reference[m]+r.reference[h]-f[h]-r.floating[m],E=f[h]-r.reference[h],y=await(u.getOffsetParent==null?void 0:u.getOffsetParent(l));let S=y?y[w]:0;S&&await(u.isElement==null?void 0:u.isElement(y))||(S=a.floating[w]||r.floating[m]);const $=b/2-E/2,H=S/2-p[m]/2-1,L=ae(d[v],H),_=ae(d[x],H),A=L,M=S-p[m]-_,P=S/2-p[m]/2+$,O=_e(A,P,M),R=ue(i)!=null&&P!=O&&r.reference[m]/2-(P<A?L:_)-p[m]/2<0?P<A?A-P:M-P:0;return{[h]:f[h]-R,data:{[h]:O,centerOffset:P-O+R}}}}),wt=["top","right","bottom","left"];wt.reduce((e,n)=>e.concat(n,n+"-start",n+"-end"),[]);const yt={left:"right",right:"left",bottom:"top",top:"bottom"};function we(e){return e.replace(/left|right|bottom|top/g,n=>yt[n])}function Pt(e,n,o){o===void 0&&(o=!1);const t=ue(e),i=ee(e),r=Te(i);let u=i==="x"?t===(o?"end":"start")?"right":"left":t==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(u=we(u)),{main:u,cross:we(u)}}const bt={start:"end",end:"start"};function Se(e){return e.replace(/start|end/g,n=>bt[n])}const Et=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var o;const{placement:t,middlewareData:i,rects:r,initialPlacement:u,platform:a,elements:l}=n,{mainAxis:s=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=X(e,n),v=q(t),x=q(u)===u,w=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=f||(x||!p?[we(u)]:function(A){const M=we(A);return[Se(A),M,Se(M)]}(u));f||m==="none"||b.push(...function(A,M,P,O){const R=ue(A);let T=function(V,k,G){const j=["left","right"],B=["right","left"],U=["top","bottom"],te=["bottom","top"];switch(V){case"top":case"bottom":return G?k?B:j:k?j:B;case"left":case"right":return k?U:te;default:return[]}}(q(A),P==="start",O);return R&&(T=T.map(V=>V+"-"+R),M&&(T=T.concat(T.map(Se)))),T}(u,p,m,w));const E=[u,...b],y=await $e(n,g),S=[];let $=((o=i.flip)==null?void 0:o.overflows)||[];if(s&&S.push(y[v]),d){const{main:A,cross:M}=Pt(t,r,w);S.push(y[A],y[M])}if($=[...$,{placement:t,overflows:S}],!S.every(A=>A<=0)){var H,L;const A=(((H=i.flip)==null?void 0:H.index)||0)+1,M=E[A];if(M)return{data:{index:A,overflows:$},reset:{placement:M}};let P=(L=$.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:L.placement;if(!P)switch(h){case"bestFit":{var _;const O=(_=$.map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,V)=>T+V,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:_[0];O&&(P=O);break}case"initialPlacement":P=u}if(t!==P)return{reset:{placement:P}}}return{}}}},St=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){const{x:o,y:t}=n,i=await async function(r,u){const{placement:a,platform:l,elements:s}=r,d=await(l.isRTL==null?void 0:l.isRTL(s.floating)),f=q(a),h=ue(a),m=ee(a)==="x",p=["left","top"].includes(f)?-1:1,g=d&&m?-1:1,v=X(u,r);let{mainAxis:x,crossAxis:w,alignmentAxis:b}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...v};return h&&typeof b=="number"&&(w=h==="end"?-1*b:b),m?{x:w*g,y:x*p}:{x:x*p,y:w*g}}(n,e);return{x:o+i.x,y:t+i.y,data:i}}}};function Qe(e){return e==="x"?"y":"x"}const Rt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:o,y:t,placement:i}=n,{mainAxis:r=!0,crossAxis:u=!1,limiter:a={fn:v=>{let{x,y:w}=v;return{x,y:w}}},...l}=X(e,n),s={x:o,y:t},d=await $e(n,l),f=ee(q(i)),h=Qe(f);let m=s[f],p=s[h];if(r){const v=f==="y"?"bottom":"right";m=_e(m+d[f==="y"?"top":"left"],m,m-d[v])}if(u){const v=h==="y"?"bottom":"right";p=_e(p+d[h==="y"?"top":"left"],p,p-d[v])}const g=a.fn({...n,[f]:m,[h]:p});return{...g,data:{x:g.x-o,y:g.y-t}}}}},_t=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:o,y:t,placement:i,rects:r,middlewareData:u}=n,{offset:a=0,mainAxis:l=!0,crossAxis:s=!0}=X(e,n),d={x:o,y:t},f=ee(i),h=Qe(f);let m=d[f],p=d[h];const g=X(a,n),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=f==="y"?"height":"width",E=r.reference[f]-r.floating[b]+v.mainAxis,y=r.reference[f]+r.reference[b]-v.mainAxis;m<E?m=E:m>y&&(m=y)}if(s){var x,w;const b=f==="y"?"width":"height",E=["top","left"].includes(q(i)),y=r.reference[h]-r.floating[b]+(E&&((x=u.offset)==null?void 0:x[h])||0)+(E?0:v.crossAxis),S=r.reference[h]+r.reference[b]+(E?0:((w=u.offset)==null?void 0:w[h])||0)-(E?v.crossAxis:0);p<y?p=y:p>S&&(p=S)}return{[f]:m,[h]:p}}}},At=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){const{placement:o,rects:t,platform:i,elements:r}=n,{apply:u=()=>{},...a}=X(e,n),l=await $e(n,a),s=q(o),d=ue(o),f=ee(o)==="x",{width:h,height:m}=t.floating;let p,g;s==="top"||s==="bottom"?(p=s,g=d===(await(i.isRTL==null?void 0:i.isRTL(r.floating))?"start":"end")?"left":"right"):(g=s,p=d==="end"?"top":"bottom");const v=m-l[p],x=h-l[g],w=!n.middlewareData.shift;let b=v,E=x;if(f){const S=h-l.left-l.right;E=d||w?ae(x,S):S}else{const S=m-l.top-l.bottom;b=d||w?ae(v,S):S}if(w&&!d){const S=Z(l.left,0),$=Z(l.right,0),H=Z(l.top,0),L=Z(l.bottom,0);f?E=h-2*(S!==0||$!==0?S+$:Z(l.left,l.right)):b=m-2*(H!==0||L!==0?H+L:Z(l.top,l.bottom))}await u({...n,availableWidth:E,availableHeight:b});const y=await i.getDimensions(r.floating);return h!==y.width||m!==y.height?{reset:{rects:!0}}:{}}}};function F(e){var n;return((n=e.ownerDocument)==null?void 0:n.defaultView)||window}function N(e){return F(e).getComputedStyle(e)}function Ke(e){return e instanceof F(e).Node}function J(e){return Ke(e)?(e.nodeName||"").toLowerCase():"#document"}function W(e){return e instanceof F(e).HTMLElement}function I(e){return e instanceof F(e).Element}function Ne(e){return typeof ShadowRoot<"u"&&(e instanceof F(e).ShadowRoot||e instanceof ShadowRoot)}function fe(e){const{overflow:n,overflowX:o,overflowY:t,display:i}=N(e);return/auto|scroll|overlay|hidden|clip/.test(n+t+o)&&!["inline","contents"].includes(i)}function Ot(e){return["table","td","th"].includes(J(e))}function Ae(e){const n=He(),o=N(e);return o.transform!=="none"||o.perspective!=="none"||!n&&!!o.backdropFilter&&o.backdropFilter!=="none"||!n&&!!o.filter&&o.filter!=="none"||["transform","perspective","filter"].some(t=>(o.willChange||"").includes(t))||["paint","layout","strict","content"].some(t=>(o.contain||"").includes(t))}function He(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function be(e){return["html","body","#document"].includes(J(e))}const Oe=Math.min,re=Math.max,ye=Math.round,ve=Math.floor,Q=e=>({x:e,y:e});function et(e){const n=N(e);let o=parseFloat(n.width)||0,t=parseFloat(n.height)||0;const i=W(e),r=i?e.offsetWidth:o,u=i?e.offsetHeight:t,a=ye(o)!==r||ye(t)!==u;return a&&(o=r,t=u),{width:o,height:t,$:a}}function Ce(e){return I(e)?e:e.contextElement}function ie(e){const n=Ce(e);if(!W(n))return Q(1);const o=n.getBoundingClientRect(),{width:t,height:i,$:r}=et(n);let u=(r?ye(o.width):o.width)/t,a=(r?ye(o.height):o.height)/i;return u&&Number.isFinite(u)||(u=1),a&&Number.isFinite(a)||(a=1),{x:u,y:a}}const We=Q(0);function tt(e,n,o){var t,i;if(n===void 0&&(n=!0),!He())return We;const r=e?F(e):window;return!o||n&&o!==r?We:{x:((t=r.visualViewport)==null?void 0:t.offsetLeft)||0,y:((i=r.visualViewport)==null?void 0:i.offsetTop)||0}}function K(e,n,o,t){n===void 0&&(n=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),r=Ce(e);let u=Q(1);n&&(t?I(t)&&(u=ie(t)):u=ie(e));const a=tt(r,o,t);let l=(i.left+a.x)/u.x,s=(i.top+a.y)/u.y,d=i.width/u.x,f=i.height/u.y;if(r){const h=F(r),m=t&&I(t)?F(t):t;let p=h.frameElement;for(;p&&t&&m!==h;){const g=ie(p),v=p.getBoundingClientRect(),x=getComputedStyle(p),w=v.left+(p.clientLeft+parseFloat(x.paddingLeft))*g.x,b=v.top+(p.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,s*=g.y,d*=g.x,f*=g.y,l+=w,s+=b,p=F(p).frameElement}}return xe({width:d,height:f,x:l,y:s})}function Y(e){return((Ke(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ee(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function nt(e){return K(Y(e)).left+Ee(e).scrollLeft}function se(e){if(J(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Ne(e)&&e.host||Y(e);return Ne(n)?n.host:n}function ot(e){const n=se(e);return be(n)?e.ownerDocument?e.ownerDocument.body:e.body:W(n)&&fe(n)?n:ot(n)}function Pe(e,n){var o;n===void 0&&(n=[]);const t=ot(e),i=t===((o=e.ownerDocument)==null?void 0:o.body),r=F(t);return i?n.concat(r,r.visualViewport||[],fe(t)?t:[]):n.concat(t,Pe(t))}function je(e,n,o){let t;if(n==="viewport")t=function(i,r){const u=F(i),a=Y(i),l=u.visualViewport;let s=a.clientWidth,d=a.clientHeight,f=0,h=0;if(l){s=l.width,d=l.height;const m=He();(!m||m&&r==="fixed")&&(f=l.offsetLeft,h=l.offsetTop)}return{width:s,height:d,x:f,y:h}}(e,o);else if(n==="document")t=function(i){const r=Y(i),u=Ee(i),a=i.ownerDocument.body,l=re(r.scrollWidth,r.clientWidth,a.scrollWidth,a.clientWidth),s=re(r.scrollHeight,r.clientHeight,a.scrollHeight,a.clientHeight);let d=-u.scrollLeft+nt(i);const f=-u.scrollTop;return N(a).direction==="rtl"&&(d+=re(r.clientWidth,a.clientWidth)-l),{width:l,height:s,x:d,y:f}}(Y(e));else if(I(n))t=function(i,r){const u=K(i,!0,r==="fixed"),a=u.top+i.clientTop,l=u.left+i.clientLeft,s=W(i)?ie(i):Q(1);return{width:i.clientWidth*s.x,height:i.clientHeight*s.y,x:l*s.x,y:a*s.y}}(n,o);else{const i=tt(e);t={...n,x:n.x-i.x,y:n.y-i.y}}return xe(t)}function rt(e,n){const o=se(e);return!(o===n||!I(o)||be(o))&&(N(o).position==="fixed"||rt(o,n))}function Be(e,n){return W(e)&&N(e).position!=="fixed"?n?n(e):e.offsetParent:null}function ze(e,n){const o=F(e);if(!W(e))return o;let t=Be(e,n);for(;t&&Ot(t)&&N(t).position==="static";)t=Be(t,n);return t&&(J(t)==="html"||J(t)==="body"&&N(t).position==="static"&&!Ae(t))?o:t||function(i){let r=se(i);for(;W(r)&&!be(r);){if(Ae(r))return r;r=se(r)}return null}(e)||o}function Tt(e,n,o){const t=W(n),i=Y(n),r=o==="fixed",u=K(e,!0,r,n);let a={scrollLeft:0,scrollTop:0};const l=Q(0);if(t||!t&&!r)if((J(n)!=="body"||fe(i))&&(a=Ee(n)),W(n)){const s=K(n,!0,r,n);l.x=s.x+n.clientLeft,l.y=s.y+n.clientTop}else i&&(l.x=nt(i));return{x:u.left+a.scrollLeft-l.x,y:u.top+a.scrollTop-l.y,width:u.width,height:u.height}}const $t={getClippingRect:function(e){let{element:n,boundary:o,rootBoundary:t,strategy:i}=e;const r=o==="clippingAncestors"?function(s,d){const f=d.get(s);if(f)return f;let h=Pe(s).filter(v=>I(v)&&J(v)!=="body"),m=null;const p=N(s).position==="fixed";let g=p?se(s):s;for(;I(g)&&!be(g);){const v=N(g),x=Ae(g);x||v.position!=="fixed"||(m=null),(p?!x&&!m:!x&&v.position==="static"&&m&&["absolute","fixed"].includes(m.position)||fe(g)&&!x&&rt(s,g))?h=h.filter(w=>w!==g):m=v,g=se(g)}return d.set(s,h),h}(n,this._c):[].concat(o),u=[...r,t],a=u[0],l=u.reduce((s,d)=>{const f=je(n,d,i);return s.top=re(f.top,s.top),s.right=Oe(f.right,s.right),s.bottom=Oe(f.bottom,s.bottom),s.left=re(f.left,s.left),s},je(n,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:n,offsetParent:o,strategy:t}=e;const i=W(o),r=Y(o);if(o===r)return n;let u={scrollLeft:0,scrollTop:0},a=Q(1);const l=Q(0);if((i||!i&&t!=="fixed")&&((J(o)!=="body"||fe(r))&&(u=Ee(o)),W(o))){const s=K(o);a=ie(o),l.x=s.x+o.clientLeft,l.y=s.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-u.scrollLeft*a.x+l.x,y:n.y*a.y-u.scrollTop*a.y+l.y}},isElement:I,getDimensions:function(e){return et(e)},getOffsetParent:ze,getDocumentElement:Y,getScale:ie,async getElementRects(e){let{reference:n,floating:o,strategy:t}=e;const i=this.getOffsetParent||ze,r=this.getDimensions;return{reference:Tt(n,await i(o),t),floating:{x:0,y:0,...await r(o)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>N(e).direction==="rtl"};function Ht(e,n,o,t){t===void 0&&(t={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:u=!0,layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=t,s=Ce(e),d=i||r?[...s?Pe(s):[],...Pe(n)]:[];d.forEach(g=>{i&&g.addEventListener("scroll",o,{passive:!0}),r&&g.addEventListener("resize",o)});const f=s&&a?function(g,v){let x,w=null;const b=Y(g);function E(){clearTimeout(x),w&&w.disconnect(),w=null}return function y(S,$){S===void 0&&(S=!1),$===void 0&&($=1),E();const{left:H,top:L,width:_,height:A}=g.getBoundingClientRect();if(S||v(),!_||!A)return;const M=ve(L),P=ve(b.clientWidth-(H+_)),O=ve(b.clientHeight-(L+A)),R=ve(H);let T=!0;w=new IntersectionObserver(V=>{const k=V[0].intersectionRatio;if(k!==$){if(!T)return y();k?y(!1,k):x=setTimeout(()=>{y(!1,1e-7)},100)}T=!1},{rootMargin:-M+"px "+-P+"px "+-O+"px "+-R+"px",threshold:re(0,Oe(1,$))||1}),w.observe(g)}(!0),E}(s,o):null;let h,m=null;u&&(m=new ResizeObserver(o),s&&!l&&m.observe(s),m.observe(n));let p=l?K(e):null;return l&&function g(){const v=K(e);!p||v.x===p.x&&v.y===p.y&&v.width===p.width&&v.height===p.height||o(),p=v,h=requestAnimationFrame(g)}(),o(),()=>{d.forEach(g=>{i&&g.removeEventListener("scroll",o),r&&g.removeEventListener("resize",o)}),f&&f(),m&&m.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const Ct=(e,n,o)=>{const t=new Map,i={platform:$t,...o},r={...i.platform,_c:t};return vt(e,n,{...i,platform:r})};var Mt="div";function qe(e=0,n=0,o=0,t=0){if(typeof DOMRect=="function")return new DOMRect(e,n,o,t);const i={x:e,y:n,width:o,height:t,top:n,right:e+o,bottom:n+t,left:e};return c.__spreadProps(c.__spreadValues({},i),{toJSON:()=>i})}function Vt(e){if(!e)return qe();const{x:n,y:o,width:t,height:i}=e;return qe(n,o,t,i)}function Lt(e,n){return{contextElement:e||void 0,getBoundingClientRect:()=>{const t=e,i=n==null?void 0:n(t);return i||!t?Vt(i):t.getBoundingClientRect()}}}function Dt(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}function Ie(e){const n=window.devicePixelRatio||1;return Math.round(e*n)/n}function Ft(e,n){return St(({placement:o})=>{var t;const i=((e==null?void 0:e.clientHeight)||0)/2,r=typeof n.gutter=="number"?n.gutter+i:(t=n.gutter)!=null?t:i;return{crossAxis:!!o.split("-")[1]?void 0:n.shift,mainAxis:r,alignmentAxis:n.shift}})}function kt(e){if(e.flip===!1)return;const n=typeof e.flip=="string"?e.flip.split(" "):void 0;return c.invariant(!n||n.every(Dt),process.env.NODE_ENV!=="production"&&"`flip` expects a spaced-delimited list of placements"),Et({padding:e.overflowPadding,fallbackPlacements:n})}function Nt(e){if(!(!e.slide&&!e.overlap))return Rt({mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:_t()})}function Wt(e){return At({padding:e.overflowPadding,apply({elements:n,availableWidth:o,availableHeight:t,rects:i}){const r=n.floating,u=Math.round(i.reference.width);o=Math.floor(o),t=Math.floor(t),r.style.setProperty("--popover-anchor-width",`${u}px`),r.style.setProperty("--popover-available-width",`${o}px`),r.style.setProperty("--popover-available-height",`${t}px`),e.sameWidth&&(r.style.width=`${u}px`),e.fitViewport&&(r.style.maxWidth=`${o}px`,r.style.maxHeight=`${t}px`)}})}function jt(e,n){if(e)return xt({element:e,padding:n.arrowPadding})}var it=c.createHook(function(n){var o=n,{store:t,modal:i=!1,portal:r=!!i,preserveTabOrder:u=!0,autoFocusOnShow:a=!0,wrapperProps:l,fixed:s=!1,flip:d=!0,shift:f=0,slide:h=!0,overlap:m=!1,sameWidth:p=!1,fitViewport:g=!1,gutter:v,arrowPadding:x=4,overflowPadding:w=8,getAnchorRect:b,updatePosition:E}=o,y=c.__objRest(o,["store","modal","portal","preserveTabOrder","autoFocusOnShow","wrapperProps","fixed","flip","shift","slide","overlap","sameWidth","fitViewport","gutter","arrowPadding","overflowPadding","getAnchorRect","updatePosition"]);const S=ce.usePopoverProviderContext();t=t||S,c.invariant(t,process.env.NODE_ENV!=="production"&&"Popover must receive a `store` prop or be wrapped in a PopoverProvider component.");const $=t.useState("arrowElement"),H=t.useState("anchorElement"),L=t.useState("disclosureElement"),_=t.useState("popoverElement"),A=t.useState("contentElement"),M=t.useState("placement"),P=t.useState("mounted"),O=t.useState("rendered"),R=C.useRef(null),[T,V]=C.useState(!1),{portalRef:k,domReady:G}=c.usePortalRef(r,y.portalRef),j=c.useEvent(b),B=c.useEvent(E),U=!!E;c.useSafeLayoutEffect(()=>{if(!(_!=null&&_.isConnected))return;_.style.setProperty("--popover-overflow-padding",`${w}px`);const z=Lt(H,j),le=async()=>{if(!P)return;$||(R.current=R.current||document.createElement("div"));const ne=$||R.current,pt=[Ft(ne,{gutter:v,shift:f}),kt({flip:d,overflowPadding:w}),Nt({slide:h,shift:f,overlap:m,overflowPadding:w}),jt(ne,{arrowPadding:x}),Wt({sameWidth:p,fitViewport:g,overflowPadding:w})],oe=await Ct(z,_,{placement:M,strategy:s?"fixed":"absolute",middleware:pt});t==null||t.setState("currentPlacement",oe.placement),V(!0);const mt=Ie(oe.x),ht=Ie(oe.y);if(Object.assign(_.style,{top:"0",left:"0",transform:`translate3d(${mt}px,${ht}px,0)`}),ne&&oe.middlewareData.arrow){const{x:pe,y:me}=oe.middlewareData.arrow,Le=oe.placement.split("-")[0],he=ne.clientWidth/2,ge=ne.clientHeight/2,De=pe!=null?pe+he:-he,Fe=me!=null?me+ge:-ge;_.style.setProperty("--popover-transform-origin",{top:`${De}px calc(100% + ${ge}px)`,bottom:`${De}px ${-ge}px`,left:`calc(100% + ${he}px) ${Fe}px`,right:`${-he}px ${Fe}px`}[Le]),Object.assign(ne.style,{left:pe!=null?`${pe}px`:"",top:me!=null?`${me}px`:"",[Le]:"100%"})}},dt=Ht(z,_,async()=>{U?(await B({updatePosition:le}),V(!0)):await le()},{elementResize:typeof ResizeObserver=="function"});return()=>{V(!1),dt()}},[t,O,_,$,H,_,M,P,G,s,d,f,h,m,p,g,v,x,w,j,U,B]),c.useSafeLayoutEffect(()=>{if(!P||!G||!(_!=null&&_.isConnected)||!(A!=null&&A.isConnected))return;const z=()=>{_.style.zIndex=getComputedStyle(A).zIndex};z();let le=requestAnimationFrame(()=>{le=requestAnimationFrame(z)});return()=>cancelAnimationFrame(le)},[P,G,_,A]);const te=s?"fixed":"absolute";return y=c.useWrapElement(y,z=>c.jsxRuntimeExports.jsx("div",c.__spreadProps(c.__spreadValues({},l),{style:c.__spreadValues({position:te,top:0,left:0,width:"max-content"},l==null?void 0:l.style),ref:t==null?void 0:t.setPopoverElement,children:z})),[t,te,l]),y=c.useWrapElement(y,z=>c.jsxRuntimeExports.jsx(ce.PopoverScopedContextProvider,{value:t,children:z}),[t]),y=c.__spreadProps(c.__spreadValues({"data-placing":!T||void 0},y),{style:c.__spreadValues({position:"relative"},y.style)}),y=de.useDialog(c.__spreadProps(c.__spreadValues({store:t,modal:i,portal:r,preserveTabOrder:u,preserveTabOrderAnchor:L||H,autoFocusOnShow:T&&a},y),{portalRef:k})),y}),Bt=de.createDialogComponent(c.forwardRef2(function(n){const o=it(n);return c.createElement(Mt,o)}),ce.usePopoverProviderContext),Me=c.createStoreContext([ce.PopoverContextProvider],[ce.PopoverScopedContextProvider]),Ve=Me.useProviderContext,zt=Me.ContextProvider,st=Me.ScopedContextProvider;function ut(e={}){var n;const o=(n=e.store)==null?void 0:n.getState(),t=Je(c.__spreadProps$1(c.__spreadValues$1({},e),{placement:c.defaultValue(e.placement,o==null?void 0:o.placement,"bottom")})),i=c.defaultValue(e.timeout,o==null?void 0:o.timeout,500),r=c.__spreadProps$1(c.__spreadValues$1({},t.getState()),{timeout:i,showTimeout:c.defaultValue(e.showTimeout,o==null?void 0:o.showTimeout),hideTimeout:c.defaultValue(e.hideTimeout,o==null?void 0:o.hideTimeout),autoFocusOnShow:c.defaultValue(o==null?void 0:o.autoFocusOnShow,!1)}),u=D.createStore(r,t,e.store);return c.__spreadProps$1(c.__spreadValues$1(c.__spreadValues$1({},t),u),{setAutoFocusOnShow:a=>u.setState("autoFocusOnShow",a)})}function lt(e,n,o){return D.useStoreProps(e,o,"timeout"),D.useStoreProps(e,o,"showTimeout"),D.useStoreProps(e,o,"hideTimeout"),Ue(e,n,o)}function qt(e={}){const[n,o]=D.useStore(ut,e);return lt(n,o,e)}function Re(e){return[e.clientX,e.clientY]}function Ye(e,n){const[o,t]=e;let i=!1;const r=n.length;for(let u=r,a=0,l=u-1;a<u;l=a++){const[s,d]=n[a],[f,h]=n[l],[,m]=n[l===0?u-1:l-1]||[0,0],p=(d-h)*(o-s)-(s-f)*(t-d);if(h<d){if(t>=h&&t<d){if(p===0)return!0;p>0&&(t===h?t>m&&(i=!i):i=!i)}}else if(d<h){if(t>d&&t<=h){if(p===0)return!0;p<0&&(t===h?t<m&&(i=!i):i=!i)}}else if(t===d&&(o>=f&&o<=s||o>=s&&o<=f))return!0}return i}function It(e,n){const{top:o,right:t,bottom:i,left:r}=n,[u,a]=e,l=u<r?"left":u>t?"right":null,s=a<o?"top":a>i?"bottom":null;return[l,s]}function Ge(e,n){const o=e.getBoundingClientRect(),{top:t,right:i,bottom:r,left:u}=o,[a,l]=It(n,o),s=[n];return a?(l!=="top"&&s.push([a==="left"?u:i,t]),s.push([a==="left"?i:u,t]),s.push([a==="left"?i:u,r]),l!=="bottom"&&s.push([a==="left"?u:i,r])):l==="top"?(s.push([u,t]),s.push([u,r]),s.push([i,r]),s.push([i,t])):(s.push([u,r]),s.push([u,t]),s.push([i,t]),s.push([i,r])),s}var Yt="div";function ct(e,n,o,t){return c.hasFocusWithin(n)?!0:e?!!(c.contains(n,e)||o&&c.contains(o,e)||t!=null&&t.some(i=>ct(e,i,o))):!1}function Gt(e){var n=e,{store:o}=n,t=c.__objRest(n,["store"]);const[i,r]=C.useState(!1),u=o.useState("mounted");C.useEffect(()=>{u||r(!1)},[u]);const a=t.onFocus,l=c.useEvent(d=>{a==null||a(d),!d.defaultPrevented&&r(!0)}),s=C.useRef(null);return C.useEffect(()=>D.sync(o,["anchorElement"],d=>{s.current=d.anchorElement}),[]),t=c.__spreadProps(c.__spreadValues({autoFocusOnHide:i,finalFocus:s},t),{onFocus:l}),t}var Xe=C.createContext(null),at=c.createHook(function(n){var o=n,{store:t,modal:i=!1,portal:r=!!i,hideOnEscape:u=!0,hideOnHoverOutside:a=!0,disablePointerEventsOnApproach:l=!!a}=o,s=c.__objRest(o,["store","modal","portal","hideOnEscape","hideOnHoverOutside","disablePointerEventsOnApproach"]);const d=Ve();t=t||d,c.invariant(t,process.env.NODE_ENV!=="production"&&"Hovercard must receive a `store` prop or be wrapped in a HovercardProvider component.");const f=C.useRef(null),[h,m]=C.useState([]),p=C.useRef(0),g=C.useRef(null),{portalRef:v,domReady:x}=c.usePortalRef(r,s.portalRef),w=c.useIsMouseMoving(),b=!!a,E=c.useBooleanEvent(a),y=!!l,S=c.useBooleanEvent(l),$=t.useState("open"),H=t.useState("mounted");C.useEffect(()=>{if(!x||!H||!b&&!y)return;const P=f.current;if(!P)return;const O=R=>{if(!t||!w())return;const{anchorElement:T,hideTimeout:V,timeout:k}=t.getState(),G=g.current,[j]=R.composedPath(),B=T;if(ct(j,P,B,h)){g.current=j&&B&&c.contains(B,j)?Re(R):null,window.clearTimeout(p.current),p.current=0;return}if(!p.current){if(G){const U=Re(R),te=Ge(P,G);if(Ye(U,te)){if(g.current=U,!S(R))return;R.preventDefault(),R.stopPropagation();return}}E(R)&&(p.current=window.setTimeout(()=>{p.current=0,t==null||t.hide()},V??k))}};return c.chain(c.addGlobalEventListener("mousemove",O,!0),()=>clearTimeout(p.current))},[t,w,x,H,b,y,h,S,E]),C.useEffect(()=>{if(!x||!H||!y)return;const P=O=>{const R=f.current;if(!R)return;const T=g.current;if(!T)return;const V=Ge(R,T);if(Ye(Re(O),V)){if(!S(O))return;O.preventDefault(),O.stopPropagation()}};return c.chain(c.addGlobalEventListener("mouseenter",P,!0),c.addGlobalEventListener("mouseover",P,!0),c.addGlobalEventListener("mouseout",P,!0),c.addGlobalEventListener("mouseleave",P,!0))},[x,H,y,S]),C.useEffect(()=>{x&&($||t==null||t.setAutoFocusOnShow(!1))},[t,x,$]);const L=c.useLiveRef($);C.useEffect(()=>{if(x)return()=>{L.current||t==null||t.setAutoFocusOnShow(!1)}},[t,x]);const _=C.useContext(Xe);c.useSafeLayoutEffect(()=>{if(i||!r||!H||!x)return;const P=f.current;if(P)return _==null?void 0:_(P)},[i,r,H,x]);const A=C.useCallback(P=>{m(R=>[...R,P]);const O=_==null?void 0:_(P);return()=>{m(R=>R.filter(T=>T!==P)),O==null||O()}},[_]);s=c.useWrapElement(s,P=>c.jsxRuntimeExports.jsx(st,{value:t,children:c.jsxRuntimeExports.jsx(Xe.Provider,{value:A,children:P})}),[t,A]),s=c.__spreadProps(c.__spreadValues({},s),{ref:c.useMergeRefs(f,s.ref)}),s=Gt(c.__spreadValues({store:t},s));const M=t.useState(P=>i||P.autoFocusOnShow);return s=it(c.__spreadProps(c.__spreadValues({store:t,modal:i,portal:r,autoFocusOnShow:M},s),{portalRef:v,hideOnEscape(P){return c.isFalsyBooleanCallback(u,P)?!1:(requestAnimationFrame(()=>{requestAnimationFrame(()=>{t==null||t.hide()})}),!0)}})),s}),Xt=de.createDialogComponent(c.forwardRef2(function(n){const o=at(n);return c.createElement(Yt,o)}),Ve),Jt="a",ft=c.createHook(function(n){var o=n,{store:t,showOnHover:i=!0}=o,r=c.__objRest(o,["store","showOnHover"]);const u=Ve();t=t||u,c.invariant(t,process.env.NODE_ENV!=="production"&&"HovercardAnchor must receive a `store` prop or be wrapped in a HovercardProvider component.");const a=c.disabledFromProps(r),l=C.useRef(0);C.useEffect(()=>()=>window.clearTimeout(l.current),[]),C.useEffect(()=>{const v=x=>{if(!t)return;const{anchorElement:w}=t.getState();w&&x.target===w&&(window.clearTimeout(l.current),l.current=0)};return c.addGlobalEventListener("mouseleave",v,!0)},[t]);const s=r.onMouseMove,d=c.useBooleanEvent(i),f=c.useIsMouseMoving(),h=c.useEvent(v=>{if(s==null||s(v),a||!t||v.defaultPrevented||l.current||!f()||!d(v))return;const x=v.currentTarget;t.setAnchorElement(x),t.setDisclosureElement(x);const{showTimeout:w,timeout:b}=t.getState(),E=()=>{l.current=0,f()&&(t==null||t.setAnchorElement(x),t==null||t.show(),queueMicrotask(()=>{t==null||t.setDisclosureElement(x)}))},y=w??b;y===0?E():l.current=window.setTimeout(E,y)}),m=r.onClick,p=c.useEvent(v=>{m==null||m(v),t&&(window.clearTimeout(l.current),l.current=0)}),g=C.useCallback(v=>{if(!t)return;const{anchorElement:x}=t.getState();x!=null&&x.isConnected||t.setAnchorElement(v)},[t]);return r=c.__spreadProps(c.__spreadValues({},r),{ref:c.useMergeRefs(g,r.ref),onMouseMove:h,onClick:p}),r=c.useFocusable(r),r}),Ut=c.forwardRef2(function(n){const o=ft(n);return c.createElement(Jt,o)});exports.Hovercard=Xt;exports.HovercardAnchor=Ut;exports.HovercardContextProvider=zt;exports.HovercardScopedContextProvider=st;exports.Popover=Bt;exports.createHovercardStore=ut;exports.useHovercard=at;exports.useHovercardAnchor=ft;exports.useHovercardStore=qt;exports.useHovercardStoreProps=lt;exports.usePopoverStore=gt;
|
package/dist/Badge.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),e=require("@xstyled/styled-components"),b=require("./System.js"),f=e.div(({disabled:t,length:d,size:s,variant:a})=>e.css`
|
|
2
|
-
${e.th("badges.default")};
|
|
3
|
-
${e.th(`badges.variants.${a}`)};
|
|
4
|
-
${e.th(`badges.sizes.${s}`)};
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
${e.system};
|
|
9
|
-
|
|
10
|
-
${t&&e.css`
|
|
11
|
-
${e.th(`badges.disabled.${a}`)};
|
|
12
|
-
`}
|
|
13
|
-
|
|
14
|
-
${d===1&&e.css`
|
|
15
|
-
width: ${e.th(`badges.sizes.${s}.height`)};
|
|
16
|
-
`}
|
|
17
|
-
`),n=b.forwardRef(({children:t,dataTestId:d,disabled:s,size:a="md",variant:g="default",withNumberAbbreviation:r,...l},c)=>{let i;const o=Number.isInteger(t),u=t.toString().length;return o&&r&&t>99?i="99+":i=t,$.createElement(f,{"data-testid":d,disabled:s,length:u,ref:c,size:a,variant:g,...l},i)});n.displayName="Badge";exports.Badge=n;
|
package/dist/Box.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),o=require("@xstyled/styled-components"),c=require("./System.js"),n=c.forwardRef((e,t)=>r.createElement(o.x.div,{ref:t,...e}));exports.Box=n;
|
package/dist/Breadcrumb.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),de=require("./throttle-BB1Y3bfD.js"),u=require("@xstyled/styled-components"),j=require("./System.js"),ve=require("./Box.js"),fe=require("./hex-to-rgba-cCYXRc5D.js");require("./Icon.js");const he=require("./index-BNwz4P5j.js");var E=[],pe=function(){return E.some(function(e){return e.activeTargets.length>0})},be=function(){return E.some(function(e){return e.skippedTargets.length>0})},G="ResizeObserver loop completed with undelivered notifications.",ge=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:G}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=G),window.dispatchEvent(e)},C;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(C||(C={}));var w=function(e){return Object.freeze(e)},me=function(){function e(t,r){this.inlineSize=t,this.blockSize=r,w(this)}return e}(),ee=function(){function e(t,r,n,i){return this.x=t,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,w(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,i=t.top,a=t.right,o=t.bottom,v=t.left,f=t.width,l=t.height;return{x:r,y:n,top:i,right:a,bottom:o,left:v,width:f,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),_=function(e){return e instanceof SVGElement&&"getBBox"in e},te=function(e){if(_(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},V=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},xe=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},S=typeof window<"u"?window:{},M=new WeakMap,X=/auto|scroll/,Ee=/^tb|vertical/,we=/msie|trident/i.test(S.navigator&&S.navigator.userAgent),p=function(e){return parseFloat(e||"0")},y=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new me((r?t:e)||0,(r?e:t)||0)},J=w({devicePixelContentBoxSize:y(),borderBoxSize:y(),contentBoxSize:y(),contentRect:new ee(0,0,0,0)}),re=function(e,t){if(t===void 0&&(t=!1),M.has(e)&&!t)return M.get(e);if(te(e))return M.set(e,J),J;var r=getComputedStyle(e),n=_(e)&&e.ownerSVGElement&&e.getBBox(),i=!we&&r.boxSizing==="border-box",a=Ee.test(r.writingMode||""),o=!n&&X.test(r.overflowY||""),v=!n&&X.test(r.overflowX||""),f=n?0:p(r.paddingTop),l=n?0:p(r.paddingRight),z=n?0:p(r.paddingBottom),h=n?0:p(r.paddingLeft),N=n?0:p(r.borderTopWidth),k=n?0:p(r.borderRightWidth),D=n?0:p(r.borderBottomWidth),W=n?0:p(r.borderLeftWidth),O=h+l,x=f+z,B=W+k,T=N+D,c=v?e.offsetHeight-T-e.clientHeight:0,d=o?e.offsetWidth-B-e.clientWidth:0,b=i?O+B:0,g=i?x+T:0,m=n?n.width:p(r.width)-b-d,R=n?n.height:p(r.height)-g-c,ue=m+O+d+B,le=R+x+c+T,H=w({devicePixelContentBoxSize:y(Math.round(m*devicePixelRatio),Math.round(R*devicePixelRatio),a),borderBoxSize:y(ue,le,a),contentBoxSize:y(m,R,a),contentRect:new ee(h,f,m,R)});return M.set(e,H),H},ne=function(e,t,r){var n=re(e,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(t){case C.DEVICE_PIXEL_CONTENT_BOX:return o;case C.BORDER_BOX:return i;default:return a}},Re=function(){function e(t){var r=re(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=w([r.borderBoxSize]),this.contentBoxSize=w([r.contentBoxSize]),this.devicePixelContentBoxSize=w([r.devicePixelContentBoxSize])}return e}(),ie=function(e){if(te(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},ye=function(){var e=1/0,t=[];E.forEach(function(o){if(o.activeTargets.length!==0){var v=[];o.activeTargets.forEach(function(l){var z=new Re(l.target),h=ie(l.target);v.push(z),l.lastReportedSize=ne(l.target,l.observedBox),h<e&&(e=h)}),t.push(function(){o.callback.call(o.observer,v,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var i=n[r];i()}return e},U=function(e){E.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(ie(i.target)>e?r.activeTargets.push(i):r.skippedTargets.push(i))})})},ze=function(){var e=0;for(U(e);pe();)e=ye(),U(e);return be()&&ge(),e>0},$,oe=[],Oe=function(){return oe.splice(0).forEach(function(e){return e()})},Be=function(e){if(!$){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Oe()}).observe(r,n),$=function(){r.textContent="".concat(t?t--:t++)}}oe.push(e),$()},Te=function(e){Be(function(){requestAnimationFrame(e)})},L=0,Se=function(){return!!L},Ce=250,ke={attributes:!0,characterData:!0,childList:!0,subtree:!0},Y=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],K=function(e){return e===void 0&&(e=0),Date.now()+e},P=!1,De=function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=Ce),!P){P=!0;var n=K(t);Te(function(){var i=!1;try{i=ze()}finally{if(P=!1,t=n-K(),!Se())return;i?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,ke)};document.body?r():S.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Y.forEach(function(r){return S.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Y.forEach(function(r){return S.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e}(),q=new De,Q=function(e){!L&&e>0&&q.start(),L+=e,!L&&q.stop()},Me=function(e){return!_(e)&&!xe(e)&&getComputedStyle(e).display==="inline"},Ie=function(){function e(t,r){this.target=t,this.observedBox=r||C.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=ne(this.target,this.observedBox,!0);return Me(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),Ae=function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e}(),I=new WeakMap,Z=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},A=function(){function e(){}return e.connect=function(t,r){var n=new Ae(t,r);I.set(t,n)},e.observe=function(t,r,n){var i=I.get(t),a=i.observationTargets.length===0;Z(i.observationTargets,r)<0&&(a&&E.push(i),i.observationTargets.push(new Ie(r,n&&n.box)),Q(1),q.schedule())},e.unobserve=function(t,r){var n=I.get(t),i=Z(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&E.splice(E.indexOf(n),1),n.observationTargets.splice(i,1),Q(-1))},e.disconnect=function(t){var r=this,n=I.get(t);n.observationTargets.slice().forEach(function(i){return r.unobserve(t,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Le=function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");A.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");A.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!V(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");A.unobserve(this,t)},e.prototype.disconnect=function(){A.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();const Ne=(e,t,r)=>Math.min(Math.max(e,t),r),We=u.aBox`
|
|
2
|
-
${u.th("breadcrumbs.item.default")};
|
|
3
|
-
align-items: center;
|
|
4
|
-
transition: medium;
|
|
5
|
-
direction: initial;
|
|
6
|
-
|
|
7
|
-
&:hover {
|
|
8
|
-
${u.th("breadcrumbs.item.hover")};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
&[aria-current='page'] {
|
|
12
|
-
${u.th("breadcrumbs.item.active")};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&[aria-disabled='true'] {
|
|
16
|
-
pointer-events: none;
|
|
17
|
-
cursor: default;
|
|
18
|
-
}
|
|
19
|
-
`,$e=u.spanBox`
|
|
20
|
-
${u.th("breadcrumbs.separator")};
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
`,Pe=j.forwardRef(({children:e,dataTestId:t,isActive:r,separator:n,...i},a)=>{const o=i.href||i.to;return s.createElement(ve.Box,{"aria-label":"breadcrumb",as:"li","data-testid":t,display:"inline-flex",flex:"0 0 auto",lineHeight:"normal"},n&&s.createElement($e,{role:"presentation"},n),s.createElement(We,{"aria-current":r?"page":void 0,"aria-disabled":!o,...i,ref:a},e))}),se=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
24
|
-
left: 0;
|
|
25
|
-
background-image: ${ce(t,e)};
|
|
26
|
-
transform-origin: left;
|
|
27
|
-
`),ae=u.spanBox(({gradientBackground:e,theme:t})=>u.css`
|
|
28
|
-
right: 0;
|
|
29
|
-
background-image: ${ce(t,e,"left")};
|
|
30
|
-
transform-origin: right;
|
|
31
|
-
`),qe=u.divBox`
|
|
32
|
-
${u.th("breadcrumbs.list")};
|
|
33
|
-
height: 100%;
|
|
34
|
-
position: relative;
|
|
35
|
-
overflow-x: hidden;
|
|
36
|
-
|
|
37
|
-
${se},
|
|
38
|
-
${ae} {
|
|
39
|
-
position: absolute;
|
|
40
|
-
bottom: 0;
|
|
41
|
-
top: 0;
|
|
42
|
-
width: 30;
|
|
43
|
-
}
|
|
44
|
-
`,_e=u.olBox`
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
max-width: 100%;
|
|
48
|
-
height: 100%;
|
|
49
|
-
overflow-x: auto;
|
|
50
|
-
margin: 0;
|
|
51
|
-
padding: 0;
|
|
52
|
-
list-style: none;
|
|
53
|
-
white-space: nowrap;
|
|
54
|
-
`,ce=(e,t,r="right")=>{const n=u.th(`colors.${t}`)({theme:e}),i=fe.hexToRGBA(n,0);return`linear-gradient(to ${r}, ${n}, ${i} 100%)`},F=j.forwardRef(({children:e,gradientBackground:t="neutral-10",lastChildNotClickable:r=!0,separator:n=s.createElement(he.RightIcon,{size:"xs"}),...i},a)=>{const o=s.useRef(null),v=s.useRef(),f=s.useRef(),[l,z]=s.useState(!1),[h,N]=s.useState(0),k=s.Children.toArray(e).filter(Boolean),D=k.length,W=k.map((c,d)=>{const b=D===1||D===d+1,g=b&&r;return s.cloneElement(c,{key:`breadcrumb-${d}`,separator:b?void 0:n,isActive:g,...c.props})});function O(c,d){c&&(c.style.transform=`scale3d(${d}, 1, 1)`)}const x=s.useCallback(c=>{const d=1-c;O(v.current,d),O(f.current,c)},[]),B=s.useCallback(()=>{const{current:{offsetWidth:c,scrollLeft:d,scrollWidth:b}}=o,g=b-c,R=Ne(Math.abs(d-h),0,g)/g;x(R)},[h,x]),T=s.useMemo(()=>de.throttle(c=>{const[{target:{offsetWidth:d,scrollLeft:b,scrollWidth:g}}]=c,m=g-d;h||N(b===0?0:m),z(m>0)},300,!1),[h]);return s.useEffect(()=>{const c=new Le(T);return c.observe(o.current),()=>c.disconnect()},[]),s.useEffect(()=>{v.current&&f.current&&x(0)},[l,x]),s.createElement(qe,{as:"nav",ref:a,...i},l&&s.createElement(se,{gradientBackground:t,ref:v}),s.createElement(_e,{dir:"rtl",onScroll:B,ref:o},W.reverse()),l&&s.createElement(ae,{gradientBackground:t,ref:f}))});F.displayName="Breadcrumb";const Fe=Object.assign(F,{Item:Pe});exports.Breadcrumb=Fe;exports.BreadcrumbComponent=F;
|
package/dist/Button.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),t=require("@xstyled/styled-components"),m=require("./X5NMLKT6-BzhcQu_I.js"),y=require("./hide-focus-rings-root-DGU4Klq5.js"),l=require("./System.js"),p=require("./Loader.js"),u=require("./Box.js"),g=(e,s="square")=>t.css`
|
|
2
|
-
width: ${t.th(`buttons.sizes.${e}.height`)};
|
|
3
|
-
padding: 0;
|
|
4
|
-
${s==="circle"&&t.css`
|
|
5
|
-
border-radius: ${t.th(`buttons.sizes.${e}.height`)};
|
|
6
|
-
`};
|
|
7
|
-
`,d=t(m.Button).withConfig({shouldForwardProp:l.shouldForwardProp})(({danger:e,disabled:s,shape:r,size:n="md",variant:o="primary"})=>t.css`
|
|
8
|
-
${t.th(`buttons.${o}`)};
|
|
9
|
-
${e&&t.css`
|
|
10
|
-
${t.th(`buttons.danger.${o}`)};
|
|
11
|
-
`}
|
|
12
|
-
position: relative;
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
width: auto;
|
|
17
|
-
${t.th(`buttons.sizes.${n}`)};
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
text-align: center;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
outline: none !important; /* important for firefox */
|
|
23
|
-
border-width: sm;
|
|
24
|
-
border-style: solid;
|
|
25
|
-
appearance: none;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
transition: medium;
|
|
28
|
-
${r&&g(n,r)};
|
|
29
|
-
${t.system};
|
|
30
|
-
|
|
31
|
-
& > svg.wui-icon,
|
|
32
|
-
& > i.wui-icon-font {
|
|
33
|
-
font-weight: initial;
|
|
34
|
-
|
|
35
|
-
&:only-child {
|
|
36
|
-
width: ${t.th(`buttons.icon.only.${n}`)};
|
|
37
|
-
height: ${t.th(`buttons.icon.only.${n}`)};
|
|
38
|
-
font-size: ${t.th(`buttons.icon.only.${n}`)};
|
|
39
|
-
}
|
|
40
|
-
&:not(:only-child) {
|
|
41
|
-
width: ${t.th(`buttons.icon.default.${n}`)};
|
|
42
|
-
height: ${t.th(`buttons.icon.default.${n}`)};
|
|
43
|
-
font-size: ${t.th(`buttons.icon.default.${n}`)};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
& > *:not(:only-child):not(:last-child) {
|
|
48
|
-
margin-right: sm;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
${!s&&t.css`
|
|
52
|
-
[${y.hideFocusRingsDataAttribute}] &:focus {
|
|
53
|
-
box-shadow: none;
|
|
54
|
-
}
|
|
55
|
-
&:focus {
|
|
56
|
-
${t.th(`buttons.focus.${o}`)};
|
|
57
|
-
${e&&t.css`
|
|
58
|
-
${t.th(`buttons.focus.danger.${o}`)};
|
|
59
|
-
`}
|
|
60
|
-
}
|
|
61
|
-
&:hover {
|
|
62
|
-
${t.th(`buttons.hover.${o}`)};
|
|
63
|
-
${e&&t.css`
|
|
64
|
-
${t.th(`buttons.hover.danger.${o}`)};
|
|
65
|
-
`}
|
|
66
|
-
}
|
|
67
|
-
&:active {
|
|
68
|
-
${t.th(`buttons.active.${o}`)};
|
|
69
|
-
${e&&t.css`
|
|
70
|
-
${t.th(`buttons.active.danger.${o}`)};
|
|
71
|
-
`}
|
|
72
|
-
}
|
|
73
|
-
`};
|
|
74
|
-
|
|
75
|
-
&[disabled] {
|
|
76
|
-
cursor: not-allowed;
|
|
77
|
-
}
|
|
78
|
-
`),h=l.forwardRef(({children:e,danger:s,dataTestId:r,disabled:n,isLoading:o,size:a="md",variant:$="primary",...b},f)=>{const c=n||o;return i.createElement(d,{danger:s,"data-loading":o,"data-testid":r,disabled:c,ref:f,size:a,variant:c?"disabled":$,...b},o&&i.createElement("div",null,i.createElement(u.Box,{alignItems:"center",bottom:0,display:"flex",justifyContent:"center",left:0,m:0,position:"absolute",right:0,top:0},i.createElement(p.Loader,{size:"xs"})),i.createElement(u.Box,{opacity:"0"},e)),!o&&e)});h.displayName="Button";const w=d;exports.Button=h;exports.StyledButton=w;
|
package/dist/ButtonGroup.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("@xstyled/styled-components"),u=require("./System.js"),c=e.div`
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
align-items: center;
|
|
5
|
-
margin-top: -3px;
|
|
6
|
-
|
|
7
|
-
> * {
|
|
8
|
-
margin-top: 3px;
|
|
9
|
-
|
|
10
|
-
&:not(:only-child) {
|
|
11
|
-
&:not(:last-child) {
|
|
12
|
-
border-right-color: rgba(255, 255, 255, 0.4);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:first-child {
|
|
16
|
-
border-top-right-radius: 0;
|
|
17
|
-
border-bottom-right-radius: 0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:last-child {
|
|
21
|
-
border-top-left-radius: 0;
|
|
22
|
-
border-bottom-left-radius: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:not(:last-child):not(:first-child) {
|
|
26
|
-
border-radius: 0;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
${e.system};
|
|
32
|
-
`,b=u.forwardRef(({children:o,dataTestId:i,disabled:s,size:n,variant:a},l)=>{function d(p){return t.Children.toArray(p).filter(Boolean).map(r=>t.cloneElement(r,{...r.props,disabled:s||r.props.disabled,size:n||r.props.size,variant:a||r.props.variant}))}return t.createElement(c,{"data-testid":i,ref:l},d(o))});exports.ButtonGroup=b;
|
package/dist/Card.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),e=require("@xstyled/styled-components"),c=require("./Shape.js"),d=require("./System.js"),a=e(c.Shape)`
|
|
2
|
-
${e.th("cards.cover")};
|
|
3
|
-
|
|
4
|
-
${e.system};
|
|
5
|
-
`,i=({src:t,...r})=>o.createElement(a,{...r},o.createElement("img",{src:t})),u=e.divBox`
|
|
6
|
-
overflow: 'hidden';
|
|
7
|
-
border-radius: md;
|
|
8
|
-
${e.th("cards.default")};
|
|
9
|
-
background-size: cover;
|
|
10
|
-
background-position: center;
|
|
11
|
-
|
|
12
|
-
${e.system};
|
|
13
|
-
`,m=e.divBox`
|
|
14
|
-
padding: lg;
|
|
15
|
-
|
|
16
|
-
${e.system};
|
|
17
|
-
`,n=d.forwardRef(({children:t,...r},s)=>o.createElement(u,{ref:s,...r},t)),l=Object.assign(n,{Body:m,Cover:i});exports.Card=l;exports.CardComponent=n;
|
package/dist/Checkbox.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react");const e=require("./index-Dn-QEAu6.js");require("./System.js");exports.Checkbox=e.Checkbox$1;
|
package/dist/ClearButton.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("@xstyled/styled-components"),a=require("./Button.js");require("./Icon.js");const i=require("./index-C1FV1q-F.js"),c=require("./System.js"),u=e.keyframes`
|
|
2
|
-
from {
|
|
3
|
-
opacity: 0;
|
|
4
|
-
}
|
|
5
|
-
to {
|
|
6
|
-
opacity: 1;
|
|
7
|
-
}
|
|
8
|
-
`,l=e.css`
|
|
9
|
-
${u}
|
|
10
|
-
`,n=e(a.Button)`
|
|
11
|
-
pointer-events: auto;
|
|
12
|
-
animation: ${e.th("transitions.medium")};
|
|
13
|
-
animation-name: ${l};
|
|
14
|
-
`,m=c.forwardRef(({size:o="xs",...r},s)=>t.createElement(n,{ref:s,shape:"circle",size:o,title:"Clear",variant:"ghost",...r},t.createElement(i.CrossIcon,{size:"xxs"}))),d=n;exports.ClearButton=m;exports.StyledClearButton=d;
|
package/dist/CloseButton.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=require("@xstyled/styled-components"),r=require("./Button.js");require("./Icon.js");const n=require("./index-C1FV1q-F.js"),c=require("./System.js"),i=e(r.Button)`
|
|
2
|
-
& > svg:only-child {
|
|
3
|
-
width: ${e.th("space.md")};
|
|
4
|
-
height: ${e.th("space.md")};
|
|
5
|
-
}
|
|
6
|
-
`,l=c.forwardRef((s,o)=>t.createElement(i,{ref:o,shape:"circle",size:"sm",title:"Close",variant:"ghost",...s},t.createElement(n.CrossIcon,{size:"lg"})));exports.CloseButton=l;
|