@gears-frontx/ui-kit 0.4.0-alpha.2 → 0.4.0-alpha.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/dist/alert.js +11 -11
- package/dist/attachment.js +20 -20
- package/dist/avatar.js +39 -39
- package/dist/badge.js +15 -15
- package/dist/bubble.js +31 -31
- package/dist/button.js +28 -28
- package/dist/chunks/alert.C5BedF7l.css +1 -0
- package/dist/chunks/attachment.GAZbWSyB.css +1 -0
- package/dist/chunks/avatar.DZUXl1ev.css +1 -0
- package/dist/chunks/badge.Bi22h20j.css +1 -0
- package/dist/chunks/bubble.DvN6QyQ1.css +1 -0
- package/dist/chunks/button.DvAxXxKj.css +1 -0
- package/dist/chunks/context-menu.DwGCD0vN.css +1 -0
- package/dist/chunks/data-table.CtZdVSAU.css +1 -0
- package/dist/chunks/dropdown-menu.C5TLD9JO.css +1 -0
- package/dist/chunks/empty.BlhsHrOz.css +1 -0
- package/dist/chunks/field.Ccqt897k.css +1 -0
- package/dist/chunks/item.BkcgydVc.css +1 -0
- package/dist/chunks/questionnaire.D-u_K3Co.css +1 -0
- package/dist/chunks/table.BpnQ6j85.css +1 -0
- package/dist/chunks/tabs.4MEFBvw-.css +1 -0
- package/dist/chunks/toast.uUtCEAiv.css +1 -0
- package/dist/context-menu.js +62 -62
- package/dist/data-table.js +26 -26
- package/dist/docs/badge.md +7 -8
- package/dist/docs/questionnaire.md +4 -4
- package/dist/docs/sidebar.md +2 -2
- package/dist/dropdown-menu.js +65 -65
- package/dist/empty.js +18 -18
- package/dist/field.js +10 -10
- package/dist/item.js +20 -20
- package/dist/questionnaire.js +77 -77
- package/dist/table.js +23 -23
- package/dist/tabs.js +17 -17
- package/dist/theme.css +359 -242
- package/dist/toast.js +50 -50
- package/package.json +12 -5
- package/dist/chunks/alert.BJLRcB65.css +0 -1
- package/dist/chunks/attachment.rknKEWlr.css +0 -1
- package/dist/chunks/avatar.CsQmQnay.css +0 -1
- package/dist/chunks/badge.DR0epAiZ.css +0 -1
- package/dist/chunks/bubble.BKcAopT7.css +0 -1
- package/dist/chunks/button.D69BdJF1.css +0 -1
- package/dist/chunks/context-menu.Bjib7_AL.css +0 -1
- package/dist/chunks/data-table.DECm3qI-.css +0 -1
- package/dist/chunks/dropdown-menu.CDaeWYDT.css +0 -1
- package/dist/chunks/empty.B334jSES.css +0 -1
- package/dist/chunks/field.yTrg1G90.css +0 -1
- package/dist/chunks/item.CLg1KaYF.css +0 -1
- package/dist/chunks/questionnaire.DYnuWKAQ.css +0 -1
- package/dist/chunks/table.CFAJfhd-.css +0 -1
- package/dist/chunks/tabs.C4jGj2Vg.css +0 -1
- package/dist/chunks/toast.DMUpK07T.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._item_v42b5_23{box-sizing:border-box;display:flex;width:100%;flex-wrap:wrap;align-items:center;border-radius:var(--radius-md);border:var(--border-width) solid transparent;background-color:transparent;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);outline:none;transition:color .1s ease,background-color .1s ease,border-color .1s ease}._item_v42b5_23 a{transition:color .1s ease,background-color .1s ease,border-color .1s ease}._item_v42b5_23 a:hover{background-color:var(--muted)}._item_v42b5_23:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._item_v42b5_23:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._variantDefault_v42b5_79{border-color:transparent}._variantOutline_v42b5_83{border-color:var(--border)}._variantMuted_v42b5_34{background-color:color-mix(in oklab,var(--muted) 50%,transparent);border-color:transparent}._sizeDefault_v42b5_92{gap:var(--space-4);padding:var(--space-4)}._sizeSm_v42b5_97{gap:var(--space-3);padding:var(--space-3)}._sizeXs_v42b5_102{gap:var(--space-2);padding:var(--space-2)}._itemMedia_v42b5_107{display:flex;flex-shrink:0;align-items:center;justify-content:center;gap:var(--space-2)}._itemMedia_v42b5_107 svg{flex-shrink:0;pointer-events:none}._item_v42b5_23:has(._itemDescription_v42b5_124) ._itemMedia_v42b5_107{translate:0 2px;align-self:flex-start}._itemMediaVariantDefault_v42b5_129{background-color:transparent}._itemMediaVariantIcon_v42b5_133 svg{width:var(--icon-size-sm);height:var(--icon-size-sm)}._itemMediaVariantImage_v42b5_138{width:2.5rem;height:2.5rem;overflow:hidden;border-radius:var(--radius-sm)}._itemMediaVariantImage_v42b5_138 img{width:100%;height:100%;object-fit:cover}._sizeSm_v42b5_97 ._itemMediaVariantImage_v42b5_138{width:2rem;height:2rem}._sizeXs_v42b5_102 ._itemMediaVariantImage_v42b5_138{width:1.5rem;height:1.5rem}._itemContent_v42b5_170{display:flex;flex:1 1 0%;min-width:0;flex-direction:column;gap:var(--space-1)}._itemContent_v42b5_170+._itemContent_v42b5_170{flex:none}._sizeXs_v42b5_102 ._itemContent_v42b5_170{gap:0}._itemTitle_v42b5_186{display:flex;width:fit-content;align-items:center;gap:var(--space-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:var(--text-label-weight);text-underline-offset:4px}._itemDescription_v42b5_124{margin:0;color:var(--muted-foreground);text-align:left;font-weight:var(--text-body-weight);display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}._itemDescription_v42b5_124 a{text-decoration:underline;text-underline-offset:4px}._itemDescription_v42b5_124 a:hover{color:var(--link-foreground)}._sizeXs_v42b5_102 ._itemDescription_v42b5_124{font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);letter-spacing:var(--text-meta-tracking)}._itemActions_v42b5_225{display:flex;align-items:center;gap:var(--space-2)}._itemHeader_v42b5_231,._itemFooter_v42b5_232{display:flex;flex-basis:100%;align-items:center;justify-content:space-between;gap:var(--space-2)}._itemGroup_v42b5_240{display:flex;width:100%;flex-direction:column;gap:var(--space-4)}._itemGroup_v42b5_240:has(._sizeSm_v42b5_97){gap:var(--space-3)}._itemGroup_v42b5_240:has(._sizeXs_v42b5_102){gap:var(--space-2)}._itemSeparator_v42b5_258{margin-block:var(--space-2)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._item_1iulu_15[hidden],._previous_1iulu_21[hidden],._skip_1iulu_22[hidden],._next_1iulu_23[hidden],._submit_1iulu_24[hidden]{display:none}._root_1iulu_28{display:flex;width:100%;min-width:0;flex-direction:column;gap:var(--space-4)}._progress_1iulu_36{width:fit-content;min-width:14ch;min-height:1lh;color:var(--muted-foreground);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-meta-tracking);font-variant-numeric:tabular-nums}._item_1iulu_15{display:flex;min-width:0;flex-direction:column;gap:var(--space-4);margin:0;border:0;padding:0;outline:none}._title_1iulu_61{margin:0;font-size:var(--text-heading-2-size);line-height:var(--text-heading-2-line-height);font-weight:var(--text-heading-2-weight);letter-spacing:var(--text-heading-2-tracking);text-wrap:pretty}._title_1iulu_61:not(:has(~._description_1iulu_73)){margin-block-end:var(--space-4)}._description_1iulu_73{margin:0;color:var(--muted-foreground);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);text-wrap:pretty}._choices_1iulu_87{display:grid;min-width:0;gap:var(--space-2)}._choice_1iulu_87{box-sizing:border-box;position:relative;display:flex;min-height:2.75rem;flex-wrap:wrap;align-items:flex-start;align-content:center;gap:var(--space-2);border:var(--border-width) solid var(--input);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);cursor:pointer;text-align:start;-webkit-user-select:none;user-select:none;outline:none;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}._choice_1iulu_87:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}._choice_1iulu_87:has(>._choiceInput_1iulu_95:focus-visible){border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._choice_1iulu_87:has(>._choiceInput_1iulu_95:focus-visible){outline:2px solid Highlight;outline-offset:2px}}._choice_1iulu_87[data-checked]{border-color:color-mix(in oklab,var(--primary) 40%,transparent);background-color:var(--muted)}._choice_1iulu_87[data-invalid]{border-color:var(--destructive)}._choice_1iulu_87[data-invalid]:has(>._choiceInput_1iulu_95:focus-visible){border-color:var(--destructive);box-shadow:inset 0 0 0 var(--ring-inset) var(--destructive)}._choice_1iulu_87[data-disabled]{cursor:not-allowed;pointer-events:none;opacity:.42}._choiceInput_1iulu_95{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}._indicator_1iulu_225{box-sizing:border-box;position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center;transform:translateY(calc((var(--text-body-line-height) - var(--icon-size-sm)) / 2));width:var(--icon-size-sm);height:var(--icon-size-sm);border:var(--border-width) solid var(--input);border-radius:var(--radius-xs);background-color:var(--surface-elevated);transition:border-color .15s ease,background-color .15s ease}._choice_1iulu_87[data-type=radio] ._indicator_1iulu_225{border-radius:9999px}._choice_1iulu_87[data-checked] ._indicator_1iulu_225{border-color:var(--primary);background-color:var(--primary);color:var(--primary-foreground)}._choice_1iulu_87[data-invalid] ._indicator_1iulu_225{border-color:var(--destructive)}._choice_1iulu_87[data-invalid][data-checked] ._indicator_1iulu_225{border-color:var(--primary)}._dot_1iulu_278{display:none;width:.5rem;height:.5rem;border-radius:9999px;background-color:var(--primary-foreground)}._choice_1iulu_87[data-type=radio][data-checked] ._dot_1iulu_278{display:block}._check_1iulu_291{display:none;width:.875rem;height:.875rem}._choice_1iulu_87[data-type=checkbox][data-checked] ._check_1iulu_291{display:block}._choiceLabel_1iulu_127{display:flex;min-width:0;flex:1;flex-direction:column;gap:var(--space-1);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)}._choiceDescription_1iulu_315{color:var(--muted-foreground)}._shortcut_1iulu_242{box-sizing:border-box;display:none;flex-shrink:0;align-items:center;justify-content:center;transform:translateY(calc((var(--text-body-line-height) - var(--icon-size-md)) / 2));margin-inline-start:auto;width:var(--icon-size-md);height:var(--icon-size-md);border:var(--border-width) solid var(--input);border-radius:var(--radius-sm);background-color:var(--background);color:var(--muted-foreground);font-family:var(--font-mono);font-size:var(--text-mono-size);line-height:var(--text-mono-line-height);font-weight:var(--text-label-weight);pointer-events:none}._shortcut_1iulu_242[data-shortcut]{display:inline-flex}._error_1iulu_357{margin:var(--space-2) 0 0;color:var(--danger);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)}._actions_1iulu_372{display:grid;min-height:2.75rem;width:100%;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--space-2)}._previous_1iulu_21{grid-column:1;grid-row:1;justify-self:start}._skip_1iulu_22{grid-column:2;grid-row:1;justify-self:end}._next_1iulu_23,._submit_1iulu_24{grid-column:3;grid-row:1;justify-self:end}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tableContainer_me1x6_8{position:relative;width:100%;overflow-x:auto}._tableContainer_me1x6_8:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._tableContainer_me1x6_8:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._table_me1x6_8{width:100%;border-collapse:collapse;caption-side:bottom;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)}._tableRow_me1x6_77{--table-row-fill: transparent;background-color:var(--table-row-fill);border-bottom:var(--border-width) solid var(--border);transition:color .15s ease,background-color .15s ease,border-color .15s ease}._tableBody_me1x6_94:last-child ._tableRow_me1x6_77:last-child{border-bottom:0}._tableBody_me1x6_94 ._tableRow_me1x6_77:hover,._tableBody_me1x6_94 ._tableRow_me1x6_77:has([aria-expanded=true]){--table-row-fill: var(--muted)}._tableBody_me1x6_94 ._tableRow_me1x6_77[data-state=selected]{--table-row-fill: var(--selection-subtle)}._tableBody_me1x6_94 ._tableRow_me1x6_77[data-state=stale]{--table-row-fill: var(--warning-soft)}._tableBody_me1x6_94 ._tableRow_me1x6_77[data-state=restricted]{--table-row-fill: var(--danger-soft)}._tableHead_me1x6_62{box-sizing:border-box;height:var(--control-height-md);padding:0 var(--space-4);text-align:start;vertical-align:middle;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);text-transform:uppercase;white-space:nowrap;color:var(--subtle-foreground)}._tableHead_me1x6_62:has([role=checkbox]){padding-inline-end:0}._tableCell_me1x6_212{box-sizing:border-box;padding:var(--space-3) var(--space-4);height:var(--control-height-lg);vertical-align:middle;white-space:nowrap}._tableCell_me1x6_212:has([role=checkbox]){padding-inline-end:0}._densityCompact_me1x6_280 ._tableHead_me1x6_62{height:var(--control-height-sm)}._densityCompact_me1x6_280 ._tableCell_me1x6_212{padding-block:var(--space-2);height:auto}._tableCaption_me1x6_289{margin-top:var(--space-4);font-size:var(--text-body-size);line-height:var(--text-body-line-height);color:var(--muted-foreground)}._tableFooter_me1x6_311{font-weight:var(--text-label-weight)}._tableFooter_me1x6_311 ._tableRow_me1x6_77{--table-row-fill: var(--muted)}._tableFooter_me1x6_311 ._tableRow_me1x6_77:last-child{border-bottom:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tabs_1prau_28,._list_1prau_23,._trigger_1prau_5,._content_1prau_28{box-sizing:border-box}._tabs_1prau_28{display:flex;gap:var(--space-2)}._tabs_1prau_28[data-orientation=horizontal]{flex-direction:column}._list_1prau_23{display:inline-flex;width:fit-content;align-items:center;justify-content:center;border-radius:var(--radius-lg);gap:var(--space-1);color:var(--muted-foreground)}._list_1prau_23[data-orientation=horizontal]{height:var(--control-height-md)}._list_1prau_23[data-orientation=vertical]{height:fit-content;flex-direction:column}._variantDefault_1prau_84{background-color:transparent}._variantLine_1prau_88{background-color:transparent;border-radius:0}._trigger_1prau_5{position:relative;display:inline-flex;flex:1 1 0%;height:100%;align-items:center;justify-content:center;gap:var(--space-2);border:var(--border-width) solid transparent;border-radius:var(--radius-md);padding:var(--space-1) var(--space-3);background-color:transparent;color:var(--muted-foreground);font-family:inherit;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);white-space:nowrap;cursor:pointer;transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._trigger_1prau_5[data-orientation=vertical]{width:100%;justify-content:flex-start}._trigger_1prau_5:hover{color:var(--foreground)}._trigger_1prau_5:focus-visible{outline:none;border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._trigger_1prau_5:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._trigger_1prau_5[data-disabled]{cursor:not-allowed;opacity:.42}._trigger_1prau_5[data-active]{background-color:var(--surface-elevated);color:var(--foreground)}._trigger_1prau_5:after{position:absolute;background-color:var(--foreground);opacity:0;transition:opacity .15s ease;content:""}._trigger_1prau_5[data-orientation=horizontal]:after{inset-inline:0;bottom:calc(-1 * var(--space-1));height:.125rem}._trigger_1prau_5[data-orientation=vertical]:after{inset-block:0;inset-inline-end:calc(-1 * var(--space-1));width:.125rem}._variantLine_1prau_88 ._trigger_1prau_5[data-active]{background-color:transparent;box-shadow:none}._variantLine_1prau_88 ._trigger_1prau_5[data-active]:after{opacity:1}._content_1prau_28{flex:1 1 0%;font-size:var(--text-body-size);line-height:var(--text-body-line-height);outline:none}._content_1prau_28:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._content_1prau_28:focus-visible{outline:2px solid Highlight;outline-offset:2px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._viewport_1k6mj_12{position:fixed;z-index:50;inset-inline:var(--space-4);bottom:var(--space-4);width:auto;max-width:24rem;margin-inline:auto;pointer-events:none;outline:none}@media(min-width:640px){._viewport_1k6mj_12{right:var(--space-4);left:auto;width:100%;margin-inline:0}}._toast_1k6mj_10{--gap: var(--space-3);--height: var(--toast-frontmost-height, var(--toast-height));--offset-y: calc( (var(--toast-offset-y) * -1) + (var(--toast-index) * var(--gap) * -1) + var(--toast-swipe-movement-y) );--peek: .75rem;--scale: max(0, 1 - (var(--toast-index) * .1)) ;--shrink: calc(1 - var(--scale));box-sizing:border-box;position:absolute;right:0;bottom:0;z-index:calc(1000 - var(--toast-index));width:100%;height:var(--height);border:var(--border-width) solid var(--popover-border);border-radius:var(--radius-xl);background-color:var(--popover);color:var(--popover-foreground);box-shadow:var(--popover-shadow);outline:none;-webkit-user-select:none;user-select:none;pointer-events:auto;transform-origin:bottom;transform:translate(var(--toast-swipe-movement-x)) translateY(calc(var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) - (var(--shrink) * var(--height)))) scale(var(--scale));will-change:transform;transition:transform .5s cubic-bezier(.22,1,.36,1),opacity .5s,height .15s}._toast_1k6mj_10:focus-visible{border-color:var(--ring);box-shadow:inset 0 0 0 var(--ring-inset) var(--ring)}@media(forced-colors:active){._toast_1k6mj_10:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._toast_1k6mj_10:after{content:"";position:absolute;top:100%;left:0;width:100%;height:calc(var(--gap) + 1px)}._toast_1k6mj_10[data-expanded]{height:var(--toast-height);transform:translate(var(--toast-swipe-movement-x)) translateY(var(--offset-y))}._toast_1k6mj_10[data-limited]{opacity:0}._toast_1k6mj_10[data-starting-style]{transform:translateY(150%)}._toast_1k6mj_10[data-ending-style]:not([data-limited]):not([data-swipe-direction]){transform:translateY(150%)}._toast_1k6mj_10[data-ending-style][data-swipe-direction=down]{transform:translateY(calc(var(--toast-swipe-movement-y) + 150%))}._toast_1k6mj_10[data-ending-style][data-swipe-direction=up]{transform:translateY(calc(var(--toast-swipe-movement-y) - 150%))}._toast_1k6mj_10[data-ending-style][data-swipe-direction=left]{transform:translate(calc(var(--toast-swipe-movement-x) - 150%)) translateY(var(--offset-y))}._toast_1k6mj_10[data-ending-style][data-swipe-direction=right]{transform:translate(calc(var(--toast-swipe-movement-x) + 150%)) translateY(var(--offset-y))}@media(prefers-reduced-motion:reduce){._toast_1k6mj_10{transition:opacity .5s}}._content_1k6mj_76{box-sizing:border-box;display:flex;align-items:center;height:100%;gap:var(--space-3);padding:var(--space-4);overflow:hidden;transition:opacity .25s cubic-bezier(.22,1,.36,1)}._content_1k6mj_76[data-behind]{opacity:0}._content_1k6mj_76[data-expanded]{opacity:1}._icon_1k6mj_255{flex-shrink:0;width:var(--icon-size-sm);height:var(--icon-size-sm);pointer-events:none}._iconDestructive_1k6mj_262{color:var(--danger)}._iconSpin_1k6mj_269{animation:_spin_1k6mj_1 1s linear infinite}@media(prefers-reduced-motion:reduce){._iconSpin_1k6mj_269{animation-duration:4s}}@keyframes _spin_1k6mj_1{to{transform:rotate(360deg)}}._body_1k6mj_294{display:flex;flex:1 1 0%;min-width:0;flex-direction:column;gap:var(--space-1)}._title_1k6mj_306{margin:0;font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-label-weight)}._description_1k6mj_313{margin:0;color:var(--muted-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._action_1k6mj_321{flex-shrink:0}button._close_1k6mj_328{position:relative;flex-shrink:0;color:var(--muted-foreground)}button._close_1k6mj_328:hover{color:var(--foreground)}button._close_1k6mj_328:after{content:"";position:absolute;inset:calc(-1 * var(--space-2))}._svgIcon_1k6mj_351{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;pointer-events:none}
|
package/dist/context-menu.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import { ContextMenu as r } from "@base-ui/react/context-menu";
|
|
4
|
-
import { cx as
|
|
4
|
+
import { cx as s, cva as v } from "class-variance-authority";
|
|
5
5
|
import { CheckIcon as p, ChevronRightIcon as f } from "lucide-react";
|
|
6
6
|
import { useContext as h, createContext as k } from "react";
|
|
7
|
-
import './chunks/context-menu.
|
|
8
|
-
trigger:
|
|
9
|
-
positioner:
|
|
10
|
-
popup:
|
|
11
|
-
subPopup:
|
|
12
|
-
label:
|
|
13
|
-
item:
|
|
14
|
-
checkboxItem:
|
|
15
|
-
radioItem:
|
|
16
|
-
subTrigger:
|
|
7
|
+
import './chunks/context-menu.DwGCD0vN.css';const j = "_trigger_1klej_7", M = "_positioner_1klej_27", N = "_popup_1klej_7", T = "_subPopup_1klej_12", D = "_label_1klej_134", P = "_item_1klej_131", R = "_checkboxItem_1klej_131", S = "_radioItem_1klej_131", G = "_subTrigger_1klej_132", L = "_variantDefault_1klej_194", V = "_variantDestructive_1klej_206", y = "_itemIndicator_1klej_248", $ = "_separator_1klej_259", q = "_shortcut_1klej_266", w = "_subTriggerIcon_1klej_324", z = "_svgIcon_1klej_331", n = {
|
|
8
|
+
trigger: j,
|
|
9
|
+
positioner: M,
|
|
10
|
+
popup: N,
|
|
11
|
+
subPopup: T,
|
|
12
|
+
label: D,
|
|
13
|
+
item: P,
|
|
14
|
+
checkboxItem: R,
|
|
15
|
+
radioItem: S,
|
|
16
|
+
subTrigger: G,
|
|
17
17
|
variantDefault: L,
|
|
18
18
|
variantDestructive: V,
|
|
19
19
|
itemIndicator: y,
|
|
@@ -21,51 +21,51 @@ import './chunks/context-menu.Bjib7_AL.css';const M = "_trigger_uku8m_7", N = "_
|
|
|
21
21
|
shortcut: q,
|
|
22
22
|
subTriggerIcon: w,
|
|
23
23
|
svgIcon: z
|
|
24
|
-
},
|
|
24
|
+
}, _ = k(
|
|
25
25
|
void 0
|
|
26
26
|
), O = r.Root;
|
|
27
27
|
function Q({ className: t, ...e }) {
|
|
28
|
-
return /* @__PURE__ */ o(r.Trigger, { className:
|
|
28
|
+
return /* @__PURE__ */ o(r.Trigger, { className: s(n.trigger, t), ...e });
|
|
29
29
|
}
|
|
30
30
|
function A({
|
|
31
31
|
className: t,
|
|
32
32
|
children: e,
|
|
33
|
-
container:
|
|
34
|
-
side:
|
|
35
|
-
sideOffset:
|
|
36
|
-
align:
|
|
33
|
+
container: a,
|
|
34
|
+
side: i = "right",
|
|
35
|
+
sideOffset: c = 0,
|
|
36
|
+
align: u = "start",
|
|
37
37
|
alignOffset: g = 4,
|
|
38
38
|
positionMethod: d,
|
|
39
39
|
collisionBoundary: I,
|
|
40
40
|
collisionPadding: b,
|
|
41
41
|
...x
|
|
42
42
|
}) {
|
|
43
|
-
const C = h(
|
|
44
|
-
return /* @__PURE__ */ o(
|
|
43
|
+
const C = h(_), m = a ?? C;
|
|
44
|
+
return /* @__PURE__ */ o(_.Provider, { value: m, children: /* @__PURE__ */ o(r.Portal, { container: m, children: /* @__PURE__ */ o(
|
|
45
45
|
r.Positioner,
|
|
46
46
|
{
|
|
47
|
-
side:
|
|
48
|
-
sideOffset:
|
|
49
|
-
align:
|
|
47
|
+
side: i,
|
|
48
|
+
sideOffset: c,
|
|
49
|
+
align: u,
|
|
50
50
|
alignOffset: g,
|
|
51
51
|
positionMethod: d,
|
|
52
52
|
collisionBoundary: I,
|
|
53
53
|
collisionPadding: b,
|
|
54
54
|
className: n.positioner,
|
|
55
|
-
children: /* @__PURE__ */ o(r.Popup, { className:
|
|
55
|
+
children: /* @__PURE__ */ o(r.Popup, { className: s(n.popup, t), ...x, children: e })
|
|
56
56
|
}
|
|
57
57
|
) }) });
|
|
58
58
|
}
|
|
59
59
|
function U({ className: t, ...e }) {
|
|
60
60
|
return /* @__PURE__ */ o(r.Group, { className: t, ...e });
|
|
61
61
|
}
|
|
62
|
-
function W({ className: t, inset: e, ...
|
|
62
|
+
function W({ className: t, inset: e, ...a }) {
|
|
63
63
|
return /* @__PURE__ */ o(
|
|
64
64
|
r.GroupLabel,
|
|
65
65
|
{
|
|
66
66
|
"data-inset": e,
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
67
|
+
className: s(n.label, t),
|
|
68
|
+
...a
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
@@ -80,28 +80,28 @@ const B = v(n.item, {
|
|
|
80
80
|
variant: "default"
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
function X({ className: t, variant: e, inset:
|
|
83
|
+
function X({ className: t, variant: e, inset: a, ...i }) {
|
|
84
84
|
return /* @__PURE__ */ o(
|
|
85
85
|
r.Item,
|
|
86
86
|
{
|
|
87
|
-
"data-inset":
|
|
87
|
+
"data-inset": a,
|
|
88
88
|
className: B({ variant: e, className: t }),
|
|
89
|
-
...
|
|
89
|
+
...i
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
function Y({
|
|
94
94
|
className: t,
|
|
95
95
|
children: e,
|
|
96
|
-
inset:
|
|
97
|
-
...
|
|
96
|
+
inset: a,
|
|
97
|
+
...i
|
|
98
98
|
}) {
|
|
99
|
-
return /* @__PURE__ */
|
|
99
|
+
return /* @__PURE__ */ l(
|
|
100
100
|
r.CheckboxItem,
|
|
101
101
|
{
|
|
102
|
-
"data-inset":
|
|
103
|
-
className:
|
|
104
|
-
...
|
|
102
|
+
"data-inset": a,
|
|
103
|
+
className: s(n.checkboxItem, t),
|
|
104
|
+
...i,
|
|
105
105
|
children: [
|
|
106
106
|
/* @__PURE__ */ o(r.CheckboxItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ o(p, { className: n.svgIcon }) }),
|
|
107
107
|
e
|
|
@@ -115,15 +115,15 @@ function Z({ className: t, ...e }) {
|
|
|
115
115
|
function tt({
|
|
116
116
|
className: t,
|
|
117
117
|
children: e,
|
|
118
|
-
inset:
|
|
119
|
-
...
|
|
118
|
+
inset: a,
|
|
119
|
+
...i
|
|
120
120
|
}) {
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ l(
|
|
122
122
|
r.RadioItem,
|
|
123
123
|
{
|
|
124
|
-
"data-inset":
|
|
125
|
-
className:
|
|
126
|
-
...
|
|
124
|
+
"data-inset": a,
|
|
125
|
+
className: s(n.radioItem, t),
|
|
126
|
+
...i,
|
|
127
127
|
children: [
|
|
128
128
|
/* @__PURE__ */ o(r.RadioItemIndicator, { className: n.itemIndicator, children: /* @__PURE__ */ o(p, { className: n.svgIcon }) }),
|
|
129
129
|
e
|
|
@@ -132,53 +132,53 @@ function tt({
|
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
function et({ className: t, ...e }) {
|
|
135
|
-
return /* @__PURE__ */ o(r.Separator, { className:
|
|
135
|
+
return /* @__PURE__ */ o(r.Separator, { className: s(n.separator, t), ...e });
|
|
136
136
|
}
|
|
137
137
|
function nt({ className: t, ...e }) {
|
|
138
|
-
return /* @__PURE__ */ o("span", { className:
|
|
138
|
+
return /* @__PURE__ */ o("span", { className: s(n.shortcut, t), ...e });
|
|
139
139
|
}
|
|
140
140
|
const ot = r.SubmenuRoot;
|
|
141
141
|
function rt({
|
|
142
142
|
className: t,
|
|
143
143
|
inset: e,
|
|
144
|
-
children:
|
|
145
|
-
...
|
|
144
|
+
children: a,
|
|
145
|
+
...i
|
|
146
146
|
}) {
|
|
147
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ l(
|
|
148
148
|
r.SubmenuTrigger,
|
|
149
149
|
{
|
|
150
150
|
"data-inset": e,
|
|
151
|
-
className:
|
|
152
|
-
...
|
|
151
|
+
className: s(n.subTrigger, t),
|
|
152
|
+
...i,
|
|
153
153
|
children: [
|
|
154
|
-
|
|
155
|
-
/* @__PURE__ */ o(f, { className:
|
|
154
|
+
a,
|
|
155
|
+
/* @__PURE__ */ o(f, { className: s(n.svgIcon, n.subTriggerIcon) })
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function at({
|
|
161
161
|
className: t,
|
|
162
162
|
side: e = "right",
|
|
163
|
-
align:
|
|
164
|
-
sideOffset:
|
|
163
|
+
align: a = "start",
|
|
164
|
+
sideOffset: i = 0,
|
|
165
165
|
// Upstream's ContextMenuSubContent passes only `side="right"` through to
|
|
166
166
|
// ContextMenuContent and leaves alignOffset at its inherited default (4) —
|
|
167
167
|
// unlike dropdown-menu.tsx's SubContent, which sets its own -3. A context
|
|
168
168
|
// menu's root popup is pointer-anchored rather than trigger-anchored, so
|
|
169
169
|
// upstream did not give its submenu a different offset from the root.
|
|
170
|
-
alignOffset:
|
|
171
|
-
...
|
|
170
|
+
alignOffset: c = 4,
|
|
171
|
+
...u
|
|
172
172
|
}) {
|
|
173
173
|
return /* @__PURE__ */ o(
|
|
174
174
|
A,
|
|
175
175
|
{
|
|
176
|
-
className:
|
|
176
|
+
className: s(n.subPopup, t),
|
|
177
177
|
side: e,
|
|
178
|
-
align:
|
|
179
|
-
sideOffset:
|
|
180
|
-
alignOffset:
|
|
181
|
-
...
|
|
178
|
+
align: a,
|
|
179
|
+
sideOffset: i,
|
|
180
|
+
alignOffset: c,
|
|
181
|
+
...u
|
|
182
182
|
}
|
|
183
183
|
);
|
|
184
184
|
}
|
|
@@ -194,7 +194,7 @@ export {
|
|
|
194
194
|
et as ContextMenuSeparator,
|
|
195
195
|
nt as ContextMenuShortcut,
|
|
196
196
|
ot as ContextMenuSub,
|
|
197
|
-
|
|
197
|
+
at as ContextMenuSubContent,
|
|
198
198
|
rt as ContextMenuSubTrigger,
|
|
199
199
|
Q as ContextMenuTrigger
|
|
200
200
|
};
|
package/dist/data-table.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { useTable as N, createColumnHelper as
|
|
4
|
-
import { cx as
|
|
5
|
-
import { ArrowUpDownIcon as
|
|
3
|
+
import { useTable as N, createColumnHelper as z, tableFeatures as F, rowPaginationFeature as M, rowSortingFeature as k, rowSelectionFeature as A, createPaginatedRowModel as H, createSortedRowModel as D } from "@tanstack/react-table";
|
|
4
|
+
import { cx as b } from "class-variance-authority";
|
|
5
|
+
import { ArrowUpDownIcon as j } from "lucide-react";
|
|
6
6
|
import { useState as d } from "react";
|
|
7
|
-
import { Table as
|
|
7
|
+
import { Table as $, TableHeader as U, TableRow as g, TableHead as q, TableBody as E, TableCell as h } from "./table.js";
|
|
8
8
|
import { Button as u } from "./button.js";
|
|
9
|
-
import { Checkbox as
|
|
10
|
-
import './chunks/data-table.
|
|
9
|
+
import { Checkbox as C } from "./checkbox.js";
|
|
10
|
+
import './chunks/data-table.CtZdVSAU.css';const G = "_wrapper_1xzb3_35", J = "_sortButton_1xzb3_63", K = "_sortButtonInner_1xzb3_86", L = "_sortIcon_1xzb3_101", O = "_emptyCell_1xzb3_109", Q = "_footer_1xzb3_125", V = "_selectedCount_1xzb3_137", W = "_paginationControls_1xzb3_144", a = {
|
|
11
11
|
wrapper: G,
|
|
12
12
|
sortButton: J,
|
|
13
13
|
sortButtonInner: K,
|
|
@@ -16,15 +16,15 @@ import './chunks/data-table.DECm3qI-.css';const G = "_wrapper_1bu4w_35", J = "_s
|
|
|
16
16
|
footer: Q,
|
|
17
17
|
selectedCount: V,
|
|
18
18
|
paginationControls: W
|
|
19
|
-
}, X =
|
|
20
|
-
rowSelectionFeature:
|
|
21
|
-
rowSortingFeature:
|
|
22
|
-
rowPaginationFeature:
|
|
23
|
-
sortedRowModel:
|
|
24
|
-
paginatedRowModel:
|
|
19
|
+
}, X = F({
|
|
20
|
+
rowSelectionFeature: A,
|
|
21
|
+
rowSortingFeature: k,
|
|
22
|
+
rowPaginationFeature: M,
|
|
23
|
+
sortedRowModel: D(),
|
|
24
|
+
paginatedRowModel: H()
|
|
25
25
|
});
|
|
26
26
|
function Y() {
|
|
27
|
-
return
|
|
27
|
+
return z();
|
|
28
28
|
}
|
|
29
29
|
function ie({
|
|
30
30
|
selectAllLabel: n = "Select all",
|
|
@@ -33,7 +33,7 @@ function ie({
|
|
|
33
33
|
return Y().display({
|
|
34
34
|
id: "select",
|
|
35
35
|
header: ({ table: t }) => /* @__PURE__ */ e(
|
|
36
|
-
|
|
36
|
+
C,
|
|
37
37
|
{
|
|
38
38
|
checked: t.getIsAllPageRowsSelected(),
|
|
39
39
|
indeterminate: t.getIsSomePageRowsSelected() && !t.getIsAllPageRowsSelected(),
|
|
@@ -42,7 +42,7 @@ function ie({
|
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
44
|
cell: ({ row: t }) => /* @__PURE__ */ e(
|
|
45
|
-
|
|
45
|
+
C,
|
|
46
46
|
{
|
|
47
47
|
checked: t.getIsSelected(),
|
|
48
48
|
onCheckedChange: (s) => t.toggleSelected(s),
|
|
@@ -63,11 +63,11 @@ function ce({
|
|
|
63
63
|
type: "button",
|
|
64
64
|
variant: "ghost",
|
|
65
65
|
size: "sm",
|
|
66
|
-
className:
|
|
66
|
+
className: b(a.sortButton, t),
|
|
67
67
|
onClick: () => n.toggleSorting(n.getIsSorted() === "asc"),
|
|
68
68
|
children: /* @__PURE__ */ c("span", { className: a.sortButtonInner, children: [
|
|
69
69
|
r,
|
|
70
|
-
/* @__PURE__ */ e(
|
|
70
|
+
/* @__PURE__ */ e(j, { className: a.sortIcon })
|
|
71
71
|
] })
|
|
72
72
|
}
|
|
73
73
|
);
|
|
@@ -80,13 +80,13 @@ function de({
|
|
|
80
80
|
data: r,
|
|
81
81
|
pageSize: t = 10,
|
|
82
82
|
enableRowSelection: s = !1,
|
|
83
|
-
emptyMessage:
|
|
83
|
+
emptyMessage: w = "No results.",
|
|
84
84
|
previousLabel: S = "Previous",
|
|
85
85
|
nextLabel: f = "Next",
|
|
86
86
|
selectionSummary: _ = Z,
|
|
87
|
-
className:
|
|
87
|
+
className: x
|
|
88
88
|
}) {
|
|
89
|
-
const [
|
|
89
|
+
const [I, P] = d([]), [R, y] = d({}), [T, m] = d({ pageIndex: 0, pageSize: t }), [v, B] = d(t);
|
|
90
90
|
t !== v && (B(t), m((l) => ({
|
|
91
91
|
pageSize: t,
|
|
92
92
|
pageIndex: Math.max(0, Math.floor(l.pageIndex * l.pageSize / t))
|
|
@@ -96,12 +96,12 @@ function de({
|
|
|
96
96
|
data: r,
|
|
97
97
|
columns: n,
|
|
98
98
|
enableRowSelection: s,
|
|
99
|
-
onSortingChange:
|
|
99
|
+
onSortingChange: P,
|
|
100
100
|
onRowSelectionChange: y,
|
|
101
101
|
onPaginationChange: m,
|
|
102
102
|
state: {
|
|
103
|
-
sorting:
|
|
104
|
-
rowSelection:
|
|
103
|
+
sorting: I,
|
|
104
|
+
rowSelection: R,
|
|
105
105
|
pagination: T
|
|
106
106
|
}
|
|
107
107
|
}), p = o.getRowModel().rows;
|
|
@@ -114,10 +114,10 @@ function de({
|
|
|
114
114
|
* — it was the outer div's before, and the outer div only existed to
|
|
115
115
|
* hold the footer outside.
|
|
116
116
|
*/
|
|
117
|
-
/* @__PURE__ */ c("div", { className:
|
|
118
|
-
/* @__PURE__ */ c(
|
|
117
|
+
/* @__PURE__ */ c("div", { className: b(a.wrapper, x), children: [
|
|
118
|
+
/* @__PURE__ */ c($, { children: [
|
|
119
119
|
/* @__PURE__ */ e(U, { children: o.getHeaderGroups().map((l) => /* @__PURE__ */ e(g, { children: l.headers.map((i) => /* @__PURE__ */ e(q, { children: i.isPlaceholder ? null : /* @__PURE__ */ e(o.FlexRender, { header: i }) }, i.id)) }, l.id)) }),
|
|
120
|
-
/* @__PURE__ */ e(E, { children: p.length ? p.map((l) => /* @__PURE__ */ e(g, { "data-state": l.getIsSelected() ? "selected" : void 0, children: l.getAllCells().map((i) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(o.FlexRender, { cell: i }) }, i.id)) }, l.id)) : /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(h, { colSpan: n.length, className: a.emptyCell, children:
|
|
120
|
+
/* @__PURE__ */ e(E, { children: p.length ? p.map((l) => /* @__PURE__ */ e(g, { "data-state": l.getIsSelected() ? "selected" : void 0, children: l.getAllCells().map((i) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(o.FlexRender, { cell: i }) }, i.id)) }, l.id)) : /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(h, { colSpan: n.length, className: a.emptyCell, children: w }) }) })
|
|
121
121
|
] }),
|
|
122
122
|
/* @__PURE__ */ c("div", { className: a.footer, children: [
|
|
123
123
|
s && /* @__PURE__ */ e("div", { className: a.selectedCount, children: _(
|
package/dist/docs/badge.md
CHANGED
|
@@ -27,14 +27,13 @@ are the semantic-ish colors available — pick the one that best matches the
|
|
|
27
27
|
status, but keep the label text itself explicit; color alone is not a
|
|
28
28
|
substitute for a state machine.
|
|
29
29
|
|
|
30
|
-
> **Accessibility
|
|
31
|
-
>
|
|
32
|
-
>
|
|
33
|
-
>
|
|
34
|
-
>
|
|
35
|
-
>
|
|
36
|
-
>
|
|
37
|
-
> themes, as do `success`, `warning` and `info` in dark.
|
|
30
|
+
> **Accessibility of tones.** At Badge's 12px/500 label, WCAG 1.4.3 asks
|
|
31
|
+
> 4.5:1, and every tone pair now clears it in both themes: the Studio blue
|
|
32
|
+
> rebrand re-pinned the status tokens that used to fall short at the theme
|
|
33
|
+
> level (see theme.css and the "Studio blue rebrand" entry in
|
|
34
|
+
> design-notes.md), and tokens.test.ts holds each status color to the
|
|
35
|
+
> floor against its own soft fill and every surface it sits on. Color is
|
|
36
|
+
> still not a substitute for text: keep the label itself explicit.
|
|
38
37
|
|
|
39
38
|
## When to use
|
|
40
39
|
|
|
@@ -179,10 +179,10 @@ Every part carries data attributes you can key CSS off:
|
|
|
179
179
|
English strings that would need translating.
|
|
180
180
|
- **Token-scale spacing.** The kit's spacing scale has no 10px step, so
|
|
181
181
|
upstream's `gap-2.5`/`py-2.5` inside a choice row land on `--space-2`
|
|
182
|
-
(8px) here; the shortcut cap uses the kit's
|
|
183
|
-
|
|
184
|
-
8px radius, 16px indicator, 20px cap,
|
|
185
|
-
gaps) matches upstream exactly.
|
|
182
|
+
(8px) here; the shortcut cap uses the kit's `--text-mono-size`, which
|
|
183
|
+
the Studio blue rebrand moved to 10px — the same size upstream draws.
|
|
184
|
+
Every other measurement (44px row, 8px radius, 16px indicator, 20px cap,
|
|
185
|
+
8px choice gap, 16px item and root gaps) matches upstream exactly.
|
|
186
186
|
- **Focus is the kit's field ring.** Upstream draws a 3px translucent halo
|
|
187
187
|
outside the row; the kit's field idiom (`input.module.css`) is a
|
|
188
188
|
recolored border plus an inset ring, so the choice row wears that
|
package/dist/docs/sidebar.md
CHANGED
|
@@ -228,8 +228,8 @@ Tailwind utility strings, re-expressed on the kit's token scales
|
|
|
228
228
|
(`p-2` → `--space-2`, `h-8` → `--control-height-sm`, `w-5` → `--space-5`,
|
|
229
229
|
`size-4` → `--icon-size-sm`). Rows are 28/32/48px for `sm`/`default`/`lg`,
|
|
230
230
|
sub-rows 28px at both sizes, badges and actions 20px squares centred on
|
|
231
|
-
their row. The type ramp is the kit's
|
|
232
|
-
upstream's `text-sm
|
|
231
|
+
their row. The type ramp is the kit's — since the Studio blue rebrand its
|
|
232
|
+
body role is 14/20, which happens to coincide with upstream's `text-sm`.
|
|
233
233
|
|
|
234
234
|
- **Cookie read happens after mount, not during render.** Upstream's own
|
|
235
235
|
model reads the `sidebar_state` cookie in a Next.js Server Component and
|