lapikit 0.0.0-insiders.efb49b7 → 0.0.0-insiders.f502b02

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 (46) hide show
  1. package/dist/components/app/app.svelte +22 -4
  2. package/dist/components/appbar/appbar.css +48 -0
  3. package/dist/components/appbar/appbar.svelte +41 -0
  4. package/dist/components/appbar/appbar.svelte.d.ts +4 -0
  5. package/dist/components/appbar/types.d.ts +15 -0
  6. package/dist/components/appbar/types.js +1 -0
  7. package/dist/components/aspect-ratio/aspect-ratio.svelte +23 -0
  8. package/dist/components/avatar/avatar.svelte +4 -4
  9. package/dist/components/avatar/types.d.ts +1 -1
  10. package/dist/components/button/button.css +162 -194
  11. package/dist/components/button/button.svelte +36 -24
  12. package/dist/components/button/button.svelte.d.ts +2 -2
  13. package/dist/components/button/types.d.ts +6 -4
  14. package/dist/components/card/card.css +109 -0
  15. package/dist/components/card/card.svelte +50 -0
  16. package/dist/components/card/card.svelte.d.ts +4 -0
  17. package/dist/components/card/types.d.ts +18 -0
  18. package/dist/components/card/types.js +1 -0
  19. package/dist/components/chip/chip.css +182 -0
  20. package/dist/components/chip/chip.svelte +5 -5
  21. package/dist/components/chip/types.d.ts +1 -1
  22. package/dist/components/icon/icon.css +13 -10
  23. package/dist/components/index.d.ts +6 -1
  24. package/dist/components/index.js +6 -1
  25. package/dist/components/list/list.css +5 -5
  26. package/dist/components/modal/modal.css +1 -1
  27. package/dist/components/spacer/spacer.css +3 -0
  28. package/dist/components/spacer/spacer.svelte +7 -0
  29. package/dist/components/spacer/spacer.svelte.d.ts +4 -0
  30. package/dist/components/spacer/types.d.ts +4 -0
  31. package/dist/components/spacer/types.js +1 -0
  32. package/dist/components/toolbar/toolbar.css +129 -0
  33. package/dist/components/toolbar/toolbar.svelte +47 -0
  34. package/dist/components/toolbar/toolbar.svelte.d.ts +4 -0
  35. package/dist/components/toolbar/types.d.ts +27 -0
  36. package/dist/components/toolbar/types.js +1 -0
  37. package/dist/internal/ripple.d.ts +11 -0
  38. package/dist/internal/ripple.js +90 -0
  39. package/dist/internal/unit.d.ts +1 -0
  40. package/dist/internal/unit.js +11 -0
  41. package/dist/preset.js +2 -2
  42. package/dist/stores/index.d.ts +4 -3
  43. package/dist/stores/index.js +9 -4
  44. package/dist/style/animation.css +40 -0
  45. package/dist/style/parser/device.js +31 -19
  46. package/package.json +1 -1
@@ -2,9 +2,7 @@
2
2
  --list-color: var(--on, var(--kit-on-neutral));
3
3
  --list-background: var(--base, var(--kit-neutral));
4
4
  --list-radius: var(--shape, var(--kit-radius-md));
5
-
6
5
  display: flex;
7
- width: 100%;
8
6
  }
9
7
 
