mithril-materialized 3.5.9 → 3.5.10

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/index.umd.js CHANGED
@@ -1413,19 +1413,18 @@
1413
1413
  onclick: onToggle,
1414
1414
  }, [
1415
1415
  iconName ? m('i.material-icons', iconName) : undefined,
1416
- header ? (typeof header === 'string' ? m('span', header) : header) : undefined,
1416
+ header
1417
+ ? typeof header === 'string'
1418
+ ? m('span.collapsible-header-text', header)
1419
+ : m('.collapsible-header-content', header)
1420
+ : undefined,
1417
1421
  ])
1418
1422
  : undefined,
1419
1423
  m('.collapsible-body', {
1420
1424
  style: {
1421
1425
  display: isActive ? 'block' : 'none',
1422
- transition: 'display 0.3s ease',
1423
1426
  },
1424
- }, [
1425
- m('.collapsible-body-content', {
1426
- style: { padding: '2rem' },
1427
- }, body ? (typeof body === 'string' ? m('div', { innerHTML: body }) : body) : undefined),
1428
- ]),
1427
+ }, body ? (typeof body === 'string' ? m('div', { innerHTML: body }) : body) : undefined),
1429
1428
  ]);
1430
1429
  },
1431
1430
  };
@@ -1448,7 +1447,7 @@
1448
1447
  });
1449
1448
  },
1450
1449
  view: ({ attrs }) => {
1451
- const { items, accordion = true, class: c, className, style, id } = attrs;
1450
+ const { items, header, accordion = true, class: c, className, style, id } = attrs;
1452
1451
  const toggleItem = (index) => {
1453
1452
  if (accordion) {
1454
1453
  // Accordion mode: only one item can be active
@@ -1470,12 +1469,22 @@
1470
1469
  }
1471
1470
  }
1472
1471
  };
1472
+ const collapsibleItems = items.map((item, index) => m(CollapsibleItem, Object.assign(Object.assign({}, item), { key: index, isActive: state.activeItems.has(index), onToggle: () => toggleItem(index) })));
1473
1473
  return items && items.length > 0
1474
- ? m('ul.collapsible', {
1475
- class: c || className,
1476
- style: Object.assign({ border: '1px solid #ddd', borderRadius: '2px', margin: '0.5rem 0 1rem 0' }, style),
1477
- id,
1478
- }, items.map((item, index) => m(CollapsibleItem, Object.assign(Object.assign({}, item), { key: index, isActive: state.activeItems.has(index), onToggle: () => toggleItem(index) }))))
1474
+ ? header
1475
+ ? m('ul.collapsible.with-header', {
1476
+ class: c || className,
1477
+ style,
1478
+ id,
1479
+ }, [
1480
+ m('li.collapsible-main-header', m('h4', typeof header === 'string' ? header : header)),
1481
+ collapsibleItems,
1482
+ ])
1483
+ : m('ul.collapsible', {
1484
+ class: c || className,
1485
+ style,
1486
+ id,
1487
+ }, collapsibleItems)
1479
1488
  : undefined;
1480
1489
  },
1481
1490
  };
@@ -1579,7 +1588,7 @@
1579
1588
  };
1580
1589
  };
1581
1590
 
