@likable-hair/svelte 0.0.62 → 0.0.64

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 (45) hide show
  1. package/buttons/Button.svelte +1 -1
  2. package/common/Card.svelte +1 -1
  3. package/common/Gesture.svelte +1 -1
  4. package/common/MediaQuery.svelte +1 -1
  5. package/common/Menu.svelte +10 -1
  6. package/common/SimpleTable.svelte +8 -4
  7. package/common/SimpleTable.svelte.d.ts +1 -0
  8. package/dates/Calendar.svelte +1 -1
  9. package/dates/DatePicker.svelte +1 -1
  10. package/dates/MonthSelector.svelte +1 -1
  11. package/dates/TimePickerTextField.svelte +1 -1
  12. package/dates/YearSelector.svelte +1 -1
  13. package/dialogs/Dialog.svelte +1 -1
  14. package/forms/Autocomplete.svelte +8 -3
  15. package/forms/Checkbox.svelte +1 -1
  16. package/forms/FileInput.svelte +1 -1
  17. package/forms/FileInputList.svelte +1 -1
  18. package/forms/Switch.svelte +1 -1
  19. package/forms/Textarea.svelte +1 -1
  20. package/forms/Textfield.svelte +2 -2
  21. package/forms/VerticalSwitch.svelte +1 -1
  22. package/forms/VerticalTextSwitch.svelte +1 -1
  23. package/loaders/CircularLoader.svelte +1 -1
  24. package/loaders/Skeleton.svelte +2 -2
  25. package/media/AttachmentDownloader.svelte +1 -1
  26. package/media/Avatar.svelte +1 -1
  27. package/media/Carousel.svelte +1 -1
  28. package/media/DescriptiveAvatar.svelte +1 -1
  29. package/media/Gallery.svelte +1 -1
  30. package/media/Icon.svelte +1 -1
  31. package/media/Image.svelte +1 -1
  32. package/media/ImageGrid.svelte +2 -2
  33. package/navigation/Breadcrumb.svelte +2 -2
  34. package/navigation/Chip.svelte +1 -1
  35. package/navigation/Drawer.svelte +1 -1
  36. package/navigation/HeaderMenu.svelte +1 -1
  37. package/navigation/Navigator.svelte +2 -2
  38. package/navigation/TabSwitcher.svelte +2 -2
  39. package/package.json +5 -4
  40. package/progress/ProgressBar.svelte +1 -1
  41. package/shop/ProductCard.svelte +1 -1
  42. package/shop/ProductsGrid.svelte +1 -1
  43. package/stores/mediaQuery.js +1 -1
  44. package/timeline/ScrollTimeLine.svelte +2 -2
  45. package/timeline/SimpleTimeLine.svelte +2 -2
@@ -1,4 +1,4 @@
1
- <script >export let type = 'default', active = false, loading = false, icon = undefined, iconSize = 15, clazz = '', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined, textAlign = "center", cursor = "pointer", padding = "5px", fontSize = undefined, color = undefined, display = undefined, justifyContent = undefined, alignItems = undefined, backgroundColor = undefined, hoverBackgroundColor = '#88888847', activeBackgroundColor = hoverBackgroundColor, borderRadius = undefined, border = undefined, boxShadow = undefined, loaderHeight = undefined, loaderWidth = undefined, disabled = false;
1
+ <script>export let type = 'default', active = false, loading = false, icon = undefined, iconSize = 15, clazz = '', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined, textAlign = "center", cursor = "pointer", padding = "5px", fontSize = undefined, color = undefined, display = undefined, justifyContent = undefined, alignItems = undefined, backgroundColor = undefined, hoverBackgroundColor = '#88888847', activeBackgroundColor = hoverBackgroundColor, borderRadius = undefined, border = undefined, boxShadow = undefined, loaderHeight = undefined, loaderWidth = undefined, disabled = false;
2
2
  export { clazz as class };
3
3
  import { createEventDispatcher } from 'svelte';