10
8
  .kit-list.kit-list--nav {
@@ -16,9 +14,11 @@
16
14
  /* orientation */
17
15
  .kit-list[breakpoint]kit-list--orientation-vertical {
18
16
  flex-direction: column;
17
+ width: 100%;
19
18
  }
20
19
  .kit-list[breakpoint]kit-list--orientation-horizontal {
21
20
  flex-direction: row;
21
+ width: fit-content;
22
22
  }
23
23
  .kit-list[breakpoint]kit-list--orientation-horizontal .kit-list-item {
24
24
  justify-content: center;
@@ -70,14 +70,14 @@
70
70
 
71
71
  .kit-list[breakpoint]kit-list--density-compact .kit-list-item {
72
72
  height: calc(var(--list-height) - 0.25rem);
73
- min-width: calc(var(--list-height - 0.25rem));
73
+ min-width: calc(var(--list-height) - 0.25rem);
74
74
  --list-spacing-x: 0;
75
- --list-spacing-y: calc(var(--list-spacing) * var(--list-multiplier-y) - 0.25rem);
75
+ --list-spacing-y: calc(var(--kit-spacing) * var(--list-multiplier-y) - 0.25rem);
76
76
  }
77
77
 
78
78
  .kit-list[breakpoint]kit-list--density-comfortable .kit-list-item {
79
79
  height: calc(var(--list-height) + 0.25rem);
80
- min-width: calc(var(--list-height + 0.25rem));
80
+ min-width: calc(var(--list-height) + 0.25rem);
81
81
  --list-spacing-x: 0;
82
82
  --list-spacing-y: calc(var(--kit-spacing) * var(--list-multiplier-y) + 0.25rem);
83
83
  }
@@ -11,7 +11,7 @@
11
11
  --modal-translate-y: -50%;
12
12
 
13
13
  position: fixed;
14
-
14
+ overflow-y: auto;
15
15
  z-index: 9100;
16
16
  width: 100%;
17
17
  height: 100%;
@@ -0,0 +1,3 @@
1
+ .kit-spacer {
2
+ flex-grow: 1;
3
+ }
@@ -0,0 +1,7 @@
1
+ <script lang="ts">
2
+ import type { SpacerProps } from './types.js';
3
+
4
+ let { is = 'div', ...rest }: SpacerProps = $props();
5
+ </script>
6
+
7
+ <svelte:element this={is} {...rest} class={['kit-spacer', rest.class]}> </svelte:element>
@@ -0,0 +1,4 @@
1
+ import type { SpacerProps } from './types.js';
2
+ declare const Spacer: import("svelte").Component<SpacerProps, {}, "">;
3
+ type Spacer = ReturnType<typeof Spacer>;
4
+ export default Spacer;
@@ -0,0 +1,4 @@
1
+ import type { Base } from '../../internal/types.js';
2
+ export interface SpacerProps extends Base {
3
+ is?: 'div';
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,129 @@
1
+ .kit-toolbar {
2
+ --toolbar-color: var(--on, var(--kit-on-neutral));
3
+ --toolbar-background: var(--base, var(--kit-neutral));
4
+ --toolbar-radius: var(--shape, var(--kit-radius-md));
5
+
6
+ display: flex;
7
+ align-items: center;
8
+ min-width: max-content;
9
+ border-style: solid;
10
+ transition:
11
+ color 0.5s,
12
+ border-color 0.5s,
13
+ background-color 0.5s;
14
+
15
+ border-width: 1px;
16
+ border-style: solid;
17
+ border-radius: var(--toolbar-radius);
18
+
19
+ /* theme */
20
+ color: var(--toolbar-color);
21
+ background-color: var(--toolbar-background);
22
+ border-color: var(--toolbar-background);
23
+ }
24
+
25
+ /* density */
26
+ .kit-toolbar[breakpoint]kit-toolbar--density-default {
27
+ border-radius: calc(var(--kit-spacing) * 2.25);
28
+ }
29
+ .kit-toolbar[breakpoint]kit-toolbar--density-default:not([class*='toolbar--orientation-vertical']) {
30
+ height: 3rem;
31
+ padding-inline: calc(var(--kit-spacing) * 1.5);
32
+ }
33
+
34
+ .kit-toolbar[breakpoint]kit-toolbar--density-default[class*='toolbar--orientation-vertical'] {
35
+ width: 3rem;
36
+ padding: calc(var(--kit-spacing) * 1.5) 0;
37
+ }
38
+
39
+ .kit-toolbar[breakpoint]kit-toolbar--density-compact {
40
+ border-radius: calc(var(--kit-spacing) * 1.75);
41
+ }
42
+
43
+ .kit-toolbar[breakpoint]kit-toolbar--density-compact:not([class*='toolbar--orientation-vertical']) {
44
+ height: 2.625rem;
45
+ padding-inline: calc(var(--kit-spacing) * 0.75);
46
+ }
47
+
48
+ .kit-toolbar[breakpoint]kit-toolbar--density-compact[class*='toolbar--orientation-vertical'] {
49
+ width: 2.625rem;
50
+ padding: calc(var(--kit-spacing) * 0.75) 0;
51
+ }
52
+
53
+ .kit-toolbar[breakpoint]kit-toolbar--density-comfortable {
54
+ border-radius: calc(var(--kit-spacing) * 3.5);
55
+ }
56
+
57
+ .kit-toolbar[breakpoint]kit-toolbar--density-comfortable:not(
58
+ [class*='toolbar--orientation-vertical']
59
+ ) {
60
+ height: 3.5rem;
61
+ padding-inline: calc(var(--kit-spacing) * 2.25);
62
+ }
63
+
64
+ .kit-toolbar[breakpoint]kit-toolbar--density-comfortable[class*='toolbar--orientation-vertical'] {
65
+ width: 3.5rem;
66
+ padding: calc(var(--kit-spacing) * 2.25) 0;
67
+ }
68
+
69
+ .kit-toolbar[breakpoint]kit-toolbar--variant-text,
70
+ .kit-toolbar[breakpoint]kit-toolbar--variant-outline,
71
+ .kit-toolbar[breakpoint]kit-toolbar--variant-dash {
72
+ --toolbar-color: var(--base, var(--kit-neutral));
73
+ background-color: transparent;
74
+ }
75
+
76
+ .kit-toolbar[breakpoint]kit-toolbar--variant-outline {
77
+ border-color: currentColor;
78
+ }
79
+
80
+ .kit-toolbar[breakpoint]kit-toolbar--variant-dash {
81
+ border-style: dashed;
82
+ border-color: currentColor;
83
+ }
84
+
85
+ .kit-toolbar[breakpoint]kit-toolbar--orientation-horizontal {
86
+ flex-direction: row;
87
+ width: 100%;
88
+ }
89
+
90
+ .kit-toolbar[breakpoint]kit-toolbar--orientation-vertical {
91
+ flex-direction: column;
92
+ min-height: fit-content;
93
+ width: fit-content;
94
+ }
95
+
96
+ /* wrapper */
97
+ .kit-toolbar .kit-toolbar--wrapper {
98
+ display: flex;
99
+ align-items: center;
100
+ /* margin-left: auto;
101
+ margin-right: auto; */
102
+ flex-direction: row;
103
+ height: auto;
104
+ width: 100%;
105
+ }
106
+
107
+ .kit-toolbar[breakpoint]kit-toolbar--orientation-vertical .kit-toolbar--wrapper {
108
+ flex-direction: column;
109
+ height: 100%;
110
+ }
111
+
112
+ /* location */
113
+ .kit-toolbar[breakpoint]kit-toolbar--location-top {
114
+ top: 0px;
115
+ z-index: 1004;
116
+ transform: translateY(0px);
117
+ position: fixed;
118
+ left: 0px;
119
+ width: calc(100% + 0px);
120
+ }
121
+
122
+ .kit-toolbar[breakpoint]kit-toolbar--location-bottom {
123
+ z-index: 1004;
124
+ transform: translateY(0px);
125
+ position: fixed;
126
+ left: 0px;
127
+ width: calc(100% + 0px);
128
+ bottom: 0px;
129
+ }
@@ -0,0 +1,47 @@
1
+ <script lang="ts">
2
+ import { getAssets } from '../../internal/index.js';
3
+ import type { ToolbarProps } from './types.js';
4
+
5
+ let {
6
+ children,
7
+ ref = $bindable(),
8
+ is = 'div',
9
+ classContent,
10
+ light,
11
+ dark,
12
+ variant,
13
+ rounded,
14
+ background,
15
+ color,
16
+ density = 'default',
17
+ orientation = 'horizontal',
18
+ location,
19
+ ...rest
20
+ }: ToolbarProps = $props();
21
+
22
+ const assets = getAssets();
23
+ </script>
24
+
25
+ <svelte:element
26
+ this={is}
27
+ bind:this={ref}
28
+ {...rest}
29
+ role="toolbar"
30
+ class={[
31
+ 'kit-toolbar',
32
+ light && 'light',
33
+ dark && 'dark',
34
+ variant && assets.className('toolbar', 'variant', variant),
35
+ density && assets.className('toolbar', 'density', density),
36
+ orientation && assets.className('toolbar', 'orientation', orientation),
37
+ location && assets.className('toolbar', 'location', location),
38
+ rest.class
39
+ ]}
40
+ style:--base={assets.color(background)}
41
+ style:--on={assets.color(color)}
42
+ style:--shape={assets.shape(rounded)}
43
+ >
44
+ <div class={['kit-toolbar--wrapper', classContent]}>
45
+ {@render children?.()}
46
+ </div>
47
+ </svelte:element>
@@ -0,0 +1,4 @@
1
+ import type { ToolbarProps } from './types.js';
2
+ declare const Toolbar: import("svelte").Component<ToolbarProps, {}, "ref">;
3
+ type Toolbar = ReturnType<typeof Toolbar>;
4
+ export default Toolbar;
@@ -0,0 +1,27 @@
1
+ import type { Component } from '../../internal/types.js';
2
+ type Variant = 'outline' | 'text' | 'dash';
3
+ type Density = 'compact' | 'comfortable' | 'default';
4
+ type Orientation = 'horizontal' | 'vertical';
5
+ type Location = 'top' | 'bottom';
6
+ export interface ToolbarProps extends Component {
7
+ is?: 'div' | 'header' | 'nav';
8
+ variant?: Variant | {
9
+ [key: string]: Variant;
10
+ };
11
+ rounded?: string;
12
+ density?: Density | {
13
+ [key: string]: Density;
14
+ };
15
+ dark?: boolean;
16
+ light?: boolean;
17
+ color?: string;
18
+ orientation?: Orientation | {
19
+ [key: string]: Orientation;
20
+ };
21
+ background?: string;
22
+ location?: Location | {
23
+ [key: string]: Location;
24
+ };
25
+ classContent?: string | string[] | undefined;
26
+ }
27
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ interface RippleOptions {
2
+ center?: boolean;
3
+ color?: string;
4
+ duration?: number;
5
+ disabled?: boolean;
6
+ }
7
+ export declare function ripple(el: HTMLElement, options?: RippleOptions): {
8
+ destroy(): void;
9
+ update(newOptions: RippleOptions): void;
10
+ };
11
+ export {};
@@ -0,0 +1,90 @@
1
+ const triggerEvents = ['pointerdown', 'touchstart', 'keydown'];
2
+ const cancelEvents = ['mouseleave', 'dragleave', 'touchmove', 'touchcancel', 'pointerup', 'keyup'];
3
+ export function ripple(el, options = {}) {
4
+ const rippleContainer = document.createElement('div');
5
+ addClasses();
6
+ setOptions(options);
7
+ function addClasses(center) {
8
+ const shouldBeCentered = center || options.center;
9
+ if (!rippleContainer.classList.contains('kit-ripple--effect')) {
10
+ rippleContainer.classList.add('kit-ripple--effect');
11
+ }
12
+ if (!shouldBeCentered && rippleContainer.classList.contains('kit-ripple--center')) {
13
+ rippleContainer.classList.remove('kit-ripple--center');
14
+ }
15
+ if (shouldBeCentered) {
16
+ rippleContainer.classList.add('kit-ripple--center');
17
+ }
18
+ }
19
+ function setOptions(options) {
20
+ if (options.disabled || el.hasAttribute('aria-disabled')) {
21
+ rippleContainer.remove();
22
+ }
23
+ else {
24
+ el.appendChild(rippleContainer);
25
+ }
26
+ if (options.duration && options.duration < 0) {
27
+ options.duration = undefined;
28
+ }
29
+ if (options.color) {
30
+ rippleContainer.style.setProperty('--ripple-color', options.color);
31
+ }
32
+ if (options.duration) {
33
+ rippleContainer.style.setProperty('--ripple-duration', `${options.duration}ms`);
34
+ }
35
+ }
36
+ function createRipple(e, center) {
37
+ if (options.disabled || el.hasAttribute('aria-disabled')) {
38
+ return;
39
+ }
40
+ if (e instanceof KeyboardEvent) {
41
+ if (!['Enter', 'Space'].includes(e.code) || e.repeat) {
42
+ return;
43
+ }
44
+ e.preventDefault();
45
+ const click = new PointerEvent('pointerdown');
46
+ createRipple(click, true);
47
+ return;
48
+ }
49
+ addClasses(center);
50
+ const rect = el.getBoundingClientRect();
51
+ const clientX = window.TouchEvent && e instanceof TouchEvent
52
+ ? e.touches[0].clientX
53
+ : e.clientX;
54
+ const clientY = window.TouchEvent && e instanceof TouchEvent
55
+ ? e.touches[0].clientY
56
+ : e.clientY;
57
+ const x = clientX - rect.left > el.offsetWidth / 2 ? 0 : el.offsetWidth;
58
+ const y = clientY - rect.top > el.offsetHeight / 2 ? 0 : el.offsetHeight;
59
+ const radius = Math.hypot(x - (clientX - rect.left), y - (clientY - rect.top));
60
+ const ripple = document.createElement('div');
61
+ ripple.classList.add('kit-ripple');
62
+ ripple.style.left = `${clientX - rect.left - radius}px`;
63
+ ripple.style.top = `${clientY - rect.top - radius}px`;
64
+ ripple.style.width = ripple.style.height = `${radius * 2}px`;
65
+ rippleContainer.appendChild(ripple);
66
+ function removeRipple() {
67
+ if (ripple === null) {
68
+ return;
69
+ }
70
+ ripple.style.opacity = '0';
71
+ setTimeout(() => {
72
+ ripple.remove();
73
+ }, options.duration || 1000);
74
+ cancelEvents.forEach((event) => el.removeEventListener(event, removeRipple));
75
+ }
76
+ cancelEvents.forEach((event) => el.addEventListener(event, removeRipple, { passive: true }));
77
+ }
78
+ triggerEvents.forEach((event) => el.addEventListener(event, createRipple, { passive: event === 'touchstart' }));
79
+ return {
80
+ destroy() {
81
+ triggerEvents.forEach((event) => {
82
+ el.removeEventListener(event, createRipple);
83
+ });
84
+ },
85
+ update(newOptions) {
86
+ options = newOptions;
87
+ setOptions(newOptions);
88
+ }
89
+ };
90
+ }
@@ -0,0 +1 @@
1
+ export declare const setUnit: (value: string | number) => string;
@@ -0,0 +1,11 @@
1
+ export const setUnit = (value) => {
2
+ if (typeof value === 'number')
3
+ return `${value}px`;
4
+ if (typeof value === 'string') {
5
+ const cleaned = value.trim();
6
+ const isOnlyNumericLike = /^[\d.,]+$/.test(cleaned);
7
+ if (isOnlyNumericLike)
8
+ return `${value}px`;
9
+ }
10
+ return value;
11
+ };
package/dist/preset.js CHANGED
@@ -4,7 +4,7 @@ export const config = {
4
4
  minify: false // true | false
5
5
  },
6
6
  theme: {
7
- colorScheme: 'dark', // 'light' | 'dark' | 'auto'
7
+ colorScheme: 'system', // 'light' | 'dark' | 'system'
8
8
  colors: {
9
9
  primary: { light: 'oklch(45% 0.24 277.023)', dark: 'oklch(45% 0.24 277.023)' },
10
10
  'on-primary': { light: 'oklch(14% 0.005 285.823)', dark: 'oklch(14% 0.005 285.823)' },
@@ -35,7 +35,7 @@ export const config = {
35
35
  breakpoints: {
36
36
  mobileBreakpoint: 'sm',
37
37
  tabletBreakpoint: 'md',
38
- laptopBreakpoint: 'xl',
38
+ laptopBreakpoint: 'lg',
39
39
  thresholds: {
40
40
  _default: 0, // 0px
41
41
  xs: '28rem', //448px
@@ -1,9 +1,10 @@
1
1
  import { type Writable } from 'svelte/store';
2
- export declare const colorScheme: Writable<'auto' | 'dark' | 'light'>;
2
+ export declare const colorScheme: Writable<'system' | 'dark' | 'light'>;
3
+ export declare const colorSchemeSystem: Writable<'dark' | 'light'>;
3
4
  export declare const modalOpen: Writable<boolean | 'persistent'>;
4
5
  export declare const modalStack: Writable<string[]>;
5
- export declare function updateThemeStore(update: 'auto' | 'dark' | 'light'): void;
6
- export declare function setColorScheme(scheme: 'auto' | 'dark' | 'light'): void;
6
+ export declare function updateThemeStore(update: 'system' | 'dark' | 'light'): void;
7
+ export declare function setColorScheme(scheme: 'system' | 'dark' | 'light'): void;
7
8
  export declare function setOpenModal(state: boolean | 'persistent'): void;
8
9
  export declare const pushModal: (id: string) => void;
9
10
  export declare const popModal: (id: string) => void;
@@ -1,16 +1,18 @@
1
+ import { disabledScroll } from '../internal/scroll.js';
1
2
  import { writable } from 'svelte/store';
2
3
  // states
3
- const colorScheme_default = 'light';
4
+ const colorScheme_default = 'system';
4
5
  const modalOpen_default = false;
5
6
  const isBrowser = typeof window !== 'undefined';
6
7
  export const colorScheme = writable(colorScheme_default);
8
+ export const colorSchemeSystem = writable('light');
7
9
  export const modalOpen = writable(modalOpen_default);
8
10
  export const modalStack = writable([]);
9
11
  export function updateThemeStore(update) {
10
12
  colorScheme.update(() => {
11
13
  if (isBrowser) {
12
14
  const ref = document.documentElement.classList;
13
- if (update === 'auto')
15
+ if (update === 'system')
14
16
  ref.remove('light', 'dark');
15
17
  else {
16
18
  ref.remove(update === 'dark' ? 'light' : 'dark');
@@ -29,14 +31,17 @@ export function setOpenModal(state) {
29
31
  }
30
32
  export const pushModal = (id) => {
31
33
  modalStack.update((stack) => {
34
+ let values = stack;
32
35
  if (!stack.includes(id))
33
- return [...stack, id];
34
- return stack;
36
+ values = [...stack, id];
37
+ disabledScroll(values.length !== 0 ? true : false);
38
+ return values;
35
39
  });
36
40
  };
37
41
  export const popModal = (id) => {
38
42
  modalStack.update((stack) => {
39
43
  const newStack = stack.filter((m) => m !== id);
44
+ disabledScroll(newStack.length !== 0 ? true : false);
40
45
  return newStack.length === 0 ? [] : newStack;
41
46
  });
42
47
  };
@@ -18,3 +18,43 @@
18
18
  transform: rotate(380deg);
19
19
  }
20
20
  }
21
+
22
+ .kit-ripple {
23
+ background-color: currentColor;
24
+ opacity: 0.1;
25
+ position: absolute;
26
+ border-radius: 50%;
27
+ pointer-events: none;
28
+ -webkit-transition: 0.6s;
29
+ transition: 0.6s;
30
+ -webkit-animation: lapikit-ripple var(--ripple-duration, 0.4s) cubic-bezier(0.4, 0, 0.2, 1);
31
+ animation: lapikit-ripple var(--ripple-duration, 0.4s) cubic-bezier(0.4, 0, 0.2, 1);
32
+ }
33
+
34
+ .kit-ripple--center {
35
+ top: 50% !important;
36
+ left: 50% !important;
37
+ translate: -50% -50% !important;
38
+ }
39
+
40
+ .kit-ripple--effect {
41
+ position: absolute;
42
+ left: 0;
43
+ right: 0;
44
+ top: 0;
45
+ bottom: 0;
46
+ overflow: hidden;
47
+ background: none;
48
+ pointer-events: none;
49
+ z-index: 999;
50
+ }
51
+
52
+ @keyframes lapikit-ripple {
53
+ from {
54
+ scale: 0;
55
+ }
56
+
57
+ to {
58
+ scale: 1;
59
+ }
60
+ }
@@ -1,3 +1,4 @@
1
+ import { setUnit } from '../../internal/unit.js';
1
2
  export const devices = (config) => {
2
3
  let css = ``;
3
4
  const list = {
@@ -5,24 +6,35 @@ export const devices = (config) => {
5
6
  tablet: config.breakpoints.tabletBreakpoint,
6
7
  laptop: config.breakpoints.laptopBreakpoint
7
8
  };
8
- for (const [key, value] of Object.entries(list)) {
9
- const breakpointValue = config.breakpoints.thresholds[value];
10
- const breakpointValueMax = key !== 'laptop'
11
- ? config.breakpoints.thresholds[key === 'mobile' ? list.tablet : key == 'tablet' ? list.laptop : '']
12
- : undefined;
13
- css += `.device-${key}, .only-on-${key} {\n`;
14
- css += `display: none;\n`;
15
- css += `}\n`;
16
- css += `@media screen and (min-width: ${typeof breakpointValue === 'number' ? breakpointValue + 'px' : breakpointValue}) {\n`;
17
- css += `.device-${key} {\n`;
18
- css += `display: inherit !important;\n`;
19
- css += `}\n`;
20
- css += `}\n`;
21
- css += `@media screen and (min-width: ${typeof breakpointValue === 'number' ? breakpointValue + 'px' : breakpointValue}) ${breakpointValueMax ? `and (max-width: ${typeof breakpointValueMax === 'number' ? breakpointValueMax + 'px' : breakpointValueMax})` : ''}{\n`;
22
- css += `.only-on-${key} {\n`;
23
- css += `display: inherit !important;\n`;
24
- css += `}\n`;
25
- css += `}\n`;
26
- }
9
+ css += `@media screen and (max-width: ${setUnit(config.breakpoints.thresholds[list.mobile])}) {\n`;
10
+ css += `.hidden-mobile {\n`;
11
+ css += `display: none !important;\n`;
12
+ css += `}\n`;
13
+ css += `}\n`;
14
+ css += `@media screen and (min-width: ${setUnit(config.breakpoints.thresholds[list.mobile])}) {\n`;
15
+ css += `.display-mobile {\n`;
16
+ css += `display: none !important;\n`;
17
+ css += `}\n`;
18
+ css += `}\n`;
19
+ css += `@media screen and (min-width: ${setUnit(config.breakpoints.thresholds[list.tablet])}) and (max-width: ${setUnit(config.breakpoints.thresholds[list.laptop])}) {\n`;
20
+ css += `.hidden-tablet {\n`;
21
+ css += `display: none !important;\n`;
22
+ css += `}\n`;
23
+ css += `}\n`;
24
+ css += `@media screen and (max-width: ${setUnit(config.breakpoints.thresholds[list.tablet])}) and (min-width: ${setUnit(config.breakpoints.thresholds[list.laptop])}){\n`;
25
+ css += `.display-tablet {\n`;
26
+ css += `display: none !important;\n`;
27
+ css += `}\n`;
28
+ css += `}\n`;
29
+ css += `@media screen and (min-width: ${setUnit(config.breakpoints.thresholds[list.laptop])}) {\n`;
30
+ css += `.hidden-laptop {\n`;
31
+ css += `display: none !important;\n`;
32
+ css += `}\n`;
33
+ css += `}\n`;
34
+ css += `@media screen and (max-width: ${setUnit(config.breakpoints.thresholds[list.laptop])}) {\n`;
35
+ css += `.display-laptop {\n`;
36
+ css += `display: none !important;\n`;
37
+ css += `}\n`;
38
+ css += `}\n`;
27
39
  return css;
28
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lapikit",
3
- "version": "0.0.0-insiders.efb49b7",
3
+ "version": "0.0.0-insiders.f502b02",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"