1582
- const defaultI18n$2 = {
1591
+ const defaultI18n$3 = {
1583
1592
  cancel: 'Cancel',
1584
1593
  clear: 'Clear',
1585
1594
  done: 'Ok',
@@ -1687,9 +1696,9 @@
1687
1696
  else if (attrs.displayFormat) {
1688
1697
  finalFormat = attrs.displayFormat;
1689
1698
  }
1690
- const merged = Object.assign({ autoClose: false, format: finalFormat, parse: null, defaultDate: null, setDefaultDate: false, disableWeekends: false, disableDayFn: null, firstDay: 0, minDate: null, maxDate: null, yearRange, showClearBtn: false, showWeekNumbers: false, weekNumbering: 'iso', i18n: defaultI18n$2, onSelect: null, onOpen: null, onClose: null }, attrs);
1699
+ const merged = Object.assign({ autoClose: false, format: finalFormat, parse: null, defaultDate: null, setDefaultDate: false, disableWeekends: false, disableDayFn: null, firstDay: 0, minDate: null, maxDate: null, yearRange, showClearBtn: false, showWeekNumbers: false, weekNumbering: 'iso', i18n: defaultI18n$3, onSelect: null, onOpen: null, onClose: null }, attrs);
1691
1700
  // Merge i18n properly
1692
- merged.i18n = Object.assign(Object.assign({}, defaultI18n$2), attrs.i18n);
1701
+ merged.i18n = Object.assign(Object.assign({}, defaultI18n$3), attrs.i18n);
1693
1702
  return merged;
1694
1703
  };
1695
1704
  const toString = (date, format) => {
@@ -2140,11 +2149,11 @@
2140
2149
  prevMonth();
2141
2150
  },
2142
2151
  }, m('svg', {
2143
- fill: '#000000',
2144
2152
  height: '24',
2145
2153
  viewBox: '0 0 24 24',
2146
2154
  width: '24',
2147
2155
  xmlns: 'http://www.w3.org/2000/svg',
2156
+ style: 'fill: var(--mm-text-primary, rgba(0, 0, 0, 0.87));',
2148
2157
  }, [
2149
2158
  m('path', { d: 'M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z' }),
2150
2159
  m('path', { d: 'M0-.5h24v24H0z', fill: 'none' }),
@@ -2206,11 +2215,11 @@
2206
2215
  nextMonth();
2207
2216
  },
2208
2217
  }, m('svg', {
2209
- fill: '#000000',
2210
2218
  height: '24',
2211
2219
  viewBox: '0 0 24 24',
2212
2220
  width: '24',
2213
2221
  xmlns: 'http://www.w3.org/2000/svg',
2222
+ style: 'fill: var(--mm-text-primary, rgba(0, 0, 0, 0.87));',
2214
2223
  }, [
2215
2224
  m('path', { d: 'M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z' }),
2216
2225
  m('path', { d: 'M0-.25h24v24H0z', fill: 'none' }),
@@ -3223,19 +3232,29 @@
3223
3232
  if (!controlled && attrs.defaultValue !== undefined) {
3224
3233
  textarea.value = String(attrs.defaultValue);
3225
3234
  }
3226
- // Height will be calculated by hidden div
3227
3235
  // Update character count state for counter component
3228
3236
  if (maxLength) {
3229
3237
  state.currentLength = textarea.value.length;
3230
3238
  }
3239
+ // Calculate initial height after DOM is fully ready
3240
+ // Use requestAnimationFrame to ensure layout is complete
3241
+ if (state.hiddenDiv) {
3242
+ requestAnimationFrame(() => {
3243
+ if (state.hiddenDiv) {
3244
+ updateHeight(textarea, state.hiddenDiv);
3245
+ m.redraw();
3246
+ }
3247
+ });
3248
+ }
3231
3249
  }, onupdate: ({ dom }) => {
3232
3250
  const textarea = dom;
3233
- if (state.height)
3234
- textarea.style.height = state.height;
3235
- // Trigger height recalculation when value changes programmatically
3251
+ // Recalculate and apply height
3236
3252
  if (state.hiddenDiv) {
3237
3253
  updateHeight(textarea, state.hiddenDiv);
3238
3254
  }
3255
+ if (state.height) {
3256
+ textarea.style.height = state.height;
3257
+ }
3239
3258
  }, onfocus: () => {
3240
3259
  state.active = true;
3241
3260
  }, oninput: (e) => {
@@ -4776,7 +4795,7 @@
4776
4795
 
4777
4796
  /**
4778
4797
  * Pure TypeScript MaterialBox - creates an image lightbox that fills the screen when clicked
4779
- * No MaterializeCSS dependencies
4798
+ * Uses CSS classes from _materialbox.scss
4780
4799
  */
4781
4800
  const MaterialBox = () => {
4782
4801
  const state = {
@@ -4792,21 +4811,11 @@
4792
4811
  state.originalImage = img;
4793
4812
  if (attrs.onOpenStart)
4794
4813
  attrs.onOpenStart();
4814
+ const inDuration = attrs.inDuration || 275;
4795
4815
  // Create overlay
4796
4816
  const overlay = document.createElement('div');
4797
4817
  overlay.className = 'materialbox-overlay';
4798
- overlay.style.cssText = `
4799
- position: fixed;
4800
- top: 0;
4801
- left: 0;
4802
- right: 0;
4803
- bottom: 0;
4804
- background-color: rgba(0, 0, 0, 0.85);
4805
- z-index: 1000;
4806
- opacity: 0;
4807
- transition: opacity ${attrs.inDuration || 275}ms ease;
4808
- cursor: zoom-out;
4809
- `;
4818
+ overlay.style.transition = `opacity ${inDuration}ms ease`;
4810
4819
  // Create enlarged image
4811
4820
  const enlargedImg = document.createElement('img');
4812
4821
  enlargedImg.src = img.src;
@@ -4827,36 +4836,18 @@
4827
4836
  finalWidth = maxHeight * aspectRatio;
4828
4837
  }
4829
4838
  // Set initial position and size (same as original image)
4830
- enlargedImg.style.cssText = `
4831
- position: fixed;
4832
- top: ${imgRect.top}px;
4833
- left: ${imgRect.left}px;
4834
- width: ${imgRect.width}px;
4835
- height: ${imgRect.height}px;
4836
- transition: all ${attrs.inDuration || 275}ms ease;
4837
- cursor: zoom-out;
4838
- max-width: none;
4839
- z-index: 1001;
4840
- `;
4839
+ enlargedImg.style.top = `${imgRect.top}px`;
4840
+ enlargedImg.style.left = `${imgRect.left}px`;
4841
+ enlargedImg.style.width = `${imgRect.width}px`;
4842
+ enlargedImg.style.height = `${imgRect.height}px`;
4843
+ enlargedImg.style.transition = `all ${inDuration}ms ease`;
4841
4844
  // Add caption if provided
4842
4845
  let caption = null;
4843
4846
  if (attrs.caption) {
4844
4847
  caption = document.createElement('div');
4845
4848
  caption.className = 'materialbox-caption';
4846
4849
  caption.textContent = attrs.caption;
4847
- caption.style.cssText = `
4848
- position: fixed;
4849
- bottom: 20px;
4850
- left: 50%;
4851
- transform: translateX(-50%);
4852
- color: white;
4853
- font-size: 16px;
4854
- text-align: center;
4855
- opacity: 0;
4856
- transition: opacity ${attrs.inDuration || 275}ms ease ${attrs.inDuration || 275}ms;
4857
- z-index: 1002;
4858
- pointer-events: none;
4859
- `;
4850
+ caption.style.transition = `opacity ${inDuration}ms ease ${inDuration}ms`;
4860
4851
  }
4861
4852
  // Add to DOM
4862
4853
  document.body.appendChild(overlay);
@@ -4891,7 +4882,7 @@
4891
4882
  setTimeout(() => {
4892
4883
  if (attrs.onOpenEnd)
4893
4884
  attrs.onOpenEnd();
4894
- }, attrs.inDuration || 275);
4885
+ }, inDuration);
4895
4886
  };