4
4
  const dispatch = createEventDispatcher();
@@ -1,4 +1,4 @@
1
- <script >export let outlined = false, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined, padding = "5px", borderRadius = "5px", backgroundColor = "rgb(252, 252, 252)", color = undefined, borderColor = undefined, borderWidth = undefined, marginBottom = undefined, marginTop = undefined, marginLeft = undefined, marginRight = undefined, boxShadow = "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
1
+ <script>export let outlined = false, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined, padding = "5px", borderRadius = "5px", backgroundColor = "rgb(252, 252, 252)", color = undefined, borderColor = undefined, borderWidth = undefined, marginBottom = undefined, marginTop = undefined, marginLeft = undefined, marginRight = undefined, boxShadow = "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
2
2
  </script>
3
3
 
4
4
  <div
@@ -1,4 +1,4 @@
1
- <script >import { createEventDispatcher } from 'svelte';
1
+ <script>import { createEventDispatcher } from 'svelte';
2
2
  const dispatch = createEventDispatcher();
3
3
  // TODO export the handler into a service to avoid mount 3 listeners for every component instance
4
4
  export let timeThreshold = 200, diagonalThreshold = 100;
@@ -1,4 +1,4 @@
1
- <script >import mediaQuery from "../stores/mediaQuery";
1
+ <script>import mediaQuery from "../stores/mediaQuery";
2
2
  $: xsAndDown = $mediaQuery.xs;
3
3
  $: sAndDown = $mediaQuery.s || $mediaQuery.xs;
4
4
  $: mAndDown = $mediaQuery.s || $mediaQuery.xs || $mediaQuery.m;
@@ -1,4 +1,4 @@
1
- <script >import { v4 as uuidv4 } from 'uuid';
1
+ <script>import { v4 as uuidv4 } from 'uuid';
2
2
  import { fly } from 'svelte/transition';
