@crisp-ui-kit/crisp 0.52.5 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bulkbar.css +2 -2
- package/dist/bulkbar.layered.css +2 -2
- package/dist/button.css +2 -2
- package/dist/button.layered.css +2 -2
- package/dist/cjs/components/bulkbar/bulkbar.js +1 -1
- package/dist/cjs/components/bulkbar/bulkbar.recipe.js +2 -2
- package/dist/cjs/components/button/button.recipe.js +10 -2
- package/dist/cjs/components/datatable/datatable.js +45 -7
- package/dist/cjs/components/multiselect/multiselect.js +1 -1
- package/dist/cjs/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/cjs/components/tabletoolbar/tabletoolbar.chrome.js +5 -4
- package/dist/cjs/components/tabletoolbar/tabletoolbar.js +41 -8
- package/dist/cjs/components/tooltip/tooltip.recipe.js +13 -4
- package/dist/cjs/core/i18n.js +75 -0
- package/dist/cjs/core/index.js +5 -1
- package/dist/cjs/product/entitycard/entitycard.recipe.js +20 -4
- package/dist/cjs/product/listpage/listpage.js +1 -1
- package/dist/cjs/product/listpage/listpage.recipe.js +5 -7
- package/dist/entitycard.css +4 -4
- package/dist/entitycard.layered.css +4 -4
- package/dist/esm/components/bulkbar/bulkbar.js +1 -1
- package/dist/esm/components/bulkbar/bulkbar.recipe.js +2 -2
- package/dist/esm/components/button/button.recipe.js +10 -2
- package/dist/esm/components/datatable/datatable.js +46 -8
- package/dist/esm/components/multiselect/multiselect.js +1 -1
- package/dist/esm/components/multiselect/multiselect.recipe.js +1 -1
- package/dist/esm/components/tabletoolbar/tabletoolbar.chrome.js +5 -4
- package/dist/esm/components/tabletoolbar/tabletoolbar.js +42 -9
- package/dist/esm/components/tooltip/tooltip.recipe.js +13 -4
- package/dist/esm/core/i18n.js +37 -0
- package/dist/esm/core/index.js +1 -0
- package/dist/esm/product/entitycard/entitycard.recipe.js +20 -4
- package/dist/esm/product/listpage/listpage.js +2 -2
- package/dist/esm/product/listpage/listpage.recipe.js +5 -7
- package/dist/listpage.css +5 -5
- package/dist/listpage.layered.css +5 -5
- package/dist/multiselect.css +1 -1
- package/dist/multiselect.layered.css +1 -1
- package/dist/recordstable.css +5 -4
- package/dist/recordstable.layered.css +5 -4
- package/dist/styles.css +25 -23
- package/dist/styles.layered.css +25 -23
- package/dist/tabletoolbar.css +5 -4
- package/dist/tabletoolbar.layered.css +5 -4
- package/dist/tooltip.css +1 -1
- package/dist/tooltip.layered.css +1 -1
- package/dist/types/components/bulkbar/bulkbar.d.ts +3 -3
- package/dist/types/components/button/button.recipe.d.ts +2 -2
- package/dist/types/components/datatable/datatable.d.ts +21 -1
- package/dist/types/components/tabletoolbar/tabletoolbar.d.ts +5 -1
- package/dist/types/components/tooltip/tooltip.recipe.d.ts +2 -2
- package/dist/types/core/i18n.d.ts +58 -0
- package/dist/types/core/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/styles.layered.css
CHANGED
|
@@ -295,13 +295,13 @@
|
|
|
295
295
|
position: absolute; left: 0; right: 0; bottom: var(--crisp-space-4); display: flex; justify-content: center; pointer-events: none; z-index: 10;
|
|
296
296
|
& .crisp-bulkbar-bar { pointer-events: auto; display: flex; align-items: center; gap: var(--crisp-space-0-5); height: 48px; padding: 0 var(--crisp-space-1) 0 var(--crisp-space-1-5); border-radius: 14px; background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); color: var(--crisp-fg-primary); transition: opacity .16s ease, transform .16s ease; }
|
|
297
297
|
& .crisp-bulkbar-bar { @starting-style { opacity: 0; transform: translateY(10px); } }
|
|
298
|
-
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
298
|
+
& .crisp-bulkbar-count { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); background: color-mix(in srgb, var(--crisp-fg-primary) 2%, transparent); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
299
299
|
& .crisp-bulkbar-count:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 8%, transparent); color: var(--crisp-fg-primary); }
|
|
300
300
|
& .crisp-bulkbar-count svg { flex-shrink: 0; }
|
|
301
301
|
/* the ", Clear selection" ARIA concatenates onto the pill's name (#324)
|
|
302
302
|
-- read, never drawn. Same technique as Slider's thumblabel. */
|
|
303
303
|
& .crisp-bulkbar-clearlabel { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
|
|
304
|
-
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-
|
|
304
|
+
& .crisp-bulkbar-btn { display: inline-flex; align-items: center; gap: var(--crisp-space-1); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-2); border: none; border-radius: var(--crisp-radius-lg); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-ring-neutral), 0 0 2px rgba(28,40,64,0.18), 0 1px 3px rgba(0,0,0,0.04); color: var(--crisp-fg-primary); font-family: inherit; font-size: var(--crisp-text-md); font-weight: var(--crisp-weight-medium); white-space: nowrap; cursor: pointer; transition: background-color .12s; }
|
|
305
305
|
& .crisp-bulkbar-btn:hover { background: var(--crisp-bg-raised); }
|
|
306
306
|
& .crisp-bulkbar-btn--danger { color: var(--crisp-bg-danger); }
|
|
307
307
|
& .crisp-bulkbar-btn--danger:hover { background: color-mix(in srgb, var(--crisp-bg-danger) 10%, transparent); }
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
&:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
322
322
|
}
|
|
323
323
|
.crisp-button--intent_primary {
|
|
324
|
-
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(
|
|
324
|
+
background: var(--crisp-bg-brand-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08);
|
|
325
325
|
&:hover { background: var(--crisp-bg-brand-solid-pressed); }
|
|
326
326
|
&:active { background: var(--crisp-bg-brand-solid-pressed); }
|
|
327
327
|
}
|
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
&:hover { background: var(--crisp-bg-raised); }
|
|
331
331
|
}
|
|
332
332
|
.crisp-button--intent_danger {
|
|
333
|
-
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(
|
|
333
|
+
background: var(--crisp-bg-danger-solid); color: var(--crisp-fg-on-brand); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12);
|
|
334
334
|
&:hover { filter: brightness(0.96); }
|
|
335
335
|
&:active { filter: brightness(0.92); }
|
|
336
336
|
}
|
|
@@ -1146,7 +1146,7 @@
|
|
|
1146
1146
|
}
|
|
1147
1147
|
.crisp-multiselect-listbox[data-up] { transform-origin: bottom left; }
|
|
1148
1148
|
.crisp-multiselect-listbox { @starting-style { opacity: 0; transform: scale(0.97) translateY(-1px); } }
|
|
1149
|
-
.crisp-multiselect-search { display: flex; align-items: center; gap: var(--crisp-space-
|
|
1149
|
+
.crisp-multiselect-search { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: 36px; flex-shrink: 0; margin: calc(-1 * var(--crisp-space-1)) calc(-1 * var(--crisp-space-1)) var(--crisp-space-1); padding: var(--crisp-space-2) var(--crisp-space-3); color: var(--crisp-fg-muted); }
|
|
1150
1150
|
.crisp-multiselect-search svg { flex-shrink: 0; }
|
|
1151
1151
|
.crisp-multiselect-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); }
|
|
1152
1152
|
.crisp-multiselect-search input::placeholder { color: var(--crisp-fg-muted); }
|
|
@@ -1615,7 +1615,7 @@
|
|
|
1615
1615
|
.crisp-tabletoolbar {
|
|
1616
1616
|
display: contents; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1617
1617
|
& * { box-sizing: border-box; }
|
|
1618
|
-
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-
|
|
1618
|
+
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); padding: 0 var(--crisp-space-3) var(--crisp-space-2); }
|
|
1619
1619
|
& .crisp-tabletoolbar-toolbar[data-inline] { padding-bottom: 0; }
|
|
1620
1620
|
& .crisp-tabletoolbar-search { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); padding: 0 var(--crisp-space-2-5); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
1621
1621
|
& .crisp-tabletoolbar-search svg { flex-shrink: 0; }
|
|
@@ -1628,10 +1628,11 @@
|
|
|
1628
1628
|
& .crisp-tabletoolbar-tool--ghost { box-shadow: none; background: color-mix(in srgb, var(--crisp-fg-primary) 3%, transparent); color: var(--crisp-fg-muted); }
|
|
1629
1629
|
& .crisp-tabletoolbar-tool--ghost:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
1630
1630
|
& .crisp-tabletoolbar-toolgroup { position: relative; display: inline-flex; }
|
|
1631
|
-
& .crisp-tabletoolbar-
|
|
1631
|
+
& .crisp-tabletoolbar-divider { flex-shrink: 0; width: 1px; height: 20px; background: var(--crisp-border-subtle); }
|
|
1632
|
+
& .crisp-tabletoolbar-menu { position: absolute; top: calc(100% + var(--crisp-space-1)); left: 0; z-index: 30; min-width: 232px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); display: flex; flex-direction: column; gap: var(--crisp-space-px); transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
1632
1633
|
& .crisp-tabletoolbar-menu { @starting-style { opacity: 0; transform: scale(0.96); } }
|
|
1633
1634
|
& .crisp-tabletoolbar-menu-head { padding: var(--crisp-space-1) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
1634
|
-
& .crisp-tabletoolbar-sortpop { min-width:
|
|
1635
|
+
& .crisp-tabletoolbar-sortpop { min-width: 480px; overflow: visible; padding: var(--crisp-space-3) var(--crisp-space-1-5); gap: var(--crisp-space-2); }
|
|
1635
1636
|
& .crisp-tabletoolbar-sort-empty { padding: var(--crisp-space-1) var(--crisp-space-1) var(--crisp-space-2); font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
1636
1637
|
& .crisp-tabletoolbar-sort-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
|
|
1637
1638
|
& .crisp-tabletoolbar-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * var(--crisp-space-1)); padding: 0; border: none; background: none; color: var(--crisp-fg-muted); cursor: grab; }
|
|
@@ -1652,7 +1653,7 @@
|
|
|
1652
1653
|
& .crisp-tabletoolbar-sort-learn { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-lg); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); text-decoration: none; }
|
|
1653
1654
|
& .crisp-tabletoolbar-sort-learn svg { flex-shrink: 0; }
|
|
1654
1655
|
& .crisp-tabletoolbar-sort-learn:hover { color: var(--crisp-fg-primary); }
|
|
1655
|
-
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-
|
|
1656
|
+
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: left; cursor: pointer; }
|
|
1656
1657
|
& .crisp-tabletoolbar-menu-item:hover { background: var(--crisp-bg-raised); }
|
|
1657
1658
|
& .crisp-tabletoolbar-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
1658
1659
|
& .crisp-tabletoolbar-menu-item:disabled:hover { background: none; }
|
|
@@ -1772,7 +1773,7 @@
|
|
|
1772
1773
|
}
|
|
1773
1774
|
|
|
1774
1775
|
.crisp-tooltip {
|
|
1775
|
-
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1) var(--crisp-space-2); border-radius: var(--crisp-radius-
|
|
1776
|
+
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
1776
1777
|
@starting-style { opacity: 0; }
|
|
1777
1778
|
}
|
|
1778
1779
|
|
|
@@ -1947,11 +1948,11 @@
|
|
|
1947
1948
|
display: flex; flex-direction: column; box-sizing: border-box; width: 100%; min-width: 0; text-align: start; padding: var(--crisp-space-3) var(--crisp-space-4); margin: 0; border: none; border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-primary); font-family: var(--crisp-font-sans); cursor: pointer; transition: box-shadow .12s ease, background-color .12s ease; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
1948
1949
|
&:hover { box-shadow: inset 0 0 0 1px var(--crisp-border-default), 0 1px 2px rgba(0,0,0,0.04), 0 6px 16px -6px rgba(28,40,64,0.12); }
|
|
1949
1950
|
&:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: 2px; }
|
|
1950
|
-
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-
|
|
1951
|
-
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-
|
|
1952
|
-
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-
|
|
1951
|
+
& .crisp-entitycard-author { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-primary); }
|
|
1952
|
+
& .crisp-entitycard-title { margin-top: var(--crisp-space-2); font-size: var(--crisp-text-lg); font-weight: var(--crisp-weight-medium); letter-spacing: -0.1px; color: var(--crisp-fg-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1953
|
+
& .crisp-entitycard-excerpt { margin-top: var(--crisp-space-1); font-size: var(--crisp-text-sm); line-height: 16px; color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
|
|
1953
1954
|
& .crisp-entitycard-spacer { flex: 1; min-height: var(--crisp-space-3); }
|
|
1954
|
-
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-
|
|
1955
|
+
& .crisp-entitycard-foot { display: flex; align-items: center; gap: var(--crisp-space-1-5); padding-top: var(--crisp-space-2-5); margin-top: var(--crisp-space-1); border-top: 1px solid var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); }
|
|
1955
1956
|
& .crisp-entitycard-foot-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--crisp-fg-primary); }
|
|
1956
1957
|
& .crisp-entitycard-date { margin-inline-start: auto; flex-shrink: 0; white-space: nowrap; }
|
|
1957
1958
|
}
|
|
@@ -2016,18 +2017,18 @@
|
|
|
2016
2017
|
|
|
2017
2018
|
.crisp-listpage {
|
|
2018
2019
|
display: flex; flex-direction: column; min-height: 0; box-sizing: border-box; font-family: var(--crisp-font-sans); color: var(--crisp-fg-primary); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
2019
|
-
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); height:
|
|
2020
|
+
& .crisp-listpage-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); height: var(--crisp-size-header); flex-shrink: 0; padding: 0 var(--crisp-space-3); }
|
|
2020
2021
|
& .crisp-listpage-toolbar-lead { display: flex; align-items: center; gap: var(--crisp-space-2); }
|
|
2021
2022
|
& .crisp-listpage-count { margin-inline-start: auto; font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); white-space: nowrap; }
|
|
2022
2023
|
& .crisp-listpage-toolbar-trail { display: flex; align-items: center; gap: var(--crisp-space-2); }
|
|
2023
2024
|
& .crisp-listpage-count + .crisp-listpage-toolbar-trail { margin-inline-start: var(--crisp-space-3); }
|
|
2024
2025
|
& .crisp-listpage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--crisp-space-3) var(--crisp-space-3); }
|
|
2025
2026
|
& .crisp-listpage-section-label { padding: var(--crisp-space-2) var(--crisp-space-1); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
2026
|
-
& .crisp-listpage-favorites {
|
|
2027
|
-
& .crisp-listpage-favorites
|
|
2028
|
-
& .crisp-listpage-colhead { display: flex; align-items: center; gap: var(--crisp-space-2-5); height:
|
|
2027
|
+
& .crisp-listpage-favorites-section { background: var(--crisp-bg-subtle); box-shadow: inset 0 -1px 0 var(--crisp-border-subtle); }
|
|
2028
|
+
& .crisp-listpage-favorites { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: var(--crisp-space-6); }
|
|
2029
|
+
& .crisp-listpage-colhead { display: flex; align-items: center; gap: var(--crisp-space-2-5); height: var(--crisp-size-menuRow); padding: 0 var(--crisp-space-4); box-shadow: inset 0 -1px 0 var(--crisp-border-subtle); font-size: var(--crisp-text-sm); color: var(--crisp-fg-muted); }
|
|
2029
2030
|
& .crisp-listpage-colhead-cell { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); }
|
|
2030
|
-
& .crisp-listpage-group { display: flex; align-items: center; gap: var(--crisp-space-1-5); height:
|
|
2031
|
+
& .crisp-listpage-group { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-menuRow); padding: var(--crisp-space-2) var(--crisp-space-4); box-shadow: inset 0 -1px 0 var(--crisp-border-subtle); background: color-mix(in srgb, var(--crisp-fg-primary) 2%, transparent); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
2031
2032
|
& .crisp-listpage-group-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 var(--crisp-space-1); border-radius: var(--crisp-radius-sm); background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); font-size: var(--crisp-text-xs); color: var(--crisp-fg-muted); }
|
|
2032
2033
|
& .crisp-listpage-row { display: flex; align-items: center; gap: var(--crisp-space-2-5); width: 100%; height: 52px; padding: 0 var(--crisp-space-2); margin: 0; border: none; border-top: 1px solid var(--crisp-border-subtle); background: none; font-family: inherit; color: inherit; text-align: start; cursor: pointer; transition: background-color .12s; }
|
|
2033
2034
|
& .crisp-listpage-row:focus-visible { outline: 2px solid var(--crisp-bg-brand-solid); outline-offset: -2px; }
|
|
@@ -2355,7 +2356,7 @@
|
|
|
2355
2356
|
box-sizing: border-box; position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
2356
2357
|
& * { box-sizing: border-box; }
|
|
2357
2358
|
/* toolbar */
|
|
2358
|
-
& .crisp-recordstable-toolbar { display: flex; align-items: center; gap: var(--crisp-space-
|
|
2359
|
+
& .crisp-recordstable-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); padding: 0 var(--crisp-space-3) var(--crisp-space-2); }
|
|
2359
2360
|
& .crisp-recordstable-toolbar[data-inline] { padding-bottom: 0; }
|
|
2360
2361
|
& .crisp-recordstable-search { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); padding: 0 var(--crisp-space-2-5); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
2361
2362
|
& .crisp-recordstable-search svg { flex-shrink: 0; }
|
|
@@ -2368,13 +2369,14 @@
|
|
|
2368
2369
|
& .crisp-recordstable-tool--ghost { box-shadow: none; background: color-mix(in srgb, var(--crisp-fg-primary) 3%, transparent); color: var(--crisp-fg-muted); }
|
|
2369
2370
|
& .crisp-recordstable-tool--ghost:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
2370
2371
|
& .crisp-recordstable-toolgroup { position: relative; display: inline-flex; }
|
|
2371
|
-
& .crisp-recordstable-
|
|
2372
|
+
& .crisp-recordstable-divider { flex-shrink: 0; width: 1px; height: 20px; background: var(--crisp-border-subtle); }
|
|
2373
|
+
& .crisp-recordstable-menu { position: absolute; top: calc(100% + var(--crisp-space-1)); left: 0; z-index: 30; min-width: 232px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); display: flex; flex-direction: column; gap: var(--crisp-space-px); transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
2372
2374
|
& .crisp-recordstable-menu { @starting-style { opacity: 0; transform: scale(0.96); } }
|
|
2373
2375
|
& .crisp-recordstable-ctx { z-index: 60; }
|
|
2374
2376
|
& .crisp-recordstable-th[data-drop] { box-shadow: inset 2px 0 0 var(--crisp-bg-brand-solid); }
|
|
2375
2377
|
& .crisp-recordstable-th-inner[draggable="true"]:active { cursor: grabbing; }
|
|
2376
2378
|
& .crisp-recordstable-menu-head { padding: var(--crisp-space-1) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
2377
|
-
& .crisp-recordstable-sortpop { min-width:
|
|
2379
|
+
& .crisp-recordstable-sortpop { min-width: 480px; overflow: visible; padding: var(--crisp-space-3) var(--crisp-space-1-5); gap: var(--crisp-space-2); }
|
|
2378
2380
|
& .crisp-recordstable-sort-empty { padding: var(--crisp-space-1) var(--crisp-space-1) var(--crisp-space-2); font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
2379
2381
|
& .crisp-recordstable-sort-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
|
|
2380
2382
|
& .crisp-recordstable-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * var(--crisp-space-1)); padding: 0; border: none; background: none; color: var(--crisp-fg-muted); cursor: grab; }
|
|
@@ -2395,7 +2397,7 @@
|
|
|
2395
2397
|
& .crisp-recordstable-sort-learn { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-lg); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); text-decoration: none; }
|
|
2396
2398
|
& .crisp-recordstable-sort-learn svg { flex-shrink: 0; }
|
|
2397
2399
|
& .crisp-recordstable-sort-learn:hover { color: var(--crisp-fg-primary); }
|
|
2398
|
-
& .crisp-recordstable-menu-item { display: flex; align-items: center; gap: var(--crisp-space-
|
|
2400
|
+
& .crisp-recordstable-menu-item { display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: left; cursor: pointer; }
|
|
2399
2401
|
& .crisp-recordstable-menu-item:hover { background: var(--crisp-bg-raised); }
|
|
2400
2402
|
& .crisp-recordstable-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
2401
2403
|
& .crisp-recordstable-menu-item:disabled:hover { background: none; }
|
package/dist/tabletoolbar.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.crisp-tabletoolbar {
|
|
2
2
|
display: contents; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
3
3
|
& * { box-sizing: border-box; }
|
|
4
|
-
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-
|
|
4
|
+
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); padding: 0 var(--crisp-space-3) var(--crisp-space-2); }
|
|
5
5
|
& .crisp-tabletoolbar-toolbar[data-inline] { padding-bottom: 0; }
|
|
6
6
|
& .crisp-tabletoolbar-search { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); padding: 0 var(--crisp-space-2-5); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
7
7
|
& .crisp-tabletoolbar-search svg { flex-shrink: 0; }
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
& .crisp-tabletoolbar-tool--ghost { box-shadow: none; background: color-mix(in srgb, var(--crisp-fg-primary) 3%, transparent); color: var(--crisp-fg-muted); }
|
|
15
15
|
& .crisp-tabletoolbar-tool--ghost:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
16
16
|
& .crisp-tabletoolbar-toolgroup { position: relative; display: inline-flex; }
|
|
17
|
-
& .crisp-tabletoolbar-
|
|
17
|
+
& .crisp-tabletoolbar-divider { flex-shrink: 0; width: 1px; height: 20px; background: var(--crisp-border-subtle); }
|
|
18
|
+
& .crisp-tabletoolbar-menu { position: absolute; top: calc(100% + var(--crisp-space-1)); left: 0; z-index: 30; min-width: 232px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); display: flex; flex-direction: column; gap: var(--crisp-space-px); transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
18
19
|
& .crisp-tabletoolbar-menu { @starting-style { opacity: 0; transform: scale(0.96); } }
|
|
19
20
|
& .crisp-tabletoolbar-menu-head { padding: var(--crisp-space-1) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
20
|
-
& .crisp-tabletoolbar-sortpop { min-width:
|
|
21
|
+
& .crisp-tabletoolbar-sortpop { min-width: 480px; overflow: visible; padding: var(--crisp-space-3) var(--crisp-space-1-5); gap: var(--crisp-space-2); }
|
|
21
22
|
& .crisp-tabletoolbar-sort-empty { padding: var(--crisp-space-1) var(--crisp-space-1) var(--crisp-space-2); font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
22
23
|
& .crisp-tabletoolbar-sort-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
|
|
23
24
|
& .crisp-tabletoolbar-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * var(--crisp-space-1)); padding: 0; border: none; background: none; color: var(--crisp-fg-muted); cursor: grab; }
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
& .crisp-tabletoolbar-sort-learn { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-lg); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); text-decoration: none; }
|
|
39
40
|
& .crisp-tabletoolbar-sort-learn svg { flex-shrink: 0; }
|
|
40
41
|
& .crisp-tabletoolbar-sort-learn:hover { color: var(--crisp-fg-primary); }
|
|
41
|
-
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-
|
|
42
|
+
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: left; cursor: pointer; }
|
|
42
43
|
& .crisp-tabletoolbar-menu-item:hover { background: var(--crisp-bg-raised); }
|
|
43
44
|
& .crisp-tabletoolbar-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
44
45
|
& .crisp-tabletoolbar-menu-item:disabled:hover { background: none; }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.crisp-tabletoolbar {
|
|
3
3
|
display: contents; font-family: var(--crisp-font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
|
|
4
4
|
& * { box-sizing: border-box; }
|
|
5
|
-
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-
|
|
5
|
+
& .crisp-tabletoolbar-toolbar { display: flex; align-items: center; gap: var(--crisp-space-2); padding: 0 var(--crisp-space-3) var(--crisp-space-2); }
|
|
6
6
|
& .crisp-tabletoolbar-toolbar[data-inline] { padding-bottom: 0; }
|
|
7
7
|
& .crisp-tabletoolbar-search { display: flex; align-items: center; gap: var(--crisp-space-1-5); height: var(--crisp-size-row); padding: 0 var(--crisp-space-2-5); border: none; border-radius: var(--crisp-radius-md); background: var(--crisp-bg-surface); box-shadow: inset 0 0 0 1px var(--crisp-border-subtle); color: var(--crisp-fg-muted); }
|
|
8
8
|
& .crisp-tabletoolbar-search svg { flex-shrink: 0; }
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
& .crisp-tabletoolbar-tool--ghost { box-shadow: none; background: color-mix(in srgb, var(--crisp-fg-primary) 3%, transparent); color: var(--crisp-fg-muted); }
|
|
16
16
|
& .crisp-tabletoolbar-tool--ghost:hover { background: color-mix(in srgb, var(--crisp-fg-primary) 6%, transparent); }
|
|
17
17
|
& .crisp-tabletoolbar-toolgroup { position: relative; display: inline-flex; }
|
|
18
|
-
& .crisp-tabletoolbar-
|
|
18
|
+
& .crisp-tabletoolbar-divider { flex-shrink: 0; width: 1px; height: 20px; background: var(--crisp-border-subtle); }
|
|
19
|
+
& .crisp-tabletoolbar-menu { position: absolute; top: calc(100% + var(--crisp-space-1)); left: 0; z-index: 30; min-width: 232px; padding: var(--crisp-space-1); border-radius: var(--crisp-radius-xl); background: var(--crisp-bg-popover); box-shadow: inset 0 0 0 1px var(--crisp-ring-popover), 0 0 0 1px var(--crisp-shadow-popover1), 0 4px 8px -4px var(--crisp-shadow-popover2), 0 4px 12px -2px var(--crisp-shadow-popover3); display: flex; flex-direction: column; gap: var(--crisp-space-px); transform-origin: top; opacity: 1; transform: none; transition: opacity .13s ease, transform .13s ease; }
|
|
19
20
|
& .crisp-tabletoolbar-menu { @starting-style { opacity: 0; transform: scale(0.96); } }
|
|
20
21
|
& .crisp-tabletoolbar-menu-head { padding: var(--crisp-space-1) var(--crisp-space-2) var(--crisp-space-0-5); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); color: var(--crisp-fg-muted); }
|
|
21
|
-
& .crisp-tabletoolbar-sortpop { min-width:
|
|
22
|
+
& .crisp-tabletoolbar-sortpop { min-width: 480px; overflow: visible; padding: var(--crisp-space-3) var(--crisp-space-1-5); gap: var(--crisp-space-2); }
|
|
22
23
|
& .crisp-tabletoolbar-sort-empty { padding: var(--crisp-space-1) var(--crisp-space-1) var(--crisp-space-2); font-size: var(--crisp-text-md); color: var(--crisp-fg-muted); }
|
|
23
24
|
& .crisp-tabletoolbar-sort-row { display: flex; align-items: center; gap: var(--crisp-space-1-5); }
|
|
24
25
|
& .crisp-tabletoolbar-sort-grip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 28px; flex-shrink: 0; margin-right: calc(-1 * var(--crisp-space-1)); padding: 0; border: none; background: none; color: var(--crisp-fg-muted); cursor: grab; }
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
& .crisp-tabletoolbar-sort-learn { display: inline-flex; align-items: center; gap: var(--crisp-space-1-5); font-size: var(--crisp-text-lg); color: color-mix(in srgb, var(--crisp-fg-primary) 63%, transparent); text-decoration: none; }
|
|
40
41
|
& .crisp-tabletoolbar-sort-learn svg { flex-shrink: 0; }
|
|
41
42
|
& .crisp-tabletoolbar-sort-learn:hover { color: var(--crisp-fg-primary); }
|
|
42
|
-
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-
|
|
43
|
+
& .crisp-tabletoolbar-menu-item { display: flex; align-items: center; gap: var(--crisp-space-1-5); width: 100%; height: var(--crisp-size-menuRow); margin: 0; padding: 0 var(--crisp-space-2); border: none; background: none; border-radius: var(--crisp-radius-md); font-family: inherit; font-size: var(--crisp-text-lg); color: var(--crisp-fg-primary); text-align: left; cursor: pointer; }
|
|
43
44
|
& .crisp-tabletoolbar-menu-item:hover { background: var(--crisp-bg-raised); }
|
|
44
45
|
& .crisp-tabletoolbar-menu-item:disabled { opacity: 0.4; cursor: default; }
|
|
45
46
|
& .crisp-tabletoolbar-menu-item:disabled:hover { background: none; }
|
package/dist/tooltip.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.crisp-tooltip {
|
|
2
|
-
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1) var(--crisp-space-2); border-radius: var(--crisp-radius-
|
|
2
|
+
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
3
3
|
@starting-style { opacity: 0; }
|
|
4
4
|
}
|
|
5
5
|
|
package/dist/tooltip.layered.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer crisp-components {
|
|
2
2
|
.crisp-tooltip {
|
|
3
|
-
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1) var(--crisp-space-2); border-radius: var(--crisp-radius-
|
|
3
|
+
position: fixed; z-index: 70; box-sizing: border-box; pointer-events: none; max-width: 260px; padding: var(--crisp-space-1-5) var(--crisp-space-2); border-radius: var(--crisp-radius-md); background: #101112; color: #eeeff1; font-family: var(--crisp-font-sans); font-size: var(--crisp-text-sm); font-weight: var(--crisp-weight-medium); line-height: 1.45; box-shadow: 0 4px 14px -2px rgba(28,40,64,0.28), 0 0 0 1px rgba(255,255,255,0.04); opacity: 1; transition: opacity 0.12s ease;
|
|
4
4
|
@starting-style { opacity: 0; }
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
export type BulkBarProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
|
|
3
|
-
/** Selected count — renders the leading "N
|
|
3
|
+
/** Selected count — renders the leading "N Selected" pill when provided. */
|
|
4
4
|
count?: number;
|
|
5
5
|
/** Called when the count pill (its ✕) is pressed — clear the selection. */
|
|
6
6
|
onClear?: () => void;
|
|
7
|
-
/** Word after the count in the pill (default "
|
|
7
|
+
/** Word after the count in the pill (default "Selected"). */
|
|
8
8
|
countLabel?: string;
|
|
9
9
|
/**
|
|
10
10
|
* The whole pill line, given the count and `countLabel`. A formatter,
|
|
11
|
-
* because "3
|
|
11
|
+
* because "3 Selected" is a sentence with a hole in it and the count does
|
|
12
12
|
* not sit in the same place in every language. Defaults to
|
|
13
13
|
* `{count} {countLabel}`, so a consumer who only wants the word keeps
|
|
14
14
|
* passing `countLabel`.
|
|
@@ -27,7 +27,7 @@ declare const spec: {
|
|
|
27
27
|
readonly decls: {
|
|
28
28
|
readonly background: `var(--${string})`;
|
|
29
29
|
readonly color: `var(--${string})`;
|
|
30
|
-
readonly boxShadow: "inset 0 0 0 1px rgba(
|
|
30
|
+
readonly boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(38,109,240,0.12), 0 3px 6px -2px rgba(38,109,240,0.08)";
|
|
31
31
|
};
|
|
32
32
|
readonly parts: [{
|
|
33
33
|
readonly selector: "&:hover";
|
|
@@ -58,7 +58,7 @@ declare const spec: {
|
|
|
58
58
|
readonly decls: {
|
|
59
59
|
readonly background: `var(--${string})`;
|
|
60
60
|
readonly color: `var(--${string})`;
|
|
61
|
-
readonly boxShadow: "inset 0 0 0 1px rgba(
|
|
61
|
+
readonly boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(186,37,37,0.20), 0 3px 6px -2px rgba(186,37,37,0.12)";
|
|
62
62
|
};
|
|
63
63
|
readonly parts: [{
|
|
64
64
|
readonly selector: "&:hover";
|
|
@@ -144,6 +144,26 @@ export type DataTableProps<T extends {
|
|
|
144
144
|
* copy of the column list).
|
|
145
145
|
*/
|
|
146
146
|
columnMenu?: boolean;
|
|
147
|
+
/** crisp/#471: the column header menu's own six strings — no `labels`
|
|
148
|
+
* object for these (unlike RecordPage/RecordsTable) because each is
|
|
149
|
+
* independent, single-purpose text with an obvious name of its own, the
|
|
150
|
+
* same shape `selectAllLabel`/`reorderRowLabel` above already take. */
|
|
151
|
+
sortAscendingLabel?: string;
|
|
152
|
+
sortDescendingLabel?: string;
|
|
153
|
+
moveColumnLeftLabel?: string;
|
|
154
|
+
moveColumnRightLabel?: string;
|
|
155
|
+
/** The header menu's "Edit column label" item (opens the rename input). */
|
|
156
|
+
editColumnLabel?: string;
|
|
157
|
+
hideColumnLabel?: string;
|
|
158
|
+
/** aria-label on the rename input itself, once "Edit column label" opens
|
|
159
|
+
* it — separate from `editColumnLabel` above, which is the menu item
|
|
160
|
+
* that opens it, not the input. */
|
|
161
|
+
renameColumnLabel?: string;
|
|
162
|
+
/** The "View settings" trigger that opens the column-visibility menu
|
|
163
|
+
* (only rendered when `columnMenu` is set). */
|
|
164
|
+
viewSettingsLabel?: string;
|
|
165
|
+
/** That menu's own "Columns" section heading. */
|
|
166
|
+
columnsGroupLabel?: string;
|
|
147
167
|
/** Called with the next column list after a move, rename or hide. */
|
|
148
168
|
onColumnsChange?: (columns: DataTableColumn<T>[]) => void;
|
|
149
169
|
/** Group rows under a heading row, the way a grouped view does. */
|
|
@@ -224,7 +244,7 @@ export type DataTableProps<T extends {
|
|
|
224
244
|
};
|
|
225
245
|
export declare function DataTable<T extends {
|
|
226
246
|
id: string;
|
|
227
|
-
}>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder, searchLabel, onEdit, stickyFirst, stickyLast, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel, empty, showCount, countLabel, toolbar, className, reorderRowLabel, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
247
|
+
}>({ columns: columnsProp, data, selectable, selectedIds, onSelectionChange, selectAllLabel: selectAllLabelProp, selectRowLabel, selectionAnnouncement, columnMenu, onColumnsChange, groupBy, onRowsReorder, error, sort: sortProp, defaultSort, onSortChange, filterable, searchPlaceholder: searchPlaceholderProp, searchLabel: searchLabelProp, onEdit, stickyFirst, stickyLast, locale: localeProp, avatarTone, surface, interactive, onRowClick, onAddRow, addRowLabel: addRowLabelProp, empty: emptyProp, showCount, countLabel, toolbar, className, reorderRowLabel: reorderRowLabelProp, sortAscendingLabel: sortAscendingLabelProp, sortDescendingLabel: sortDescendingLabelProp, moveColumnLeftLabel: moveColumnLeftLabelProp, moveColumnRightLabel: moveColumnRightLabelProp, editColumnLabel: editColumnLabelProp, hideColumnLabel: hideColumnLabelProp, renameColumnLabel: renameColumnLabelProp, viewSettingsLabel: viewSettingsLabelProp, columnsGroupLabel: columnsGroupLabelProp, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
228
248
|
export declare namespace DataTable {
|
|
229
249
|
var displayName: string;
|
|
230
250
|
}
|
|
@@ -74,6 +74,10 @@ export type TableToolbarProps = Omit<React.ComponentPropsWithoutRef<"div">, "chi
|
|
|
74
74
|
helpHref?: string;
|
|
75
75
|
/** aria-label on the Sort trigger (default "Sort"). */
|
|
76
76
|
sortLabel?: string;
|
|
77
|
+
/** Text on the Filter trigger when `filterTriggerLabel` isn't set and no
|
|
78
|
+
* filter is active (default "Filter") — crisp/#471: TableToolbar had no
|
|
79
|
+
* override for this at all before, unlike every other label here. */
|
|
80
|
+
filterLabel?: string;
|
|
77
81
|
/** aria-label on each sort row's drag grip (default "Reorder sort"). */
|
|
78
82
|
reorderSortLabel?: string;
|
|
79
83
|
/** aria-label on a sort row's field select (default "Sort field"). */
|
|
@@ -135,7 +139,7 @@ export declare function applySorts<T>(rows: T[], sorts: ToolbarSort[], get?: (ro
|
|
|
135
139
|
* this (Sort: Due date/Assignee/Creation date; Filter: Assignee/Record/
|
|
136
140
|
* Created by), which one shared list can't reproduce.
|
|
137
141
|
*/
|
|
138
|
-
export declare function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColumns: filterColumnsProp, sorts: sortsProp, defaultSorts, onSortsChange, filters: filtersProp, defaultFilters, onFiltersChange, count, children, helpHref, className, sortLabel, reorderSortLabel, noSortsLabel, addSortLabel, learnSortingLabel, selectConditionLabel, sortFieldLabel, sortDirectionLabel, removeSortLabel, filterFieldLabel, filterFieldPlaceholder, filterValuePlaceholder, ascendingLabel, descendingLabel, sortTriggerLabel, filterTriggerLabel, inline, ...rest }: TableToolbarProps): React.JSX.Element;
|
|
142
|
+
export declare function TableToolbar({ columns, sortColumns: sortColumnsProp, filterColumns: filterColumnsProp, sorts: sortsProp, defaultSorts, onSortsChange, filters: filtersProp, defaultFilters, onFiltersChange, count, children, helpHref, className, sortLabel: sortLabelProp, filterLabel: filterLabelProp, reorderSortLabel: reorderSortLabelProp, noSortsLabel: noSortsLabelProp, addSortLabel: addSortLabelProp, learnSortingLabel: learnSortingLabelProp, selectConditionLabel: selectConditionLabelProp, sortFieldLabel: sortFieldLabelProp, sortDirectionLabel: sortDirectionLabelProp, removeSortLabel: removeSortLabelProp, filterFieldLabel: filterFieldLabelProp, filterFieldPlaceholder: filterFieldPlaceholderProp, filterValuePlaceholder: filterValuePlaceholderProp, ascendingLabel: ascendingLabelProp, descendingLabel: descendingLabelProp, sortTriggerLabel, filterTriggerLabel, inline, ...rest }: TableToolbarProps): React.JSX.Element;
|
|
139
143
|
export type ToolbarToolProps = React.ComponentPropsWithoutRef<"button"> & {
|
|
140
144
|
/** Drawn the way Sort/Filter are once a condition is set (#399). */
|
|
141
145
|
active?: boolean;
|
|
@@ -8,8 +8,8 @@ declare const spec: {
|
|
|
8
8
|
readonly maxWidth: "260px";
|
|
9
9
|
readonly padding: `var(--${string}) var(--${string})`;
|
|
10
10
|
readonly borderRadius: `var(--${string})`;
|
|
11
|
-
readonly background: "#
|
|
12
|
-
readonly color: "#
|
|
11
|
+
readonly background: "#101112";
|
|
12
|
+
readonly color: "#eeeff1";
|
|
13
13
|
readonly fontFamily: `var(--${string})`;
|
|
14
14
|
readonly fontSize: `var(--${string})`;
|
|
15
15
|
readonly fontWeight: `var(--${string})`;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* crisp/#471: a consumer app (internal/grc) ships a non-English UI and needs
|
|
4
|
+
* every string crisp itself renders — not just its own screens — to read in
|
|
5
|
+
* that language too. Every crisp component that shows its own text already
|
|
6
|
+
* takes that text as an optional prop with an English default (crisp/#74,
|
|
7
|
+
* crisp/#75, crisp/#204's own sweep: `sortLabel = "Sort"` and the like) — an
|
|
8
|
+
* explicit prop always wins, so nothing here changes what a consumer who
|
|
9
|
+
* passes one already gets. What's missing is a way to set every one of
|
|
10
|
+
* those defaults ONCE, at the app root, instead of threading a translated
|
|
11
|
+
* string into every call site of every component across a whole app.
|
|
12
|
+
*
|
|
13
|
+
* `CrispMessagesProvider` fills that gap. Its `messages` map is keyed by
|
|
14
|
+
* the component's own English default text — the exact literal already
|
|
15
|
+
* hardcoded at each call site — not a separate id vocabulary a consumer
|
|
16
|
+
* would have to learn or keep in sync. This is deliberate: internal/grc's
|
|
17
|
+
* own `lib/i18n.tsx` already built a flat `Record<string,string>` dictionary
|
|
18
|
+
* keyed the same way for its OWN UI chrome, so that dictionary is a valid
|
|
19
|
+
* `CrispMessages` value as-is — passed straight into this provider, with no
|
|
20
|
+
* remapping, it also translates every crisp-rendered string that happens to
|
|
21
|
+
* share an English key GRC already has an entry for.
|
|
22
|
+
*
|
|
23
|
+
* `useCrispMessage` is what a component calls for each of its own
|
|
24
|
+
* translatable strings: `useCrispMessage(sortLabelProp, "Sort")`. Resolution
|
|
25
|
+
* order is explicit prop, then the provider's translation of the built-in
|
|
26
|
+
* English default, then that default itself — so a consumer with no
|
|
27
|
+
* provider (or a provider missing that one key) sees exactly what shipped
|
|
28
|
+
* before this existed.
|
|
29
|
+
*/
|
|
30
|
+
export type CrispMessages = Record<string, string>;
|
|
31
|
+
export declare function CrispMessagesProvider({ messages, children, }: {
|
|
32
|
+
messages: CrispMessages;
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
}): React.ReactElement;
|
|
35
|
+
/**
|
|
36
|
+
* Resolves one translatable string for a component: `explicit` is whatever
|
|
37
|
+
* the caller passed for that prop (`undefined` when they didn't), and
|
|
38
|
+
* `englishDefault` is the literal that shipped as that prop's default value
|
|
39
|
+
* before crisp/#471 — still what renders with no provider in the tree.
|
|
40
|
+
*
|
|
41
|
+
* A plain function, not a second context read inside a loop or a render
|
|
42
|
+
* helper — components call this once per string, the same shape
|
|
43
|
+
* `useLabelAssociation`/`useFormReset` and this codebase's other small
|
|
44
|
+
* `core/` hooks already take.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useCrispMessage(explicit: string | undefined, englishDefault: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* The same resolution as `useCrispMessage`, for a component that builds its
|
|
49
|
+
* own default text internally (TableToolbar's "Sorted by {field}", a
|
|
50
|
+
* DatePicker's month/weekday names) rather than taking one string prop per
|
|
51
|
+
* piece — every literal fragment of that built-in text still needs its own
|
|
52
|
+
* translation lookup, and a component with many such fragments (twelve
|
|
53
|
+
* month names, seven weekday names) would otherwise call `useCrispMessage`
|
|
54
|
+
* in a loop, which breaks the rules of hooks. `useCrispMessages` returns the
|
|
55
|
+
* raw dictionary once; call sites do their own `dict[english] ?? english`
|
|
56
|
+
* per fragment, same fallback order, no hook-in-a-loop.
|
|
57
|
+
*/
|
|
58
|
+
export declare function useCrispMessages(): CrispMessages;
|
|
@@ -7,6 +7,7 @@ export { isRtlElement } from "./direction";
|
|
|
7
7
|
export { FloatingPortal } from "./floating-portal";
|
|
8
8
|
export { hasOpenFloatingLayer, isInsideLaterFloatingLayer, registerFloatingLayer, } from "./floating-stack";
|
|
9
9
|
export { formValueStyle } from "./form-value";
|
|
10
|
+
export { type CrispMessages, CrispMessagesProvider, useCrispMessage, useCrispMessages, } from "./i18n";
|
|
10
11
|
export { type MentionAnchor, type MentionMatch, matchMentionTrigger, } from "./mention";
|
|
11
12
|
export { type FloatingAlign, type PlaceFloatingOptions, placeFloating, } from "./place-floating";
|
|
12
13
|
export { Primitive } from "./primitive";
|