4896
4887
  const closeBox = (attrs) => {
4897
4888
  if (!state.isOpen || !state.originalImage || !state.overlay || !state.overlayImage)
@@ -4948,8 +4939,14 @@
4948
4939
  },
4949
4940
  view: ({ attrs }) => {
4950
4941
  const { src, alt, width, height, caption, className, style } = attrs, otherAttrs = __rest(attrs, ["src", "alt", "width", "height", "caption", "className", "style"]);
4942
+ // Build style attribute - handle both string and object styles
4943
+ let imgStyle = style || {};
4944
+ if (typeof style !== 'string') {
4945
+ // If style is an object or undefined, add default styles as object
4946
+ imgStyle = Object.assign({ cursor: 'zoom-in', transition: 'opacity 200ms ease' }, (style || {}));
4947
+ }
4951
4948
  return m('img.materialboxed', Object.assign(Object.assign({}, otherAttrs), { src, alt: alt || '', width,
4952
- height, className: ['materialboxed', className].filter(Boolean).join(' ') || undefined, style: Object.assign({ cursor: 'zoom-in', transition: 'opacity 200ms ease' }, style), onclick: (e) => {
4949
+ height, className: ['materialboxed', className].filter(Boolean).join(' ') || undefined, style: imgStyle, onclick: (e) => {
4953
4950
  e.preventDefault();
4954
4951
  openBox(e.target, attrs);
4955
4952
  } }));
@@ -5279,6 +5276,11 @@
5279
5276
  };
5280
5277
  };
