@bagelink/vue 1.21.51 → 1.21.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{StructuredEditor-e8PRp7kq.js → StructuredEditor-C2ftdWZ4.js} +121 -99
  2. package/dist/{StructuredEditor-BUnLClCn.cjs → StructuredEditor-DoffRqCu.cjs} +2 -2
  3. package/dist/StructuredEditor.css +1 -1
  4. package/dist/components/dataTable/DataTable.vue.d.ts.map +1 -1
  5. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts +18 -5
  6. package/dist/components/form/inputs/CodeEditor/Index.vue.d.ts.map +1 -1
  7. package/dist/components/form/inputs/CodeEditor/StructuredEditor.vue.d.ts +2 -1
  8. package/dist/components/form/inputs/CodeEditor/StructuredEditor.vue.d.ts.map +1 -1
  9. package/dist/components/layout/AppSidebar.vue.d.ts.map +1 -1
  10. package/dist/components/layout/SidebarNavCaption.vue.d.ts.map +1 -1
  11. package/dist/core.css +2 -2
  12. package/dist/i18n/index.d.ts +24 -0
  13. package/dist/i18n/index.d.ts.map +1 -1
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.mjs +1 -1
  16. package/dist/{src-BTEY3Itg.js → src-B4Vf81d1.js} +9203 -9166
  17. package/dist/src-CBPUG0cX.cjs +764 -0
  18. package/dist/src.css +1 -1
  19. package/dist/style.css +2 -2
  20. package/dist/types/dataTable.d.ts +2 -2
  21. package/dist/types/dataTable.d.ts.map +1 -1
  22. package/package.json +2 -2
  23. package/src/components/dataTable/DataTable.vue +13 -4
  24. package/src/components/form/inputs/CodeEditor/Index.vue +65 -4
  25. package/src/components/form/inputs/CodeEditor/StructuredEditor.vue +43 -12
  26. package/src/components/layout/AppSidebar.vue +3 -1
  27. package/src/components/layout/SidebarNavCaption.vue +37 -16
  28. package/src/i18n/locales/en.json +4 -0
  29. package/src/i18n/locales/es.json +4 -0
  30. package/src/i18n/locales/fr.json +4 -0
  31. package/src/i18n/locales/he.json +4 -0
  32. package/src/i18n/locales/it.json +4 -0
  33. package/src/i18n/locales/ru.json +4 -0
  34. package/src/types/dataTable.ts +2 -2
  35. package/dist/src-s7k-lOzw.cjs +0 -764
@@ -18,9 +18,9 @@ export interface DataTableProps<T extends {
18
18
  onLastItemVisible?: () => void;
19
19
  /** Icon for the built-in empty state (default: 'inbox'). Pass 'none' to hide. */
20
20
  emptyIcon?: IconType | 'none';
21
- /** Title for the built-in empty state (default: 'No results'). */
21
+ /** Title for the built-in empty state (default: translated 'No results'). Supports `$t:key`. */
22
22
  emptyTitle?: string;
23
- /** Description shown under the empty-state title. */
23
+ /** Description shown under the empty-state title. Supports `$t:key`. */
24
24
  emptyDescription?: string;
25
25
  }