3
3
  export let open = false, top = undefined, left = undefined, width, height, maxHeight = undefined, overflow = "auto", refreshPosition = false, boxShadow = undefined, borderRadius = undefined, activator = undefined, anchor = 'bottom', closeOnClickOutside = false, inAnimation = fly, inAnimationConfig = {
4
4
  duration: 100,
@@ -69,14 +69,23 @@ $: if (closeOnClickOutside && !!menuElement) {
69
69
  window.addEventListener('click', (event) => {
70
70
  open = false;
71
71
  });
72
+ window.addEventListener('touchstart', (event) => {
73
+ open = false;
74
+ });
72
75
  if (!!activator) {
73
76
  activator.addEventListener('click', (event) => {
74
77
  event.stopPropagation();
75
78
  });
79
+ activator.addEventListener('touchstart', (event) => {
80
+ event.stopPropagation();
81
+ });
76
82
  }
77
83
  menuElement.addEventListener('click', (event) => {
78
84
  event.stopPropagation();
79
85
  });
86
+ menuElement.addEventListener('touchstart', (event) => {
87
+ event.stopPropagation();
88
+ });
80
89
  }
81
90
  </script>
82
91
 
@@ -1,7 +1,7 @@
1
- <script context="module" ></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { dateToString } from "../dates/utils";
4
- export let headers = undefined, items = undefined, backgroundColor = "rgba(255,255,255,0)", headerColor = "rgba(0,0,0,0.05)", rowSeparatorColor = headerColor, headerHeight = "30px", rowHeight = "70px", minWidth = undefined, height = "100%", width = "100%";
3
+ <script>import { dateToString } from "../dates/utils";
4
+ export let headers = undefined, items = undefined, backgroundColor = "rgba(255,255,255,0)", headerColor = "rgba(0,0,0,0.05)", rowSeparatorColor = headerColor, headerHeight = "30px", headerBorderRadius = "5px", rowHeight = "70px", minWidth = undefined, height = "100%", width = "100%";
5
5
  </script>
6
6
 
7
7
  {#if !!items && Array.isArray(items)}
@@ -11,7 +11,11 @@ export let headers = undefined, items = undefined, backgroundColor = "rgba(255,2
11
11
  style:width="100%"
12
12
  style:min-width={minWidth}
13
13
  >
14
- <thead style:background-color={headerColor} style:height={headerHeight}>
14
+ <thead
15
+ style:background-color={headerColor}
16
+ style:height={headerHeight}
17
+ style:border-radius={headerBorderRadius}
18
+ >
15
19
  {#each headers as head}
16
20
  <th style:width={head.width} style:min-width={head.minWidth}>
17
21
  {head.label}
@@ -19,6 +19,7 @@ declare const __propDef: {
19
19
  headerColor?: string;
20
20
  rowSeparatorColor?: string;
21
21
  headerHeight?: string;
22
+ headerBorderRadius?: string;
22
23
  rowHeight?: string;
23
24
  minWidth?: string;
24
25
  height?: string;
@@ -1,4 +1,4 @@
1
- <script >import { onMount } from 'svelte';
1
+ <script>import { onMount } from 'svelte';
2
2
  import { fly } from 'svelte/transition';
3
3
  import { getDateRowsStats, getDaysNames } from './utils';
4
4
  export let selectedDate = undefined, visibleMonth = new Date().getMonth(), visibleYear = new Date().getFullYear(), locale = 'it', showExtraMonthDays = true, showHeader = true, height = "100%", width = "100%", dayWidth = '30px', dayHeight = '30px', dayHoverColor = '#c9c8c873', daySelectedColor = '#adadad', selectedTextColor = "black", gridGap = "1px", dayBackgroundColor = undefined, animationDuration = 200;
@@ -1,4 +1,4 @@
1
- <script >import { getMonthName, dateToString } from "./utils";
1
+ <script>import { getMonthName, dateToString } from "./utils";
2
2
  import YearSelector from "./YearSelector.svelte";
3
3
  import MonthSelector from "./MonthSelector.svelte";
4
4
  import Calendar from "./Calendar.svelte";
@@ -1,4 +1,4 @@
1
- <script >import { getMonthName } from './utils';
1
+ <script>import { getMonthName } from './utils';
2
2
  export let selectedMonth = undefined, locale = 'it', height = "100%", width = "100%", monthSelectedColor = '#adadad', monthSelectedTextColor = '#21a';
3
3
  import { createEventDispatcher } from 'svelte';
4
4
  const dispatch = createEventDispatcher();
@@ -1,4 +1,4 @@
1
- <script >import Textfield from "../forms/Textfield.svelte";
1
+ <script>import Textfield from "../forms/Textfield.svelte";
2
2
  import VerticalTextSwitch from "../forms/VerticalTextSwitch.svelte";
3
3
  import "./DatePicker.svelte";
4
4
  export let hourFormat = "24", dayPeriod = "am", time = undefined, text = "", fieldSeparator = ":", placeholder = "Insert time...", focusedBoxShadow = "#C0D6FF 0px 2px 10px", borderColor = "", borderWeight = "1px", fontSize = "16px", width = "100%";
@@ -1,4 +1,4 @@
1
- <script >import { scrollAtCenter } from "../common/scroller";
1
+ <script>import { scrollAtCenter } from "../common/scroller";
2
2
  import { createEventDispatcher, onMount } from 'svelte';
3
3
  export let selectedYear = undefined, selectableYears = [...Array(150).keys()].map(i => i + (new Date().getFullYear() - 75)), height = "100%", width = "100%";
4
4
  let container, targetButtons = {};
@@ -1,4 +1,4 @@
1
- <script >import { browser } from "$app/env";
1
+ <script>import { browser } from "$app/environment";
2
2
  import { beforeUpdate } from "svelte";
3
3
  export let open = false, overlayOpacity = "30%", overlayColor = "#282828";
4
4
  let zIndex = 50, localOpen = open;
@@ -1,6 +1,6 @@
1
- <script context="module" ></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >export let values = [], items, searchFunction = undefined, multiple = false, disabled = false, width = "auto", height = "auto", maxWidth = undefined,
3
+ <script>export let values = [], items, searchFunction = undefined, multiple = false, disabled = false, width = "auto", height = "auto", maxWidth = undefined,
4
4
  // textfield
5
5
  textFieldLabel = "", textFieldPlaceholder = "", textFieldColor = null, textFieldVariant = 'boxed', textFieldMaxWidth = "min(100px, 90%)", textFieldMinWidth = undefined, textFieldHeight = "auto", textFieldTextColor = "black", textFieldBorderWeight = "2px", textFieldBorderRadius = "5px", textFieldBorderColor = null, textFieldFocusBorderColor = null, textFieldFocusedBoxShadow = undefined, textFieldBackgroundColor = null, textFieldPadding = undefined, textFieldPaddingLeft = undefined, textFieldPaddingRight = undefined, textFieldPaddingBottom = undefined, textFieldPaddingTop = undefined, textFieldFontSize = undefined,
6
6
  // menu
@@ -66,8 +66,13 @@ function handleWindowKeyDown(event) {
66
66
  }
67
67
  let input;
68
68
  function handleContainerClick() {
69
- if (!menuOpened)
69
+ if (!menuOpened) {
70
70
  input.focus();
71
+ // had to timeout because it was catching click outside
72
+ setTimeout(() => {
73
+ openMenu();
74
+ }, 50);
75
+ }
71
76
  }
72
77
  let searchText, filteredItems = items;
73
78
  $: if (!!searchText) {
@@ -1,4 +1,4 @@
1
- <script >export let value = false, id = undefined, disabled = false, activeColor = "#275efe", activeInnerColor = "#fff", focusShadow = "2px rgba(39, 94, 254, 0.3)", borderColor = "#bbc1e1", borderHoverColor = "#275efe", backgroundColor = "#fff", disabledColor = "#f6f8ff", disabledInnerColor = "#e1e6f9";
1
+ <script>export let value = false, id = undefined, disabled = false, activeColor = "#275efe", activeInnerColor = "#fff", focusShadow = "2px rgba(39, 94, 254, 0.3)", borderColor = "#bbc1e1", borderHoverColor = "#275efe", backgroundColor = "#fff", disabledColor = "#f6f8ff", disabledInnerColor = "#e1e6f9";
2
2
  </script>
3
3
 
4
4
  <input
@@ -1,4 +1,4 @@
1
- <script >import { createEventDispatcher } from 'svelte';
1
+ <script>import { createEventDispatcher } from 'svelte';
2
2
  export let files = undefined, persistOverUpload = true, height = "100%", width = "100%", backgroundColor = "rgba(255,255,255,0)", textColor = "black", rounded = true, disabled = false, focusShadow = "inset 0 0 0 1px rgb(255 255 255/0.1), 0 0 #0000, 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
3
3
  let inputElement = undefined;
4
4
  let dropAreaActive = false;
@@ -1,4 +1,4 @@
1
- <script >import Button from "../buttons/Button.svelte";
1
+ <script>import Button from "../buttons/Button.svelte";
2
2
  import FileInput from "./FileInput.svelte";
3
3
  import Icon from "../media/Icon.svelte";
4
4
  export let files = undefined, persistOverUpload = true, height = "100%", width = "100%", backgroundColor = "rgba(255,255,255,0)", textColor = "rgba(0,0,0,0.7)", rounded = true, focusShadow = undefined, dropAreaActive = true, icon = "mdi-folder", iconSize = 30, selectedRowColor = "red", selectedRowBackground = "rgba(0,0,0,0.1)";
@@ -1,4 +1,4 @@
1
- <script >export let value = false, height = "20px", width = "40px", padding = "6px", borderRadius = "10px", toggleActiveColor = "#5c5c5c", toggleDeactiveColor = "#5c5c5c", backgroundActiveColor = "#e6e6e6", backgroundDeactiveColor = "#e6e6e6", animationDuration = "0.1s";
1
+ <script>export let value = false, height = "20px", width = "40px", padding = "6px", borderRadius = "10px", toggleActiveColor = "#5c5c5c", toggleDeactiveColor = "#5c5c5c", backgroundActiveColor = "#e6e6e6", backgroundDeactiveColor = "#e6e6e6", animationDuration = "0.1s";
2
2
  </script>
3
3
 
4
4
  <div
@@ -1,4 +1,4 @@
1
- <script >import { v4 as uuidv4 } from 'uuid';
1
+ <script>import { v4 as uuidv4 } from 'uuid';
2
2
  export let label = null, placeholder = "placeholder", textAreaId = uuidv4(), fontFamily = "inherit", value = "", resizable = true, disabled = false, readOnly = false, maxLength = undefined, textColor = "black", border = "none", borderRadius = "5px", focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, labelFontSize = undefined, labelColor = undefined, width = "100%", height = "100%";
3
3
  </script>
4
4
 
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', readonly = false, inputElement = undefined;
3
+ <script>export let label = "", placeholder = "", color = null, value = "", disabled = false, variant = 'outlined', width = "100%", height = "50px", maxWidth = undefined, minWidth = undefined, textColor = "black", borderWeight = "2px", borderRadius = "5px", borderColor = null, focusBorderColor = null, focusedBoxShadow = undefined, backgroundColor = null, padding = undefined, paddingLeft = undefined, paddingRight = undefined, paddingBottom = undefined, paddingTop = undefined, fontSize = undefined, type = 'text', readonly = false, inputElement = undefined;
4
4
  import { v4 as uuidv4 } from 'uuid';
5
5
  import { onMount } from 'svelte';
6
6
  let inputId = uuidv4(), focused = false, legendWidth = 0, labelElement = undefined;
@@ -1,4 +1,4 @@
1
- <script >export let value = false, height = "60px", width = "30px", rounded = false, backgroundColor = "#90CAF9", selectedOptionColor = backgroundColor, sliderColor = "white", optionColor = sliderColor, fontSize = "11px", animationDuration = "0.1s";
1
+ <script>export let value = false, height = "60px", width = "30px", rounded = false, backgroundColor = "#90CAF9", selectedOptionColor = backgroundColor, sliderColor = "white", optionColor = sliderColor, fontSize = "11px", animationDuration = "0.1s";
2
2
  </script>
3
3
 
4
4
  <div
@@ -1,4 +1,4 @@
1
- <script >import { fly } from 'svelte/transition';
1
+ <script>import { fly } from 'svelte/transition';
2
2
  export let value = false, height = "100%", width = "100%", backgroundColor = undefined, firstColor = undefined, secondColor = firstColor, fontSize = "12px", hoverBackgroundColor = undefined, hoverBoxShadow = undefined, animationDuration = 200;
3
3
  let optionHeight = undefined;
4
4
  </script>
@@ -1,4 +1,4 @@
1
- <script >export let loading = true, height = "30px", width = "30px", color = "black";
1
+ <script>export let loading = true, height = "30px", width = "30px", color = "black";
2
2
  </script>
3
3
 
4
4
  <svg
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >export let sections = [], maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = "100%", height = "100%", padding = '10px', dark = false;
3
+ <script>export let sections = [], maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = "100%", height = "100%", padding = '10px', dark = false;
4
4
  $: widthLessPadding = `calc(${width} - (${padding} * 2))`;
5
5
  $: heightLessPadding = `calc(${height} - (${padding} * 2))`;
6
6
  $: maxWidthLessPadding = `calc(${maxWidth} - (${padding} * 2))`;
@@ -1,4 +1,4 @@
1
- <script >export let title = undefined, description = undefined, borderColor = "#B8B8B8", iconColor = "#8D8D8D", borderWidth = '1px', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined;
1
+ <script>export let title = undefined, description = undefined, borderColor = "#B8B8B8", iconColor = "#8D8D8D", borderWidth = '1px', maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = 'fit-content', height = undefined;
2
2
  import Icon from './Icon.svelte';
3
3
  import Card from '../common/Card.svelte';
4
4
  </script>
@@ -1,4 +1,4 @@
1
- <script >export let src, alt = "", width = "40px", maxWidth = undefined, minWidth = undefined, height = "40px", maxHeight = undefined, minHeight = undefined, lazyLoaded = false, referrerpolicy = "no-referrer", borderRadius = "50%";
1
+ <script>export let src, alt = "", width = "40px", maxWidth = undefined, minWidth = undefined, height = "40px", maxHeight = undefined, minHeight = undefined, lazyLoaded = false, referrerpolicy = "no-referrer", borderRadius = "50%";
2
2
  import Image from './Image.svelte';
3
3
  </script>
4
4
 
@@ -1,4 +1,4 @@
1
- <script >import { onMount } from 'svelte';
1
+ <script>import { onMount } from 'svelte';
2
2
  export let images = [], maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = "100%", height = "100%";
3
3
  let container, localWidth = '0px', localHeight = '0px';
4
4
  onMount(() => {
@@ -1,4 +1,4 @@
1
- <script >export let src, title = undefined, description = undefined, direction = 'row', reverse = false, avatarSpacing = '10px', width = undefined, maxWidth = undefined, minWidth = undefined, height = undefined, maxHeight = undefined, minHeight = undefined, lazyLoaded = false, borderRadius = "50%", referrerpolicy = "no-referrer";
1
+ <script>export let src, title = undefined, description = undefined, direction = 'row', reverse = false, avatarSpacing = '10px', width = undefined, maxWidth = undefined, minWidth = undefined, height = undefined, maxHeight = undefined, minHeight = undefined, lazyLoaded = false, borderRadius = "50%", referrerpolicy = "no-referrer";
2
2
  let textAlignment;
3
3
  $: if (direction == 'column') {
4
4
  textAlignment = 'center';
@@ -1,4 +1,4 @@
1
- <script >export let images = [], columns = undefined, imageMaxWidth = undefined, imageMinWidth = undefined, imageMaxHeight = undefined, imageMinHeight = undefined, imageHeight = undefined, imageWidth = undefined, disableHover = false, dark = false;
1
+ <script>export let images = [], columns = undefined, imageMaxWidth = undefined, imageMinWidth = undefined, imageMaxHeight = undefined, imageMinHeight = undefined, imageHeight = undefined, imageWidth = undefined, disableHover = false, dark = false;
2
2
  let selectedIndex = undefined, selectedImage = undefined;
3
3
  function handleImageClick(e) {
4
4
  selectedIndex = e.detail.index;
package/media/Icon.svelte CHANGED
@@ -1,4 +1,4 @@
1
- <script >export let name, size = 15, color = "", click = false;
1
+ <script>export let name, size = 15, color = "", click = false;
2
2
  let clazz = "";
3
3
  export { clazz as class };
4
4
  import "../common/materialDesign.css";
@@ -1,4 +1,4 @@
1
- <script >import { browser } from '$app/env';
1
+ <script>import { browser } from '$app/environment';
2
2
  export let maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined, borderRadius = undefined, src = undefined, title = undefined, description = undefined, dark = false, disableHover = false, showSkeletonLoader = true, imageCover = true, imageContain = false;
3
3
  const load = (src) => {
4
4
  return new Promise(async (resolve, reject) => {
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { createEventDispatcher } from 'svelte';
3
+ <script>import { createEventDispatcher } from 'svelte';
4
4
  export let images = [], columns = undefined, imageMaxWidth = undefined, imageMinWidth = undefined, imageMaxHeight = undefined, imageMinHeight = undefined, imageHeight = undefined, imageWidth = undefined, disableHover = false, dark = false;
5
5
  const dispatch = createEventDispatcher();
6
6
  function handleImageClick(image, index) {
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { createEventDispatcher } from 'svelte';
3
+ <script>import { createEventDispatcher } from 'svelte';
4
4
  const dispatch = createEventDispatcher();
5
5
  export let items = [], underliner = true, separatorIcon = 'mdi-chevron-right', separatorIconSize = 10, spacing = "20px";
6
6
  function handleLinkClick(item) {
@@ -1,4 +1,4 @@
1
- <script >import Icon from '../media/Icon.svelte';
1
+ <script>import Icon from '../media/Icon.svelte';
2
2
  import Button from '../buttons/Button.svelte';
3
3
  import { createEventDispatcher } from 'svelte';
4
4
  export let close = false, closeIcon = "mdi-close-circle", color = "blue", textColor = "white", disabled = false, filter = false, filterIcon = "mdi-check", label = false, outlined = false, size = 12;
@@ -1,4 +1,4 @@
1
- <script >import Navigator from './Navigator.svelte';
1
+ <script>import Navigator from './Navigator.svelte';
2
2
  export let open = false, position = 'left', space = '200px', openingSpeed = '0.3s', overlaySpeed = '0.2s', blockScroll = true, color = undefined, overlay = true, backgroundColor = undefined, overlayColor = '#282828', overlayOpacity = '30%', zIndex = 30, items = [];
3
3
  let height = undefined, width = undefined, top = undefined, bottom = undefined, left = undefined, right = undefined;
4
4
  function handleClickOverlay() {
@@ -1,4 +1,4 @@
1
- <script >export let title = "", items = [], hideOnScroll = true, initialRemoveShadow = false, initialBackgroundColor = undefined, backgroundColor = 'white', color = undefined, mobileMenu = true, zIndex = 25;
1
+ <script>export let title = "", items = [], hideOnScroll = true, initialRemoveShadow = false, initialBackgroundColor = undefined, backgroundColor = 'white', color = undefined, mobileMenu = true, zIndex = 25;
2
2
  let scrollY, lastScrollY, visible = true;
3
3
  function handleScroll() {
4
4
  if (hideOnScroll) {
@@ -1,6 +1,6 @@
1
- <script context="module" ></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >export let items = [], color = undefined, vertical = false, space = '20px';
3
+ <script>export let items = [], color = undefined, vertical = false, space = '20px';
4
4
  import { createEventDispatcher } from 'svelte';
5
5
  const dispatch = createEventDispatcher();
6
6
  function handleItemClick(item) {
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { afterUpdate, onMount } from 'svelte';
3
+ <script>import { afterUpdate, onMount } from 'svelte';
4
4
  export let tabs = [], selected = undefined, mandatory = true, width = undefined, color = "rgb(51 65 85)", bookmarkColor = undefined, horizontalGuideColor = "rgb(51 65 85)", margin = "12px";
5
5
  let tabButtons = {};
6
6
  onMount(() => {
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair",
4
- "version": "0.0.62",
4
+ "version": "0.0.64",
5
5
  "devDependencies": {
6
6
  "@sveltejs/adapter-auto": "next",
7
7
  "@sveltejs/kit": "next",
8
8
  "@testing-library/cypress": "^8.0.3",
9
9
  "@testing-library/jest-dom": "^5.16.4",
10
+ "@testing-library/svelte": "^3.1.3",
10
11
  "@typescript-eslint/eslint-plugin": "^4.31.1",
11
12
  "@typescript-eslint/parser": "^4.31.1",
12
13
  "autoprefixer": "^10.4.2",
@@ -15,6 +16,7 @@
15
16
  "eslint": "^7.32.0",
16
17
  "eslint-plugin-svelte3": "^3.2.1",
17
18
  "jest": "^28.1.2",
19
+ "jest-css-modules-transform": "^4.4.2",
18
20
  "jest-environment-jsdom": "^28.1.2",
19
21
  "svelte": "^3.44.0",
20
22
  "svelte-check": "^2.2.6",
@@ -23,14 +25,13 @@
23
25
  "svelte2tsx": "^0.4.12",
24
26
  "ts-jest": "^28.0.5",
25
27
  "tslib": "^2.3.1",
26
- "typescript": "^4.7.4",
27
- "@testing-library/svelte": "^3.1.3",
28
- "jest-css-modules-transform": "^4.4.2"
28
+ "typescript": "^4.7.4"
29
29
  },
30
30
  "type": "module",
31
31
  "dependencies": {
32
32
  "@mdi/font": "^6.5.95",
33
33
  "@sveltejs/adapter-node": "^1.0.0-next.79",
34
+ "@sveltejs/package": "^1.0.0-next.4",
34
35
  "uuid": "^8.3.2"
35
36
  },
36
37
  "jest": {
@@ -1,4 +1,4 @@
1
- <script >export let value = 0, total = 100, height = '5px', width = '100%', radius = '2px', backgroundColor = undefined, color = undefined;
1
+ <script>export let value = 0, total = 100, height = '5px', width = '100%', radius = '2px', backgroundColor = undefined, color = undefined;
2
2
  $: hundredBasedProgress = total === 0 ? 100 : value * 100 / total;
3
3
  $: cssVariables = Object.entries({
4
4
  '--progress-width': hundredBasedProgress + '%',
@@ -1,4 +1,4 @@
1
- <script >export let image = '', title = '', sale = false, saleText = 'SALE', price = undefined, currency = '€', discount = undefined, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined;
1
+ <script>export let image = '', title = '', sale = false, saleText = 'SALE', price = undefined, currency = '€', discount = undefined, maxWidth = undefined, maxHeight = undefined, minWidth = undefined, minHeight = undefined, width = undefined, height = undefined;
2
2
  $: priceLessDiscount = Number((price - discount).toFixed(2));
3
3
  import Image from '../media/Image.svelte';
4
4
  </script>
@@ -1,4 +1,4 @@
1
- <script >export let products = [], productMaxWidth = '90vw', productMinWidth = '200px', productMaxHeight = '90vh', productMinHeight = '300px', productHeight = '300px', productWidth = '200px', width = '100%', gap = '1rem';
1
+ <script>export let products = [], productMaxWidth = '90vw', productMinWidth = '200px', productMaxHeight = '90vh', productMinHeight = '300px', productHeight = '300px', productWidth = '200px', width = '100%', gap = '1rem';
2
2
  import ProductCard from './ProductCard.svelte';
3
3
  </script>
4
4
 
@@ -6,7 +6,7 @@
6
6
  1441px and more —  Extra large screens, TV
7
7
  */
8
8
  import { readable } from "svelte/store";
9
- import { browser } from "$app/env";
9
+ import { browser } from "$app/environment";
10
10
  // 0px — 425px: Mobile devices
11
11
  function handleMatchOnXsQuery(event) {
12
12
  if (event.matches) {
@@ -1,6 +1,6 @@
1
- <script context="module"></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { onMount } from 'svelte';
3
+ <script>import { onMount } from 'svelte';
4
4
  export let value = undefined, periods = [], sideMenuVisible = true, width = "500px", maxWidth = "100vw", minWidth = "initial", height = "300px", maxHeight = "100vh", minHeight = "initial";
5
5
  let visiblePeriodIndex = 0, oldTitle = undefined, newTitle = undefined, oldTitleTop = '0%', newTitleTop = '100%';
6
6
  onMount(() => {
@@ -1,6 +1,6 @@
1
- <script context="module" ></script>
1
+ <script context="module"></script>
2
2
 
3
- <script >import { dateToString } from '../dates/utils';
3
+ <script>import { dateToString } from '../dates/utils';
4
4
  export let items = [], singleSided = false, height = undefined, width = undefined, itemMarginTop = "15px", itemMarginBottom = "0px", firstItemMarginTop = "5px", lastItemMarginBottom = "5px", circleColor = "black", circleDiameter = "15px", timesWidth = undefined, circleAlignment = 'top';
5
5
  $: cssVariables = Object.entries({
6
6
  '-divider-width': '48px',