5281
5278
 
5279
+ const defaultI18n$2 = {
5280
+ cancel: 'Cancel',
5281
+ clear: 'Clear',
5282
+ done: 'Ok',
5283
+ };
5282
5284
  const defaultOptions = {
5283
5285
  dialRadius: 135,
5284
5286
  outerRadius: 105,
@@ -5289,11 +5291,7 @@
5289
5291
  defaultTime: 'now',
5290
5292
  fromNow: 0,
5291
5293
  showClearBtn: false,
5292
- i18n: {
5293
- cancel: 'Cancel',
5294
- clear: 'Clear',
5295
- done: 'Ok',
5296
- },
5294
+ i18n: defaultI18n$2,
5297
5295
  autoClose: false,
5298
5296
  twelveHour: true,
5299
5297
  vibrate: true,
@@ -5443,7 +5441,7 @@
5443
5441
  state.hours = hours;
5444
5442
  state.minutes = minutes;
5445
5443
  if (state.spanHours) {
5446
- state.spanHours.innerHTML = state.hours.toString();
5444
+ state.spanHours.innerHTML = addLeadingZero(state.hours);
5447
5445
  }
5448
5446
  if (state.spanMinutes) {
5449
5447
  state.spanMinutes.innerHTML = addLeadingZero(state.minutes);
@@ -5551,7 +5549,7 @@
5551
5549
  }
5552
5550
  state[state.currentView] = value;
5553
5551
  if (isHours && state.spanHours) {
5554
- state.spanHours.innerHTML = value.toString();
5552
+ state.spanHours.innerHTML = addLeadingZero(value);
5555
5553
  }
5556
5554
  else if (!isHours && state.spanMinutes) {
5557
5555
  state.spanMinutes.innerHTML = addLeadingZero(value);
@@ -5685,7 +5683,7 @@
5685
5683
  const TimepickerModal = () => {
5686
5684
  return {
5687
5685
  view: ({ attrs }) => {
5688
- const { showClearBtn, clearLabel, closeLabel, doneLabel } = attrs;
5686
+ const { i18n, showClearBtn } = attrs;
5689
5687
  return [
5690
5688
  m('.modal-content.timepicker-container', [
5691
5689
  m('.timepicker-digital-display', [
@@ -5697,7 +5695,7 @@
5697
5695
  oncreate: (vnode) => {
5698
5696
  state.spanHours = vnode.dom;
5699
5697
  },
5700
- }, state.hours.toString()),
5698
+ }, addLeadingZero(state.hours)),
5701
5699
  ':',
5702
5700
  m('span.timepicker-span-minutes', {
5703
5701
  class: state.currentView === 'minutes' ? 'text-primary' : '',
@@ -5777,18 +5775,18 @@
5777
5775
  tabindex: options.twelveHour ? '3' : '1',
5778
5776
  style: showClearBtn ? '' : 'visibility: hidden;',
5779
5777
  onclick: () => clear(),
5780
- }, clearLabel),
5778
+ }, i18n.clear),
5781
5779
  m('.confirmation-btns', [
5782
5780
  m('button.btn-flat.timepicker-close.waves-effect', {
5783
5781
  type: 'button',
5784
5782
  tabindex: options.twelveHour ? '3' : '1',
5785
5783
  onclick: () => close(),
5786
- }, closeLabel),
5784
+ }, i18n.cancel),
5787
5785
  m('button.btn-flat.timepicker-close.waves-effect', {
5788
5786
  type: 'button',
5789
5787
  tabindex: options.twelveHour ? '3' : '1',
5790
5788
  onclick: () => done(),
5791
- }, doneLabel),
5789
+ }, i18n.done),
5792
5790
  ]),
5793
5791
  ]),
5794
5792
  ]),
@@ -5805,7 +5803,6 @@
5805
5803
  }
5806
5804
  };
5807
5805
  const renderPickerToPortal = (attrs) => {
5808
- const { showClearBtn = false, clearLabel = 'Clear', closeLabel = 'Cancel' } = attrs;
5809
5806
  const pickerModal = m('.timepicker-modal-wrapper', {
5810
5807
  style: {
5811
5808
  position: 'fixed',
@@ -5848,10 +5845,8 @@
5848
5845
  },
5849
5846
  }, [
5850
5847
  m(TimepickerModal, {
5851
- showClearBtn,
5852
- clearLabel,
5853
- closeLabel,
5854
- doneLabel: 'OK',
5848
+ i18n: options.i18n,
5849
+ showClearBtn: options.showClearBtn,
5855
5850
  }),
5856
5851
  ]),
5857
5852
  ]);