26
26
  export interface SortingOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"dataTable.d.ts","sourceRoot":"","sources":["../../src/types/dataTable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAExD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,CAAA;AAC5C,MAAM,MAAM,UAAU,GAAG,GAAG,MAAM,IAAI,eAAe,EAAE,CAAA;AAEvD,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE;IACxF,IAAI,EAAE,CAAC,EAAE,CAAA;IACT,MAAM,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAA;IACpC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAA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AE,CAAC,KAAK,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC5C,IAAI,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAClC,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAA;IAC3B,MAAM,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAA;IAC5C,OAAO,CAAC,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,eAAe,CAAA;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAA;CACvB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "1.21.51",
4
+ "version": "1.21.55",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
@@ -63,7 +63,7 @@
63
63
  "@types/signature_pad": "^4.0.0",
64
64
  "vue": "^3.5.45",
65
65
  "vue-component-type-helpers": "^2.2.12",
66
- "@bagelink/sdk": "1.21.51"
66
+ "@bagelink/sdk": "1.21.55"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@bagelink/sdk": "*",
@@ -7,7 +7,9 @@ import {
7
7
  EmptyState,
8
8
  Icon,
9
9
  keyToLabel,
10
- Loading
10
+ Loading,
11
+ resolveI18n,
12
+ useI18n,
11
13
  } from '../../index'
12
14
  import { useSlots, watch, computed, toValue, ref, nextTick, onMounted } from 'vue'
13
15
  import { useSchemaField } from '../../composables/useSchemaField'
@@ -29,6 +31,7 @@ const emit = defineEmits<{
29
31
  }>()
30
32
 
31
33
  const slots: SetupContext['slots'] = useSlots()
34
+ const { $t } = useI18n()
32
35
 
33
36
  const loading = defineModel('loading', { default: false })
34
37
  const itemHeight = defineModel('itemHeight', { default: 50 })
@@ -184,6 +187,12 @@ const headerFontSize = computed(() => {
184
187
  if (!resolvedFontSize.value) return '0.8rem'
185
188
  return `calc(${resolvedFontSize.value} * 0.9)`
186
189
  })
190
+
191
+ const selectAllLabel = computed(() => $t('dataTable.selectAll'))
192
+ const emptyStateTitle = computed(() =>
193
+ resolveI18n(props.emptyTitle) ?? $t('dataTable.noResults'),
194
+ )
195
+ const emptyStateDescription = computed(() => resolveI18n(props.emptyDescription))
187
196
  </script>
188
197
 
189
198
  <template>
@@ -194,7 +203,7 @@ const headerFontSize = computed(() => {
194
203
  <thead class="row first-row">
195
204
  <th v-if="isSortable" class="col-drag" />
196
205
  <th v-if="isSelectable" class="col-check">
197
- <input ref="allSelectorEl" type="checkbox" aria-label="Select all" title="Select all" @click.stop @change="(e) => toggleSelectAll(e)">
206
+ <input ref="allSelectorEl" type="checkbox" :aria-label="selectAllLabel" :title="selectAllLabel" @click.stop @change="(e) => toggleSelectAll(e)">
198
207
  </th>
199
208
  <th
200
209
  v-for="field in computedSchema" :key="field.id" class="col"
@@ -244,8 +253,8 @@ const headerFontSize = computed(() => {
244
253
  <slot v-if="isEmpty" name="empty">
245
254
  <EmptyState
246
255
  :icon="props.emptyIcon ?? 'inbox'"
247
- :title="props.emptyTitle ?? 'No results'"
248
- :description="props.emptyDescription"
256
+ :title="emptyStateTitle"
257
+ :description="emptyStateDescription"
249
258
  class="h-60p"
250
259
  />
251
260
  </slot>
@@ -21,6 +21,8 @@ const props = defineProps({
21
21
  mobileHeight: { type: String, default: undefined },
22
22
  /** Pair with height="auto" for content-sized, capped output. */
23
23
  maxHeight: { type: String, default: undefined },
24
+ /** Floor when height="auto" (content can still grow). CSS length or unitless px. */
25
+ minHeight: { type: String, default: undefined },
24
26
  terminal: { type: Boolean, default: false },
25
27
  title: { type: String, default: '' },
26
28
  disabled: { type: Boolean, default: false },
@@ -33,9 +35,10 @@ const props = defineProps({
33
35
  formatting: { type: Boolean, default: false },
34
36
  /**
35
37
  * Toolbar chrome: `bar` keeps language + actions above the editor;
36
- * `hover` reveals them on hover/focus. Terminal mode always uses the title bar.
38
+ * `hover` reveals them on hover/focus; `none` hides chrome entirely.
39
+ * Terminal mode always uses the title bar.
37
40
  */
38
- toolbarMode: { type: String as PropType<'bar' | 'hover'>, default: 'bar' },
41
+ toolbarMode: { type: String as PropType<'bar' | 'hover' | 'none'>, default: 'bar' },
39
42
  singleLine: { type: Boolean, default: false },
40
43
  /** Legacy highlight.js theme names now map to light/dark appearance. */
41
44
  theme: { type: String as PropType<HighlightTheme>, default: 'dark' },
@@ -58,11 +61,17 @@ const isFocused = ref(false)
58
61
  const hasCodeValue = computed(() => Boolean(code.value?.trim()))
59
62
  // Preserve object mode through temporarily invalid JSON while editing.
60
63
  const objectMode = ref(typeof props.modelValue === 'object')
64
+ function cssLength(value: string | undefined): string | undefined {
65
+ if (value === undefined || value === '') return undefined
66
+ return /^\d+$/.test(value) ? `${value}px` : value
67
+ }
61
68
  const editorHeight = computed(() => {
62
69
  if (props.singleLine) return undefined
63
70
  const height = isMobile.value && props.mobileHeight !== undefined ? props.mobileHeight : props.height
64
- return /^\d+$/.test(height) ? `${height}px` : height
71
+ return cssLength(height)
65
72
  })
73
+ const editorMaxHeight = computed(() => cssLength(props.maxHeight))
74
+ const editorMinHeight = computed(() => cssLength(props.minHeight))
66
75
  const isLightTheme = computed(() => {
67
76
  const theme = String(props.theme).toLowerCase()
68
77
  if (theme.includes('dark')) return false
@@ -105,7 +114,12 @@ watch(() => props.modelValue, value => {
105
114
  <div
106
115
  class="bagel-input code-editor-container ltr display-flex flex-column"
107
116
  :class="[shellClass, { 'has-value': hasCodeValue, 'single-line': singleLine, terminal }]"
108
- :style="[{ height: editorHeight, '--code-max-height': maxHeight }, shellStyle]"
117
+ :style="[{
118
+ height: editorHeight,
119
+ minHeight: editorMinHeight,
120
+ '--code-max-height': editorMaxHeight,
121
+ '--code-min-height': editorMinHeight,
122
+ }, shellStyle]"
109
123
  >
110
124
  <!-- Bar mode puts the form label on the toolbar row; other modes keep it above. -->
111
125
  <label v-if="label && (toolbarMode === 'hover' || singleLine || terminal)" class="label">{{ label }}</label>
@@ -158,6 +172,8 @@ watch(() => props.modelValue, value => {
158
172
  .code-editor-container.single-line {
159
173
  height: auto;
160
174
  margin-bottom: 0;
175
+ /* Shrink global scrollbar.css rules that read this token. */
176
+ --bgl-scrollbar-size: 3px;
161
177
  }
162
178
  .single-line > :deep(.structured-editor) {
163
179
  height: var(--bgl-input-height);
@@ -166,11 +182,22 @@ watch(() => props.modelValue, value => {
166
182
  border-radius: var(--bgl-input-border-radius);
167
183
  font-size: var(--bgl-input-font-size);
168
184
  }
185
+ .single-line :deep(.structured-editor-host),
186
+ .single-line :deep(.cm-scroller) {
187
+ overflow-x: auto;
188
+ overflow-y: hidden;
189
+ /* Keep scrollbar-* at auto so ::-webkit-scrollbar height/width can apply in Chromium. */
190
+ scrollbar-width: auto;
191
+ scrollbar-color: auto;
192
+ }
169
193
  .single-line :deep(.cm-content) {
170
194
  padding-block: 0;
171
195
  padding-inline: 0.7rem;
172
196
  line-height: var(--bgl-input-height);
173
197
  }
198
+ .single-line :deep(.cm-line) {
199
+ padding-block: 0;
200
+ }
174
201
  .code-editor-container.terminal {
175
202
  padding: 0;
176
203
  margin-bottom: 0;
@@ -196,3 +223,37 @@ watch(() => props.modelValue, value => {
196
223
  padding: 0.75rem;
197
224
  }
198
225
  </style>
226
+
227
+ <!-- Unscoped: Vue scoped :deep() does not reliably style ::-webkit-scrollbar.
228
+ Do not set scrollbar-width/color here — non-auto values disable these rules in Chromium. -->
229
+ <style>
230
+ .code-editor-container.single-line .cm-scroller,
231
+ .code-editor-container.single-line .structured-editor-host {
232
+ scrollbar-width: auto;
233
+ scrollbar-color: auto;
234
+ }
235
+ .code-editor-container.single-line .cm-scroller::-webkit-scrollbar,
236
+ .code-editor-container.single-line .structured-editor-host::-webkit-scrollbar {
237
+ height: 3px !important;
238
+ width: 3px !important;
239
+ }
240
+ .code-editor-container.single-line .cm-scroller::-webkit-scrollbar-track,
241
+ .code-editor-container.single-line .structured-editor-host::-webkit-scrollbar-track {
242
+ background: transparent !important;
243
+ margin: 0 !important;
244
+ }
245
+ .code-editor-container.single-line .cm-scroller::-webkit-scrollbar-thumb,
246
+ .code-editor-container.single-line .structured-editor-host::-webkit-scrollbar-thumb {
247
+ background-color: var(--bgl-scrollbar-thumb, rgba(0, 0, 0, 0.25)) !important;
248
+ border-radius: 1rem !important;
249
+ border: 0 !important;
250
+ background-clip: border-box !important;
251
+ }
252
+ @supports (-moz-appearance: none) {
253
+ .code-editor-container.single-line .cm-scroller,
254
+ .code-editor-container.single-line .structured-editor-host {
255
+ scrollbar-width: thin;
256
+ scrollbar-color: var(--bgl-scrollbar-thumb, rgba(0, 0, 0, 0.25)) transparent;
257
+ }
258
+ }
259
+ </style>
@@ -30,9 +30,10 @@ const props = defineProps<{
30
30
  /**
31
31
  * `bar` (default) — language label + actions always visible above the editor.
32
32
  * `hover` — immersive surface; chrome appears on hover/focus.
33
+ * `none` — no chrome (e.g. when the parent already provides copy actions).
33
34
  * Terminal mode always uses the title-bar row for chrome.
34
35
  */
35
- toolbarMode?: 'bar' | 'hover'
36
+ toolbarMode?: 'bar' | 'hover' | 'none'
36
37
  }>()
37
38
  const emit = defineEmits<{
38
39
  'update:modelValue': [value: string]
@@ -52,7 +53,7 @@ const canFormat = computed(() => props.formatting && !props.singleLine && suppor
52
53
  const toolbarMode = computed(() => props.toolbarMode ?? 'bar')
53
54
  const hoverToolbar = computed(() => !props.terminal && toolbarMode.value === 'hover')
54
55
  const toolbarPinned = computed(() => formattingBusy.value || copied.value || Boolean(formatError.value || copyError.value))
55
- const showToolbar = computed(() => !props.singleLine)
56
+ const showToolbar = computed(() => !props.singleLine && toolbarMode.value !== 'none')
56
57
  const config = new Compartment()
57
58
  const languageConfig = new Compartment()
58
59
  const externalUpdate = Annotation.define<boolean>()
@@ -107,7 +108,8 @@ function createSearchPanel(editor: EditorView) {
107
108
  }
108
109
 
109
110
  function extensions(): Extension[] {
110
- const contentPad = props.singleLine ? '0' : '0.75em 1ch 1.5em 2ch'
111
+ // Match `.bagel-input` field padding (inputs.css) — keep sides even.
112
+ const contentPad = props.singleLine ? '0' : '0.7rem'
111
113
  return [
112
114
  props.dark ? atomone : atomLight,
113
115
  props.lineNumbers && !props.singleLine ? numberGutter() : [],
@@ -128,11 +130,32 @@ function extensions(): Extension[] {
128
130
  ...(props.terminal ? { backgroundColor: 'transparent' } : {}),
129
131
  },
130
132
  '.cm-scroller': {
131
- overflow: 'auto',
133
+ overflowX: 'auto',
134
+ overflowY: props.singleLine ? 'hidden' : 'auto',
132
135
  fontFamily: 'inherit',
133
- lineHeight: '1.5',
136
+ lineHeight: props.singleLine ? 'inherit' : '1.5',
134
137
  overscrollBehavior: 'contain',
138
+ // Non-auto scrollbar-* disables ::-webkit-scrollbar sizing in Chromium.
139
+ ...(props.singleLine ? { scrollbarWidth: 'auto', scrollbarColor: 'auto' } : {}),
135
140
  },
141
+ ...(props.singleLine
142
+ ? {
143
+ '& .cm-scroller::-webkit-scrollbar': {
144
+ height: '3px !important',
145
+ width: '3px !important',
146
+ },
147
+ '& .cm-scroller::-webkit-scrollbar-track': {
148
+ background: 'transparent !important',
149
+ margin: '0 !important',
150
+ },
151
+ '& .cm-scroller::-webkit-scrollbar-thumb': {
152
+ backgroundColor: 'var(--bgl-scrollbar-thumb, rgba(0, 0, 0, 0.25)) !important',
153
+ borderRadius: '1rem !important',
154
+ border: '0 !important',
155
+ backgroundClip: 'border-box !important',
156
+ },
157
+ }
158
+ : {}),
136
159
  '.cm-content': {
137
160
  padding: contentPad,
138
161
  fontVariantLigatures: 'none',
@@ -269,6 +292,7 @@ onBeforeUnmount(() => {
269
292
  terminal,
270
293
  'toolbar-hover': hoverToolbar,
271
294
  'toolbar-pinned': toolbarPinned,
295
+ 'toolbar-none': toolbarMode === 'none',
272
296
  'single-line': singleLine,
273
297
  }"
274
298
  >
@@ -340,7 +364,7 @@ onBeforeUnmount(() => {
340
364
  width: 100%;
341
365
  height: 100%;
342
366
  min-width: 0;
343
- min-height: 0;
367
+ min-height: var(--code-min-height, 0);
344
368
  max-height: var(--code-max-height, none);
345
369
  overflow: hidden;
346
370
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
@@ -361,17 +385,24 @@ onBeforeUnmount(() => {
361
385
  }
362
386
  /* Bar mode: chrome (label/language/actions) sits above; the code surface is the rounded input. */
363
387
  .structured-editor:not(.toolbar-hover):not(.terminal):not(.single-line) .structured-editor-host {
364
- border-radius: var(--code-border-radius, 0.25rem);
388
+ border-radius: var(--bgl-input-border-radius);
365
389
  overflow: hidden;
366
390
  }
367
- /* Hover / single-line: round the whole editor shell (chrome overlays or is absent). */
391
+ /* Hover / single-line / no-toolbar: round the whole editor shell. */
368
392
  .toolbar-hover,
369
- .structured-editor.single-line {
370
- border-radius: var(--code-border-radius, 0.25rem);
371
- }
372
- .structured-editor.single-line {
393
+ .structured-editor.single-line,
394
+ .structured-editor.toolbar-none {
373
395
  border-radius: var(--bgl-input-border-radius);
374
396
  }
397
+ /* Single-line inputs: allow sideways scroll only — never a vertical scrollbar. */
398
+ .structured-editor.single-line .structured-editor-host {
399
+ overflow-x: auto;
400
+ overflow-y: hidden;
401
+ }
402
+ .structured-editor.single-line :deep(.cm-scroller) {
403
+ overflow-x: auto;
404
+ overflow-y: hidden;
405
+ }
375
406
  .code-terminal-bar {
376
407
  background: rgba(255, 255, 255, 0.04);
377
408
  }
@@ -90,9 +90,11 @@ watch(
90
90
  () => {
91
91
  if (!isMobile.value) {
92
92
  isTransitioning.value = true
93
+ // Keep visual-open through caption phases on open/close
94
+ // (close ~680ms; open width-wait + height + fade ~940ms).
93
95
  setTimeout(() => {
94
96
  isTransitioning.value = false
95
- }, 300)
97
+ }, 1000)
96
98
  }
97
99
  }
98
100
  )
@@ -1,43 +1,64 @@
1
1
  <script lang="ts" setup>
2
2
  /**
3
- * Small muted section caption for a grouped sidebar nav. Rendered inside
4
- * AppSidebar's `nav` slot, between groups of SidebarNavItem. When the sidebar
5
- * collapses, the row animates its height shut so the links below slide up
6
- * instead of jumping.
3
+ * Group caption for AppSidebar's `nav` slot.
4
+ * Close: fade label → shrink height → fade rule in.
5
+ * Open: hide rule → grow height → fade label in.
6
+ * Rule is absolute + opacity-only so it never slides mid-transition.
7
7
  */
8
8
  </script>
9
9
 
10
10
  <template>
11
11
  <div class="sidebar-nav-caption">
12
- <span class="sidebar-nav-caption-label nav-text"><slot /></span>
12
+ <span class="sidebar-nav-caption-label"><slot /></span>
13
+ <span class="sidebar-nav-caption-rule" aria-hidden="true" />
13
14
  </div>
14
15
  </template>
15
16
 
16
17
  <style>
17
18
  .sidebar-nav-caption {
18
- display: grid;
19
- align-self: stretch;
19
+ position: relative;
20
20
  width: 100%;
21
- grid-template-rows: 1fr;
22
- transition: grid-template-rows 0.45s ease;
21
+ overflow: hidden;
22
+ max-height: 2.5rem;
23
+ transition: max-height 0.36s cubic-bezier(0.4, 0, 0.2, 1) 0.36s;
23
24
  }
24
25
 
25
26
  .sidebar-nav-caption-label {
26
- box-sizing: border-box;
27
- width: 100%;
28
- min-height: 0;
29
- text-align: start;
30
- overflow: hidden;
27
+ display: block;
31
28
  font-size: 0.6875rem;
32
29
  line-height: 1;
33
30
  letter-spacing: 0.04em;
34
31
  text-transform: uppercase;
35
32
  font-weight: 500;
36
- opacity: 0.5;
33
+ opacity: 0.4;
37
34
  padding: 0.75rem 0.75rem 0.25rem;
35
+ white-space: nowrap;
36
+ transition: opacity 0.22s ease 0.75s;
37
+ }
38
+
39
+ .sidebar-nav-caption-rule {
40
+ position: absolute;
41
+ inset-inline-start: 50%;
42
+ top: 50%;
43
+ width: 0.875rem;
44
+ height: 1px;
45
+ background: currentColor;
46
+ opacity: 0;
47
+ transform: translate(-50%, -50%);
48
+ transition: opacity 0.1s ease;
38
49
  }
39
50
 
40
51
  .app-sidebar.sidebar-collapsed .sidebar-nav-caption {
41
- grid-template-rows: 0fr;
52
+ max-height: 0.9rem;
53
+ }
54
+
55
+ .app-sidebar.sidebar-collapsed .sidebar-nav-caption-label {
56
+ opacity: 0;
57
+ transition: opacity 0.28s ease;
58
+ }
59
+
60
+ .app-sidebar.sidebar-collapsed .sidebar-nav-caption-rule {
61
+ opacity: 0.22;
62
+ transition: opacity 0.2s ease 0.75s;
42
63
  }
43
64
  </style>
@@ -178,6 +178,10 @@
178
178
  "date": {
179
179
  "invalidFormat": "Invalid date format"
180
180
  },
181
+ "dataTable": {
182
+ "selectAll": "Select all",
183
+ "noResults": "No results"
184
+ },
181
185
  "spreadsheet": {
182
186
  "wrapText": "Wrap Text",
183
187
  "selectAll": "Select All",
@@ -177,6 +177,10 @@
177
177
  "date": {
178
178
  "invalidFormat": "Formato de fecha inválido"
179
179
  },
180
+ "dataTable": {
181
+ "selectAll": "Seleccionar todo",
182
+ "noResults": "Sin resultados"
183
+ },
180
184
  "spreadsheet": {
181
185
  "wrapText": "Ajuste de texto",
182
186
  "selectAll": "Seleccionar todo",
@@ -177,6 +177,10 @@
177
177
  "date": {
178
178
  "invalidFormat": "Format de date invalide"
179
179
  },
180
+ "dataTable": {
181
+ "selectAll": "Tout sélectionner",
182
+ "noResults": "Aucun résultat"
183
+ },
180
184
  "spreadsheet": {
181
185
  "wrapText": "Renvoyer à la ligne",
182
186
  "selectAll": "Tout sélectionner",
@@ -199,6 +199,10 @@
199
199
  "date": {
200
200
  "invalidFormat": "פורמט תאריך לא חוקי"
201
201
  },
202
+ "dataTable": {
203
+ "selectAll": "בחר הכל",
204
+ "noResults": "אין תוצאות"
205
+ },
202
206
  "spreadsheet": {
203
207
  "wrapText": "גלישת טקסט",
204
208
  "selectAll": "בחר הכל",
@@ -177,6 +177,10 @@
177
177
  "date": {
178
178
  "invalidFormat": "Formato data non valido"
179
179
  },
180
+ "dataTable": {
181
+ "selectAll": "Seleziona tutto",
182
+ "noResults": "Nessun risultato"
183
+ },
180
184
  "spreadsheet": {
181
185
  "wrapText": "A capo automatico",
182
186
  "selectAll": "Seleziona tutto",
@@ -177,6 +177,10 @@
177
177
  "date": {
178
178
  "invalidFormat": "Неверный формат даты"
179
179
  },
180
+ "dataTable": {
181
+ "selectAll": "Выбрать всё",
182
+ "noResults": "Нет результатов"
183
+ },
180
184
  "spreadsheet": {
181
185
  "wrapText": "Перенос текста",
182
186
  "selectAll": "Выбрать всё",
@@ -14,9 +14,9 @@ export interface DataTableProps<T extends { [key: string]: any } = { [key: strin
14
14
  onLastItemVisible?: () => void
15
15
  /** Icon for the built-in empty state (default: 'inbox'). Pass 'none' to hide. */
16
16
  emptyIcon?: IconType | 'none'
17
- /** Title for the built-in empty state (default: 'No results'). */
17
+ /** Title for the built-in empty state (default: translated 'No results'). Supports `$t:key`. */
18
18
  emptyTitle?: string
19
- /** Description shown under the empty-state title. */
19
+ /** Description shown under the empty-state title. Supports `$t:key`. */
20
20
  emptyDescription?: string
21
21
  }
22
22