@gears-frontx/ui-kit 0.4.2 → 0.4.4
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 +10 -6
- package/dist/alert.js +35 -24
- package/dist/alert.js.map +1 -1
- package/dist/attachment.js +117 -76
- package/dist/attachment.js.map +1 -1
- package/dist/avatar.js +43 -43
- package/dist/badge.js +14 -14
- package/dist/card.js +81 -44
- package/dist/card.js.map +1 -1
- package/dist/chart.js +50 -50
- package/dist/chunks/alert.Csv2-ccF.css +1 -0
- package/dist/chunks/attachment.BRyIQq3F.css +1 -0
- package/dist/chunks/avatar.7EUG65-M.css +1 -0
- package/dist/chunks/badge.BwUxa9PB.css +1 -0
- package/dist/chunks/card.DSiUMxGK.css +1 -0
- package/dist/chunks/chart.B9cGEno8.css +1 -0
- package/dist/chunks/code-block.r7Cm0ncj.css +1 -0
- package/dist/chunks/description-list.Cx-vFGJL.css +1 -0
- package/dist/chunks/dialog.CIR9bQoU.css +1 -0
- package/dist/chunks/dropdown-menu.DT1_JLqL.css +1 -0
- package/dist/chunks/empty.DWqLrSfF.css +1 -0
- package/dist/chunks/heading.DQxQs5po.css +1 -0
- package/dist/chunks/item.BQ70Khqj.css +1 -0
- package/dist/chunks/link.BOE4f-aB.css +1 -0
- package/dist/chunks/message-scroller.CBjPcz8Y.css +1 -0
- package/dist/chunks/pagination.BAAl9D_S.css +1 -0
- package/dist/chunks/{select.BFwI5rhI.css → select.C3sLDoZI.css} +1 -1
- package/dist/chunks/sheet.BkZyzAbA.css +1 -0
- package/dist/chunks/sidebar.Dw_e0Jqw.css +1 -0
- package/dist/chunks/slider.DY1XDCPw.css +1 -0
- package/dist/chunks/status-dot.39NKkKQF.css +1 -0
- package/dist/chunks/tabs.BqhiMRUP.css +1 -0
- package/dist/chunks/text.7frjnkUr.css +1 -0
- package/dist/chunks/visually-hidden.Bd2oAR5D.css +1 -0
- package/dist/code-block.d.ts +1 -0
- package/dist/code-block.js +152 -0
- package/dist/code-block.js.map +1 -0
- package/dist/command.js +63 -48
- package/dist/command.js.map +1 -1
- package/dist/components/alert/alert.d.ts +3 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/attachment/attachment.d.ts +10 -3
- package/dist/components/attachment/attachment.d.ts.map +1 -1
- package/dist/components/card/card.d.ts +6 -4
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/code-block/code-block.d.ts +57 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/public.d.ts +2 -0
- package/dist/components/code-block/public.d.ts.map +1 -0
- package/dist/components/command/command.d.ts +1 -1
- package/dist/components/command/command.d.ts.map +1 -1
- package/dist/components/description-list/description-list.d.ts +21 -0
- package/dist/components/description-list/description-list.d.ts.map +1 -0
- package/dist/components/description-list/public.d.ts +2 -0
- package/dist/components/description-list/public.d.ts.map +1 -0
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/heading/heading.d.ts +10 -0
- package/dist/components/heading/heading.d.ts.map +1 -0
- package/dist/components/heading/public.d.ts +2 -0
- package/dist/components/heading/public.d.ts.map +1 -0
- package/dist/components/input-otp/input-otp.d.ts +1 -1
- package/dist/components/input-otp/input-otp.d.ts.map +1 -1
- package/dist/components/item/item.d.ts +15 -6
- package/dist/components/item/item.d.ts.map +1 -1
- package/dist/components/link/link.d.ts +18 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/public.d.ts +2 -0
- package/dist/components/link/public.d.ts.map +1 -0
- package/dist/components/sidebar/sidebar.d.ts +13 -3
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/slider/slider.d.ts.map +1 -1
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/text/public.d.ts +2 -0
- package/dist/components/text/public.d.ts.map +1 -0
- package/dist/components/text/text.d.ts +11 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/visually-hidden/public.d.ts +2 -0
- package/dist/components/visually-hidden/public.d.ts.map +1 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +4 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/data-grid/pagination.js +35 -35
- package/dist/description-list.d.ts +1 -0
- package/dist/description-list.js +78 -0
- package/dist/description-list.js.map +1 -0
- package/dist/dialog.js +38 -38
- package/dist/docs/alert.md +8 -2
- package/dist/docs/attachment.md +20 -8
- package/dist/docs/avatar.md +8 -2
- package/dist/docs/badge.md +12 -11
- package/dist/docs/button.md +16 -4
- package/dist/docs/calendar.md +6 -0
- package/dist/docs/card.md +38 -6
- package/dist/docs/carousel.md +4 -2
- package/dist/docs/chart.md +23 -0
- package/dist/docs/code-block.md +114 -0
- package/dist/docs/data-grid.md +2 -0
- package/dist/docs/description-list.md +53 -0
- package/dist/docs/drawer.md +1 -1
- package/dist/docs/empty.md +9 -3
- package/dist/docs/heading.md +60 -0
- package/dist/docs/item.md +70 -3
- package/dist/docs/link.md +48 -0
- package/dist/docs/message-scroller.md +5 -0
- package/dist/docs/questionnaire.md +1 -1
- package/dist/docs/sheet.md +20 -3
- package/dist/docs/sidebar.md +27 -0
- package/dist/docs/status-dot.md +2 -2
- package/dist/docs/switch.md +10 -4
- package/dist/docs/text.md +51 -0
- package/dist/docs/visually-hidden.md +44 -0
- package/dist/dropdown-menu.js +56 -56
- package/dist/empty.js +47 -36
- package/dist/empty.js.map +1 -1
- package/dist/heading.d.ts +1 -0
- package/dist/heading.js +36 -0
- package/dist/heading.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +427 -401
- package/dist/index.js.map +1 -1
- package/dist/input-otp.js +34 -20
- package/dist/input-otp.js.map +1 -1
- package/dist/item.js +119 -71
- package/dist/item.js.map +1 -1
- package/dist/link.d.ts +1 -0
- package/dist/link.js +55 -0
- package/dist/link.js.map +1 -0
- package/dist/message-scroller.js +24 -24
- package/dist/select.js +45 -45
- package/dist/sheet.js +41 -41
- package/dist/sidebar.js +207 -193
- package/dist/sidebar.js.map +1 -1
- package/dist/slider.js +34 -21
- package/dist/slider.js.map +1 -1
- package/dist/status-dot.js +25 -25
- package/dist/table.js +172 -157
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +14 -14
- package/dist/text.d.ts +1 -0
- package/dist/text.js +53 -0
- package/dist/text.js.map +1 -0
- package/dist/theme.css +29 -6
- package/dist/utilities.css +25 -2
- package/dist/visually-hidden.d.ts +1 -0
- package/dist/visually-hidden.js +18 -0
- package/dist/visually-hidden.js.map +1 -0
- package/llms.txt +72 -15
- package/package.json +1 -4
- package/dist/chunks/alert.DsgRIXLn.css +0 -1
- package/dist/chunks/attachment.CZuZdlXC.css +0 -1
- package/dist/chunks/avatar.BMm-Z9l5.css +0 -1
- package/dist/chunks/badge.BCreEn3O.css +0 -1
- package/dist/chunks/card.DdBl-usf.css +0 -1
- package/dist/chunks/chart.CeyctrXQ.css +0 -1
- package/dist/chunks/dialog.Cpo8vChK.css +0 -1
- package/dist/chunks/dropdown-menu.TU3FHXbJ.css +0 -1
- package/dist/chunks/empty.DnAKlw2g.css +0 -1
- package/dist/chunks/item.BkcgydVc.css +0 -1
- package/dist/chunks/message-scroller.CbLooS7Q.css +0 -1
- package/dist/chunks/pagination.Cn8tIWMX.css +0 -1
- package/dist/chunks/sheet.BWvXXyXk.css +0 -1
- package/dist/chunks/sidebar.DdEvMURX.css +0 -1
- package/dist/chunks/slider.inyNxx4y.css +0 -1
- package/dist/chunks/status-dot.DWa2qGKe.css +0 -1
- package/dist/chunks/tabs.DFa0OYMo.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_d26kh_33{--sidebar-width: 16rem;--sidebar-width-icon: 3rem;display:flex;min-height:100svh;width:100%}._wrapper_d26kh_33:has(>[data-variant=inset]){background-color:var(--sidebar)}._wrapper_d26kh_33 ._none_d26kh_74{display:flex;height:100%;width:var(--sidebar-width);flex-direction:column;background-color:var(--sidebar);color:var(--sidebar-foreground)}._root_d26kh_14{position:relative;color:var(--sidebar-foreground)}@media(max-width:767px){._root_d26kh_14{display:none}}._gap_d26kh_116{position:relative;background-color:transparent;transition:width .2s linear}._wrapper_d26kh_33 ._gap_d26kh_116{width:var(--sidebar-width)}@media(prefers-reduced-motion:reduce){._gap_d26kh_116{transition:none}}._root_d26kh_14[data-side=right] ._gap_d26kh_116{rotate:180deg}._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=offcanvas] ._gap_d26kh_116{width:0}._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=icon][data-variant=floating] ._gap_d26kh_116,._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=icon][data-variant=inset] ._gap_d26kh_116{width:calc(var(--sidebar-width-icon) + var(--space-4))}._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=icon][data-variant=sidebar] ._gap_d26kh_116{width:var(--sidebar-width-icon)}._container_d26kh_112{box-sizing:border-box;position:fixed;inset-block:0;z-index:10;display:none;transition:left .2s linear,right .2s linear,width .2s linear}._wrapper_d26kh_33 ._container_d26kh_112{width:var(--sidebar-width)}@media(prefers-reduced-motion:reduce){._container_d26kh_112{transition:none}}@media(min-width:768px){._container_d26kh_112{display:flex}}._container_d26kh_112[data-side=left]{left:0}._container_d26kh_112[data-side=right]{right:0}._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=offcanvas] ._container_d26kh_112[data-side=left]{left:calc(var(--sidebar-width) * -1)}._wrapper_d26kh_33 ._root_d26kh_14[data-collapsible=offcanvas] ._container_d26kh_112[data-side=right]{right:calc(var(--sidebar-width) * -1)}._root_d26kh_14[data-variant=sidebar][data-side=left] ._container_d26kh_112{border-right:var(--border-width) solid var(--sidebar-border)}._root_d26kh_14[data-variant=sidebar][data-side=right] ._container_d26kh_112{border-left:var(--border-width) solid var(--sidebar-border)}._wrapper_d26kh_33 ._root_d26kh_14[data-variant=sidebar][data-collapsible=icon] ._container_d26kh_112{width:var(--sidebar-width-icon)}._root_d26kh_14[data-variant=floating] ._container_d26kh_112,._root_d26kh_14[data-variant=inset] ._container_d26kh_112{padding:var(--space-2)}._wrapper_d26kh_33 ._root_d26kh_14[data-variant=floating][data-collapsible=icon] ._container_d26kh_112,._wrapper_d26kh_33 ._root_d26kh_14[data-variant=inset][data-collapsible=icon] ._container_d26kh_112{width:calc(var(--sidebar-width-icon) + var(--space-4) + 2px)}._inner_d26kh_238{display:flex;height:100%;width:100%;flex-direction:column;background-color:var(--sidebar);color:var(--sidebar-foreground)}._root_d26kh_14[data-variant=floating] ._inner_d26kh_238{border:var(--border-width) solid var(--sidebar-border);border-radius:var(--radius-xl);box-shadow:var(--popover-shadow)}._mobileContent_d26kh_81{--sidebar-width: 16rem;box-sizing:border-box;width:var(--sidebar-width);padding:0;background-color:var(--sidebar);color:var(--sidebar-foreground)}._mobileInner_d26kh_276{display:flex;height:100%;width:100%;flex-direction:column}._srOnly_d26kh_288{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}._triggerIcon_d26kh_303{width:var(--icon-size-sm);height:var(--icon-size-sm)}._rail_d26kh_308{position:absolute;inset-block:0;z-index:20;display:none;width:var(--space-4);border:none;padding:0;background:none;cursor:w-resize;transition:background-color .2s linear}@media(prefers-reduced-motion:reduce){._rail_d26kh_308{transition:none}}@media(min-width:640px){._rail_d26kh_308{display:block}}._rail_d26kh_308:after{content:"";position:absolute;inset-block:0;left:50%;width:2px;background-color:transparent;transition:background-color .2s linear}._rail_d26kh_308:hover:after{background-color:var(--sidebar-border)}@media(prefers-reduced-motion:reduce){._rail_d26kh_308:after{transition:none}}._root_d26kh_14[data-side=left] ._rail_d26kh_308{right:calc(var(--space-4) * -1);transform:translate(-50%)}._root_d26kh_14[data-side=right] ._rail_d26kh_308{left:calc(var(--space-4) * -1);transform:translate(50%);cursor:e-resize}._root_d26kh_14[data-side=left][data-state=collapsed] ._rail_d26kh_308{cursor:e-resize}._root_d26kh_14[data-side=right][data-state=collapsed] ._rail_d26kh_308{cursor:w-resize}._root_d26kh_14[data-collapsible=offcanvas] ._rail_d26kh_308{transform:none}._root_d26kh_14[data-collapsible=offcanvas] ._rail_d26kh_308:hover{background-color:var(--sidebar)}._root_d26kh_14[data-collapsible=offcanvas] ._rail_d26kh_308:after{left:100%}._root_d26kh_14[data-side=left][data-collapsible=offcanvas] ._rail_d26kh_308{right:calc(var(--space-2) * -1)}._root_d26kh_14[data-side=right][data-collapsible=offcanvas] ._rail_d26kh_308{left:calc(var(--space-2) * -1)}._inset_d26kh_406{position:relative;display:flex;width:100%;flex:1 1 0%;flex-direction:column;background-color:var(--background)}@media(min-width:768px){[data-variant=inset]~._inset_d26kh_406{margin:var(--space-2);margin-left:0;border-radius:var(--radius-2xl);box-shadow:var(--popover-shadow)}[data-variant=inset][data-state=collapsed]~._inset_d26kh_406{margin-left:var(--space-2)}}._input_d26kh_449{width:100%;background-color:var(--surface-elevated)}._root_d26kh_14[data-collapsible=icon] ._input_d26kh_449{display:none}._separator_d26kh_469{background-color:var(--sidebar-border)}._separator_d26kh_469[data-orientation=horizontal]{width:auto;margin-inline:var(--space-2)}._header_d26kh_493,._footer_d26kh_494{display:flex;flex-direction:column;gap:var(--space-2);padding:var(--space-2)}._content_d26kh_501{display:flex;min-height:0;flex:1 1 0%;flex-direction:column;gap:var(--space-2);overflow:auto}._root_d26kh_14[data-collapsible=icon] ._content_d26kh_501{overflow:hidden}._group_d26kh_528{box-sizing:border-box;position:relative;display:flex;width:100%;min-width:0;flex-direction:column;padding:var(--space-2)}._groupLabel_d26kh_538{display:flex;height:var(--control-height-sm);flex-shrink:0;align-items:center;padding-inline:var(--space-2);border-radius:var(--radius-md);color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-label-weight);outline:none;transition:margin .2s linear,opacity .2s linear}._groupLabel_d26kh_538>svg{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm)}@media(prefers-reduced-motion:reduce){._groupLabel_d26kh_538{transition:none}}._groupAction_d26kh_579{box-sizing:border-box;position:absolute;top:calc(var(--space-2) + (var(--control-height-sm) - var(--space-5)) / 2);right:var(--space-3);display:flex;aspect-ratio:1;align-items:center;justify-content:center;width:var(--space-5);border:none;border-radius:var(--radius-md);padding:0;background:none;color:var(--sidebar-foreground);cursor:pointer;outline:none;transition:transform .15s ease}._groupAction_d26kh_579>svg{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm)}._groupAction_d26kh_579:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}._groupAction_d26kh_579:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:1px}._groupContent_d26kh_615{width:100%;font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._root_d26kh_14[data-collapsible=icon] ._groupLabel_d26kh_538{margin-top:calc(var(--control-height-sm) * -1);opacity:0;pointer-events:none}._root_d26kh_14[data-collapsible=icon] ._groupAction_d26kh_579{display:none}._menu_d26kh_640{display:flex;width:100%;min-width:0;flex-direction:column;gap:var(--space-1);margin:0;padding:0;list-style:none}._menuItem_d26kh_651{position:relative}._menuButton_d26kh_659{box-sizing:border-box;display:flex;width:100%;align-items:center;gap:var(--space-2);overflow:hidden;border:none;border-radius:var(--radius-md);padding-inline:var(--space-2);background:none;color:inherit;text-align:left;text-decoration:none;cursor:pointer;outline:none;transition:width .2s linear,height .2s linear,padding .2s linear,color .15s ease,background-color .15s ease,border-color .15s ease}._menuItem_d26kh_651:has(._menuAction_d26kh_675) ._menuButton_d26kh_659,._menuItem_d26kh_651:has(._menuBadge_d26kh_708) ._menuButton_d26kh_659{padding-right:var(--space-8)}._menuButton_d26kh_659>svg{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm)}._menuButton_d26kh_659>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._menuButton_d26kh_659:hover,._menuButton_d26kh_659:active,._menuButton_d26kh_659:focus-visible,._menuButton_d26kh_659[data-popup-open]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}._menuButton_d26kh_659:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:-2px}._menuButton_d26kh_659[data-active]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground);font-weight:var(--text-label-weight)}._menuButton_d26kh_659:disabled,._menuButton_d26kh_659[aria-disabled=true]{pointer-events:none;opacity:var(--opacity-disabled)}._variantOutline_d26kh_767{background-color:var(--background);box-shadow:0 0 0 1px var(--sidebar-border)}._variantOutline_d26kh_767:hover,._variantOutline_d26kh_767:focus-visible{box-shadow:0 0 0 1px var(--sidebar-accent)}._sizeDefault_d26kh_758{height:var(--control-height-sm);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._sizeSm_d26kh_783{height:var(--control-height-xs);font-size:var(--text-label-size);line-height:var(--text-label-line-height)}._sizeLg_d26kh_798{height:calc(var(--control-height-lg) + var(--space-2));font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._root_d26kh_14[data-collapsible=icon] ._menuButton_d26kh_659{width:var(--control-height-sm);height:var(--control-height-sm);justify-content:center;padding:var(--space-2)}._root_d26kh_14[data-collapsible=icon] ._sizeLg_d26kh_798{padding:0}._root_d26kh_14[data-collapsible=icon] ._menuButton_d26kh_659>*:not(:first-child){display:none}._menuAction_d26kh_675,._menuBadge_d26kh_708{top:calc((var(--control-height-sm) - var(--space-5)) / 2)}._menuItem_d26kh_651:has(._sizeSm_d26kh_783) ._menuAction_d26kh_675,._menuItem_d26kh_651:has(._sizeSm_d26kh_783) ._menuBadge_d26kh_708{top:calc((var(--control-height-xs) - var(--space-5)) / 2)}._menuItem_d26kh_651:has(._sizeLg_d26kh_798) ._menuAction_d26kh_675,._menuItem_d26kh_651:has(._sizeLg_d26kh_798) ._menuBadge_d26kh_708{top:calc((var(--control-height-lg) + var(--space-2) - var(--space-5)) / 2)}._menuAction_d26kh_675{box-sizing:border-box;position:absolute;right:var(--space-1);display:flex;aspect-ratio:1;align-items:center;justify-content:center;width:var(--space-5);border:none;border-radius:var(--radius-md);padding:0;background:none;color:var(--sidebar-foreground);cursor:pointer;outline:none;transition:transform .15s ease}._menuAction_d26kh_675>svg{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm)}._menuAction_d26kh_675:hover{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}._menuAction_d26kh_675:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:1px}._menuActionShowOnHover_d26kh_903{opacity:0}._menuItem_d26kh_651:hover ._menuActionShowOnHover_d26kh_903,._menuItem_d26kh_651:focus-within ._menuActionShowOnHover_d26kh_903,._menuActionShowOnHover_d26kh_903[aria-expanded=true],._menuActionShowOnHover_d26kh_903[data-popup-open]{opacity:1}._menuBadge_d26kh_708{box-sizing:border-box;position:absolute;right:var(--space-1);display:flex;height:var(--space-5);min-width:var(--space-5);align-items:center;justify-content:center;border-radius:var(--radius-md);padding-inline:var(--space-1);color:var(--sidebar-foreground);font-variant-numeric:tabular-nums;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-label-weight);-webkit-user-select:none;user-select:none;pointer-events:none}._menuItem_d26kh_651:has(._menuButton_d26kh_659:hover) ._menuBadge_d26kh_708,._menuItem_d26kh_651:has(._menuButton_d26kh_659[data-active]) ._menuBadge_d26kh_708{color:var(--sidebar-accent-foreground)}._root_d26kh_14[data-collapsible=icon] ._menuAction_d26kh_675,._root_d26kh_14[data-collapsible=icon] ._menuBadge_d26kh_708{display:none}._menuSkeleton_d26kh_955{box-sizing:border-box;display:flex;height:var(--control-height-sm);align-items:center;gap:var(--space-2);border-radius:var(--radius-md);padding-inline:var(--space-2)}._menuSkeletonIcon_d26kh_965{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm);border-radius:var(--radius-md)}._menuSkeletonText_d26kh_972{--skeleton-width: 100%;height:var(--text-meta-line-height);max-width:var(--skeleton-width);flex:1 1 0%;border-radius:var(--radius-sm)}._menuSub_d26kh_1003{display:flex;min-width:0;flex-direction:column;gap:var(--space-1);margin:0;margin-inline:var(--space-3);padding-block:var(--space-1);padding-inline:var(--space-3) 0;list-style:none;border-left:var(--border-width) solid var(--sidebar-border)}._menuSubItem_d26kh_1016{position:relative}._menuSubButton_d26kh_1026{box-sizing:border-box;display:flex;height:var(--control-height-xs);min-width:0;align-items:center;gap:var(--space-2);overflow:hidden;border-radius:var(--radius-md);padding-inline:var(--space-2);color:var(--sidebar-foreground);text-decoration:none;cursor:pointer;outline:none;transition:color .15s ease,background-color .15s ease}._menuSubButton_d26kh_1026>svg{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm);color:var(--sidebar-accent-foreground)}._menuSubButton_d26kh_1026>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._menuSubButton_d26kh_1026:hover,._menuSubButton_d26kh_1026:active,._menuSubButton_d26kh_1026:focus-visible{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}._menuSubButton_d26kh_1026:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:-2px}._menuSubButton_d26kh_1026[data-active]{background-color:var(--sidebar-accent);color:var(--sidebar-accent-foreground)}._menuSubButton_d26kh_1026:disabled,._menuSubButton_d26kh_1026[aria-disabled=true]{pointer-events:none;opacity:var(--opacity-disabled)}._subSizeSm_d26kh_1088{font-size:var(--text-label-size);line-height:var(--text-label-line-height)}._subSizeMd_d26kh_1093{font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._root_d26kh_14[data-collapsible=icon] ._menuSub_d26kh_1003{display:none}._root_d26kh_14[data-collapsible=icon] ._menuSkeleton_d26kh_955{width:var(--control-height-sm);justify-content:center;padding:var(--space-2)}._root_d26kh_14[data-collapsible=icon] ._menuSkeletonText_d26kh_972{display:none}._wrapper_d26kh_33._contained_d26kh_1122{min-height:0;height:100%}._contained_d26kh_1122>._none_d26kh_74{position:sticky;top:0;align-self:flex-start;max-height:100%;border-inline-end:var(--border-width) solid var(--sidebar-border)}._contained_d26kh_1122>._inset_d26kh_406{min-height:0;overflow:auto}@media(max-width:767px){._wrapper_d26kh_33._contained_d26kh_1122{flex-direction:column}._contained_d26kh_1122>._none_d26kh_74{position:static;width:100%;height:auto;border-inline-end:0;border-block-end:var(--border-width) solid var(--sidebar-border)}._contained_d26kh_1122>._none_d26kh_74 ._content_d26kh_501{max-height:190px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._root_1hk8j_11{display:flex}._root_1hk8j_11[data-orientation=horizontal]{width:100%}._root_1hk8j_11[data-orientation=vertical]{height:100%}._control_1hk8j_23{position:relative;display:flex;width:100%;align-items:center;touch-action:none;-webkit-user-select:none;user-select:none}._control_1hk8j_23[data-orientation=vertical]{height:100%;width:auto;flex-direction:column}._control_1hk8j_23[data-disabled]{opacity:var(--opacity-disabled)}._track_1hk8j_42{position:relative;flex-grow:1;overflow:hidden;border-radius:var(--radius-full);background-color:var(--secondary)}[data-theme=dark] ._track_1hk8j_42{background-color:var(--muted)}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) ._track_1hk8j_42{background-color:var(--muted)}}._control_1hk8j_23[data-orientation=horizontal] ._track_1hk8j_42{height:.375rem}._control_1hk8j_23[data-orientation=vertical] ._track_1hk8j_42{width:.375rem}._range_1hk8j_74{position:relative;background-color:var(--primary)}._control_1hk8j_23[data-orientation=horizontal] ._range_1hk8j_74{height:100%}._control_1hk8j_23[data-orientation=vertical] ._range_1hk8j_74{width:100%}._thumb_1hk8j_95{display:block;flex-shrink:0;width:1rem;height:1rem;border:var(--border-width-focus) solid var(--primary);border-radius:var(--radius-full);background-color:var(--surface-elevated);outline:none;transition:box-shadow .15s ease,border-color .15s ease}._thumb_1hk8j_95:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._thumb_1hk8j_95:focus-visible{outline-color:Highlight}}._thumb_1hk8j_95[data-disabled]{pointer-events:none}._thumb_1hk8j_95[aria-invalid=true]{border-color:var(--destructive)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._statusDot_109yq_16{display:inline-flex;align-items:center;gap:6px;font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking)}._dot_109yq_38{flex-shrink:0;width:6px;height:6px;border-radius:var(--radius-full);background-color:currentColor}._label_109yq_48{min-width:0}._toneNeutral_109yq_52{color:var(--muted-foreground)}._toneSuccess_109yq_56{color:var(--success)}._toneWarning_109yq_60{color:var(--warning)}._toneDanger_109yq_64{color:var(--danger)}._toneInfo_109yq_68{color:var(--info)}._toneSuccess_109yq_56 ._label_109yq_48{color:var(--success-foreground)}._toneWarning_109yq_60 ._label_109yq_48{color:var(--warning-foreground)}._toneDanger_109yq_64 ._label_109yq_48{color:var(--danger-foreground)}@keyframes _status-dot-pulse_109yq_1{50%{opacity:.4}}._statusDot_109yq_16[data-live] ._dot_109yq_38{animation:_status-dot-pulse_109yq_1 2s var(--ease-standard) infinite}@media(prefers-reduced-motion:reduce){._statusDot_109yq_16[data-live] ._dot_109yq_38{animation:none}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tabs_4zxq0_32,._list_4zxq0_31,._trigger_4zxq0_25,._content_4zxq0_32{box-sizing:border-box}._tabs_4zxq0_32{display:flex;gap:var(--space-2)}._tabs_4zxq0_32[data-orientation=horizontal]{flex-direction:column}._list_4zxq0_31{--indicator-gap: 3px;--indicator-thickness: 3px;position:relative;display:inline-flex;width:fit-content;align-items:stretch;justify-content:center;border-radius:var(--radius-lg);color:var(--muted-foreground)}._sizeSm_4zxq0_92 ._trigger_4zxq0_25{font-size:var(--text-label-size);line-height:var(--text-label-line-height);letter-spacing:var(--text-label-tracking)}._sizeDefault_4zxq0_98 ._trigger_4zxq0_25{font-size:var(--text-body-size);line-height:var(--text-body-line-height);letter-spacing:var(--text-body-tracking)}._list_4zxq0_31[data-orientation=vertical]{height:fit-content;flex-direction:column}._list_4zxq0_31._variantDefault_4zxq0_116{padding:var(--indicator-thickness);background-color:var(--muted)}._list_4zxq0_31._variantDefault_4zxq0_116[data-orientation=horizontal]{height:var(--control-height-sm)}._list_4zxq0_31._variantDefault_4zxq0_116[data-orientation=vertical]{height:fit-content}._variantLine_4zxq0_131{background-color:transparent;border-radius:0;gap:var(--space-1)}._list_4zxq0_31._variantLine_4zxq0_131[data-orientation=horizontal],._list_4zxq0_31._variantLine_4zxq0_131[data-orientation=vertical]{height:fit-content}._list_4zxq0_31._variantLine_4zxq0_131[data-orientation=horizontal]{padding-block-end:calc(var(--indicator-gap) + var(--indicator-thickness))}._list_4zxq0_31._variantLine_4zxq0_131[data-orientation=vertical]{padding-inline-end:calc(var(--indicator-gap) + var(--indicator-thickness))}._trigger_4zxq0_25{position:relative;display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;gap:var(--space-2);border:0;border-radius:var(--radius-md);padding:2px 6px;height:calc(100% - var(--border-width));background-color:transparent;color:color-mix(in oklab,var(--foreground) 60%,transparent);font-family:inherit;font-weight:var(--text-label-weight);white-space:nowrap;cursor:pointer;transition:color var(--duration-micro) var(--ease-standard),background-color var(--duration-micro) var(--ease-standard),box-shadow var(--duration-micro) var(--ease-standard)}._trigger_4zxq0_25 svg{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}._trigger_4zxq0_25[data-orientation=vertical]{width:100%;justify-content:flex-start}._trigger_4zxq0_25:hover{color:var(--foreground)}._trigger_4zxq0_25:focus-visible{outline:none;box-shadow:inset 0 0 0 var(--border-width-focus) var(--ring)}@media(forced-colors:active){._trigger_4zxq0_25:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._trigger_4zxq0_25[data-disabled]{cursor:not-allowed;opacity:var(--opacity-disabled)}._trigger_4zxq0_25[data-active]{background-color:var(--secondary);color:var(--secondary-foreground);box-shadow:inset 0 0 0 var(--border-width) var(--border)}._trigger_4zxq0_25[data-active]:focus-visible{box-shadow:inset 0 0 0 var(--border-width-focus) var(--ring)}._list_4zxq0_31 ._indicator_4zxq0_284{position:absolute;background-color:var(--primary);pointer-events:none;transition:transform var(--duration-tab) var(--ease-standard),width var(--duration-tab) var(--ease-standard),height var(--duration-tab) var(--ease-standard)}._list_4zxq0_31 ._indicator_4zxq0_284[data-orientation=horizontal]{bottom:0;left:0;width:var(--active-tab-width);height:var(--indicator-thickness);transform:translate(var(--active-tab-left))}._list_4zxq0_31 ._indicator_4zxq0_284[data-orientation=vertical]{top:0;right:0;width:var(--indicator-thickness);height:var(--active-tab-height);transform:translateY(var(--active-tab-top))}@media(prefers-reduced-motion:reduce){._list_4zxq0_31 ._indicator_4zxq0_284{transition-duration:1ms}}._list_4zxq0_31._variantDefault_4zxq0_116 ._indicator_4zxq0_284{display:none}._variantLine_4zxq0_131 ._trigger_4zxq0_25[data-active]{background-color:transparent}._variantLine_4zxq0_131 ._trigger_4zxq0_25[data-active]:not(:focus-visible){box-shadow:none}._content_4zxq0_32{flex:1 1 0%;font-size:var(--text-body-size);line-height:var(--text-body-line-height);outline:none}._content_4zxq0_32[data-animate]{transition:opacity var(--duration-tab) var(--ease-standard),translate var(--duration-tab) var(--ease-standard)}._content_4zxq0_32[data-animate][data-starting-style]{opacity:0;translate:0 4px}@media(prefers-reduced-motion:reduce){._content_4zxq0_32[data-animate][data-starting-style]{translate:none}}._content_4zxq0_32:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._content_4zxq0_32:focus-visible{outline:2px solid Highlight;outline-offset:2px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._text_15srh_7{margin:0}._typographyBody_15srh_11{font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-body-tracking)}._typographyLabel_15srh_18{font-size:var(--text-label-size);line-height:var(--text-label-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-label-tracking)}._typographyMeta_15srh_25{font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-meta-weight);letter-spacing:var(--text-meta-tracking)}._typographyMono_15srh_32{font-family:var(--font-mono);font-size:var(--text-mono-size);line-height:var(--text-mono-line-height);font-weight:var(--text-mono-weight);letter-spacing:var(--text-mono-tracking)}._typographyMicro_15srh_40{font-size:var(--text-micro-size);line-height:var(--text-micro-line-height);font-weight:var(--text-micro-weight);letter-spacing:var(--text-micro-tracking)}._typographyKpi_15srh_47{font-size:var(--text-kpi-size);line-height:var(--text-kpi-line-height);font-weight:var(--text-kpi-weight);letter-spacing:var(--text-kpi-tracking);font-variant-numeric:tabular-nums}._typographyKpiLg_15srh_55{font-size:var(--text-kpi-lg-size);line-height:var(--text-kpi-lg-line-height);font-weight:var(--text-kpi-lg-weight);letter-spacing:var(--text-kpi-lg-tracking);font-variant-numeric:tabular-nums}._toneDefault_15srh_63{color:var(--foreground)}._toneMuted_15srh_67{color:var(--muted-foreground)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._visuallyHidden_1i026_7{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/code-block/public.js'
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n, jsxs as z, Fragment as p } from "react/jsx-runtime";
|
|
3
|
+
import { cx as c, cva as v } from "class-variance-authority";
|
|
4
|
+
import { CheckIcon as h, CopyIcon as q } from "lucide-react";
|
|
5
|
+
import { useState as B, useEffect as y, Children as C } from "react";
|
|
6
|
+
import { Button as D } from "./button.js";
|
|
7
|
+
import './chunks/code-block.r7Cm0ncj.css';const g = "_codeBlock_1qzo7_11", k = "_variantDefault_1qzo7_24", N = "_variantDestructive_1qzo7_29", A = "_sizeDefault_1qzo7_36", x = "_sizeSm_1qzo7_39", b = "_content_1qzo7_49", w = "_header_1qzo7_61", H = "_title_1qzo7_80", R = "_actions_1qzo7_119", S = "_copyButton_1qzo7_168", O = "_footer_1qzo7_198", T = "_wrap_1qzo7_205", V = "_code_1qzo7_11", I = "_numbered_1qzo7_218", j = "_line_1qzo7_223", F = "_lineContent_1qzo7_274", $ = "_lineDefault_1qzo7_278", E = "_lineAdded_1qzo7_282", L = "_lineHighlighted_1qzo7_283", P = "_lineRemoved_1qzo7_291", G = "_srOnly_1qzo7_316", e = {
|
|
8
|
+
codeBlock: g,
|
|
9
|
+
variantDefault: k,
|
|
10
|
+
variantDestructive: N,
|
|
11
|
+
sizeDefault: A,
|
|
12
|
+
sizeSm: x,
|
|
13
|
+
content: b,
|
|
14
|
+
header: w,
|
|
15
|
+
title: H,
|
|
16
|
+
actions: R,
|
|
17
|
+
copyButton: S,
|
|
18
|
+
footer: O,
|
|
19
|
+
wrap: T,
|
|
20
|
+
code: V,
|
|
21
|
+
numbered: I,
|
|
22
|
+
line: j,
|
|
23
|
+
lineContent: F,
|
|
24
|
+
lineDefault: $,
|
|
25
|
+
lineAdded: E,
|
|
26
|
+
lineHighlighted: L,
|
|
27
|
+
lineRemoved: P,
|
|
28
|
+
srOnly: G
|
|
29
|
+
}, J = v(e.codeBlock, {
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
default: e.variantDefault,
|
|
33
|
+
destructive: e.variantDestructive
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
default: e.sizeDefault,
|
|
37
|
+
sm: e.sizeSm
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "default",
|
|
42
|
+
size: "default"
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
function Z({ className: o, variant: t, size: i, ...a }) {
|
|
46
|
+
return /* @__PURE__ */ n("div", { className: J({ variant: t, size: i, className: o }), ...a });
|
|
47
|
+
}
|
|
48
|
+
function ee({ className: o, ...t }) {
|
|
49
|
+
return /* @__PURE__ */ n("div", { className: c(e.header, o), ...t });
|
|
50
|
+
}
|
|
51
|
+
function te({ className: o, ...t }) {
|
|
52
|
+
return /* @__PURE__ */ n("div", { className: c(e.title, o), ...t });
|
|
53
|
+
}
|
|
54
|
+
function oe({ className: o, ...t }) {
|
|
55
|
+
return /* @__PURE__ */ n("div", { className: c(e.actions, o), ...t });
|
|
56
|
+
}
|
|
57
|
+
function ne({
|
|
58
|
+
value: o,
|
|
59
|
+
copyLabel: t = "Copy",
|
|
60
|
+
copiedLabel: i = "Copied",
|
|
61
|
+
variant: a = "ghost",
|
|
62
|
+
size: l = "sm",
|
|
63
|
+
className: s,
|
|
64
|
+
onClick: r,
|
|
65
|
+
...u
|
|
66
|
+
}) {
|
|
67
|
+
const [d, m] = B(null), _ = d !== null;
|
|
68
|
+
return y(() => {
|
|
69
|
+
if (d === null)
|
|
70
|
+
return;
|
|
71
|
+
const f = setTimeout(() => m(null), 2e3);
|
|
72
|
+
return () => clearTimeout(f);
|
|
73
|
+
}, [d]), /* @__PURE__ */ z(p, { children: [
|
|
74
|
+
/* @__PURE__ */ n(
|
|
75
|
+
D,
|
|
76
|
+
{
|
|
77
|
+
variant: a,
|
|
78
|
+
size: l,
|
|
79
|
+
"aria-label": _ ? i : t,
|
|
80
|
+
className: c(e.copyButton, s),
|
|
81
|
+
icon: _ ? /* @__PURE__ */ n(h, {}) : /* @__PURE__ */ n(q, {}),
|
|
82
|
+
onClick: (f) => {
|
|
83
|
+
r == null || r(f), Promise.resolve().then(() => navigator.clipboard.writeText(o)).then(() => m(Date.now())).catch(() => {
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
...u
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ n("span", { "aria-live": "polite", className: e.srOnly, children: _ ? i : "" })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
function ie({
|
|
93
|
+
className: o,
|
|
94
|
+
children: t,
|
|
95
|
+
style: i,
|
|
96
|
+
wrap: a = !1,
|
|
97
|
+
lineNumbers: l = !1,
|
|
98
|
+
startLine: s = 1,
|
|
99
|
+
...r
|
|
100
|
+
}) {
|
|
101
|
+
return /* @__PURE__ */ n(
|
|
102
|
+
"pre",
|
|
103
|
+
{
|
|
104
|
+
dir: "ltr",
|
|
105
|
+
tabIndex: 0,
|
|
106
|
+
style: { counterReset: `line ${s - 1}`, ...i },
|
|
107
|
+
className: c(
|
|
108
|
+
e.content,
|
|
109
|
+
a ? "scroll-fade-y" : "scroll-fade-x",
|
|
110
|
+
a && e.wrap,
|
|
111
|
+
l && e.numbered,
|
|
112
|
+
o
|
|
113
|
+
),
|
|
114
|
+
...r,
|
|
115
|
+
children: /* @__PURE__ */ n("code", { className: e.code, children: l && typeof t == "string" ? t.replace(/\n$/, "").split(`
|
|
116
|
+
`).map((u, d) => /* @__PURE__ */ n(M, { children: u }, d)) : t })
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
const K = v(e.line, {
|
|
121
|
+
variants: {
|
|
122
|
+
variant: {
|
|
123
|
+
default: e.lineDefault,
|
|
124
|
+
added: e.lineAdded,
|
|
125
|
+
removed: e.lineRemoved,
|
|
126
|
+
highlighted: e.lineHighlighted
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
defaultVariants: {
|
|
130
|
+
variant: "default"
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
function M({ className: o, variant: t, children: i, ...a }) {
|
|
134
|
+
const l = C.toArray(i).every((s) => s === "");
|
|
135
|
+
return /* @__PURE__ */ n("span", { className: K({ variant: t, className: o }), ...a, children: /* @__PURE__ */ n("span", { className: e.lineContent, children: l ? `
|
|
136
|
+
` : i }) });
|
|
137
|
+
}
|
|
138
|
+
function ae({ className: o, ...t }) {
|
|
139
|
+
return /* @__PURE__ */ n("div", { className: c(e.footer, o), ...t });
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
Z as CodeBlock,
|
|
143
|
+
oe as CodeBlockActions,
|
|
144
|
+
ie as CodeBlockContent,
|
|
145
|
+
ne as CodeBlockCopyButton,
|
|
146
|
+
ae as CodeBlockFooter,
|
|
147
|
+
ee as CodeBlockHeader,
|
|
148
|
+
M as CodeBlockLine,
|
|
149
|
+
te as CodeBlockTitle,
|
|
150
|
+
J as codeBlockVariants
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.js","sources":["../src/components/code-block/code-block.tsx"],"sourcesContent":["'use client';\n\nimport { cva, cx, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, CopyIcon } from 'lucide-react';\nimport { Children, type ComponentProps, type CSSProperties, useEffect, useState } from 'react';\n\nimport { Button, type ButtonProps } from '../button/button';\nimport styles from './code-block.module.css';\n\n/*\n * CodeBlock, translated from shadcn/ui's base CodeBlock (MIT,\n * registry/bases/base/ui/code-block.tsx) to CSS Modules: a frame with an\n * optional header (title and actions) over a focusable `pre`, an optional\n * footer, and line parts for numbers, diffs and highlighted lines. No Base\n * UI primitive. Syntax highlighting is not ported: upstream keeps it in a\n * separate hook (`useHighlightedCode`, Shiki), which would add a\n * highlighter to every consumer; a consumer that highlights passes the\n * tokens as CodeBlockLine children.\n *\n * Deviations, per the kit-wide conventions: no `data-slot`/`data-*` state\n * attributes (the size, variant, wrap and numbering hooks are classes, and\n * the parts find each other through `:has()` on their classes); the focus\n * state is the kit's border recolour plus inset ring rather than upstream's\n * `ring-3` halo; the copy button is the kit's icon-only Button (`size=\"sm\"`,\n * the glyph in its `icon` slot) and takes `copyLabel`/`copiedLabel` so the\n * announced words can be translated.\n */\n\nconst codeBlockVariants = cva(styles.codeBlock, {\n variants: {\n variant: {\n default: styles.variantDefault,\n destructive: styles.variantDestructive,\n },\n size: {\n default: styles.sizeDefault,\n sm: styles.sizeSm,\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n});\n\nexport interface CodeBlockProps\n extends ComponentProps<'div'>, VariantProps<typeof codeBlockVariants> {}\n\nexport function CodeBlock({ className, variant, size, ...props }: CodeBlockProps) {\n return <div className={codeBlockVariants({ variant, size, className })} {...props} />;\n}\n\nexport type CodeBlockHeaderProps = ComponentProps<'div'>;\n\nexport function CodeBlockHeader({ className, ...props }: CodeBlockHeaderProps) {\n return <div className={cx(styles.header, className)} {...props} />;\n}\n\nexport type CodeBlockTitleProps = ComponentProps<'div'>;\n\n/** One line, cut with an ellipsis; an svg before the text is sized to it. */\nexport function CodeBlockTitle({ className, ...props }: CodeBlockTitleProps) {\n return <div className={cx(styles.title, className)} {...props} />;\n}\n\nexport type CodeBlockActionsProps = ComponentProps<'div'>;\n\n/**\n * Inside CodeBlockHeader it sits at the end of the row. As a direct child\n * of CodeBlock (no header) it floats over the top end of the block and\n * shows on hover or focus, and always on a coarse pointer.\n */\nexport function CodeBlockActions({ className, ...props }: CodeBlockActionsProps) {\n return <div className={cx(styles.actions, className)} {...props} />;\n}\n\nexport interface CodeBlockCopyButtonProps\n extends Omit<\n ButtonProps,\n 'icon' | 'end' | 'children' | 'render' | 'nativeButton' | 'aria-label'\n > {\n /** The text written to the clipboard. */\n value: string;\n /** The button's accessible name before a copy. @default 'Copy' */\n copyLabel?: string;\n /** The button's accessible name and the announcement after a copy. @default 'Copied' */\n copiedLabel?: string;\n}\n\n/*\n * Upstream's copy flow: write `value`, switch to the check glyph and the\n * copied name for two seconds, and say it once in a polite live region. A\n * refused write changes nothing (upstream swallows it the same way), and\n * so does a missing clipboard (an insecure context), which would otherwise\n * throw before any promise exists. The reset timer lives in an effect\n * keyed on the time of the last copy, so a second copy within the two\n * seconds restarts it, and an unmount clears it.\n */\nexport function CodeBlockCopyButton({\n value,\n copyLabel = 'Copy',\n copiedLabel = 'Copied',\n variant = 'ghost',\n size = 'sm',\n className,\n onClick,\n ...props\n}: CodeBlockCopyButtonProps) {\n const [copiedAt, setCopiedAt] = useState<number | null>(null);\n const copied = copiedAt !== null;\n\n useEffect(() => {\n if (copiedAt === null) {\n return;\n }\n const timeout = setTimeout(() => setCopiedAt(null), 2000);\n return () => clearTimeout(timeout);\n }, [copiedAt]);\n\n return (\n <>\n <Button\n variant={variant}\n size={size}\n aria-label={copied ? copiedLabel : copyLabel}\n className={cx(styles.copyButton, className)}\n icon={copied ? <CheckIcon /> : <CopyIcon />}\n onClick={(event) => {\n onClick?.(event);\n Promise.resolve()\n .then(() => navigator.clipboard.writeText(value))\n .then(() => setCopiedAt(Date.now()))\n .catch(() => {});\n }}\n {...props}\n />\n <span aria-live=\"polite\" className={styles.srOnly}>\n {copied ? copiedLabel : ''}\n </span>\n </>\n );\n}\n\nexport interface CodeBlockContentProps extends ComponentProps<'pre'> {\n /**\n * Soft-wrap long lines instead of scrolling them sideways.\n * @default false\n */\n wrap?: boolean;\n /**\n * Number the lines. A string child is split into CodeBlockLine parts;\n * CodeBlockLine children are numbered as they are.\n * @default false\n */\n lineNumbers?: boolean;\n /** The number of the first line. @default 1 */\n startLine?: number;\n}\n\n/*\n * The `pre` is always a tab stop, so a keyboard user can scroll a long\n * line (axe `scrollable-region-focusable`); name it with `aria-label` when\n * the page holds several blocks. It is always left to right, whatever the\n * page direction. Line numbers come from a CSS counter the `pre` resets\n * to `startLine - 1`, so they stay out of a copied selection.\n */\nexport function CodeBlockContent({\n className,\n children,\n style,\n wrap = false,\n lineNumbers = false,\n startLine = 1,\n ...props\n}: CodeBlockContentProps) {\n return (\n <pre\n dir=\"ltr\"\n tabIndex={0}\n style={{ counterReset: `line ${startLine - 1}`, ...style } as CSSProperties}\n className={cx(\n styles.content,\n wrap ? 'scroll-fade-y' : 'scroll-fade-x',\n wrap && styles.wrap,\n lineNumbers && styles.numbered,\n className,\n )}\n {...props}\n >\n <code className={styles.code}>\n {lineNumbers && typeof children === 'string'\n ? children\n .replace(/\\n$/, '')\n .split('\\n')\n .map((line, index) => <CodeBlockLine key={index}>{line}</CodeBlockLine>)\n : children}\n </code>\n </pre>\n );\n}\n\nconst codeBlockLineVariants = cva(styles.line, {\n variants: {\n variant: {\n default: styles.lineDefault,\n added: styles.lineAdded,\n removed: styles.lineRemoved,\n highlighted: styles.lineHighlighted,\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n});\n\nexport interface CodeBlockLineProps\n extends ComponentProps<'span'>, VariantProps<typeof codeBlockLineVariants> {}\n\nexport function CodeBlockLine({ className, variant, children, ...props }: CodeBlockLineProps) {\n // An empty line holds a newline so copying a selection keeps blank lines.\n // `Children.toArray` drops null, undefined and booleans, so a line whose\n // children all render nothing counts as empty too.\n const empty = Children.toArray(children).every((child) => child === '');\n\n return (\n <span className={codeBlockLineVariants({ variant, className })} {...props}>\n <span className={styles.lineContent}>{empty ? '\\n' : children}</span>\n </span>\n );\n}\n\nexport type CodeBlockFooterProps = ComponentProps<'div'>;\n\nexport function CodeBlockFooter({ className, ...props }: CodeBlockFooterProps) {\n return <div className={cx(styles.footer, className)} {...props} />;\n}\n\nexport { codeBlockVariants };\n"],"names":["codeBlockVariants","cva","styles","CodeBlock","className","variant","size","props","jsx","CodeBlockHeader","cx","CodeBlockTitle","CodeBlockActions","CodeBlockCopyButton","value","copyLabel","copiedLabel","onClick","copiedAt","setCopiedAt","useState","copied","useEffect","timeout","jsxs","Fragment","Button","CheckIcon","CopyIcon","event","CodeBlockContent","children","style","wrap","lineNumbers","startLine","line","index","CodeBlockLine","codeBlockLineVariants","empty","Children","child","CodeBlockFooter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BMA,IAAoBC,EAAIC,EAAO,WAAW;AAAA,EAC9C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,IAAA;AAAA,IAEtB,MAAM;AAAA,MACJ,SAASA,EAAO;AAAA,MAChB,IAAIA,EAAO;AAAA,IAAA;AAAA,EACb;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EAAA;AAEV,CAAC;AAKM,SAASC,EAAU,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GA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;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAMQ,IAAwBtC,EAAIC,EAAO,MAAM;AAAA,EAC7C,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAASA,EAAO;AAAA,MAChB,OAAOA,EAAO;AAAA,MACd,SAASA,EAAO;AAAA,MAChB,aAAaA,EAAO;AAAA,IAAA;AAAA,EACtB;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAKM,SAASoC,EAAc,EAAE,WAAAlC,GAAW,SAAAC,GAAS,UAAA0B,GAAU,GAAGxB,KAA6B;AAI5F,QAAMiC,IAAQC,EAAS,QAAQV,CAAQ,EAAE,MAAM,CAACW,MAAUA,MAAU,EAAE;AAEtE,2BACG,QAAA,EAAK,WAAWH,EAAsB,EAAE,SAAAlC,GAAS,WAAAD,GAAW,GAAI,GAAGG,GAClE,UAAA,gBAAAC,EAAC,UAAK,WAAWN,EAAO,aAAc,UAAAsC,IAAQ;AAAA,IAAOT,GAAS,GAChE;AAEJ;AAIO,SAASY,GAAgB,EAAE,WAAAvC,GAAW,GAAGG,KAA+B;AAC7E,SAAO,gBAAAC,EAAC,SAAI,WAAWE,EAAGR,EAAO,QAAQE,CAAS,GAAI,GAAGG,GAAO;AAClE;"}
|
package/dist/command.js
CHANGED
|
@@ -1,75 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
3
|
+
import { Command as m, useCommandState as _ } from "cmdk";
|
|
3
4
|
import { cx as a } from "class-variance-authority";
|
|
4
|
-
import { SearchIcon as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
import { SearchIcon as d } from "lucide-react";
|
|
6
|
+
import { isValidElement as g, cloneElement as f } from "react";
|
|
7
|
+
import { Dialog as C, DialogHeader as N, DialogTitle as h, DialogDescription as I, DialogContent as y } from "./dialog.js";
|
|
8
|
+
import './chunks/command.BBW1Cy-M.css';const D = "_command_1nrt6_16", v = "_dialogPopup_1nrt6_38", P = "_srOnly_1nrt6_52", S = "_inputWrapper_1nrt6_69", x = "_inputIcon_1nrt6_77", E = "_input_1nrt6_69", O = "_list_1nrt6_113", W = "_empty_1nrt6_120", j = "_group_1nrt6_128", G = "_item_1nrt6_146", L = "_shortcut_1nrt6_187", k = "_separator_1nrt6_202", w = "_svgIcon_1nrt6_209", o = {
|
|
9
|
+
command: D,
|
|
10
|
+
dialogPopup: v,
|
|
11
|
+
srOnly: P,
|
|
12
|
+
inputWrapper: S,
|
|
13
|
+
inputIcon: x,
|
|
14
|
+
input: E,
|
|
15
|
+
list: O,
|
|
16
|
+
empty: W,
|
|
17
|
+
group: j,
|
|
18
|
+
item: G,
|
|
19
|
+
shortcut: L,
|
|
20
|
+
separator: k,
|
|
21
|
+
svgIcon: w
|
|
20
22
|
};
|
|
21
|
-
function
|
|
23
|
+
function H({ className: n, ...t }) {
|
|
22
24
|
return /* @__PURE__ */ r(m, { className: a(o.command, n), ...t });
|
|
23
25
|
}
|
|
24
|
-
function
|
|
26
|
+
function A({
|
|
25
27
|
title: n = "Command Palette",
|
|
26
28
|
description: t = "Search for a command to run...",
|
|
27
|
-
children:
|
|
28
|
-
className:
|
|
29
|
-
showCloseButton:
|
|
29
|
+
children: e,
|
|
30
|
+
className: s,
|
|
31
|
+
showCloseButton: c = !1,
|
|
30
32
|
...p
|
|
31
33
|
}) {
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ r(
|
|
35
|
-
/* @__PURE__ */ r(
|
|
34
|
+
return /* @__PURE__ */ i(C, { ...p, children: [
|
|
35
|
+
/* @__PURE__ */ i(N, { className: o.srOnly, children: [
|
|
36
|
+
/* @__PURE__ */ r(h, { children: n }),
|
|
37
|
+
/* @__PURE__ */ r(I, { children: t })
|
|
36
38
|
] }),
|
|
37
|
-
/* @__PURE__ */ r(
|
|
39
|
+
/* @__PURE__ */ r(y, { className: a(o.dialogPopup, s), showCloseButton: c, children: /* @__PURE__ */ r(H, { className: o.command, children: e }) })
|
|
38
40
|
] });
|
|
39
41
|
}
|
|
40
|
-
function
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ r(
|
|
43
|
-
/* @__PURE__ */ r(m.Input, { className: a(o.input, n), ...
|
|
42
|
+
function B({ className: n, wrapperClassName: t, ...e }) {
|
|
43
|
+
return /* @__PURE__ */ i("div", { className: a(o.inputWrapper, t), children: [
|
|
44
|
+
/* @__PURE__ */ r(d, { className: a(o.svgIcon, o.inputIcon) }),
|
|
45
|
+
/* @__PURE__ */ r(m.Input, { className: a(o.input, n), ...e })
|
|
44
46
|
] });
|
|
45
47
|
}
|
|
46
|
-
function
|
|
48
|
+
function F({ className: n, ...t }) {
|
|
47
49
|
return /* @__PURE__ */ r(m.List, { className: a(o.list, n), ...t });
|
|
48
50
|
}
|
|
49
|
-
function
|
|
51
|
+
function J({ className: n, ...t }) {
|
|
50
52
|
return /* @__PURE__ */ r(m.Empty, { className: a(o.empty, n), ...t });
|
|
51
53
|
}
|
|
52
|
-
function
|
|
54
|
+
function K({ className: n, ...t }) {
|
|
53
55
|
return /* @__PURE__ */ r(m.Group, { className: a(o.group, n), ...t });
|
|
54
56
|
}
|
|
55
|
-
function
|
|
57
|
+
function M({ className: n, ...t }) {
|
|
56
58
|
return /* @__PURE__ */ r(m.Item, { className: a(o.item, n), ...t });
|
|
57
59
|
}
|
|
58
|
-
function
|
|
60
|
+
function Q({ className: n, ...t }) {
|
|
59
61
|
return /* @__PURE__ */ r("span", { className: a(o.shortcut, n), ...t });
|
|
60
62
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
+
function R({
|
|
64
|
+
className: n,
|
|
65
|
+
alwaysRender: t,
|
|
66
|
+
asChild: e,
|
|
67
|
+
children: s,
|
|
68
|
+
...c
|
|
69
|
+
}) {
|
|
70
|
+
if (_((l) => l.search !== "") && !t)
|
|
71
|
+
return null;
|
|
72
|
+
const u = { role: "none", "cmdk-separator": "" };
|
|
73
|
+
return e && g(s) ? f(s, {
|
|
74
|
+
...c,
|
|
75
|
+
...u,
|
|
76
|
+
className: a(o.separator, n, s.props.className)
|
|
77
|
+
}) : /* @__PURE__ */ r("div", { ...u, className: a(o.separator, n), ...c, children: s });
|
|
63
78
|
}
|
|
64
79
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
H as Command,
|
|
81
|
+
A as CommandDialog,
|
|
82
|
+
J as CommandEmpty,
|
|
83
|
+
K as CommandGroup,
|
|
84
|
+
B as CommandInput,
|
|
85
|
+
M as CommandItem,
|
|
86
|
+
F as CommandList,
|
|
87
|
+
R as CommandSeparator,
|
|
88
|
+
Q as CommandShortcut
|
|
74
89
|
};
|
|
75
90
|
//# sourceMappingURL=command.js.map
|
package/dist/command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sources":["../src/components/command/command.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"command.js","sources":["../src/components/command/command.tsx"],"sourcesContent":["'use client';\n\nimport { Command as CommandPrimitive, useCommandState } from 'cmdk';\nimport { cx } from 'class-variance-authority';\nimport { SearchIcon } from 'lucide-react';\nimport { cloneElement, type ComponentProps, isValidElement, type ReactNode } from 'react';\n\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n type DialogProps,\n} from '../dialog/public.js';\nimport styles from './command.module.css';\n\nexport type CommandProps = ComponentProps<typeof CommandPrimitive>;\n\nexport function Command({ className, ...props }: CommandProps) {\n return <CommandPrimitive className={cx(styles.command, className)} {...props} />;\n}\n\nexport interface CommandDialogProps extends Omit<DialogProps, 'children'> {\n /**\n * Accessible name for the palette — visually hidden, only reaches\n * screen readers via the dialog's title association. @default 'Command Palette'\n */\n title?: ReactNode;\n /** Accessible description, same visually-hidden treatment as `title`. @default 'Search for a command to run...' */\n description?: ReactNode;\n className?: string;\n /**\n * Renders DialogContent's built-in top-right close (X) button.\n * @default false — the palette already dismisses on Escape/outside-press\n * (Dialog's own behavior) and a close button competes with the search\n * input for the popup's one-line header, unlike a regular Dialog where\n * that header has room to spare.\n */\n showCloseButton?: boolean;\n children: ReactNode;\n}\n\nexport function CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className={styles.srOnly}>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className={cx(styles.dialogPopup, className)} showCloseButton={showCloseButton}>\n {/*\n * CommandInput/CommandList/CommandItem/CommandGroup all read their\n * shared state off the nearest ancestor <Command> root's React\n * context (cmdk's internal Provider pair) — without this wrapper\n * they don't just lose styling, `Command.Item`'s registration\n * effect throws trying to call a context value that doesn't exist.\n * cmdk's own bundled `Command.Dialog` (which this kit does NOT use,\n * composing its own Dialog instead — see command.md) wraps its\n * children in exactly this same root internally, for the same\n * reason.\n */}\n <Command className={styles.command}>{children}</Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nexport interface CommandInputProps\n extends Omit<ComponentProps<typeof CommandPrimitive.Input>, 'className'> {\n className?: string;\n /** className for the wrapper div around the icon + input. */\n wrapperClassName?: string;\n}\n\nexport function CommandInput({ className, wrapperClassName, ...props }: CommandInputProps) {\n return (\n <div className={cx(styles.inputWrapper, wrapperClassName)}>\n <SearchIcon className={cx(styles.svgIcon, styles.inputIcon)} />\n <CommandPrimitive.Input className={cx(styles.input, className)} {...props} />\n </div>\n );\n}\n\nexport type CommandListProps = ComponentProps<typeof CommandPrimitive.List>;\n\nexport function CommandList({ className, ...props }: CommandListProps) {\n return <CommandPrimitive.List className={cx(styles.list, className)} {...props} />;\n}\n\nexport type CommandEmptyProps = ComponentProps<typeof CommandPrimitive.Empty>;\n\nexport function CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return <CommandPrimitive.Empty className={cx(styles.empty, className)} {...props} />;\n}\n\nexport type CommandGroupProps = ComponentProps<typeof CommandPrimitive.Group>;\n\nexport function CommandGroup({ className, ...props }: CommandGroupProps) {\n return <CommandPrimitive.Group className={cx(styles.group, className)} {...props} />;\n}\n\nexport type CommandItemProps = ComponentProps<typeof CommandPrimitive.Item>;\n\nexport function CommandItem({ className, ...props }: CommandItemProps) {\n return <CommandPrimitive.Item className={cx(styles.item, className)} {...props} />;\n}\n\nexport type CommandShortcutProps = ComponentProps<'span'>;\n\nexport function CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return <span className={cx(styles.shortcut, className)} {...props} />;\n}\n\nexport type CommandSeparatorProps = ComponentProps<typeof CommandPrimitive.Separator>;\n\n/*\n * cmdk's own Separator always sets `role=\"separator\"` (after the caller's\n * props, so it cannot be overridden), and inside CommandList's\n * `role=\"listbox\"` that is a child the listbox role does not allow (axe\n * `aria-required-children`). This part keeps cmdk's behaviour, hidden while\n * a search is typed unless `alwaysRender`, and renders a presentational\n * line instead: the groups already separate the options for assistive\n * technology.\n */\nexport function CommandSeparator({\n className,\n alwaysRender,\n asChild,\n children,\n ...props\n}: CommandSeparatorProps) {\n const searching = useCommandState((state) => state.search !== '');\n if (searching && !alwaysRender) {\n return null;\n }\n const own = { role: 'none', 'cmdk-separator': '' } as const;\n // `asChild`, as cmdk offers it: the single child element takes the\n // separator's props instead of a div.\n if (asChild && isValidElement<{ className?: string }>(children)) {\n return cloneElement(children, {\n ...props,\n ...own,\n className: cx(styles.separator, className, children.props.className),\n });\n }\n return (\n <div {...own} className={cx(styles.separator, className)} {...props}>\n {children}\n </div>\n );\n}\n"],"names":["Command","className","props","jsx","CommandPrimitive","cx","styles","CommandDialog","title","description","children","showCloseButton","jsxs","Dialog","DialogHeader","DialogTitle","DialogDescription","DialogContent","CommandInput","wrapperClassName","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandShortcut","CommandSeparator","alwaysRender","asChild","useCommandState","state","own","isValidElement","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBO,SAASA,EAAQ,EAAE,WAAAC,GAAW,GAAGC,KAAuB;AAC7D,SAAO,gBAAAC,EAACC,KAAiB,WAAWC,EAAGC,EAAO,SAASL,CAAS,GAAI,GAAGC,GAAO;AAChF;AAsBO,SAASK,EAAc;AAAA,EAC5B,OAAAC,IAAQ;AAAA,EACR,aAAAC,IAAc;AAAA,EACd,UAAAC;AAAA,EACA,WAAAT;AAAA,EACA,iBAAAU,IAAkB;AAAA,EAClB,GAAGT;AACL,GAAuB;AACrB,SACE,gBAAAU,EAACC,GAAA,EAAQ,GAAGX,GACV,UAAA;AAAA,IAAA,gBAAAU,EAACE,GAAA,EAAa,WAAWR,EAAO,QAC9B,UAAA;AAAA,MAAA,gBAAAH,EAACY,KAAa,UAAAP,EAAA,CAAM;AAAA,MACpB,gBAAAL,EAACa,KAAmB,UAAAP,EAAA,CAAY;AAAA,IAAA,GAClC;AAAA,IACA,gBAAAN,EAACc,GAAA,EAAc,WAAWZ,EAAGC,EAAO,aAAaL,CAAS,GAAG,iBAAAU,GAY3D,4BAACX,GAAA,EAAQ,WAAWM,EAAO,SAAU,UAAAI,GAAS,EAAA,CAChD;AAAA,EAAA,GACF;AAEJ;AASO,SAASQ,EAAa,EAAE,WAAAjB,GAAW,kBAAAkB,GAAkB,GAAGjB,KAA4B;AACzF,2BACG,OAAA,EAAI,WAAWG,EAAGC,EAAO,cAAca,CAAgB,GACtD,UAAA;AAAA,IAAA,gBAAAhB,EAACiB,KAAW,WAAWf,EAAGC,EAAO,SAASA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SAAIH,KAAWI,EAAuCtB,CAAQ,IACrDuB,EAAavB,GAAU;AAAA,IAC5B,GAAGR;AAAA,IACH,GAAG6B;AAAA,IACH,WAAW1B,EAAGC,EAAO,WAAWL,GAAWS,EAAS,MAAM,SAAS;AAAA,EAAA,CACpE,IAGD,gBAAAP,EAAC,OAAA,EAAK,GAAG4B,GAAK,WAAW1B,EAAGC,EAAO,WAAWL,CAAS,GAAI,GAAGC,GAC3D,UAAAQ,EAAA,CACH;AAEJ;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { ComponentProps } from 'react';
|
|
3
4
|
declare const alertVariants: (props?: ({
|
|
@@ -5,8 +6,8 @@ declare const alertVariants: (props?: ({
|
|
|
5
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
7
|
export type AlertProps = ComponentProps<'div'> & VariantProps<typeof alertVariants>;
|
|
7
8
|
export declare function Alert({ className, variant, ...props }: AlertProps): import("react").JSX.Element;
|
|
8
|
-
export type AlertTitleProps = ComponentProps<'div'>;
|
|
9
|
-
export declare function AlertTitle({ className, ...props }: AlertTitleProps): import(
|
|
9
|
+
export type AlertTitleProps = useRender.ComponentProps<'div'>;
|
|
10
|
+
export declare function AlertTitle({ className, render, ...props }: AlertTitleProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
10
11
|
export type AlertDescriptionProps = ComponentProps<'div'>;
|
|
11
12
|
export declare function AlertDescription({ className, ...props }: AlertDescriptionProps): import("react").JSX.Element;
|
|
12
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAc5C,QAAA,MAAM,aAAa;;8EAUjB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpF,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,+BAEjE;AAED,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAS9D,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,8FAS1E;AAED,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BAE9E;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAEpE"}
|
|
@@ -61,11 +61,18 @@ export type AttachmentTriggerProps = useRender.ComponentProps<'button'>;
|
|
|
61
61
|
* dialog while `AttachmentActions` stay independently clickable (it sits
|
|
62
62
|
* behind them in the stacking order). Renders a `<button>` by default. */
|
|
63
63
|
export declare function AttachmentTrigger({ className, render, type, ...props }: AttachmentTriggerProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
64
|
-
export
|
|
64
|
+
export interface AttachmentGroupProps extends ComponentProps<'div'> {
|
|
65
|
+
/**
|
|
66
|
+
* Accessible name for the row (`role="group"` + `aria-label`). Announced
|
|
67
|
+
* when keyboard focus lands on an overflowing row; without it the group
|
|
68
|
+
* has no role and no name.
|
|
69
|
+
*/
|
|
70
|
+
label?: string;
|
|
71
|
+
}
|
|
65
72
|
/** Lays out attachments in a horizontally scrollable, snapping row with an
|
|
66
73
|
* edge fade. Applies `scroll-fade-x` and `no-scrollbar` (this package's
|
|
67
|
-
* global utilities
|
|
74
|
+
* global utilities, see this file's own header) directly, by class name,
|
|
68
75
|
* alongside the module's own layout class. */
|
|
69
|
-
export declare function AttachmentGroup({ className, ...props }: AttachmentGroupProps): import(
|
|
76
|
+
export declare function AttachmentGroup({ className, label, tabIndex, ref, ...props }: AttachmentGroupProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
70
77
|
export { attachmentMediaVariants, attachmentVariants };
|
|
71
78
|
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/components/attachment/attachment.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../src/components/attachment/attachment.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAA0D,KAAK,cAAc,EAAkB,MAAM,OAAO,CAAC;AAEpH,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAiC/D,QAAA,MAAM,kBAAkB;;;8EAgBtB,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,kBAAkB,CAAC;IACrG;;;;;OAKG;IACH,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SAAS,EAAE,OAAO,EAAE,IAAW,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,+BASpG;AAED,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;AAExE;;0EAE0E;AAC1E,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,8FAY9F;AAED,MAAM,WAAW,oBAAqB,SAAQ,cAAc,CAAC,KAAK,CAAC;IACjE;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkDD;;;8CAG8C;AAC9C,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,8FA0BlG;AAED,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
1
2
|
import { VariantProps } from 'class-variance-authority';
|
|
2
3
|
import { ComponentProps } from 'react';
|
|
3
4
|
declare const cardVariants: (props?: ({
|
|
5
|
+
variant?: "panel" | "default" | null | undefined;
|
|
4
6
|
size?: "default" | "sm" | null | undefined;
|
|
5
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
export type CardProps = ComponentProps<'div'> & VariantProps<typeof cardVariants>;
|
|
7
|
-
export declare function Card({ className, size, ...props }: CardProps): import(
|
|
8
|
+
export type CardProps = useRender.ComponentProps<'div'> & VariantProps<typeof cardVariants>;
|
|
9
|
+
export declare function Card({ className, variant, size, render, ...props }: CardProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
8
10
|
export type CardHeaderProps = ComponentProps<'div'>;
|
|
9
11
|
export declare function CardHeader({ className, ...props }: CardHeaderProps): import("react").JSX.Element;
|
|
10
12
|
declare const cardTitleVariants: (props?: ({
|
|
@@ -13,8 +15,8 @@ declare const cardTitleVariants: (props?: ({
|
|
|
13
15
|
declare const cardDescriptionVariants: (props?: ({
|
|
14
16
|
typography?: "panel" | "default" | null | undefined;
|
|
15
17
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
16
|
-
export type CardTitleProps = ComponentProps<'div'> & VariantProps<typeof cardTitleVariants>;
|
|
17
|
-
export declare function CardTitle({ className, typography, ...props }: CardTitleProps): import(
|
|
18
|
+
export type CardTitleProps = useRender.ComponentProps<'div'> & VariantProps<typeof cardTitleVariants>;
|
|
19
|
+
export declare function CardTitle({ className, typography, render, ...props }: CardTitleProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
18
20
|
export type CardDescriptionProps = ComponentProps<'div'> & VariantProps<typeof cardDescriptionVariants>;
|
|
19
21
|
export declare function CardDescription({ className, typography, ...props }: CardDescriptionProps): import("react").JSX.Element;
|
|
20
22
|
/** Positions in the header's second column, spanning both its rows (see CSS). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAsB5C,QAAA,MAAM,YAAY;;;8EAehB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAO5F,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,8FAe7E;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAElE;AASD,QAAA,MAAM,iBAAiB;;8EAUrB,CAAC;AAEH,QAAA,MAAM,uBAAuB;;8EAU3B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAC1D,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAOzC,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,8FAcpF;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,GACtD,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE/C,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAExF;AAED,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAElE;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,+BAEpE;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEpD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,+BAElE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ButtonProps } from '../button/button';
|
|
4
|
+
declare const codeBlockVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
size?: "default" | "sm" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
export interface CodeBlockProps extends ComponentProps<'div'>, VariantProps<typeof codeBlockVariants> {
|
|
9
|
+
}
|
|
10
|
+
export declare function CodeBlock({ className, variant, size, ...props }: CodeBlockProps): import("react").JSX.Element;
|
|
11
|
+
export type CodeBlockHeaderProps = ComponentProps<'div'>;
|
|
12
|
+
export declare function CodeBlockHeader({ className, ...props }: CodeBlockHeaderProps): import("react").JSX.Element;
|
|
13
|
+
export type CodeBlockTitleProps = ComponentProps<'div'>;
|
|
14
|
+
/** One line, cut with an ellipsis; an svg before the text is sized to it. */
|
|
15
|
+
export declare function CodeBlockTitle({ className, ...props }: CodeBlockTitleProps): import("react").JSX.Element;
|
|
16
|
+
export type CodeBlockActionsProps = ComponentProps<'div'>;
|
|
17
|
+
/**
|
|
18
|
+
* Inside CodeBlockHeader it sits at the end of the row. As a direct child
|
|
19
|
+
* of CodeBlock (no header) it floats over the top end of the block and
|
|
20
|
+
* shows on hover or focus, and always on a coarse pointer.
|
|
21
|
+
*/
|
|
22
|
+
export declare function CodeBlockActions({ className, ...props }: CodeBlockActionsProps): import("react").JSX.Element;
|
|
23
|
+
export interface CodeBlockCopyButtonProps extends Omit<ButtonProps, 'icon' | 'end' | 'children' | 'render' | 'nativeButton' | 'aria-label'> {
|
|
24
|
+
/** The text written to the clipboard. */
|
|
25
|
+
value: string;
|
|
26
|
+
/** The button's accessible name before a copy. @default 'Copy' */
|
|
27
|
+
copyLabel?: string;
|
|
28
|
+
/** The button's accessible name and the announcement after a copy. @default 'Copied' */
|
|
29
|
+
copiedLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function CodeBlockCopyButton({ value, copyLabel, copiedLabel, variant, size, className, onClick, ...props }: CodeBlockCopyButtonProps): import("react").JSX.Element;
|
|
32
|
+
export interface CodeBlockContentProps extends ComponentProps<'pre'> {
|
|
33
|
+
/**
|
|
34
|
+
* Soft-wrap long lines instead of scrolling them sideways.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
wrap?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Number the lines. A string child is split into CodeBlockLine parts;
|
|
40
|
+
* CodeBlockLine children are numbered as they are.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
lineNumbers?: boolean;
|
|
44
|
+
/** The number of the first line. @default 1 */
|
|
45
|
+
startLine?: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function CodeBlockContent({ className, children, style, wrap, lineNumbers, startLine, ...props }: CodeBlockContentProps): import("react").JSX.Element;
|
|
48
|
+
declare const codeBlockLineVariants: (props?: ({
|
|
49
|
+
variant?: "default" | "added" | "removed" | "highlighted" | null | undefined;
|
|
50
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
51
|
+
export interface CodeBlockLineProps extends ComponentProps<'span'>, VariantProps<typeof codeBlockLineVariants> {
|
|
52
|
+
}
|
|
53
|
+
export declare function CodeBlockLine({ className, variant, children, ...props }: CodeBlockLineProps): import("react").JSX.Element;
|
|
54
|
+
export type CodeBlockFooterProps = ComponentProps<'div'>;
|
|
55
|
+
export declare function CodeBlockFooter({ className, ...props }: CodeBlockFooterProps): import("react").JSX.Element;
|
|
56
|
+
export { codeBlockVariants };
|
|
57
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEtE,OAAO,EAAY,KAAK,cAAc,EAA2C,MAAM,OAAO,CAAC;AAE/F,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAsB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AAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD,wBAAgB,gBAAgB,CAAC,EAC/B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,IAAY,EACZ,WAAmB,EACnB,SAAa,EACb,GAAG,KAAK,EACT,EAAE,qBAAqB,+BAyBvB;AAED,QAAA,MAAM,qBAAqB;;8EAYzB,CAAC;AAEH,MAAM,WAAW,kBACf,SAAQ,cAAc,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,qBAAqB,CAAC;CAAG;AAE/E,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAW3F;AAED,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;AAEzD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,+BAE5E;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, codeBlockVariants, type CodeBlockActionsProps, type CodeBlockContentProps, type CodeBlockCopyButtonProps, type CodeBlockFooterProps, type CodeBlockHeaderProps, type CodeBlockLineProps, type CodeBlockProps, type CodeBlockTitleProps, } from './code-block.js';
|
|
2
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/components/code-block/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC"}
|