@@ -5911,7 +5906,7 @@
5911
5906
  }
5912
5907
  },
5913
5908
  view: ({ attrs }) => {
5914
- const { id = state.id, label, placeholder, disabled, readonly, required, iconName, helperText, onchange, oninput, useModal = true, showClearBtn = false, clearLabel = 'Clear', closeLabel = 'Cancel', twelveHour, className: cn1, class: cn2, } = attrs;
5909
+ const { id = state.id, label, placeholder, disabled, readonly, required, iconName, helperText, onchange, oninput, useModal = true, twelveHour, className: cn1, class: cn2, } = attrs;
5915
5910
  const className = cn1 || cn2 || 'col s12';
5916
5911
  // Format time value for display
5917
5912
  const formatTime = (hours, minutes, use12Hour) => {
@@ -6357,7 +6352,7 @@
6357
6352
  // Render ungrouped options first
6358
6353
  attrs.options
6359
6354
  .filter((option) => !option.group)
6360
- .map((option) => m('li', Object.assign({ class: option.disabled ? 'disabled' : state.focusedIndex === attrs.options.indexOf(option) ? 'focused' : '' }, (option.disabled
6355
+ .map((option) => m('li', Object.assign({ class: `${option.disabled ? 'disabled' : ''}${isSelected(option.id, selectedIds) ? ' selected' : ''}${state.focusedIndex === attrs.options.indexOf(option) ? ' focused' : ''}` }, (option.disabled
6361
6356
  ? {}
6362
6357
  : {
6363
6358
  onclick: () => {
@@ -33,6 +33,6 @@ export interface MaterialBoxAttrs extends MaterialBoxOptions, Attributes {
33
33
  }
34
34
  /**
35
35
  * Pure TypeScript MaterialBox - creates an image lightbox that fills the screen when clicked
36
- * No MaterializeCSS dependencies
36
+ * Uses CSS classes from _materialbox.scss
37
37
  */
38
38
  export declare const MaterialBox: FactoryComponent<MaterialBoxAttrs>;
package/dist/pickers.css CHANGED
@@ -371,6 +371,8 @@
371
371
  background-color: #26a69a;
372
372
  padding: 10px;
373
373
  font-weight: 300;
374
+ min-width: 200px;
375
+ position: relative;
374
376
  }
375
377
 
376
378
  .timepicker-text-container {
@@ -381,6 +383,8 @@
381
383
  font-weight: 400;
382
384
  position: relative;
383
385
  user-select: none;
386
+ min-width: 180px;
387
+ width: 100%;
384
388
  }
385
389
 
386
390
  .timepicker-span-hours,
@@ -391,10 +395,16 @@
391
395
 
392
396
  .timepicker-span-hours {
393
397
  margin-right: 3px;
398
+ display: inline-block;
399
+ min-width: 2ch;
400
+ text-align: right;
394
401
  }
395
402
 
396
403
  .timepicker-span-minutes {
397
404
  margin-left: 3px;
405
+ display: inline-block;
406
+ min-width: 2ch;
407
+ text-align: left;
398
408
  }
399
409
 
400
410
  .timepicker-display-am-pm {
@@ -32,10 +32,6 @@ export interface TimePickerAttrs extends InputAttrs<string>, TimepickerOptions {
32
32
  useModal?: boolean;
33
33
  /** Allow format toggle between 12h/24h (for inline mode) */
34
34
  allowFormatToggle?: boolean;
35
- /** Clear button label */
36
- clearLabel?: string;
37
- /** Close button label */
38
- closeLabel?: string;
39
35
  }
40
36
  /**
41
37
  * TimePicker component based on original Materialize CSS timepicker
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mithril-materialized",
3
- "version": "3.5.9",
3
+ "version": "3.5.10",
4
4
  "description": "A materialize library for mithril.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -26,8 +26,7 @@
26
26
  "./pickers.css": "./dist/pickers.css",
27
27
  "./advanced.css": "./dist/advanced.css",
28
28
  "./utilities.css": "./dist/utilities.css",
29
- "./sass/*": "./sass/*",
30
- "./src/*": "./src/*"
29
+ "./sass/*": "./sass/*"
31
30
  },
32
31
  "sideEffects": false,
33
32
  "files": [
@@ -2,42 +2,95 @@
2
2
  @use "global";
3
3
 
4
4
  .collapsible {
5
- border-top: 1px solid var(--mm-border-color, variables.$collapsible-border-color);
6
- border-right: 1px solid var(--mm-border-color, variables.$collapsible-border-color);
7
- border-left: 1px solid var(--mm-border-color, variables.$collapsible-border-color);
5
+ border: 1px solid var(--mm-border-color, variables.$collection-border-color);
6
+ background-color: var(--mm-surface-color, variables.$collection-bg-color);
8
7
  margin: variables.$element-top-margin 0 variables.$element-bottom-margin 0;
9
- @extend .z-depth-1 !optional;
10
- }
8
+ overflow: hidden;
11
9
 
12
- .collapsible-header {
13
- &:focus {
14
- outline: 0
10
+ li {
11
+ list-style-type: none;
15
12
  }
13
+ }
16
14
 
15
+ // Main header (top-level header for the whole collapsible)
16
+ .collapsible-main-header {
17
+ background-color: var(--mm-surface-color, variables.$collection-bg-color);
18
+ border-bottom: 1px solid var(--mm-border-color, variables.$collection-border-color);
19
+ padding: 10px 20px;
20
+ // Don't override h4 styling - let it use default typography
21
+ // This ensures consistent height with Collection headers
22
+ }
23
+
24
+ // Item header (collapsible item header)
25
+ .collapsible-header {
17
26
  display: flex;
27
+ align-items: center;
28
+ justify-content: flex-start;
29
+ min-height: 3rem;
30
+ line-height: 1.5rem;
31
+ padding: 1rem;
32
+ background-color: var(--mm-surface-color, variables.$collection-bg-color);
33
+ border-bottom: 1px solid var(--mm-border-color, variables.$collection-border-color);
18
34
  cursor: pointer;
19
35
  -webkit-tap-highlight-color: transparent;
20
- line-height: 1.5;
21
- padding: 1rem;
22
- border-bottom: 1px solid var(--mm-border-color, variables.$collapsible-border-color);
36
+ transition: background-color .25s;
37
+
38
+ &:hover {
39
+ background-color: var(--mm-row-hover, variables.$collection-hover-bg-color);
40
+ }
41
+
42
+ &:focus {
43
+ outline: 0;
44
+ }
23
45
 
24
- i {
46
+ i.material-icons {
25
47
  width: 2rem;
26
48
  font-size: 1.6rem;
27
- display: inline-block;
28
- text-align: center;
49
+ line-height: 1.5rem;
50
+ display: block;
51
+ flex-shrink: 0;
29
52
  margin-right: 1rem;
30
53
  }
54
+
55
+ // Wrapper for header content - takes remaining space
56
+ .collapsible-header-text,
57
+ .collapsible-header-content {
58
+ flex: 1;
59
+ display: flex;
60
+ align-items: center;
61
+ gap: 1rem;
62
+ }
31
63
  }
64
+
32
65
  .keyboard-focused .collapsible-header:focus {
33
- background-color: var(--mm-border-color, rgba(0, 0, 0, 0.05));
66
+ background-color: var(--mm-row-hover, variables.$collection-hover-bg-color);
34
67
  }
35
68
 
36
69
  .collapsible-body {
37
70
  display: none;
38
- border-bottom: 1px solid var(--mm-border-color, variables.$collapsible-border-color);
71
+ border-bottom: 1px solid var(--mm-border-color, variables.$collection-border-color);
72
+ background-color: var(--mm-surface-color, variables.$collection-bg-color);
39
73
  box-sizing: border-box;
40
74
  padding: 2rem;
75
+
76
+ // Remove bottom border from last item
77
+ li:last-child & {
78
+ border-bottom: none;
79
+ }
80
+ }
81
+
82
+ // Active state
83
+ li.active {
84
+ .collapsible-body {
85
+ display: block;
86
+ }
87
+ }
88
+
89
+ // Collapsible with header
90
+ .collapsible.with-header {
91
+ .collapsible-main-header:first-child {
92
+ border-top: none;
93
+ }
41
94
  }
42
95
 
43
96
  // Sidenav collapsible styling
@@ -65,7 +118,7 @@
65
118
  .collapsible-body {
66
119
  border: 0;
67
120
  background-color: var(--mm-surface-color, variables.$collapsible-header-color);
68
- color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
121
+ color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
69
122
 
70
123
  li a {
71
124
  padding: 0 (7.5px + variables.$sidenav-padding)
@@ -93,7 +93,7 @@
93
93
  transition: background-color 0.2s ease;
94
94
 
95
95
  &:hover {
96
- background-color: var(--mm-dropdown-hover);
96
+ background-color: var(--mm-row-hover);
97
97
  }
98
98
 
99
99
  .sort-indicators {
@@ -147,27 +147,27 @@
147
147
  cursor: pointer;
148
148
 
149
149
  &:hover {
150
- background-color: var(--mm-dropdown-hover);
150
+ background-color: var(--mm-row-hover);
151
151
 
152
152
  td {
153
- background-color: var(--mm-dropdown-hover);
153
+ background-color: var(--mm-row-hover);
154
154
  }
155
155
  }
156
156
  }
157
157
 
158
158
  // Enhanced striped rows for dark theme
159
159
  &.striped tbody tr:nth-child(odd) {
160
- background-color: var(--mm-dropdown-focus);
160
+ background-color: var(--mm-row-stripe, var(--mm-table-striped-color));
161
161
 
162
162
  td {
163
- background-color: var(--mm-dropdown-focus);
163
+ background-color: var(--mm-row-stripe, var(--mm-table-striped-color));
164
164
  }
165
165
 
166
166
  &:hover {
167
- background-color: var(--mm-dropdown-hover);
167
+ background-color: var(--mm-row-hover);
168
168
 
169
169
  td {
170
- background-color: var(--mm-dropdown-hover);
170
+ background-color: var(--mm-row-hover);
171
171
  }
172
172
  }
173
173
  }
@@ -364,18 +364,6 @@
364
364
  @media (prefers-color-scheme: dark) {
365
365
  :root:not([data-theme]) .datatable-container,
366
366
  [data-theme="dark"] .datatable-container {
367
- .datatable thead th.sortable:hover {
368
- background-color: var(--mm-dropdown-hover);
369
- }
370
-
371
- .datatable tbody tr:hover {
372
- background-color: var(--mm-dropdown-hover);
373
- }
374
-
375
- .datatable.striped tbody tr:nth-child(odd) {
376
- background-color: variables.$table-striped-color;
377
- }
378
-
379
367
  .datatable.fixed-header thead th {
380
368
  border-bottom: 1px solid var(--mm-border-color);
381
369
  }
@@ -16,28 +16,37 @@
16
16
  }
17
17
  }
18
18
 
19
- #materialbox-overlay {
20
- position:fixed;
19
+ .materialbox-overlay {
20
+ position: fixed;
21
21
  top: 0;
22
+ left: 0;
22
23
  right: 0;
23
24
  bottom: 0;
24
- left: 0;
25
- background-color: #292929;
25
+ background-color: rgba(0, 0, 0, 0.85);
26
26
  z-index: 1000;
27
+ opacity: 0;
28
+ cursor: zoom-out;
27
29
  will-change: opacity;
28
30
  }
29
31
 
32
+ .materialbox-image {
33
+ position: fixed;
34
+ cursor: zoom-out;
35
+ max-width: none;
36
+ z-index: 1001;
37
+ will-change: top, left, width, height;
38
+ }
39
+
30
40
  .materialbox-caption {
31
41
  position: fixed;
32
- display: none;
33
- color: #fff;
34
- line-height: 50px;
35
- bottom: 0;
36
- left: 0;
37
- width: 100%;
42
+ bottom: 20px;
43
+ left: 50%;
44
+ transform: translateX(-50%);
45
+ color: white;
46
+ font-size: 16px;
38
47
  text-align: center;
39
- padding: 0% 15%;
40
- height: 50px;
41
- z-index: 1000;
48
+ opacity: 0;
49
+ z-index: 1002;
50
+ pointer-events: none;
42
51
  -webkit-font-smoothing: antialiased;
43
- }
52
+ }