@solibo/solibo-ui 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/assets/index28.css +1 -1
  2. package/dist/assets/index32.css +1 -1
  3. package/dist/assets/index38.css +1 -1
  4. package/dist/assets/index52.css +1 -1
  5. package/dist/assets/index56.css +1 -1
  6. package/dist/components/badge/index.cjs +1 -1
  7. package/dist/components/badge/index.js +40 -38
  8. package/dist/components/card/index.cjs +1 -1
  9. package/dist/components/card/index.js +41 -41
  10. package/dist/components/checkbox/index.cjs +1 -1
  11. package/dist/components/checkbox/index.js +1 -1
  12. package/dist/components/croppable/index.cjs +1 -1
  13. package/dist/components/croppable/index.js +269 -233
  14. package/dist/components/dropdown/index.cjs +1 -1
  15. package/dist/components/dropdown/index.js +3 -3
  16. package/dist/components/editor/index.cjs +1 -1
  17. package/dist/components/editor/index.js +1 -1
  18. package/dist/components/icon/index.cjs +1 -1
  19. package/dist/components/icon/index.js +1 -1
  20. package/dist/components/input/index.cjs +1 -1
  21. package/dist/components/input/index.js +2 -2
  22. package/dist/components/list/index.cjs +1 -1
  23. package/dist/components/list/index.js +11 -11
  24. package/dist/components/nav/index.cjs +1 -1
  25. package/dist/components/nav/index.js +1 -1
  26. package/dist/components/search/index.cjs +1 -1
  27. package/dist/components/search/index.js +1 -1
  28. package/dist/components/select/index.cjs +1 -1
  29. package/dist/components/select/index.js +2 -2
  30. package/dist/components/toolbar/index.cjs +1 -1
  31. package/dist/components/toolbar/index.js +4 -4
  32. package/dist/icons-BIdcCH-v.cjs +2 -0
  33. package/dist/{icons-CTtWkF6z.js → icons-DVeBguFb.js} +6 -3
  34. package/dist/{index-O1kh8Vnq.cjs → index-7blZaPiA.cjs} +2 -2
  35. package/dist/{index-BlirPoN9.js → index-Dd20d_9U.js} +2 -2
  36. package/dist/{index-C3NJXvlq.js → index-Dx-KtGBg.js} +2 -2
  37. package/dist/{index-CireNaZt.cjs → index-VLDsM9it.cjs} +2 -2
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.ts +12 -3
  40. package/dist/index.js +2 -2
  41. package/dist/tokens.json +1 -1
  42. package/package.json +1 -1
  43. package/dist/icons-B3hIY9Bm.cjs +0 -2
