@solibo/solibo-ui 2.3.0 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index47.css +1 -1
- package/dist/components/card/index.cjs +1 -1
- package/dist/components/card/index.js +35 -35
- package/dist/components/file/index.cjs +1 -1
- package/dist/components/file/index.js +42 -37
- package/dist/components/list/index.cjs +1 -1
- package/dist/components/list/index.js +36 -36
- package/dist/index.d.ts +4 -1
- package/dist/tokens.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,4 +72,5 @@ Published builds expose `@solibo/solibo-ui/tokens.css` and `@solibo/solibo-ui/to
|
|
|
72
72
|
### Contributing
|
|
73
73
|
|
|
74
74
|
- Follow the conventions in `AGENTS.md` and `.github/copilot-instructions.md`.
|
|
75
|
-
- Prefer small, focused PRs with tests
|
|
75
|
+
- Prefer small, focused PRs with regression tests. Add stories for new functionality or when requested.
|
|
76
|
+
- For agent context routing and focused verification, see [Agent workflow](docs/AGENT_WORKFLOW.md).
|
package/dist/assets/index30.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._card_1w6vn_1{background-color:var(--colors-semantic-bg-surface);border-radius:var(--shape-border-radius-radius-lg);box-shadow:var(--shape-box-shadow-xs-position-x) var(--shape-box-shadow-xs-position-y) var(--shape-box-shadow-xs-blur) var(--shape-box-shadow-xs-spread) var(--shape-box-shadow-xs-color);max-width:100%;min-width:0;overflow:hidden!important;padding:var(--shape-spacing-md);position:relative;text-overflow:ellipsis;transition:background-color var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function),box-shadow var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function),width var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%}._card_1w6vn_1 section{display:block;flex:1 1 auto;min-width:0;width:100%}._card_1w6vn_1 ._head_1w6vn_28{align-items:center;display:flex;gap:var(--shape-spacing-xs);max-width:100%}._card_1w6vn_1 ._head_1w6vn_28 header{flex:1 1 auto;margin:0;min-width:0}._card_1w6vn_1 ._head_1w6vn_28._center_1w6vn_40{align-items:center}._card_1w6vn_1 ._head_1w6vn_28 :is(h1,h2,h3,h4,h5,h6):first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1w6vn_1 ._content_1w6vn_52>:last-child{margin-bottom:0}._card_1w6vn_1 ._preview_1w6vn_58{align-items:center;color:var(--colors-semantic-content-secondary);display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;max-width:100%;min-width:0;white-space:nowrap;width:100%}._card_1w6vn_1 ._preview-leading_1w6vn_69,._card_1w6vn_1 ._preview-trailing_1w6vn_70{align-items:center;display:inline-flex;flex-wrap:nowrap;max-width:-moz-max-content;max-width:max-content;white-space:nowrap}._card_1w6vn_1 ._preview-leading_1w6vn_69:not(:empty){margin-right:var(--shape-spacing-xs)}._card_1w6vn_1 ._preview-trailing_1w6vn_70:not(:empty){margin-left:var(--shape-spacing-xs)}._card_1w6vn_1 ._preview-trailing_1w6vn_70 time{font-size:var(--typography-font-sizes-caption)}._card_1w6vn_1 ._preview-content_1w6vn_90{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1w6vn_1 ._margin_1w6vn_98{margin-top:var(--shape-spacing-xs)}._card_1w6vn_1:has(select),._card_1w6vn_1:has([data-component=popover]){overflow:visible!important}._card_1w6vn_1 [data-component=list]{min-width:0}._card_1w6vn_1 [data-component=list] li{max-width:100%;min-width:0}._card_1w6vn_1 [data-component=list] li>a{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1w6vn_1:has([data-component=messages]){padding-block:0}._card_1w6vn_1 [data-component=messages]{border-top:var(--shape-border-width-default) solid var(--colors-semantic-border-default);margin:0 calc(var(--shape-spacing-md) * -1) calc(var(--shape-spacing-md) * -1)}._outlined_1w6vn_134{border:var(--shape-border-width-default) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md);box-shadow:none}._clickable_1w6vn_140{cursor:pointer}._clickable_1w6vn_140:hover{background-color:var(--colors-semantic-interactive-hover-subtle);box-shadow:var(--shape-box-shadow-sm-position-x) var(--shape-box-shadow-sm-position-y) var(--shape-box-shadow-sm-blur) var(--shape-box-shadow-sm-spread) var(--shape-box-shadow-sm-color)}._muted_1w6vn_151 ._head_1w6vn_28 :is(header,h1,h2,h3,h4,h5,h6){font-weight:var(--font-font-weight-regular)}._muted_1w6vn_151:not(._selected_1w6vn_156){background-color:transparent}._image-top_1w6vn_161{margin-bottom:var(--shape-spacing-md);width:100%}._image-top_1w6vn_161 img{height:var(--shape-image-homepage);-o-object-fit:cover;object-fit:cover}._image-top_1w6vn_161 img,[data-component=croppable]{width:100%}._image-left_1w6vn_176{max-height:calc(8.75 * var(--utils-tokens-unit));max-width:calc(8.75 * var(--utils-tokens-unit));min-height:var(--scale-56);min-width:var(--scale-56)}._image-left_1w6vn_176 img{aspect-ratio:1 / 1}._selected_1w6vn_156,._selected_1w6vn_156:hover{background-color:var(--colors-semantic-interactive-selected);box-shadow:inset 0 0 0 var(--scale-2) var(--colors-semantic-primary-primary-subtle-border)}
|
package/dist/assets/index47.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._download_13q7n_1{color:var(--colors-semantic-content-secondary);text-decoration:none;transition:all var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function)}._download_13q7n_1:hover{background-color:var(--colors-semantic-interactive-hover-subtle)}._download_13q7n_1:active{box-shadow:inset 0 0 0 var(--shape-outline-selected) var(--colors-semantic-primary-primary-subtle-border);transition-duration:0s}._file_13q7n_18{align-items:center;background-color:var(--colors-semantic-bg-surface);border:var(--shape-border-width-default) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-xl);box-shadow:var(--shape-box-shadow-xs-position-x) var(--shape-box-shadow-xs-position-y) var(--shape-box-shadow-xs-blur) var(--shape-box-shadow-xs-spread) var(--shape-box-shadow-xs-color);display:inline-flex;line-height:var(--utils-tokens-unit);max-width:100%;min-width:0}._file_13q7n_18 ._action_13q7n_31,._file_13q7n_18 ._delete_13q7n_32{color:var(--colors-semantic-primary-primary);padding:var(--shape-spacing-xs);transition:background-color var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function) var(--utils-tokens-transition-delay)}._file_13q7n_18 ._action_13q7n_31{align-items:center;background:transparent;border:0;border-radius:var(--utils-tokens-unit);cursor:default;display:inline-flex;flex:1 1 auto;font:inherit;margin:0;max-width:100%;min-width:0;overflow:hidden;text-align:inherit;text-decoration:none}._file_13q7n_18 ._action_13q7n_31[href]:hover,._file_13q7n_18 ._action_13q7n_31[data-actionable=true]:hover,._file_13q7n_18 ._action_13q7n_31[role=document]:hover{cursor:pointer}._file_13q7n_18 ._action_13q7n_31:has(+._download_13q7n_1,+._delete_13q7n_32){border-radius:var(--utils-tokens-unit) 0 0 var(--utils-tokens-unit)}._file_13q7n_18 ._action_13q7n_31:visited{opacity:var(--utils-tokens-opacity-minimal)}._file_13q7n_18>._action_13q7n_31>figure{background:var(--colors-semantic-primary-primary-subtle);border-radius:var(--shape-border-radius-radius-lg);flex:0 0 auto;margin:0 var(--scale-8) 0 0;padding:var(--scale-8)}._file_13q7n_18 ._details_13q7n_78{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}._file_13q7n_18 ._name-line_13q7n_85{display:flex;min-width:0}._file_13q7n_18 ._name_13q7n_85{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._file_13q7n_18 ._extension_13q7n_97{flex:0 0 auto;white-space:nowrap}._file_13q7n_18 ._name_13q7n_85,._file_13q7n_18 ._extension_13q7n_97{border-bottom:solid 1px var(--colors-semantic-primary-primary)}._file_13q7n_18 ._subtitle_13q7n_107{color:var(--colors-semantic-content-tertiary);font-size:var(--typography-font-sizes-body-sm);margin-top:var(--shape-spacing-2xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._file_13q7n_18 ._download_13q7n_1,._file_13q7n_18 ._delete_13q7n_32{border-radius:var(--shape-border-radius-radius-xl);cursor:pointer;flex:0 0 auto;margin-right:var(--shape-spacing-2xs);padding:var(--shape-spacing-md);position:relative}._file_13q7n_18 ._delete_13q7n_32{color:var(--colors-semantic-content-destructive)}._file_13q7n_18 ._delete_13q7n_32:hover{background-color:var(--colors-semantic-interactive-secondary-destructive-hover)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index30.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index30.css');const n=require("react/jsx-runtime"),d=require("classix"),b=require("../badge/index.cjs"),T=require("../checkbox/index.cjs"),g=require("../figure/index.cjs"),k=require("../icon/index.cjs"),y="_card_1w6vn_1",E="_head_1w6vn_28",F="_center_1w6vn_40",I="_content_1w6vn_52",S="_preview_1w6vn_58",$="_margin_1w6vn_98",z="_outlined_1w6vn_134",B="_clickable_1w6vn_140",C="_muted_1w6vn_151",M="_selected_1w6vn_156",e={card:y,head:E,center:F,content:I,preview:S,"preview-leading":"_preview-leading_1w6vn_69","preview-trailing":"_preview-trailing_1w6vn_70","preview-content":"_preview-content_1w6vn_90",margin:$,outlined:z,clickable:B,muted:C,selected:M,"image-top":"_image-top_1w6vn_161","image-left":"_image-left_1w6vn_176"},O=({appearance:w="default",actions:x,badge:o,checkbox:s,className:j,children:u,emphasis:p="default",fullWidth:f=!1,header:_,icon:v,image:a,imagePosition:c="top",onClick:r,onKeyDown:m,preview:l,selected:h=(s==null?void 0:s.checked)??!1,tabIndex:N,variant:i="default",...q})=>n.jsxs("article",{className:d(e.card,w==="outlined"&&e.outlined,p==="muted"&&e.muted,r&&e.clickable,h&&e.selected,j),"data-emphasis":p,"data-minimal":i==="minimal","data-span":f?"all":void 0,...q,onClick:r,onKeyDown:t=>{m==null||m(t),!(t.defaultPrevented||!r)&&t.currentTarget===document.activeElement&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),t.currentTarget.click())},tabIndex:N??(r?0:-1),"data-component":"card",children:[a&&i!=="minimal"&&c==="top"&&n.jsx(g.Figure,{className:e[`image-${c}`],children:a}),n.jsxs("section",{children:[n.jsxs("div",{className:d(e.head,i==="minimal"&&e.center),children:[s&&n.jsx("span",{onClick:t=>t.stopPropagation(),children:n.jsx(T.Checkbox,{...s})}),a&&i!=="minimal"&&c==="left"&&n.jsx(g.Figure,{className:e[`image-${c}`],children:a}),_,o&&n.jsx(b.Badge,{...o}),v&&n.jsx(k.Icon,{name:v,size:"medium"}),x]}),u&&i!=="minimal"&&n.jsx("div",{className:d(e.content,!!_&&e.margin),children:u}),l&&i!=="minimal"&&n.jsxs("div",{className:d(e.preview,!!_&&e.margin),children:[n.jsx("span",{className:e["preview-leading"],children:l.leading}),n.jsx("span",{className:e["preview-content"],children:l.children}),n.jsx("span",{className:e["preview-trailing"],children:l.trailing})]})]})]});exports.Card=O;
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { jsxs as m, jsx as
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import s from "classix";
|
|
3
3
|
import { Badge as $ } from "../badge/index.js";
|
|
4
4
|
import { Checkbox as k } from "../checkbox/index.js";
|
|
5
|
-
import { Figure as
|
|
5
|
+
import { Figure as f } from "../figure/index.js";
|
|
6
6
|
import { Icon as z } from "../icon/index.js";
|
|
7
|
-
import '../../assets/index30.css';const B = "
|
|
7
|
+
import '../../assets/index30.css';const B = "_card_1w6vn_1", F = "_head_1w6vn_28", q = "_center_1w6vn_40", x = "_content_1w6vn_52", y = "_preview_1w6vn_58", A = "_margin_1w6vn_98", C = "_outlined_1w6vn_134", G = "_clickable_1w6vn_140", H = "_muted_1w6vn_151", J = "_selected_1w6vn_156", e = {
|
|
8
8
|
card: B,
|
|
9
9
|
head: F,
|
|
10
10
|
center: q,
|
|
11
11
|
content: x,
|
|
12
12
|
preview: y,
|
|
13
|
-
"preview-leading": "_preview-
|
|
14
|
-
"preview-trailing": "_preview-
|
|
15
|
-
"preview-content": "_preview-
|
|
13
|
+
"preview-leading": "_preview-leading_1w6vn_69",
|
|
14
|
+
"preview-trailing": "_preview-trailing_1w6vn_70",
|
|
15
|
+
"preview-content": "_preview-content_1w6vn_90",
|
|
16
16
|
margin: A,
|
|
17
17
|
outlined: C,
|
|
18
18
|
clickable: G,
|
|
19
19
|
muted: H,
|
|
20
20
|
selected: J,
|
|
21
|
-
"image-top": "_image-
|
|
22
|
-
"image-left": "_image-
|
|
21
|
+
"image-top": "_image-top_1w6vn_161",
|
|
22
|
+
"image-left": "_image-left_1w6vn_176"
|
|
23
23
|
}, U = ({
|
|
24
|
-
appearance:
|
|
25
|
-
actions:
|
|
26
|
-
badge:
|
|
27
|
-
checkbox:
|
|
28
|
-
className:
|
|
24
|
+
appearance: g = "default",
|
|
25
|
+
actions: N,
|
|
26
|
+
badge: p,
|
|
27
|
+
checkbox: i,
|
|
28
|
+
className: h,
|
|
29
29
|
children: v,
|
|
30
30
|
emphasis: u = "default",
|
|
31
31
|
fullWidth: j = !1,
|
|
32
|
-
header:
|
|
33
|
-
icon:
|
|
34
|
-
image:
|
|
35
|
-
imagePosition:
|
|
32
|
+
header: _,
|
|
33
|
+
icon: w,
|
|
34
|
+
image: l,
|
|
35
|
+
imagePosition: r = "top",
|
|
36
36
|
onClick: c,
|
|
37
|
-
onKeyDown:
|
|
37
|
+
onKeyDown: o,
|
|
38
38
|
preview: d,
|
|
39
|
-
selected: E = (
|
|
39
|
+
selected: E = (i == null ? void 0 : i.checked) ?? !1,
|
|
40
40
|
tabIndex: I,
|
|
41
|
-
variant:
|
|
41
|
+
variant: a = "default",
|
|
42
42
|
...T
|
|
43
|
-
}) => /* @__PURE__ */ m("article", { className: s(e.card,
|
|
44
|
-
|
|
43
|
+
}) => /* @__PURE__ */ m("article", { className: s(e.card, g === "outlined" && e.outlined, u === "muted" && e.muted, c && e.clickable, E && e.selected, h), "data-emphasis": u, "data-minimal": a === "minimal", "data-span": j ? "all" : void 0, ...T, onClick: c, onKeyDown: (t) => {
|
|
44
|
+
o == null || o(t), !(t.defaultPrevented || !c) && t.currentTarget === document.activeElement && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.currentTarget.click());
|
|
45
45
|
}, tabIndex: I ?? (c ? 0 : -1), "data-component": "card", children: [
|
|
46
|
-
|
|
46
|
+
l && a !== "minimal" && r === "top" && /* @__PURE__ */ n(f, { className: e[`image-${r}`], children: l }),
|
|
47
47
|
/* @__PURE__ */ m("section", { children: [
|
|
48
|
-
/* @__PURE__ */ m("div", { className: s(e.head,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
/* @__PURE__ */ m("div", { className: s(e.head, a === "minimal" && e.center), children: [
|
|
49
|
+
i && /* @__PURE__ */ n("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ n(k, { ...i }) }),
|
|
50
|
+
l && a !== "minimal" && r === "left" && /* @__PURE__ */ n(f, { className: e[`image-${r}`], children: l }),
|
|
51
|
+
_,
|
|
52
|
+
p && /* @__PURE__ */ n($, { ...p }),
|
|
53
|
+
w && /* @__PURE__ */ n(z, { name: w, size: "medium" }),
|
|
54
|
+
N
|
|
55
55
|
] }),
|
|
56
|
-
v &&
|
|
57
|
-
d &&
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
/* @__PURE__ */
|
|
56
|
+
v && a !== "minimal" && /* @__PURE__ */ n("div", { className: s(e.content, !!_ && e.margin), children: v }),
|
|
57
|
+
d && a !== "minimal" && /* @__PURE__ */ m("div", { className: s(e.preview, !!_ && e.margin), children: [
|
|
58
|
+
/* @__PURE__ */ n("span", { className: e["preview-leading"], children: d.leading }),
|
|
59
|
+
/* @__PURE__ */ n("span", { className: e["preview-content"], children: d.children }),
|
|
60
|
+
/* @__PURE__ */ n("span", { className: e["preview-trailing"], children: d.trailing })
|
|
61
61
|
] })
|
|
62
62
|
] })
|
|
63
63
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index47.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index47.css');const e=require("react/jsx-runtime"),b=require("../figure/index.cjs"),c=require("../icon/index.cjs"),q=require("../button/index.cjs"),F="_download_13q7n_1",g="_file_13q7n_18",I="_action_13q7n_31",P="_details_13q7n_78",w="_name_13q7n_85",v="_extension_13q7n_97",y="_subtitle_13q7n_107",s={download:F,file:g,action:I,delete:"_delete_13q7n_32",details:P,"name-line":"_name-line_13q7n_85",name:w,extension:v,subtitle:y},D={".doc":"FileDoc",".docx":"FileDoc",".pdf":"FilePdf",".ppt":"FilePpt",".pptx":"FilePpt",".xls":"FileXls",".xlsx":"FileXls"},S=({deleteAccessibleLabel:u,name:n,onClick:i,onDelete:r,ref:h,subtitle:d,target:x,url:_,downloadAccessibleLabel:j,downloadUrl:p})=>{const o=n.lastIndexOf("."),m=o>0&&o<n.length-1,f=m?n.slice(0,o):n,l=m?n.slice(o):"",N=D[l.toLowerCase()]??"FileText",a=e.jsxs(e.Fragment,{children:[e.jsx(b.Figure,{children:e.jsx(c.Icon,{name:N})}),e.jsxs("span",{className:s.details,children:[e.jsxs("span",{className:s["name-line"],children:[e.jsx("span",{className:s.name,children:f}),l&&e.jsx("span",{className:s.extension,children:l})]}),d&&e.jsx("span",{className:s.subtitle,children:d})]})]});return e.jsxs("div",{className:s.file,ref:h,"data-component":"file",children:[_?e.jsx("a",{className:s.action,href:_,target:x,rel:x==="_blank"?"noopener noreferrer":void 0,onClick:t=>{t.stopPropagation(),i&&(t.preventDefault(),i())},title:n,children:a}):i?e.jsx("button",{"aria-label":n,className:s.action,"data-actionable":"true","data-print-content":!0,onClick:t=>{t.stopPropagation(),i()},title:n,type:"button",children:a}):e.jsx("div",{className:s.action,title:n,children:a}),p&&e.jsx("a",{"aria-label":j??`Download ${n}`,className:s.download,href:p,onClick:t=>t.stopPropagation(),children:e.jsx(c.Icon,{name:"DownloadSimple",size:"small"})}),r&&e.jsx(q.Button,{"aria-label":u??`Delete ${n}`,className:s.delete,onClick:()=>r(),variant:"tertiary",children:e.jsx(c.Icon,{name:"Trash",size:"small"})})]})};exports.File=S;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Figure as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Button as
|
|
5
|
-
import '../../assets/index47.css';const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsxs as s, jsx as e, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { Figure as w } from "../figure/index.js";
|
|
3
|
+
import { Icon as r } from "../icon/index.js";
|
|
4
|
+
import { Button as P } from "../button/index.js";
|
|
5
|
+
import '../../assets/index47.css';const g = "_download_13q7n_1", D = "_file_13q7n_18", I = "_action_13q7n_31", v = "_details_13q7n_78", y = "_name_13q7n_85", j = "_extension_13q7n_97", k = "_subtitle_13q7n_107", t = {
|
|
6
|
+
download: g,
|
|
7
|
+
file: D,
|
|
8
|
+
action: I,
|
|
9
|
+
delete: "_delete_13q7n_32",
|
|
10
|
+
details: v,
|
|
11
|
+
"name-line": "_name-line_13q7n_85",
|
|
12
|
+
name: y,
|
|
13
|
+
extension: j,
|
|
14
|
+
subtitle: k
|
|
15
|
+
}, z = {
|
|
15
16
|
".doc": "FileDoc",
|
|
16
17
|
".docx": "FileDoc",
|
|
17
18
|
".pdf": "FilePdf",
|
|
@@ -19,34 +20,38 @@ import '../../assets/index47.css';const q = "_file_1uuq9_1", g = "_action_1uuq9_
|
|
|
19
20
|
".pptx": "FilePpt",
|
|
20
21
|
".xls": "FileXls",
|
|
21
22
|
".xlsx": "FileXls"
|
|
22
|
-
},
|
|
23
|
-
deleteAccessibleLabel:
|
|
24
|
-
name:
|
|
25
|
-
onClick:
|
|
26
|
-
onDelete:
|
|
27
|
-
ref:
|
|
28
|
-
subtitle:
|
|
29
|
-
|
|
23
|
+
}, B = ({
|
|
24
|
+
deleteAccessibleLabel: x,
|
|
25
|
+
name: n,
|
|
26
|
+
onClick: a,
|
|
27
|
+
onDelete: d,
|
|
28
|
+
ref: N,
|
|
29
|
+
subtitle: m,
|
|
30
|
+
target: p,
|
|
31
|
+
url: _,
|
|
32
|
+
downloadAccessibleLabel: u,
|
|
33
|
+
downloadUrl: f
|
|
30
34
|
}) => {
|
|
31
|
-
const
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
35
|
+
const o = n.lastIndexOf("."), h = o > 0 && o < n.length - 1, F = h ? n.slice(0, o) : n, i = h ? n.slice(o) : "", b = z[i.toLowerCase()] ?? "FileText", c = /* @__PURE__ */ s(q, { children: [
|
|
36
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(r, { name: b }) }),
|
|
37
|
+
/* @__PURE__ */ s("span", { className: t.details, children: [
|
|
38
|
+
/* @__PURE__ */ s("span", { className: t["name-line"], children: [
|
|
39
|
+
/* @__PURE__ */ e("span", { className: t.name, children: F }),
|
|
40
|
+
i && /* @__PURE__ */ e("span", { className: t.extension, children: i })
|
|
37
41
|
] }),
|
|
38
|
-
|
|
42
|
+
m && /* @__PURE__ */ e("span", { className: t.subtitle, children: m })
|
|
39
43
|
] })
|
|
40
44
|
] });
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
43
|
-
l.stopPropagation(),
|
|
44
|
-
}, title:
|
|
45
|
-
l.stopPropagation(),
|
|
46
|
-
}, title:
|
|
47
|
-
|
|
45
|
+
return /* @__PURE__ */ s("div", { className: t.file, ref: N, "data-component": "file", children: [
|
|
46
|
+
_ ? /* @__PURE__ */ e("a", { className: t.action, href: _, target: p, rel: p === "_blank" ? "noopener noreferrer" : void 0, onClick: (l) => {
|
|
47
|
+
l.stopPropagation(), a && (l.preventDefault(), a());
|
|
48
|
+
}, title: n, children: c }) : a ? /* @__PURE__ */ e("button", { "aria-label": n, className: t.action, "data-actionable": "true", "data-print-content": !0, onClick: (l) => {
|
|
49
|
+
l.stopPropagation(), a();
|
|
50
|
+
}, title: n, type: "button", children: c }) : /* @__PURE__ */ e("div", { className: t.action, title: n, children: c }),
|
|
51
|
+
f && /* @__PURE__ */ e("a", { "aria-label": u ?? `Download ${n}`, className: t.download, href: f, onClick: (l) => l.stopPropagation(), children: /* @__PURE__ */ e(r, { name: "DownloadSimple", size: "small" }) }),
|
|
52
|
+
d && /* @__PURE__ */ e(P, { "aria-label": x ?? `Delete ${n}`, className: t.delete, onClick: () => d(), variant: "tertiary", children: /* @__PURE__ */ e(r, { name: "Trash", size: "small" }) })
|
|
48
53
|
] });
|
|
49
54
|
};
|
|
50
55
|
export {
|
|
51
|
-
|
|
56
|
+
B as File
|
|
52
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const v=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const v=require("react/jsx-runtime"),M=require("classix"),s=require("react");function j(t){const[e,r]=s.useState(null),[f,o]=s.useState(),u=!!t&&f!=null,m=s.useCallback(n=>r(n),[]),l=s.useCallback(()=>{if(!e||!t){o(void 0);return}const n=Array.from(e.children).filter(a=>a instanceof HTMLElement&&getComputedStyle(a).display!=="none"),d=t?n[t-1]:void 0,c=t&&n.length>t&&d?d.getBoundingClientRect().bottom-e.getBoundingClientRect().top+e.scrollTop+(parseFloat(getComputedStyle(e).paddingBottom)||0):void 0;o(a=>a!=null&&c!=null&&Math.abs(a-c)<.5?a:c)},[e,t]);return s.useLayoutEffect(l),s.useLayoutEffect(()=>{if(!e||!t)return;const n=typeof ResizeObserver>"u"?void 0:new ResizeObserver(l),d=()=>{n==null||n.disconnect(),n==null||n.observe(e),Array.from(e.children).forEach(a=>n==null?void 0:n.observe(a)),l()},c=new MutationObserver(d);return c.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden"]}),window.addEventListener("resize",l),d(),()=>{n==null||n.disconnect(),c.disconnect(),window.removeEventListener("resize",l)}},[e,t,l]),{ref:m,isOverflowing:u,visibleHeight:f}}function k(t){return s.isValidElement(t)&&t.type===s.Fragment}function F(t,e=[]){return s.Children.forEach(t,r=>{k(r)?F(r.props.children,e):e.push(r)}),e}function N(t,{wrapper:e="li"}={}){return F(t).filter(o=>o!==null).map((o,u)=>{if(s.isValidElement(o)&&o.type===e)return o;const m=s.isValidElement(o)&&o.key!=null?o.key:u;return s.createElement(e,{key:m,"data-component":"wrapchildren"},o)})}const S="_controls_uue68_1",B="_horizontal_uue68_9",z="_list_uue68_20",H="_columns_uue68_61",q="_masonry_uue68_71",T="_scrollable_uue68_81",V="_overflowing_uue68_88",A="_sized_uue68_111",I="_compact_uue68_123",i={controls:S,horizontal:B,list:z,columns:H,masonry:q,scrollable:T,overflowing:V,sized:A,compact:I},L=(t,e)=>{typeof t=="function"?t(e):t&&(t.current=e)};function D({children:t,className:e,columns:r=1,columnWidth:f,compact:o=!1,controls:u,horizontal:m,layout:l="grid",maxVisibleItems:n,ordered:d,ref:c,style:a,..._}){const y=Number.isFinite(r)?Math.max(1,Math.floor(r)):1,g=l==="grid"&&y===1&&!m&&n!=null&&Number.isFinite(n)&&n>=1?Math.floor(n):void 0,{ref:b,isOverflowing:h,visibleHeight:p}=j(g),w=s.useCallback(R=>{b(R),L(c,R)},[b,c]),E=M(e,i.list,l==="masonry"?i.masonry:y>1&&i.columns,!!g&&i.scrollable,h&&i.overflowing,m&&i.horizontal,o&&i.compact,f&&i.sized),x={...a,"--list-columns":y,"--list-column-width":f,"--list-max-height":g&&p!=null?`${p}px`:void 0},C=d?v.jsx("ol",{className:E,ref:w,style:x,..._,"data-layout":l==="masonry"?"masonry":y>1?"columns":void 0,tabIndex:_.tabIndex??(h?0:void 0),"data-component":"list",children:N(t)}):v.jsx("ul",{className:E,ref:w,style:x,..._,"data-layout":l==="masonry"?"masonry":y>1?"columns":void 0,tabIndex:_.tabIndex??(h?0:void 0),"data-component":"list",children:N(t)});return u==null?C:v.jsxs(v.Fragment,{children:[v.jsx("div",{className:i.controls,"data-component":"list",children:u}),C]})}exports.List=D;
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { jsx as h, jsxs as z, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import S from "classix";
|
|
3
|
-
import m, { useState as F, useCallback as p, useLayoutEffect as
|
|
3
|
+
import m, { useState as F, useCallback as p, useLayoutEffect as M } from "react";
|
|
4
4
|
import '../../assets/index56.css';function V(t) {
|
|
5
|
-
const [n,
|
|
5
|
+
const [n, r] = F(null), [d, o] = F(), i = !!t && d != null, f = p((e) => r(e), []), s = p(() => {
|
|
6
6
|
if (!n || !t) {
|
|
7
7
|
o(void 0);
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
const e = Array.from(n.children).filter((
|
|
11
|
-
o(
|
|
10
|
+
const e = Array.from(n.children).filter((l) => l instanceof HTMLElement && getComputedStyle(l).display !== "none"), u = t ? e[t - 1] : void 0, a = t && e.length > t && u ? u.getBoundingClientRect().bottom - n.getBoundingClientRect().top + n.scrollTop + (parseFloat(getComputedStyle(n).paddingBottom) || 0) : void 0;
|
|
11
|
+
o((l) => l != null && a != null && Math.abs(l - a) < 0.5 ? l : a);
|
|
12
12
|
}, [n, t]);
|
|
13
|
-
return
|
|
13
|
+
return M(s), M(() => {
|
|
14
14
|
if (!n || !t) return;
|
|
15
|
-
const e = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(s),
|
|
16
|
-
e == null || e.disconnect(), e == null || e.observe(n), Array.from(n.children).forEach((
|
|
17
|
-
},
|
|
18
|
-
return
|
|
15
|
+
const e = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(s), u = () => {
|
|
16
|
+
e == null || e.disconnect(), e == null || e.observe(n), Array.from(n.children).forEach((l) => e == null ? void 0 : e.observe(l)), s();
|
|
17
|
+
}, a = new MutationObserver(u);
|
|
18
|
+
return a.observe(n, {
|
|
19
19
|
childList: !0,
|
|
20
20
|
subtree: !0,
|
|
21
21
|
characterData: !0,
|
|
22
22
|
attributes: !0,
|
|
23
23
|
attributeFilter: ["class", "style", "hidden"]
|
|
24
|
-
}), window.addEventListener("resize", s),
|
|
25
|
-
e == null || e.disconnect(),
|
|
24
|
+
}), window.addEventListener("resize", s), u(), () => {
|
|
25
|
+
e == null || e.disconnect(), a.disconnect(), window.removeEventListener("resize", s);
|
|
26
26
|
};
|
|
27
27
|
}, [n, t, s]), {
|
|
28
|
-
ref:
|
|
29
|
-
isOverflowing:
|
|
30
|
-
visibleHeight:
|
|
28
|
+
ref: f,
|
|
29
|
+
isOverflowing: i,
|
|
30
|
+
visibleHeight: d
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function j(t) {
|
|
34
34
|
return m.isValidElement(t) && t.type === m.Fragment;
|
|
35
35
|
}
|
|
36
36
|
function k(t, n = []) {
|
|
37
|
-
return m.Children.forEach(t, (
|
|
38
|
-
j(
|
|
37
|
+
return m.Children.forEach(t, (r) => {
|
|
38
|
+
j(r) ? k(r.props.children, n) : n.push(r);
|
|
39
39
|
}), n;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function B(t, {
|
|
42
42
|
wrapper: n = "li"
|
|
43
43
|
} = {}) {
|
|
44
|
-
return k(t).filter((o) => o !== null).map((o,
|
|
44
|
+
return k(t).filter((o) => o !== null).map((o, i) => {
|
|
45
45
|
if (m.isValidElement(o) && o.type === n)
|
|
46
46
|
return o;
|
|
47
|
-
const
|
|
47
|
+
const f = m.isValidElement(o) && o.key != null ? o.key : i;
|
|
48
48
|
return m.createElement(n, {
|
|
49
|
-
key:
|
|
49
|
+
key: f,
|
|
50
50
|
"data-component": "wrapchildren"
|
|
51
51
|
}, o);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
const A = "_controls_uue68_1", I = "_horizontal_uue68_9", T = "_list_uue68_20", D = "_columns_uue68_61", $ = "_masonry_uue68_71", q = "_scrollable_uue68_81", G = "_overflowing_uue68_88", J = "_sized_uue68_111", K = "_compact_uue68_123",
|
|
54
|
+
const A = "_controls_uue68_1", I = "_horizontal_uue68_9", T = "_list_uue68_20", D = "_columns_uue68_61", $ = "_masonry_uue68_71", q = "_scrollable_uue68_81", G = "_overflowing_uue68_88", J = "_sized_uue68_111", K = "_compact_uue68_123", c = {
|
|
55
55
|
controls: A,
|
|
56
56
|
horizontal: I,
|
|
57
57
|
list: T,
|
|
@@ -67,32 +67,32 @@ const A = "_controls_uue68_1", I = "_horizontal_uue68_9", T = "_list_uue68_20",
|
|
|
67
67
|
function U({
|
|
68
68
|
children: t,
|
|
69
69
|
className: n,
|
|
70
|
-
columns:
|
|
71
|
-
columnWidth:
|
|
70
|
+
columns: r = 1,
|
|
71
|
+
columnWidth: d,
|
|
72
72
|
compact: o = !1,
|
|
73
|
-
controls:
|
|
74
|
-
horizontal:
|
|
73
|
+
controls: i,
|
|
74
|
+
horizontal: f,
|
|
75
75
|
layout: s = "grid",
|
|
76
76
|
maxVisibleItems: e,
|
|
77
|
-
ordered:
|
|
78
|
-
ref:
|
|
79
|
-
style:
|
|
77
|
+
ordered: u,
|
|
78
|
+
ref: a,
|
|
79
|
+
style: l,
|
|
80
80
|
...v
|
|
81
81
|
}) {
|
|
82
|
-
const _ = Number.isFinite(
|
|
82
|
+
const _ = Number.isFinite(r) ? Math.max(1, Math.floor(r)) : 1, y = s === "grid" && _ === 1 && !f && e != null && Number.isFinite(e) && e >= 1 ? Math.floor(e) : void 0, {
|
|
83
83
|
ref: b,
|
|
84
84
|
isOverflowing: g,
|
|
85
85
|
visibleHeight: w
|
|
86
86
|
} = V(y), E = p((R) => {
|
|
87
|
-
b(R), L(
|
|
88
|
-
}, [b,
|
|
89
|
-
...
|
|
87
|
+
b(R), L(a, R);
|
|
88
|
+
}, [b, a]), x = S(n, c.list, s === "masonry" ? c.masonry : _ > 1 && c.columns, !!y && c.scrollable, g && c.overflowing, f && c.horizontal, o && c.compact, d && c.sized), C = {
|
|
89
|
+
...l,
|
|
90
90
|
"--list-columns": _,
|
|
91
|
-
"--list-column-width":
|
|
91
|
+
"--list-column-width": d,
|
|
92
92
|
"--list-max-height": y && w != null ? `${w}px` : void 0
|
|
93
|
-
}, N =
|
|
94
|
-
return
|
|
95
|
-
/* @__PURE__ */ h("div", { className:
|
|
93
|
+
}, N = u ? /* @__PURE__ */ h("ol", { className: x, ref: E, style: C, ...v, "data-layout": s === "masonry" ? "masonry" : _ > 1 ? "columns" : void 0, tabIndex: v.tabIndex ?? (g ? 0 : void 0), "data-component": "list", children: B(t) }) : /* @__PURE__ */ h("ul", { className: x, ref: E, style: C, ...v, "data-layout": s === "masonry" ? "masonry" : _ > 1 ? "columns" : void 0, tabIndex: v.tabIndex ?? (g ? 0 : void 0), "data-component": "list", children: B(t) });
|
|
94
|
+
return i == null ? N : /* @__PURE__ */ z(H, { children: [
|
|
95
|
+
/* @__PURE__ */ h("div", { className: c.controls, "data-component": "list", children: i }),
|
|
96
96
|
N
|
|
97
97
|
] });
|
|
98
98
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -442,7 +442,7 @@ declare type FigureProps = {
|
|
|
442
442
|
variant?: 'default' | 'preview';
|
|
443
443
|
};
|
|
444
444
|
|
|
445
|
-
declare const File_2: ({ deleteAccessibleLabel, name, onClick, onDelete, ref, subtitle, url, }: FileProps) => JSX.Element;
|
|
445
|
+
declare const File_2: ({ deleteAccessibleLabel, name, onClick, onDelete, ref, subtitle, target, url, downloadAccessibleLabel, downloadUrl, }: FileProps) => JSX.Element;
|
|
446
446
|
export { File_2 as File }
|
|
447
447
|
|
|
448
448
|
declare type FileProps = React.ComponentPropsWithRef<'div'> & {
|
|
@@ -451,7 +451,10 @@ declare type FileProps = React.ComponentPropsWithRef<'div'> & {
|
|
|
451
451
|
onClick?: () => void;
|
|
452
452
|
onDelete?: () => void;
|
|
453
453
|
subtitle?: string;
|
|
454
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
454
455
|
url?: string;
|
|
456
|
+
downloadAccessibleLabel?: string;
|
|
457
|
+
downloadUrl?: string;
|
|
455
458
|
};
|
|
456
459
|
|
|
457
460
|
export declare const Footer: ({ animation, children, className, variant, ...props }: FooterProps) => JSX.Element;
|
package/dist/tokens.json
CHANGED