@@ -1 +1 @@
1
- ._badge_1w0ss_1{align-items:center;background-color:var(--colors-semantic-bg-overlay);border-radius:var(--scale-32);color:var(--colors-semantic-content-secondary);display:inline-flex;font-size:var(--typography-font-sizes-label-sm);gap:var(--scale-4);height:-moz-fit-content;height:fit-content;max-width:calc(2 * var(--scale-96));padding:var(--shape-spacing-3xs) var(--shape-spacing-2xs);width:-moz-fit-content;width:fit-content}._badge_1w0ss_1 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._badge_1w0ss_1._highlight_1w0ss_20{background-color:var(--colors-semantic-content-highlight);color:var(--colors-semantic-primary-on-primary-subtle);font-weight:var(--font-font-weight-semibold)}._badge_1w0ss_1._info_1w0ss_26{background-color:var(--colors-semantic-status-info-bg);color:var(--colors-semantic-status-info-content)}._badge_1w0ss_1._primary_1w0ss_31{background-color:var(--colors-semantic-primary-primary-subtle);color:var(--colors-semantic-primary-primary)}._badge_1w0ss_1._success_1w0ss_36{background-color:var(--colors-semantic-status-success-bg);color:var(--colors-semantic-status-success-content)}._badge_1w0ss_1._warning_1w0ss_41{background-color:var(--colors-semantic-status-warning-bg);color:var(--colors-semantic-status-warning-content)}._badge_1w0ss_1._color-1_1w0ss_46{background-color:var(--colors-categories-bg-grey-2);color:var(--colors-categories-content-on-grey)}._badge_1w0ss_1._color-2_1w0ss_51,._badge_1w0ss_1._color-yellow_1w0ss_52{background-color:var(--colors-categories-bg-pink-1);color:var(--colors-categories-content-on-pink)}._badge_1w0ss_1._color-3_1w0ss_57,._badge_1w0ss_1._color-peach_1w0ss_58{background-color:var(--colors-categories-bg-pink-2);color:var(--colors-categories-content-on-pink)}._badge_1w0ss_1._color-4_1w0ss_63,._badge_1w0ss_1._color-magenta_1w0ss_64{background-color:var(--colors-categories-bg-pink-3);color:var(--colors-categories-content-on-pink)}._badge_1w0ss_1._color-5_1w0ss_69,._badge_1w0ss_1._color-purple_1w0ss_70{background-color:var(--colors-categories-bg-pink-5);color:var(--colors-categories-content-on-pink)}._badge_1w0ss_1._color-6_1w0ss_75,._badge_1w0ss_1._color-blue_1w0ss_76{background-color:var(--colors-categories-bg-yellow-1);color:var(--colors-categories-content-on-yellow)}._badge_1w0ss_1._color-7_1w0ss_81,._badge_1w0ss_1._color-green_1w0ss_82{background-color:var(--colors-categories-bg-yellow-2);color:var(--colors-categories-content-on-yellow)}
1
+ ._badge_1b5u6_1{align-items:center;background-color:var(--colors-semantic-bg-overlay);border-radius:var(--scale-32);color:var(--colors-semantic-content-secondary);display:inline-flex;font-size:var(--typography-font-sizes-label-lg);gap:var(--scale-4);height:-moz-fit-content;height:fit-content;max-width:calc(2 * var(--scale-96));padding:var(--shape-spacing-2xs) var(--shape-spacing-xs);width:-moz-fit-content;width:fit-content}._badge_1b5u6_1 span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._badge_1b5u6_1._small_1b5u6_20{font-size:var(--typography-font-sizes-label-sm);padding:var(--shape-spacing-3xs) var(--shape-spacing-2xs)}._badge_1b5u6_1._highlight_1b5u6_25{background-color:var(--colors-semantic-content-highlight);color:var(--colors-semantic-primary-on-primary-subtle);font-weight:var(--font-font-weight-semibold)}._badge_1b5u6_1._info_1b5u6_31{background-color:var(--colors-semantic-status-info-bg);color:var(--colors-semantic-status-info-content)}._badge_1b5u6_1._primary_1b5u6_36{background-color:var(--colors-semantic-primary-primary-subtle);color:var(--colors-semantic-primary-primary)}._badge_1b5u6_1._success_1b5u6_41{background-color:var(--colors-semantic-status-success-bg);color:var(--colors-semantic-status-success-content)}._badge_1b5u6_1._warning_1b5u6_46{background-color:var(--colors-semantic-status-warning-bg);color:var(--colors-semantic-status-warning-content)}._badge_1b5u6_1._color-1_1b5u6_51{background-color:var(--colors-categories-bg-grey-2);color:var(--colors-categories-content-on-grey)}._badge_1b5u6_1._color-2_1b5u6_56,._badge_1b5u6_1._color-yellow_1b5u6_57{background-color:var(--colors-categories-bg-pink-1);color:var(--colors-categories-content-on-pink)}._badge_1b5u6_1._color-3_1b5u6_62,._badge_1b5u6_1._color-peach_1b5u6_63{background-color:var(--colors-categories-bg-pink-2);color:var(--colors-categories-content-on-pink)}._badge_1b5u6_1._color-4_1b5u6_68,._badge_1b5u6_1._color-magenta_1b5u6_69{background-color:var(--colors-categories-bg-pink-3);color:var(--colors-categories-content-on-pink)}._badge_1b5u6_1._color-5_1b5u6_74,._badge_1b5u6_1._color-purple_1b5u6_75{background-color:var(--colors-categories-bg-pink-5);color:var(--colors-categories-content-on-pink)}._badge_1b5u6_1._color-6_1b5u6_80,._badge_1b5u6_1._color-blue_1b5u6_81{background-color:var(--colors-categories-bg-yellow-1);color:var(--colors-categories-content-on-yellow)}._badge_1b5u6_1._color-7_1b5u6_86,._badge_1b5u6_1._color-green_1b5u6_87{background-color:var(--colors-categories-bg-yellow-2);color:var(--colors-categories-content-on-yellow)}
@@ -1 +1 @@
1
- ._card_158ul_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_158ul_1 section{display:block;flex:1 1 auto;min-width:0;width:100%}._card_158ul_1 ._head_158ul_28{align-items:center;display:flex;gap:var(--shape-spacing-xs);max-width:100%}._card_158ul_1 ._head_158ul_28 header{flex:1 1 auto;margin:0;min-width:0}._card_158ul_1 ._head_158ul_28._center_158ul_40{align-items:center}._card_158ul_1 ._head_158ul_28 :is(h1,h2,h3,h4,h5,h6):first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_158ul_1 ._content_158ul_52>:last-child{margin-bottom:0}._card_158ul_1 ._preview_158ul_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_158ul_1 ._preview-leading_158ul_69,._card_158ul_1 ._preview-trailing_158ul_70{align-items:center;display:inline-flex;flex-wrap:nowrap;max-width:-moz-max-content;max-width:max-content;white-space:nowrap}._card_158ul_1 ._preview-leading_158ul_69:not(:empty){margin-right:var(--shape-spacing-xs)}._card_158ul_1 ._preview-trailing_158ul_70:not(:empty){margin-left:var(--shape-spacing-xs)}._card_158ul_1 ._preview-trailing_158ul_70 time{font-size:var(--typography-font-sizes-caption)}._card_158ul_1 ._preview-content_158ul_90{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_158ul_1 ._margin_158ul_98{margin-top:var(--shape-spacing-xs)}._card_158ul_1:has(select),._card_158ul_1:has([data-component=popover]){overflow:visible!important}._card_158ul_1 [data-component=croppable]{width:100%}._card_158ul_1 [data-component=list]{min-width:0}._card_158ul_1 [data-component=list] li{max-width:100%;min-width:0}._card_158ul_1 [data-component=list] li>a{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_158ul_1 [data-component=list] li>[data-component=file]{width:100%}._card_158ul_1:has([data-component=messages]){padding-block:0}._card_158ul_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_158ul_143{border:var(--shape-border-width-default) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md);box-shadow:none}._clickable_158ul_149{cursor:pointer}._clickable_158ul_149: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_158ul_160 ._head_158ul_28 :is(header,h1,h2,h3,h4,h5,h6){font-weight:var(--font-font-weight-regular)}._muted_158ul_160:not(._selected_158ul_165){background-color:transparent}._image-top_158ul_170{margin-bottom:var(--shape-spacing-md);width:100%}._image-top_158ul_170 img{height:calc(12.5 * var(--utils-tokens-unit));-o-object-fit:cover;object-fit:cover;width:100%}._image-left_158ul_181{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_158ul_181 img{aspect-ratio:1 / 1}._selected_158ul_165,._selected_158ul_165:hover{background-color:var(--colors-semantic-interactive-selected);box-shadow:inset 0 0 0 var(--scale-2) var(--colors-semantic-primary-primary-subtle-border)}
1
+ ._card_1pyj3_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_1pyj3_1 section{display:block;flex:1 1 auto;min-width:0;width:100%}._card_1pyj3_1 ._head_1pyj3_28{align-items:center;display:flex;gap:var(--shape-spacing-xs);max-width:100%}._card_1pyj3_1 ._head_1pyj3_28 header{flex:1 1 auto;margin:0;min-width:0}._card_1pyj3_1 ._head_1pyj3_28._center_1pyj3_40{align-items:center}._card_1pyj3_1 ._head_1pyj3_28 :is(h1,h2,h3,h4,h5,h6):first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1pyj3_1 ._content_1pyj3_52>:last-child{margin-bottom:0}._card_1pyj3_1 ._preview_1pyj3_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_1pyj3_1 ._preview-leading_1pyj3_69,._card_1pyj3_1 ._preview-trailing_1pyj3_70{align-items:center;display:inline-flex;flex-wrap:nowrap;max-width:-moz-max-content;max-width:max-content;white-space:nowrap}._card_1pyj3_1 ._preview-leading_1pyj3_69:not(:empty){margin-right:var(--shape-spacing-xs)}._card_1pyj3_1 ._preview-trailing_1pyj3_70:not(:empty){margin-left:var(--shape-spacing-xs)}._card_1pyj3_1 ._preview-trailing_1pyj3_70 time{font-size:var(--typography-font-sizes-caption)}._card_1pyj3_1 ._preview-content_1pyj3_90{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1pyj3_1 ._margin_1pyj3_98{margin-top:var(--shape-spacing-xs)}._card_1pyj3_1:has(select),._card_1pyj3_1:has([data-component=popover]){overflow:visible!important}._card_1pyj3_1 [data-component=croppable]{width:100%}._card_1pyj3_1 [data-component=list]{min-width:0}._card_1pyj3_1 [data-component=list] li{max-width:100%;min-width:0}._card_1pyj3_1 [data-component=list] li>a{max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._card_1pyj3_1 [data-component=list] li>[data-component=file]{width:100%}._card_1pyj3_1:has([data-component=messages]){padding-block:0}._card_1pyj3_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_1pyj3_142{border:var(--shape-border-width-default) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md);box-shadow:none}._clickable_1pyj3_148{cursor:pointer}._clickable_1pyj3_148: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_1pyj3_159 ._head_1pyj3_28 :is(header,h1,h2,h3,h4,h5,h6){font-weight:var(--font-font-weight-regular)}._muted_1pyj3_159:not(._selected_1pyj3_164){background-color:transparent}._image-top_1pyj3_169{margin-bottom:var(--shape-spacing-md);width:100%}._image-top_1pyj3_169 img{height:calc(12.5 * var(--utils-tokens-unit));-o-object-fit:cover;object-fit:cover;width:100%}._image-left_1pyj3_180{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_1pyj3_180 img{aspect-ratio:1 / 1}._selected_1pyj3_164,._selected_1pyj3_164:hover{background-color:var(--colors-semantic-interactive-selected);box-shadow:inset 0 0 0 var(--scale-2) var(--colors-semantic-primary-primary-subtle-border)}
@@ -1 +1 @@
1
- ._croppable_1kqo4_1{align-items:center;background-color:var(--colors-semantic-bg-overlay);display:flex;justify-content:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}._croppable_1kqo4_1 input[type=file]{display:none}._empty_1kqo4_14{align-items:center;display:flex;flex-direction:column;gap:var(--utils-tokens-unit);text-align:center}._media_1kqo4_22{align-items:center;display:flex;height:100%;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute;transform:translate(var(--croppable-x, 0),var(--croppable-y, 0));width:100%}._overlay_1kqo4_33{align-items:center;display:flex;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute}._viewport_1kqo4_41{align-items:center;display:flex;height:var(--croppable-height, calc(12 * var(--utils-tokens-unit)));justify-content:center;overflow:hidden;overscroll-behavior:none;position:relative;touch-action:none;width:100%}._draggable_1kqo4_53{cursor:move}._dragging_1kqo4_57{cursor:grabbing}._inner_1kqo4_61{height:var(--croppable-image-height, 100%);transform:scale(var(--croppable-zoom, 1));transform-origin:center;width:var(--croppable-image-width, 100%)}._inner_1kqo4_61 img,._inner_1kqo4_61 picture,._inner_1kqo4_61 video{-webkit-user-drag:none;height:100%;user-drag:none;width:100%}._standalone_1kqo4_77{border-radius:var(--shape-border-radius-radius-md)}
1
+ ._croppable_sjc2z_1{align-items:center;background-color:var(--colors-semantic-bg-overlay);display:flex;justify-content:center;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}._croppable_sjc2z_1 input[type=file]{display:none}._empty_sjc2z_15{align-items:center;display:flex;flex-direction:column;gap:var(--utils-tokens-unit);text-align:center}._action_sjc2z_23{align-items:center;display:inline-flex;flex-direction:column;padding:var(--shape-spacing-2xs);vertical-align:bottom}._caption_sjc2z_31{color:var(--colors-semantic-content-secondary);font-size:var(--typography-font-sizes-caption);line-height:1.4;text-align:center}._media_sjc2z_38{align-items:center;display:flex;height:100%;top:0;right:0;bottom:0;left:0;justify-content:center;position:absolute;transform:translate(var(--croppable-x, 0),var(--croppable-y, 0));width:100%}._viewport_sjc2z_49{align-items:center;display:flex;height:var(--croppable-height, calc(12 * var(--utils-tokens-unit)));justify-content:center;overflow:hidden;overscroll-behavior:none;position:relative;touch-action:none;width:100%}._draggable_sjc2z_61{cursor:move}._dragging_sjc2z_65{cursor:grabbing}._inner_sjc2z_69{height:var(--croppable-image-height, 100%);transform:scale(var(--croppable-zoom, 1));transform-origin:center;width:var(--croppable-image-width, 100%)}._inner_sjc2z_69 img,._inner_sjc2z_69 picture,._inner_sjc2z_69 video{-webkit-user-drag:none;height:100%;user-drag:none;width:100%}._standalone_sjc2z_85{border-radius:var(--shape-border-radius-radius-md)}
@@ -1 +1 @@
1
- ._controls_1mogm_1{align-items:center;display:flex;justify-content:space-between;margin-top:var(--shape-spacing-xs);padding-left:var(--shape-spacing-md)}._horizontal_1mogm_9{display:block}._horizontal_1mogm_9>li{display:inline-block;margin-right:var(--utils-tokens-unit);max-width:100%;min-width:0}._list_1mogm_20{display:block;list-style-type:none;min-width:0;padding-left:0}._list_1mogm_20>li{-moz-column-break-inside:avoid;break-inside:avoid;list-style:none;margin-bottom:var(--utils-tokens-unit);max-width:100%;min-width:0;padding-left:0}._list_1mogm_20>li>li,._list_1mogm_20>li>details li{margin-left:var(--utils-tokens-unit)}._list_1mogm_20>li>section{border-bottom:var(--scale-1) solid var(--colors-semantic-border-default)}._list_1mogm_20>li>section:first-child{border-top:var(--scale-1) solid var(--colors-semantic-border-default)}._list_1mogm_20>li>section:last-of-type{border-bottom:none}._list_1mogm_20>li:has([data-span=all]){grid-column:1 / -1}._list_1mogm_20>li[data-component=dropdown]{margin-bottom:var(--shape-spacing-2xs)}._list_1mogm_20._columns_1mogm_60{display:grid;grid-template-columns:repeat(var(--list-columns, 2),minmax(0,1fr));-moz-column-gap:var(--utils-tokens-unit);column-gap:var(--utils-tokens-unit)}._list_1mogm_20._columns_1mogm_60>li{display:grid}._list_1mogm_20._masonry_1mogm_70{-moz-column-count:var(--list-columns, 1);column-count:var(--list-columns, 1);-moz-column-gap:var(--utils-tokens-unit);column-gap:var(--utils-tokens-unit)}._list_1mogm_20._masonry_1mogm_70>li{-moz-column-break-inside:avoid;break-inside:avoid;display:flow-root}._list_1mogm_20._scrollable_1mogm_80{display:flex;flex-direction:column;gap:var(--utils-tokens-unit);max-height:var(--list-max-height, none);overflow-y:auto}._list_1mogm_20._scrollable_1mogm_80._overflowing_1mogm_87{padding-block:var(--shape-spacing-xs);padding-inline-end:var(--shape-spacing-xs)}._list_1mogm_20._scrollable_1mogm_80>li{flex:none;margin-bottom:0}._list_1mogm_20._masonry_1mogm_70>li:empty,._list_1mogm_20._scrollable_1mogm_80>li:empty{display:none}._list_1mogm_20:not(._columns_1mogm_60)>li:last-child{margin-bottom:0}._sized_1mogm_110{max-width:calc(var(--list-columns) * var(--list-column-width) + (var(--list-columns) - 1) * var(--utils-tokens-unit));width:100%}@media (width <= 1024px){._sized_1mogm_110{max-width:var(--list-column-width)}}._compact_1mogm_122._scrollable_1mogm_80{gap:var(--shape-spacing-xs)}._compact_1mogm_122._scrollable_1mogm_80._overflowing_1mogm_87{gap:calc(var(--shape-spacing-xs) + var(--scale-4))}._compact_1mogm_122>li{margin-bottom:var(--shape-spacing-xs)}._list_1mogm_20>li:has(>._list_1mogm_20:last-child){margin-bottom:0}._list_1mogm_20>li>._list_1mogm_20{margin:0}@media (width <= 1024px){._columns_1mogm_60{grid-template-columns:1fr!important}._list_1mogm_20._masonry_1mogm_70{-moz-column-count:1;column-count:1}}
1
+ ._controls_uue68_1{align-items:center;display:flex;justify-content:space-between;margin-top:var(--shape-spacing-xs);padding-left:var(--shape-spacing-md)}._horizontal_uue68_9{display:block}._horizontal_uue68_9>li{display:inline-block;margin-right:var(--utils-tokens-unit);max-width:100%;min-width:0}._list_uue68_20{display:block;list-style-type:none;max-width:100%;min-width:0;padding-left:0}._list_uue68_20>li{-moz-column-break-inside:avoid;break-inside:avoid;list-style:none;margin-bottom:var(--utils-tokens-unit);max-width:100%;min-width:0;padding-left:0}._list_uue68_20>li>li,._list_uue68_20>li>details li{margin-left:var(--utils-tokens-unit)}._list_uue68_20>li>section{border-bottom:var(--scale-1) solid var(--colors-semantic-border-default)}._list_uue68_20>li>section:first-child{border-top:var(--scale-1) solid var(--colors-semantic-border-default)}._list_uue68_20>li>section:last-of-type{border-bottom:none}._list_uue68_20>li:has([data-span=all]){grid-column:1 / -1}._list_uue68_20>li[data-component=dropdown]{margin-bottom:var(--shape-spacing-2xs)}._list_uue68_20._columns_uue68_61{display:grid;grid-template-columns:repeat(var(--list-columns, 2),minmax(0,1fr));-moz-column-gap:var(--utils-tokens-unit);column-gap:var(--utils-tokens-unit)}._list_uue68_20._columns_uue68_61>li{display:grid}._list_uue68_20._masonry_uue68_71{-moz-column-count:var(--list-columns, 1);column-count:var(--list-columns, 1);-moz-column-gap:var(--utils-tokens-unit);column-gap:var(--utils-tokens-unit)}._list_uue68_20._masonry_uue68_71>li{-moz-column-break-inside:avoid;break-inside:avoid;display:flow-root}._list_uue68_20._scrollable_uue68_81{display:flex;flex-direction:column;gap:var(--utils-tokens-unit);max-height:var(--list-max-height, none);overflow-y:auto}._list_uue68_20._scrollable_uue68_81._overflowing_uue68_88{padding-block:var(--shape-spacing-xs);padding-inline-end:var(--shape-spacing-xs)}._list_uue68_20._scrollable_uue68_81>li{flex:none;margin-bottom:0}._list_uue68_20._masonry_uue68_71>li:empty,._list_uue68_20._scrollable_uue68_81>li:empty{display:none}._list_uue68_20:not(._columns_uue68_61)>li:last-child{margin-bottom:0}._sized_uue68_111{max-width:calc(var(--list-columns) * var(--list-column-width) + (var(--list-columns) - 1) * var(--utils-tokens-unit));width:100%}@media (width <= 1024px){._sized_uue68_111{max-width:var(--list-column-width)}}._compact_uue68_123._scrollable_uue68_81{gap:var(--shape-spacing-xs)}._compact_uue68_123._scrollable_uue68_81._overflowing_uue68_88{gap:calc(var(--shape-spacing-xs) + var(--scale-4))}._compact_uue68_123>li{margin-bottom:var(--shape-spacing-xs)}._list_uue68_20>li:has(>._list_uue68_20:last-child){margin-bottom:0}._list_uue68_20>li>._list_uue68_20{margin:0}@media (width <= 1024px){._columns_uue68_61{grid-template-columns:1fr!important}._list_uue68_20._masonry_uue68_71{-moz-column-count:1;column-count:1}}
@@ -1 +1 @@
1
- ._toolbar_vp38k_1{-webkit-backdrop-filter:blur(var(--scale-4));backdrop-filter:blur(var(--scale-4));background-color:var(--colors-translucent);border:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md);position:absolute;right:var(--scale-4);top:var(--scale-4)}._toolbar_vp38k_1 [data-component=button]{margin:var(--shape-outline-focus) calc(var(--shape-outline-focus) / 2)}._toolbar_vp38k_1 [data-component=button]:first-of-type{margin-left:var(--shape-outline-focus)}._toolbar_vp38k_1 [data-component=button][data-active=true]{background-color:var(--colors-semantic-interactive-selected);box-shadow:inset 0 0 var(--scale-2) var(--colors-semantic-primary-primary-active)}._toolbar_vp38k_1 [data-component=button][data-active=true] [data-component=icon]{background-color:var(--colors-semantic-primary-primary-active)}._default_vp38k_28 button{border-radius:var(--shape-border-radius-radius-md)}._editor_vp38k_34{align-items:center;background-color:var(--colors-semantic-bg-page);border:none;border-bottom:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md) var(--shape-border-radius-radius-md) 0 0;display:flex;flex-wrap:wrap;overflow:hidden;position:initial;right:0;top:0}._editor_vp38k_34>[data-component=button]:last-of-type{margin-right:var(--shape-spacing-2xs)}@media (width < 480px){._editor_vp38k_34>[data-component=button]:last-of-type *{display:none}._editor_vp38k_34>[data-component=button]:last-of-type [data-component=icon]{display:block}}
1
+ ._toolbar_11xk1_1{-webkit-backdrop-filter:blur(var(--scale-4));backdrop-filter:blur(var(--scale-4));background-color:#fff8;border:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md);position:absolute;right:var(--shape-spacing-xs);bottom:var(--shape-spacing-xs)}._toolbar_11xk1_1 [data-component=button]{margin:var(--shape-outline-focus) calc(var(--shape-outline-focus) / 2)}._toolbar_11xk1_1 [data-component=button]:first-of-type{margin-left:var(--shape-outline-focus)}._toolbar_11xk1_1 [data-component=button][data-active=true]{background-color:var(--colors-semantic-interactive-selected);box-shadow:inset 0 0 var(--scale-2) var(--colors-semantic-primary-primary-active)}._toolbar_11xk1_1 [data-component=button][data-active=true] [data-component=icon]{background-color:var(--colors-semantic-primary-primary-active)}._default_11xk1_28 button{border-radius:var(--shape-border-radius-radius-md)}._editor_11xk1_34{align-items:center;background-color:var(--colors-semantic-bg-page);border:none;border-bottom:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-md) var(--shape-border-radius-radius-md) 0 0;display:flex;flex-wrap:wrap;overflow:hidden;position:initial;right:0;top:0}._editor_11xk1_34>[data-component=button]:last-of-type{margin-right:var(--shape-spacing-2xs)}@media (width < 480px){._editor_11xk1_34>[data-component=button]:last-of-type *{display:none}._editor_11xk1_34>[data-component=button]:last-of-type [data-component=icon]{display:block}}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index28.css');const r=require("react/jsx-runtime"),a=require("classix"),e=require("../icon/index.cjs"),t="_badge_1w0ss_1",i="_highlight_1w0ss_20",g="_info_1w0ss_26",w="_primary_1w0ss_31",u="_success_1w0ss_36",h="_warning_1w0ss_41",s={badge:t,highlight:i,info:g,primary:w,success:u,warning:h,"color-1":"_color-1_1w0ss_46","color-2":"_color-2_1w0ss_51","color-yellow":"_color-yellow_1w0ss_52","color-3":"_color-3_1w0ss_57","color-peach":"_color-peach_1w0ss_58","color-4":"_color-4_1w0ss_63","color-magenta":"_color-magenta_1w0ss_64","color-5":"_color-5_1w0ss_69","color-purple":"_color-purple_1w0ss_70","color-6":"_color-6_1w0ss_75","color-blue":"_color-blue_1w0ss_76","color-7":"_color-7_1w0ss_81","color-green":"_color-green_1w0ss_82"},m={default:s.default,highlight:s.highlight,info:s.info,primary:s.primary,success:s.success,warning:s.warning},p=({color:l,children:_,icon:o,position:c="left",variant:n="default"})=>_===0||_==null?null:r.jsxs("span",{className:a(s.badge,m[n],l&&s[`color-${l}`]),"data-component":"badge",children:[o&&c=="left"&&r.jsx(e.Icon,{name:o,size:"small"}),r.jsx("span",{children:_}),o&&c=="right"&&r.jsx(e.Icon,{name:o,size:"small"})]});exports.Badge=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index28.css');const _=require("react/jsx-runtime"),u=require("classix"),s=require("../icon/index.cjs"),t="_badge_1b5u6_1",i="_small_1b5u6_20",g="_highlight_1b5u6_25",b="_info_1b5u6_31",m="_primary_1b5u6_36",h="_success_1b5u6_41",p="_warning_1b5u6_46",o={badge:t,small:i,highlight:g,info:b,primary:m,success:h,warning:p,"color-1":"_color-1_1b5u6_51","color-2":"_color-2_1b5u6_56","color-yellow":"_color-yellow_1b5u6_57","color-3":"_color-3_1b5u6_62","color-peach":"_color-peach_1b5u6_63","color-4":"_color-4_1b5u6_68","color-magenta":"_color-magenta_1b5u6_69","color-5":"_color-5_1b5u6_74","color-purple":"_color-purple_1b5u6_75","color-6":"_color-6_1b5u6_80","color-blue":"_color-blue_1b5u6_81","color-7":"_color-7_1b5u6_86","color-green":"_color-green_1b5u6_87"},d={default:o.default,highlight:o.highlight,info:o.info,primary:o.primary,success:o.success,warning:o.warning},f=({color:e,children:r,icon:l,position:c="left",size:n="large",variant:a="default"})=>r===0||r==null?null:_.jsxs("span",{className:u(o.badge,d[a],e&&o[`color-${e}`],o[`size-${n}`]),"data-component":"badge",children:[l&&c=="left"&&_.jsx(s.Icon,{name:l,size:"small"}),_.jsx("span",{children:r}),l&&c=="right"&&_.jsx(s.Icon,{name:l,size:"small"})]});exports.Badge=f;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,45 +1,47 @@
1
- import { jsxs as n, jsx as _ } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
2
  import t from "classix";
3
- import { Icon as e } from "../icon/index.js";
4
- import '../../assets/index28.css';const i = "_badge_1w0ss_1", g = "_highlight_1w0ss_20", w = "_info_1w0ss_26", m = "_primary_1w0ss_31", h = "_success_1w0ss_36", p = "_warning_1w0ss_41", s = {
3
+ import { Icon as a } from "../icon/index.js";
4
+ import '../../assets/index28.css';const i = "_badge_1b5u6_1", b = "_small_1b5u6_20", g = "_highlight_1b5u6_25", m = "_info_1b5u6_31", h = "_primary_1b5u6_36", p = "_success_1b5u6_41", f = "_warning_1b5u6_46", o = {
5
5
  badge: i,
6
+ small: b,
6
7
  highlight: g,
7
- info: w,
8
- primary: m,
9
- success: h,
10
- warning: p,
11
- "color-1": "_color-1_1w0ss_46",
12
- "color-2": "_color-2_1w0ss_51",
13
- "color-yellow": "_color-yellow_1w0ss_52",
14
- "color-3": "_color-3_1w0ss_57",
15
- "color-peach": "_color-peach_1w0ss_58",
16
- "color-4": "_color-4_1w0ss_63",
17
- "color-magenta": "_color-magenta_1w0ss_64",
18
- "color-5": "_color-5_1w0ss_69",
19
- "color-purple": "_color-purple_1w0ss_70",
20
- "color-6": "_color-6_1w0ss_75",
21
- "color-blue": "_color-blue_1w0ss_76",
22
- "color-7": "_color-7_1w0ss_81",
23
- "color-green": "_color-green_1w0ss_82"
24
- }, u = {
25
- default: s.default,
26
- highlight: s.highlight,
27
- info: s.info,
28
- primary: s.primary,
29
- success: s.success,
30
- warning: s.warning
31
- }, b = ({
32
- color: l,
33
- children: r,
34
- icon: o,
35
- position: c = "left",
36
- variant: a = "default"
37
- }) => r === 0 || r == null ? null : /* @__PURE__ */ n("span", { className: t(s.badge, u[a], l && s[`color-${l}`]), "data-component": "badge", children: [
38
- o && c == "left" && /* @__PURE__ */ _(e, { name: o, size: "small" }),
39
- /* @__PURE__ */ _("span", { children: r }),
40
- o && c == "right" && /* @__PURE__ */ _(e, { name: o, size: "small" })
8
+ info: m,
9
+ primary: h,
10
+ success: p,
11
+ warning: f,
12
+ "color-1": "_color-1_1b5u6_51",
13
+ "color-2": "_color-2_1b5u6_56",
14
+ "color-yellow": "_color-yellow_1b5u6_57",
15
+ "color-3": "_color-3_1b5u6_62",
16
+ "color-peach": "_color-peach_1b5u6_63",
17
+ "color-4": "_color-4_1b5u6_68",
18
+ "color-magenta": "_color-magenta_1b5u6_69",
19
+ "color-5": "_color-5_1b5u6_74",
20
+ "color-purple": "_color-purple_1b5u6_75",
21
+ "color-6": "_color-6_1b5u6_80",
22
+ "color-blue": "_color-blue_1b5u6_81",
23
+ "color-7": "_color-7_1b5u6_86",
24
+ "color-green": "_color-green_1b5u6_87"
25
+ }, d = {
26
+ default: o.default,
27
+ highlight: o.highlight,
28
+ info: o.info,
29
+ primary: o.primary,
30
+ success: o.success,
31
+ warning: o.warning
32
+ }, z = ({
33
+ color: c,
34
+ children: _,
35
+ icon: l,
36
+ position: s = "left",
37
+ size: e = "large",
38
+ variant: n = "default"
39
+ }) => _ === 0 || _ == null ? null : /* @__PURE__ */ u("span", { className: t(o.badge, d[n], c && o[`color-${c}`], o[`size-${e}`]), "data-component": "badge", children: [
40
+ l && s == "left" && /* @__PURE__ */ r(a, { name: l, size: "small" }),
41
+ /* @__PURE__ */ r("span", { children: _ }),
42
+ l && s == "right" && /* @__PURE__ */ r(a, { name: l, size: "small" })
41
43
  ] });
42
44
  export {
43
- b as Badge
45
+ z as Badge
44
46
  };
45
47
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index32.css');const t=require("react/jsx-runtime"),d=require("classix"),b=require("../badge/index.cjs"),T=require("../checkbox/index.cjs"),x=require("../figure/index.cjs"),k=require("../icon/index.cjs"),y="_card_158ul_1",E="_head_158ul_28",F="_center_158ul_40",I="_content_158ul_52",S="_preview_158ul_58",$="_margin_158ul_98",z="_outlined_158ul_143",B="_clickable_158ul_149",C="_muted_158ul_160",M="_selected_158ul_165",e={card:y,head:E,center:F,content:I,preview:S,"preview-leading":"_preview-leading_158ul_69","preview-trailing":"_preview-trailing_158ul_70","preview-content":"_preview-content_158ul_90",margin:$,outlined:z,clickable:B,muted:C,selected:M,"image-top":"_image-top_158ul_170","image-left":"_image-left_158ul_181"},O=({appearance:j="default",actions:f,badge:m,checkbox:i,className:v,children:o,emphasis:p="default",fullWidth:h=!1,header:_,icon:g,image:s,imagePosition:a="top",onClick:c,onKeyDown:u,preview:r,selected:N=(i==null?void 0:i.checked)??!1,tabIndex:w,variant:l="default",...q})=>t.jsxs("article",{className:d(e.card,j==="outlined"&&e.outlined,p==="muted"&&e.muted,c&&e.clickable,N&&e.selected,v),"data-emphasis":p,"data-minimal":l==="minimal","data-span":h?"all":void 0,...q,onClick:c,onKeyDown:n=>{u==null||u(n),!(n.defaultPrevented||!c)&&n.currentTarget===document.activeElement&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),n.currentTarget.click())},tabIndex:w??(c?0:-1),"data-component":"card",children:[s&&l!=="minimal"&&a==="top"&&t.jsx(x.Figure,{className:e[`image-${a}`],children:s}),t.jsxs("section",{children:[t.jsxs("div",{className:d(e.head,l==="minimal"&&e.center),children:[i&&t.jsx("span",{onClick:n=>n.stopPropagation(),children:t.jsx(T.Checkbox,{...i})}),s&&l!=="minimal"&&a==="left"&&t.jsx(x.Figure,{className:e[`image-${a}`],children:s}),_,m&&t.jsx(b.Badge,{...m}),g&&t.jsx(k.Icon,{name:g,size:"medium"}),f]}),o&&l!=="minimal"&&t.jsx("div",{className:d(e.content,!!_&&e.margin),children:o}),r&&l!=="minimal"&&t.jsxs("div",{className:d(e.preview,!!_&&e.margin),children:[t.jsx("span",{className:e["preview-leading"],children:r.leading}),t.jsx("span",{className:e["preview-content"],children:r.children}),t.jsx("span",{className:e["preview-trailing"],children:r.trailing})]})]})]});exports.Card=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index32.css');const t=require("react/jsx-runtime"),d=require("classix"),q=require("../badge/index.cjs"),b=require("../checkbox/index.cjs"),g=require("../figure/index.cjs"),T=require("../icon/index.cjs"),k="_card_1pyj3_1",E="_head_1pyj3_28",F="_center_1pyj3_40",I="_content_1pyj3_52",S="_preview_1pyj3_58",$="_margin_1pyj3_98",z="_outlined_1pyj3_142",B="_clickable_1pyj3_148",C="_muted_1pyj3_159",M="_selected_1pyj3_164",e={card:k,head:E,center:F,content:I,preview:S,"preview-leading":"_preview-leading_1pyj3_69","preview-trailing":"_preview-trailing_1pyj3_70","preview-content":"_preview-content_1pyj3_90",margin:$,outlined:z,clickable:B,muted:C,selected:M,"image-top":"_image-top_1pyj3_169","image-left":"_image-left_1pyj3_180"},O=({appearance:x="default",actions:y,badge:p,checkbox:s,className:f,children:o,emphasis:u="default",fullWidth:v=!1,header:_,icon:j,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",...w})=>t.jsxs("article",{className:d(e.card,x==="outlined"&&e.outlined,u==="muted"&&e.muted,r&&e.clickable,h&&e.selected,f),"data-emphasis":u,"data-minimal":i==="minimal","data-span":v?"all":void 0,...w,onClick:r,onKeyDown:n=>{m==null||m(n),!(n.defaultPrevented||!r)&&n.currentTarget===document.activeElement&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),n.currentTarget.click())},tabIndex:N??(r?0:-1),"data-component":"card",children:[a&&i!=="minimal"&&c==="top"&&t.jsx(g.Figure,{className:e[`image-${c}`],children:a}),t.jsxs("section",{children:[t.jsxs("div",{className:d(e.head,i==="minimal"&&e.center),children:[s&&t.jsx("span",{onClick:n=>n.stopPropagation(),children:t.jsx(b.Checkbox,{...s})}),a&&i!=="minimal"&&c==="left"&&t.jsx(g.Figure,{className:e[`image-${c}`],children:a}),_,p&&t.jsx(q.Badge,{...p}),j&&t.jsx(T.Icon,{name:j,size:"medium"}),y]}),o&&i!=="minimal"&&t.jsx("div",{className:d(e.content,!!_&&e.margin),children:o}),l&&i!=="minimal"&&t.jsxs("div",{className:d(e.preview,!!_&&e.margin),children:[t.jsx("span",{className:e["preview-leading"],children:l.leading}),t.jsx("span",{className:e["preview-content"],children:l.children}),t.jsx("span",{className:e["preview-trailing"],children:l.trailing})]})]})]});exports.Card=O;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,60 +1,60 @@
1
1
  import { jsxs as m, jsx as t } from "react/jsx-runtime";
2
2
  import s from "classix";
3
- import { Badge as $ } from "../badge/index.js";
4
- import { Checkbox as k } from "../checkbox/index.js";
5
- import { Figure as v } from "../figure/index.js";
6
- import { Icon as z } from "../icon/index.js";
7
- import '../../assets/index32.css';const B = "_card_158ul_1", F = "_head_158ul_28", q = "_center_158ul_40", x = "_content_158ul_52", y = "_preview_158ul_58", A = "_margin_158ul_98", C = "_outlined_158ul_143", G = "_clickable_158ul_149", H = "_muted_158ul_160", J = "_selected_158ul_165", e = {
8
- card: B,
9
- head: F,
10
- center: q,
11
- content: x,
12
- preview: y,
13
- "preview-leading": "_preview-leading_158ul_69",
14
- "preview-trailing": "_preview-trailing_158ul_70",
15
- "preview-content": "_preview-content_158ul_90",
3
+ import { Badge as T } from "../badge/index.js";
4
+ import { Checkbox as $ } from "../checkbox/index.js";
5
+ import { Figure as j } from "../figure/index.js";
6
+ import { Icon as k } from "../icon/index.js";
7
+ import '../../assets/index32.css';const z = "_card_1pyj3_1", B = "_head_1pyj3_28", F = "_center_1pyj3_40", q = "_content_1pyj3_52", x = "_preview_1pyj3_58", A = "_margin_1pyj3_98", C = "_outlined_1pyj3_142", G = "_clickable_1pyj3_148", H = "_muted_1pyj3_159", J = "_selected_1pyj3_164", e = {
8
+ card: z,
9
+ head: B,
10
+ center: F,
11
+ content: q,
12
+ preview: x,
13
+ "preview-leading": "_preview-leading_1pyj3_69",
14
+ "preview-trailing": "_preview-trailing_1pyj3_70",
15
+ "preview-content": "_preview-content_1pyj3_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-top_158ul_170",
22
- "image-left": "_image-left_158ul_181"
21
+ "image-top": "_image-top_1pyj3_169",
22
+ "image-left": "_image-left_1pyj3_180"
23
23
  }, U = ({
24
- appearance: N = "default",
25
- actions: h,
24
+ appearance: y = "default",
25
+ actions: v,
26
26
  badge: o,
27
- checkbox: a,
28
- className: w,
29
- children: p,
27
+ checkbox: i,
28
+ className: N,
29
+ children: u,
30
30
  emphasis: f = "default",
31
- fullWidth: j = !1,
32
- header: _,
31
+ fullWidth: h = !1,
32
+ header: p,
33
33
  icon: g,
34
- image: i,
34
+ image: l,
35
35
  imagePosition: r = "top",
36
36
  onClick: c,
37
- onKeyDown: u,
37
+ onKeyDown: _,
38
38
  preview: d,
39
- selected: E = (a == null ? void 0 : a.checked) ?? !1,
40
- tabIndex: I,
41
- variant: n = "default",
42
- ...T
43
- }) => /* @__PURE__ */ m("article", { className: s(e.card, N === "outlined" && e.outlined, f === "muted" && e.muted, c && e.clickable, E && e.selected, w), "data-emphasis": f, "data-minimal": n === "minimal", "data-span": j ? "all" : void 0, ...T, onClick: c, onKeyDown: (l) => {
44
- u == null || u(l), !(l.defaultPrevented || !c) && l.currentTarget === document.activeElement && (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.currentTarget.click());
45
- }, tabIndex: I ?? (c ? 0 : -1), "data-component": "card", children: [
46
- i && n !== "minimal" && r === "top" && /* @__PURE__ */ t(v, { className: e[`image-${r}`], children: i }),
39
+ selected: w = (i == null ? void 0 : i.checked) ?? !1,
40
+ tabIndex: E,
41
+ variant: a = "default",
42
+ ...I
43
+ }) => /* @__PURE__ */ m("article", { className: s(e.card, y === "outlined" && e.outlined, f === "muted" && e.muted, c && e.clickable, w && e.selected, N), "data-emphasis": f, "data-minimal": a === "minimal", "data-span": h ? "all" : void 0, ...I, onClick: c, onKeyDown: (n) => {
44
+ _ == null || _(n), !(n.defaultPrevented || !c) && n.currentTarget === document.activeElement && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.currentTarget.click());
45
+ }, tabIndex: E ?? (c ? 0 : -1), "data-component": "card", children: [
46
+ l && a !== "minimal" && r === "top" && /* @__PURE__ */ t(j, { className: e[`image-${r}`], children: l }),
47
47
  /* @__PURE__ */ m("section", { children: [
48
- /* @__PURE__ */ m("div", { className: s(e.head, n === "minimal" && e.center), children: [
49
- a && /* @__PURE__ */ t("span", { onClick: (l) => l.stopPropagation(), children: /* @__PURE__ */ t(k, { ...a }) }),
50
- i && n !== "minimal" && r === "left" && /* @__PURE__ */ t(v, { className: e[`image-${r}`], children: i }),
51
- _,
52
- o && /* @__PURE__ */ t($, { ...o }),
53
- g && /* @__PURE__ */ t(z, { name: g, size: "medium" }),
54
- h
48
+ /* @__PURE__ */ m("div", { className: s(e.head, a === "minimal" && e.center), children: [
49
+ i && /* @__PURE__ */ t("span", { onClick: (n) => n.stopPropagation(), children: /* @__PURE__ */ t($, { ...i }) }),
50
+ l && a !== "minimal" && r === "left" && /* @__PURE__ */ t(j, { className: e[`image-${r}`], children: l }),
51
+ p,
52
+ o && /* @__PURE__ */ t(T, { ...o }),
53
+ g && /* @__PURE__ */ t(k, { name: g, size: "medium" }),
54
+ v
55
55
  ] }),
56
- p && n !== "minimal" && /* @__PURE__ */ t("div", { className: s(e.content, !!_ && e.margin), children: p }),
57
- d && n !== "minimal" && /* @__PURE__ */ m("div", { className: s(e.preview, !!_ && e.margin), children: [
56
+ u && a !== "minimal" && /* @__PURE__ */ t("div", { className: s(e.content, !!p && e.margin), children: u }),
57
+ d && a !== "minimal" && /* @__PURE__ */ m("div", { className: s(e.preview, !!p && e.margin), children: [
58
58
  /* @__PURE__ */ t("span", { className: e["preview-leading"], children: d.leading }),
59
59
  /* @__PURE__ */ t("span", { className: e["preview-content"], children: d.children }),
60
60
  /* @__PURE__ */ t("span", { className: e["preview-trailing"], children: d.trailing })
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const e=require("react/jsx-runtime"),x=require("../../icons-B3hIY9Bm.cjs"),b=require("../loading/index.cjs"),h="_checkbox_3o7pi_3",l={checkbox:h},a=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("Check")};return e.jsxs("label",{className:l.checkbox,"data-component":"checkbox",children:[e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),c&&e.jsx(b.Loading,{size:"small",sticky:!0}),o&&o]})};exports.Checkbox=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const e=require("react/jsx-runtime"),x=require("../../icons-BIdcCH-v.cjs"),b=require("../loading/index.cjs"),h="_checkbox_3o7pi_3",l={checkbox:h},a=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("Check")};return e.jsxs("label",{className:l.checkbox,"data-component":"checkbox",children:[e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),c&&e.jsx(b.Loading,{size:"small",sticky:!0}),o&&o]})};exports.Checkbox=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import { i as x } from "../../icons-CTtWkF6z.js";
2
+ import { i as x } from "../../icons-DVeBguFb.js";
3
3
  import { Loading as k } from "../loading/index.js";
4
4
  import '../../assets/index33.css';const m = "_checkbox_3o7pi_3", a = {
5
5
  checkbox: m
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const d=require("react/jsx-runtime"),tt=require("classix"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),I=10,A=.1,kt=.92,m=(h,x,R)=>Math.min(R,Math.max(x,h)),It=h=>new Promise((x,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),x(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),Ot=async({file:h,fill:x,transform:R,viewport:f})=>{const a=await It(h),O=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(O,M),D=a.naturalWidth*y,E=a.naturalHeight*y,Q=x==="width"?Math.max(A,O/y):x==="height"?Math.max(A,M/y):A,j=m(R.zoom,Q,I),w=y*j,b=D*j,B=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-B)/2+R.offset.y,S=m(-p/w,0,a.naturalWidth),T=m(-L/w,0,a.naturalHeight),v=m(f.width/w,1,Math.max(1,a.naturalWidth-S)),s=m(f.height/w,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,S,T,v,s,0,0,_.width,_.height);const U=h.type.startsWith("image/")?h.type:"image/jpeg",P=await new Promise(N=>{_.toBlob(N,U,kt)});if(!P)throw new Error("croppable-image-export-failed");return new globalThis.File([P],h.name,{lastModified:Date.now(),type:P.type||U})},St="_croppable_1kqo4_1",Ut="_empty_1kqo4_14",Pt="_media_1kqo4_22",qt="_overlay_1kqo4_33",Yt="_viewport_1kqo4_41",Xt="_draggable_1kqo4_53",At="_dragging_1kqo4_57",Dt="_inner_1kqo4_61",Wt="_standalone_1kqo4_77",z={croppable:St,empty:Ut,media:Pt,overlay:qt,viewport:Yt,draggable:Xt,dragging:At,inner:Dt,standalone:Wt},Ht=192,Z={offset:{x:0,y:0},zoom:1},xt="Select image",Zt=({children:h,fill:x="none",height:R,image:f,label:a,onCroppableChange:O,onFileChange:M,onImageChange:y,onTransformChange:D,transform:E,standalone:Q})=>{const j=c.useRef(null),w=c.useRef(null),b=c.useRef(null),B=c.useRef(null),p=c.useRef(y),L=c.useRef(null),S=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(Z),_=c.useRef(null),[u,U]=c.useState(null),[P,N]=c.useState(null),[et,V]=c.useState(!1),[wt,nt]=c.useState(Z),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),W=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:A};if(!u)return{width:t,height:n,minZoom:A};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=x==="width"?o/r:x==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(A,i)}})(),q=W.minZoom,H=E??wt,Y=m(H.zoom,q,I),$=P??f??null,rt=!h&&!!f&&!P&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&U({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),X=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,q,I),i=m(o,q,I);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,q,I),i=s.current.offset,l=o?bt(i,e,r,o):n,k=J(l,r);s.current={zoom:r,offset:k},E||nt({zoom:r,offset:k}),D==null||D({zoom:r,offset:k})},K=(t,n,o)=>{S.current={zoom:t,offset:n,anchor:o??null},w.current==null&&(w.current=window.requestAnimationFrame(()=>{w.current=null;const e=S.current;S.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(X||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,q,I),r=W.width*e,i=W.height*e,l=Math.max(0,(r-n)/2),k=Math.max(0,(i-o)/2);return{maxX:l,maxY:k}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){N(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,N(e),U(null),ot(o),K(Z.zoom,Z.offset),s.current=Z,M==null||M(o),n.value=""},Mt=t=>{if(!(X||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(X||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),k=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(k,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,q,I);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),O&&O(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[O]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,Y);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[Y,u,g.width,g.height]),c.useEffect(()=>{$||U(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{Ot({file:F,fill:x,transform:{zoom:Y,offset:H.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,Y,H.offset,x,F,g]),c.useEffect(()=>()=>{w.current!=null&&(window.cancelAnimationFrame(w.current),w.current=null)},[]);const ut=it(Y),C=!X&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=B.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt(z.croppable,Q&&z.standalone),onClick:()=>{X&&lt()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:B,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Ht}px`,"--croppable-zoom":Y,"--croppable-x":`${H.offset.x}px`,"--croppable-y":`${H.offset.y}px`,...u?{"--croppable-image-width":`${W.width}px`,"--croppable-image-height":`${W.height}px`}:null},children:X?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]}):d.jsxs("div",{className:tt(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]})})]})})]})};exports.Croppable=Zt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const a=require("react/jsx-runtime"),ht=require("classix"),o=require("react"),Zt=require("../toolbar/index.cjs"),et=require("../button/index.cjs"),qt=require("../figure/index.cjs"),$t=require("../icon/index.cjs"),A=10,Z=.1,Gt=.92,y=(i,d,x)=>Math.min(x,Math.max(d,i)),Ft=i=>new Promise((d,x)=>{const z=URL.createObjectURL(i),s=new globalThis.Image;s.onload=()=>{URL.revokeObjectURL(z),d(s)},s.onerror=()=>{URL.revokeObjectURL(z),x(new Error("croppable-image-load-failed"))},s.src=z}),Jt=async({file:i,fill:d,transform:x,viewport:z})=>{const s=await Ft(i),D=z.width/s.naturalWidth,W=z.height/s.naturalHeight,O=Math.max(D,W),q=s.naturalWidth*O,H=s.naturalHeight*O,j=d==="width"?Math.max(Z,D/O):d==="height"?Math.max(Z,W/O):Z,S=y(x.zoom,j,A),R=O*S,v=q*S,M=H*S,nt=(z.width-v)/2+x.offset.x,P=(z.height-M)/2+x.offset.y,b=y(-nt/R,0,s.naturalWidth),_=y(-P/R,0,s.naturalHeight),$=y(z.width/R,1,Math.max(1,s.naturalWidth-b)),g=y(z.height/R,1,Math.max(1,s.naturalHeight-_)),h=document.createElement("canvas"),L=h.getContext("2d");if(!L)throw new Error("croppable-image-context-missing");h.width=Math.max(1,Math.round($)),h.height=Math.max(1,Math.round(g)),L.drawImage(s,b,_,$,g,0,0,h.width,h.height);const E=i.type.startsWith("image/")?i.type:"image/jpeg",U=await new Promise(u=>{h.toBlob(u,E,Gt)});if(!U)throw new Error("croppable-image-export-failed");return new globalThis.File([U],i.name,{lastModified:Date.now(),type:U.type||E})},Kt="_croppable_sjc2z_1",Qt="_empty_sjc2z_15",Vt="_action_sjc2z_23",Ct="_caption_sjc2z_31",te="_media_sjc2z_38",ee="_viewport_sjc2z_49",ne="_draggable_sjc2z_61",re="_dragging_sjc2z_65",ce="_inner_sjc2z_69",oe="_standalone_sjc2z_85",f={croppable:Kt,empty:Qt,action:Vt,caption:Ct,media:te,viewport:ee,draggable:ne,dragging:re,inner:ce,standalone:oe},se=192,T={offset:{x:0,y:0},zoom:1},Ut=(i,d)=>(i==null?void 0:i.file)===d.file&&(i==null?void 0:i.source)===d.source&&(i==null?void 0:i.settings)===d.settings,ie=({cancelLabel:i,children:d,fill:x="none",height:z,image:s,deleteLabel:D,saveLabel:W,uploadLabel:O,onCroppableChange:q,onDelete:H,onFileChange:j,onImageChange:S,onSave:R,onTransformChange:v,transform:M,standalone:nt})=>{const P=o.useRef(null),b=o.useRef(null),_=o.useRef(null),$=o.useRef(null),g=o.useRef(S),h=o.useRef(null),L=o.useRef(null),E=o.useRef(null),U=o.useRef(new Map),u=o.useRef(T),rt=o.useRef(null),[w,J]=o.useState(null),[ct,ot]=o.useState(null),[ft,K]=o.useState(!1),[Ot,st]=o.useState(T),[N,it]=o.useState(null),[m,St]=o.useState({width:0,height:0}),[pt,at]=o.useState(null),[G,Q]=o.useState(null),F=(()=>{const t=m.width,n=m.height;if(!t||!n)return{width:0,height:0,minZoom:Z};if(!w)return{width:t,height:n,minZoom:Z};const r=t/w.width,e=n/w.height,c=Math.max(r,e),l=x==="width"?r/c:x==="height"?e/c:0;return{width:w.width*c,height:w.height*c,minZoom:Math.max(Z,l)}})(),B=F.minZoom,X=M??Ot,Y=y(X.zoom,B,A),V=ct??s??null,mt=!d&&!!s&&!ct&&!N,C=!mt,xt=d??(V?a.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&J({width:n.naturalWidth,height:n.naturalHeight})},src:V}):null),I=xt==null,ut={file:N,source:ct,settings:JSON.stringify([x,Y,X.offset.x,X.offset.y,m.width,m.height])};o.useEffect(()=>{!G||!s||s===G.image&&s!==G.crop.source||(at(G.crop),Q(null))},[s,G]);const lt=(t,n)=>{const{maxX:r,maxY:e}=wt(n);return{x:y(t.x,-r,r),y:y(t.y,-e,e)}},gt=(t,n)=>{const r=rt.current;if(!r)return null;const e=r.getBoundingClientRect(),c=t-e.left-e.width/2,l=n-e.top-e.height/2;return{x:c,y:l}},vt=(t,n,r,e)=>{const c=y(n,B,A),l=y(r,B,A);if(c===0)return t;const p=l/c;return{x:(1-p)*e.x+p*t.x,y:(1-p)*e.y+p*t.y}},Pt=(t,n,r)=>{const e=u.current.zoom,c=y(t,B,A),l=u.current.offset,p=r?vt(l,e,c,r):n,k=lt(p,c);u.current={zoom:c,offset:k},M||st({zoom:c,offset:k}),v==null||v({zoom:c,offset:k})},tt=(t,n,r)=>{L.current={zoom:t,offset:n,anchor:r??null},b.current==null&&(b.current=window.requestAnimationFrame(()=>{b.current=null;const e=L.current;L.current=null;const c=(e==null?void 0:e.zoom)??u.current.zoom,l=(e==null?void 0:e.offset)??u.current.offset,p=(e==null?void 0:e.anchor)??null;Pt(c,l,p)}))},It=t=>{if(I||!C)return;const n=t.ctrlKey?.001:25e-5,r=u.current.zoom*Math.exp(-t.deltaY*n),e=gt(t.clientX,t.clientY);tt(r,u.current.offset,e)},wt=t=>{const n=m.width,r=m.height;if(!n||!r)return{maxX:0,maxY:0};const e=y(t,B,A),c=F.width*e,l=F.height*e,p=Math.max(0,(c-n)/2),k=Math.max(0,(l-r)/2);return{maxX:p,maxY:k}},Tt=t=>{var c;Q(null),at(null);const n=t.target,r=((c=n.files)==null?void 0:c[0])??null;if(h.current&&(URL.revokeObjectURL(h.current),h.current=null),!r){ot(null),it(null),j==null||j(null),n.value="";return}const e=URL.createObjectURL(r);h.current=e,ot(e),J(null),it(r),tt(T.zoom,T.offset),u.current=T,j==null||j(r),n.value=""},yt=()=>{Q(null),at(null),b.current!=null&&(window.cancelAnimationFrame(b.current),b.current=null),L.current=null,P.current=null,_.current=null,E.current=null,U.current.clear(),K(!1),h.current&&(URL.revokeObjectURL(h.current),h.current=null),ot(null),J(null),it(null),u.current=T,st(T),v==null||v(T),j==null||j(null)},Lt=t=>{t.stopPropagation(),yt()},Nt=t=>{t.stopPropagation(),yt(),H==null||H()},Xt=t=>{if(!(I||!C||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=U.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){_.current=null,P.current=null,K(!1);const[r,e]=Array.from(n.values());E.current=Math.hypot(r.x-e.x,r.y-e.y);return}}P.current=t.pointerId,_.current={x:t.clientX,y:t.clientY,originX:u.current.offset.x,originY:u.current.offset.y}}},Yt=t=>{if(I||!C)return;if(t.pointerType==="touch"){const c=U.current;if(!c.has(t.pointerId))return;if(c.set(t.pointerId,{x:t.clientX,y:t.clientY}),c.size===2){const[l,p]=Array.from(c.values()),k=l.x-p.x,Dt=l.y-p.y,Mt=Math.hypot(k,Dt),Et={x:(l.x+p.x)/2,y:(l.y+p.y)/2};if(E.current){const Wt=Mt/E.current,Ht=u.current.zoom*Wt,Bt=gt(Et.x,Et.y);tt(Ht,u.current.offset,Bt)}E.current=Mt;return}}if(P.current!==t.pointerId||!_.current||!dt)return;const n=t.clientX-_.current.x,r=t.clientY-_.current.y,e=Math.abs(n)+Math.abs(r);!ft&&e>2&&K(!0),!(e<=1)&&tt(u.current.zoom,{x:_.current.originX+n,y:_.current.originY+r})},zt=t=>{t.pointerType==="touch"&&(U.current.delete(t.pointerId),U.current.size<2&&(E.current=null)),P.current===t.pointerId&&(P.current=null,_.current=null,K(!1))};o.useEffect(()=>{if(!M)return;const t=y(M.zoom,B,A);u.current={zoom:t,offset:lt(M.offset,t)}},[M,m.width,m.height,w==null?void 0:w.width,w==null?void 0:w.height]),o.useEffect(()=>()=>{h.current&&URL.revokeObjectURL(h.current)},[]),o.useEffect(()=>{const t=rt.current;if(!t)return;const n=()=>{const c=t.getBoundingClientRect();St(l=>l.width===c.width&&l.height===c.height?l:{width:c.width,height:c.height}),q&&q(c)};n();const r=()=>n();if(window.addEventListener("scroll",r,!0),typeof ResizeObserver>"u"){const c=()=>n();return window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c),window.removeEventListener("scroll",r,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",r,!0)}},[q]),o.useEffect(()=>{if(M)return;const t=u.current.offset,n=lt(t,Y);t.x===n.x&&t.y===n.y||(u.current={zoom:u.current.zoom,offset:n},st(r=>({...r,offset:n})))},[Y,w,m.width,m.height]),o.useEffect(()=>{V||J(null)},[V]),o.useEffect(()=>{g.current=S},[S]),o.useEffect(()=>{var r;if(!S)return;if(!N||!m.width||!m.height||d){(r=g.current)==null||r.call(g,null);return}let t=!0;const n=window.setTimeout(()=>{Jt({file:N,fill:x,transform:{zoom:Y,offset:X.offset},viewport:m}).then(e=>{var c;t&&((c=g.current)==null||c.call(g,e))}).catch(()=>{var e;t&&((e=g.current)==null||e.call(g,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[d,Y,X.offset,x,N,m]),o.useEffect(()=>()=>{b.current!=null&&(window.cancelAnimationFrame(b.current),b.current=null)},[]);const bt=wt(Y),dt=!I&&C&&(bt.maxX>0||bt.maxY>0),_t=!I&&!mt&&!!R&&!Ut(pt,ut),jt=!!s&&!d&&!!N&&!Ut(pt,ut),kt=!jt&&!I&&!!(N||H),Rt=()=>{var t;return(t=$.current)==null?void 0:t.click()},At=t=>{t.preventDefault(),t.stopPropagation(),Rt()};return a.jsxs("div",{className:ht(f.croppable,nt&&f.standalone),onClick:()=>{I&&Rt()},"data-component":"croppable",children:[a.jsx("input",{accept:"image/*",onChange:Tt,ref:$,type:"file"}),a.jsx("div",{className:f.viewport,ref:rt,onDragStart:t=>t.preventDefault(),onPointerDown:Xt,onPointerMove:Yt,onPointerUp:zt,onPointerCancel:zt,onWheel:It,style:{"--croppable-height":`${z??se}px`,"--croppable-zoom":Y,"--croppable-x":`${X.offset.x}px`,"--croppable-y":`${X.offset.y}px`,...w?{"--croppable-image-width":`${F.width}px`,"--croppable-image-height":`${F.height}px`}:null},children:I?a.jsx("div",{className:f.empty,children:a.jsx(qt.Figure,{children:a.jsx($t.Icon,{name:"Image",size:"large"})})}):a.jsx("div",{className:ht(f.media,dt&&f.draggable,dt&&ft&&f.dragging),children:a.jsx("div",{className:ht(f.inner),children:xt})})}),a.jsxs(Zt.Toolbar,{children:[_t&&a.jsxs("span",{className:f.action,children:[a.jsx(et.Button,{"aria-label":W??"Save image",icon:"FloppyDisk",onClick:()=>{Q({image:s,crop:ut}),R==null||R()},variant:"primary"}),W&&a.jsx("span",{className:f.caption,children:W})]}),!_t&&a.jsxs("span",{className:f.action,children:[a.jsx(et.Button,{"aria-label":O,icon:"UploadSimple",onClick:At,variant:"secondary"}),a.jsx("span",{className:f.caption,children:O})]}),jt&&a.jsxs("span",{className:f.action,children:[a.jsx(et.Button,{"aria-label":i??"Cancel changes",icon:"X",onClick:Lt,variant:"secondary"}),i&&a.jsx("span",{className:f.caption,children:i})]}),kt&&a.jsxs("span",{className:f.action,children:[a.jsx(et.Button,{"aria-label":D??"Delete image",icon:"Trash",intent:"danger",onClick:Nt,variant:"secondary"}),D&&a.jsx("span",{className:f.caption,children:D})]})]})]})};exports.Croppable=ie;
2
2
  //# sourceMappingURL=index.cjs.map